text
stringlengths
2
1.05M
/** * @fileOverview Curve */ import React, { Component, PropTypes } from 'react'; import { symbol as shapeSymbol, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye } from 'd3-shape'; import pureRender from '../util/PureRender'; import classNames from 'classnames'; import _ from 'lodash'; import { PRESENTATION_ATTRIBUTES, getPresentationAttributes, filterEventAttributes } from '../util/ReactUtils'; const SYMBOL_FACTORIES = { symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, }; const RADIAN = Math.PI / 180; const getSymbolFactory = (type) => { const name = `symbol${type.slice(0, 1).toUpperCase()}${type.slice(1)}`; return SYMBOL_FACTORIES[name] || symbolCircle; }; const calculateAreaSize = (size, sizeType, type) => { if (sizeType === 'area') { return size; } switch (type) { case 'cross': return 5 * size * size / 9; case 'diamond': return 0.5 * size * size / Math.sqrt(3); case 'square': return size * size; case 'star': { const angle = 18 * RADIAN; return 1.25 * size * size * ( Math.tan(angle) - Math.tan(angle * 2) * Math.pow(Math.tan(angle), 2) ); } case 'triangle': return Math.sqrt(3) * size * size / 4; case 'wye': return (21 - 10 * Math.sqrt(3)) * size * size / 8; default: return Math.PI * size * size / 4; } }; @pureRender class Symbols extends Component { static displayName = 'Symbols'; static propTypes = { ...PRESENTATION_ATTRIBUTES, className: PropTypes.string, type: PropTypes.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']), cx: PropTypes.number, cy: PropTypes.number, size: PropTypes.number, sizeType: PropTypes.oneOf(['area', 'diameter']), }; static defaultProps = { type: 'circle', stroke: 'none', fill: '#000', size: 64, sizeType: 'area', }; /** * Calculate the path of curve * @return {String} path */ getPath() { const { size, sizeType, type } = this.props; const symbolFactory = getSymbolFactory(type); const symbol = shapeSymbol().type(symbolFactory) .size(calculateAreaSize(size, sizeType, type)); return symbol(); } render() { const { className, cx, cy, size } = this.props; if (cx === +cx && cy === +cy && size === +size) { return ( <path {...getPresentationAttributes(this.props)} {...filterEventAttributes(this.props)} className={classNames('recharts-symbols', className)} transform={`translate(${cx}, ${cy})`} d={this.getPath()} /> ); } return null; } } export default Symbols;
Highcharts.maps["countries/cn/653023"] = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"adcode":653023,"name":"阿合奇县","center":[78.450164,40.937567],"centroid":[77.885242,40.847884],"childrenNum":0,"level":"district","acroutes":[100000,650000,653000],"parent":{"adcode":653000},"longitude":77.885242,"latitude":40.847884},"geometry":{"type":"MultiPolygon","coordinates":[[[[-26,7445],[-24,7443],[-24,7442],[-24,7442],[-24,7441],[-23,7440],[-22,7439],[-21,7439],[-21,7438],[-20,7437],[-19,7435],[-19,7434],[-19,7434],[-18,7432],[-17,7429],[-16,7428],[-15,7427],[-15,7426],[-14,7424],[-14,7423],[-12,7421],[-12,7420],[-11,7418],[-10,7418],[-9,7417],[-8,7416],[-7,7416],[-7,7415],[-6,7414],[-5,7413],[-4,7412],[-2,7411],[-1,7411],[-1,7410],[0,7408],[0,7407],[1,7407],[1,7407],[2,7406],[4,7403],[5,7401],[6,7399],[6,7399],[6,7398],[7,7398],[8,7397],[8,7396],[9,7395],[9,7394],[11,7393],[11,7392],[12,7391],[13,7389],[14,7387],[14,7387],[15,7385],[17,7384],[19,7382],[19,7381],[19,7379],[19,7379],[20,7377],[21,7376],[21,7374],[21,7373],[21,7372],[21,7370],[22,7369],[21,7366],[22,7365],[21,7364],[21,7362],[22,7361],[23,7358],[23,7357],[23,7356],[24,7354],[25,7352],[25,7350],[26,7349],[26,7349],[26,7347],[26,7347],[26,7344],[26,7343],[25,7343],[25,7343],[26,7341],[26,7339],[26,7339],[27,7337],[28,7336],[28,7335],[28,7333],[29,7332],[30,7331],[31,7331],[32,7331],[34,7332],[36,7331],[36,7331],[37,7330],[37,7328],[37,7327],[36,7326],[36,7324],[35,7322],[34,7320],[33,7319],[32,7318],[31,7317],[31,7316],[31,7315],[30,7314],[29,7313],[29,7313],[30,7312],[30,7311],[30,7310],[31,7309],[31,7308],[30,7307],[30,7307],[28,7306],[25,7305],[24,7305],[23,7305],[19,7303],[18,7302],[17,7302],[15,7301],[14,7300],[13,7299],[12,7298],[11,7298],[9,7298],[9,7296],[7,7295],[6,7294],[6,7295],[5,7295],[4,7296],[2,7296],[0,7296],[-2,7296],[-6,7294],[-7,7293],[-8,7294],[-9,7294],[-11,7294],[-13,7293],[-14,7293],[-17,7291],[-18,7291],[-20,7292],[-21,7292],[-22,7291],[-23,7292],[-24,7292],[-24,7292],[-26,7290],[-27,7290],[-28,7289],[-29,7289],[-30,7289],[-30,7289],[-29,7287],[-29,7286],[-31,7284],[-31,7284],[-31,7283],[-30,7282],[-30,7281],[-30,7278],[-31,7274],[-31,7273],[-30,7273],[-29,7273],[-28,7272],[-27,7272],[-26,7272],[-26,7272],[-26,7271],[-27,7269],[-29,7267],[-30,7265],[-32,7262],[-32,7261],[-32,7259],[-33,7257],[-35,7255],[-37,7252],[-39,7250],[-41,7249],[-42,7248],[-43,7247],[-45,7243],[-47,7242],[-47,7241],[-53,7239],[-55,7239],[-56,7239],[-58,7237],[-61,7237],[-66,7236],[-68,7235],[-77,7234],[-79,7233],[-82,7232],[-86,7230],[-90,7228],[-91,7228],[-93,7227],[-95,7227],[-100,7226],[-104,7225],[-106,7224],[-109,7224],[-111,7224],[-113,7222],[-115,7221],[-117,7220],[-119,7219],[-120,7219],[-121,7218],[-121,7214],[-121,7214],[-121,7211],[-122,7210],[-123,7208],[-123,7207],[-124,7205],[-124,7205],[-125,7205],[-126,7206],[-127,7206],[-129,7205],[-130,7205],[-130,7205],[-131,7205],[-132,7205],[-134,7206],[-136,7206],[-137,7207],[-137,7208],[-138,7209],[-138,7210],[-139,7211],[-140,7211],[-142,7212],[-142,7212],[-144,7214],[-145,7214],[-147,7216],[-148,7217],[-149,7218],[-150,7218],[-151,7218],[-152,7219],[-153,7219],[-154,7219],[-158,7219],[-161,7220],[-165,7221],[-169,7222],[-175,7223],[-178,7224],[-180,7225],[-180,7225],[-181,7227],[-181,7230],[-180,7234],[-181,7237],[-180,7238],[-181,7239],[-182,7240],[-183,7241],[-184,7243],[-185,7245],[-187,7247],[-187,7249],[-188,7249],[-189,7251],[-189,7252],[-190,7254],[-191,7256],[-191,7257],[-191,7258],[-192,7262],[-192,7264],[-192,7267],[-193,7268],[-194,7269],[-195,7271],[-196,7272],[-196,7274],[-197,7276],[-197,7279],[-198,7280],[-198,7283],[-198,7284],[-197,7286],[-196,7287],[-196,7287],[-196,7291],[-196,7291],[-196,7291],[-198,7290],[-200,7289],[-201,7288],[-203,7288],[-206,7287],[-207,7287],[-209,7288],[-209,7288],[-211,7288],[-214,7290],[-216,7291],[-219,7293],[-221,7292],[-224,7291],[-227,7291],[-231,7291],[-234,7291],[-236,7291],[-238,7293],[-240,7294],[-241,7296],[-243,7298],[-244,7299],[-247,7298],[-250,7298],[-252,7297],[-254,7297],[-256,7299],[-258,7299],[-259,7299],[-262,7300],[-264,7301],[-266,7302],[-266,7303],[-268,7304],[-270,7304],[-271,7304],[-272,7304],[-272,7304],[-274,7304],[-275,7304],[-278,7303],[-278,7303],[-280,7303],[-282,7302],[-285,7301],[-286,7302],[-288,7302],[-289,7303],[-290,7303],[-291,7303],[-294,7303],[-297,7304],[-298,7304],[-299,7304],[-300,7304],[-301,7305],[-303,7306],[-304,7306],[-305,7306],[-306,7306],[-307,7306],[-308,7307],[-309,7308],[-309,7309],[-310,7310],[-310,7312],[-310,7315],[-310,7317],[-309,7318],[-308,7319],[-307,7320],[-307,7321],[-306,7323],[-306,7324],[-306,7325],[-307,7325],[-308,7327],[-309,7327],[-311,7328],[-313,7329],[-314,7331],[-315,7331],[-316,7333],[-317,7334],[-319,7336],[-320,7336],[-323,7337],[-331,7338],[-332,7338],[-333,7338],[-337,7338],[-338,7338],[-339,7337],[-340,7336],[-341,7336],[-343,7337],[-345,7337],[-346,7337],[-348,7337],[-349,7338],[-349,7338],[-351,7337],[-352,7337],[-354,7336],[-355,7336],[-356,7335],[-356,7334],[-357,7334],[-359,7333],[-360,7333],[-361,7333],[-362,7334],[-364,7335],[-365,7335],[-366,7335],[-368,7333],[-369,7333],[-370,7333],[-372,7331],[-375,7330],[-377,7330],[-379,7330],[-381,7330],[-383,7330],[-382,7331],[-380,7332],[-379,7333],[-376,7333],[-375,7333],[-375,7333],[-373,7333],[-372,7334],[-372,7335],[-372,7339],[-372,7341],[-370,7343],[-369,7344],[-368,7348],[-366,7350],[-365,7350],[-366,7352],[-366,7353],[-366,7354],[-367,7355],[-367,7357],[-368,7358],[-368,7361],[-368,7364],[-367,7366],[-364,7368],[-361,7370],[-359,7370],[-358,7369],[-357,7369],[-355,7371],[-352,7375],[-351,7376],[-349,7376],[-349,7378],[-348,7380],[-349,7381],[-349,7382],[-347,7383],[-347,7384],[-347,7385],[-346,7386],[-345,7389],[-345,7391],[-344,7394],[-343,7395],[-342,7397],[-341,7399],[-339,7401],[-338,7403],[-337,7404],[-336,7406],[-333,7407],[-332,7407],[-329,7406],[-329,7408],[-327,7409],[-325,7409],[-324,7409],[-322,7409],[-320,7408],[-319,7408],[-318,7409],[-317,7413],[-314,7416],[-312,7418],[-310,7418],[-309,7417],[-307,7415],[-306,7415],[-304,7416],[-301,7416],[-299,7417],[-298,7417],[-298,7418],[-297,7419],[-295,7421],[-294,7421],[-293,7422],[-291,7423],[-288,7424],[-287,7424],[-286,7422],[-286,7421],[-285,7420],[-283,7420],[-280,7419],[-277,7419],[-275,7419],[-272,7418],[-271,7417],[-270,7415],[-269,7414],[-269,7414],[-271,7411],[-270,7411],[-268,7409],[-266,7409],[-266,7407],[-263,7405],[-262,7404],[-262,7402],[-258,7402],[-257,7404],[-256,7404],[-255,7404],[-253,7403],[-251,7404],[-249,7404],[-246,7403],[-246,7402],[-246,7401],[-246,7401],[-245,7400],[-244,7400],[-244,7398],[-243,7397],[-243,7397],[-240,7396],[-238,7396],[-236,7397],[-233,7399],[-228,7400],[-226,7402],[-225,7401],[-224,7401],[-222,7400],[-222,7398],[-220,7398],[-218,7399],[-217,7399],[-216,7396],[-214,7395],[-214,7395],[-212,7394],[-209,7393],[-207,7393],[-207,7392],[-207,7390],[-208,7387],[-205,7386],[-203,7386],[-202,7386],[-199,7386],[-197,7386],[-196,7385],[-195,7385],[-194,7385],[-192,7384],[-191,7382],[-190,7382],[-188,7381],[-187,7384],[-187,7384],[-185,7383],[-184,7383],[-183,7384],[-181,7383],[-180,7383],[-179,7383],[-176,7384],[-176,7384],[-174,7383],[-173,7382],[-171,7381],[-169,7381],[-168,7381],[-166,7381],[-164,7382],[-162,7382],[-161,7383],[-161,7384],[-159,7383],[-157,7381],[-156,7381],[-155,7380],[-153,7380],[-153,7382],[-152,7382],[-151,7384],[-150,7386],[-149,7386],[-148,7386],[-147,7385],[-145,7385],[-144,7385],[-143,7386],[-143,7387],[-144,7391],[-145,7393],[-145,7394],[-145,7395],[-145,7396],[-145,7398],[-144,7398],[-145,7399],[-145,7400],[-144,7401],[-143,7403],[-142,7404],[-142,7404],[-141,7406],[-140,7406],[-139,7407],[-138,7408],[-137,7408],[-135,7409],[-133,7409],[-132,7409],[-131,7409],[-129,7410],[-128,7410],[-128,7410],[-127,7411],[-125,7412],[-124,7413],[-123,7413],[-123,7413],[-122,7412],[-121,7411],[-120,7411],[-119,7411],[-119,7411],[-118,7411],[-118,7411],[-117,7410],[-116,7410],[-116,7410],[-115,7410],[-114,7410],[-114,7410],[-113,7409],[-113,7408],[-113,7408],[-112,7408],[-111,7408],[-110,7408],[-110,7408],[-108,7409],[-108,7409],[-107,7409],[-107,7409],[-106,7408],[-106,7408],[-105,7409],[-104,7410],[-103,7410],[-102,7410],[-101,7410],[-100,7411],[-99,7411],[-97,7411],[-97,7412],[-95,7412],[-95,7413],[-94,7413],[-93,7413],[-92,7413],[-90,7414],[-89,7414],[-88,7414],[-88,7414],[-87,7415],[-86,7414],[-85,7414],[-85,7413],[-84,7414],[-83,7414],[-82,7414],[-81,7414],[-81,7415],[-80,7416],[-79,7418],[-79,7419],[-78,7421],[-78,7422],[-77,7424],[-77,7425],[-77,7426],[-76,7427],[-75,7428],[-75,7429],[-75,7431],[-75,7432],[-75,7433],[-75,7434],[-74,7434],[-73,7434],[-72,7435],[-72,7435],[-71,7436],[-71,7437],[-69,7438],[-69,7439],[-69,7440],[-70,7444],[-70,7445],[-70,7446],[-69,7446],[-68,7446],[-68,7447],[-68,7448],[-67,7449],[-67,7449],[-65,7449],[-63,7449],[-62,7449],[-60,7449],[-58,7449],[-57,7449],[-54,7450],[-53,7450],[-52,7449],[-52,7449],[-51,7447],[-50,7447],[-49,7447],[-48,7447],[-47,7446],[-47,7446],[-46,7445],[-45,7446],[-44,7446],[-42,7444],[-42,7444],[-41,7445],[-41,7445],[-40,7443],[-40,7443],[-39,7443],[-39,7443],[-38,7443],[-36,7445],[-35,7445],[-34,7445],[-34,7444],[-33,7444],[-32,7443],[-31,7444],[-31,7444],[-30,7443],[-29,7443],[-28,7443],[-27,7443],[-26,7443],[-26,7445],[-26,7445]]]]}}],"UTF8Encoding":true,"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:3415"}},"hc-transform":{"default":{"crs":"+proj=lcc +lat_1=18 +lat_2=24 +lat_0=21 +lon_0=114 +x_0=500000 +y_0=500000 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs","scale":0.000129831107685,"jsonres":15.5,"jsonmarginX":-999,"jsonmarginY":9851,"xoffset":-3139937.49309,"yoffset":4358972.7486}}}
import styled from "styled-components"; export const PlaceholderLine = styled.div` background-color: ${p => p.dark ? p.theme.colors.palette.text.shade80 : p.theme.colors.palette.text.shade20}; width: ${p => p.width}px; height: ${p => p.height || 10}px; border-radius: 5px; margin: 5px 0; `;
var searchData= [ ['uart_5f1stopbit',['UART_1STOPBIT',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#aeee202af550ff488265540ef5b5182c1a7e59a309111b5beb532d69f777f8d44b',1,'pasco2::UARTPAL']]], ['uart_5f2stopbits',['UART_2STOPBITS',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#aeee202af550ff488265540ef5b5182c1a4aa75639204a29facd56f0c76328512e',1,'pasco2::UARTPAL']]], ['uart_5f5bits',['UART_5BITS',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#a8b0d6694edf003ea5822ba70d346a651a24f449a63684b077d3ded0c3c162cc6d',1,'pasco2::UARTPAL']]], ['uart_5f6bits',['UART_6BITS',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#a8b0d6694edf003ea5822ba70d346a651a7b99869525afc8b9c1d956fe63e74cde',1,'pasco2::UARTPAL']]], ['uart_5f7bits',['UART_7BITS',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#a8b0d6694edf003ea5822ba70d346a651afd59538e92f079f775b87cab15c78952',1,'pasco2::UARTPAL']]], ['uart_5f8bits',['UART_8BITS',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#a8b0d6694edf003ea5822ba70d346a651a7e001c04c5b42441a0e4250528c778d8',1,'pasco2::UARTPAL']]], ['uart_5f9bits',['UART_9BITS',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#a8b0d6694edf003ea5822ba70d346a651aaf1f28014effa435673392e622192108',1,'pasco2::UARTPAL']]], ['uart_5fparity_5feven',['UART_PARITY_EVEN',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#a3d63fae7495d0943166a2d44e1695f1fa820b8aeff8aaf6b354c9fb8574d82854',1,'pasco2::UARTPAL']]], ['uart_5fparity_5fnone',['UART_PARITY_NONE',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#a3d63fae7495d0943166a2d44e1695f1fa311dce1a91b67f8db9582ef9b63fc1fb',1,'pasco2::UARTPAL']]], ['uart_5fparity_5fodd',['UART_PARITY_ODD',['../d7/d41/classpasco2_1_1_u_a_r_t_p_a_l.html#a3d63fae7495d0943166a2d44e1695f1fa5207c667e682d9ce93e49fbe25185fb4',1,'pasco2::UARTPAL']]], ['uninited',['UNINITED',['../de/d53/group__co2types.html#gga3f14509bd9c7a73b6d25b020079d76e8a3af9da08445a00ed98116e7272fc4ddd',1,'pasco2']]] ];
import Vue from 'vue'; import { PopupManager } from 'element-ui/src/utils/popup'; import { isVNode } from 'element-ui/src/utils/vdom'; let MessageConstructor = Vue.extend(require('./main.vue')); let instance; let instances = []; let seed = 1; var Message = function(options) { if (Vue.prototype.$isServer) return; options = options || {}; if (typeof options === 'string') { options = { message: options }; } let userOnClose = options.onClose; let id = 'message_' + seed++; options.onClose = function() { Message.close(id, userOnClose); }; instance = new MessageConstructor({ data: options }); instance.id = id; if (isVNode(instance.message)) { instance.$slots.default = [instance.message]; instance.message = null; } instance.vm = instance.$mount(); document.body.appendChild(instance.vm.$el); instance.vm.visible = true; instance.dom = instance.vm.$el; instance.dom.style.zIndex = PopupManager.nextZIndex(); instances.push(instance); return instance.vm; }; ['success', 'warning', 'info', 'error'].forEach(type => { Message[type] = options => { if (typeof options === 'string') { options = { message: options }; } options.type = type; return Message(options); }; }); Message.close = function(id, userOnClose) { for (let i = 0, len = instances.length; i < len; i++) { if (id === instances[i].id) { if (typeof userOnClose === 'function') { userOnClose(instances[i]); } instances.splice(i, 1); break; } } }; Message.closeAll = function() { for (let i = instances.length - 1; i >= 0; i--) { instances[i].close(); } }; export default Message;
import React, { PropTypes } from "react"; class HomePage extends React.Component { static propTypes = { } render() { return ( <div> <h1>Home</h1> <p>And justice for all</p> </div> ); } } export default HomePage
'use strict' const { LogicalException } = require('@adonisjs/generic-exceptions') class InvalidAccessException extends LogicalException { /** * Handle this exception by itself */ handle (error, {response}) { return response.status(403).json({ error: 'Invalid access', }); } } module.exports = InvalidAccessException
// // Code your solution in this file! const companyName = 'Scuber' let mostProfitableNeighborhood = 'Chelsea' let companyCeo = "Susan Smith"
/*! jQuery UI - v1.10.4 - 2014-04-13 * http://jqueryui.com * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ jQuery(function(t){t.datepicker.regional.is={closeText:"Loka",prevText:"&#x3C; Fyrri",nextText:"Næsti &#x3E;",currentText:"Í dag",monthNames:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],dayNames:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"],dayNamesShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau"],dayNamesMin:["Su","Má","Þr","Mi","Fi","Fö","La"],weekHeader:"Vika",dateFormat:"dd.mm.yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.datepicker.setDefaults(t.datepicker.regional.is)});
/* * Copyright 2017 Alexander Pustovalov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { modelSelector } from './selectors.js'; import { containerActions, ADD_NEW } from './actions.js'; import { Modal, Button } from 'react-bootstrap'; import { PageComponentForm } from 'components'; class Container extends Component { constructor (props) { super(props); this.handleClose = this.handleClose.bind(this); this.handleSave = this.handleSave.bind(this); this.handleSelectTab = this.handleSelectTab.bind(this); } handleClose (e) { e.stopPropagation(); e.preventDefault(); this.props.hideModal(); } handleSave (e) { e.stopPropagation(); e.preventDefault(); const {componentModel, change} = this.props; const options = this.refs.formPageName.getOptions(); change(options, componentModel.mode); } handleSelectTab (eventKey) { } render () { const {componentModel, deskPageModel, hideModal} = this.props; return ( <Modal show={componentModel.show} onHide={hideModal} dialogClassName='umy-modal-overlay umy-modal-middlesize' backdrop={true} keyboard={true} bsSize='large' ref='dialog' animation={true}> <Modal.Header closeButton={false} aria-labelledby='contained-modal-title'> <Modal.Title id='contained-modal-title'>Page options</Modal.Title> </Modal.Header> <form onSubmit={this.handleSave}> <Modal.Body> <PageComponentForm ref="formPageName" pageName={componentModel.mode === ADD_NEW ? 'NewPage' : deskPageModel.currentPageName} pagePath={componentModel.mode === ADD_NEW ? '/new-page' : deskPageModel.currentPagePath}/> </Modal.Body> <Modal.Footer> <Button onClick={this.handleClose}>Cancel</Button> <Button onClick={this.handleSave} bsStyle="primary" type="submit"> Save changes </Button> </Modal.Footer> </form> </Modal> ); } } export default connect(modelSelector, containerActions)(Container);
#!/usr/bin/env node /*jslint node: true */ 'use strict'; var env = require('gitter-web-env'); var winston = env.logger; var presenceService = require('gitter-web-presence'); var shutdown = require('shutdown'); var BayeuxCluster = require('../../server/web/bayeux/cluster'); var bayeux = new BayeuxCluster(true); // Lightweight bayeux cluster presenceService.collectGarbage(bayeux, function(err) { if (err) winston.error('Error while validating sockets' + err, { exception: err }); shutdown.shutdownGracefully(); });
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.msg = msg; exports.access = access; exports.assertRootMode = assertRootMode; exports.assertSourceMaps = assertSourceMaps; exports.assertCompact = assertCompact; exports.assertSourceType = assertSourceType; exports.assertCallerMetadata = assertCallerMetadata; exports.assertInputSourceMap = assertInputSourceMap; exports.assertString = assertString; exports.assertFunction = assertFunction; exports.assertBoolean = assertBoolean; exports.assertObject = assertObject; exports.assertArray = assertArray; exports.assertIgnoreList = assertIgnoreList; exports.assertConfigApplicableTest = assertConfigApplicableTest; exports.assertConfigFileSearch = assertConfigFileSearch; exports.assertBabelrcSearch = assertBabelrcSearch; exports.assertPluginList = assertPluginList; exports.assertTargets = assertTargets; exports.assertAssumptions = assertAssumptions; function _helperCompilationTargets() { const data = require("@babel/helper-compilation-targets"); _helperCompilationTargets = function () { return data; }; return data; } var _options = require("./options"); function msg(loc) { switch (loc.type) { case "root": return ``; case "env": return `${msg(loc.parent)}.env["${loc.name}"]`; case "overrides": return `${msg(loc.parent)}.overrides[${loc.index}]`; case "option": return `${msg(loc.parent)}.${loc.name}`; case "access": return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`; default: throw new Error(`Assertion failure: Unknown type ${loc.type}`); } } function access(loc, name) { return { type: "access", name, parent: loc }; } function assertRootMode(loc, value) { if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") { throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`); } return value; } function assertSourceMaps(loc, value) { if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") { throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`); } return value; } function assertCompact(loc, value) { if (value !== undefined && typeof value !== "boolean" && value !== "auto") { throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`); } return value; } function assertSourceType(loc, value) { if (value !== undefined && value !== "module" && value !== "script" && value !== "unambiguous") { throw new Error(`${msg(loc)} must be "module", "script", "unambiguous", or undefined`); } return value; } function assertCallerMetadata(loc, value) { const obj = assertObject(loc, value); if (obj) { if (typeof obj["name"] !== "string") { throw new Error(`${msg(loc)} set but does not contain "name" property string`); } for (const prop of Object.keys(obj)) { const propLoc = access(loc, prop); const value = obj[prop]; if (value != null && typeof value !== "boolean" && typeof value !== "string" && typeof value !== "number") { throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`); } } } return value; } function assertInputSourceMap(loc, value) { if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) { throw new Error(`${msg(loc)} must be a boolean, object, or undefined`); } return value; } function assertString(loc, value) { if (value !== undefined && typeof value !== "string") { throw new Error(`${msg(loc)} must be a string, or undefined`); } return value; } function assertFunction(loc, value) { if (value !== undefined && typeof value !== "function") { throw new Error(`${msg(loc)} must be a function, or undefined`); } return value; } function assertBoolean(loc, value) { if (value !== undefined && typeof value !== "boolean") { throw new Error(`${msg(loc)} must be a boolean, or undefined`); } return value; } function assertObject(loc, value) { if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) { throw new Error(`${msg(loc)} must be an object, or undefined`); } return value; } function assertArray(loc, value) { if (value != null && !Array.isArray(value)) { throw new Error(`${msg(loc)} must be an array, or undefined`); } return value; } function assertIgnoreList(loc, value) { const arr = assertArray(loc, value); if (arr) { arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item)); } return arr; } function assertIgnoreItem(loc, value) { if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) { throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`); } return value; } function assertConfigApplicableTest(loc, value) { if (value === undefined) return value; if (Array.isArray(value)) { value.forEach((item, i) => { if (!checkValidTest(item)) { throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`); } }); } else if (!checkValidTest(value)) { throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`); } return value; } function checkValidTest(value) { return typeof value === "string" || typeof value === "function" || value instanceof RegExp; } function assertConfigFileSearch(loc, value) { if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") { throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, ` + `got ${JSON.stringify(value)}`); } return value; } function assertBabelrcSearch(loc, value) { if (value === undefined || typeof value === "boolean") return value; if (Array.isArray(value)) { value.forEach((item, i) => { if (!checkValidTest(item)) { throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`); } }); } else if (!checkValidTest(value)) { throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` + `or an array of those, got ${JSON.stringify(value)}`); } return value; } function assertPluginList(loc, value) { const arr = assertArray(loc, value); if (arr) { arr.forEach((item, i) => assertPluginItem(access(loc, i), item)); } return arr; } function assertPluginItem(loc, value) { if (Array.isArray(value)) { if (value.length === 0) { throw new Error(`${msg(loc)} must include an object`); } if (value.length > 3) { throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`); } assertPluginTarget(access(loc, 0), value[0]); if (value.length > 1) { const opts = value[1]; if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) { throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`); } } if (value.length === 3) { const name = value[2]; if (name !== undefined && typeof name !== "string") { throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`); } } } else { assertPluginTarget(loc, value); } return value; } function assertPluginTarget(loc, value) { if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") { throw new Error(`${msg(loc)} must be a string, object, function`); } return value; } function assertTargets(loc, value) { if ((0, _helperCompilationTargets().isBrowsersQueryValid)(value)) return value; if (typeof value !== "object" || !value || Array.isArray(value)) { throw new Error(`${msg(loc)} must be a string, an array of strings or an object`); } const browsersLoc = access(loc, "browsers"); const esmodulesLoc = access(loc, "esmodules"); assertBrowsersList(browsersLoc, value.browsers); assertBoolean(esmodulesLoc, value.esmodules); for (const key of Object.keys(value)) { const val = value[key]; const subLoc = access(loc, key); if (key === "esmodules") assertBoolean(subLoc, val);else if (key === "browsers") assertBrowsersList(subLoc, val);else if (!Object.hasOwnProperty.call(_helperCompilationTargets().TargetNames, key)) { const validTargets = Object.keys(_helperCompilationTargets().TargetNames).join(", "); throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`); } else assertBrowserVersion(subLoc, val); } return value; } function assertBrowsersList(loc, value) { if (value !== undefined && !(0, _helperCompilationTargets().isBrowsersQueryValid)(value)) { throw new Error(`${msg(loc)} must be undefined, a string or an array of strings`); } } function assertBrowserVersion(loc, value) { if (typeof value === "number" && Math.round(value) === value) return; if (typeof value === "string") return; throw new Error(`${msg(loc)} must be a string or an integer number`); } function assertAssumptions(loc, value) { if (value === undefined) return; if (typeof value !== "object" || value === null) { throw new Error(`${msg(loc)} must be an object or undefined.`); } let root = loc; do { root = root.parent; } while (root.type !== "root"); const inPreset = root.source === "preset"; for (const name of Object.keys(value)) { const subLoc = access(loc, name); if (!_options.assumptionsNames.has(name)) { throw new Error(`${msg(subLoc)} is not a supported assumption.`); } if (typeof value[name] !== "boolean") { throw new Error(`${msg(subLoc)} must be a boolean.`); } if (inPreset && value[name] === false) { throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`); } } return value; }
const express = require('express'); const validate = require('express-validation'); const { authenticatedMiddleware } = require('@middlewares/authenticated'); const controller = require('./feature.controller'); const validator = require('./feature.validator'); const router = express.Router(); /** * @api {post} api/v1/feature feature * @apiDescription CRUD methods for working with features * @apiVersion 1.0.0 * @apiName feature * @apiPermission public * * @apiParam {String} [param] Put some parameter schema here * * @apiSuccess {Number} responseCode HTTP Response Code * @apiSuccess {String} responseMessage Response message * @apiSuccess {Object} response Response object * * @apiError (Bad Request 400) ValidationError Some parameters may contain invalid values */ router.route('/:id?') .get(authenticatedMiddleware, controller.read) .post(validate(validator.joiSchema), authenticatedMiddleware, controller.create) .patch(validate(validator.joiSchema), authenticatedMiddleware, controller.update) .delete(authenticatedMiddleware, controller.delete); module.exports = router;
module.exports = new Date(1992, 11, 9)
const path = require("path"); const rlequire = require("rlequire"); const Config = rlequire("dendro", "src/models/meta/config.js").Config; const isNull = rlequire("dendro", "src/utils/null.js").isNull; const Class = rlequire("dendro", "src/models/meta/class.js").Class; const Resource = rlequire("dendro", "src/models/resource.js").Resource; const Change = rlequire("dendro", "src/models/versions/change.js").Change; const Descriptor = rlequire("dendro", "src/models/meta/descriptor.js").Descriptor; const User = rlequire("dendro", "src/models/user.js").User; const Elements = rlequire("dendro", "src/models/meta/elements.js").Elements; const Logger = rlequire("dendro", "src/utils/logger.js").Logger; const db = Config.getDBByID(); const _ = require("underscore"); const async = require("async"); function ArchivedResource (object = {}) { const self = this; self.addURIAndRDFType(object, "archived_resource", ArchivedResource); ArchivedResource.baseConstructor.call(this, object); self.copyOrInitDescriptors(object); self.ddr.isVersionOf = object.ddr.isVersionOf; if (!isNull(object.rdf.type)) { if (object.rdf.type instanceof Array) { if (!_.contains(object.rdf.type, "ddr:ArchivedResource")) { self.rdf.type = object.rdf.type.concat(["ddr:ArchivedResource"]); } } else if (typeof object.rdf.type === "string") { if (object.rdf.type !== "ddr:ArchivedResource") { self.rdf.type = [object.rdf.type, "ddr:ArchivedResource"]; } } } const now = new Date(); if (isNull(self.ddr.created)) { self.ddr.created = now.toISOString(); } return self; } ArchivedResource.findByResourceAndVersionNumber = function (resourceUri, versionNumber, callback, customGraphUri) { const graphUri = (!isNull(customGraphUri) && typeof customGraphUri === "string") ? customGraphUri : db.graphUri; try { if (!isNull(versionNumber) && typeof versionNumber === "number" && versionNumber % 1 === 0) { db.connection.executeViaJDBC( "SELECT ?archived_resource\n" + "FROM [0]\n" + "WHERE \n" + "{ \n" + " ?archived_resource ddr:isVersionOf [1]. \n" + " ?archived_resource ddr:versionNumber [2]. \n" + "} \n", [ { type: Elements.types.resourceNoEscape, value: graphUri }, { type: Elements.ontologies.ddr.isVersionOf.type, value: resourceUri }, { type: Elements.ontologies.ddr.versionNumber.type, value: versionNumber } ], function (err, results) { if (isNull(err)) { if (results instanceof Array && results.length === 1) { ArchivedResource.findByUri(results[0].archived_resource, callback); } else { const msg = "Unable to determine the URI of the archived resource version " + versionNumber + " of " + resourceUri; Logger.log("error", msg); return callback(1, msg); } } else { const msg = "Error finding archived version " + versionNumber + " of resource " + resourceUri + " . Error returned: " + JSON.stringify(results); Logger.log("error", msg); return callback(err, msg); } }); } else { return callback(1, versionNumber + " is not a valid integer."); } } catch (ex) { return callback(1, versionNumber + " is not a valid integer. Exception reported : " + ex); } }; ArchivedResource.findByUri = function (uri, callback) { ArchivedResource.baseConstructor.findByUri(uri, function (err, archivedResource) { if (isNull(err) && !isNull(archivedResource)) { Change.findByAssociatedRevision(uri, function (err, changes) { if (isNull(err)) { archivedResource = new ArchivedResource(JSON.parse(JSON.stringify(archivedResource))); archivedResource.changes = changes; return callback(null, archivedResource); } return callback(1, archivedResource); }); } else { const error = "Unable to find archived resource with uri : " + uri; Logger.log("error", error); return callback(1, null); } }); }; ArchivedResource.prototype.getChanges = function (callback) { const self = this; Change.findByAssociatedRevision(self.uri, function (err, changes) { if (isNull(err)) { return callback(null, changes); } return callback(1, changes); }); }; ArchivedResource.prototype.getDetailedInformation = function (callback) { const self = this; const archivedResource = new ArchivedResource(JSON.parse(JSON.stringify(self))); archivedResource.changes = self.changes; const getAuthorInformation = function (cb) { const authorUri = self.ddr.versionCreator; User.findByUri(authorUri, function (err, fullVersionCreator) { if (isNull(err)) { Descriptor.removeUnauthorizedFromObject(fullVersionCreator, [Elements.access_types.private], [Elements.access_types.api_readable]); archivedResource.ddr.versionCreator = fullVersionCreator; return cb(null); } return cb(1); }); }; const setHumanReadableDate = function (cb) { const moment = require("moment"); const humanReadableDate = moment(archivedResource.ddr.created); archivedResource.ddr.created = humanReadableDate.calendar(); return cb(null); }; const getVersionedResourceDetail = function (cb) { Resource.findByUri(self.ddr.isVersionOf, function (err, versionedResource) { if (isNull(err)) { archivedResource.ddr.isVersionOf = versionedResource; return cb(null); } return cb(1); }); }; const getDescriptorInformation = function (cb) { const fetchFullDescriptor = function (change, cb) { Descriptor.findByUri(change.ddr.changedDescriptor, function (err, descriptor) { if (isNull(err)) { change.ddr.changedDescriptor = descriptor; cb(null, change); } else { cb(1, null); } }); }; if (!isNull(archivedResource.changes)) { async.mapSeries( archivedResource.changes, fetchFullDescriptor, function (err, fullChanges) { if (isNull(err)) { archivedResource.changes = fullChanges; Descriptor.removeUnauthorizedFromObject(archivedResource, [Elements.access_types.private], [Elements.access_types.api_readable]); return cb(null); } return cb(1, "Unable to fetch descriptor information. Reported Error: " + fullChanges); }); } else { return cb(null); } }; async.series([ getAuthorInformation, setHumanReadableDate, getVersionedResourceDetail, getDescriptorInformation ], function (err, result) { return callback(err, archivedResource); }); }; ArchivedResource.prototype.getHumanReadableUri = function (callback) { const self = this; if (isNull(self.ddr.isVersionOf) || isNull(self.ddr.versionNumber)) { callback(1, "Unable to get human readable uri for " + self.uri + " because it is missing either the self.ddr.isVersionOf or the self.ddr.versionNumber property."); } else { callback(null, self.ddr.isVersionOf + "/version/" + self.ddr.versionNumber); } }; ArchivedResource = Class.extend(ArchivedResource, Resource, "ddr:ArchivedResource"); module.exports.ArchivedResource = ArchivedResource;
/** * * Tests for WorkTypeRequestModal * * Components */ import User from '@/models/__mocks__/User'; import UserEditModal from '@/pages/organization/UserEditModal'; import { createLocalVue, shallowMount } from '@vue/test-utils'; import Vuex from 'vuex'; const localVue = createLocalVue(); localVue.use(Vuex); jest.mock('@/models/User'); jest.mock('@/models/Role'); const mocks = { $t: (key) => key, $store: new Vuex.Store(), }; const mountWithOptions = (props) => shallowMount(UserEditModal, { stubs: { modal: true, 'base-input': true, 'form-select': true, 'base-button': true, }, propsData: { ...props, }, store: mocks.$store, localVue, mocks, }); describe('UserEditModal', () => { it('should not log any errors', () => { const spy = jest.spyOn(global.console, 'error'); mountWithOptions({}); expect(spy).not.toHaveBeenCalled(); }); it('should emit save correctly', () => { const wrapper = mountWithOptions({ user: User.find(1), }); wrapper.vm.saveUser(); expect(wrapper.emitted().save.length).toBe(1); }); });
/* * Copyright 2013 eBay Software Foundation * * 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. */ 'use strict'; module.exports = deepClone; function deepClone(el) { var node = el.cloneNode(); Array.prototype.slice.call(el.childNodes).forEach(function (child) { node.appendChild(deepClone(child)) }); return node }
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ import React, {Component} from 'react'; import {Row, Col, Button, Tabs} from 'antd'; import EditValue from './EditValue'; import type {LayoutRecordT} from './LayoutRecord'; import type {Yoga$Direction} from 'yoga-layout'; import InfoText from './InfoText'; import './Editor.css'; const TabPane = Tabs.TabPane; type Props = { node: ?LayoutRecordT, onChangeLayout: (key: string, value: any) => void, onChangeSetting: (key: string, value: any) => void, direction: Yoga$Direction, selectedNodeIsRoot: boolean, onRemove?: () => void, onAdd?: () => void, }; export default class Editor extends Component<Props> { componentDidMount() { document.addEventListener('keydown', this.onKeyDown); } componentWillUnmount() { document.removeEventListener('keydown', this.onKeyDown); } onKeyDown = (e: KeyboardEvent) => { if ( (e.key === 'Delete' || e.key === 'Backspace') && this.props.onRemove && !(e.target instanceof HTMLInputElement) ) { this.props.onRemove(); } }; render() { const {node, selectedNodeIsRoot} = this.props; const disabled = !Boolean(node); return ( <div className="Editor"> <Tabs defaultActiveKey="1" className="EditorTabs"> <TabPane tab="Flex" key="1"> <h2> Direction <InfoText doclink="/docs/layout-direction"> Defines the direction of which text and items are laid out </InfoText> </h2> <EditValue property="direction" value={this.props.direction} onChange={this.props.onChangeSetting} /> <h2> Flex Direction <InfoText doclink="/docs/flex-direction"> Defines the direction of the main-axis </InfoText> </h2> <EditValue disabled={disabled} property="flexDirection" value={node ? node.flexDirection : undefined} onChange={this.props.onChangeLayout} /> <Row gutter={15} style={{marginTop: 30}}> <Col span={8}> <h2> Basis <InfoText doclink="/docs/flex"> Default size of a node along the main axis </InfoText> </h2> <EditValue type="text" property="flexBasis" placeholder="auto" disabled={disabled || selectedNodeIsRoot} value={node ? node.flexBasis : undefined} onChange={this.props.onChangeLayout} /> </Col> <Col span={8}> <h2> Grow <InfoText doclink="/docs/flex"> The factor of remaining space should be given to this node </InfoText> </h2> <EditValue type="text" property="flexGrow" placeholder="0" disabled={disabled || selectedNodeIsRoot} value={node ? node.flexGrow : undefined} onChange={this.props.onChangeLayout} /> </Col> <Col span={8}> <h2> Shrink <InfoText doclink="/docs/flex"> The shrink factor of this element if parent has no space left </InfoText> </h2> <EditValue type="text" property="flexShrink" placeholder="1" disabled={disabled || selectedNodeIsRoot} value={node ? node.flexShrink : undefined} onChange={this.props.onChangeLayout} /> </Col> </Row> <h2> Flex Wrap <InfoText doclink="/docs/flex-wrap"> Wrapping behaviour when child nodes don't fit into a single line </InfoText> </h2> <EditValue disabled={disabled} property="flexWrap" value={node ? node.flexWrap : undefined} onChange={this.props.onChangeLayout} /> </TabPane> <TabPane tab="Alignment" key="2"> <h2> Justify Content <InfoText doclink="/docs/justify-content"> Aligns child nodes along the main-axis </InfoText> </h2> <EditValue disabled={disabled} property="justifyContent" value={node ? node.justifyContent : undefined} onChange={this.props.onChangeLayout} /> <h2> Align Items <InfoText doclink="/docs/align-items"> Aligns child nodes along the cross-axis </InfoText> </h2> <EditValue disabled={disabled} property="alignItems" value={node ? node.alignItems : undefined} onChange={this.props.onChangeLayout} /> <h2> Align Self <InfoText doclink="/docs/align-items"> Override align items of parent </InfoText> </h2> <EditValue disabled={disabled || selectedNodeIsRoot} property="alignSelf" value={node ? node.alignSelf : undefined} onChange={this.props.onChangeLayout} /> <h2> Align Content <InfoText doclink="/docs/align-content"> Alignment of lines along the cross-axis when wrapping </InfoText> </h2> <EditValue disabled={disabled} property="alignContent" value={node ? node.alignContent : undefined} onChange={this.props.onChangeLayout} /> </TabPane> <TabPane tab="Layout" key="3"> <h2> Width &times; Height <InfoText doclink="/docs/width-height"> Dimensions of the node </InfoText> </h2> <Row gutter={15}> <Col span={12}> <EditValue type="text" placeholder="auto" property="width" disabled={disabled} value={node ? node.width : undefined} onChange={this.props.onChangeLayout} /> </Col> <Col span={12}> <EditValue type="text" placeholder="auto" property="height" disabled={disabled} value={node ? node.height : undefined} onChange={this.props.onChangeLayout} /> </Col> </Row> <h2> Max-Width &times; Max-Height <InfoText doclink="/docs/min-max"> Maximum dimensions of the node </InfoText> </h2> <Row gutter={15}> <Col span={12}> <EditValue type="text" placeholder="none" property="maxWidth" disabled={disabled} value={node ? node.maxWidth : undefined} onChange={this.props.onChangeLayout} /> </Col> <Col span={12}> <EditValue type="text" placeholder="none" property="maxHeight" disabled={disabled} value={node ? node.maxHeight : undefined} onChange={this.props.onChangeLayout} /> </Col> </Row> <h2> Min-Width &times; Min-Height <InfoText doclink="/docs/min-max"> Minimum dimensions of the node </InfoText> </h2> <Row gutter={15}> <Col span={12}> <EditValue type="text" placeholder="0" property="minWidth" disabled={disabled} value={node ? node.minWidth : undefined} onChange={this.props.onChangeLayout} /> </Col> <Col span={12}> <EditValue type="text" placeholder="0" property="minHeight" disabled={disabled} value={node ? node.minHeight : undefined} onChange={this.props.onChangeLayout} /> </Col> </Row> <h2> Aspect Ratio <InfoText doclink="/docs/aspect-ratio"> Width/Height aspect ratio of node </InfoText> </h2> <EditValue type="text" placeholder="auto" property="aspectRatio" disabled={disabled} value={node ? node.aspectRatio : undefined} onChange={this.props.onChangeLayout} /> {['padding', 'border', 'margin'].map(property => ( <EditValue property={property} key={property} value={node ? node[property] : undefined} onChange={this.props.onChangeLayout} disabled={property === 'margin' && selectedNodeIsRoot} /> ))} <h2> Position Type <InfoText doclink="/docs/absolute-position"> Relative position offsets the node from it's calculated position. Absolute position removes the node from the flexbox flow and positions it at the given position. </InfoText> </h2> <EditValue disabled={disabled || selectedNodeIsRoot} property="positionType" value={node ? node.positionType : undefined} onChange={this.props.onChangeLayout} /> <EditValue disabled={selectedNodeIsRoot} property="position" value={node ? node.position : undefined} onChange={this.props.onChangeLayout} /> </TabPane> </Tabs> <Row gutter={15} className="EditorButtons"> <Col span={12}> <Button icon="plus-circle-o" disabled={!Boolean(this.props.onAdd)} onClick={this.props.onAdd} type="primary"> add child node </Button> </Col> <Col span={12}> <Button icon="close-circle-o" disabled={!Boolean(this.props.onRemove)} onClick={this.props.onRemove} type="danger"> remove node </Button> </Col> </Row> </div> ); } }
var data = { "body": "<path opacity=\".3\" d=\"M10.94 8.12L8.9 6.07L9.88 5h4.24l1.83 2H20v10.17l-3.12-3.12c.08-.34.12-.69.12-1.05c0-2.76-2.24-5-5-5c-.36 0-.71.04-1.06.12zM12 18c-2.76 0-5-2.24-5-5c0-.91.25-1.76.68-2.49L4.17 7H4v12h12.17l-1.68-1.68c-.73.43-1.58.68-2.49.68z\" fill=\"currentColor\"/><path d=\"M8.9 6.07L7.48 4.66L9 3h6l1.83 2H20c1.1 0 2 .9 2 2v12c0 .05-.01.1-.02.16L20 17.17V7h-4.05l-1.83-2H9.88L8.9 6.07zm11.59 17.24L18.17 21H4c-1.1 0-2-.9-2-2V7c0-.59.27-1.12.68-1.49l-2-2L2.1 2.1L7 7l2.01 2.01l1.43 1.43l4.1 4.1l1.43 1.43L19 19l1.82 1.82l1.08 1.08l-1.41 1.41zM9.19 12.02c-.11.31-.19.63-.19.98c0 1.65 1.35 3 3 3c.35 0 .67-.08.98-.19l-3.79-3.79zM16.17 19l-1.68-1.68c-.73.43-1.58.68-2.49.68c-2.76 0-5-2.24-5-5c0-.91.25-1.76.68-2.49L4.17 7H4v12h12.17zm-1.36-7.02l2.08 2.08c.07-.35.11-.7.11-1.06c0-2.76-2.24-5-5-5c-.36 0-.71.04-1.06.12l2.08 2.08a3 3 0 0 1 1.79 1.78z\" fill=\"currentColor\"/>", "width": 24, "height": 24 }; exports.__esModule = true; exports.default = data;
import db from "../../../db/models" import { SprintService } from "../services/sprint.service" const Sprint = new SprintService() export const createSprint = async (req, res) => { try { const { sprintName, projectId, dateStart, dateFinish } = req.body const creator = req.userId const sprint = await Sprint.createSprint(sprintName, projectId, creator, dateStart, dateFinish) res.status(200).json(sprint) } catch (e) { console.log(e) res.status(500).json({ message: "SMTHNG_WENT_WRONG" }) } } export const showSprintAll = async (req, res) => { try { const { projectId } = req.body const sprints = await Sprint.showSprintAll(projectId) res.status(200).json(sprints) } catch (e) { console.log(e) res.status(500).json({ message: "SMTHNG_WENT_WRONG" }) } } export const deleteSprint = async (req, res) => { try { const { sprintId } = req.body const sprint = await Sprint.deleteSprint(sprintId) res.status(200).json({}) } catch (e) { console.log(e) res.status(500).json({ message: "SMTHNG_WENT_WRONG" }) } } export const updateSprint = async (req, res) => { try { const { sprintId, changedField } = req.body const sprint = await Sprint.updateSprint(sprintId, changedField) res.status(200).json(sprint) } catch (e) { console.log(e) res.status(500).json({ message: "SMTHNG_WENT_WRONG" }) } }
module.exports = [ "apes", "baboons", "bats", "bears", "birds", "bobcats", "bulldogs", "cats", "chickens", "cobras", "cows", "crabs", "deer", "dingos", "dodos", "dogs", "dolphins", "donkeys", "dragons", "ducks", "eagles", "eels", "elephants", "falcons", "flies", "foxes", "frogs", "geckos", "goats", "geese", "grasshoppers", "horses", "hounds", "impalas", "insects", "kangaroos", "ladybugs", "lions", "lizards", "moles", "monkeys", "moose", "mice", "mules", "otters", "owls", "pandas", "panthers", "parrots", "pigs", "pumas", "rabbits", "rats", "robins", "seahorses", "sheep", "shrimps", "skunks", "sloths", "snails", "snakes", "squids", "starfishes", "stingrays", "swans", "termites", "tigers", "treefrogs", "turkeys", "turtles", "warthogs", "wasps", "wombats", "yaks", "zebras", "ships", "cars", "boats", "balls", "pants", "chairs", "beers" ];
// All code points in the Runic block as per Unicode v8.0.0: [ 0x16A0, 0x16A1, 0x16A2, 0x16A3, 0x16A4, 0x16A5, 0x16A6, 0x16A7, 0x16A8, 0x16A9, 0x16AA, 0x16AB, 0x16AC, 0x16AD, 0x16AE, 0x16AF, 0x16B0, 0x16B1, 0x16B2, 0x16B3, 0x16B4, 0x16B5, 0x16B6, 0x16B7, 0x16B8, 0x16B9, 0x16BA, 0x16BB, 0x16BC, 0x16BD, 0x16BE, 0x16BF, 0x16C0, 0x16C1, 0x16C2, 0x16C3, 0x16C4, 0x16C5, 0x16C6, 0x16C7, 0x16C8, 0x16C9, 0x16CA, 0x16CB, 0x16CC, 0x16CD, 0x16CE, 0x16CF, 0x16D0, 0x16D1, 0x16D2, 0x16D3, 0x16D4, 0x16D5, 0x16D6, 0x16D7, 0x16D8, 0x16D9, 0x16DA, 0x16DB, 0x16DC, 0x16DD, 0x16DE, 0x16DF, 0x16E0, 0x16E1, 0x16E2, 0x16E3, 0x16E4, 0x16E5, 0x16E6, 0x16E7, 0x16E8, 0x16E9, 0x16EA, 0x16EB, 0x16EC, 0x16ED, 0x16EE, 0x16EF, 0x16F0, 0x16F1, 0x16F2, 0x16F3, 0x16F4, 0x16F5, 0x16F6, 0x16F7, 0x16F8, 0x16F9, 0x16FA, 0x16FB, 0x16FC, 0x16FD, 0x16FE, 0x16FF ];
console.log("background script working"); var t = null; // var l = null; let a = {}; xp = location.href; if (xp.includes("meet.google.com")) { setTimeout(joinmeeting, 1000); } function joinmeeting() { if (document.readyState == "complete") { try { // Mic Button window.document.querySelectorAll(".U26fgb")[0].click(); // Webcam Button window.document.querySelectorAll(".U26fgb")[1].click(); window.document.querySelector(".NPEfkd").click(); } catch (err) { console.log("EROOR"); } } } function rtntime() { var myDate = new Date(); var hours = myDate.getHours(); var minutes = myDate.getMinutes(); if (hours < 10) { hours = "0" + hours }; if (minutes < 10) { minutes = "0" + minutes; } var timetrigger = (hours + ":" + minutes); return timetrigger; } chrome.runtime.onMessage.addListener( function (request, sender, sendResponse) { if (request.message === "tickbtnclicked") { a = request.object; console.log(a); if (t != null) { clearTimeout(t); t = null; } // if (l != null) { // clearTimeout(l); // l = null; // } checker(); // if(a.checkbox=="true"){ // leavetime=a.time // leaver(); // } } if (request.message === "stopbtnclicked") { console.log("Stop btn clicked"); } } ); function checker() { location.replace(a.link); joinmeeting(); setTimeout(checker, (60 - new Date().getSeconds()) * 1000); console.log("check"); } // function leaver() { // try { // if (document.querySelector(".gV3Svc>span").nextElementSibling.innerText < 10) { // console.log("i did it"); // //leave btn // try { // window.document.querySelector(".FbBiwc").click(); // } catch { // console.log("ERROR"); // } // } // } catch { // console.log("Error"); // } // }
import SectionLineModel from "../model/sectionLineModel.js"; import SectionLineView from "../view/sectionLineView.js"; import { DOMS } from "../util/constant.js"; export default class SectionLineController { constructor() { this.model = new SectionLineModel(); this.view = new SectionLineView(); } init = () => { this.setButtonClickEvent(); const sectionButtons = document.querySelectorAll( ".section-line-menu-button" ); this.view.renderSectionLineEdit(sectionButtons[0]); }; setButtonClickEvent = () => { DOMS.$app.addEventListener("click", this.setSelectedMenuEvent); DOMS.$app.addEventListener("click", this.setSubmitSectionEvent); DOMS.$app.addEventListener("click", this.setDeleteSectionEvent); }; setSelectedMenuEvent = (event) => { if (!event.target.classList.contains("section-line-menu-button")) { return; } const lineName = event.target.dataset.lineName; this.view.renderSectionLineEdit(this.model.stationNames); }; renderSelectedSection = (lineName) => { const $buttons = document.querySelectorAll(".section-line-menu-button"); const currentBtn = Array.from($buttons).filter( (button) => button.dataset.lineName === lineName )[0]; this.renderSectionLineEdit(currentBtn); }; getStations = () => { return this.model.lines.find((line) => Object.keys(line)[0] === lineName)[ lineName ]; }; setSubmitSectionEvent = ({ target }) => { if (target.id === "section-add-button") { const $sectionOrderInput = document.querySelector("#section-order-input"); const $sectionStationSelector = document.querySelector( "#section-station-selector" ); const lineName = target.dataset.lineName; const stationName = $sectionStationSelector.options[$sectionStationSelector.selectedIndex] .value; const order = $sectionOrderInput.value; if (this.cantAddStation(lineName, stationName)) { alert("역이름이 중복되었습니다"); return; } this.addStation(stationName, order, lineName); this.renderSelectedSection(lineName); } }; setDeleteSectionEvent = ({ target }) => { const lineName = target.dataset.lineName; if (!target.classList.contains("section-delete-button")) { return; } if (!confirm("정말로 삭제하시겠습니까")) { return; } if (!this.canDeleteStation(lineName)) { alert("2개 이하의 역개수는 지울수 없습니다"); return; } const deleteIdx = target.dataset.idx; this.deleteStation(deleteIdx, lineName); this.renderSelectedSection(lineName); }; canDeleteStation = (lineName) => { const stations = this.getStations(lineName); return stations.length > 2; }; cantAddStation = (lineName, newStation) => { const stations = this.getStations(lineName); return stations.some((station) => station === newStation); }; }
/* * * * * * * * * * * * * * * * * * * * * * * * *\ * * FileName : index.js * Author : Association of Southeast Asian Nations Build The Earth * CreateTime : 15-5-2021 * Organization : https://github.com/ASEAN-Build-The-Earth * Description : Merlion discord bot core file * FileType : JS File * \* * * * * * * * * * * * * * * * * * * * * * * * */ const fs = require('fs'); const { Client, Intents, Collection } = require('discord.js'); const { prefix } = require('./data/config.json'); const { token } = require("./data/auth.json") const client = new Client({ intents: [ Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_BANS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_WEBHOOKS, Intents.FLAGS.GUILD_VOICE_STATES ] //, //partials: ["CHANNEL"] }); client.commands = new Collection(); const commandFolders = fs.readdirSync('./commands'); for (const folder of commandFolders) { const commandFiles = fs.readdirSync(`./commands/${folder}`).filter(file => file.endsWith('.js')); for (const file of commandFiles) { const command = require(`./commands/${folder}/${file}`); client.commands.set(command.name, command); } // ===== TEMPOLARY SPECIAL FILE SEARCHING ===== // - it search for commands in ./commands/Fun/Images since the code above dont support 2nd folder step. const funImageDirectory = "./commands/Fun/Images"; try { if (fs.existsSync(funImageDirectory)) { console.log("Image directory exists") const funImagesFile = fs.readdirSync(funImageDirectory).filter(file => file.endsWith('.js')); for (const file of funImagesFile) { const specialCommand = require(`${funImageDirectory}/${file}`); client.commands.set(specialCommand.name, specialCommand); } } } catch(error) { console.log("Cannot find Images directory:\n" + error); } } client.once('ready', () => { console.log('Ready!'); client.user.setActivity(`YOU`, { type: "WATCHING", }); }); client.on('messageCreate', message => { // === All the autoresponders === if (message.content === "<@850730172630302720>" || message.content === "<@!850730172630302720>") { message.reply(`Hi ${message.author}, My Prefix is \`${prefix}\`!`) } if (message.content.toLowerCase() === 'hi') { return message.reply('Hi :)'); } if (message.content.toLowerCase() === 'xbox') { return message.reply('Is Sus'); } if (message.content.toLowerCase() === 'phats') { return message.reply('https://media.discordapp.net/attachments/832603438285062164/869838594859237418/render_2021-07-21_15.32.09.gif'); } if (message.content.toLowerCase() === 'how to join') { return message.reply('Please read <#789012857798000690>'); } if (message.content.toLowerCase() === 'how do i join') { return message.reply('Please read <#789012857798000690>'); } if (!message.content.startsWith(prefix)) return; // === Message and command handler ==== const args = message.content.slice(prefix.length).trim().split(/ +/g); const commandName = args.shift().toLowerCase(); const command = client.commands.get(commandName) || client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName)); if (!command) return; try { return command.execute(message, args, client); } catch (error) { console.error(error); const ErrorEmbed = new Discord.MessageEmbed() .setColor("#ffb7c5") .setAuthor(`${message.author.tag}`, `${message.author.displayAvatarURL({ dynamic: true })}`) .addFields({ name: "ERR!", value: "Oops! I can't execute this command!" }, ); return message.reply({ embeds: [ErrorEmbed] }); } }); client.login(token)
"use strict"; // Module dependencies const prismic = require("prismic-javascript"); const prismicDom = require("prismic-dom"); const app = require("./config"); const prismicConfig = require("./prismic-configuration"); const port = app.get("port"); const asyncHandler = require("./utils/async-handler"); const defaultLang = "en-us"; const isoLangs = require("./utils/iso-langs"); // Listen to application port. app.listen(port, () => { process.stdout.write(`Point your browser to: http://localhost:${port}\n`); }); // Root path redirects to default language app.get("/", (req, res) => { res.redirect(defaultLang); }); // Middleware to fetch Prismic api object app.get( "*", asyncHandler(async (req, res, next) => { const api = await prismic.api(prismicConfig.apiEndpoint, { req, accessToken: prismicConfig.accessToken, }); if (api) { req.prismic = { api }; } else { res.status(404).render("error-handlers/404"); } next(); }) ); // Prismic preview route app.get( "/preview", asyncHandler(async (req, res) => { const token = req.query.token; if (token) { const url = await req.prismic.api.previewSession( token, prismicConfig.linkResolver, "/" ); res.redirect(302, url); } else { throw new Error("Missing token from preview querystring"); } }) ); // Middleware to set local variables & fetch menu content from Prismic app.get( ["/:lang", "/:lang/*"], asyncHandler(async (req, res, next) => { const lang = req.params.lang; // Set locals variables in res to be used in view templates res.locals.ctx = { apiEndpoint: prismicConfig.apiEndpoint, linkResolver: prismicConfig.linkResolver, }; res.locals.prismicDom = prismicDom; // Fetch menu content from Prismic and add it to local variables let menuContent = await req.prismic.api.getSingle("navigation", { lang }); if (!menuContent) { menuContent = await req.prismic.api.getSingle("navigation", { lang: defaultLang, }); } let global = await req.prismic.api.getSingle("global", { lang }); if (!global) { global = await req.prismic.api.getSingle("global", { lang: defaultLang, }); } res.locals.menuContent = menuContent; res.locals.global = global; res.locals.currentUrl = req.originalUrl; res.locals.isoLangs = isoLangs; next(); }) ); // Homepage route app.get( "/:lang/", asyncHandler(async (req, res) => { const lang = req.params.lang; const document = await req.prismic.api.getByUID("page", "home", { lang }); if (document) { res.render("page", { document }); } else { res.status(404).render("error-handlers/error"); } }) ); // Page router app.get( "/:lang/:uid", asyncHandler(async (req, res) => { const lang = req.params.lang; const uid = req.params.uid; const document = await req.prismic.api.getByUID("page", uid, { lang: lang, fetchLinks: [ "download_group.title", "download_group.preview_images", "download_group.download_link_text", "download_group.download_files", ], }); if (document) { res.render("page", { document }); // console.log(document); } else { res.status(404).render("error-handlers/notfound"); } }) ); // 404 route for anything else app.get("*", (req, res) => { res.status(404).render("error-handlers/notfound"); }); module.exports = app;
import React from "react"; import PropTypes from "prop-types"; import { View, StyleSheet, TouchableWithoutFeedback } from "react-native"; import FastImage from "react-native-fast-image"; // import { getImageUrl } from "../api/url"; import { INPUT } from "../helper/Color"; const MoviePoster = ({ item, navigation, height, width }) => { return ( <TouchableWithoutFeedback onPress={() => { item.imageURL ? navigation.navigate("MovieDetail", { id: item.id }) : null; }} > <View style={styles.imageContainer}> <FastImage style={{ height, width }} resizeMode="cover" source={{ uri: item.imageURL ? item.imageURL : "" }} /> </View> </TouchableWithoutFeedback> ); }; export default MoviePoster; MoviePoster.propTypes = { item: PropTypes.any, height: PropTypes.number, width: PropTypes.number, navigation: PropTypes.any, }; MoviePoster.defaultProps = { height: 180, width: 120, }; const styles = StyleSheet.create({ imageContainer: { margin: 4, backgroundColor: INPUT, borderRadius: 12, overflow: "hidden", }, });
window.chartsByTitle = {}; const nameToColor = { x: '#a61919', y: '#199a2c', z: '#285ee5', phi: '#41a87d', theta: '#891cc7', alpha: '#bd771c', beta: '#979f19', gamma: '#8d197c' } const MAX_DATA_SET_LENGTH = 2000; window.createNewChart = (key, type, rawData, timestamp) => { const title = `${key}_${type}`; const canvas = document.createElement('canvas'); canvas.setAttribute('id', title); canvas.setAttribute('width', 1100); canvas.setAttribute('height', 300); document.getElementById('charts').appendChild(canvas); const ctx = canvas.getContext('2d'); const datasets = Object.entries(rawData).map(([label, rawValue], i) => ({ label, data: [{x:timestamp, y:rawValue[type]}], borderColor: nameToColor[label], backgroundColor: nameToColor[label] })) const config = { type: 'line', data: { datasets }, options: { parsing: false, normalized: true, responsive: false, animation: false, plugins: { legend: { position: 'top', }, title: { display: true, text: title } }, scales: { x: { type: 'timeseries', ticks: { autoSkip: true, maxTicksLimit: 8, }, time: { unit: 'second', displayFormats: { second: 'mm:ss' }, } } }, datasets: { line: { pointRadius: 0, // disable for all `'line'` datasets borderWidth: 1, } }, elements: { point: { radius: 0 // default to disabled in all datasets } } }, }; const chart = new Chart(ctx, config); chartsByTitle[title] = chart; } window.updateChart = (key, type, rawData, timestamp) => { const title = `${key}_${type}`; const chart = window.chartsByTitle[title]; const data = chart.data; data.datasets.forEach((dataset) => { const value = rawData[dataset.label][type]; dataset.data.push({ x: timestamp, y: value }) }) // chart.update(); } window.renderAllCharts = () => { Object.values(window.chartsByTitle) .forEach((c) => { c.data.datasets.forEach((dataset) => { if (dataset.data.length > MAX_DATA_SET_LENGTH) { dataset.data.splice(0, dataset.data.length - MAX_DATA_SET_LENGTH); } }) c.update() }); setTimeout(window.renderAllCharts, 1000); } const valueTypes = [ //'der2', 'der1', 'raw', 'int1', 'int2']; const _createOrUpdateChartsForInputRec = (rawInput, timestamp, baseKey='') => { if (typeof rawInput === 'number') return 0; if (typeof rawInput !== 'object' || !rawInput) { console.log('CRITICAL rawInput not obj/num', typeof rawInput, rawInput, baseKey); } let depth; Object.entries(rawInput).forEach(([kEnd, rawData]) => { const key = `${baseKey ? `${baseKey}_`:''}${kEnd}`; depth = 1 + _createOrUpdateChartsForInputRec(rawData, timestamp, key); }); if (depth !== 2) { return depth; } valueTypes.forEach((type) => { const title = `${baseKey ? `${baseKey}_`:''}${type}`; if (window.chartsByTitle[title]) { window.updateChart(baseKey, type, rawInput, timestamp) } else { window.createNewChart(baseKey, type, rawInput, timestamp) } }) } window.handleNewData = (data, timestamp = Date.now()) => { _createOrUpdateChartsForInputRec(data, timestamp); } const _initSocketIO = () => { const socket = io("http://192.168.0.21:8080"); localStorage.debug = 'socket.io-client:socket'; socket.on('data', window.handleNewData); window.renderAllCharts(); } _initSocketIO();
import React, {useState} from 'react'; import { StatusBar, StyleSheet, View, } from 'react-native'; import * as firebase from 'firebase'; import firebaseConfig from './FirebaseConfig'; import {AppLoading, SplashScreen} from 'expo'; import AppNavigator from "./Screens/AppNavigator"; import {Provider} from "react-redux"; import {createStore} from "redux"; import allReducers from "./Redux/Reducers/Index"; import * as Font from 'expo-font'; // Initialize Firebase firebase.initializeApp(firebaseConfig); export default function App() { const [appReady, setAppReady] = useState(false); SplashScreen.preventAutoHide(); const store = createStore( allReducers, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() ); Font.loadAsync({ 'raleway': require('./assets/Fonts/Raleway/Raleway-Regular.ttf'), 'raleway-bold': require('./assets/Fonts/Raleway/Raleway-Bold.ttf'), 'balooda-regular': require('./assets/Fonts/BalooDa2/BalooDa2-Regular.ttf'), 'balooda-bold': require('./assets/Fonts/BalooDa2/BalooDa2-Regular.ttf'), 'titan-one': require('./assets/Fonts/TitanOne/TitanOneRegular.ttf') }).then(() => { SplashScreen.hide(); setAppReady(true); }); if(appReady) { return ( <Provider store={store}> <View style={styles.container}> <StatusBar barStyle="light-content"/> <AppNavigator /> </View> </Provider> ); } else { return ( <AppLoading /> ); } }; const styles = StyleSheet.create({ container: { flex: 1 } });
var apiKey = "pk.eyJ1IjoiZXZhbnMyNDUzIiwiYSI6ImNrOXpxeWplMTBldTQzZnJ5NGhsNjJ5NHgifQ.v6AFZ_73NGDIkP5Wx_4kMQ"; var heatmap = L.tileLayer("https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}", { attribution: "Map data &copy; <a href='https://www.openstreetmap.org/'>OpenStreetMap</a> contributors, <a href='https://creativecommons.org/licenses/by-sa/2.0/'>CC-BY-SA</a>, Imagery © <a href='https://www.mapbox.com/'>Mapbox</a>", maxZoom: 18, id: "mapbox.streets", accessToken: apiKey }); // Create the map object with options. var map = L.map("myMap", { center: [ 40.7, -94.5 ], zoom: 3 }); // add tile layer to the map. heatmap.addTo(map); // get geoJSON data. d3.json("http://127.0.0.1:5000/api/v1.0/over45percent", function(data) { console.log("mydata") console.log(data) //style and retrieve obesity percentage function styleInfo(feature) { return { opacity: 1, fillOpacity: 1, fillColor: getColor((feature.properties.obesitypercentage)), color: "#000000", radius: getRadius(feature.properties.obesitypercentage), stroke: true, weight: 0.5 }; } // define color based on obesity percentage. function getColor(obeselevel) { switch (true) { case obeselevel > 55: return "#ea2c2c"; case obeselevel > 50: return "#ea822c"; case obeselevel > 45: return "#ee9c00"; case obeselevel > 40: return "#eecc00"; case obeselevel > 35: return "#98ee00"; default: return "#008000"; } } //calculate the radius function getRadius(obeselevel) { if (obeselevel === 40) { return 1; } return obeselevel/5; } L.geoJson(data, { pointToLayer: function(feature, city) { return L.circleMarker(city); }, style: styleInfo, onEachFeature: function(feature, layer) { layer.bindPopup("State: " + feature.properties.statename + "<br>City: " + feature.properties.cityname +"<br>Percentage Obese: " + feature.properties.obesitypercentage + "<br>City Population in 2010: " + feature.properties.Population2010+ "<br>Year of Study: " + feature.properties.year); } }).addTo(map); //https://github.com/k4r573n/leaflet-control-osm-geocoder var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; var osmAttrib='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' var osm = new L.TileLayer(osmUrl, {attribution: osmAttrib}); var osmGeocoder = new L.Control.OSMGeocoder({placeholder: 'Search location...'}); map.addControl(osmGeocoder); // Legend var legend = L.control({ position: "bottomright" }); legend.onAdd = function() { var div = L.DomUtil.create("div", "info legend"); var grades = [30,35,40,45, 50,55]; var colors = [ "#008000", "#98ee00", "#eecc00", "#ee9c00", "#ea822c", "#ea2c2c" ]; for (var i = 0; i < grades.length; i++) { div.innerHTML += "<i style='background: " + colors[i] + "'></i> " + grades[i] + (grades[i + 1] ? //"&ndash;" + grades[i + 1] + "<br>" : "+" ); } return div; }; legend.addTo(map); });
module.exports={A:{A:{"2":"J C G E B A TB"},B:{"2":"D X g H L"},C:{"2":"0 1 2 4 RB F I J C G E B A D X g H L M N O P Q R S T U V W u Y Z a b c d e f K h i j k l m n o p q r w x v z t s PB OB"},D:{"2":"0 2 4 8 F I J C G E B A D X g H L M N O P Q R S T U V W u Y Z a b c d e f K h i j k l m n o p q r w x v z t s DB AB SB BB"},E:{"2":"7 F I J C G E B A CB EB FB GB HB IB JB"},F:{"2":"5 6 E A D H L M N O P Q R S T U V W u Y Z a b c d e f K h i j k l m n o p q r KB LB MB NB QB y"},G:{"2":"3 7 9 G A UB VB WB XB YB ZB aB bB"},H:{"2":"cB"},I:{"2":"1 3 F s dB eB fB gB hB iB"},J:{"2":"C B"},K:{"2":"5 6 B A D K y"},L:{"2":"8"},M:{"2":"t"},N:{"2":"B A"},O:{"2":"jB"},P:{"2":"F I"},Q:{"2":"kB"},R:{"2":"lB"}},B:4,C:"CSS3 attr() function"};
import React, { Component } from 'react'; import { StyleSheet, Text, View, ToastAndroid, TextInput, Button, Alert, ScrollView, Image, ImageBackground, AsyncStorage } from 'react-native'; import { NavigationContainer } from "@react-navigation/native"; import { createStackNavigator } from "@react-navigation/stack"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs" import { Ionicons } from '@expo/vector-icons'; import NetworkService from '../networks/NetworkService' import { ListItem } from 'react-native-elements' import { Icon } from 'react-native-elements' class PlaylistItem { constructor(name, uri, image) { this.name = name; this.uri = uri; this.image = image; } } const BASE_URL = "http://pruebaslistenit.herokuapp.com/"; const PLAYLIST = []; export default class viewAlbum extends Component{ constructor(props) { super(props); } state={ album_info: "", loadedSongs: false, songs: [] } componentDidMount(){ //HAcer consulta de songs data={} data.user=this.props.route.params.artist data.idalbum = this.props.route.params.paramId data.idalbum = data.idalbum.toString() NetworkService.listSongsAlbum(data).then(res => {this.setState({songs: res, loadedSongs:true});console.log("Songs RES:", res)})//this.props.route.params.artist, this.props.route.params.paramId //Me devuelve una lista de canciones } //Devuelve el id de album a mostrar que se ha guardado en................................ retrieveAlbum = async (albumID) => { try { const retrieveItem = await AsyncStorage.getItem(albumID); if (retrieveItem !== null) { // We have data!! console.log("DashBoardValue: ", retrieveItem); const item = JSON.parse(retrieveItem) console.log("Item: ", item); return item; } } catch (error) { // Error retrieving data console.log("Error al obtener datos") } }; render(){ //OPcion 1 console.log("---------------------------viewAlbum------------------------------------------") // console.log("this.state.loaded = ",this.state.loaded) if (this.state.loadedSongs){ console.log("this.state = ",this.state) console.log("user = ",this.state.user) console.log("RENDERLOADED") //this.getAlbumsDB().then( res => {this.setState({albums: res}); console.log("GETALBUMS RES:", res);console.log("GETALBUMS ALBUMS:", this.state.albums)}).catch(err => console.log("Error",err)); return this.renderLoaded() }else{ console.log("ELSEthis.state.loadedSongs = ",this.state.loadedSongs) return(<View><Text>Loading...</Text></View>) } } mostrarOpciones(){ return( <ListItem key="hola" leftIcon={<Icon name='volume-up' type='font-awesome' color='#000'/>} rightIcon={ <Icon name='ellipsis-h' type='font-awesome' color='#000' /> } bottomDivider /> ) } reproducirCancion(ruta,idCancion,idAlbum,correo){ console.log("THIS.RUTAAAAAAAAAA", ruta) //obtener URL de canciones { this.state.songs.map((item, i) => ( console.log("item: ", item), //NetworkService.pedirURL(idCancion.toString(),idAlbum.toString(),correo).then( url = BASE_URL + "Cancion?idsong=" + idCancion + idAlbum + correo + ".mp3", console.log("URL reproducir: ",url), //nomrbe, url, foto PLAYLIST[this.i] = new PlaylistItem( item.nombre, BASE_URL + url, this.props.route.params.image.uri, ), console.log("Playlist en viewALBUM-------------------------", PLAYLIST), ruta.props.navigation.navigate("MusicPlayer", PLAYLIST), } } renderLoaded(){ console.log("Params",this.props.route.params) return( <ImageBackground source={require('../Wallpapers/fondo.jpg')} style={styles.container}> <View style={styles.container}> <Text style={styles.title}> Album name: {this.props.route.params.name} </Text> <Text style={styles.title}> Album id: {this.props.route.params.paramId} </Text> <Text style={styles.title}> Artist: {this.props.route.params.artist} </Text> <Text style={styles.title}> image uri: {this.props.route.params.image.uri} </Text> <View> { this.state.songs.map((item, i) => ( <ListItem key={item} leftIcon={<Icon name='volume-up' type='font-awesome' color='#000'/>} rightIcon={ <Icon name='ellipsis-h' type='font-awesome' color='#000' onPress={() => this.mostrarOpciones()} /> } title={item.nombre} //Song subtitle={item.idCancion.l_id.u} //Artist onPress={ () => {this.reproducirCancion(this.props.route.params, item.idCancion.c_id, item.idCancion.l_id.l_id, item.idCancion.l_id.u)}}//this.reproducirCancion(this.props.route.params) bottomDivider /> )) } </View> </View> </ImageBackground> ); } } const styles = StyleSheet.create({ info: { flex: 1, flexDirection : 'row' }, backgroundImage:{ justifyContent: 'center', flex: 1, resizeMode: "contain" }, container: { paddingTop:50, flex:1, }, screen: { marginTop: 0, resizeMode: "cover", }, text: { color : 'white' }, title:{ color:'white',//'#64EE85', fontSize: 24, fontWeight: '600', paddingHorizontal: 20 }, header:{ height: 250, }, headerContent:{ height: 150, width: 150, padding:30, alignItems: 'center', }, });
function Mostrar() { var i var numero var contador = 0 numero = parseInt(prompt("Ingrese un numero positivo")); while (numero <= 0|| isNaN(numero)){ numero = parseInt(prompt("Ingrese un numero positivo")); } for(var i=1; i<= numero; i++){ if(numero%i==0){ contador++; console.log(i); } } if(contador<=2){ alert("Es numero primo") } else{ alert("No es numero primo") } }//FIN DE LA FUNCIÓN
const Student = require("../Models/student"); const { createStudentSchema, createEnquirySchema, createEnrollmentSchema, updateStudentSchema, } = require("../validators/studentValidator"); // @route POST api/admin/students // @desc Create a student // @access Private exports.createStudent = async (req, res) => { try { const { error: validationError } = createStudentSchema.validate(req.body); if (validationError) { return res.status(400).json({ err: validationError.details[0].message }); } const { email, phoneNumber, enquiryStatus, enrollmentStatus } = req.body; if (await Student.findOne({ phoneNumber })) { return res.status(400).json({ err: "Student already exists" }); } if (email) { if (await Student.findOne({ email })) { return res.status(400).json({ err: "Student already exists" }); } } let options = { ...req.body }; if (enquiryStatus) { options = { ...options, isEnquiryActive: true, enquiryDate: new Date(), }; } if (enrollmentStatus) { options = { ...options, isEnrollmentActive: true, enrollmentDate: new Date(), }; } const student = new Student(options); await student.save(); return res.status(200).json(student); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route POST api/admin/students // @desc Create a student enquiry // @access Private exports.createEnquiry = async (req, res) => { try { const { error: validationError } = createEnquirySchema.validate(req.body); if (validationError) { console.log("inside validation error"); return res.status(400).json({ err: validationError.details[0].message }); } const { email, phoneNumber } = req.body; if (await Student.findOne({ phoneNumber })) { return res.status(400).json({ err: "Student already exists" }); } if (email) { if (await Student.findOne({ email })) { return res.status(400).json({ err: "Student already exists" }); } } const student = new Student({ ...req.body, enquiryStatus: true, isEnquiryActive: true, enquiryDate: new Date(), }); await student.save(); return res.status(200).json(student); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route POST api/admin/students // @desc Create enrollment for a student // @access Private exports.createEnrollment = async (req, res) => { try { const { error: validationError } = createEnrollmentSchema.validate( req.body ); if (validationError) { return res.status(400).json({ err: validationError.details[0].message }); } const { email, phoneNumber } = req.body; if (await Student.findOne({ phoneNumber })) { res.status(400).json({ err: "Student already exists" }); } if (email) { if (await Student.findOne({ email })) { res.status(400).json({ err: "Student already exists" }); } } const student = new Student({ ...req.body, enrollmentStatus: true, isEnrollmentActive: true, enrollmentDate: new Date(), }); await student.save(); return res.status(200).json(student); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc Find a student by phone number // @access Private exports.findStudent = async (req, res) => { try { const student = await Student.findOne({ phoneNumber: req.params.phoneNumber, }); if (!student) { return res.status(404).json({ err: "Student not found" }); } return res.status(200).json(student); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route PUT api/admin/students // @desc update the details of a student // @access Private exports.updateStudent = async (req, res) => { try { const { error: validationError } = updateStudentSchema.validate(req.body); if (validationError) { return res.status(400).json({ err: validationError.details[0].message }); } const { name, email, phoneNumber, enquiryStatus, isEnquiryActive, enquiryDate, enrollmentStatus, isEnrollmentActive, enrollmentDate, year, course, college, offeredFees, actualFees, } = req.body; const student = await Student.findOne({ _id: req.params.id }); if (!student) { return res.status(404).json({ err: "Student not found" }); } if (name) student.name = name; if (email) student.email = email; if (phoneNumber) student.phoneNumber = phoneNumber; if (req.body.hasOwnProperty("enquiryStatus")) { student.enquiryStatus = enquiryStatus; if (enquiryStatus === true) { console.log("Inside condition"); student.isEnquiryActive = true; student.enquiryDate = new Date(); } else { student.isEnquiryActive = false; } } if (req.body.hasOwnProperty("enrollmentStatus")) { student.enrollmentStatus = enrollmentStatus; if (enrollmentStatus === true) { student.isEnrollmentActive = true; student.enrollmentDate = new Date(); } else { student.isEnrollmentActive = false; } } if (isEnquiryActive) student.isEnquiryActive = isEnquiryActive; if (isEnrollmentActive) student.isEnrollmentActive = isEnrollmentActive; if (enquiryDate) student.enquiryDate = enquiryDate; if (enrollmentDate) student.enrollmentDate = enrollmentDate; if (year) student.year = year; if (course) student.course = course; if (college) student.college = college; if (offeredFees) student.offeredFees = offeredFees; if (actualFees) student.actualFees = actualFees; await student.save(); return res.json(student); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route DELETE api/admin/students // @desc delete a student entry // @access Private exports.deleteStudent = async (req, res) => { try { await Student.findOneAndDelete( { phoneNumber: req.params.phoneNumber }, (err, deletedStudent) => { if (!err || null !== deletedStudent) { return res.status(200).json(deletedStudent); } else { return res.status(400).json({ err: "Something went wrong" }); } } ); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get list of all the students // @access Private exports.listStudents = async (req, res) => { try { const listOfStudents = await Student.find((err) => { if (err) { console.log(err); return res.status(400).json({ err: "Something went wrong" }); } }).sort({ enquiryDate: -1, enrollmentDate: -1 }); return res.status(200).json(listOfStudents); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get list of all the students enquiries // @access Private exports.listEnquiries = async (req, res) => { try { const enquiryFilter = { enquiryStatus: true }; const listOfEnquiries = await Student.find(enquiryFilter, (err) => { if (err) { return res.status(400).json({ err: "Something went wrong", }); } }).sort({ enquiryDate: -1 }); return res.status(200).json(listOfEnquiries); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } x; }; // @route GET api/admin/students // @desc get list of all the enrolled students // @access Private exports.listEnrollments = async (req, res) => { try { const enrollmentFilter = { enrollmentStatus: true }; const listOfEnrollments = await Student.find(enrollmentFilter, (err) => { if (err) { return res.status(400).json({ err: "Something went wrong", }); } }).sort({ enrollmentDate: -1 }); return res.status(200).json(listOfEnrollments); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enquires of last 30 days // @access Private exports.listEnquiriesInThirtyDays = async (req, res) => { try { const currentDate = new Date(); let thirtyDaysBefore = new Date(); thirtyDaysBefore = thirtyDaysBefore.setDate( thirtyDaysBefore.getDate() - 30 ); fetchQuery = { enquiryDate: { $gte: thirtyDaysBefore, $lte: currentDate }, enquiryStatus: true, }; const listOfEnquiriesInThirtyDays = await Student.find( fetchQuery, (err) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } } ).sort({ enquiryDate: -1 }); return res.status(200).json(listOfEnquiriesInThirtyDays); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enquires of last 90 days // @access Private exports.listEnquiriesInNinetyDays = async (req, res) => { try { const currentDate = new Date(); let ninetyDaysBefore = new Date(); ninetyDaysBefore = ninetyDaysBefore.setDate( ninetyDaysBefore.getDate() - 90 ); fetchQuery = { enquiryDate: { $gte: ninetyDaysBefore, $lte: currentDate }, enquiryStatus: true, }; const listOfEnquiriesInNinetyDays = await Student.find( fetchQuery, (err) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } } ).sort({ enquiryDate: -1 }); return res.status(200).json(listOfEnquiriesInNinetyDays); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enquires in last year // @access Private exports.listEnquiriesInLastYear = async (req, res) => { try { const currentDate = new Date(); let oneYearBefore = new Date(); oneYearBefore = oneYearBefore.setDate(oneYearBefore.getDate() - 365); fetchQuery = { enquiryDate: { $gte: oneYearBefore, $lte: currentDate }, enquiryStatus: true, }; const listOfEnquiriesInLastYear = await Student.find(fetchQuery, (err) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } }).sort({ enquiryDate: -1 }); return res.status(200).json(listOfEnquiriesInLastYear); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enrollments of last 30 days // @access Private exports.listEnrollmentsInThirtyDays = async (req, res) => { try { const currentDate = new Date(); let thirtyDaysBefore = new Date(); thirtyDaysBefore = thirtyDaysBefore.setDate( thirtyDaysBefore.getDate() - 30 ); fetchQuery = { enquiryDate: { $gte: thirtyDaysBefore, $lte: currentDate }, enquiryStatus: true, }; const listOfEnrollmentsInThirtyDays = await Student.find( fetchQuery, (err) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } } ).sort({ enrollmentDate: -1 }); return res.status(200).json(listOfEnrollmentsInThirtyDays); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enquires of last 90 days // @access Private exports.listEnrollmentsInNinetyDays = async (req, res) => { try { const currentDate = new Date(); let ninetyDaysBefore = new Date(); ninetyDaysBefore = ninetyDaysBefore.setDate( ninetyDaysBefore.getDate() - 90 ); fetchQuery = { enrollmentDate: { $gte: ninetyDaysBefore, $lte: currentDate }, enrollmentStatus: true, }; const listOfEnrollmentsInNinetyDays = await Student.find( fetchQuery, (err) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } } ).sort({ enrollmentDate: -1 }); return res.status(200).json(listOfEnrollmentsInNinetyDays); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enquires in last year // @access Private exports.listEnrollmentsInLastYear = async (req, res) => { try { const currentDate = new Date(); let oneYearBefore = new Date(); oneYearBefore = oneYearBefore.setDate(oneYearBefore.getDate() - 365); fetchQuery = { enrollmentDate: { $gte: oneYearBefore, $lte: currentDate }, enrollmentStatus: true, }; const listOfEnrollmentsInLastYear = await Student.find( fetchQuery, (err) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } } ).sort({ enrollmentDate: -1 }); return res.status(200).json(listOfEnrollmentsInLastYear); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get number of all the students // @access Private exports.totalStudents = async (req, res) => { try { await Student.countDocuments((err, numberOfStudents) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } return res.status(200).json(numberOfStudents); }); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get number of all the enquiries // @access Private exports.totalEnquiries = async (req, res) => { try { await Student.countDocuments( { enquiryStatus: true }, (err, numberOfEnquiries) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } return res.status(200).json(numberOfEnquiries); } ); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get number of all the enrollments // @access Private exports.totalEnrollments = async (req, res) => { try { await Student.countDocuments( { enrollmentStatus: true }, (err, numberOfEnrollments) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } return res.status(200).json(numberOfEnrollments); } ); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enquires of last 30 days // @access Private exports.totalEnquiriesInThirtyDays = async (req, res) => { try { const currentDate = new Date(); let thirtyDaysBefore = new Date(); thirtyDaysBefore = thirtyDaysBefore.setDate( thirtyDaysBefore.getDate() - 30 ); fetchQuery = { enquiryDate: { $gte: thirtyDaysBefore, $lte: currentDate }, enquiryStatus: true, }; await Student.countDocuments( fetchQuery, (err, numberOfEnquiriesInThirtyDays) => { if (err) { return res.status(401).json({ err: "Something went wrong" }); } return res.status(200).json(numberOfEnquiriesInThirtyDays); } ); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enquires of last 90 days // @access Private exports.totalEnquiriesInNinetyDays = async (req, res) => { try { const currentDate = new Date(); let ninetyDaysBefore = new Date(); ninetyDaysBefore = ninetyDaysBefore.setDate( ninetyDaysBefore.getDate() - 30 ); fetchQuery = { enquiryDate: { $gte: ninetyDaysBefore, $lte: currentDate }, enquiryStatus: true, }; await Student.countDocuments( fetchQuery, (err, numberOfEnquiriesInNinetyDays) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } return res.status(200).json(numberOfEnquiriesInNinetyDays); } ); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route POST api/admin/students // @desc get all the enquires of year // @access Private exports.totalEnquiriesInLastYear = async (req, res) => { try { const currentDate = new Date(); let oneYearBefore = new Date(); oneYearBefore = oneYearBefore.setDate(oneYearBefore.getDate() - 365); fetchQuery = { enquiryDate: { $gte: oneYearBefore, $lte: currentDate }, enquiryStatus: true, }; await Student.countDocuments( fetchQuery, (err, numberOfEnquiriesInLastYear) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } return res.status(200).json(numberOfEnquiriesInLastYear); } ); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enrollments in last 30 days // @access Private exports.totalEnrollmentsInThirtyDays = async (req, res) => { try { const currentDate = new Date(); let thirtyDaysBefore = new Date(); thirtyDaysBefore = thirtyDaysBefore.setDate( thirtyDaysBefore.getDate() - 30 ); fetchQuery = { enrollmentDate: { $gte: thirtyDaysBefore, $lte: currentDate }, enrollmentStatus: true, }; await Student.countDocuments( fetchQuery, (err, numberOfEnrollmentsInLastThirtyDays) => { if (err) { return res.status(200).json({ err: "Something went wrong" }); } return res.status(200).json(numberOfEnrollmentsInLastThirtyDays); } ); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enrollments in last 90 days // @access Private exports.totalEnrollmentsInNinetyDays = async (req, res) => { try { const currentDate = new Date(); let ninetyDaysBefore = new Date(); ninetyDaysBefore = ninetyDaysBefore.setDate( ninetyDaysBefore.getDate() - 90 ); fetchQuery = { enrollmentDate: { $gte: ninetyDaysBefore, $lte: currentDate }, enrollmentStatus: true, }; await Student.countDocuments( fetchQuery, (err, numberOfEnrollmentsInLastNinetyDays) => { if (err) { return res.status(400).json({ err: "Something went wrong" }); } return res.status(200).json(numberOfEnrollmentsInLastNinetyDays); } ); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } }; // @route GET api/admin/students // @desc get all the enrollments in last one year // @access Private exports.totalEnrollmentsInLastYear = async (req, res) => { try { const currentDate = new Date(); let oneYearBefore = new Date(); oneYearBefore = oneYearBefore.setDate(oneYearBefore.getDate() - 90); fetchQuery = { enrollmentDate: { $gte: oneYearBefore, $lte: currentDate }, enrollmentStatus: true, }; await Student.countDocuments( fetchQuery, (err, numberOfEnrollmentsInLastYear) => { if (err) { return res.status(200).json({ err: "Something went wrong" }); } return res.status(200).json(numberOfEnrollmentsInLastYear); } ); } catch (err) { return res.status(500).json({ err: "Internal Server Error" }); } };
var callbackArguments = []; var argument1 = function (a, b) { callbackArguments.push(arguments) return a + b; }; var argument2 = null; var argument3 = false; var argument4 = function (a, b) { callbackArguments.push(arguments) return a + b; }; var argument5 = null; var argument6 = function (acc, parent) { callbackArguments.push(arguments) return acc + parent.name + '.'; }; var argument7 = [25,82,783,595,-100,595,122,0,25,100]; var argument8 = {"0":"","59":"","242":1.5578072586887977e+308,"705":"","":"q","1.311163076234906e+308":"","1.1501150183513307e+307":""}; var argument9 = function (a, b) { callbackArguments.push(arguments) return a + b; }; var argument10 = null; var base_0 = [595,893,-100] var r_0= undefined try { r_0 = base_0.reduceRight(argument1,argument2,argument3) } catch(e) { r_0= "Error" } var base_1 = [595,893,-100] var r_1= undefined try { r_1 = base_1.reduceRight(argument4,argument5) } catch(e) { r_1= "Error" } var base_2 = [595,893,-100] var r_2= undefined try { r_2 = base_2.reduceRight(argument6,argument7,argument8) } catch(e) { r_2= "Error" } var base_3 = [595,893,-100] var r_3= undefined try { r_3 = base_3.reduceRight(argument9,argument10) } catch(e) { r_3= "Error" } function serialize(array){ return array.map(function(a){ if (a === null || a == undefined) return a; var name = a.constructor.name; if (name==='Object' || name=='Boolean'|| name=='Array'||name=='Number'||name=='String') return JSON.stringify(a); return name; }); } setTimeout(function(){ require("fs").writeFileSync("./experiments/reduceRight/reduceRightMined/test454.json",JSON.stringify({"baseObjects":serialize([base_0,base_1,base_2,base_3]),"returnObjects":serialize([r_0,r_1,r_2,r_3]),"callbackArgs":callbackArguments})) },300)
'use strict'; module.exports = function (c) { return { self: { background: c.alertBG, color: c.alertColor, position: 'fixed', top: 0, left: 0, right: 0, height: 44, padding: '10px 0' } }; };
// @remove-on-eject-begin /** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ // @remove-on-eject-end 'use strict'; const fs = require('fs'); const path = require('path'); const webpack = require('webpack'); const resolve = require('resolve'); const PnpWebpackPlugin = require('pnp-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin'); const TerserPlugin = require('terser-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const safePostCssParser = require('postcss-safe-parser'); const ManifestPlugin = require('webpack-manifest-plugin'); const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); const WorkboxWebpackPlugin = require('workbox-webpack-plugin'); const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent'); const paths = require('./paths'); const getClientEnvironment = require('./env'); const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin'); const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin-alt'); const typescriptFormatter = require('react-dev-utils/typescriptFormatter'); // @remove-on-eject-begin const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier'); // @remove-on-eject-end // ant-design-larkintuckerllc-react-scripts start const antDesignLarkinTuckerLLCBundleAnalyzerPlugin = require('webpack-bundle-analyzer') .BundleAnalyzerPlugin; // ant-design-larkintuckerllc-react-scripts end // Source maps are resource heavy and can cause out of memory issue for large source files. const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false'; // Some apps do not need the benefits of saving a web request, so not inlining the chunk // makes for a smoother build process. const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false'; // Check if TypeScript is setup const useTypeScript = fs.existsSync(paths.appTsConfig); // style files regexes const cssRegex = /\.css$/; const cssModuleRegex = /\.module\.css$/; const sassRegex = /\.(scss|sass)$/; const sassModuleRegex = /\.module\.(scss|sass)$/; // ant-design-larkintuckerllc-react-scripts start const antDesignLarkinTuckerLLCLessRegex = /\.less$/; const antDesignLarkinTuckerLLCLessModuleRegex = /\.module\.less$/; // ant-design-larkintuckerllc-react-scripts end // ant-design-larkintuckerllc-react-scripts start let antDesignLarkinTuckerLLCLessModifyVars = {}; const antDesignLarkinTuckerLLCUseLessModifyVars = fs.existsSync( paths.antDesignLarkinTuckerLLCLessModifyVars ); if (antDesignLarkinTuckerLLCUseLessModifyVars) { antDesignLarkinTuckerLLCLessModifyVars = require(paths.antDesignLarkinTuckerLLCLessModifyVars); } // ant-design-larkintuckerllc-react-scripts end // This is the production and development configuration. // It is focused on developer experience, fast rebuilds, and a minimal bundle. module.exports = function(webpackEnv) { const isEnvDevelopment = webpackEnv === 'development'; const isEnvProduction = webpackEnv === 'production'; // Webpack uses `publicPath` to determine where the app is being served from. // It requires a trailing slash, or the file assets will get an incorrect path. // In development, we always serve from the root. This makes config easier. const publicPath = isEnvProduction ? paths.servedPath : isEnvDevelopment && '/'; // Some apps do not use client-side routing with pushState. // For these, "homepage" can be set to "." to enable relative asset paths. const shouldUseRelativeAssetPaths = publicPath === './'; // `publicUrl` is just like `publicPath`, but we will provide it to our app // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript. // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz. const publicUrl = isEnvProduction ? publicPath.slice(0, -1) : isEnvDevelopment && ''; // Get environment variables to inject into our app. const env = getClientEnvironment(publicUrl); // common function to get style loaders const getStyleLoaders = (cssOptions, preProcessor) => { const loaders = [ isEnvDevelopment && require.resolve('style-loader'), isEnvProduction && { loader: MiniCssExtractPlugin.loader, options: Object.assign( {}, shouldUseRelativeAssetPaths ? { publicPath: '../../' } : undefined ), }, { loader: require.resolve('css-loader'), options: cssOptions, }, { // Options for PostCSS as we reference these options twice // Adds vendor prefixing based on your specified browser support in // package.json loader: require.resolve('postcss-loader'), options: { // Necessary for external CSS imports to work // https://github.com/facebook/create-react-app/issues/2677 ident: 'postcss', plugins: () => [ require('postcss-flexbugs-fixes'), require('postcss-preset-env')({ autoprefixer: { flexbox: 'no-2009', }, stage: 3, }), ], sourceMap: isEnvProduction && shouldUseSourceMap, }, }, ].filter(Boolean); if (preProcessor) { loaders.push({ loader: require.resolve(preProcessor), // ant-design-larkintuckerllc-react-scripts start options: preProcessor === 'less-loader' ? { javascriptEnabled: true, modifyVars: antDesignLarkinTuckerLLCLessModifyVars, sourceMap: isEnvProduction && shouldUseSourceMap, } : { sourceMap: isEnvProduction && shouldUseSourceMap, }, // ant-design-larkintuckerllc-react-scripts end }); } return loaders; }; return { mode: isEnvProduction ? 'production' : isEnvDevelopment && 'development', // Stop compilation early in production bail: isEnvProduction, devtool: isEnvProduction ? shouldUseSourceMap ? 'source-map' : false : isEnvDevelopment && 'cheap-module-source-map', // These are the "entry points" to our application. // This means they will be the "root" imports that are included in JS bundle. entry: [ // Include an alternative client for WebpackDevServer. A client's job is to // connect to WebpackDevServer by a socket and get notified about changes. // When you save a file, the client will either apply hot updates (in case // of CSS changes), or refresh the page (in case of JS changes). When you // make a syntax error, this client will display a syntax error overlay. // Note: instead of the default WebpackDevServer client, we use a custom one // to bring better experience for Create React App users. You can replace // the line below with these two lines if you prefer the stock client: // require.resolve('webpack-dev-server/client') + '?/', // require.resolve('webpack/hot/dev-server'), isEnvDevelopment && require.resolve('react-dev-utils/webpackHotDevClient'), // Finally, this is your app's code: paths.appIndexJs, // We include the app code last so that if there is a runtime error during // initialization, it doesn't blow up the WebpackDevServer client, and // changing JS code would still trigger a refresh. ].filter(Boolean), output: { // The build folder. path: isEnvProduction ? paths.appBuild : undefined, // Add /* filename */ comments to generated require()s in the output. pathinfo: isEnvDevelopment, // There will be one main bundle, and one file per asynchronous chunk. // In development, it does not produce real files. filename: isEnvProduction ? 'static/js/[name].[chunkhash:8].js' : isEnvDevelopment && 'static/js/bundle.js', // There are also additional JS chunk files if you use code splitting. chunkFilename: isEnvProduction ? 'static/js/[name].[chunkhash:8].chunk.js' : isEnvDevelopment && 'static/js/[name].chunk.js', // We inferred the "public path" (such as / or /my-project) from homepage. // We use "/" in development. publicPath: publicPath, // Point sourcemap entries to original disk location (format as URL on Windows) devtoolModuleFilenameTemplate: isEnvProduction ? info => path .relative(paths.appSrc, info.absoluteResourcePath) .replace(/\\/g, '/') : isEnvDevelopment && (info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')), }, optimization: { minimize: isEnvProduction, minimizer: [ // This is only used in production mode new TerserPlugin({ terserOptions: { parse: { // we want terser to parse ecma 8 code. However, we don't want it // to apply any minfication steps that turns valid ecma 5 code // into invalid ecma 5 code. This is why the 'compress' and 'output' // sections only apply transformations that are ecma 5 safe // https://github.com/facebook/create-react-app/pull/4234 ecma: 8, }, compress: { ecma: 5, warnings: false, // Disabled because of an issue with Uglify breaking seemingly valid code: // https://github.com/facebook/create-react-app/issues/2376 // Pending further investigation: // https://github.com/mishoo/UglifyJS2/issues/2011 comparisons: false, // Disabled because of an issue with Terser breaking valid code: // https://github.com/facebook/create-react-app/issues/5250 // Pending futher investigation: // https://github.com/terser-js/terser/issues/120 inline: 2, }, mangle: { safari10: true, }, output: { ecma: 5, comments: false, // Turned on because emoji and regex is not minified properly using default // https://github.com/facebook/create-react-app/issues/2488 ascii_only: true, }, }, // Use multi-process parallel running to improve the build speed // Default number of concurrent runs: os.cpus().length - 1 parallel: true, // Enable file caching cache: true, sourceMap: shouldUseSourceMap, }), // This is only used in production mode new OptimizeCSSAssetsPlugin({ cssProcessorOptions: { parser: safePostCssParser, map: shouldUseSourceMap ? { // `inline: false` forces the sourcemap to be output into a // separate file inline: false, // `annotation: true` appends the sourceMappingURL to the end of // the css file, helping the browser find the sourcemap annotation: true, } : false, }, }), ], // Automatically split vendor and commons // https://twitter.com/wSokra/status/969633336732905474 // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366 splitChunks: { chunks: 'all', name: false, }, // Keep the runtime chunk seperated to enable long term caching // https://twitter.com/wSokra/status/969679223278505985 runtimeChunk: true, }, resolve: { // This allows you to set a fallback for where Webpack should look for modules. // We placed these paths second because we want `node_modules` to "win" // if there are any conflicts. This matches Node resolution mechanism. // https://github.com/facebook/create-react-app/issues/253 modules: ['node_modules'].concat( // It is guaranteed to exist because we tweak it in `env.js` process.env.NODE_PATH.split(path.delimiter).filter(Boolean) ), // These are the reasonable defaults supported by the Node ecosystem. // We also include JSX as a common component filename extension to support // some tools, although we do not recommend using it, see: // https://github.com/facebook/create-react-app/issues/290 // `web` extension prefixes have been added for better support // for React Native Web. extensions: paths.moduleFileExtensions .map(ext => `.${ext}`) .filter(ext => useTypeScript || !ext.includes('ts')), alias: { // Support React Native Web // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ 'react-native': 'react-native-web', }, plugins: [ // Adds support for installing with Plug'n'Play, leading to faster installs and adding // guards against forgotten dependencies and such. PnpWebpackPlugin, // Prevents users from importing files from outside of src/ (or node_modules/). // This often causes confusion because we only process files within src/ with babel. // To fix this, we prevent you from importing files out of src/ -- if you'd like to, // please link the files into your node_modules/ and let module-resolution kick in. // Make sure your source files are compiled, as they will not be processed in any way. new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]), ], }, resolveLoader: { plugins: [ // Also related to Plug'n'Play, but this time it tells Webpack to load its loaders // from the current package. PnpWebpackPlugin.moduleLoader(module), ], }, module: { strictExportPresence: true, rules: [ // Disable require.ensure as it's not a standard language feature. { parser: { requireEnsure: false } }, // First, run the linter. // It's important to do this before Babel processes the JS. { test: /\.(js|mjs|jsx)$/, enforce: 'pre', use: [ { options: { formatter: require.resolve('react-dev-utils/eslintFormatter'), eslintPath: require.resolve('eslint'), // @remove-on-eject-begin baseConfig: { extends: [require.resolve('eslint-config-react-app')], settings: { react: { version: '999.999.999' } }, }, ignore: false, useEslintrc: false, // @remove-on-eject-end }, loader: require.resolve('eslint-loader'), }, ], include: paths.appSrc, }, { // "oneOf" will traverse all following loaders until one will // match the requirements. When no loader matches it will fall // back to the "file" loader at the end of the loader list. oneOf: [ // "url" loader works like "file" loader except that it embeds assets // smaller than specified limit in bytes as data URLs to avoid requests. // A missing `test` is equivalent to a match. { test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/], loader: require.resolve('url-loader'), options: { limit: 10000, name: 'static/media/[name].[hash:8].[ext]', }, }, // Process application JS with Babel. // The preset includes JSX, Flow, TypeScript, and some ESnext features. { test: /\.(js|mjs|jsx|ts|tsx)$/, include: paths.appSrc, loader: require.resolve('babel-loader'), options: { customize: require.resolve( 'babel-preset-react-app/webpack-overrides' ), // @remove-on-eject-begin babelrc: false, configFile: false, presets: [require.resolve('babel-preset-react-app')], // Make sure we have a unique cache identifier, erring on the // side of caution. // We remove this when the user ejects because the default // is sane and uses Babel options. Instead of options, we use // the react-scripts and babel-preset-react-app versions. cacheIdentifier: getCacheIdentifier( isEnvProduction ? 'production' : isEnvDevelopment && 'development', [ 'babel-plugin-named-asset-import', 'babel-preset-react-app', 'react-dev-utils', 'react-scripts', ] ), // @remove-on-eject-end plugins: [ // ant-design-larkintuckerllc-react-scripts start [ 'import', { libraryName: 'antd', style: true, }, ], // ant-design-larkintuckerllc-react-scripts end [ require.resolve('babel-plugin-named-asset-import'), { loaderMap: { svg: { ReactComponent: '@svgr/webpack?-prettier,-svgo![path]', }, }, }, ], ], // This is a feature of `babel-loader` for webpack (not Babel itself). // It enables caching results in ./node_modules/.cache/babel-loader/ // directory for faster rebuilds. cacheDirectory: true, cacheCompression: isEnvProduction, compact: isEnvProduction, }, }, // Process any JS outside of the app with Babel. // Unlike the application JS, we only compile the standard ES features. { test: /\.(js|mjs)$/, exclude: /@babel(?:\/|\\{1,2})runtime/, loader: require.resolve('babel-loader'), options: { babelrc: false, configFile: false, compact: false, presets: [ [ require.resolve('babel-preset-react-app/dependencies'), { helpers: true }, ], ], cacheDirectory: true, cacheCompression: isEnvProduction, // @remove-on-eject-begin cacheIdentifier: getCacheIdentifier( isEnvProduction ? 'production' : isEnvDevelopment && 'development', [ 'babel-plugin-named-asset-import', 'babel-preset-react-app', 'react-dev-utils', 'react-scripts', ] ), // @remove-on-eject-end // If an error happens in a package, it's possible to be // because it was compiled. Thus, we don't want the browser // debugger to show the original code. Instead, the code // being evaluated would be much more helpful. sourceMaps: false, }, }, // "postcss" loader applies autoprefixer to our CSS. // "css" loader resolves paths in CSS and adds assets as dependencies. // "style" loader turns CSS into JS modules that inject <style> tags. // In production, we use MiniCSSExtractPlugin to extract that CSS // to a file, but in development "style" loader enables hot editing // of CSS. // By default we support CSS Modules with the extension .module.css { test: cssRegex, exclude: cssModuleRegex, use: getStyleLoaders({ importLoaders: 1, sourceMap: isEnvProduction && shouldUseSourceMap, }), // Don't consider CSS imports dead code even if the // containing package claims to have no side effects. // Remove this when webpack adds a warning or an error for this. // See https://github.com/webpack/webpack/issues/6571 sideEffects: true, }, // Adds support for CSS Modules (https://github.com/css-modules/css-modules) // using the extension .module.css { test: cssModuleRegex, use: getStyleLoaders({ importLoaders: 1, sourceMap: isEnvProduction && shouldUseSourceMap, modules: true, getLocalIdent: getCSSModuleLocalIdent, }), }, // Opt-in support for SASS (using .scss or .sass extensions). // By default we support SASS Modules with the // extensions .module.scss or .module.sass { test: sassRegex, exclude: sassModuleRegex, use: getStyleLoaders( { importLoaders: 2, sourceMap: isEnvProduction && shouldUseSourceMap, }, 'sass-loader' ), // Don't consider CSS imports dead code even if the // containing package claims to have no side effects. // Remove this when webpack adds a warning or an error for this. // See https://github.com/webpack/webpack/issues/6571 sideEffects: true, }, // Adds support for CSS Modules, but using SASS // using the extension .module.scss or .module.sass { test: sassModuleRegex, use: getStyleLoaders( { importLoaders: 2, sourceMap: isEnvProduction && shouldUseSourceMap, modules: true, getLocalIdent: getCSSModuleLocalIdent, }, 'sass-loader' ), }, // ant-design-larkintuckerllc-react-scripts start // Opt-in support for Less (using .less extensions). // By default we support Less Modules with the // extensions .module.less { test: antDesignLarkinTuckerLLCLessRegex, exclude: antDesignLarkinTuckerLLCLessModuleRegex, use: getStyleLoaders( { importLoaders: 2, sourceMap: isEnvProduction && shouldUseSourceMap, }, 'less-loader' ), // Don't consider CSS imports dead code even if the // containing package claims to have no side effects. // Remove this when webpack adds a warning or an error for this. // See https://github.com/webpack/webpack/issues/6571 sideEffects: true, }, // Adds support for CSS Modules, but using Less // using the extension .module.less { test: antDesignLarkinTuckerLLCLessModuleRegex, use: getStyleLoaders( { importLoaders: 2, sourceMap: isEnvProduction && shouldUseSourceMap, modules: true, getLocalIdent: getCSSModuleLocalIdent, }, 'less-loader' ), }, // ant-design-larkintuckerllc-react-scripts end // "file" loader makes sure those assets get served by WebpackDevServer. // When you `import` an asset, you get its (virtual) filename. // In production, they would get copied to the `build` folder. // This loader doesn't use a "test" so it will catch all modules // that fall through the other loaders. { loader: require.resolve('file-loader'), // Exclude `js` files to keep "css" loader working as it injects // its runtime that would otherwise be processed through "file" loader. // Also exclude `html` and `json` extensions so they get processed // by webpacks internal loaders. exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/], options: { name: 'static/media/[name].[hash:8].[ext]', }, }, // ** STOP ** Are you adding a new loader? // Make sure to add the new loader(s) before the "file" loader. ], }, ], }, plugins: [ // Generates an `index.html` file with the <script> injected. new HtmlWebpackPlugin( Object.assign( {}, { inject: true, template: paths.appHtml, }, isEnvProduction ? { minify: { removeComments: true, collapseWhitespace: true, removeRedundantAttributes: true, useShortDoctype: true, removeEmptyAttributes: true, removeStyleLinkTypeAttributes: true, keepClosingSlash: true, minifyJS: true, minifyCSS: true, minifyURLs: true, }, } : undefined ) ), // Inlines the webpack runtime script. This script is too small to warrant // a network request. isEnvProduction && shouldInlineRuntimeChunk && new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]), // Makes some environment variables available in index.html. // The public URL is available as %PUBLIC_URL% in index.html, e.g.: // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> // In production, it will be an empty string unless you specify "homepage" // in `package.json`, in which case it will be the pathname of that URL. // In development, this will be an empty string. new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw), // This gives some necessary context to module not found errors, such as // the requesting resource. new ModuleNotFoundPlugin(paths.appPath), // Makes some environment variables available to the JS code, for example: // if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`. // It is absolutely essential that NODE_ENV is set to production // during a production build. // Otherwise React will be compiled in the very slow development mode. new webpack.DefinePlugin(env.stringified), // This is necessary to emit hot updates (currently CSS only): isEnvDevelopment && new webpack.HotModuleReplacementPlugin(), // Watcher doesn't work well if you mistype casing in a path so we use // a plugin that prints an error when you attempt to do this. // See https://github.com/facebook/create-react-app/issues/240 isEnvDevelopment && new CaseSensitivePathsPlugin(), // If you require a missing module and then `npm install` it, you still have // to restart the development server for Webpack to discover it. This plugin // makes the discovery automatic so you don't have to restart. // See https://github.com/facebook/create-react-app/issues/186 isEnvDevelopment && new WatchMissingNodeModulesPlugin(paths.appNodeModules), isEnvProduction && new MiniCssExtractPlugin({ // Options similar to the same options in webpackOptions.output // both options are optional filename: 'static/css/[name].[contenthash:8].css', chunkFilename: 'static/css/[name].[contenthash:8].chunk.css', }), // Generate a manifest file which contains a mapping of all asset filenames // to their corresponding output file so that tools can pick it up without // having to parse `index.html`. new ManifestPlugin({ fileName: 'asset-manifest.json', publicPath: publicPath, }), // Moment.js is an extremely popular library that bundles large locale files // by default due to how Webpack interprets its code. This is a practical // solution that requires the user to opt into importing specific locales. // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack // You can remove this if you don't use Moment.js: new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), // Generate a service worker script that will precache, and keep up to date, // the HTML & assets that are part of the Webpack build. isEnvProduction && new WorkboxWebpackPlugin.GenerateSW({ clientsClaim: true, exclude: [/\.map$/, /asset-manifest\.json$/], importWorkboxFrom: 'cdn', navigateFallback: publicUrl + '/index.html', navigateFallbackBlacklist: [ // Exclude URLs starting with /_, as they're likely an API call new RegExp('^/_'), // Exclude URLs containing a dot, as they're likely a resource in // public/ and not a SPA route new RegExp('/[^/]+\\.[^/]+$'), ], }), // TypeScript type checking useTypeScript && new ForkTsCheckerWebpackPlugin({ typescript: resolve.sync('typescript', { basedir: paths.appNodeModules, }), async: false, checkSyntacticErrors: true, tsconfig: paths.appTsConfig, compilerOptions: { module: 'esnext', moduleResolution: 'node', resolveJsonModule: true, isolatedModules: true, noEmit: true, jsx: 'preserve', }, reportFiles: [ '**', '!**/*.json', '!**/__tests__/**', '!**/?(*.)(spec|test).*', '!**/src/setupProxy.*', '!**/src/setupTests.*', ], watch: paths.appSrc, silent: true, formatter: typescriptFormatter, }), // ant-design-larkintuckerllc-react-scripts start process.env.ANT_DESIGN_LARKIN_TUCKER_LLC_ANALYZE && new antDesignLarkinTuckerLLCBundleAnalyzerPlugin(), // ant-design-larkintuckerllc-react-scripts end ].filter(Boolean), // Some libraries import Node modules but don't use them in the browser. // Tell Webpack to provide empty mocks for them so importing them works. node: { dgram: 'empty', fs: 'empty', net: 'empty', tls: 'empty', child_process: 'empty', }, // Turn off performance processing because we utilize // our own hints via the FileSizeReporter performance: false, }; };
import { Platform, StyleSheet, } from 'react-native'; const styles = StyleSheet.create({ textInput: { flex: 1, marginLeft: 10, fontSize: 16, lineHeight: 16, marginTop: Platform.select({ ios: 6, android: 0, }), marginBottom: Platform.select({ ios: 5, android: 3, }), }, }); export default styles
import debounce from 'lodash.debounce'; import { action, computed, observable } from 'mobx'; import { isDesktop, toMoment } from '@deriv/shared'; import Shortcode from 'Modules/Reports/Helpers/shortcode'; import { WS } from 'Services/ws-methods'; import { formatStatementTransaction } from './Helpers/format-response'; import getDateBoundaries from '../Profit/Helpers/format-request'; import BaseStore from '../../base-store'; const batch_size = 100; // request response limit const delay_on_scroll_time = 150; // fetch debounce delay on scroll export default class StatementStore extends BaseStore { @observable data = []; @observable is_loading = false; @observable has_loaded_all = false; @observable date_from = null; @observable date_to = toMoment() .startOf('day') .add(1, 'd') .subtract(1, 's') .unix(); @observable error = ''; @observable filtered_date_range; // `client_loginid` is only used to detect if this is in sync with the client-store, don't rely on // this for calculations. Use the client.currency instead. @observable client_loginid = ''; @computed get is_empty() { return !this.is_loading && this.data.length === 0; } @computed get has_selected_date() { return !!(this.date_from || this.date_to); } @computed get data_source() { // TODO: remove this getter once Multiplier is supported in mobile return isDesktop() ? this.data : this.data.filter(row => !Shortcode.isMultiplier({ shortcode: row.shortcode })); } @action.bound clearTable() { this.data = []; this.has_loaded_all = false; this.is_loading = false; } @action.bound clearDateFilter() { this.date_from = null; this.date_to = toMoment() .startOf('day') .add(1, 'd') .subtract(1, 's') .unix(); this.partial_fetch_time = 0; } shouldFetchNextBatch(should_load_partially) { if (!should_load_partially && (this.has_loaded_all || this.is_loading)) return false; const today = toMoment() .startOf('day') .add(1, 'd') .subtract(1, 's') .unix(); if (this.date_to < today) return !should_load_partially && this.partial_fetch_time; return true; } @action.bound async fetchNextBatch(should_load_partially = false) { if (!this.shouldFetchNextBatch(should_load_partially)) return; this.is_loading = true; const response = await WS.statement( batch_size, !should_load_partially ? this.data.length : undefined, getDateBoundaries(this.date_from, this.date_to, this.partial_fetch_time, should_load_partially) ); this.statementHandler(response, should_load_partially); } @action.bound statementHandler(response, should_load_partially) { if ('error' in response) { this.error = response.error.message; return; } const formatted_transactions = response.statement.transactions.map(transaction => formatStatementTransaction( transaction, this.root_store.client.currency, this.root_store.modules.trade.active_symbols ) ); if (should_load_partially) { this.data = [...formatted_transactions, ...this.data]; } else { this.data = [...this.data, ...formatted_transactions]; } this.has_loaded_all = !should_load_partially && formatted_transactions.length < batch_size; this.is_loading = false; if (formatted_transactions.length > 0) { this.partial_fetch_time = toMoment().unix(); } } @action.bound handleDateChange(date_values, { date_range } = {}) { this.filtered_date_range = date_range; this.date_from = date_values?.from ?? (date_values.is_batch ? null : this.date_from); this.date_to = date_values?.to ?? this.date_to; this.clearTable(); this.fetchNextBatch(); } fetchOnScroll = debounce(left => { if (left < 2000) { this.fetchNextBatch(); } }, delay_on_scroll_time); @action.bound handleScroll(event) { const { scrollTop, scrollHeight, clientHeight } = event.target; const left_to_scroll = scrollHeight - (scrollTop + clientHeight); this.fetchOnScroll(left_to_scroll); } @action.bound accountSwitcherListener() { return new Promise(resolve => { this.clearTable(); this.clearDateFilter(); return resolve(this.fetchNextBatch()); }); } @action.bound networkStatusChangeListener(is_online) { this.is_loading = !is_online; } @action.bound async onMount() { this.assertHasValidCache( this.client_loginid, this.clearDateFilter, this.clearTable, WS.forgetAll.bind(null, 'proposal') ); this.client_loginid = this.root_store.client.loginid; this.onSwitchAccount(this.accountSwitcherListener); this.onNetworkStatusChange(this.networkStatusChangeListener); await WS.wait('authorize'); this.fetchNextBatch(true); } @action.bound onUnmount() { this.clearTable(); this.clearDateFilter(); this.disposeSwitchAccount(); WS.forgetAll('proposal'); } }
require("@nomiclabs/hardhat-web3"); const { HardhatRuntimeEnvironment } = require('hardhat/types'); const { generatedWallets } = require('../test/generatedWallets'); const { JsonRpcProvider } = require('@ethersproject/providers'); const provider = new JsonRpcProvider("http://localhost:8545"); const accounts = generatedWallets(provider); async function main() { const GhostMarketERC721 = await ethers.getContractFactory("GhostMarketERC721"); const deployer = accounts[0].address console.log("Deploying GhostMarketERC721..."); const GhostMarketERC721Proxy = await upgrades.deployProxy( GhostMarketERC721, ["GhostMarket ERC721", "GHOST", "https://api.ghostmarket.io/metadata/polygon/"], { deployer, initializer: "initialize", unsafeAllowCustomTypes: true }); //unsafeAllowCustomTypes Ignores struct mapping in AccessControl, which is fine because it's used in a mapping //See: https://solidity.readthedocs.io/en/v0.8.3/ console.log("proxy deployed to:", GhostMarketERC721Proxy.address); } main() .then(() => process.exit(0)) .catch(error => { console.error(error); process.exit(1); });
/* * -------------------------------------------------------------------- * jQuery-Plugin - selectToUISlider - creates a UI slider component from a select element(s) * by Scott Jehl, scott@filamentgroup.com * http://www.filamentgroup.com * reference article: http://www.filamentgroup.com/lab/update_jquery_ui_16_slider_from_a_select_element/ * demo page: http://www.filamentgroup.com/examples/slider_v2/index.html * * Copyright (c) 2008 Filament Group, Inc * Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses. * * Usage Notes: please refer to our article above for documentation * * -------------------------------------------------------------------- */ jQuery.fn.selectToUISlider = function(settings) { var selects = jQuery(this); //accessible slider options var options = jQuery.extend({ labels: 3, //number of visible labels tooltip: true, //show tooltips, boolean tooltipSrc: "text", //accepts 'value' as well labelSrc: "value", //accepts 'value' as well , sliderOptions: null }, settings); //handle ID attrs - selects each need IDs for handles to find them var handleIds = (function() { var tempArr = []; selects.each(function() { tempArr.push("handle_" + jQuery(this).attr("id")); }); return tempArr; })(); //array of all option elements in select element (ignores optgroups) var selectOptions = (function() { var opts = []; selects.eq(0).find("option").each(function() { opts.push({ value: jQuery(this).attr("value"), text: jQuery(this).text() }); }); return opts; })(); //array of opt groups if present var groups = (function() { if (selects.eq(0).find("optgroup").size() > 0) { var groupedData = []; selects.eq(0).find("optgroup").each(function(i) { groupedData[i] = {}; groupedData[i].label = jQuery(this).attr("label"); groupedData[i].options = []; jQuery(this).find("option").each(function() { groupedData[i].options.push({ text: jQuery(this).text(), value: jQuery(this).attr("value") }); }); }); return groupedData; } else return null; })(); //check if obj is array function isArray(obj) { return obj.constructor == Array; } //return tooltip text from option index function ttText(optIndex) { return (options.tooltipSrc == "text") ? selectOptions[optIndex].text : selectOptions[optIndex].value; } //plugin-generated slider options (can be overridden) var sliderOptions = { step: 1, min: 0, orientation: "horizontal", max: selectOptions.length - 1, range: selects.length > 1, //multiple select elements = true slide: function(e, ui) { //slide function var thisHandle = jQuery(ui.handle); //handle feedback var textval = ttText(ui.value); thisHandle .attr("aria-valuetext", textval) .attr("aria-valuenow", ui.value) .find(".ui-slider-tooltip .ttContent") .text(textval); //control original select menu var currSelect = jQuery("#" + thisHandle.attr("id").split("handle_")[1]); currSelect.find("option").eq(ui.value).attr("selected", "selected"); }, values: (function() { var values = []; selects.each(function() { values.push(jQuery(this).get(0).selectedIndex); }); return values; })() }; //slider options from settings options.sliderOptions = (settings) ? jQuery.extend(sliderOptions, settings.sliderOptions) : sliderOptions; //select element change event selects.bind("change keyup click", function() { var thisIndex = jQuery(this).get(0).selectedIndex; var thisHandle = jQuery("#handle_" + jQuery(this).attr("id")); var handleIndex = thisHandle.data("handleNum"); thisHandle.parents(".ui-slider:eq(0)").slider("values", handleIndex, thisIndex); }); //create slider component div var sliderComponent = jQuery("<div></div>"); //CREATE HANDLES selects.each(function(i) { var hidett = ""; //associate label for ARIA var thisLabel = jQuery("label[for=" + jQuery(this).attr("id") + "]"); //labelled by aria doesn't seem to work on slider handle. Using title attr as backup var labelText = (thisLabel.size() > 0) ? "Slider control for " + thisLabel.text() + "" : ""; var thisLabelId = thisLabel.attr("id") || thisLabel.attr("id", "label_" + handleIds[i]).attr("id"); if (options.tooltip == false) { hidett = ' style="display: none;"'; } jQuery("<a " + 'href="#" tabindex="0" ' + 'id="' + handleIds[i] + '" ' + 'class="ui-slider-handle" ' + 'role="slider" ' + 'aria-labelledby="' + thisLabelId + '" ' + 'aria-valuemin="' + options.sliderOptions.min + '" ' + 'aria-valuemax="' + options.sliderOptions.max + '" ' + 'aria-valuenow="' + options.sliderOptions.values[i] + '" ' + 'aria-valuetext="' + ttText(options.sliderOptions.values[i]) + '" ' + '><span class="screenReaderContext">' + labelText + "</span>" + '<span class="ui-slider-tooltip ui-widget-content ui-corner-all"' + hidett + '><span class="ttContent"></span>' + '<span class="ui-tooltip-pointer-down ui-widget-content"><span class="ui-tooltip-pointer-down-inner"></span></span>' + "</span></a>") .data("handleNum", i) .appendTo(sliderComponent); }); //CREATE SCALE AND TICS //write dl if there are optgroups if (groups) { var inc = 0; var scale = sliderComponent.append('<dl class="ui-slider-scale ui-helper-reset" role="presentation"></dl>') .find(".ui-slider-scale:eq(0)"); jQuery(groups).each(function(h) { scale.append('<dt style="width: ' + (100 / groups.length).toFixed(2) + "%" + "; left:" + (h / (groups.length - 1) * 100).toFixed(2) + "%" + '"><span>' + this.label + "</span></dt>"); //class name becomes camelCased label var groupOpts = this.options; jQuery(this.options).each(function(i) { var style = (inc == selectOptions.length - 1 || inc == 0) ? 'style="display: none;"' : ""; var labelText = (options.labelSrc == "text") ? groupOpts[i].text : groupOpts[i].value; scale.append('<dd style="left:' + leftVal(inc) + '"><span class="ui-slider-label">' + labelText + '</span><span class="ui-slider-tic ui-widget-content"' + style + "></span></dd>"); inc++; }); }); } //write ol else { var scale = sliderComponent.append('<ol class="ui-slider-scale ui-helper-reset" role="presentation"></ol>') .find(".ui-slider-scale:eq(0)"); jQuery(selectOptions).each(function(i) { var style = (i == selectOptions.length - 1 || i == 0) ? 'style="display: none;"' : ""; var labelText = (options.labelSrc == "text") ? this.text : this.value; scale.append('<li style="left:' + leftVal(i) + '"><span class="ui-slider-label">' + labelText + '</span><span class="ui-slider-tic ui-widget-content"' + style + "></span></li>"); }); } function leftVal(i) { return (i / (selectOptions.length - 1) * 100).toFixed(2) + "%"; } //show and hide labels depending on labels pref //show the last one if there are more than 1 specified if (options.labels > 1) sliderComponent .find(".ui-slider-scale li:last span.ui-slider-label, .ui-slider-scale dd:last span.ui-slider-label") .addClass("ui-slider-label-show"); //set increment var increm = Math.max(1, Math.round(selectOptions.length / options.labels)); //show em based on inc for (var j = 0; j < selectOptions.length; j += increm) { if ((selectOptions.length - j) > increm) { //don't show if it's too close to the end label sliderComponent .find(".ui-slider-scale li:eq(" + j + ") span.ui-slider-label, .ui-slider-scale dd:eq(" + j + ") span.ui-slider-label").addClass("ui-slider-label-show"); } } //style the dt's sliderComponent.find(".ui-slider-scale dt").each(function(i) { jQuery(this).css({ 'left': ((100 / (groups.length)) * i).toFixed(2) + "%" }); }); //inject and return sliderComponent .insertAfter(jQuery(this).eq(this.length - 1)) .slider(options.sliderOptions) .attr("role", "application") .find(".ui-slider-label") .each(function() { jQuery(this).css("marginLeft", -jQuery(this).width() / 2); }); //update tooltip arrow inner color sliderComponent.find(".ui-tooltip-pointer-down-inner").each(function() { var bWidth = jQuery(".ui-tooltip-pointer-down-inner").css("borderTopWidth"); var bColor = jQuery(this).parents(".ui-slider-tooltip").css("backgroundColor"); jQuery(this).css("border-top", bWidth + " solid " + bColor); }); var values = sliderComponent.slider("values"); if (isArray(values)) { jQuery(values).each(function(i) { sliderComponent.find(".ui-slider-tooltip .ttContent").eq(i).text(ttText(this)); }); } else { sliderComponent.find(".ui-slider-tooltip .ttContent").eq(0).text(ttText(values)); } return this; }
import React from 'react'; import AppBar from '@material-ui/core/AppBar'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import CssBaseline from '@material-ui/core/CssBaseline'; import { makeStyles } from '@material-ui/core/styles'; const useStyles = makeStyles((theme) => ({ appBar: { borderBottom: `1px solid ${theme.palette.divider}`, }, })); function Header() { const classes = useStyles(); return ( <React.Fragment> <CssBaseline /> <AppBar position="static" color="white" elevation={0} className={classes.appBar} > <Toolbar> <Typography variant="h6" color="inherit" noWrap> StockF </Typography> </Toolbar> </AppBar> </React.Fragment> ); } export default Header;
var webpack = require('webpack'); var webpackMerge = require('webpack-merge'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var commonConfig = require('./webpack.common.js'); var helpers = require('./helpers'); const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; module.exports = webpackMerge(commonConfig, { devtool: 'source-map', output: { path: helpers.root('dist'), publicPath: '/', filename: '[name].[hash].js', chunkFilename: '[id].[hash].chunk.js' }, htmlLoader: { minimize: false // workaround for ng2 }, plugins: [ new webpack.NoErrorsPlugin(), new webpack.optimize.DedupePlugin(), new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618 mangle: { keep_fnames: true } }), new ExtractTextPlugin('[name].[hash].css'), new webpack.DefinePlugin({ 'process.env': { 'ENV': JSON.stringify(ENV) } }) ] });
module.exports = async (context, opts) => { const { owner, repo } = context.repo() return context.github.request({ method: 'POST', url: '/repos/:owner/:repo/pages', headers: { accept: 'application/vnd.github.switcheroo-preview+json' }, owner, repo, source: { branch: opts.branch || 'master', path: opts.path || '/' } }) }
// Copyright 2018 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Test that spread can create arrays in large object space. const n = 130000; { let x = new Map(); for (let i = 0; i < n; ++i) x.set(i, String(i)); let a = [...x.values()]; }{ let x = new Map(); for (let i = 0; i < n; ++i) x.set(i, String(i)); let a = [...x.keys()]; }
const app = require('./app.js'); const Socket = require('./socket/socket'); const port = app.get('port'); const server = app.get('server'); const io = new Socket(server); let connections = 0; server.listen(port, () => { console.log(`El servidor esta corriendo en http://localhost:${port}`); }); io.start();
const path = require('path'); module.exports = { mode: 'production', entry: './src/module.js', output: { path: path.resolve('lib'), filename: 'module.js', libraryTarget: 'commonjs2', }, module: { rules: [ { test: /\.js?$/, exclude: /(node_modules)/, use: 'babel-loader', }, ], }, resolve: { extensions: ['.js'], }, };
/* Copyright 2013 Mozilla Foundation * * 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. */ /* globals DEFAULT_PREFERENCES, Promise */ 'use strict'; // #include default_preferences.js const SidebarView = { NONE: 0, THUMBS: 1, OUTLINE: 2, ATTACHMENTS: 3, }; /** * Preferences - Utility for storing persistent settings. * Used for settings that should be applied to all opened documents, * or every time the viewer is loaded. */ const Preferences = { prefs: Object.create(DEFAULT_PREFERENCES), isInitializedPromiseResolved: false, initializedPromise: null, /** * Initialize and fetch the current preference values from storage. * @return {Promise} A promise that is resolved when the preferences * have been initialized. */ initialize: function preferencesInitialize() { return this.initializedPromise = this._readFromStorage(DEFAULT_PREFERENCES).then((prefObj) => { this.isInitializedPromiseResolved = true; if (prefObj) { this.prefs = prefObj; } }); }, /** * Stub function for writing preferences to storage. * NOTE: This should be overridden by a build-specific function defined below. * @param {Object} prefObj The preferences that should be written to storage. * @return {Promise} A promise that is resolved when the preference values * have been written. */ _writeToStorage: function preferences_writeToStorage(prefObj) { return Promise.resolve(); }, /** * Stub function for reading preferences from storage. * NOTE: This should be overridden by a build-specific function defined below. * @param {Object} prefObj The preferences that should be read from storage. * @return {Promise} A promise that is resolved with an {Object} containing * the preferences that have been read. */ _readFromStorage: function preferences_readFromStorage(prefObj) { return Promise.resolve(); }, /** * Reset the preferences to their default values and update storage. * @return {Promise} A promise that is resolved when the preference values * have been reset. */ reset: function preferencesReset() { return this.initializedPromise.then(() => { this.prefs = Object.create(DEFAULT_PREFERENCES); return this._writeToStorage(DEFAULT_PREFERENCES); }); }, /** * Replace the current preference values with the ones from storage. * @return {Promise} A promise that is resolved when the preference values * have been updated. */ reload: function preferencesReload() { return this.initializedPromise.then(() => { this._readFromStorage(DEFAULT_PREFERENCES).then((prefObj) => { if (prefObj) { this.prefs = prefObj; } }); }); }, /** * Set the value of a preference. * @param {string} name The name of the preference that should be changed. * @param {boolean|number|string} value The new value of the preference. * @return {Promise} A promise that is resolved when the value has been set, * provided that the preference exists and the types match. */ set: function preferencesSet(name, value) { return this.initializedPromise.then(() => { if (DEFAULT_PREFERENCES[name] === undefined) { throw new Error(`preferencesSet: '${name}' is undefined.`); } else if (value === undefined) { throw new Error('preferencesSet: no value is specified.'); } const valueType = typeof value; const defaultType = typeof DEFAULT_PREFERENCES[name]; if (valueType !== defaultType) { if (valueType === 'number' && defaultType === 'string') { value = value.toString(); } else { throw new Error(`Preferences_set: '${value}' is a \"${ valueType}\", expected \"${defaultType}\".`); } } else if (valueType === 'number' && (value | 0) !== value) { throw new Error(`Preferences_set: '${value }' must be an \"integer\".`); } this.prefs[name] = value; return this._writeToStorage(this.prefs); }); }, /** * Get the value of a preference. * @param {string} name The name of the preference whose value is requested. * @return {Promise} A promise that is resolved with a {boolean|number|string} * containing the value of the preference. */ get: function preferencesGet(name) { return this.initializedPromise.then(() => { const defaultValue = DEFAULT_PREFERENCES[name]; if (defaultValue === undefined) { throw new Error(`preferencesGet: '${name}' is undefined.`); } else { const prefValue = this.prefs[name]; if (prefValue !== undefined) { return prefValue; } } return defaultValue; }); }, }; // #if CHROME // Preferences._writeToStorage = function (prefObj) { // return new Promise(function (resolve) { // if (prefObj == DEFAULT_PREFERENCES) { // var keysToRemove = Object.keys(DEFAULT_PREFERENCES); // // If the storage is reset, remove the keys so that the values from // // managed storage are applied again. // chrome.storage.local.remove(keysToRemove, function() { // resolve(); // }); // } else { // chrome.storage.local.set(prefObj, function() { // resolve(); // }); // } // }); // }; // // Preferences._readFromStorage = function (prefObj) { // return new Promise(function (resolve) { // if (chrome.storage.managed) { // // Get preferences as set by the system administrator. // // See extensions/chromium/preferences_schema.json for more information. // // These preferences can be overridden by the user. // chrome.storage.managed.get(DEFAULT_PREFERENCES, getPreferences); // } else { // // Managed storage not supported, e.g. in old Chromium versions. // getPreferences(DEFAULT_PREFERENCES); // } // // function getPreferences(defaultPrefs) { // if (chrome.runtime.lastError) { // // Managed storage not supported, e.g. in Opera. // defaultPrefs = DEFAULT_PREFERENCES; // } // chrome.storage.local.get(defaultPrefs, function(readPrefs) { // resolve(readPrefs); // }); // } // }); // }; // #endif // #if !(FIREFOX || MOZCENTRAL || CHROME) Preferences._writeToStorage = function (prefObj) { return new Promise((resolve) => { localStorage.setItem('pdfjs.preferences', JSON.stringify(prefObj)); resolve(); }); }; Preferences._readFromStorage = function (prefObj) { return new Promise((resolve) => { const readPrefs = JSON.parse(localStorage.getItem('pdfjs.preferences')); resolve(readPrefs); }); }; // #endif
module.exports = { ZH_CN: { required: '必填', mobile: '请输入正确的手机号码', max: (len) => '上限 '+ len + ' 位。', min: (len) => '至少 '+ len + ' 位。', between (range) { range = range.split('-'); return '大于 ' + range[0] + ' 且小于 ' + range[1] }, nospace: '含有空格', smsCode: '请输入6位数字验证码' }, EN: { required: 'please required', mobile: 'mobile error', max: (len) => 'more than ' + len + ' 。', min: (len) => 'less tan ' + len + ' 。', between(range) { range = range.split('-'); return 'more than ' + range[0] + ' and less than ' + range[1] }, nospace: 'has space', smsCode: 'smsCode’s length mast 6' } }
import {adapt} from '@cycle/run/lib/adapt'; import xs from 'xstream'; /* Source Driver: Apps Pool Factory function to interface with a passed state option array which will keep track of all apps. */ function makeAppsPoolDriver(appsPool) { function poolDriver(outgoing$) { const appsPool$ = xs.createWithMemory(appsPool); return adapt(appsPool$); } return poolDriver; } export { makeAppsPoolDriver };
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = tslib_1.__importStar(require("react")); var styled_icon_1 = require("@styled-icons/styled-icon"); exports.LineWeight = React.forwardRef(function (props, ref) { var attrs = { "fill": "currentColor", "xmlns": "http://www.w3.org/2000/svg", }; return (React.createElement(styled_icon_1.StyledIconBase, tslib_1.__assign({ iconAttrs: attrs, iconVerticalAlign: "middle", iconViewBox: "0 0 24 24" }, props, { ref: ref }), React.createElement("path", { fill: "none", d: "M0 0h24v24H0z", key: "k0" }), React.createElement("path", { d: "M3 17h18v-2H3v2zm0 3h18v-1H3v1zm0-7h18v-3H3v3zm0-9v4h18V4H3z", key: "k1" }))); }); exports.LineWeight.displayName = 'LineWeight'; exports.LineWeightDimensions = { height: 24, width: 24 };
import { getWordsList } from '../../utils/string.js' const getMessage = function({ value, suggestions }) { const protocols = getWordsList(suggestions, { op: 'or' }) return `Protocol ${value} is invalid: it should be ${protocols}` } // Extra: // - value STR // - suggestions STR_ARR export const METHOD = { status: 'CLIENT_ERROR', title: 'The protocol method is invalid', getMessage, }
// @flow import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme'; import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles'; import { HANGUP_BUTTON_SIZE } from '../../constants'; // Toolbox, toolbar: /** * The style of toolbar buttons. */ const toolbarButton = { backgroundColor: schemeColor('button'), borderRadius: 20, borderWidth: 0, flex: 0, flexDirection: 'row', height: 40, justifyContent: 'center', // XXX We probably tested BoxModel.margin and discovered it to be too small // for our taste. marginHorizontal: 7, width: 40 }; /** * The icon style of the toolbar buttons. */ const toolbarButtonIcon = { alignSelf: 'center', color: ColorPalette.darkGrey, fontSize: 22 }; /** * The style of toolbar buttons which display white icons. */ const whiteToolbarButton = { ...toolbarButton, backgroundColor: schemeColor('buttonToggled') }; /** * The icon style of toolbar buttons which display white icons. */ const whiteToolbarButtonIcon = { ...toolbarButtonIcon, color: ColorPalette.white }; /** * The Toolbox and toolbar related styles. */ const styles = createStyleSheet({ /** * The style of the toolbar. */ toolbar: { alignItems: 'center', flexDirection: 'row', flexGrow: 0, justifyContent: 'center', marginBottom: BoxModel.margin / 2, paddingHorizontal: BoxModel.margin }, /** * The style of the root/top-level {@link Container} of {@link Toolbox}. */ toolbox: { flexDirection: 'column', flexGrow: 0 } }); export default styles; /** * Color schemed styles for the @{Toolbox} component. */ ColorSchemeRegistry.register('Toolbox', { /** * Styles for buttons in the toolbar. */ buttonStyles: { iconStyle: toolbarButtonIcon, style: toolbarButton }, /** * Overrides to the standard styles that we apply to the chat button, as * that behaves slightly differently to other buttons. */ chatButtonOverride: { toggled: { backgroundColor: ColorPalette.blue } }, hangupButtonStyles: { iconStyle: whiteToolbarButtonIcon, style: { ...toolbarButton, backgroundColor: schemeColor('hangup'), borderRadius: HANGUP_BUTTON_SIZE / 2, height: HANGUP_BUTTON_SIZE, width: HANGUP_BUTTON_SIZE }, underlayColor: ColorPalette.buttonUnderlay }, /** * Styles for toggled buttons in the toolbar. */ toggledButtonStyles: { iconStyle: whiteToolbarButtonIcon, style: { ...whiteToolbarButton, borderColor: schemeColor('buttonToggledBorder'), borderWidth: 1 } } });
/* global describe it */ var djcertLib = require('../index') var chai = require('chai') var assert = chai.assert var bitcoreLib = djcertLib.bitcoreLib describe('djcert lib test', function () { this.timeout(9000) it('should be ok with bitcore lib PrivateKey()', function () { var key = new bitcoreLib.PrivateKey() assert.ok(key) }) })
#!/usr/bin/env node require('gingerhq-dump');
const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = { entry: path.join(__dirname, "src/docs"), output: { path: path.join(__dirname, "docs"), filename: "bundle.js" }, module: { rules: [ { test: /\.(js|jsx)$/, use: "babel-loader", exclude: /node_modules/ }, { test: /\.scss$/, use: ["style-loader", "css-loader", "sass-loader"] } ] }, plugins: [ new HtmlWebpackPlugin({ template: path.join(__dirname, "src/docs/index.html") }) ], resolve: { extensions: [".js", ".jsx"] }, devServer: { contentBase: path.join(__dirname, "docs"), port: 8000, stats: "minimal" } };
!function(a){const e=a["pt-br"]=a["pt-br"]||{};e.dictionary=Object.assign(e.dictionary||{},{"*Change to:* %0":"*Alterar para:* %0","*Check item*":"*Verificar item*","*Format:* %0":"*Formatar:* %0","*Indent:* %0":"*Identar:* %0","*Insert:* %0":"*Inserir:* %0","*Merge cells*":"*Mesclar células*","*Merge:* %0":"*Mesclar:* %0","*Outdent:* %0":"*Recuar:* %0","*Remove all formatting*":"Remover toda formatação","*Remove format:* %0":"*Remover formatação:* %0","*Remove highlight*":"","*Remove image text alternative*":"*Remover texto alternativo da imagem*","*Remove link*":"*Remover link*","*Remove:* %0":"*Remover:* %0","*Replace table cells*":"*Substituir células da tabela*","*Reset font background color*":"*Redefinir cor de fundo da fonte*","*Reset font color*":"*Redefinir cor da fonte*","*Reset font family*":"*Redefinir tipo da fonte*","*Reset font size*":"*Redefinir tamanho da fonte*","*Reset image width*":"*Redefinir largura da imagem*","*Set font background color:* %0":"*Definir cor de fundo da fonte:* %0","*Set font color:* %0":"*Definir cor da fonte:* %0","*Set font family:* %0":"*Definir tipo da fonte:* %0","*Set font size:* %0":"*Definir tamanho da fonte:* %0","*Set highlight:* %0":"","*Set image text alternative:* %0":"*Definir texto alternativo da imagem:* %0","*Set image width:* %0":"*Definir largura da imagem:* %0","*Set link:* %0":"*Definir link:* %0","*Split cell:* horizontally":"*Dividir célula:* horizontalmente","*Split cell:* vertically":"*Dividir célula:* verticalmente","*Split:* %0":"*Dividir:* %0","*Uncheck item*":"*Desmarcar item*","%0 of %1":"%0 de %1","Accept all selected suggestions":"Aceitar todas as sugestões selecionadas","Accept all suggestions":"Aceitar todas as sugestões","Accept suggestion":"Aceitar sugestão","Align cell text to the bottom":"Alinhar texto da célula para baixo","Align cell text to the center":"Alinhar texto da célula centralizado","Align cell text to the left":"Alinhar texto da célula para a esquerda","Align cell text to the middle":"Alinhar texto da célula para o meio","Align cell text to the right":"Alinhar texto da célula para a direita","Align cell text to the top":"Alinhar texto da célula para o topo","Align center":"Centralizar","Align left":"Alinhar à esquerda","Align right":"Alinhar à direita","Align table to the left":"Alinhar tabela para esquerda","Align table to the right":"Alinhar tabela para direita",Alignment:"Alinhamento","Almost equal to":"Quase igual a",Angle:"Ângulo",Anonymous:"Anônimo","Approximately equal to":"Aproximadamente igual a",Aquamarine:"Água-marinha","Are you sure?":"Você tem certeza?","Asterisk operator":"Operador asterisco","Austral sign":"Símbolo de Austral","back with leftwards arrow above":"volta com a seta esquerda acima",Background:"Cor de fundo",Big:"Grande","Bitcoin sign":"Símbolo do Bitcoin",Black:"Preto","Block quote":"Bloco de citação",Blue:"Azul","Blue marker":"Marcador azul",Bold:"Negrito",Border:"Borda","Break text":"Quebrar texto","Bulleted List":"Lista com marcadores","Bulleted list styles toolbar":"Barra de ferramentas de estilos de lista com marcador",Cancel:"Cancelar","Cedi sign":"Símbolo de Cedi","Cell properties":"Propriedades da célula","Cent sign":"Símbolo de Centavo","Center table":"Centralizar tabela","Centered image":"Imagem centralizada","Change image text alternative":"Alterar texto alternativo da imagem","Character categories":"Categoria de caracteres","Characters: %0":"Caracteres: %0","Choose heading":"Escolha o título","Choose language":"Escolher idioma",Circle:"Círculo",Code:"Código","Colon sign":"Sinal de dois pontos",Color:"Cor","Color picker":"Seletor de cor",Column:"Coluna",Comment:"Comentário","Comment editor":"Editar comentário","Contains as member":"Contém como membro","Copyright sign":"Símbolo de direitos reservados","Cruzeiro sign":"Símbolo do Cruzeiro","Currency sign":"Símbolo de moeda",Dashed:"Tracejada",Decimal:"Decimal","Decimal with leading zero":"Decimal com zero à esquerda","Decrease indent":"Diminuir indentação",Default:"Padrão","Degree sign":"Sinal de grau","Delete column":"Excluir coluna","Delete comment thread?":"Excluir segmento de comentários?","Delete comment?":"Excluir comentário?","Delete row":"Excluir linha","Dim grey":"Cinza escuro",Dimensions:"Dimensões","Disable editing":"Desabilitar edição",Disc:"Disco","Discard all selected suggestions":"Descartar todas as sugestões selecionadas","Discard all suggestions":"Descartar todas as sugestões","Discard suggestion":"Descartar sugestão","Division sign":"Sinal de divisão","Document colors":"Cores do documento","Dollar sign":"Símbolo do dólar","Dong sign":"Símbolo do Dong",Dotted:"Pontilhada",Double:"Dupla","Double dagger":"Adaga dupla","Double exclamation mark":"Sinal do ponto de exclamação duplo","Double low-9 quotation mark":"Aspas duplas baixas simples","Double question mark":"Ponto de interrogação duplo",Downloadable:"Pode ser baixado","downwards arrow to bar":"seta para baixo para barra","downwards dashed arrow":"Seta tracejada para baixo","downwards double arrow":"Seta dupla para baixo","Drachma sign":"Sinal de Dracma","Dropdown toolbar":"Barra de Ferramentas da Lista Suspensa",Edit:"Editar","Edit block":"Editor de bloco","Edit link":"Editar link","Edit source":"Editar código","Editor toolbar":"Ferramentas do Editor","Element of":"Elemento de",ELEMENT_BLOCK_QUOTE:"bloco de código",ELEMENT_BULLETED_LIST:"lista com marcadores",ELEMENT_CAPTION:"legenda",ELEMENT_CODE_BLOCK:["bloco de código","%0 bloco de código"],ELEMENT_HEADING:["título (nível %1)","%0 títulos (nível %1)"],ELEMENT_HEADING_CUSTOM:["título (%1)","%0 títulos (%1)"],ELEMENT_HORIZONTAL_LINE:["linha horizontal","%0 linhas horizontal"],ELEMENT_IMAGE:["imagem","%0 imagens"],ELEMENT_INLINE_IMAGE:["imagem","%0 imagens"],ELEMENT_LINE_BREAK:["quebra de linha","%0 quebras de linha"],ELEMENT_LIST_ITEM:["item da lista","%0 itens da lista"],ELEMENT_MEDIA:["item de mídia","%0 itens de mídia"],ELEMENT_NUMBERED_LIST:"lista numerada",ELEMENT_PAGE_BREAK:["quebra de página","%0 quebras de página"],ELEMENT_PARAGRAPH:["parágrafo","%0 parágrafos"],ELEMENT_SPACE:["espaço","%0 espaços"],ELEMENT_TABLE:["tabela","%0 tabelas"],ELEMENT_TABLE_COLUMN:["coluna de tabela","%0 colunas de tabela"],ELEMENT_TABLE_COLUMN_WITH_TEXT:["coluna de tabela *com texto* %1","%0 colunas de tabela *com texto* %1"],ELEMENT_TABLE_ROW:["linha da tabela","%0 linhas da tabela"],ELEMENT_TABLE_ROW_WITH_TEXT:["linha de tabela *com texto* %1","%0 linhas de tabela *com texto* %1"],ELEMENT_TABLE_WITH_TEXT:"tabela *com texto* %0",ELEMENT_TITLE:"título",ELEMENT_TODO_LIST:"lista de tarefas","Em dash":"Travessão","Empty set":"Conjunto vazio","Empty snippet content":"Trecho sem conteúdo","En dash":"Traço","Enable editing":"Habilitar edição","end with leftwards arrow above":"termina com a seta esquerda acima","Enter image caption":"Inserir legenda da imagem","Enter table caption":"Inserir legenda da tabela","Euro sign":"Símbolo do Euro","Euro-currency sign":"Símbolo da Moeda do Euro","Exclamation question mark":"Ponto de exclamação",Find:"Pesquisar","Find and replace":"Pesquisar e substituir","Find in text…":"Pesquisar no texto","Font Background Color":"Cor de Fundo","Font Color":"Cor da Fonte","Font Family":"Fonte","Font Size":"Tamanho da fonte","For all":"Para todos",FORMAT_ALIGN_TO_CENTER:"alinhar ao centro",FORMAT_ALIGN_TO_LEFT:"alinhar à esquerda",FORMAT_ALIGN_TO_RIGHT:"alinhar à direita",FORMAT_BOLD:"negrito",FORMAT_CODE:"código",FORMAT_HEADER_COLUMN:"cabeçalho da coluna",FORMAT_HEADER_ROW:"linha de cabeçalho",FORMAT_HIGHLIGHT:"realçar",FORMAT_ITALIC:"itálico",FORMAT_JUSTIFY_TEXT:"justificar",FORMAT_REGULAR_COLUMN:"coluna regular",FORMAT_REGULAR_ROW:"linha regular",FORMAT_RESTRICTED_DISABLED:"*Desabilitar edição em modo restrito*",FORMAT_RESTRICTED_ENABLED:"*Habilitar edição em modo restrito*",FORMAT_SIDE_IMAGE:"imagem lateral",FORMAT_STRIKETHROUGH:"tachado",FORMAT_SUBSCRIPT:"subscrito",FORMAT_SUPERSCRIPT:"sobrescrito",FORMAT_UNDERLINE:"sublinhado","Fraction slash":"Barra de fração","French franc sign":"Símbolo do Franco Francês","Full size image":"Imagem completa","German penny sign":"Símbolo do Centavo Alemão","Greater-than or equal to":"Maior que ou igual a","Greater-than sign":"Sinal maior que",Green:"Verde","Green marker":"Marcador verde","Green pen":"Caneta verde",Grey:"Cinza",Groove:"Ranhura","Guarani sign":"Símbolo de Guarani","Header column":"Coluna de cabeçalho","Header row":"Linha de cabeçalho",Heading:"Titulo","Heading 1":"Título 1","Heading 2":"Título 2","Heading 3":"Título 3","Heading 4":"Título 4","Heading 5":"Título 5","Heading 6":"Título 6",Height:"Altura",Highlight:"Realce","Horizontal ellipsis":"Elipse horizontal","Horizontal line":"Linha horizontal","Horizontal text alignment toolbar":"Ferramentas de alinhamento horizontal do texto","Hryvnia sign":"Símbolo de Hryvnia","HTML object":"Objeto HTML","HTML snippet":"Trecho HTML",Huge:"Gigante","Identical to":"Idêntico a","Image resize list":"Lista de redimensionamento de imagem","Image toolbar":"Ferramentas de Imagem","image widget":"Ferramenta de imagem","In line":"Na linha","Increase indent":"Aumentar indentação","Indian rupee sign":"Símbolo da Rupia Indiana",Infinity:"Infinito",Insert:"Inserir","Insert code block":"Inserir bloco de código","Insert column left":"Inserir coluna à esquerda","Insert column right":"Inserir coluna à direita","Insert HTML":"Inserir HTML","Insert image":"Inserir imagem","Insert image via URL":"Inserir imagem via URL","Insert media":"Inserir mídia","Insert paragraph after block":"Inserir parágrafo após o bloco","Insert paragraph before block":"Inserir parágrafo antes do bloco","Insert row above":"Inserir linha acima","Insert row below":"Inserir linha abaixo","Insert table":"Inserir tabela",Inset:"Baixo relevo",Integral:"Integral",Intersection:"Interseção","Inverted exclamation mark":"Ponto de exclamação invertido","Inverted question mark":"Ponto de interrogação invertido",Italic:"Itálico",Justify:"Justificar","Justify cell text":"Justificar texto da célula","Kip sign":"Símbolo do Kip",Language:"Idioma","Latin capital letter a with breve":"Símbolo latim maiúsculo A com breve","Latin capital letter a with macron":"Símbolo latim maiúsculo A com macron","Latin capital letter a with ogonek":"Símbolo latim maiúsculo A com ogonek","Latin capital letter c with acute":"Símbolo latim maiúsculo C com acento agudo","Latin capital letter c with caron":"Símbolo latim maiúsculo C com caron","Latin capital letter c with circumflex":"Símbolo latim maiúsculo C com acento circunflexo","Latin capital letter c with dot above":"Símbolo latim maiúsculo C com ponto acima","Latin capital letter d with caron":"Símbolo latim maiúsculo D com caron","Latin capital letter d with stroke":"Símbolo latin maiúsculo D com um traçado vertical","Latin capital letter e with breve":"Símbolo latim maiúsculo E com breve","Latin capital letter e with caron":"Símbolo latim maiúsculo E com caron","Latin capital letter e with dot above":"Símbolo latim maiúsculo E com ponto acima","Latin capital letter e with macron":"Símbolo latim maiúsculo E com macron","Latin capital letter e with ogonek":"Símbolo latim maiúsculo E com ogonek","Latin capital letter eng":"Símbolo latim maiúsculo Eng","Latin capital letter g with breve":"Símbolo latim maiúsculo G com breve","Latin capital letter g with cedilla":"Símbolo latim maiúsculo G com cedilha","Latin capital letter g with circumflex":"Símbolo latim maiúsculo G com acento circunflexo","Latin capital letter g with dot above":"Símbolo latim maiúsculo G com ponto acima","Latin capital letter h with circumflex":"Símbolo latim maiúsculo H com acento circunflexo","Latin capital letter h with stroke":"Símbolo latin maiúsculo H com um traçado vertical","Latin capital letter i with breve":"Símbolo latim maiúsculo I com breve","Latin capital letter i with dot above":"Símbolo latim maiúsculo I com ponto acima","Latin capital letter i with macron":"Símbolo latim maiúsculo I com macron","Latin capital letter i with ogonek":"Símbolo latim maiúsculo I com ogonek","Latin capital letter i with tilde":"Símbolo latim maiúsculo I com til","Latin capital letter j with circumflex":"Símbolo latim maiúsculo J com acento circunflexo","Latin capital letter k with cedilla":"Símbolo latim maiúsculo K com cedilha","Latin capital letter l with acute":"Símbolo latim maiúsculo l com acento agudo","Latin capital letter l with caron":"Símbolo latim maiúsculo I com caron","Latin capital letter l with cedilla":"Símbolo latim maiúsculo L com cedilha","Latin capital letter l with middle dot":"Símbolo latin maiúsculo L com ponto no meio","Latin capital letter l with stroke":"Símbolo latin maiúsculo L com um traçado vertical","Latin capital letter n with acute":"Símbolo latim maiúsculo N com acento agudo","Latin capital letter n with caron":"Símbolo latim maiúsculo N com caron","Latin capital letter n with cedilla":"Símbolo latim maiúsculo N com cedilha","Latin capital letter o with breve":"Símbolo latim maiúsculo O com breve","Latin capital letter o with double acute":"Símbolo latim maiúsculo O com acento agudo duplo","Latin capital letter o with macron":"Símbolo latim maiúsculo I com macron","Latin capital letter r with acute":"Símbolo latim maiúsculo R com acento agudo","Latin capital letter r with caron":"Símbolo latim maiúsculo R com caron","Latin capital letter r with cedilla":"Símbolo latim maiúsculo R com cedilha","Latin capital letter s with acute":"Símbolo latim maiúsculo S com acento agudo","Latin capital letter s with caron":"Símbolo latim maiúsculo S com caron","Latin capital letter s with cedilla":"Símbolo latim maiúsculo S com cedilha","Latin capital letter s with circumflex":"Símbolo latim maiúsculo S com acento circunflexo","Latin capital letter t with caron":"Símbolo latim maiúsculo T com caron","Latin capital letter t with cedilla":"Símbolo latim maiúsculo T com cedilha","Latin capital letter t with stroke":"Símbolo latin maiúsculo T com um traçado vertical","Latin capital letter u with breve":"Símbolo latim maiúsculo U com breve","Latin capital letter u with double acute":"Símbolo latim maiúsculo U com acento agudo duplo","Latin capital letter u with macron":"Símbolo latim maiúsculo I com macron","Latin capital letter u with ogonek":"Símbolo latim maiúsculo U com ogonek","Latin capital letter u with ring above":"Símbolo latim maiúsculo U com anel acima","Latin capital letter u with tilde":"Símbolo latim maiúsculo U com til","Latin capital letter w with circumflex":"Símbolo latim maiúsculo W com acento circunflexo","Latin capital letter y with circumflex":"Símbolo latim maiúsculo Y com acento circunflexo","Latin capital letter y with diaeresis":"Símbolo latim maiúsculo Z com trema","Latin capital letter z with acute":"Símbolo latim maiúsculo Z com acento agudo","Latin capital letter z with caron":"Símbolo latim maiúsculo Z com caron","Latin capital letter z with dot above":"Símbolo latim maiúsculo Z com ponto acima","Latin capital ligature ij":"Símbolo latin maiúsculo ligadura IJ","Latin capital ligature oe":"Símbolo latin maiúsculo ligadura OE","Latin small letter a with breve":"Símbolo latim minúsculo A com breve","Latin small letter a with macron":"Símbolo latim minúsculo A com macron","Latin small letter a with ogonek":"Símbolo latim minúsculo A com ogonek","Latin small letter c with acute":"Símbolo latim minúsculo C com acento agudo","Latin small letter c with caron":"Símbolo latim minúsculo C com caron","Latin small letter c with circumflex":"Símbolo latim minúsculo C com acento circunflexo","Latin small letter c with dot above":"Símbolo latim minúsculo C com ponto acima","Latin small letter d with caron":"Símbolo latim minúsculo D com caron","Latin small letter d with stroke":"Símbolo latin minúsculo D com um traçado vertical","Latin small letter dotless i":"Símbolo latin sem ponto I","Latin small letter e with breve":"Símbolo latim minúsculo E com breve","Latin small letter e with caron":"Símbolo latim minúsculo E com caron","Latin small letter e with dot above":"Símbolo latim minúsculo E com ponto acima","Latin small letter e with macron":"Símbolo latim minúsculo E com macron","Latin small letter e with ogonek":"Símbolo latim minúsculo E com ogonek","Latin small letter eng":"Símbolo latim minúsculo Eng","Latin small letter f with hook":"Símbolo latim minúsculo F com gancho","Latin small letter g with breve":"Símbolo latim minúsculo G com breve","Latin small letter g with cedilla":"Símbolo latim minúsculo G com cedilha","Latin small letter g with circumflex":"Símbolo latim minúsculo G com acento circunflexo","Latin small letter g with dot above":"Símbolo latim minúsculo G com ponto acima","Latin small letter h with circumflex":"Símbolo latim minúsculo H com acento circunflexo","Latin small letter h with stroke":"Símbolo latin minúsculo H com um traçado vertical","Latin small letter i with breve":"Símbolo latim minúsculo I com breve","Latin small letter i with macron":"Símbolo latim minúsculo I com macron","Latin small letter i with ogonek":"Símbolo latim minúsculo I com ogonek","Latin small letter i with tilde":"Símbolo latim minúsculo I com til","Latin small letter j with circumflex":"Símbolo latim minúsculo J com acento circunflexo","Latin small letter k with cedilla":"Símbolo latim minúsculo K com cedilha","Latin small letter kra":"Símbolo latin minúsculo K","Latin small letter l with acute":"Símbolo latim minúsculo I com acento agudo","Latin small letter l with caron":"Símbolo latim minúsculo I com caron","Latin small letter l with cedilla":"Símbolo latim minúsculo L com cedilha","Latin small letter l with middle dot":"Símbolo latin minúsculo L com ponto no meio","Latin small letter l with stroke":"Símbolo latin minúsculo L com um traçado vertical","Latin small letter long s":"Símbolo latim minúsculo long s","Latin small letter n preceded by apostrophe":"Símbolo latim minúsculo N precedido por apóstrofe","Latin small letter n with acute":"Símbolo latim minúsculo N com acento agudo","Latin small letter n with caron":"Símbolo latim minúsculo N com caron","Latin small letter n with cedilla":"Símbolo latim minúsculo N com cedilha","Latin small letter o with breve":"Símbolo latim minúsculo O com breve","Latin small letter o with double acute":"Símbolo latim minúsculo O com acento agudo duplo","Latin small letter o with macron":"Símbolo latim minúsculo O com macron","Latin small letter r with acute":"Símbolo latim minúsculo R com acento agudo","Latin small letter r with caron":"Símbolo latim minúsculo R com caron","Latin small letter r with cedilla":"Símbolo latim minúsculo R com cedilha","Latin small letter s with acute":"Símbolo latim minúsculo S com acento agudo","Latin small letter s with caron":"Símbolo latim minúsculo S com caron","Latin small letter s with cedilla":"Símbolo latim minúsculo S com cedilha","Latin small letter s with circumflex":"Símbolo latim minúsculo S com acento circunflexo","Latin small letter t with caron":"Símbolo latim minúsculo T com caron","Latin small letter t with cedilla":"Símbolo latim minúsculo T com cedilha","Latin small letter t with stroke":"Símbolo latin minúsculo T com um traçado vertical","Latin small letter u with breve":"Símbolo latim minúsculo U com breve","Latin small letter u with double acute":"Símbolo latim minúsculo U com acento agudo","Latin small letter u with macron":"Símbolo latim minúsculo U com macron","Latin small letter u with ogonek":"Símbolo latim minúsculo U com ogonek","Latin small letter u with ring above":"Símbolo latim minúsculo U com anel acima","Latin small letter u with tilde":"Símbolo latim minúsculo U com til","Latin small letter w with circumflex":"Símbolo latim minúsculo W com acento circunflexo","Latin small letter y with circumflex":"Símbolo latim minúsculo Y com acento circunflexo","Latin small letter z with acute":"Símbolo latim minúsculo Z com acento agudo","Latin small letter z with caron":"Símbolo latim minúsculo Z com caron","Latin small letter z with dot above":"Símbolo latim minúsculo Z com ponto acima","Latin small ligature ij":"Símbolo latin minúsculo ligadura IJ","Latin small ligature oe":"Símbolo latin minúsculo ligadura OE","Left aligned image":"Imagem alinhada à esquerda","Left double quotation mark":"Aspas dupla esquerda","Left single quotation mark":"Aspas simples esquerda","Left-pointing double angle quotation mark":"Aspas angulares duplas esquerda","leftwards arrow to bar":"seta para a esquerda para barra","leftwards dashed arrow":"Seta tracejada para esquerda","leftwards double arrow":"Seta dupla para esquerda","Less-than or equal to":"Menor que ou igual a","Less-than sign":"Sinal menor que","Light blue":"Azul claro","Light green":"Verde claro","Light grey":"Cinza claro",Link:"Link","Link image":"Link da imagem","Link URL":"URL","Lira sign":"Símbolo da Lira","Livre tournois sign":"Símbolo de Livre tournois","Logical and":"Operador lógico AND","Logical or":"Operador lógico OR","Lower-latin":"Latim inferior","Lower–roman":"Romano inferior",Macron:"Macron","Manat sign":"Símbolo do Manat","Match case":"Diferenciar maiúsculas de minúsculas","Media toolbar":"Ferramentas de Mídia","Media URL":"URL da mídia","media widget":"Ferramenta de mídia","Merge cell down":"Mesclar abaixo","Merge cell left":"Mesclar à esquerda","Merge cell right":"Mesclar à direita","Merge cell up":"Mesclar acima","Merge cells":"Mesclar células","Mill sign":"Símbolo de Mill","Minus sign":"Sinal de menos","Multiplication sign":"Sinal de multiplicação","N-ary product":"Símbolo Produto N-ário","N-ary summation":"Somatório",Nabla:"Nabla","Naira sign":"Símbolo de Naira","New sheqel sign":"Símbolo do Novo Sheqel",Next:"Próximo","Next result":"Próxima ocorrência",No:"Não","No preview available":"Nenhuma visualização disponível",None:"Sem borda","Nordic mark sign":"Símbolo da Marca Nórdica","Not an element of":"Não é um elemento de","Not equal to":"Diferente de","Not sign":"Sinal de não",NUMBER_OF_COMMENTS:["%0 Comentários","%0 Comentários"],"Numbered List":"Lista numerada","Numbered list styles toolbar":"Barra de ferramentas de estilos de lista numerada","on with exclamation mark with left right arrow above":"com ponto de exclamação com a seta esquerda direita acima","Open in a new tab":"Abrir em nova aba","Open link in new tab":"Abrir link em nova aba",Orange:"Laranja",Original:"Original",Outset:"Alto relevo",Overline:"Sobrepor",Padding:"Margem interna","Page break":"Quebra de página",Paragraph:"Parágrafo","Paragraph sign":"Símbolo de parágrafo","Partial differential":"Diferencial parcial","Paste raw HTML here...":"Cole o HTML puro aqui","Paste the media URL in the input.":"Cole o endereço da mídia no campo.",PENDING_ACTION_COMMENT_THREAD:"Alteração não salva no segmento de comentários.",PENDING_ACTION_SUGGESTION:"Alteração não salva na sugestão.","Per mille sign":"Símbolo de por 1 mil","Per ten thousand sign":"Símbolo de por 10 mil","Peseta sign":"Símbolo de Peseta","Peso sign":"Sinal de Peso","Pink marker":"Marcador rosa","Plain text":"Texto sem formatação","Plus-minus sign":"Sinal de mais ou menos","Pound sign":"Símbolo de Libra",Previous:"Anterior","Previous result":"Ocorrência anterior","Proportional to":"Proporcional a",Purple:"Púrpura","Question exclamation mark":"Ponto de interrogação",Red:"Vermelho","Red pen":"Caneta vermelha",Redo:"Refazer","Registered sign":"Símbolo de registrado",Remove:"Remover","Remove color":"Remover cor","Remove Format":"Remover Formatação","Remove highlight":"Remover realce","Remove language":"Remover idioma",Replace:"Substituir","Replace all":"Substituir tudo","Replace with…":"Substituir por...",REPLACE_TEXT:"*Substituir:* %0 *com* %1","Reply...":"Responder...","Resize image":"Redimensionar imagem","Resize image to %0":"Redimensionar a imagem para 0%","Resize image to the original size":"Redimensionar a imagem para o tamanho original","Restore default":"Restaurar padrão","Reversed paragraph sign":"Símbolo de parágrafo reverso","Rich Text Editor":"Editor de Formatação","Rich Text Editor, %0":"Editor de Formatação, %0",Ridge:"Crista","Right aligned image":"Imagem alinhada à direita","Right double quotation mark":"Aspas dupla direita","Right single quotation mark":"Aspas simples direita","Right-pointing double angle quotation mark":"Aspas angulares duplas direita","rightwards arrow to bar":"seta para a direita para barra","rightwards dashed arrow":"Seta tracejada para direita","rightwards double arrow":"Seta dupla para direita",Row:"Linha","Ruble sign":"Símbolo do Rublo Russo","Rupee sign":"Símbolo da Rupia",Save:"Salvar","Save changes":"Salvar alterações","Saving changes":"Salvando alterações","Section sign":"Símbolo de seleção","Select all":"Selecionar tudo","Select column":"Selecionar coluna","Select row":"Selecionar linha","Show more items":"Exibir mais itens","Show options":"Mostrar opções","Side image":"Imagem lateral","Single left-pointing angle quotation mark":"Aspas angulares simples esquerda","Single low-9 quotation mark":"Aspas baixas simples","Single right-pointing angle quotation mark":"Aspas angulares simples direita",Small:"Pequeno",Solid:"Sólida","soon with rightwards arrow above":"Símbolo soon com a seta para a direita acima","Special characters":"Caracteres especiais","Spesmilo sign":"Símbolo do Spesmilo","Split cell horizontally":"Dividir horizontalmente","Split cell vertically":"Dividir verticalmente",Square:"Quadrado","Square root":"Raiz quadrada",Strikethrough:"Tachado",Style:"Estilo",Submit:"Enviar",Subscript:"Subscrito",Superscript:"Sobrescrito","Table alignment toolbar":"Ferramentas de alinhamento da tabela","Table cell text alignment":"Alinhamento do texto na célula","Table properties":"Propriedades da tabela","Table toolbar":"Ferramentas de Tabela","Tenge sign":"Símbolo do Tenge","Text alignment":"Alinhamento do texto","Text alignment toolbar":"Ferramentas de alinhamento de texto","Text alternative":"Texto alternativo","Text highlight toolbar":"Ferramentas de realce","Text to find must not be empty.":"Texto a ser pesquisado não pode ser vazio.",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'Cor inválida. Tente "#FF0000" ou "rgb(255,0,0)" ou "red"',"The URL must not be empty.":"A URL não pode ficar em branco.",'The value is invalid. Try "10px" or "2em" or simply "2".':'Valor inválido. Tente "10px" ou "2em" ou apenas "2"',"There exists":"Existe","This link has no URL":"Este link não possui uma URL","This media URL is not supported.":"A URL desta mídia não é suportada.","Tilde operator":"Operador til",Tiny:"Minúsculo","Tip: Find some text first in order to replace it.":"Dica: Pesquise por algum texto antes para poder substituí-la.","Tip: Paste the URL into the content to embed faster.":"Cole o endereço dentro do conteúdo para embutir mais rapidamente.","To-do List":"Lista de Tarefas","Toggle caption off":"Desabilitar legenda","Toggle caption on":"Habilitar legenda","Toggle the circle list style":"Alternar o estilo da lista de círculo","Toggle the decimal list style":"Alternar o estilo de lista decimal","Toggle the decimal with leading zero list style":"Alternar o decimal com estilo de lista zero à esquerda","Toggle the disc list style":"Alternar o estilo da lista de disco","Toggle the lower–latin list style":"Alternar o estilo de lista latina inferior","Toggle the lower–roman list style":"Alternar o estilo de lista romana inferior","Toggle the square list style":"Alternar o estilo de lista quadrada","Toggle the upper–latin list style":"Alternar o estilo de lista latino superior","Toggle the upper–roman list style":"Alternar o estilo de lista romana superior",TOO_LONG_COMMENT_ALERT:"O conteúdo do comentário é muito longo. Seu comentário possui %0 caracteres, mas o limite é de %1 caracteres.","top with upwards arrow above":"Símbolo topo com a seta para cima acima","Track changes":"Acompanhar alterações","Trade mark sign":"Símbolo de marca registrada","Tugrik sign":"Símbolo de Tugrik","Turkish lira sign":"Símbolo da Lira Turca",Turquoise:"Turquesa","Two dot leader":"Dois pontos",Underline:"Sublinhado",Undo:"Desfazer",Union:"União",Unlink:"Remover link","up down arrow with base":"seta para baixo com base",Update:"Atualizar","Update image URL":"Atualizar URL da imagem","Upload failed":"Falha ao subir arquivo","Upload in progress":"Enviando dados","Upper-latin":"Latim superior","Upper-roman":"Romano superior","upwards arrow to bar":"seta para cima para barra","upwards dashed arrow":"Seta tracejada para cima","upwards double arrow":"Seta dupla para cima","Vertical text alignment toolbar":"Ferramentas de alinhamento vertical do texto","Vulgar fraction one half":"Fração um meio","Vulgar fraction one quarter":"Fração um quarto","Vulgar fraction three quarters":"Fração três quartos",White:"Branco","Whole words only":"Apenas palavras inteiras","Widget toolbar":"Ferramentas de Widgets",Width:"Largura","Won sign":"Símbolo do Won","Words: %0":"Palavras: %0","Wrap text":"Texto ao redor","Write a comment...":"Escrever um comentário...",Yellow:"Amarelo","Yellow marker":"Marcador amarelo","Yen sign":"Símbolo do Yen",Yes:"Sim"}),e.getPluralForm=function(a){return a>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
({ /** x = [ 1, 2,, 3, ] **/ 'array literal with holes and trailing comma': { type: 'Script', start: 0, end: 17, statements: [ { type: 'ExpressionStatement', start: 0, end: 17, expression: { type: 'AssignmentExpression', start: 0, end: 17, operator: '=', left: { type: 'Identifier', start: 0, end: 1, value: 'x', context: 'variable' }, right: { type: 'ArrayLiteral', start: 4, end: 17, elements: [ { type: 'NumberLiteral', start: 6, end: 7, value: 1 }, { type: 'NumberLiteral', start: 9, end: 10, value: 2 }, null, { type: 'NumberLiteral', start: 13, end: 14, value: 3 } ], trailingComma: true } } } ] }, })
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("jquery")); else if(typeof define === 'function' && define.amd) define(["jquery"], factory); else if(typeof exports === 'object') exports["transition"] = factory(require("jquery")); else root["transition"] = factory(root["jQuery"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_2__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(3); /***/ }), /* 1 */, /* 2 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_2__; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; /** * 判断是否支持css transition * by tommyshao <jinhong.shao@frontpay.cn> * 2016-07-19 * * Reference bootstrap.transition.js * http://getbootstrap.com/javascript/#transitions * * API: * ------ * $.support.transition * $(element).one('uiTransitionEnd', fn).emulateTransitionEnd(duration) */ var $ = __webpack_require__(2); // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) // -------------------------------------------- function transitionEnd() { var el = document.createElement('ui'); var transEndEventNames = { WebkitTransition: 'webkitTransitionEnd', MozTransition: 'transitionend', OTransition: 'oTransitionEnd otransitionend', transition: 'transitionend' }; for (var name in transEndEventNames) { if (el.style[name] !== undefined) { return { end: transEndEventNames[name] }; } } return false; // explicit for ie8 ( ._.) } // http://blog.alexmaccaw.com/css-transitions $.fn.emulateTransitionEnd = function (duration) { var called = false; var $el = this; $(this).one('uiTransitionEnd', function () { called = true; }); var callback = function callback() { if (!called) $($el).trigger($.support.transition.end); }; setTimeout(callback, duration); return this; }; $(function () { $.support.transition = transitionEnd(); if (!$.support.transition) return; $.event.special.uiTransitionEnd = { bindType: $.support.transition.end, delegateType: $.support.transition.end, handle: function handle(e) { if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments); } }; }); module.exports = transitionEnd; /***/ }) /******/ ]) }); ; //# sourceMappingURL=transition.js.map
'use strict' /** * Module dependencies */ const home = require('user-home') const config = require('./config') require('shelljs/global') module.exports = function (version) { try { const current = config.get('current') if (current === version) { config.set('current', null) } const dir = `${home}/.nwjs/${version}` rm('-r', dir) } catch (e) { console.log(e.stack) } }
function makeVendorEntry(config) { const packageJson = require('./package.json'); const vendorDependencies = Object.keys(packageJson['dependencies']); const vendorModulesMinusExclusions = vendorDependencies.filter(vendorModule => config.mainModules.indexOf(vendorModule) === -1 && config.modulesToExclude.indexOf(vendorModule) === -1); return vendorModulesMinusExclusions; } exports.makeVendorEntry = makeVendorEntry;
var group__sai__controls = [ [ "ARM_SAI_ABORT_RECEIVE", "group__sai__controls.html#ga2b8d3d85c1e60f137f8c433f319244cb", null ], [ "ARM_SAI_ABORT_SEND", "group__sai__controls.html#gab3ec8ef9e5e5a190bd2131ac8c99a240", null ], [ "ARM_SAI_CONFIGURE_RX", "group__sai__controls.html#gaba3e824e022fe2a5736de5dcbbd3d291", null ], [ "ARM_SAI_CONFIGURE_TX", "group__sai__controls.html#ga14ac7775060e731b26bc5b3acd2f317a", null ], [ "ARM_SAI_CONTROL_RX", "group__sai__controls.html#gaa40390b6dd0df3b140fdc45bb7b1439d", null ], [ "ARM_SAI_CONTROL_TX", "group__sai__controls.html#ga74d7850973c095bb8dbffa880b4af1bc", null ], [ "ARM_SAI_MASK_SLOTS_RX", "group__sai__controls.html#ga84302d372185665852c9ed941c6545e0", null ], [ "ARM_SAI_MASK_SLOTS_TX", "group__sai__controls.html#ga8675b9776189caf4df7d558b3e18fcba", null ] ];
const {MongoClient} = require('mongodb'); const {getUseSharedDBForAllJestWorkersFlag} = require('./helpers'); describe('parallelism: third worker', () => { const uri = global.__MONGO_URI__; let connection; let db; beforeAll(async () => { connection = await MongoClient.connect(uri, { useNewUrlParser: true, useUnifiedTopology: true, }); db = await connection.db(); }); afterAll(async () => { await connection.close(); }); it('should have separate database', async () => { const collection = db.collection('parallelism-test'); await collection.insertMany([{a: 1}, {b: 2}, {c: 3}]); const count = await collection.count({}); if (!getUseSharedDBForAllJestWorkersFlag()) { expect(count).toBe(3); } }); });
import './_mock'; import BoxCastPlayerMetrics from '../src/BoxCastPlayerMetrics'; import Promise from 'bluebird'; describe('BoxCastPlayerMetrics', function () { var broadcast = {id: 1000}; var view = {status: 'live', playlist: 'http://cdn.example.com/all.m3u8'}; var metrics = new BoxCastPlayerMetrics(broadcast, view); metrics._fetch = jest.fn(); metrics._fetch.mockReturnValue(new Promise((res, rej) => res({}))); var player = jest.fn(); it('should default to hitting production metrics server', function() { expect(metrics._baseUrl).toBe('https://metrics.boxcast.com/'); }); it('should restore the viewer ID from localStorage and generate a new view ID for each instance', function() { var metrics2 = new BoxCastPlayerMetrics(broadcast, view); expect(metrics._viewerId).toBe(metrics2._viewerId); expect(metrics._viewId).not.toBe(metrics2._viewId); }); });
"use strict"; var createResource = require("../../lib/create-resource"); var path = require("path"); var sh = require("shelljs"); var rscSrcPackageExportJs = path.join( __dirname, "../../resource/src/_package-export.js" ); var rscTitorrcYml = path.join(__dirname, "../../resource/_.titorrc.yml"); var fxtTitorrcYml = path.join(fxt, ".titorrc.yml"); var fxtTest = path.join(fxt, "test"); var fxtTestFixtureSrcJs = path.join(fxt, "test/fixture/src.js"); var fxtSrcPackageExportJs = path.join(fxt, "src/testPackage.js"); describe("createResource", function () { describe("no file already exists at dstPath", function () { var result; before(function () { minStandup(); result = createResource(".titorrc.yml"); }); it("create file at dstPath", function () { expect(sh.test("-e", fxtTitorrcYml)).to.be.true; }); it("return true", function () { expect(result).to.be.true; }); after(teardown); }); describe("a file already exists at dstPath", function () { var result; before(function () { minStandup(); sh.ShellString("testing").to(fxtTitorrcYml); result = createResource(".titorrc.yml"); }); it("don't replace existing file at dstPath", function () { expect(sh.cat(fxtTitorrcYml).stdout).to.equal("testing"); }); it("return false", function () { expect(result).to.be.false; }); after(teardown); }); describe("pkgExport is undefined", function () { before(function () { minStandup(); createResource(".titorrc.yml"); }); it("don't replace PACKAGE_EXPORT with pkgExport in dst file", function () { expect(sh.grep("export", fxtTitorrcYml).stdout.trim()) .to.equal("export: PACKAGE_EXPORT"); }); after(teardown); }); describe("pkgExport is defined", function () { before(function () { minStandup(); sh.mkdir(fxtTest); createResource("test/fixture/src.js", "testPkg"); }); it("replace PACKAGE_EXPORT with pkgExport in dst file", function () { expect(sh.grep("testPkg", fxtTestFixtureSrcJs).stdout.trim()) .to.equal("global.testPkg = require(\"../../src/test-pkg\");"); }); it("replace PACKAGE_FILE with decamelized pkgExport in dst", function () { expect(sh.grep("test-pkg", fxtTestFixtureSrcJs).stdout.trim()) .to.equal("global.testPkg = require(\"../../src/test-pkg\");"); }); after(teardown); }); describe("srcPath is undefined", function () { before(function () { minStandup(); createResource(".titorrc.yml"); }); it("copy src file from default path to dstPath", function () { expect(sh.cat(fxtTitorrcYml).stdout) .to.equal(sh.cat(rscTitorrcYml).stdout); }); after(teardown); }); describe("srcPath is defined", function () { before(function () { minStandup(); createResource("src/testPackage.js", undefined, rscSrcPackageExportJs); }); it("copy src file from srcPath to dstPath", function () { expect(sh.cat(fxtSrcPackageExportJs).stdout) .to.equal(sh.cat(rscSrcPackageExportJs).stdout); }); after(teardown); }); });
/** * Created by tangwei on 17/8/25. */ import Vue from 'vue' import BoxManager from './BoxManager.vue' BoxManager.newInstance = properties => { const _props = properties || {} const Instance = new Vue({ data: _props, i18n: _props.i18n, render (h) { return h(BoxManager, { props: _props }) } }) const component = Instance.$mount() document.body.appendChild(component.$el) const notification = Instance.$children[0] return { notice (noticeProps) { notification.add(noticeProps) }, remove (name) { notification.close(name) }, component: notification, destroy (classname) { notification.closeAll() setTimeout(function () { document.body.removeChild(document.getElementsByClassName(classname)[0]) }, 500) } } } export default BoxManager
var Task1; (function (Task1) { function processInput(inputStr) { const lineArray = inputStr.split("\n"); let lineArraySorted = lineArray.sort((a, b) => { let aDate = parseDate(a); let bDate = parseDate(b); if (aDate > bDate) { return 1; } if (aDate < bDate) { return -1; } return 0; }); let guardSummary = {}; let currentGuardId; let currentGuardSleepStart; let currentGuardSleepEnd; lineArraySorted.forEach(line => { if (line.indexOf("Guard") > -1) { currentGuardId = parseInt(line.slice(line.indexOf("#") + 1, line.indexOf(" begins"))); if (!guardSummary[currentGuardId]) { guardSummary[currentGuardId] = {}; } if (!guardSummary[currentGuardId].totalSleepTime) { guardSummary[currentGuardId].totalSleepTime = 0; } if (!guardSummary[currentGuardId].sleepPattern) { guardSummary[currentGuardId].sleepPattern = {}; } } if (line.indexOf("falls asleep") > -1) { currentGuardSleepStart = parseMinutes(line); } if (line.indexOf("wakes up") > -1) { currentGuardSleepEnd = parseMinutes(line); guardSummary[currentGuardId].totalSleepTime += currentGuardSleepEnd - currentGuardSleepStart; for (let x = currentGuardSleepStart; x < currentGuardSleepEnd; x++) { if (guardSummary[currentGuardId].sleepPattern[x]) { guardSummary[currentGuardId].sleepPattern[x]++; } else { guardSummary[currentGuardId].sleepPattern[x] = 1; } } } }); let id; let highestTotalMinutesSleep = 0; let pattern; Object.keys(guardSummary).forEach(key => { if (guardSummary[key].totalSleepTime > highestTotalMinutesSleep) { highestTotalMinutesSleep = guardSummary[key].totalSleepTime; pattern = guardSummary[key].sleepPattern; id = parseInt(key); } }); let highestMinute = 0; let highestMinuteScore = 0; Object.keys(pattern).forEach(key => { if (pattern[key] > highestMinuteScore) { highestMinuteScore = pattern[key]; highestMinute = parseInt(key); } }); return id * highestMinute; } function parseDate(line) { return new Date(line.slice(line.indexOf("[") + 1, line.indexOf("]"))); } function parseMinutes(line) { return parseInt(line.slice(line.indexOf(":") + 1, line.indexOf("]"))); } console.log("Answer:", processInput(`[1518-11-01 00:00] Guard #10 begins shift [1518-11-01 00:05] falls asleep [1518-11-01 00:25] wakes up [1518-11-01 00:30] falls asleep [1518-11-01 00:55] wakes up [1518-11-01 23:58] Guard #99 begins shift [1518-11-02 00:40] falls asleep [1518-11-02 00:50] wakes up [1518-11-03 00:05] Guard #10 begins shift [1518-11-03 00:24] falls asleep [1518-11-03 00:29] wakes up [1518-11-04 00:02] Guard #99 begins shift [1518-11-04 00:36] falls asleep [1518-11-04 00:46] wakes up [1518-11-05 00:03] Guard #99 begins shift [1518-11-05 00:45] falls asleep [1518-11-05 00:55] wakes up`), "Expected:", 240); let fs = require("fs"); let input = fs.readFileSync("./Day_4/input.txt", "utf8"); console.log("Answer:", processInput(input)); })(Task1 || (Task1 = {})); //# sourceMappingURL=task_1.js.map
import B from 'bluebird'; import { fs, util, net, plist } from 'appium-support'; import path from 'path'; import { utils as iosUtils } from 'appium-ios-driver'; import { SubProcess, exec } from 'teen_process'; import xcode from 'appium-xcode'; import _ from 'lodash'; import log from './logger'; import _fs from 'fs'; import url from 'url'; import v8 from 'v8'; import { PLATFORM_NAME_TVOS } from './desired-caps'; const DEFAULT_TIMEOUT_KEY = 'default'; async function detectUdid () { log.debug('Auto-detecting real device udid...'); let cmd, args = []; try { cmd = await fs.which('idevice_id'); args.push('-l'); log.debug('Using idevice_id'); } catch (err) { log.debug('Using udidetect'); cmd = require.resolve('udidetect'); } let udid; try { let {stdout} = await exec(cmd, args, {timeout: 3000}); let udids = _.uniq(_.filter(stdout.split('\n'), Boolean)); udid = _.last(udids); if (udids.length > 1) { log.warn(`Multiple devices found: ${udids.join(', ')}`); log.warn(`Choosing '${udid}'. If this is wrong, manually set with 'udid' desired capability`); } } catch (err) { log.errorAndThrow(`Error detecting udid: ${err.message}`); } if (!udid || udid.length <= 2) { throw new Error('Could not detect udid.'); } log.debug(`Detected real device udid: '${udid}'`); return udid; } async function getAndCheckXcodeVersion () { let version; try { version = await xcode.getVersion(true); } catch (err) { log.debug(err); log.errorAndThrow(`Could not determine Xcode version: ${err.message}`); } // we do not support Xcodes < 7.3, if (version.versionFloat < 7.3) { log.errorAndThrow(`Xcode version '${version.versionString}'. Support for ` + `Xcode ${version.versionString} is not supported. ` + `Please upgrade to version 7.3 or higher`); } return version; } async function getAndCheckIosSdkVersion () { let versionNumber; try { versionNumber = await xcode.getMaxIOSSDK(); } catch (err) { log.errorAndThrow(`Could not determine iOS SDK version: ${err.message}`); } return versionNumber; } function translateDeviceName (platformVersion, devName = '') { let deviceName = devName; switch (devName.toLowerCase().trim()) { case 'iphone simulator': deviceName = 'iPhone 6'; break; case 'ipad simulator': // iPad Retina is no longer available for ios 10.3 // so we pick another iPad to use as default deviceName = platformVersion && util.compareVersions(platformVersion, '<', '10.3') ? 'iPad Retina' : 'iPad Air'; break; } if (deviceName !== devName) { log.debug(`Changing deviceName from '${devName}' to '${deviceName}'`); } return deviceName; } // This map contains derived data attachment folders as keys // and values are stacks of permssion masks // It is used to synchronize permissions change // on shared folders const derivedDataPermissionsStacks = new Map(); async function adjustWDAAttachmentsPermissions (wda, perms) { if (!wda || !await wda.retrieveDerivedDataPath()) { log.warn('No WebDriverAgent derived data available, so unable to set permissions on WDA attachments folder'); return; } const attachmentsFolder = path.join(await wda.retrieveDerivedDataPath(), 'Logs/Test/Attachments'); const permsStack = derivedDataPermissionsStacks.get(attachmentsFolder) || []; if (permsStack.length) { if (_.last(permsStack) === perms) { permsStack.push(perms); log.info(`Not changing permissions of '${attachmentsFolder}' to '${perms}', because they were already set by the other session`); return; } if (permsStack.length > 1) { permsStack.pop(); log.info(`Not changing permissions of '${attachmentsFolder}' to '${perms}', because the other session does not expect them to be changed`); return; } } derivedDataPermissionsStacks.set(attachmentsFolder, [perms]); if (await fs.exists(attachmentsFolder)) { log.info(`Setting '${perms}' permissions to '${attachmentsFolder}' folder`); await fs.chmod(attachmentsFolder, perms); return; } log.info(`There is no ${attachmentsFolder} folder, so not changing permissions`); } // This map contains derived data logs folders as keys // and values are the count of times the particular // folder has been scheduled for removal const derivedDataCleanupMarkers = new Map(); async function markSystemFilesForCleanup (wda) { if (!wda || !await wda.retrieveDerivedDataPath()) { log.warn('No WebDriverAgent derived data available, so unable to mark system files for cleanup'); return; } const logsRoot = path.resolve(await wda.retrieveDerivedDataPath(), 'Logs'); let markersCount = 0; if (derivedDataCleanupMarkers.has(logsRoot)) { markersCount = derivedDataCleanupMarkers.get(logsRoot); } derivedDataCleanupMarkers.set(logsRoot, ++markersCount); } async function clearSystemFiles (wda) { // only want to clear the system files for the particular WDA xcode run if (!wda || !await wda.retrieveDerivedDataPath()) { log.warn('No WebDriverAgent derived data available, so unable to clear system files'); return; } const logsRoot = path.resolve(await wda.retrieveDerivedDataPath(), 'Logs'); if (derivedDataCleanupMarkers.has(logsRoot)) { let markersCount = derivedDataCleanupMarkers.get(logsRoot); derivedDataCleanupMarkers.set(logsRoot, --markersCount); if (markersCount > 0) { log.info(`Not cleaning '${logsRoot}' folder, because the other session does not expect it to be cleaned`); return; } } derivedDataCleanupMarkers.set(logsRoot, 0); // Cleaning up big temporary files created by XCTest: https://github.com/appium/appium/issues/9410 const cleanupCmd = `find -E /private/var/folders ` + `-regex '.*/Session-WebDriverAgentRunner.*\\.log$|.*/StandardOutputAndStandardError\\.txt$' ` + `-type f -exec sh -c 'echo "" > "{}"' \\;`; const cleanupTask = new SubProcess('bash', ['-c', cleanupCmd], { detached: true, stdio: ['ignore', 'pipe', 'pipe'], }); // Do not wait for the task to be completed, since it might take a lot of time // We keep it running after Appium process is killed await cleanupTask.start(0, true); log.debug(`Started background XCTest logs cleanup: ${cleanupCmd}`); if (await fs.exists(logsRoot)) { log.info(`Cleaning test logs in '${logsRoot}' folder`); await iosUtils.clearLogs([logsRoot]); return; } log.info(`There is no ${logsRoot} folder, so not cleaning files`); } async function checkAppPresent (app) { log.debug(`Checking whether app '${app}' is actually present on file system`); if (!(await fs.exists(app))) { log.errorAndThrow(`Could not find app at '${app}'`); } log.debug('App is present'); } async function getDriverInfo () { const stat = await fs.stat(path.resolve(__dirname, '..')); const built = stat.mtime.getTime(); // get the package.json and the version from it const pkg = require(__filename.includes('build/lib/utils') ? '../../package.json' : '../package.json'); const version = pkg.version; return { built, version, }; } function normalizeCommandTimeouts (value) { // The value is normalized already if (typeof value !== 'string') { return value; } let result = {}; // Use as default timeout for all commands if a single integer value is provided if (!isNaN(value)) { result[DEFAULT_TIMEOUT_KEY] = _.toInteger(value); return result; } // JSON object has been provided. Let's parse it try { result = JSON.parse(value); if (!_.isPlainObject(result)) { throw new Error(); } } catch (err) { log.errorAndThrow(`"commandTimeouts" capability should be a valid JSON object. "${value}" was given instead`); } for (let [cmd, timeout] of _.toPairs(result)) { if (!_.isInteger(timeout) || timeout <= 0) { log.errorAndThrow(`The timeout for "${cmd}" should be a valid natural number of milliseconds. "${timeout}" was given instead`); } } return result; } /** * Get the process id of the most recent running application * having the particular command line pattern. * * @param {string} pgrepPattern - pgrep-compatible search pattern. * @return {string} Either a process id or null if no matches were found. */ async function getPidUsingPattern (pgrepPattern) { const args = ['-nif', pgrepPattern]; try { const {stdout} = await exec('pgrep', args); const pid = parseInt(stdout, 10); if (isNaN(pid)) { log.debug(`Cannot parse process id from 'pgrep ${args.join(' ')}' output: ${stdout}`); return null; } return `${pid}`; } catch (err) { log.debug(`'pgrep ${args.join(' ')}' didn't detect any matching processes. Return code: ${err.code}`); return null; } } /** * Kill a process having the particular command line pattern. * This method tries to send SIGINT, SIGTERM and SIGKILL to the * matched processes in this order if the process is still running. * * @param {string} pgrepPattern - pgrep-compatible search pattern. */ async function killAppUsingPattern (pgrepPattern) { for (const signal of [2, 15, 9]) { if (!await getPidUsingPattern(pgrepPattern)) { return; } const args = [`-${signal}`, '-if', pgrepPattern]; try { await exec('pkill', args); } catch (err) { log.debug(`pkill ${args.join(' ')} -> ${err.message}`); } await B.delay(100); } } /** * Kills running XCTest processes for the particular device. * * @param {string} udid - The device UDID. * @param {boolean} isSimulator - Equals to true if the current device is a Simulator * @param {object} opts - Additional options mapping. Possible keys are: * - {string|number} wdaLocalPort: The number of local port WDA is listening on. */ async function resetXCTestProcesses (udid, isSimulator, opts = {}) { const processPatterns = [`xcodebuild.*${udid}`]; if (opts.wdaLocalPort) { processPatterns.push(`iproxy ${opts.wdaLocalPort}`); } else if (!isSimulator) { processPatterns.push(`iproxy.*${udid}`); } if (isSimulator) { processPatterns.push(`${udid}.*XCTRunner`); } log.debug(`Killing running processes '${processPatterns.join(', ')}' for the device ${udid}...`); for (const pgrepPattern of processPatterns) { await killAppUsingPattern(pgrepPattern); } } async function printUser () { try { let {stdout} = await exec('whoami'); log.debug(`Current user: '${stdout.trim()}'`); } catch (err) { log.debug(`Unable to get username running server: ${err.message}`); } } async function printLibimobiledeviceInfo () { try { let {stdout} = await exec('brew', ['info', 'libimobiledevice']); let match = /libimobiledevice:(.+)/.exec(stdout); if (match && match[1]) { log.debug(`Current version of libimobiledevice: ${match[1].trim()}`); } } catch (err) { log.debug(`Unable to get version of libimobiledevice: ${err.message}`); } } /** * Get the IDs of processes listening on the particular system port. * It is also possible to apply additional filtering based on the * process command line. * * @param {string|number} port - The port number. * @param {?Function} filteringFunc - Optional lambda function, which * receives command line string of the particular process * listening on given port, and is expected to return * either true or false to include/exclude the corresponding PID * from the resulting array. * @returns {Array<string>} - the list of matched process ids. */ async function getPIDsListeningOnPort (port, filteringFunc = null) { const result = []; try { // This only works since Mac OS X El Capitan const {stdout} = await exec('lsof', ['-ti', `tcp:${port}`]); result.push(...(stdout.trim().split(/\n+/))); } catch (e) { return result; } if (!_.isFunction(filteringFunc)) { return result; } return await B.filter(result, async (x) => { const {stdout} = await exec('ps', ['-p', x, '-o', 'command']); return await filteringFunc(stdout); }); } /** * @typedef {Object} UploadOptions * * @property {?string} user - The name of the user for the remote authentication. Only works if `remotePath` is provided. * @property {?string} pass - The password for the remote authentication. Only works if `remotePath` is provided. * @property {?string} method - The http multipart upload method name. The 'PUT' one is used by default. * Only works if `remotePath` is provided. */ /** * Encodes the given local file to base64 and returns the resulting string * or uploads it to a remote server using http/https or ftp protocols * if `remotePath` is set * * @param {string} localFile - The path to an existing local file * @param {?string} remotePath - The path to the remote location, where * this file should be uploaded * @param {?UploadOptions} uploadOptions - Set of upload options * @returns {string} Either an empty string if the upload was successful or * base64-encoded file representation if `remotePath` is falsy */ async function encodeBase64OrUpload (localFile, remotePath = null, uploadOptions = {}) { if (!await fs.exists(localFile)) { log.errorAndThrow(`The file at '${localFile}' does not exist or is not accessible`); } const {size} = await fs.stat(localFile); log.debug(`The size of the file is ${util.toReadableSizeString(size)}`); if (_.isEmpty(remotePath)) { const maxMemoryLimit = v8.getHeapStatistics().total_available_size / 2; if (size >= maxMemoryLimit) { log.info(`The file might be too large to fit into the process memory ` + `(${util.toReadableSizeString(size)} >= ${util.toReadableSizeString(maxMemoryLimit)}). ` + `Provide a link to a remote writable location for video upload ` + `(http(s) and ftp protocols are supported) if you experience Out Of Memory errors`); } const content = await fs.readFile(localFile); return content.toString('base64'); } const remoteUrl = url.parse(remotePath); let options = {}; const {user, pass, method} = uploadOptions; if (remoteUrl.protocol.startsWith('http')) { options = { url: remoteUrl.href, method: method || 'PUT', multipart: [{ body: _fs.createReadStream(localFile) }], }; if (user && pass) { options.auth = {user, pass}; } } else if (remoteUrl.protocol === 'ftp:') { options = { host: remoteUrl.hostname, port: remoteUrl.port || 21, }; if (user && pass) { options.user = user; options.pass = pass; } } await net.uploadFile(localFile, remotePath, options); return ''; } /** * Stops and removes all web socket handlers that are listening * in scope of the currect session. * * @param {Object} server - The instance of NodeJs HTTP server, * which hosts Appium * @param {string} sessionId - The id of the current session */ async function removeAllSessionWebSocketHandlers (server, sessionId) { if (!server || !_.isFunction(server.getWebSocketHandlers)) { return; } const activeHandlers = await server.getWebSocketHandlers(sessionId); for (const pathname of _.keys(activeHandlers)) { await server.removeWebSocketHandler(pathname); } } /** * Verify whether the given application is compatible to the * platform where it is going to be installed and tested. * * @param {string} app - The actual path to the application bundle * @param {boolean} isSimulator - Should be set to `true` if the test will be executed on Simulator * @returns {?boolean} The function returns `null` if the application does not exist or there is no * `CFBundleSupportedPlatforms` key in its Info.plist manifest. * `true` is returned if the bundle architecture matches the device architecture. * @throws {Error} If bundle architecture does not match the device architecture. */ async function verifyApplicationPlatform (app, isSimulator) { log.debug('Verifying application platform'); const infoPlist = path.resolve(app, 'Info.plist'); if (!await fs.exists(infoPlist)) { log.debug(`'${infoPlist}' does not exist`); return null; } const {CFBundleSupportedPlatforms} = await plist.parsePlistFile(infoPlist); log.debug(`CFBundleSupportedPlatforms: ${JSON.stringify(CFBundleSupportedPlatforms)}`); if (!_.isArray(CFBundleSupportedPlatforms)) { log.debug(`CFBundleSupportedPlatforms key does not exist in '${infoPlist}'`); return null; } const isAppSupported = (isSimulator && CFBundleSupportedPlatforms.includes('iPhoneSimulator')) || (!isSimulator && CFBundleSupportedPlatforms.includes('iPhoneOS')); if (isAppSupported) { return true; } throw new Error(`${isSimulator ? 'Simulator' : 'Real device'} architecture is unsupported by the '${app}' application. ` + `Make sure the correct deployment target has been selected for its compilation in Xcode.`); } /** * Return true if the platformName is tvOS * @param {string} platformName The name of the platorm * @returns {boolean} Return true if the platformName is tvOS */ function isTvOS (platformName) { return _.toLower(platformName) === _.toLower(PLATFORM_NAME_TVOS); } /** * Returns true if the urlString is localhost * @param {?string} urlString * @returns {boolean} Return true if the urlString is localhost */ function isLocalHost (urlString) { try { const {hostname} = url.parse(urlString); return ['localhost', '127.0.0.1', '::1', '::ffff:127.0.0.1'].includes(hostname); } catch { log.warn(`'${urlString}' cannot be parsed as a valid URL`); } return false; } export { detectUdid, getAndCheckXcodeVersion, getAndCheckIosSdkVersion, adjustWDAAttachmentsPermissions, checkAppPresent, getDriverInfo, clearSystemFiles, translateDeviceName, normalizeCommandTimeouts, DEFAULT_TIMEOUT_KEY, resetXCTestProcesses, getPidUsingPattern, markSystemFilesForCleanup, printUser, printLibimobiledeviceInfo, getPIDsListeningOnPort, encodeBase64OrUpload, removeAllSessionWebSocketHandlers, verifyApplicationPlatform, isTvOS, isLocalHost };
import BaseTileLayer from './BaseTileLayer'; import params from './../param'; class OsmTileLayer extends BaseTileLayer { constructor(id, options = {}) { const style = options.style || 'Normal'; options.urlTemplate = params.Osm[style].url; super(id, options); } } export default OsmTileLayer;
// @tags: [uses_transactions] // Tests that doTxn is atomic for CRUD operations (function() { 'use strict'; var session = db.getMongo().startSession(); var sessionDb = session.getDatabase("test"); var txnNumber = 0; var t = db.doTxn; t.drop({writeConcern: {w: "majority"}}); assert.writeOK(t.insert({_id: 1})); // Operations including commands are not allowed and should be rejected completely. assert.commandFailedWithCode(sessionDb.adminCommand({ doTxn: [ {op: 'i', ns: t.getFullName(), o: {_id: ObjectId(), x: 1}}, {op: 'c', ns: "invalid", o: {create: "t"}}, ], txnNumber: NumberLong(txnNumber++) }), ErrorCodes.InvalidOptions); assert.eq(t.count({x: 1}), 0); // Operations only including CRUD commands should be atomic, so the next insert will fail. assert.commandFailedWithCode(sessionDb.adminCommand({ doTxn: [ {op: 'i', ns: t.getFullName(), o: {_id: ObjectId(), x: 1}}, {op: 'i', ns: "invalid", o: {_id: ObjectId(), x: 1}}, ], txnNumber: NumberLong(txnNumber++) }), 16886); // nsToCollectionSubstring: no . assert.eq(t.count({x: 1}), 0); // Operations on non-existent databases cannot be atomic. var newDBName = "do_txn_atomicity"; var newDB = sessionDb.getSiblingDB(newDBName); assert.commandWorked(newDB.dropDatabase()); // Updates on a non-existent database no longer implicitly create collections and will fail with // a NamespaceNotFound error. assert.commandFailedWithCode(newDB.runCommand({ doTxn: [{op: "u", ns: newDBName + ".foo", o: {_id: 5, x: 17}, o2: {_id: 5, x: 16}}], txnNumber: NumberLong(txnNumber++) }), ErrorCodes.NamespaceNotFound); var sawTooManyLocksError = false; function applyWithManyLocks(n) { let cappedOps = []; let multiOps = []; for (let i = 0; i < n; i++) { // Write to a capped collection, as that may require a lock for serialization. let cappedName = "capped" + n + "-" + i; assert.commandWorked(newDB.createCollection(cappedName, {capped: true, size: 100})); cappedOps.push({op: 'i', ns: newDBName + "." + cappedName, o: {_id: 0}}); // Make an index multi-key, as that may require a lock for updating the catalog. let multiName = "multi" + n + "-" + i; assert.commandWorked(newDB[multiName].createIndex({x: 1})); multiOps.push({op: 'i', ns: newDBName + "." + multiName, o: {_id: 0, x: [0, 1]}}); } let res = [cappedOps, multiOps].map( (doTxn) => newDB.runCommand({doTxn: doTxn, txnNumber: NumberLong(txnNumber++)})); sawTooManyLocksError |= res.some((res) => res.code === ErrorCodes.TooManyLocks); // Transactions involving just two collections should succeed. if (n <= 2) res.every((res) => res.ok); // All transactions should either completely succeed or completely fail. assert(res.every((res) => res.results.every((result) => result == res.ok))); assert(res.every((res) => !res.ok || res.applied == n)); } // Try requiring different numbers of collection accesses in a single operation to cover // all edge cases, so we run out of available locks in different code paths such as during // oplog application. applyWithManyLocks(1); applyWithManyLocks(2); for (let i = 9; i < 20; i++) { applyWithManyLocks(i); } assert(!sawTooManyLocksError, "test should not exhaust the max number of locks held at once"); })();
export default (vars) => ({ '': { background: 'white', border: '3px solid black', zIndex: '2147483647', boxSizing: 'border-box', padding: 0, fontSize: 14, fontFamily: 'sans-serif', lineHeight: 'normal', color: '#222', overflow: 'auto', ...vars.INITIAL_POPUP_POSITION }, content: { padding: 10, }, '.field': { display: 'flex', }, '.header': { fontSize: 15, marginTop: 5, marginBottom: 10, fontWeight: '700', height: 20, }, newTagInput: { flex: 'auto', borderWidth: 0, borderBottom: '2px solid black', paddingTop: 2, marginRight: 7, fontSize: 15, }, 'newTagInput:focus': { borderColor: 'rgb(114, 123, 243)', outline: 'none' }, button: { background: 'none', fontSize: 15, lineHeight: '1.5', color: 'black', border: '2px solid black', }, 'button:hover': { borderColor: 'rgb(114, 123, 243)', backgroundColor: 'transparent', color: '#2a39fa', }, allExistingTags: { width: '100%', marginTop: 13, background: 'none', border: '1px solid black', }, 'option:first-child': { display: 'none', }, assignedTags: { display: 'flex', flexWrap: 'wrap', marginTop: 12, marginBottom: 15, paddingBottom: 3, borderBottom: '1px solid black', }, 'assignedTags > div:hover': { borderColor: 'rgb(114, 123, 243)', backgroundColor: 'transparent', color: '#2a39fa', }, '.link': { marginTop: 13, marginBottom: 10, marginLeft: 5, float: 'right', cursor: 'pointer', }, recentlyVisitedPages: { listStyle: 'none', paddingLeft: 0, marginTop: 7, marginBottom: 23, position: 'relative' }, 'recentlyVisitedPages:after': { content: '""', borderBottom: '1px solid black', position: 'absolute', left: 0, right: 0, bottom: -12, }, 'recentlyVisitedPages li': { padding: '3px 0 5px 23px', cursor: 'pointer', whiteSpace: 'nowrap', overflow: 'hidden', backgroundRepeat: 'no-repeat', backgroundSize: '15px 15px', backgroundPosition: '0 5px', }, 'recentlyVisitedPages li:hover': { backgroundColor: 'rgba(114, 123, 243, 0.1)' }, h3: { margin: '0 0 5px 0', position: 'relative', }, switchTagsButton: { cursor: 'pointer', }, 'switchTagsButton:hover': { color: 'rgb(114, 123, 243)' }, 'switchTagsButton::after': { content: '""', borderTop: '5px solid transparent', borderLeft: '5px solid transparent', borderBottom: '5px solid transparent', borderRight: '5px solid transparent', position: 'absolute', top: 5, left: 125 }, '.rightTriangle::after': { borderLeftColor: 'black', }, '.rightTriangle:hover::after': { borderLeftColor: 'rgb(114, 123, 243)' }, '.bottomTriangle::after': { top: 8, left: 124, borderTopColor: 'black', }, '.bottomTriangle:hover::after': { borderTopColor: 'rgb(114, 123, 243)' }, });
const sharedConfig = { client: "sqlite3", useNullAsDefault: true, connection: { filename: './dev.sqlite3', }, migrations: { directory: './data/migrations' }, seeds: { directory: './data/seeds' }, pool:{ afterCreate: (conn,done)=>{ conn.run("PRAGMA foreign_keys = ON", done) }, } } module.exports = { development: { ...sharedConfig, connection: { filename: './dev.sqlite3' } }, production: { ...sharedConfig, connection: { filename: './dev.sqlite3' } } };
const { Schema, model, Types } = require("mongoose"); const dateFormat = require("../utils/dateFormat"); const ReactionSchema = new Schema( { reactionId: { type: Schema.Types.ObjectId, default: () => new Types.ObjectId(), }, reactionBody: { type: String, required: true, maxlength: 280, }, username: { type: String, required: true, trim: true, }, createdAt: { type: Date, default: Date.now, get: (createdAtVal) => dateFormat(createdAtVal), }, }, { toJSON: { getters: true, }, } ); const ThoughtSchema = new Schema( { username: { type: String, required: true, trim: true, }, thoughtText: { type: String, required: true, minlength: 1, maxlength: 280, }, createdAt: { type: Date, default: Date.now, get: (createdAtVal) => dateFormat(createdAtVal), }, reactions: [ReactionSchema], }, { toJSON: { getters: true, virtuals: true, }, id: false, } ); ThoughtSchema.virtual("reactionCount").get(function () { return this.reactions.length; }); const Thought = model("Thought", ThoughtSchema); module.exports = Thought;
( function ( $ ) { var charts = { init: function () { // -- Set new default font family and font color to mimic Bootstrap's default styling Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; Chart.defaults.global.defaultFontColor = '#292b2c'; this.ajaxGetPostMonthlyData(); }, ajaxGetPostMonthlyData: function () { var urlPath = 'http://' + window.location.hostname + '/get-post-chart-data'; var request = $.ajax( { method: 'GET', url: urlPath } ); request.done( function ( response ) { console.log( response ); charts.createCompletedJobsChart( response ); }); }, /** * Created the Completed Jobs Chart */ createCompletedJobsChart: function ( response ) { var ctx = document.getElementById("myAreaChart"); var myLineChart = new Chart(ctx, { type: 'line', data: { labels: response.months, // The response got from the ajax request containing all month names in the database datasets: [{ label: "Sessions", lineTension: 0.3, backgroundColor: "rgba(2,117,216,0.2)", borderColor: "rgba(2,117,216,1)", pointRadius: 5, pointBackgroundColor: "rgba(2,117,216,1)", pointBorderColor: "rgba(255,255,255,0.8)", pointHoverRadius: 5, pointHoverBackgroundColor: "rgba(2,117,216,1)", pointHitRadius: 20, pointBorderWidth: 2, data: response.post_count_data // The response got from the ajax request containing data for the completed jobs in the corresponding months }], }, options: { scales: { xAxes: [{ time: { unit: 'date' }, gridLines: { display: false }, ticks: { maxTicksLimit: 7 } }], yAxes: [{ ticks: { min: 0, max: response.max, // The response got from the ajax request containing max limit for y axis maxTicksLimit: 5 }, gridLines: { color: "rgba(0, 0, 0, .125)", } }], }, legend: { display: false } } }); } }; charts.init(); } )( jQuery );
var AI = { Create: function() { $.post(window.location.href, $("#ai_model").serialize(), function(resp) { var resp = jQuery.parseJSON(resp); switch (resp.Response) { case "OK": HIAS.ResetForm("ai_model"); $('.modal-title').text('AI Models'); $('.modal-body').html("HIAS AI Model created!"); $('#responsive-modal').modal('show'); Logging.logMessage("Core", "Forms", "HIAS AI Model created!"); break; default: msg = "AI Model Create Failed: " + resp.Message Logging.logMessage("Core", "AI", msg); $('.modal-title').text('AI Models'); $('.modal-body').text(msg); $('#responsive-modal').modal('show'); break; } }); }, Update: function() { $.post(window.location.href, $("#model_update").serialize(), function(resp) { var resp = jQuery.parseJSON(resp); switch (resp.Response) { case "OK": var fjson = JSON.stringify(resp.Schema, null, '\t'); window.parent.$('#schema').html(fjson); Logging.logMessage("Core", "AI", resp.Message); $('.modal-title').text('AI Models'); $('.modal-body').text(resp.Message); $('#responsive-modal').modal('show'); break; default: msg = "AI Update Failed: " + resp.Message Logging.logMessage("Core", "AI", msg); $('.modal-title').text('AI Models'); $('.modal-body').text(msg); $('#responsive-modal').modal('show'); break; } }); }, }; $(document).ready(function() { $("#GeniSysAI").on("click", ".removeModelProperty", function(e) { e.preventDefault(); $('#model-property-' + $(this).data('id')).fadeOut(300, function() { $(this).remove(); }); }); $("#GeniSysAI").on("click", ".removeModelCommand", function(e) { e.preventDefault(); $('#model-command-' + $(this).data('id')).fadeOut(300, function() { $(this).remove(); }); }); $("#GeniSysAI").on("click", ".removeModelState", function(e) { e.preventDefault(); $('#model-state-' + $(this).data('id')).fadeOut(300, function() { $(this).remove(); }); }); $("#GeniSysAI").on("click", "#addModelProperty", function(e) { e.preventDefault(); $('.modal-title').text('Add Property'); $('.modal-footer button').text('OK'); $('#buttonId').button('option', 'label', 'OK'); $('.modal-body').html("<div class='row'><div class='col-lg-4 col-md-4 col-sm-4 col-xs-4'>Property: </div><div class='col-lg-8 col-md-8 col-sm-8 col-xs-8'><input type ='text' id='addPropertyKey' class='form-control' /></div></div>"); $('#responsive-modal').modal('show'); $('#responsive-modal').on('hide.bs.modal', function() { if ($("#addPropertyKey").val()) { var addProperty = '<div class="row" style="margin-bottom: 5px;" id = "model-property-' + $("#addPropertyKey").val() + '"><div class="col-lg-11 col-md-11 col-sm-11 col-xs-11"><input type="text" class="form-control" id="properties[]" name="properties[]" placeholder="' + $("#addPropertyKey").val() + '" value="' + $("#addPropertyKey").val() + '" required></div><div class="col-lg-1 col-md-1 col-sm-1 col-xs-1"><a href="javascript:void(0);" class="removeModelProperty" data-id="' + $("#addPropertyKey").val() + '"><i class="fas fa-trash-alt"></i></a></div></div>'; $("#propertyContent").append(addProperty); $('.modal-body').html(""); } }) }); $("#GeniSysAI").on("click", "#addModelCommand", function(e) { e.preventDefault(); $('.modal-title').text('Add Command'); $('.modal-footer button').text('OK'); $('#buttonId').button('option', 'label', 'OK'); $('.modal-body').html("<div class='row'><div class='col-lg-4 col-md-4 col-sm-4 col-xs-4'>Command Name: </div><div class='col-lg-8 col-md-8 col-sm-8 col-xs-8'><input type ='text' id='addCommandKey' class='form-control' /></div></div><div class='row'><div class='col-lg-4 col-md-4 col-sm-4 col-xs-4'>Commands: </div><div class='col-lg-8 col-md-8 col-sm-8 col-xs-8'><input type ='text' id='addCommandValue' class='form-control' /></div></div>"); $('#responsive-modal').modal('show'); $('#responsive-modal').on('hide.bs.modal', function() { if ($("#addCommandKey").val() && $("#addCommandValue").val()) { var addCommand = '<div class= "row" style="margin-bottom: 5px;" id="model-command-' + $("#addCommandKey").val() + '"><div class="col-lg-11 col-md-11 col-sm-11 col-xs-11"><strong>' + $("#addCommandKey").val() + '</strong><input type="text" class="form-control" name="commands[' + $("#addCommandKey").val() + ']" placeholder="Commands as comma separated string" value="' + $("#addCommandValue").val() + '" required></div><div class="col-lg-1 col-md-1 col-sm-1 col-xs-1"><br /><a href="javascript:void(0);" class="removeModelCommand" data-id="' + $("#addCommandKey").val() + '"><i class="fas fa-trash-alt"></i></a></div></div>'; $("#commandsContent").append(addCommand); $('.modal-body').html(""); } }) }); $("#GeniSysAI").on("click", "#addModelState", function(e) { e.preventDefault(); $('.modal-title').text('Add State'); $('.modal-footer button').text('OK'); $('#buttonId').button('option', 'label', 'OK'); $('.modal-body').html("<div class='row'><div class='col-lg-4 col-md-4 col-sm-4 col-xs-4'>State Value: </div><div class='col-lg-8 col-md-8 col-sm-8 col-xs-8'><input type ='text' id='addStateValue' class='form-control' /></div></div>"); $('#responsive-modal').modal('show'); $('#responsive-modal').on('hide.bs.modal', function() { if ($("#addStateValue").val()) { var key = (parseInt($("#lastState").text()) + 1); var addState = '<div class="row" style="margin-bottom: 5px;" id="model-state-' + key + '"><div class="col-lg-11 col-md-11 col-sm-11 col-xs-11"><input type="text" class="form-control" name="states[]" placeholder="State" value="' + $("#addStateValue").val() + '" required /></div><div class="col-lg-1 col-md-1 col-sm-1 col-xs-1"><a href="javascript:void(0);" class="removeModelState" data-id="' + key + '"><i class="fas fa-trash-alt"></i></a></div></div >'; $("#stateContent").append(addState); $('.modal-body').html(""); $("#lastState").text(key); } }) }); $('#ai_model').validator().on('submit', function(e) { if (!e.isDefaultPrevented()) { e.preventDefault(); AI.Create(); } }); $('#model_update').validator().on('submit', function(e) { if (!e.isDefaultPrevented()) { e.preventDefault(); AI.Update(); } }); });
const _ = require('lodash'); const spec = require('../specs'); let checkCommentID; checkCommentID = function checkCommentID(theme, options) { const checkVersion = _.get(options, 'checkVersion', 'latest'); let ruleSet = spec.get([checkVersion]); // CASE: 002-comment-id checks only needs `rules` that start with `GS002` const ruleRegex = /GS002-.*/g; ruleSet = _.pickBy(ruleSet.rules, function (rule, ruleCode) { if (ruleCode.match(ruleRegex)) { return rule; } }); _.each(ruleSet, function (check, ruleCode) { _.each(theme.files, function (themeFile) { var template = themeFile.file.match(/^[^/]+.hbs$/) || themeFile.file.match(/^partials[/\\]+(.*)\.hbs$/); if (template) { if (themeFile.content.match(check.regex)) { if (!Object.prototype.hasOwnProperty.call(theme.results.fail, (ruleCode))) { theme.results.fail[ruleCode] = {failures: []}; } theme.results.fail[ruleCode].failures.push( { ref: themeFile.file } ); } } }); if (theme.results.pass.indexOf(ruleCode) === -1 && !Object.prototype.hasOwnProperty.call(theme.results.fail, ruleCode)) { theme.results.pass.push(ruleCode); } }); return theme; }; module.exports = checkCommentID;
import React from "react" import {Link} from "gatsby" import ThemeChanger from "../components/themeChanger" const Navigation = (props) => { const [toggle, setToggle] = React.useState(false) return ( <> <nav className="navigation"> <div className="nav-hide-container"> <Link to="/">Home</Link> <Link to="/about">About</Link> <Link to="/reviews">Reviews</Link> <Link to="/homecooking">Home Cooking</Link> {/* <Link to="/copywriting">Copywriting</Link> */} <Link to="/contact">Contact</Link> </div> <div style={toggle ? {opacity: "0"} : {}} > <ThemeChanger /> </div> <div className="toggle-mobile-nav" onClick={() => setToggle(!toggle)} style={toggle ? {position: "fixed"} : {}} > <div style={toggle ? {transform: "rotate(45deg)"} : {}} ></div> <div style={toggle ? {opacity: "0", transform: "translateX(5rem)"} : {}} ></div> <div style={toggle ? {transform: "rotate(-45deg)"} : {}} ></div> </div> </nav> <nav className="mobile-navigation" style={toggle ? {} : {transform: "translate(-100vw, 0rem)"}} > <Link className="nav-link" to="/">Home</Link> <Link className="nav-link" to="/about">About</Link> <Link className="nav-link" to="/reviews">Reviews</Link> <Link className="nav-link" to="/homecooking">Home Cooking</Link> {/* <Link className="nav-link" to="/copywriting">Copywriting</Link> */} <Link className="nav-link" to="/contact">Contact</Link> </nav> </> ) } export default Navigation
/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px") },cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m}); // Move jQuery to $telerik $telerik.$ = jQuery.noConflict(true);
import { SETTINGS_PATH as path } from 'constants' export default store => ({ path, /* Async getComponent is only invoked when route matches */ getComponent(nextState, cb) { /* Webpack - use 'require.ensure' to create a split point and embed an async module loader (jsonp) when bundling */ require.ensure( [], require => { /* Webpack - use require callback to define dependencies for bundling */ const Settings = require('./components/Settings').default /* Return getComponent */ cb(null, Settings) /* Webpack named bundle */ }, 'Settings' ) } })
load("201224b0d1c296b45befd2285e95dd42.js"); // |jit-test| allow-oom; need-for-each if (!('gczeal' in this && 'oomAfterAllocations' in this)) quit(); var lfcode = new Array(); gczeal(14); loadFile(` for each(let e in newGlobal()) { if (oomAfterAllocations(100)) continue; } `); function loadFile(lfVarx) { for (lfLocal in this) {} evaluate(lfVarx); }
//--------------------------------------------------------------------- // QRCode for JavaScript // // Copyright (c) 2009 Kazuhiko Arase // // URL: http://www.d-project.com/ // // Licensed under the MIT license: // http://www.opensource.org/licenses/mit-license.php // // The word "QR Code" is registered trademark of // DENSO WAVE INCORPORATED // http://www.denso-wave.com/qrcode/faqpatent-e.html // //--------------------------------------------------------------------- //--------------------------------------------------------------------- // QR8bitByte //--------------------------------------------------------------------- function QR8bitByte(data) { this.mode = QRMode.MODE_8BIT_BYTE; this.data = data; } QR8bitByte.prototype = { getLength : function(buffer) { return this.data.length; }, write : function(buffer) { for (var i = 0; i < this.data.length; i++) { // not JIS ... buffer.put(this.data.charCodeAt(i), 8); } } }; //--------------------------------------------------------------------- // QRCode //--------------------------------------------------------------------- function QRCode(typeNumber, errorCorrectLevel) { this.typeNumber = typeNumber; this.errorCorrectLevel = errorCorrectLevel; this.modules = null; this.moduleCount = 0; this.dataCache = null; this.dataList = new Array(); } QRCode.prototype = { addData : function(data) { var newData = new QR8bitByte(data); this.dataList.push(newData); this.dataCache = null; }, isDark : function(row, col) { if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) { throw new Error(row + "," + col); } return this.modules[row][col]; }, getModuleCount : function() { return this.moduleCount; }, make : function() { // Calculate automatically typeNumber if provided is < 1 if (this.typeNumber < 1 ){ var typeNumber = 1; for (typeNumber = 1; typeNumber < 40; typeNumber++) { var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel); var buffer = new QRBitBuffer(); var totalDataCount = 0; for (var i = 0; i < rsBlocks.length; i++) { totalDataCount += rsBlocks[i].dataCount; } for (var i = 0; i < this.dataList.length; i++) { var data = this.dataList[i]; buffer.put(data.mode, 4); buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) ); data.write(buffer); } if (buffer.getLengthInBits() <= totalDataCount * 8) break; } this.typeNumber = typeNumber; } this.makeImpl(false, this.getBestMaskPattern() ); }, makeImpl : function(test, maskPattern) { this.moduleCount = this.typeNumber * 4 + 17; this.modules = new Array(this.moduleCount); for (var row = 0; row < this.moduleCount; row++) { this.modules[row] = new Array(this.moduleCount); for (var col = 0; col < this.moduleCount; col++) { this.modules[row][col] = null;//(col + row) % 3; } } this.setupPositionProbePattern(0, 0); this.setupPositionProbePattern(this.moduleCount - 7, 0); this.setupPositionProbePattern(0, this.moduleCount - 7); this.setupPositionAdjustPattern(); this.setupTimingPattern(); this.setupTypeInfo(test, maskPattern); if (this.typeNumber >= 7) { this.setupTypeNumber(test); } if (this.dataCache == null) { this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList); } this.mapData(this.dataCache, maskPattern); }, setupPositionProbePattern : function(row, col) { for (var r = -1; r <= 7; r++) { if (row + r <= -1 || this.moduleCount <= row + r) continue; for (var c = -1; c <= 7; c++) { if (col + c <= -1 || this.moduleCount <= col + c) continue; if ( (0 <= r && r <= 6 && (c == 0 || c == 6) ) || (0 <= c && c <= 6 && (r == 0 || r == 6) ) || (2 <= r && r <= 4 && 2 <= c && c <= 4) ) { this.modules[row + r][col + c] = true; } else { this.modules[row + r][col + c] = false; } } } }, getBestMaskPattern : function() { var minLostPoint = 0; var pattern = 0; for (var i = 0; i < 8; i++) { this.makeImpl(true, i); var lostPoint = QRUtil.getLostPoint(this); if (i == 0 || minLostPoint > lostPoint) { minLostPoint = lostPoint; pattern = i; } } return pattern; }, createMovieClip : function(target_mc, instance_name, depth) { var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth); var cs = 1; this.make(); for (var row = 0; row < this.modules.length; row++) { var y = row * cs; for (var col = 0; col < this.modules[row].length; col++) { var x = col * cs; var dark = this.modules[row][col]; if (dark) { qr_mc.beginFill(0, 100); qr_mc.moveTo(x, y); qr_mc.lineTo(x + cs, y); qr_mc.lineTo(x + cs, y + cs); qr_mc.lineTo(x, y + cs); qr_mc.endFill(); } } } return qr_mc; }, setupTimingPattern : function() { for (var r = 8; r < this.moduleCount - 8; r++) { if (this.modules[r][6] != null) { continue; } this.modules[r][6] = (r % 2 == 0); } for (var c = 8; c < this.moduleCount - 8; c++) { if (this.modules[6][c] != null) { continue; } this.modules[6][c] = (c % 2 == 0); } }, setupPositionAdjustPattern : function() { var pos = QRUtil.getPatternPosition(this.typeNumber); for (var i = 0; i < pos.length; i++) { for (var j = 0; j < pos.length; j++) { var row = pos[i]; var col = pos[j]; if (this.modules[row][col] != null) { continue; } for (var r = -2; r <= 2; r++) { for (var c = -2; c <= 2; c++) { if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0) ) { this.modules[row + r][col + c] = true; } else { this.modules[row + r][col + c] = false; } } } } } }, setupTypeNumber : function(test) { var bits = QRUtil.getBCHTypeNumber(this.typeNumber); for (var i = 0; i < 18; i++) { var mod = (!test && ( (bits >> i) & 1) == 1); this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod; } for (var i = 0; i < 18; i++) { var mod = (!test && ( (bits >> i) & 1) == 1); this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod; } }, setupTypeInfo : function(test, maskPattern) { var data = (this.errorCorrectLevel << 3) | maskPattern; var bits = QRUtil.getBCHTypeInfo(data); // vertical for (var i = 0; i < 15; i++) { var mod = (!test && ( (bits >> i) & 1) == 1); if (i < 6) { this.modules[i][8] = mod; } else if (i < 8) { this.modules[i + 1][8] = mod; } else { this.modules[this.moduleCount - 15 + i][8] = mod; } } // horizontal for (var i = 0; i < 15; i++) { var mod = (!test && ( (bits >> i) & 1) == 1); if (i < 8) { this.modules[8][this.moduleCount - i - 1] = mod; } else if (i < 9) { this.modules[8][15 - i - 1 + 1] = mod; } else { this.modules[8][15 - i - 1] = mod; } } // fixed module this.modules[this.moduleCount - 8][8] = (!test); }, mapData : function(data, maskPattern) { var inc = -1; var row = this.moduleCount - 1; var bitIndex = 7; var byteIndex = 0; for (var col = this.moduleCount - 1; col > 0; col -= 2) { if (col == 6) col--; while (true) { for (var c = 0; c < 2; c++) { if (this.modules[row][col - c] == null) { var dark = false; if (byteIndex < data.length) { dark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1); } var mask = QRUtil.getMask(maskPattern, row, col - c); if (mask) { dark = !dark; } this.modules[row][col - c] = dark; bitIndex--; if (bitIndex == -1) { byteIndex++; bitIndex = 7; } } } row += inc; if (row < 0 || this.moduleCount <= row) { row -= inc; inc = -inc; break; } } } } }; QRCode.PAD0 = 0xEC; QRCode.PAD1 = 0x11; QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) { var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel); var buffer = new QRBitBuffer(); for (var i = 0; i < dataList.length; i++) { var data = dataList[i]; buffer.put(data.mode, 4); buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) ); data.write(buffer); } // calc num max data. var totalDataCount = 0; for (var i = 0; i < rsBlocks.length; i++) { totalDataCount += rsBlocks[i].dataCount; } if (buffer.getLengthInBits() > totalDataCount * 8) { throw new Error("code length overflow. (" + buffer.getLengthInBits() + ">" + totalDataCount * 8 + ")"); } // end code if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) { buffer.put(0, 4); } // padding while (buffer.getLengthInBits() % 8 != 0) { buffer.putBit(false); } // padding while (true) { if (buffer.getLengthInBits() >= totalDataCount * 8) { break; } buffer.put(QRCode.PAD0, 8); if (buffer.getLengthInBits() >= totalDataCount * 8) { break; } buffer.put(QRCode.PAD1, 8); } return QRCode.createBytes(buffer, rsBlocks); } QRCode.createBytes = function(buffer, rsBlocks) { var offset = 0; var maxDcCount = 0; var maxEcCount = 0; var dcdata = new Array(rsBlocks.length); var ecdata = new Array(rsBlocks.length); for (var r = 0; r < rsBlocks.length; r++) { var dcCount = rsBlocks[r].dataCount; var ecCount = rsBlocks[r].totalCount - dcCount; maxDcCount = Math.max(maxDcCount, dcCount); maxEcCount = Math.max(maxEcCount, ecCount); dcdata[r] = new Array(dcCount); for (var i = 0; i < dcdata[r].length; i++) { dcdata[r][i] = 0xff & buffer.buffer[i + offset]; } offset += dcCount; var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1); var modPoly = rawPoly.mod(rsPoly); ecdata[r] = new Array(rsPoly.getLength() - 1); for (var i = 0; i < ecdata[r].length; i++) { var modIndex = i + modPoly.getLength() - ecdata[r].length; ecdata[r][i] = (modIndex >= 0)? modPoly.get(modIndex) : 0; } } var totalCodeCount = 0; for (var i = 0; i < rsBlocks.length; i++) { totalCodeCount += rsBlocks[i].totalCount; } var data = new Array(totalCodeCount); var index = 0; for (var i = 0; i < maxDcCount; i++) { for (var r = 0; r < rsBlocks.length; r++) { if (i < dcdata[r].length) { data[index++] = dcdata[r][i]; } } } for (var i = 0; i < maxEcCount; i++) { for (var r = 0; r < rsBlocks.length; r++) { if (i < ecdata[r].length) { data[index++] = ecdata[r][i]; } } } return data; } //--------------------------------------------------------------------- // QRMode //--------------------------------------------------------------------- var QRMode = { MODE_NUMBER : 1 << 0, MODE_ALPHA_NUM : 1 << 1, MODE_8BIT_BYTE : 1 << 2, MODE_KANJI : 1 << 3 }; //--------------------------------------------------------------------- // QRErrorCorrectLevel //--------------------------------------------------------------------- var QRErrorCorrectLevel = { L : 1, M : 0, Q : 3, H : 2 }; //--------------------------------------------------------------------- // QRMaskPattern //--------------------------------------------------------------------- var QRMaskPattern = { PATTERN000 : 0, PATTERN001 : 1, PATTERN010 : 2, PATTERN011 : 3, PATTERN100 : 4, PATTERN101 : 5, PATTERN110 : 6, PATTERN111 : 7 }; //--------------------------------------------------------------------- // QRUtil //--------------------------------------------------------------------- var QRUtil = { PATTERN_POSITION_TABLE : [ [], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170] ], G15 : (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0), G18 : (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0), G15_MASK : (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1), getBCHTypeInfo : function(data) { var d = data << 10; while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) ) ); } return ( (data << 10) | d) ^ QRUtil.G15_MASK; }, getBCHTypeNumber : function(data) { var d = data << 12; while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) ) ); } return (data << 12) | d; }, getBCHDigit : function(data) { var digit = 0; while (data != 0) { digit++; data >>>= 1; } return digit; }, getPatternPosition : function(typeNumber) { return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; }, getMask : function(maskPattern, i, j) { switch (maskPattern) { case QRMaskPattern.PATTERN000 : return (i + j) % 2 == 0; case QRMaskPattern.PATTERN001 : return i % 2 == 0; case QRMaskPattern.PATTERN010 : return j % 3 == 0; case QRMaskPattern.PATTERN011 : return (i + j) % 3 == 0; case QRMaskPattern.PATTERN100 : return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0; case QRMaskPattern.PATTERN101 : return (i * j) % 2 + (i * j) % 3 == 0; case QRMaskPattern.PATTERN110 : return ( (i * j) % 2 + (i * j) % 3) % 2 == 0; case QRMaskPattern.PATTERN111 : return ( (i * j) % 3 + (i + j) % 2) % 2 == 0; default : throw new Error("bad maskPattern:" + maskPattern); } }, getErrorCorrectPolynomial : function(errorCorrectLength) { var a = new QRPolynomial([1], 0); for (var i = 0; i < errorCorrectLength; i++) { a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0) ); } return a; }, getLengthInBits : function(mode, type) { if (1 <= type && type < 10) { // 1 - 9 switch(mode) { case QRMode.MODE_NUMBER : return 10; case QRMode.MODE_ALPHA_NUM : return 9; case QRMode.MODE_8BIT_BYTE : return 8; case QRMode.MODE_KANJI : return 8; default : throw new Error("mode:" + mode); } } else if (type < 27) { // 10 - 26 switch(mode) { case QRMode.MODE_NUMBER : return 12; case QRMode.MODE_ALPHA_NUM : return 11; case QRMode.MODE_8BIT_BYTE : return 16; case QRMode.MODE_KANJI : return 10; default : throw new Error("mode:" + mode); } } else if (type < 41) { // 27 - 40 switch(mode) { case QRMode.MODE_NUMBER : return 14; case QRMode.MODE_ALPHA_NUM : return 13; case QRMode.MODE_8BIT_BYTE : return 16; case QRMode.MODE_KANJI : return 12; default : throw new Error("mode:" + mode); } } else { throw new Error("type:" + type); } }, getLostPoint : function(qrCode) { var moduleCount = qrCode.getModuleCount(); var lostPoint = 0; // LEVEL1 for (var row = 0; row < moduleCount; row++) { for (var col = 0; col < moduleCount; col++) { var sameCount = 0; var dark = qrCode.isDark(row, col); for (var r = -1; r <= 1; r++) { if (row + r < 0 || moduleCount <= row + r) { continue; } for (var c = -1; c <= 1; c++) { if (col + c < 0 || moduleCount <= col + c) { continue; } if (r == 0 && c == 0) { continue; } if (dark == qrCode.isDark(row + r, col + c) ) { sameCount++; } } } if (sameCount > 5) { lostPoint += (3 + sameCount - 5); } } } // LEVEL2 for (var row = 0; row < moduleCount - 1; row++) { for (var col = 0; col < moduleCount - 1; col++) { var count = 0; if (qrCode.isDark(row, col ) ) count++; if (qrCode.isDark(row + 1, col ) ) count++; if (qrCode.isDark(row, col + 1) ) count++; if (qrCode.isDark(row + 1, col + 1) ) count++; if (count == 0 || count == 4) { lostPoint += 3; } } } // LEVEL3 for (var row = 0; row < moduleCount; row++) { for (var col = 0; col < moduleCount - 6; col++) { if (qrCode.isDark(row, col) && !qrCode.isDark(row, col + 1) && qrCode.isDark(row, col + 2) && qrCode.isDark(row, col + 3) && qrCode.isDark(row, col + 4) && !qrCode.isDark(row, col + 5) && qrCode.isDark(row, col + 6) ) { lostPoint += 40; } } } for (var col = 0; col < moduleCount; col++) { for (var row = 0; row < moduleCount - 6; row++) { if (qrCode.isDark(row, col) && !qrCode.isDark(row + 1, col) && qrCode.isDark(row + 2, col) && qrCode.isDark(row + 3, col) && qrCode.isDark(row + 4, col) && !qrCode.isDark(row + 5, col) && qrCode.isDark(row + 6, col) ) { lostPoint += 40; } } } // LEVEL4 var darkCount = 0; for (var col = 0; col < moduleCount; col++) { for (var row = 0; row < moduleCount; row++) { if (qrCode.isDark(row, col) ) { darkCount++; } } } var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; lostPoint += ratio * 10; return lostPoint; } }; //--------------------------------------------------------------------- // QRMath //--------------------------------------------------------------------- var QRMath = { glog : function(n) { if (n < 1) { throw new Error("glog(" + n + ")"); } return QRMath.LOG_TABLE[n]; }, gexp : function(n) { while (n < 0) { n += 255; } while (n >= 256) { n -= 255; } return QRMath.EXP_TABLE[n]; }, EXP_TABLE : new Array(256), LOG_TABLE : new Array(256) }; for (var i = 0; i < 8; i++) { QRMath.EXP_TABLE[i] = 1 << i; } for (var i = 8; i < 256; i++) { QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8]; } for (var i = 0; i < 255; i++) { QRMath.LOG_TABLE[QRMath.EXP_TABLE[i] ] = i; } //--------------------------------------------------------------------- // QRPolynomial //--------------------------------------------------------------------- function QRPolynomial(num, shift) { if (num.length == undefined) { throw new Error(num.length + "/" + shift); } var offset = 0; while (offset < num.length && num[offset] == 0) { offset++; } this.num = new Array(num.length - offset + shift); for (var i = 0; i < num.length - offset; i++) { this.num[i] = num[i + offset]; } } QRPolynomial.prototype = { get : function(index) { return this.num[index]; }, getLength : function() { return this.num.length; }, multiply : function(e) { var num = new Array(this.getLength() + e.getLength() - 1); for (var i = 0; i < this.getLength(); i++) { for (var j = 0; j < e.getLength(); j++) { num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i) ) + QRMath.glog(e.get(j) ) ); } } return new QRPolynomial(num, 0); }, mod : function(e) { if (this.getLength() - e.getLength() < 0) { return this; } var ratio = QRMath.glog(this.get(0) ) - QRMath.glog(e.get(0) ); var num = new Array(this.getLength() ); for (var i = 0; i < this.getLength(); i++) { num[i] = this.get(i); } for (var i = 0; i < e.getLength(); i++) { num[i] ^= QRMath.gexp(QRMath.glog(e.get(i) ) + ratio); } // recursive call return new QRPolynomial(num, 0).mod(e); } }; //--------------------------------------------------------------------- // QRRSBlock //--------------------------------------------------------------------- function QRRSBlock(totalCount, dataCount) { this.totalCount = totalCount; this.dataCount = dataCount; } QRRSBlock.RS_BLOCK_TABLE = [ // L // M // Q // H // 1 [1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], // 2 [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], // 3 [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], // 4 [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], // 5 [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], // 6 [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], // 7 [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], // 8 [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], // 9 [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], // 10 [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], // 11 [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], // 12 [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], // 13 [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], // 14 [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], // 15 [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], // 16 [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], // 17 [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], // 18 [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], // 19 [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], // 20 [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], // 21 [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], // 22 [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], // 23 [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], // 24 [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], // 25 [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], // 26 [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], // 27 [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], // 28 [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], // 29 [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], // 30 [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], // 31 [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], // 32 [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], // 33 [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], // 34 [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], // 35 [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], // 36 [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], // 37 [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], // 38 [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], // 39 [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], // 40 [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16] ]; QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) { var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel); if (rsBlock == undefined) { throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel); } var length = rsBlock.length / 3; var list = new Array(); for (var i = 0; i < length; i++) { var count = rsBlock[i * 3 + 0]; var totalCount = rsBlock[i * 3 + 1]; var dataCount = rsBlock[i * 3 + 2]; for (var j = 0; j < count; j++) { list.push(new QRRSBlock(totalCount, dataCount) ); } } return list; } QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) { switch(errorCorrectLevel) { case QRErrorCorrectLevel.L : return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0]; case QRErrorCorrectLevel.M : return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1]; case QRErrorCorrectLevel.Q : return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2]; case QRErrorCorrectLevel.H : return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3]; default : return undefined; } } //--------------------------------------------------------------------- // QRBitBuffer //--------------------------------------------------------------------- function QRBitBuffer() { this.buffer = new Array(); this.length = 0; } QRBitBuffer.prototype = { get : function(index) { var bufIndex = Math.floor(index / 8); return ( (this.buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1; }, put : function(num, length) { for (var i = 0; i < length; i++) { this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1); } }, getLengthInBits : function() { return this.length; }, putBit : function(bit) { var bufIndex = Math.floor(this.length / 8); if (this.buffer.length <= bufIndex) { this.buffer.push(0); } if (bit) { this.buffer[bufIndex] |= (0x80 >>> (this.length % 8) ); } this.length++; } }; module.exports = { QRCode: QRCode, QRErrorCorrectLevel: QRErrorCorrectLevel }
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2018 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(["jquery.sap.global","sap/ui/core/format/DateFormat","sap/ui/model/FormatException","sap/ui/model/odata/type/ODataType","sap/ui/model/ParseException","sap/ui/model/ValidateException"],function(q,D,F,O,P,V){"use strict";var d=new Date(2014,10,27,13,47,26);function i(t){return t.oConstraints&&t.oConstraints.isDateOnly;}function g(t){return sap.ui.getCore().getLibraryResourceBundle().getText(i(t)?"EnterDate":"EnterDateTime",[t.formatValue(d,"string")]);}function a(t){var f;if(!t.oFormat){f=q.extend({strictParsing:true},t.oFormatOptions);if(i(t)){f.UTC=true;t.oFormat=D.getDateInstance(f);}else{t.oFormat=D.getDateTimeInstance(f);}}return t.oFormat;}function s(t,c){var n,p;t.oConstraints=undefined;if(c){n=c.nullable;if(n===false||n==="false"){t.oConstraints={nullable:false};}else if(n!==undefined&&n!==true&&n!=="true"){q.sap.log.warning("Illegal nullable: "+n,null,t.getName());}if(c.isDateOnly===true){t.oConstraints=t.oConstraints||{};t.oConstraints.isDateOnly=true;}p=c.precision;if(p!==undefined){if(p===Math.floor(p)&&p>=1&&p<=12){t.oConstraints=t.oConstraints||{};t.oConstraints.precision=p;}else if(p!==0){q.sap.log.warning("Illegal precision: "+p,null,t.getName());}}}t._handleLocalizationChange();}var b=O.extend("sap.ui.model.odata.type.DateTimeBase",{constructor:function(f,c){O.apply(this,arguments);s(this,c);this.oFormat=null;this.oFormatOptions=f;},metadata:{"abstract":true}});b.prototype.formatValue=function(v,t){if(v===null||v===undefined){return null;}switch(this.getPrimitiveType(t)){case"any":return v;case"string":if(!(v instanceof Date)){throw new F("Illegal "+this.getName()+" value: "+v);}return a(this).format(v);default:throw new F("Don't know how to format "+this.getName()+" to "+t);}};b.prototype.parseValue=function(v,S){var r;if(v===null||v===""){return null;}switch(this.getPrimitiveType(S)){case"string":r=a(this).parse(v);if(!r){throw new P(g(this));}return r;default:throw new P("Don't know how to parse "+this.getName()+" from "+S);}};b.prototype._handleLocalizationChange=function(){this.oFormat=null;};b.prototype.validateValue=function(v){if(v===null){if(this.oConstraints&&this.oConstraints.nullable===false){throw new V(g(this));}return;}else if(v instanceof Date){return;}throw new V("Illegal "+this.getName()+" value: "+v);};return b;});
var template = require('../templates/poll-admin.hbs'), answer_template = require('../templates/poll-answer.hbs'), cookie = require('../lib/js/cookie.js'), modal = require('./modal.js'), $ = require('jquery'), Promise = require('bluebird'), _ = require('underscore'); // Ensure cookie values are written as json cookie.json = true; var PollAdminView = { init: function(cfg) { // configuration parameters this.config = cfg; this.checkToken(); this.initEvents(); }, checkToken: function() { // Does this user already have an admin token? this.admin_token = cookie.get('quizlet_admin_token') || false; if (this.admin_token) { console.log("Got quizlet_admin_token: ", this.admin_token); } return this.admin_token; }, initEvents: function() { var self = this; $(document).on('quizlet:admin', function() { if (self.checkToken()) { self.showAdmin(); } else { console.log("> error: not authenticated, no admin access"); } }); }, initUIEvents: function() { var self = this, $answers = $('.poll-entry-list', self.$modal); $('.add-more-button', self.$modal).on('click', function() { $answers.append(answer_template()); }); $answers.on('click', '.remove', function() { $(this).parent('li').remove(); }); $('button#save-poll-btn', self.$modal).click(function(){ var question = self.$modal.find('input.question-input').val(), answers = []; self.$modal.find('input.answer-input').each(function(index, el) { answers.push({ answer: $(el).val() }); }); var params = { "question": question, "answers": answers }; $.ajax({ method: 'POST', dataType: "json", url: self.config.url + '/polls/', data: params }) .then(function(results) { if (results.success) { self.adminModal.alert('success', 'New Poll created! id=' + results.data.id); } else { self.adminModal.alert('error', 'Unable to create new poll: ' + results.message); } }) .fail(function(response) { self.adminModal.alert('error', response.responseJSON.message || response.responseText); }); }); }, showAdmin: function() { var self = this; $.getJSON(self.config.url + '/polls') .then(function(results) { var polls = []; if (results.success) { polls = results.data.map(function(poll) { var total = _.pluck(poll.answers, 'votes').reduce(function(sum, n) { return sum += n; }); poll.answers = poll.answers.map(function(answer) { answer.percent = answer.votes ? ((answer.votes / total) * 100).toFixed(2) : 0; return answer; }); return poll; }); } return polls; }) .then(function(polls) { var html = template({ 'authenticated': self.checkToken(), 'polls': polls }), adminModal = modal({ contents: html }); self.adminModal = adminModal; self.$modal = adminModal.show(); self.initUIEvents(); }); } }; module.exports = PollAdminView;
import React from 'react'; import PropTypes from 'prop-types'; const UilLightbulb = (props) => { const { color, size, ...otherProps } = props return React.createElement('svg', { xmlns: 'http://www.w3.org/2000/svg', width: size, height: size, viewBox: '0 0 24 24', fill: color, ...otherProps }, React.createElement('path', { d: 'M17.45,12.46a7,7,0,0,0-1-9.83,7.09,7.09,0,0,0-5.92-1.4,7,7,0,0,0-4,11.15,4.76,4.76,0,0,1,1.08,2.86v.29A2,2,0,0,0,7,16.93v2a2,2,0,0,0,2,2v1a1,1,0,0,0,2,0v-1h2v1a1,1,0,0,0,2,0v-1a2,2,0,0,0,2-2v-2a2,2,0,0,0-.57-1.4V15.1A4.26,4.26,0,0,1,17.45,12.46ZM9,18.93v-2h6v2Zm6.89-7.72a6.18,6.18,0,0,0-1.46,3.72H9.56a6.67,6.67,0,0,0-1.5-3.78,5,5,0,0,1,2.84-8A5,5,0,0,1,17,8.07,4.92,4.92,0,0,1,15.89,11.21Z' })); }; UilLightbulb.propTypes = { color: PropTypes.string, size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), }; UilLightbulb.defaultProps = { color: 'currentColor', size: '24', }; export default UilLightbulb;
import React, { useMemo, forwardRef } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import { deepMerge } from '@jiaminghi/charts/lib/util/index' import { deepClone } from '@jiaminghi/c-render/lib/plugin/util' import useAutoResize from '../../use/autoResize' import './style.less' const defaultConfig = { /** * @description Chart data * @type {Array<Object>} * @default data = [] */ data: [], /** * @description Chart img * @type {Array<String>} * @default img = [] */ img: [], /** * @description Chart font size * @type {Number} * @default fontSize = 12 */ fontSize: 12, /** * @description Img side length * @type {Number} * @default imgSideLength = 30 */ imgSideLength: 30, /** * @description Column color * @type {String} * @default columnColor = 'rgba(0, 194, 255, 0.4)' */ columnColor: 'rgba(0, 194, 255, 0.4)', /** * @description Text color * @type {String} * @default textColor = '#fff' */ textColor: '#fff', /** * @description Show value * @type {Boolean} * @default showValue = false */ showValue: false } function getData(mergedConfig) { let { data } = mergedConfig data = deepClone(data, true) data.sort(({ value: a }, { value: b }) => { if (a > b) return -1 if (a < b) return 1 if (a === b) return 0 }) const max = data[0] ? data[0].value : 10 data = data.map(item => ({ ...item, percent: item.value / max })) return data } const ConicalColumnChart = forwardRef(({ config = {}, className, style }, ref) => { const { width, height, domRef } = useAutoResize(ref) const { mergedConfig, column } = useMemo(calcData, [config, width, height]) function calcData() { const mergedConfig = deepMerge(deepClone(defaultConfig, true), config || {}) mergedConfig.data = getData(mergedConfig) return { mergedConfig, column: getColumn(mergedConfig) } } function getColumn(mergedConfig) { const { imgSideLength, fontSize, data } = mergedConfig const itemNum = data.length const gap = width / (itemNum + 1) const useAbleHeight = height - imgSideLength - fontSize - 5 const svgBottom = height - fontSize - 5 return data.map((item, i) => { const { percent } = item const middleXPos = gap * (i + 1) const leftXPos = gap * i const rightXpos = gap * (i + 2) const middleYPos = svgBottom - useAbleHeight * percent const controlYPos = useAbleHeight * percent * 0.6 + middleYPos const d = ` M${leftXPos}, ${svgBottom} Q${middleXPos}, ${controlYPos} ${middleXPos},${middleYPos} M${middleXPos},${middleYPos} Q${middleXPos}, ${controlYPos} ${rightXpos},${svgBottom} L${leftXPos}, ${svgBottom} Z ` const textY = (svgBottom + middleYPos) / 2 + fontSize / 2 return { ...item, d, x: middleXPos, y: middleYPos, textY } }) } const classNames = useMemo( () => classnames('dv-conical-column-chart', className), [className] ) return ( <div className={classNames} style={style} ref={domRef}> <svg width={width} height={height}> {column.map((item, i) => ( <g key={i}> <path d={item.d} fill={mergedConfig.columnColor} /> <text style={{ fontSize: `${mergedConfig.fontSize}px` }} fill={mergedConfig.textColor} x={item.x} y={height - 4} > {item.name} </text> {!!mergedConfig.img.length && ( <image href={mergedConfig.img[i % mergedConfig.img.length]} width={mergedConfig.imgSideLength} height={mergedConfig.imgSideLength} x={item.x - mergedConfig.imgSideLength / 2} y={item.y - mergedConfig.imgSideLength} /> )} {mergedConfig.showValue && ( <text style={{ fontSize: `${mergedConfig.fontSize}px` }} fill={mergedConfig.textColor} x={item.x} y={item.textY} > {item.value} </text> )} </g> ))} </svg> </div> ) }) ConicalColumnChart.propTypes = { config: PropTypes.object, className: PropTypes.string, style: PropTypes.object } export default ConicalColumnChart
// just a placeholder comment to ensure cache gets refresh. vvv8djfkvvoo self.addEventListener("install", e => { e.waitUntil( caches.open("static").then(cache => { //items for the PWA need to be mentioned here individually. The Prefetch & Preload in HTML header is just for the webpage. return cache.addAll(["./", "./css/styles.css", "./js/app.js", "./img/logo512.png", "index.html", "./res/Jamshed.ttf", "https://fonts.googleapis.com/icon?family=Material+Icons", "./js/game.js", "./js/game2.js", "./js/stolen.js", "./css/game.css", "./pages/game.html", "https://rawgit.com/web-animations/web-animations-js/master/web-animations.min.js", "https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css", "https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js", "./img/avestaLetters/1.png", "./img/avestaLetters/2.png", "./img/avestaLetters/3.png", "./img/avestaLetters/4.png", "./img/avestaLetters/5.png", "./img/avestaLetters/6.png", "./img/avestaLetters/7.png", "./img/avestaLetters/8.png", "./img/avestaLetters/9.png", "./img/avestaLetters/10.png", "./img/avestaLetters/11.png", "./img/avestaLetters/12.png", "./img/avestaLetters/13.png", "./img/avestaLetters/14.png", "./img/avestaLetters/15.png", "./img/avestaLetters/16.png", "./img/avestaLetters/17.png", "./img/avestaLetters/18.png", "./img/avestaLetters/19.png", "./img/avestaLetters/20.png", "./img/avestaLetters/21.png", "./img/avestaLetters/22.png", "./img/avestaLetters/23.png", "./img/avestaLetters/24.png", "./img/avestaLetters/25.png", "./img/avestaLetters/26.png", "./img/avestaLetters/27.png", "./img/avestaLetters/28.png", "./img/avestaLetters/29.png", "./img/avestaLetters/30.png", "./img/avestaLetters/31.png", "./img/avestaLetters/32.png", "./img/avestaLetters/33.png", "./img/avestaLetters/34.png", "./img/avestaLetters/35.png", "./img/avestaLetters/36.png", "./img/avestaLetters/37.png", "./img/avestaLetters/38.png", "./img/avestaLetters/39.png", "./img/avestaLetters/41.png", "./img/avestaLetters/42.png", "./img/avestaLetters/43.png", "./img/avestaLetters/44.png", "./img/avestaLetters/45.png", "./img/avestaLetters/46.png", "./img/avestaLetters/47.png", "./img/avestaLetters/48.png", "./img/avestaLetters/49.png", "./img/avestaLetters/50.png", "./img/transcpAnswers/1.png", "./img/transcpAnswers/2.png", "./img/transcpAnswers/3.png", "./img/transcpAnswers/4.png", "./img/transcpAnswers/5.png", "./img/transcpAnswers/6.png", "./img/transcpAnswers/7.png", "./img/transcpAnswers/8.png", "./img/transcpAnswers/9.png", "./img/transcpAnswers/10.png", "./img/transcpAnswers/11.png", "./img/transcpAnswers/12.png", "./img/transcpAnswers/13.png", "./img/transcpAnswers/14.png", "./img/transcpAnswers/15.png", "./img/transcpAnswers/16.png", "./img/transcpAnswers/17.png", "./img/transcpAnswers/18.png", "./img/transcpAnswers/19.png", "./img/transcpAnswers/20.png", "./img/transcpAnswers/21.png", "./img/transcpAnswers/22.png", "./img/transcpAnswers/23.png", "./img/transcpAnswers/24.png", "./img/transcpAnswers/25.png", "./img/transcpAnswers/26.png", "./img/transcpAnswers/27.png", "./img/transcpAnswers/28.png", "./img/transcpAnswers/29.png", "./img/transcpAnswers/30.png", "./img/transcpAnswers/31.png", "./img/transcpAnswers/32.png", "./img/transcpAnswers/33.png", "./img/transcpAnswers/34.png", "./img/transcpAnswers/35.png", "./img/transcpAnswers/36.png", "./img/transcpAnswers/37.png", "./img/transcpAnswers/38.png", "./img/transcpAnswers/39.png", "./img/transcpAnswers/41.png", "./img/transcpAnswers/42.png", "./img/transcpAnswers/43.png", "./img/transcpAnswers/44.png", "./img/transcpAnswers/45.png", "./img/transcpAnswers/46.png", "./img/transcpAnswers/47.png", "./img/transcpAnswers/48.png", "./img/transcpAnswers/49.png", "./img/transcpAnswers/50.png", "./img/transcpAnswers/bgcolor.jpg" ]) }) ) }); self.addEventListener("fetch", e=> { e.respondWith( caches.match(e.request).then(response => { return response || fetch(e.request) }) ) });
// lorem text const text = [ `Jelly sweet roll jelly beans biscuit pie macaroon chocolate donut. Carrot cake caramels pie sweet apple pie tiramisu carrot cake. Marzipan marshmallow croissant tootsie roll lollipop. Cupcake lemon drops bear claw gummies. Jelly bear claw gummi bears lollipop cotton candy gummi bears chocolate bar cake cookie. Cupcake muffin danish muffin cookie gummies. Jelly beans tiramisu pudding. Toffee soufflé chocolate cake pastry brownie. Oat cake halvah sweet roll cotton candy croissant lollipop. Macaroon tiramisu chocolate bar candy candy carrot cake jelly sweet. Gummies croissant macaroon dessert. Chocolate cake dragée pie.`, `Next level tbh everyday carry, blog copper mug forage kitsch roof party pickled hammock kale chips tofu. Etsy shoreditch 8-bit microdosing, XOXO viral butcher banh mi humblebrag listicle woke bicycle rights brunch before they sold out ramps. Twee shabby chic taiyaki flannel, enamel pin venmo vape four loko. Hexagon kale chips typewriter kitsch 8-bit organic plaid small batch keffiyeh ethical banh mi narwhal echo park cronut.`, `Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro. De carne lumbering animata corpora quaeritis. Summus brains sit​​, morbo vel maleficia? De apocalypsi gorger omero undead survivor dictum mauris. Hi mindless mortuis soulless creaturas, imo evil stalking monstra adventus resi dentevil vultus comedat cerebella viventium. Qui animated corpse, cricket bat max brucks terribilem incessu zomby. The voodoo sacerdos flesh eater, suscitat mortuos comedere carnem virus. Zonbi tattered for solum oculi eorum defunctis go lum cerebro. Nescio brains an Undead zombies. Sicut malus putrid voodoo horror. Nigh tofth eliv ingdead.`, `Cat gets stuck in tree firefighters try to get cat down firefighters get stuck in tree cat eats firefighters' slippers kitty power ignore the squirrels, you'll never catch them anyway for what a cat-ass-trophy! or purr as loud as possible, be the most annoying cat that you can, and, knock everything off the table. Pretend you want to go out but then don't bite off human's toes, yet disappear for four days and return home with an expensive injury; bite the vet so catch eat throw up catch eat throw up bad birds. `, `This opera's as lousy as it is brilliant! Your lyrics lack subtlety. You can't just have your characters announce how they feel. That makes me feel angry! Anyhoo, your net-suits will allow you to experience Fry's worm infested bowels as if you were actually wriggling through them. I just told you! You've killed me! Fry! Quit doing the right thing, you jerk! Michelle, I don't regret this, but I both rue and lament it. Morbo can't understand his teleprompter because he forgot how you say that letter that's shaped like a man wearing a hat.`, `Airedale hard cheese mozzarella. Pecorino melted cheese port-salut emmental babybel cheese and wine melted cheese manchego. Everyone loves blue castello everyone loves fromage cheese slices airedale cheddar cream cheese. Bavarian bergkase who moved my cheese halloumi port-salut gouda jarlsberg ricotta rubber cheese. Stinking bishop smelly cheese brie.`, `Salvia glossier subway tile, leggings mustache YOLO semiotics chia. Pitchfork tbh af blog church-key meggings vaporware PBR&B master cleanse post-ironic man bun pabst mustache letterpress synth. Snackwave raw denim godard, 3 wolf moon shaman offal kitsch unicorn live-edge selvage schlitz fashion axe vaporware drinking vinegar prism. Shabby chic tacos artisan, chambray chicharrones cardigan leggings typewriter af pop-up williamsburg meditation PBR&B viral. You probably haven't heard of them DIY jean shorts subway tile fashion axe bushwick kitsch tumeric cloud bread vaporware freegan franzen pork belly chicharrones banh mi.`, `Man braid celiac synth freegan readymade, pitchfork fam salvia waistcoat lomo bitters gentrify four loko. Pitchfork semiotics post-ironic vegan. Tofu meditation microdosing hashtag semiotics venmo. Flexitarian vape tilde taiyaki. Prism poutine farm-to-table, messenger bag vegan taxidermy tattooed sartorial squid jean shorts fixie selvage trust fund vape.`, `Rutters Plate Fleet boom chandler Brethren of the Coast handsomely lookout marooned brigantine knave. Buccaneer gangway jack rum loot spyglass line Jack Tar fore gaff. Gaff topmast scuttle ballast swab draught measured fer yer chains dance the hempen jig Chain Shot yardarm.`, ]; export { text }
//>>built define("dojox/dgauges/ScaleIndicatorBase",["dojo/_base/lang","dojo/_base/declare","dojo/_base/window","dojo/on","dojo/touch","dojo/_base/fx","dojox/gfx","dojox/widget/_Invalidating","./IndicatorBase"],function(_1,_2,_3,on,_4,fx,_5,_6,_7){ return _2("dojox.dgauges.ScaleIndicatorBase",_7,{scale:null,value:0,interactionArea:"gauge",interactionMode:"mouse",animationDuration:0,animationEaser:null,_indicatorShapeFuncFlag:true,_interactionAreaFlag:true,_downListeners:null,_cursorListeners:null,_moveAndUpListeners:null,_transitionValue:NaN,_preventAnimation:false,_animation:null,constructor:function(){ this.watch("value",_1.hitch(this,function(){ this.valueChanged(this); })); this.watch("value",_1.hitch(this,this._startAnimation)); this.watch("interactionArea",_1.hitch(this,function(){ this._interactionAreaFlag=true; })); this.watch("interactionMode",_1.hitch(this,function(){ this._interactionAreaFlag=true; })); this.watch("indicatorShapeFunc",_1.hitch(this,function(){ this._indicatorShapeFuncFlag=true; })); this.addInvalidatingProperties(["scale","value","indicatorShapeFunc","interactionArea","interactionMode"]); this._downListeners=[]; this._moveAndUpListeners=[]; this._cursorListeners=[]; },_startAnimation:function(_8,_9,_a){ if(this.animationDuration===0){ return; } if(this._animation&&(this._preventAnimation||_9==_a)){ this._animation.stop(); return; } this._animation=new fx.Animation({curve:[_9,_a],duration:this.animationDuration,easing:this.animationEaser?this.animationEaser:fx._defaultEasing,onAnimate:_1.hitch(this,this._updateAnimation),onEnd:_1.hitch(this,this._endAnimation),onStop:_1.hitch(this,this._endAnimation)}); this._animation.play(); },_updateAnimation:function(v){ this._transitionValue=v; this.invalidateRendering(); },_endAnimation:function(){ this._transitionValue=NaN; this.invalidateRendering(); },refreshRendering:function(){ if(this._gfxGroup===null||this.scale===null){ return; }else{ if(this._indicatorShapeFuncFlag&&_1.isFunction(this.indicatorShapeFunc)){ this._gfxGroup.clear(); this.indicatorShapeFunc(this._gfxGroup,this); this._indicatorShapeFuncFlag=false; } if(this._interactionAreaFlag){ this._interactionAreaFlag=this._connectDownListeners(); } } },valueChanged:function(_b){ on.emit(this,"valueChanged",{target:this,bubbles:true,cancelable:true}); },_disconnectDownListeners:function(){ for(var i=0;i<this._downListeners.length;i++){ this._downListeners[i].remove(); } this._downListeners=[]; },_disconnectMoveAndUpListeners:function(){ for(var i=0;i<this._moveAndUpListeners.length;i++){ this._moveAndUpListeners[i].remove(); } this._moveAndUpListeners=[]; },_disconnectListeners:function(){ this._disconnectDownListeners(); this._disconnectMoveAndUpListeners(); this._disconnectCursorListeners(); },_connectCursorListeners:function(_c){ var _d=_c.on(_4.over,_1.hitch(this,function(){ this.scale._gauge._setCursor("pointer"); })); this._cursorListeners.push(_d); _d=_c.on(_4.out,_1.hitch(this,function(_e){ this.scale._gauge._setCursor(""); })); this._cursorListeners.push(_d); },_disconnectCursorListeners:function(){ for(var i=0;i<this._cursorListeners.length;i++){ this._cursorListeners[i].remove(); } this._cursorListeners=[]; },_connectDownListeners:function(){ this._disconnectDownListeners(); this._disconnectCursorListeners(); var _f=null; if(this.interactionMode=="mouse"||this.interactionMode=="touch"){ if(this.interactionArea=="indicator"){ _f=this._gfxGroup.on(_4.press,_1.hitch(this,this._onMouseDown)); this._downListeners.push(_f); this._connectCursorListeners(this._gfxGroup); }else{ if(this.interactionArea=="gauge"){ if(!this.scale||!this.scale._gauge||!this.scale._gauge._gfxGroup){ return true; } _f=this.scale._gauge._gfxGroup.on(_4.press,_1.hitch(this,this._onMouseDown)); this._downListeners.push(_f); _f=this._gfxGroup.on(_4.press,_1.hitch(this,this._onMouseDown)); this._downListeners.push(_f); this._connectCursorListeners(this.scale._gauge._gfxGroup); }else{ if(this.interactionArea=="area"){ if(!this.scale||!this.scale._gauge||!this.scale._gauge._baseGroup){ return true; } _f=this.scale._gauge._baseGroup.on(_4.press,_1.hitch(this,this._onMouseDown)); this._downListeners.push(_f); _f=this._gfxGroup.on(_4.press,_1.hitch(this,this._onMouseDown)); this._downListeners.push(_f); this._connectCursorListeners(this.scale._gauge._baseGroup); } } } } return false; },_connectMoveAndUpListeners:function(){ var _10=null; _10=on(_3.doc,_4.move,_1.hitch(this,this._onMouseMove)); this._moveAndUpListeners.push(_10); _10=on(_3.doc,_4.release,_1.hitch(this,this._onMouseUp)); this._moveAndUpListeners.push(_10); },_onMouseDown:function(_11){ this._connectMoveAndUpListeners(); this._startEditing(); },_onMouseMove:function(_12){ this._preventAnimation=true; if(this._animation){ this._animation.stop(); } },_onMouseUp:function(_13){ this._disconnectMoveAndUpListeners(); this._preventAnimation=false; this._endEditing(); },_startEditing:function(){ if(!this.scale||!this.scale._gauge){ return; }else{ this.scale._gauge.onStartEditing({indicator:this}); } },_endEditing:function(){ if(!this.scale||!this.scale._gauge){ return; }else{ this.scale._gauge.onEndEditing({indicator:this}); } }}); });
const textHandler = require('./textResponses.js'); const getHelloJSON = (request, response) => { const helloJSON = { message: textHandler.hello, }; const stringMessage = JSON.stringify(helloJSON); response.writeHead(200, { 'Content-Type': 'application/json' }); response.write(stringMessage); response.end(); }; const getTimeJSON = (request, response) => { const timeJSON = { time: textHandler.getTimeString(), }; const stringMessage = JSON.stringify(timeJSON); response.writeHead(200, { 'Content-Type': 'application/json' }); response.write(stringMessage); response.end(); }; module.exports = { getHelloJSON, getTimeJSON, };
'use strict'; import { module } from 'angular'; import _ from 'lodash'; import { CollapsibleSectionStateCache } from 'core/cache'; import { HEALTH_COUNTS_COMPONENT } from 'core/healthCounts/healthCounts.component'; import { UrlBuilder } from 'core/navigation'; import { ClusterState } from 'core/state'; import { TIME_FORMATTERS } from 'core/utils/timeFormatters'; import { CORE_PROJECTS_DASHBOARD_REGIONFILTER_REGIONFILTER_SERVICE } from '../regionFilter/regionFilter.service'; import './projectCluster.less'; export const CORE_PROJECTS_DASHBOARD_CLUSTER_PROJECTCLUSTER_DIRECTIVE = 'spinnaker.core.projects.dashboard.clusters.projectCluster.directive'; export const name = CORE_PROJECTS_DASHBOARD_CLUSTER_PROJECTCLUSTER_DIRECTIVE; // for backwards compatibility module(CORE_PROJECTS_DASHBOARD_CLUSTER_PROJECTCLUSTER_DIRECTIVE, [ TIME_FORMATTERS, HEALTH_COUNTS_COMPONENT, CORE_PROJECTS_DASHBOARD_REGIONFILTER_REGIONFILTER_SERVICE, ]) .directive('projectCluster', function () { return { restrict: 'E', templateUrl: require('./projectCluster.directive.html'), scope: {}, bindToController: { project: '=', cluster: '=', }, controller: 'ProjectClusterCtrl', controllerAs: 'vm', }; }) .controller('ProjectClusterCtrl', [ '$scope', 'regionFilterService', function ($scope, regionFilterService) { const stateCache = CollapsibleSectionStateCache; const getCacheKey = () => [this.project.name, this.cluster.account, this.cluster.stack].join(':'); this.clearFilters = (r) => ClusterState.filterService.overrideFiltersForUrl(r); this.refreshTooltipTemplate = require('./projectClusterRefresh.tooltip.html'); this.inconsistentBuildsTemplate = require('./inconsistentBuilds.tooltip.html'); this.toggle = () => { this.state.expanded = !this.state.expanded; stateCache.setExpanded(getCacheKey(), this.state.expanded); }; const getMetadata = (application) => { const stack = this.cluster.stack; const detail = this.cluster.detail; const clusterParam = !stack && !detail ? application.name : null; const stackParam = stack && stack !== '*' ? stack : null; const detailParam = detail && detail !== '*' ? detail : null; return { type: 'clusters', project: this.project.name, application: application.application, cluster: clusterParam, stack: stackParam, detail: detailParam, account: this.cluster.account, }; }; const addMetadata = (application) => { const baseMetadata = getMetadata(application); application.metadata = baseMetadata; application.metadata.href = UrlBuilder.buildFromMetadata(baseMetadata); application.clusters.forEach((cluster) => { const clusterMetadata = getMetadata(application); clusterMetadata.region = cluster.region; clusterMetadata.href = UrlBuilder.buildFromMetadata(clusterMetadata); cluster.metadata = clusterMetadata; }); }; const getBuildUrl = (build) => [build.host + 'job', build.job, build.buildNumber, ''].join('/'); const addApplicationBuild = (application) => { const allBuilds = _.chain((application.clusters || []).map((cluster) => cluster.builds)) .flatten() .compact() .uniqBy((build) => build.buildNumber) .value(); if (allBuilds.length) { application.build = _.maxBy(allBuilds, (build) => Number(build.buildNumber)); application.build.url = getBuildUrl(application.build); application.hasInconsistentBuilds = allBuilds.length > 1; } }; const applyInconsistentBuildFlag = (application) => { application.clusters.forEach((cluster) => { const builds = cluster.builds || []; if (builds.length && (builds.length > 1 || builds[0].buildNumber !== application.build.buildNumber)) { application.hasInconsistentBuilds = true; cluster.inconsistentBuilds = cluster.builds.filter( (build) => build.buildNumber !== application.build.buildNumber, ); } }); }; const mapClustersToRegions = (cluster, application) => { application.regions = {}; cluster.regions.forEach((region) => { application.regions[region] = _.find( application.clusters, (regionCluster) => regionCluster.region === region, ); }); }; const addRegions = (cluster) => { cluster.regions = _.uniq( _.flatten( cluster.applications.map((application) => application.clusters.map((regionCluster) => regionCluster.region), ), ), ).sort(); }; const setViewRegions = (updatedFilter) => { const unfilteredRegions = this.cluster.regions; if (Object.keys(_.filter(updatedFilter)).length) { this.regions = unfilteredRegions.filter((region) => updatedFilter[region]); } else { this.regions = unfilteredRegions; } }; const setViewInstanceCounts = (updatedFilter) => { if (Object.keys(_.filter(updatedFilter)).length) { this.instanceCounts = _.chain(this.cluster.applications) .map('clusters') .flatten() .value() .reduce((instanceCounts, cluster) => { if (updatedFilter[cluster.region]) { _.forEach(cluster.instanceCounts, (count, key) => { if (!instanceCounts[key]) { instanceCounts[key] = 0; } instanceCounts[key] += count; }); } return instanceCounts; }, {}); } else { this.instanceCounts = this.cluster.instanceCounts; } }; const initialize = () => { this.state = { expanded: stateCache.isSet(getCacheKey()) ? stateCache.isExpanded(getCacheKey()) : true, }; [setViewInstanceCounts, setViewRegions].forEach((cb) => { regionFilterService.registerCallback(cb); $scope.$on('$destroy', () => regionFilterService.deregisterCallback(cb)); }); addRegions(this.cluster); regionFilterService.runCallbacks(); this.cluster.applications.forEach((application) => { mapClustersToRegions(this.cluster, application); addApplicationBuild(application); applyInconsistentBuildFlag(application); addMetadata(application); }); this.clusterLabel = this.cluster.detail ? [this.cluster.stack, this.cluster.detail].join('-') : this.cluster.stack; }; this.$onInit = () => initialize(); }, ]);
/** * Copyright 2013-2020 the original author or authors from the JHipster project. * * This file is part of the JHipster project, see https://www.jhipster.tech/ * for more information. * * 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 * * https://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 path = require('path'); const FileReader = require('./file-reader'); const { upperFirst } = require('../utils/string-utils'); module.exports = { readJSONFile, toFilePath, }; /** * Reads a JSON file. * @param filePath the JSON file's path * @return its content */ function readJSONFile(filePath) { return JSON.parse(FileReader.readFile(filePath)); } /** * From an entity's name, gives the expected file path. * @param entityName the entity's name. * @returns {string} the file's path. */ function toFilePath(entityName) { if (!entityName) { throw new Error('The passed entity name must not be nil to be converted to file path.'); } return path.join('.jhipster', `${upperFirst(entityName)}.json`); }
import React from 'react' import TestRenderer from 'react-test-renderer' import Hide from '../src' const renderJSON = el => TestRenderer.create(el).toJSON() describe('@rebass/hide', () => { test.skip('Mapped renders', () => { const json = renderJSON( <Mapped xsmall small /> ) expect(json.props.display).toEqual([ 'none', 'none', 'block', 'block', 'block', ]) }) test('Hide renders', () => { const json = renderJSON( <Hide xsmall small medium large xlarge /> ) expect(json).toMatchSnapshot() expect(json).toHaveStyleRule('display', 'none', { // media: 'screen and (min-width:40em)' }) }) })
/* src/schema.js */ const schema = ` schema { query: Query } `; const Query = ` type Query { hello: Hello! } `; const Hello = ` type Hello { world: World! } `; const World = ` type World { text: String! } `; export default [schema, Query, Hello, World];
import app from './src/boot.js'
/** * User: KGoulding * Date: 9/18/12 * Time: 3:36 PM */ (function () { // self-invoking function /** * @class SAS.PriorityDialog * @extends SAS.AFieldDialog * @constructor **/ SAS.PriorityDialog = function (/**SAS.PriorityDef*/ priority) { var _self = this; /** @type SAS.AFieldDialog */ var _super = SAS.Inheritance.Extend(this, new SAS.AFieldDialog()); var DIALOG_ID = "priority_dialog"; _super._init(DIALOG_ID); //region private fields and methods /** @type SAS.PriorityDef */ var _priority = priority; var _$title; var _$description; var _$nickname; var _$imagePane; var _buildContent = function ($dlg) { var $inputsDiv = $("<div></div>").appendTo($dlg); _$title = _super.p_mkShortTextField('pd_title', "Title", $inputsDiv, _priority.title); _$nickname = _super.p_mkShortTextField('pd_nickname', "Nickname (optional short version of title)", $inputsDiv, _priority.nickname); _$description = _super.p_mkLongTextField('pd_description', 'Description', $inputsDiv, _priority.description); _$imagePane = $("<div class='panel'>").appendTo($inputsDiv); _addImagePane(); }; var _drawRow = function (file) { var $row = $("<div>").appendTo(_$imagePane); $('<div>').text('Your icon should appear twice below (black on the left, red on the right). This is to ensure your icons can be dynamically colored.').appendTo($row); $('<img src="' + file.thumbnail_url + '?color=black"}">').appendTo($row); $('<img src="' + file.thumbnail_url + '?color=crimson"}">').appendTo($row); $('<span/>').text(file.name).appendTo($row); $('<button/>').text("delete").appendTo($row).click(function () { $.post('/deletefile/', {groupId:_priority.uid, name:file.name}, function () { $row.remove(); }); }); }; var _addImagePane = function () { $('<div>').text('SVG file for icon:').appendTo(_$imagePane); var $chooseFilesBtn = $('<input type="file" data-url="/fileupload">').appendTo(_$imagePane); $chooseFilesBtn.attr("name", _priority.uid); $.getJSON('/getImage/' + _priority.uid, function (file) { _drawRow(file); }); $chooseFilesBtn.fileupload({ dataType:'json', done:function (e, data) { $.each(data.result, function (index, file) { _drawRow(file); }); } }); }; var _applyChanges = function () { var vals = {}; vals.title = _$title.val(); vals.description = _$description.val(); vals.nickname = _$nickname.val(); SAS.localizr.set(_priority, vals); }; var _showDialog = function (onAccept, onCancel) { var $dlg = _super._prepareToShowDialog(); _buildContent($dlg); var title = "Edit Priority"; var buttons = { "Cancel":function () { _super._closeDialog(); if (onCancel) onCancel(); }, "OK":function () { _applyChanges(); onAccept(); _super._closeDialog(); }}; _super._dialog(title, {modal:true, buttons:buttons, width:500, defaultButtonNum:1 }); }; //endregion //region protected fields and methods (use '_' to differentiate). //this._getFoo = function() { ... //endregion //region public API /** * @param {Function} [onAccept] callback to run if user accepts changes * @param {Function} [onCancel] callback to run if user cancels */ this.showDialog = function (onAccept, onCancel) { _showDialog(onAccept, onCancel); }; //endregion } })();
var callbackArguments = []; var argument1 = {"25":1.4537905018560516e+308,"1.5870976240427908e+308":126,"(":6.274704700864123e+306}; var argument2 = "f"; var argument3 = "GiN"; var base_0 = [82,655,460,403,"G",-100,"4"] var r_0= undefined try { r_0 = base_0.forEach(argument1,argument2,argument3) } catch(e) { r_0= "Error" } function serialize(array){ return array.map(function(a){ if (a === null || a == undefined) return a; var name = a.constructor.name; if (name==='Object' || name=='Boolean'|| name=='Array'||name=='Number'||name=='String') return JSON.stringify(a); return name; }); } setTimeout(function(){ require("fs").writeFileSync("./experiments/forEach/forEachRandom/test16.json",JSON.stringify({"baseObjects":serialize([base_0]),"returnObjects":serialize([r_0]),"callbackArgs":callbackArguments})) },300)
import{_ as e}from"./TableImg.796610fd.js";import{f as o}from"./BasicForm.adb2a199.js";import{u as i}from"./useTable.82511bdc.js";import{g as n,d as t}from"./account.9b012d94.js";import{P as s}from"./index.c1dc3b6b.js";import{b as r}from"./index.13a30da8.js";import a from"./AccountModal.cb270241.js";import d from"./PasswordModal.3e997250.js";import c from"./SetGroupModal.424a501b.js";import{c as l,s as u}from"./account.data.54aff4b6.js";import{j as m,br as p,by as f,ci as b,r as g,K as j,o as h,m as w,n as S,Q as v,Y as x}from"./vendor.686fd1d4.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./useForm.40c52001.js";import"./index.04486bdf.js";/* empty css *//* empty css *//* empty css */import"./uuid.2b29000c.js";import"./useWindowSizeFn.d82e06bf.js";import"./onMountedOrActivated.172ad1ec.js";/* empty css */import"./useSortable.979115a3.js";/* empty css *//* empty css *//* empty css */import"./index.a84c0e16.js";/* empty css *//* empty css *//* empty css */import"./download.45a835c8.js";import"./base64Conver.bb012c73.js";import"./index.9702aa73.js";import"./useContentViewHeight.c5b829cb.js";/* empty css */import"./group.43c8d564.js";var C=m({name:"Account",components:{BasicTable:e,PageWrapper:s,AccountModal:a,PasswordModal:d,SetGroupModal:c,TableAction:o,Avatar:p,Image:f,UserOutlined:b},setup(){const[e,{openModal:o}]=r(),[s,{openModal:a}]=r(),[d,{openModal:c}]=r(),m=g(""),p=g(!1),[f,{reload:b}]=i({title:"列表",api:n,columns:l,formConfig:{labelWidth:120,schemas:u,showAdvancedButton:!1,showResetButton:!1,autoSubmitOnEnter:!0},canColDrag:!0,useSearchForm:!0,bordered:!0,showIndexColumn:!1,actionColumn:{width:160,title:"操作",dataIndex:"action",slots:{customRender:"action"},fixed:!1}});return{registerTable:f,registerModal:e,registerPasswordModal:s,registerSetGroupModal:d,previewImage:m,previewImageVisible:p,previewImageHandle:function(e){e&&(m.value=e,p.value=!0)},previewImageVisibleChange:function(e,o){p.value=e},handleCreate:function(){o(!0,{isUpdate:!1})},handleEdit:function(e){o(!0,{record:e,isUpdate:!0})},handleSetPassword:function(e){a(!0,{record:e,isUpdate:!0})},handleSetGroup:function(e){c(!0,{record:e,isUpdate:!0})},handleDelete:function(e){t([e.id]).then((e=>{b()}))},handleSuccess:function(){b()},handlePasswordSuccess:function(){b()},handleSetGroupSuccess:function(){b()}}}});const M=x(" 新增 "),I={style:{width:"0",height:"0",overflow:"hidden"}};C.render=function(e,o,i,n,t,s){const r=j("a-button"),a=j("TableAction"),d=j("UserOutlined"),c=j("Avatar"),l=j("BasicTable"),u=j("Image"),m=j("AccountModal"),p=j("PasswordModal"),f=j("SetGroupModal");return h(),w("div",null,[S(l,{onRegister:e.registerTable},{toolbar:v((()=>[S(r,{type:"primary",onClick:e.handleCreate},{default:v((()=>[M])),_:1},8,["onClick"])])),action:v((({record:o})=>[S(a,{actions:[{title:"分配组",icon:"ant-design:usergroup-add",onClick:e.handleSetGroup.bind(null,o)},{title:"设置密码",icon:"ant-design:setting-outlined",onClick:e.handleSetPassword.bind(null,o)},{title:"修改",icon:"clarity:note-edit-line",onClick:e.handleEdit.bind(null,o)},{title:"删除",icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:"是否确认删除",confirm:e.handleDelete.bind(null,o)}}]},null,8,["actions"])])),imageRender:v((({record:o})=>[S(c,{src:o.image,onClick:i=>e.previewImageHandle(o.image)},{icon:v((()=>[S(d)])),_:2},1032,["src","onClick"])])),_:1},8,["onRegister"]),S("div",I,[S(u,{width:0,height:0,src:e.previewImage,preview:{visible:e.previewImageVisible,onVisibleChange:e.previewImageVisibleChange}},null,8,["src","preview"])]),S(m,{onRegister:e.registerModal,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"]),S(p,{onRegister:e.registerPasswordModal,onSuccess:e.handlePasswordSuccess},null,8,["onRegister","onSuccess"]),S(f,{onRegister:e.registerSetGroupModal,onSuccess:e.handleSetGroupSuccess},null,8,["onRegister","onSuccess"])])};export default C;
// This file defines functionality to search through known weapons and return matching results const Discord = require('discord.js'); const weaponsJSON = require('./weapons.json'); const messageHandler = require('./messageHandler.js'); module.exports = { lookup: async function(name){ if(messageHandler.badQuery(name)){ throw "Weapon search contains disallowed characters"; } name = name.toLowerCase(); let curLength = 0; let found = []; for(const id in weaponsJSON){ if(weaponsJSON[id].name.toLowerCase().includes(name)){ let info = `${weaponsJSON[id].name} [${id}]` if((curLength+info.length) > 1020){ found.push("..."); break; } else{ found.push(info); curLength += info.length+1; } } } if(found.length == 0){ throw "No weapons found matching that query"; } let resEmbed = new Discord.MessageEmbed(); resEmbed.setTitle("Weapon search results"); resEmbed.addField('\u200b', found); return resEmbed; } }
var miFunction = new Function("2+2"); var forma = " redonda "; var forma2 = new String(" redonda "); var size = 1; var miOtraFunction = function otraFuncion(){ console.log("no hago nada"); } console.log(typeof miFunction); console.log(typeof miOtraFunction); console.log(typeof forma); console.log(typeof size); if( typeof forma == 'string') { console.log(forma.trim()); }
Template.About.rendered = function(){$('#aboutTab').addClass('active')} Template.About.destroyed = function(){$('#aboutTab').removeClass('active')}