" ],
18 |
19 | _default: [ 0, "", "" ]
20 | };
21 |
22 | // Support: IE <=9 only
23 | wrapMap.optgroup = wrapMap.option;
24 |
25 | wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
26 | wrapMap.th = wrapMap.td;
27 |
28 | return wrapMap;
29 | } );
30 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/units/aliases.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from '../utils/has-own-prop';
2 |
3 | var aliases = {};
4 |
5 | export function addUnitAlias (unit, shorthand) {
6 | var lowerCase = unit.toLowerCase();
7 | aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
8 | }
9 |
10 | export function normalizeUnits(units) {
11 | return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
12 | }
13 |
14 | export function normalizeObjectUnits(inputObject) {
15 | var normalizedInput = {},
16 | normalizedProp,
17 | prop;
18 |
19 | for (prop in inputObject) {
20 | if (hasOwnProp(inputObject, prop)) {
21 | normalizedProp = normalizeUnits(prop);
22 | if (normalizedProp) {
23 | normalizedInput[normalizedProp] = inputObject[prop];
24 | }
25 | }
26 | }
27 |
28 | return normalizedInput;
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/public/components/jquery/src/attributes/support.js:
--------------------------------------------------------------------------------
1 | define( [
2 | "../var/document",
3 | "../var/support"
4 | ], function( document, support ) {
5 |
6 | "use strict";
7 |
8 | ( function() {
9 | var input = document.createElement( "input" ),
10 | select = document.createElement( "select" ),
11 | opt = select.appendChild( document.createElement( "option" ) );
12 |
13 | input.type = "checkbox";
14 |
15 | // Support: Android <=4.3 only
16 | // Default value for a checkbox should be "on"
17 | support.checkOn = input.value !== "";
18 |
19 | // Support: IE <=11 only
20 | // Must access selectedIndex to make default options select
21 | support.optSelected = opt.selected;
22 |
23 | // Support: IE <=11 only
24 | // An input loses its value after becoming a radio
25 | input = document.createElement( "input" );
26 | input.value = "t";
27 | input.type = "radio";
28 | support.radioValue = input.value === "t";
29 | } )();
30 |
31 | return support;
32 |
33 | } );
34 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/moment/to-type.js:
--------------------------------------------------------------------------------
1 | export function valueOf () {
2 | return this._d.valueOf() - ((this._offset || 0) * 60000);
3 | }
4 |
5 | export function unix () {
6 | return Math.floor(this.valueOf() / 1000);
7 | }
8 |
9 | export function toDate () {
10 | return new Date(this.valueOf());
11 | }
12 |
13 | export function toArray () {
14 | var m = this;
15 | return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
16 | }
17 |
18 | export function toObject () {
19 | var m = this;
20 | return {
21 | years: m.year(),
22 | months: m.month(),
23 | date: m.date(),
24 | hours: m.hours(),
25 | minutes: m.minutes(),
26 | seconds: m.seconds(),
27 | milliseconds: m.milliseconds()
28 | };
29 | }
30 |
31 | export function toJSON () {
32 | // new Date(NaN).toJSON() === null
33 | return this.isValid() ? this.toISOString() : null;
34 | }
35 |
--------------------------------------------------------------------------------
/controllers/users.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var router = express.Router();
3 | var User = require('../models/user');
4 |
5 | // POST user location
6 | router.post('/location', function (req, res, next) {
7 | var user = req.user;
8 | var post = req.body;
9 |
10 | if (post.status == 'add') {
11 | User.addLocation(user, post, function (err, result) {
12 | if (err) throw err;
13 | res.json('success');
14 | });
15 | } else if (post.status == 'remove') {
16 | User.removeLocation(user, post, function (err, result) {
17 | if (err) throw err;
18 | res.json('success');
19 | });
20 | }
21 | });
22 |
23 | router.get(/(?:.*-|)(.+)$/, function(req, res, next) {
24 | user_id = req.params[0].replace(/\//g, '');
25 |
26 | // redirect old-school upcoming urls
27 | if (/^\d+$/.test(user_id)) {
28 | res.redirect('http://archive.upcoming.org/user/' + user_id);
29 | return;
30 | }
31 | });
32 |
33 |
34 | module.exports = router;
--------------------------------------------------------------------------------
/models/comment.js:
--------------------------------------------------------------------------------
1 | var db = require('../db.js');
2 |
3 | // create a new comment
4 | exports.create = function(user, comment, next) {
5 | var post = {
6 | event_id: comment.event_id,
7 | user_id: user.id,
8 | comment_text: comment.comment_text
9 | };
10 |
11 | db.query('INSERT INTO comment SET created_at = NOW(), ?', post, function (err, result) {
12 | if (err) return next(err);
13 | next(null, post);
14 | });
15 | };
16 |
17 | /* find comments by event id */
18 | exports.getAllByEventId = function(event_id, next) {
19 | var sql = 'SELECT comment.comment_text, comment.created_at, '
20 | + 'user.name, user.avatar_image_url, user.username, comment.created_at '
21 | + 'FROM comment, user '
22 | + 'WHERE comment.user_id = user.id '
23 | + 'AND user.deleted = 0 '
24 | + 'AND comment.event_id = ?';
25 | db.query(sql, event_id, function (err, rows) {
26 | if (err) return next(err);
27 | next(null, rows);
28 | });
29 | };
30 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/locale/relative.js:
--------------------------------------------------------------------------------
1 | export var defaultRelativeTime = {
2 | future : 'in %s',
3 | past : '%s ago',
4 | s : 'a few seconds',
5 | ss : '%d seconds',
6 | m : 'a minute',
7 | mm : '%d minutes',
8 | h : 'an hour',
9 | hh : '%d hours',
10 | d : 'a day',
11 | dd : '%d days',
12 | M : 'a month',
13 | MM : '%d months',
14 | y : 'a year',
15 | yy : '%d years'
16 | };
17 |
18 | import isFunction from '../utils/is-function';
19 |
20 | export function relativeTime (number, withoutSuffix, string, isFuture) {
21 | var output = this._relativeTime[string];
22 | return (isFunction(output)) ?
23 | output(number, withoutSuffix, string, isFuture) :
24 | output.replace(/%d/i, number);
25 | }
26 |
27 | export function pastFuture (diff, output) {
28 | var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
29 | return isFunction(format) ? format(output) : format.replace(/%s/i, output);
30 | }
31 |
--------------------------------------------------------------------------------
/public/components/jquery/src/deprecated.js:
--------------------------------------------------------------------------------
1 | define( [
2 | "./core",
3 | "./core/nodeName"
4 | ], function( jQuery, nodeName ) {
5 |
6 | "use strict";
7 |
8 | jQuery.fn.extend( {
9 |
10 | bind: function( types, data, fn ) {
11 | return this.on( types, null, data, fn );
12 | },
13 | unbind: function( types, fn ) {
14 | return this.off( types, null, fn );
15 | },
16 |
17 | delegate: function( selector, types, data, fn ) {
18 | return this.on( types, selector, data, fn );
19 | },
20 | undelegate: function( selector, types, fn ) {
21 |
22 | // ( namespace ) or ( selector, types [, fn] )
23 | return arguments.length === 1 ?
24 | this.off( selector, "**" ) :
25 | this.off( types, selector || "**", fn );
26 | }
27 | } );
28 |
29 | jQuery.holdReady = function( hold ) {
30 | if ( hold ) {
31 | jQuery.readyWait++;
32 | } else {
33 | jQuery.ready( true );
34 | }
35 | };
36 | jQuery.isArray = Array.isArray;
37 | jQuery.parseJSON = JSON.parse;
38 | jQuery.nodeName = nodeName;
39 |
40 | } );
41 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/locale/locale.js:
--------------------------------------------------------------------------------
1 | // Side effect imports
2 | import './prototype';
3 |
4 | import {
5 | getSetGlobalLocale,
6 | defineLocale,
7 | updateLocale,
8 | getLocale,
9 | listLocales
10 | } from './locales';
11 |
12 | import {
13 | listMonths,
14 | listMonthsShort,
15 | listWeekdays,
16 | listWeekdaysShort,
17 | listWeekdaysMin
18 | } from './lists';
19 |
20 | export {
21 | getSetGlobalLocale,
22 | defineLocale,
23 | updateLocale,
24 | getLocale,
25 | listLocales,
26 | listMonths,
27 | listMonthsShort,
28 | listWeekdays,
29 | listWeekdaysShort,
30 | listWeekdaysMin
31 | };
32 |
33 | import { deprecate } from '../utils/deprecate';
34 | import { hooks } from '../utils/hooks';
35 |
36 | hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
37 | hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
38 |
39 | import './en';
40 |
--------------------------------------------------------------------------------
/public/components/geocomplete/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "geocomplete",
3 | "version": "1.6.5",
4 | "homepage": "http://ubilabs.github.com/geocomplete/",
5 | "authors": [
6 | "Martin Kleppe "
7 | ],
8 | "description": "jQuery Geocoding and Places Autocomplete Plugin",
9 | "main": "jquery.geocomplete.js",
10 | "keywords": [
11 | "geocoding",
12 | "map",
13 | "places",
14 | "api",
15 | "search",
16 | "google"
17 | ],
18 | "license": "MIT",
19 | "dependencies": {
20 | "jquery": ">= 1.9.0"
21 | },
22 | "ignore": [
23 | "**/.*",
24 | "node_modules",
25 | "bower_components",
26 | "test",
27 | "tests"
28 | ],
29 | "_release": "1.6.5",
30 | "_resolution": {
31 | "type": "version",
32 | "tag": "1.6.5",
33 | "commit": "c6bebe81bdc21d3ee56c05c31bf961123597cfce"
34 | },
35 | "_source": "git://github.com/ubilabs/geocomplete.git",
36 | "_target": "~1.6.5",
37 | "_originalSource": "geocomplete",
38 | "_direct": true
39 | }
--------------------------------------------------------------------------------
/public/components/geocomplete/examples/location.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GeoComplete
5 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "upcoming-www",
3 | "version": "0.0.0",
4 | "private": true,
5 | "scripts": {
6 | "start": "node ./bin/www"
7 | },
8 | "dependencies": {
9 | "@aws-sdk/client-s3": "^3.353.0",
10 | "@superfaceai/passport-twitter-oauth2": "^1.2.3",
11 | "axios": "^1.4.0",
12 | "body-parser": "~1.19.0",
13 | "config": "^3.2.4",
14 | "connect-ensure-login": "^0.1.1",
15 | "connect-redis": "^4.0.3",
16 | "cookie-parser": "~1.4.4",
17 | "debug": "~4.1.1",
18 | "express": "~4.17.1",
19 | "express-session": "^1.17.0",
20 | "express-validator": "^6.2.0",
21 | "helmet": "^3.21.2",
22 | "marked": "^0.7.0",
23 | "moment": "^2.24.0",
24 | "morgan": "~1.9.1",
25 | "mysql": "^2.17.1",
26 | "nid": "^0.3.2",
27 | "node-foursquare-venues": "^1.1.0",
28 | "passport": "^0.4.0",
29 | "pug": "^3.0.2",
30 | "redis": "^2.8.0",
31 | "request": "^2.88.2",
32 | "serve-favicon": "~2.5.0",
33 | "slug": "^1.1.0",
34 | "truncate": "^2.1.0",
35 | "twix": "^1.3.0"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/parse/token.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from '../utils/has-own-prop';
2 | import isNumber from '../utils/is-number';
3 | import toInt from '../utils/to-int';
4 |
5 | var tokens = {};
6 |
7 | export function addParseToken (token, callback) {
8 | var i, func = callback;
9 | if (typeof token === 'string') {
10 | token = [token];
11 | }
12 | if (isNumber(callback)) {
13 | func = function (input, array) {
14 | array[callback] = toInt(input);
15 | };
16 | }
17 | for (i = 0; i < token.length; i++) {
18 | tokens[token[i]] = func;
19 | }
20 | }
21 |
22 | export function addWeekParseToken (token, callback) {
23 | addParseToken(token, function (input, array, config, token) {
24 | config._w = config._w || {};
25 | callback(input, config._w, config, token);
26 | });
27 | }
28 |
29 | export function addTimeToArrayFromToken(token, input, config) {
30 | if (input != null && hasOwnProp(tokens, token)) {
31 | tokens[token](input, config._a, config, token);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/duration/valid.js:
--------------------------------------------------------------------------------
1 | import toInt from '../utils/to-int';
2 | import {Duration} from './constructor';
3 | import {createDuration} from './create';
4 |
5 | var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
6 |
7 | export default function isDurationValid(m) {
8 | for (var key in m) {
9 | if (!(ordering.indexOf(key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
10 | return false;
11 | }
12 | }
13 |
14 | var unitHasDecimal = false;
15 | for (var i = 0; i < ordering.length; ++i) {
16 | if (m[ordering[i]]) {
17 | if (unitHasDecimal) {
18 | return false; // only allow non-integers for smallest unit
19 | }
20 | if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
21 | unitHasDecimal = true;
22 | }
23 | }
24 | }
25 |
26 | return true;
27 | }
28 |
29 | export function isValid() {
30 | return this._isValid;
31 | }
32 |
33 | export function createInvalid() {
34 | return createDuration(NaN);
35 | }
36 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/moment/locale.js:
--------------------------------------------------------------------------------
1 | import { getLocale } from '../locale/locales';
2 | import { deprecate } from '../utils/deprecate';
3 |
4 | // If passed a locale key, it will set the locale for this
5 | // instance. Otherwise, it will return the locale configuration
6 | // variables for this instance.
7 | export function locale (key) {
8 | var newLocaleData;
9 |
10 | if (key === undefined) {
11 | return this._locale._abbr;
12 | } else {
13 | newLocaleData = getLocale(key);
14 | if (newLocaleData != null) {
15 | this._locale = newLocaleData;
16 | }
17 | return this;
18 | }
19 | }
20 |
21 | export var lang = deprecate(
22 | 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
23 | function (key) {
24 | if (key === undefined) {
25 | return this.localeData();
26 | } else {
27 | return this.locale(key);
28 | }
29 | }
30 | );
31 |
32 | export function localeData () {
33 | return this._locale;
34 | }
35 |
--------------------------------------------------------------------------------
/public/components/geocomplete/changelog.txt:
--------------------------------------------------------------------------------
1 | Version 1.6
2 |
3 | * Cycle through subtypes in address components.
4 | * Add "place_id" to places details.
5 | * Avoid exception if getPlace() returns undefined
6 |
7 | Version 1.5
8 |
9 | * Added autoselect option.
10 | * Add zoom_changed event support.
11 | * Fixed blur autocomplete.
12 | * Keep result at text input after focusout.
13 | * Add blur boolean option.
14 | * Add marker to map on initialize.
15 | * Add geocode:click event on the map.
16 |
17 | Version 1.4
18 |
19 | * Use lat/lng location option to set initial map
20 | * Return element after calling methods via API.
21 | * Add option markerOptions.disabled.
22 | * Add support for Places API componentRestrictions option
23 |
24 | Version 1.3
25 |
26 | * Add "name" to places details.
27 | * Add reference field from Places Details call.
28 |
29 | Version 1.2
30 |
31 | * Add "bounds" option to search within
32 | * Add "location" options to set default location.
33 |
34 | Version 1.1
35 |
36 | * Add API to access methods and properties from outside
37 | * Add events for draggable marker
38 |
39 | Version 1.0
40 |
41 | * Initial version
--------------------------------------------------------------------------------
/public/components/jquery/src/exports/amd.js:
--------------------------------------------------------------------------------
1 | define( [
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | "use strict";
6 |
7 | // Register as a named AMD module, since jQuery can be concatenated with other
8 | // files that may use define, but not via a proper concatenation script that
9 | // understands anonymous AMD modules. A named AMD is safest and most robust
10 | // way to register. Lowercase jquery is used because AMD module names are
11 | // derived from file names, and jQuery is normally delivered in a lowercase
12 | // file name. Do this after creating the global so that if an AMD module wants
13 | // to call noConflict to hide this version of jQuery, it will work.
14 |
15 | // Note that for maximum portability, libraries that are not jQuery should
16 | // declare themselves as anonymous modules, and avoid setting a global if an
17 | // AMD loader is present. jQuery is a special case. For more information, see
18 | // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
19 |
20 | if ( typeof define === "function" && define.amd ) {
21 | define( "jquery", [], function() {
22 | return jQuery;
23 | } );
24 | }
25 |
26 | } );
27 |
--------------------------------------------------------------------------------
/public/components/typeahead.js/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013-2014 Twitter, Inc
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/public/components/typeahead.js/src/bloodhound/tokenizers.js:
--------------------------------------------------------------------------------
1 | /*
2 | * typeahead.js
3 | * https://github.com/twitter/typeahead.js
4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
5 | */
6 |
7 | var tokenizers = (function() {
8 | 'use strict';
9 |
10 | return {
11 | nonword: nonword,
12 | whitespace: whitespace,
13 | obj: {
14 | nonword: getObjTokenizer(nonword),
15 | whitespace: getObjTokenizer(whitespace)
16 | }
17 | };
18 |
19 | function whitespace(str) {
20 | str = _.toStr(str);
21 | return str ? str.split(/\s+/) : [];
22 | }
23 |
24 | function nonword(str) {
25 | str = _.toStr(str);
26 | return str ? str.split(/\W+/) : [];
27 | }
28 |
29 | function getObjTokenizer(tokenizer) {
30 | return function setKey(keys) {
31 | keys = _.isArray(keys) ? keys : [].slice.call(arguments, 0);
32 |
33 | return function tokenize(o) {
34 | var tokens = [];
35 |
36 | _.each(keys, function(k) {
37 | tokens = tokens.concat(tokenizer(_.toStr(o[k])));
38 | });
39 |
40 | return tokens;
41 | };
42 | };
43 | }
44 | })();
45 |
--------------------------------------------------------------------------------
/public/components/corejs-typeahead/license:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013-2014 Twitter, Inc
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/public/components/geocomplete/MIT-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Ubilabs, http://ubilabs.net/
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/public/components/moment/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) JS Foundation and other contributors
2 |
3 | Permission is hereby granted, free of charge, to any person
4 | obtaining a copy of this software and associated documentation
5 | files (the "Software"), to deal in the Software without
6 | restriction, including without limitation the rights to use,
7 | copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the
9 | Software is furnished to do so, subject to the following
10 | conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/public/components/typeahead.js/typeahead.js.jquery.json:
--------------------------------------------------------------------------------
1 | {
2 | "licenses": [
3 | {
4 | "url": "https://github.com/twitter/typeahead.js/blob/master/LICENSE"
5 | }
6 | ],
7 | "dependencies": {
8 | "jquery": ">=1.7"
9 | },
10 | "docs": "https://github.com/twitter/typeahead.js",
11 | "demo": "http://twitter.github.com/typeahead.js/examples",
12 | "name": "typeahead.js",
13 | "title": "typeahead.js",
14 | "author": {
15 | "name": "Twitter, Inc.",
16 | "url": "https://twitter.com/twitteross"
17 | },
18 | "description": "fast and fully-featured autocomplete library",
19 | "keywords": [
20 | "typeahead",
21 | "autocomplete"
22 | ],
23 | "homepage": "http://twitter.github.com/typeahead.js",
24 | "bugs": "https://github.com/twitter/typeahead.js/issues",
25 | "maintainers": [
26 | {
27 | "name": "Jake Harding",
28 | "url": "https://twitter.com/JakeHarding"
29 | },
30 | {
31 | "name": "Tim Trueman",
32 | "url": "https://twitter.com/timtrueman"
33 | },
34 | {
35 | "name": "Veljko Skarich",
36 | "url": "https://twitter.com/vskarich"
37 | }
38 | ],
39 | "version": "0.11.1"
40 | }
--------------------------------------------------------------------------------
/public/components/moment/src/lib/units/day-of-year.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 | import { addUnitAlias } from './aliases';
3 | import { addUnitPriority } from './priorities';
4 | import { addRegexToken, match3, match1to3 } from '../parse/regex';
5 | import { daysInYear } from './year';
6 | import { createUTCDate } from '../create/date-from-array';
7 | import { addParseToken } from '../parse/token';
8 | import toInt from '../utils/to-int';
9 |
10 | // FORMATTING
11 |
12 | addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
13 |
14 | // ALIASES
15 |
16 | addUnitAlias('dayOfYear', 'DDD');
17 |
18 | // PRIORITY
19 | addUnitPriority('dayOfYear', 4);
20 |
21 | // PARSING
22 |
23 | addRegexToken('DDD', match1to3);
24 | addRegexToken('DDDD', match3);
25 | addParseToken(['DDD', 'DDDD'], function (input, array, config) {
26 | config._dayOfYear = toInt(input);
27 | });
28 |
29 | // HELPERS
30 |
31 | // MOMENTS
32 |
33 | export function getSetDayOfYear (input) {
34 | var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
35 | return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
36 | }
37 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/moment/calendar.js:
--------------------------------------------------------------------------------
1 | import { createLocal } from '../create/local';
2 | import { cloneWithOffset } from '../units/offset';
3 | import isFunction from '../utils/is-function';
4 | import { hooks } from '../utils/hooks';
5 |
6 | export function getCalendarFormat(myMoment, now) {
7 | var diff = myMoment.diff(now, 'days', true);
8 | return diff < -6 ? 'sameElse' :
9 | diff < -1 ? 'lastWeek' :
10 | diff < 0 ? 'lastDay' :
11 | diff < 1 ? 'sameDay' :
12 | diff < 2 ? 'nextDay' :
13 | diff < 7 ? 'nextWeek' : 'sameElse';
14 | }
15 |
16 | export function calendar (time, formats) {
17 | // We want to compare the start of today, vs this.
18 | // Getting start-of-today depends on whether we're local/utc/offset or not.
19 | var now = time || createLocal(),
20 | sod = cloneWithOffset(now, this).startOf('day'),
21 | format = hooks.calendarFormat(this, sod) || 'sameElse';
22 |
23 | var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
24 |
25 | return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
26 | }
27 |
--------------------------------------------------------------------------------
/public/js/global.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 | // apply event filters to tab views
3 | var filters = {};
4 | $('#filters').on('click', '.list-item a', function (e) {
5 | e.preventDefault();
6 |
7 | $(this).closest('.list-nav').find('a').removeClass('active');
8 | $(this).addClass('active');
9 |
10 | // pass selected filters to active tab
11 | $('#filters .active').each(function(){
12 | var category = $(this).data('cat');
13 | var filter = $(this).data('filter');
14 | filters[category] = filter;
15 | });
16 |
17 | $('.tab-pane.active').load($('#myTabs .active a').attr("data-url"), $.param(filters));
18 | });
19 |
20 | // load tabs on click
21 | $('#myTabs a').click(function (e) {
22 | e.preventDefault();
23 |
24 | var url = $(this).attr("data-url");
25 | var href = this.hash;
26 | var pane = $(this);
27 |
28 | // ajax load from data-url
29 | $(href).load(url, $.param(filters), function(result){
30 | pane.tab('show');
31 | });
32 | });
33 |
34 | // load first tab content when document is ready
35 | $('#all').load($('.active a').attr("data-url"), $.param(filters));
36 | });
--------------------------------------------------------------------------------
/public/components/jquery/src/manipulation/support.js:
--------------------------------------------------------------------------------
1 | define( [
2 | "../var/document",
3 | "../var/support"
4 | ], function( document, support ) {
5 |
6 | "use strict";
7 |
8 | ( function() {
9 | var fragment = document.createDocumentFragment(),
10 | div = fragment.appendChild( document.createElement( "div" ) ),
11 | input = document.createElement( "input" );
12 |
13 | // Support: Android 4.0 - 4.3 only
14 | // Check state lost if the name is set (#11217)
15 | // Support: Windows Web Apps (WWA)
16 | // `name` and `type` must use .setAttribute for WWA (#14901)
17 | input.setAttribute( "type", "radio" );
18 | input.setAttribute( "checked", "checked" );
19 | input.setAttribute( "name", "t" );
20 |
21 | div.appendChild( input );
22 |
23 | // Support: Android <=4.1 only
24 | // Older WebKit doesn't clone checked state correctly in fragments
25 | support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
26 |
27 | // Support: IE <=11 only
28 | // Make sure textarea (and checkbox) defaultValue is properly cloned
29 | div.innerHTML = "";
30 | support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
31 | } )();
32 |
33 | return support;
34 |
35 | } );
36 |
--------------------------------------------------------------------------------
/views/place.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block includes
4 | script.
5 | $.getScript('/js/watchlists.js');
6 |
7 | block content
8 | #main
9 | .page-header
10 | if place.properties
11 | if place.properties.country == 'United States'
12 | h2= place.properties.locality + ', ' + place.properties.region
13 | else
14 | h2= place.properties.locality + ', ' + place.properties.country
15 | else
16 | if place.country.name == 'United States'
17 | h2= place.locality.name + ', ' + place.region.name
18 | else
19 | h2= place.locality.name + ', ' + place.country.name
20 |
21 |
22 | .hidden-xs.col-sm-2
23 | .list-nav
24 | .list-item
25 | a(href='?sort=date') Latest
26 | .list-item
27 | a(href='?sort=popular') Popular
28 | .list-item
29 | a(href='?sort=new') Recently added
30 | .list-nav
31 | .list-item
32 | a(href='?when=future') Upcoming
33 | .list-item
34 | a(href='?when=past') Past Events
35 | .list-item
36 | a(href='?when=all') Anytime
37 |
38 | .col-xs-12.col-sm-6
39 | include event-list
40 |
41 | .col-xs-12.col-sm-6
--------------------------------------------------------------------------------
/public/components/moment/src/lib/units/day-of-month.js:
--------------------------------------------------------------------------------
1 | import { makeGetSet } from '../moment/get-set';
2 | import { addFormatToken } from '../format/format';
3 | import { addUnitAlias } from './aliases';
4 | import { addUnitPriority } from './priorities';
5 | import { addRegexToken, match1to2, match2 } from '../parse/regex';
6 | import { addParseToken } from '../parse/token';
7 | import { DATE } from './constants';
8 | import toInt from '../utils/to-int';
9 |
10 | // FORMATTING
11 |
12 | addFormatToken('D', ['DD', 2], 'Do', 'date');
13 |
14 | // ALIASES
15 |
16 | addUnitAlias('date', 'D');
17 |
18 | // PRIOROITY
19 | addUnitPriority('date', 9);
20 |
21 | // PARSING
22 |
23 | addRegexToken('D', match1to2);
24 | addRegexToken('DD', match1to2, match2);
25 | addRegexToken('Do', function (isStrict, locale) {
26 | // TODO: Remove "ordinalParse" fallback in next major release.
27 | return isStrict ?
28 | (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
29 | locale._dayOfMonthOrdinalParseLenient;
30 | });
31 |
32 | addParseToken(['D', 'DD'], DATE);
33 | addParseToken('Do', function (input, array) {
34 | array[DATE] = toInt(input.match(match1to2)[0], 10);
35 | });
36 |
37 | // MOMENTS
38 |
39 | export var getSetDayOfMonth = makeGetSet('Date', true);
40 |
--------------------------------------------------------------------------------
/public/components/typeahead.js/test/typeahead/event_bus_spec.js:
--------------------------------------------------------------------------------
1 | describe('EventBus', function() {
2 |
3 | beforeEach(function() {
4 | var $fixture;
5 |
6 | setFixtures(fixtures.html.input);
7 |
8 | $fixture = $('#jasmine-fixtures');
9 | this.$el = $fixture.find('.tt-input');
10 |
11 | this.eventBus = new EventBus({ el: this.$el });
12 | });
13 |
14 | it('#trigger should trigger event', function() {
15 | var spy = jasmine.createSpy();
16 |
17 | this.$el.on('typeahead:fiz', spy);
18 |
19 | this.eventBus.trigger('fiz');
20 | expect(spy).toHaveBeenCalled();
21 | });
22 |
23 | it('#before should return false if default was not prevented', function() {
24 | var spy = jasmine.createSpy();
25 |
26 | this.$el.on('typeahead:beforefiz', spy);
27 |
28 | expect(this.eventBus.before('fiz')).toBe(false);
29 | expect(spy).toHaveBeenCalled();
30 | });
31 |
32 | it('#before should return true if default was prevented', function() {
33 | var spy = jasmine.createSpy().andCallFake(prevent);
34 |
35 | this.$el.on('typeahead:beforefiz', spy);
36 |
37 | expect(this.eventBus.before('fiz')).toBe(true);
38 | expect(spy).toHaveBeenCalled();
39 |
40 | function prevent($e) { $e.preventDefault(); }
41 | });
42 | });
43 |
--------------------------------------------------------------------------------
/public/components/geocomplete/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "geocomplete",
3 | "version": "1.6.5",
4 | "description": "An advanced jQuery plugin that wraps the Google Maps API's [Geocoding](https://code.google.com/apis/maps/documentation/javascript/geocoding.html) and [Places Autocomplete](https://code.google.com/apis/maps/documentation/javascript/places.html#places_autocomplete) services. You simply provide an input that lets you search for locations with a nice autocomplete dropdown. Optionally add a container to show an interactive map and a form that will be populated with the address details.",
5 | "main": "jquery.geocomplete.js",
6 | "directories": {
7 | "example": "examples"
8 | },
9 | "dependencies": {
10 | "docco": "^0.6.3",
11 | "uglifyjs": "^2.3.6"
12 | },
13 | "devDependencies": {
14 | "grunt": "^0.4.5",
15 | "grunt-release": "^0.7.0"
16 | },
17 | "scripts": {
18 | "test": "echo \"Error: no test specified\" && exit 1"
19 | },
20 | "private": true,
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/ubilabs/geocomplete.git"
24 | },
25 | "author": "",
26 | "license": "ISC",
27 | "bugs": {
28 | "url": "https://github.com/ubilabs/geocomplete/issues"
29 | },
30 | "homepage": "https://github.com/ubilabs/geocomplete"
31 | }
32 |
--------------------------------------------------------------------------------
/public/components/corejs-typeahead/test/typeahead/event_bus_spec.js:
--------------------------------------------------------------------------------
1 | describe('EventBus', function() {
2 |
3 | beforeEach(function() {
4 | var $fixture;
5 |
6 | setFixtures(fixtures.html.input);
7 |
8 | $fixture = $('#jasmine-fixtures');
9 | this.$el = $fixture.find('.tt-input');
10 |
11 | this.eventBus = new EventBus({ el: this.$el });
12 | });
13 |
14 | it('#trigger should trigger event', function() {
15 | var spy = jasmine.createSpy();
16 |
17 | this.$el.on('typeahead:fiz', spy);
18 |
19 | this.eventBus.trigger('fiz', 'foo', 'bar');
20 | expect(spy).toHaveBeenCalledWith(jasmine.any(Object), 'foo', 'bar');
21 | });
22 |
23 | it('#before should return false if default was not prevented', function() {
24 | var spy = jasmine.createSpy();
25 |
26 | this.$el.on('typeahead:beforefiz', spy);
27 |
28 | expect(this.eventBus.before('fiz')).toBe(false);
29 | expect(spy).toHaveBeenCalled();
30 | });
31 |
32 | it('#before should return true if default was prevented', function() {
33 | var spy = jasmine.createSpy().andCallFake(prevent);
34 |
35 | this.$el.on('typeahead:beforefiz', spy);
36 |
37 | expect(this.eventBus.before('fiz')).toBe(true);
38 | expect(spy).toHaveBeenCalled();
39 |
40 | function prevent($e) { $e.preventDefault(); }
41 | });
42 | });
43 |
--------------------------------------------------------------------------------
/controllers/watchlists.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var router = express.Router();
3 | var Watchlist = require('../models/watchlist');
4 |
5 |
6 | // POST watchlist
7 | router.post('/', function (req, res, next) {
8 | var user = req.user;
9 | var post = req.body;
10 |
11 | if (post.status == 'attend' || post.status == 'watch' ) {
12 | Watchlist.add(user, post, function (err, result) {
13 | if (err) throw err;
14 | if (!req.xhr) {
15 | res.redirect('/event/' + post.event_id);
16 | }
17 | });
18 | } else if (!post.status) {
19 | Watchlist.remove(user, post, function (err, result) {
20 | if (err) throw err;
21 | if (!req.xhr) {
22 | res.redirect('/event/' + post.event_id);
23 | }
24 | });
25 | }
26 | });
27 |
28 | // Get watchlist item status for event/user
29 | router.get('/status/:event_id', function(req, res, next) {
30 | var user = req.user;
31 | Watchlist.get(user, req.params.event_id, function (err, result) {
32 | if (err) throw err;
33 | res.send(result);
34 | });
35 | });
36 |
37 | // GET watchlists by event
38 | router.get('/list/:event_id', function(req, res, next) {
39 | Watchlist.getAllByEvent(req.params.event_id, function (err, watchlists) {
40 | if (err) throw err;
41 | });
42 | });
43 |
44 | module.exports = router;
45 |
--------------------------------------------------------------------------------
/public/components/typeahead.js/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | env:
3 | matrix:
4 | - TEST_SUITE=unit
5 | - TEST_SUITE=integration BROWSER='firefox'
6 | - TEST_SUITE=integration BROWSER='firefox:3.5'
7 | - TEST_SUITE=integration BROWSER='firefox:3.6'
8 | - TEST_SUITE=integration BROWSER='safari:5'
9 | - TEST_SUITE=integration BROWSER='safari:6'
10 | - TEST_SUITE=integration BROWSER='safari:7'
11 | - TEST_SUITE=integration BROWSER='internet explorer:8'
12 | - TEST_SUITE=integration BROWSER='internet explorer:9'
13 | - TEST_SUITE=integration BROWSER='internet explorer:10'
14 | - TEST_SUITE=integration BROWSER='internet explorer:11'
15 | - TEST_SUITE=integration BROWSER='chrome'
16 | global:
17 | - secure: VY4J2ERfrMEin++f4+UDDtTMWLuE3jaYAVchRxfO2c6PQUYgR+SW4SMekz855U/BuptMtiVMR2UUoNGMgOSKIFkIXpPfHhx47G5a541v0WNjXfQ2qzivXAWaXNK3l3C58z4dKxgPWsFY9JtMVCddJd2vQieAILto8D8G09p7bpo=
18 | - secure: kehbNCoYUG2gLnhmCH/oKhlJG6LoxgcOPMCtY7KOI4ropG8qlypb+O2b/19+BWeO3aIuMB0JajNh3p2NL0UKgLmUK7EYBA9fQz+vesFReRk0V/KqMTSxHJuseM4aLOWA2Wr9US843VGltfODVvDN5sNrfY7RcoRx2cTK/k1CXa8=
19 | node_js:
20 | - 0.11.13
21 | before_script:
22 | - npm install -g grunt-cli@0.1.13
23 | - npm install -g node-static@0.7.3
24 | - npm install -g bower@1.3.8
25 | - bower install
26 | - grunt build
27 | script: test/ci
28 | addons:
29 | sauce_connect: true
30 |
--------------------------------------------------------------------------------
/public/components/corejs-typeahead/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | env:
3 | matrix:
4 | - TEST_SUITE=unit
5 | - TEST_SUITE=integration BROWSER='firefox'
6 | - TEST_SUITE=integration BROWSER='firefox:3.5'
7 | - TEST_SUITE=integration BROWSER='firefox:3.6'
8 | - TEST_SUITE=integration BROWSER='safari:5'
9 | - TEST_SUITE=integration BROWSER='safari:6'
10 | - TEST_SUITE=integration BROWSER='safari:7'
11 | - TEST_SUITE=integration BROWSER='internet explorer:8'
12 | - TEST_SUITE=integration BROWSER='internet explorer:9'
13 | - TEST_SUITE=integration BROWSER='internet explorer:10'
14 | - TEST_SUITE=integration BROWSER='internet explorer:11'
15 | - TEST_SUITE=integration BROWSER='chrome'
16 | global:
17 | - secure: VY4J2ERfrMEin++f4+UDDtTMWLuE3jaYAVchRxfO2c6PQUYgR+SW4SMekz855U/BuptMtiVMR2UUoNGMgOSKIFkIXpPfHhx47G5a541v0WNjXfQ2qzivXAWaXNK3l3C58z4dKxgPWsFY9JtMVCddJd2vQieAILto8D8G09p7bpo=
18 | - secure: kehbNCoYUG2gLnhmCH/oKhlJG6LoxgcOPMCtY7KOI4ropG8qlypb+O2b/19+BWeO3aIuMB0JajNh3p2NL0UKgLmUK7EYBA9fQz+vesFReRk0V/KqMTSxHJuseM4aLOWA2Wr9US843VGltfODVvDN5sNrfY7RcoRx2cTK/k1CXa8=
19 | node_js:
20 | - "4.1"
21 | cache:
22 | directories:
23 | - node_modules
24 | - bower_components
25 | before_install:
26 | - npm install -g grunt-cli@0.1.13
27 | - npm install -g bower@1.3.8
28 | install:
29 | - npm install
30 | before_script:
31 | - grunt build
32 | script: test/ci
33 | addons:
34 | sauce_connect: true
35 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/locale/base-config.js:
--------------------------------------------------------------------------------
1 | import { defaultCalendar } from './calendar';
2 | import { defaultLongDateFormat } from './formats';
3 | import { defaultInvalidDate } from './invalid';
4 | import { defaultOrdinal, defaultDayOfMonthOrdinalParse } from './ordinal';
5 | import { defaultRelativeTime } from './relative';
6 |
7 | // months
8 | import {
9 | defaultLocaleMonths,
10 | defaultLocaleMonthsShort,
11 | } from '../units/month';
12 |
13 | // week
14 | import { defaultLocaleWeek } from '../units/week';
15 |
16 | // weekdays
17 | import {
18 | defaultLocaleWeekdays,
19 | defaultLocaleWeekdaysMin,
20 | defaultLocaleWeekdaysShort,
21 | } from '../units/day-of-week';
22 |
23 | // meridiem
24 | import { defaultLocaleMeridiemParse } from '../units/hour';
25 |
26 | export var baseConfig = {
27 | calendar: defaultCalendar,
28 | longDateFormat: defaultLongDateFormat,
29 | invalidDate: defaultInvalidDate,
30 | ordinal: defaultOrdinal,
31 | dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
32 | relativeTime: defaultRelativeTime,
33 |
34 | months: defaultLocaleMonths,
35 | monthsShort: defaultLocaleMonthsShort,
36 |
37 | week: defaultLocaleWeek,
38 |
39 | weekdays: defaultLocaleWeekdays,
40 | weekdaysMin: defaultLocaleWeekdaysMin,
41 | weekdaysShort: defaultLocaleWeekdaysShort,
42 |
43 | meridiemParse: defaultLocaleMeridiemParse
44 | };
45 |
--------------------------------------------------------------------------------
/public/components/typeahead.js/src/bloodhound/remote.js:
--------------------------------------------------------------------------------
1 | /*
2 | * typeahead.js
3 | * https://github.com/twitter/typeahead.js
4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
5 | */
6 |
7 | var Remote = (function() {
8 | 'use strict';
9 |
10 | // constructor
11 | // -----------
12 |
13 | function Remote(o) {
14 | this.url = o.url;
15 | this.prepare = o.prepare;
16 | this.transform = o.transform;
17 |
18 | this.transport = new Transport({
19 | cache: o.cache,
20 | limiter: o.limiter,
21 | transport: o.transport
22 | });
23 | }
24 |
25 | // instance methods
26 | // ----------------
27 |
28 | _.mixin(Remote.prototype, {
29 | // ### private
30 |
31 | _settings: function settings() {
32 | return { url: this.url, type: 'GET', dataType: 'json' };
33 | },
34 |
35 | // ### public
36 |
37 | get: function get(query, cb) {
38 | var that = this, settings;
39 |
40 | if (!cb) { return; }
41 |
42 | query = query || '';
43 | settings = this.prepare(query, this._settings());
44 |
45 | return this.transport.get(settings, onResponse);
46 |
47 | function onResponse(err, resp) {
48 | err ? cb([]) : cb(that.transform(resp));
49 | }
50 | },
51 |
52 | cancelLastRequest: function cancelLastRequest() {
53 | this.transport.cancel();
54 | }
55 | });
56 |
57 | return Remote;
58 | })();
59 |
--------------------------------------------------------------------------------
/public/components/typeahead.js/test/bloodhound/lru_cache_spec.js:
--------------------------------------------------------------------------------
1 | describe('LruCache', function() {
2 |
3 | beforeEach(function() {
4 | this.cache = new LruCache(3);
5 | });
6 |
7 | it('should make entries retrievable by their keys', function() {
8 | var key = 'key', val = 42;
9 |
10 | this.cache.set(key, val);
11 | expect(this.cache.get(key)).toBe(val);
12 | });
13 |
14 | it('should return undefined if key has not been set', function() {
15 | expect(this.cache.get('wat?')).toBeUndefined();
16 | });
17 |
18 | it('should hold up to maxSize entries', function() {
19 | this.cache.set('one', 1);
20 | this.cache.set('two', 2);
21 | this.cache.set('three', 3);
22 | this.cache.set('four', 4);
23 |
24 | expect(this.cache.get('one')).toBeUndefined();
25 | expect(this.cache.get('two')).toBe(2);
26 | expect(this.cache.get('three')).toBe(3);
27 | expect(this.cache.get('four')).toBe(4);
28 | });
29 |
30 | it('should evict lru entry if cache is full', function() {
31 | this.cache.set('one', 1);
32 | this.cache.set('two', 2);
33 | this.cache.set('three', 3);
34 | this.cache.get('one');
35 | this.cache.set('four', 4);
36 |
37 | expect(this.cache.get('one')).toBe(1);
38 | expect(this.cache.get('two')).toBeUndefined();
39 | expect(this.cache.get('three')).toBe(3);
40 | expect(this.cache.get('four')).toBe(4);
41 | expect(this.cache.size).toBe(3);
42 | });
43 | });
44 |
--------------------------------------------------------------------------------
/public/components/corejs-typeahead/test/bloodhound/lru_cache_spec.js:
--------------------------------------------------------------------------------
1 | describe('LruCache', function() {
2 |
3 | beforeEach(function() {
4 | this.cache = new LruCache(3);
5 | });
6 |
7 | it('should make entries retrievable by their keys', function() {
8 | var key = 'key', val = 42;
9 |
10 | this.cache.set(key, val);
11 | expect(this.cache.get(key)).toBe(val);
12 | });
13 |
14 | it('should return undefined if key has not been set', function() {
15 | expect(this.cache.get('wat?')).toBeUndefined();
16 | });
17 |
18 | it('should hold up to maxSize entries', function() {
19 | this.cache.set('one', 1);
20 | this.cache.set('two', 2);
21 | this.cache.set('three', 3);
22 | this.cache.set('four', 4);
23 |
24 | expect(this.cache.get('one')).toBeUndefined();
25 | expect(this.cache.get('two')).toBe(2);
26 | expect(this.cache.get('three')).toBe(3);
27 | expect(this.cache.get('four')).toBe(4);
28 | });
29 |
30 | it('should evict lru entry if cache is full', function() {
31 | this.cache.set('one', 1);
32 | this.cache.set('two', 2);
33 | this.cache.set('three', 3);
34 | this.cache.get('one');
35 | this.cache.set('four', 4);
36 |
37 | expect(this.cache.get('one')).toBe(1);
38 | expect(this.cache.get('two')).toBeUndefined();
39 | expect(this.cache.get('three')).toBe(3);
40 | expect(this.cache.get('four')).toBe(4);
41 | expect(this.cache.size).toBe(3);
42 | });
43 | });
44 |
--------------------------------------------------------------------------------
/public/components/jquery/src/css/var/isHiddenWithinTree.js:
--------------------------------------------------------------------------------
1 | define( [
2 | "../../core",
3 | "../../selector"
4 |
5 | // css is assumed
6 | ], function( jQuery ) {
7 | "use strict";
8 |
9 | // isHiddenWithinTree reports if an element has a non-"none" display style (inline and/or
10 | // through the CSS cascade), which is useful in deciding whether or not to make it visible.
11 | // It differs from the :hidden selector (jQuery.expr.pseudos.hidden) in two important ways:
12 | // * A hidden ancestor does not force an element to be classified as hidden.
13 | // * Being disconnected from the document does not force an element to be classified as hidden.
14 | // These differences improve the behavior of .toggle() et al. when applied to elements that are
15 | // detached or contained within hidden ancestors (gh-2404, gh-2863).
16 | return function( elem, el ) {
17 |
18 | // isHiddenWithinTree might be called from jQuery#filter function;
19 | // in that case, element will be second argument
20 | elem = el || elem;
21 |
22 | // Inline style trumps all
23 | return elem.style.display === "none" ||
24 | elem.style.display === "" &&
25 |
26 | // Otherwise, check computed style
27 | // Support: Firefox <=43 - 45
28 | // Disconnected elements can have computed display: none, so first confirm that elem is
29 | // in the document.
30 | jQuery.contains( elem.ownerDocument, elem ) &&
31 |
32 | jQuery.css( elem, "display" ) === "none";
33 | };
34 | } );
35 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/create/check-overflow.js:
--------------------------------------------------------------------------------
1 | import { daysInMonth } from '../units/month';
2 | import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND, WEEK, WEEKDAY } from '../units/constants';
3 | import getParsingFlags from '../create/parsing-flags';
4 |
5 | export default function checkOverflow (m) {
6 | var overflow;
7 | var a = m._a;
8 |
9 | if (a && getParsingFlags(m).overflow === -2) {
10 | overflow =
11 | a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
12 | a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
13 | a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
14 | a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
15 | a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
16 | a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
17 | -1;
18 |
19 | if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
20 | overflow = DATE;
21 | }
22 | if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
23 | overflow = WEEK;
24 | }
25 | if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
26 | overflow = WEEKDAY;
27 | }
28 |
29 | getParsingFlags(m).overflow = overflow;
30 | }
31 |
32 | return m;
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/controllers/venues.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var router = express.Router();
3 | var config = require('config');
4 | var Venue = require('../models/venue');
5 |
6 |
7 | router.get('/search', function(req, res, next) {
8 | var city = req.query.city;
9 | var query = req.query.query;
10 | var foursquare = require('node-foursquare-venues')(config.foursquare.client_id, config.foursquare.client_secret);
11 |
12 | foursquare.venues.suggestcompletion({near: city, query: query, intent: 'match'}, function(err, resp){
13 | res.json(resp.response.minivenues);
14 | });
15 | });
16 |
17 | router.get('/add', function(req, res, next) {
18 | res.render('add', { title: 'Add Venue' });
19 | });
20 |
21 |
22 | // post a new venue
23 | router.post('/', function (req, res, next) {
24 | Venue.create(req.user, req.body, function (err, venue) {
25 | if (err) throw err;
26 | return(venue_id);
27 | });
28 | });
29 |
30 | /* GET venue listing. */
31 | router.get(/(?:.*-|)(.+)$/, function(req, res, next) {
32 | venue_id = req.params[0].replace(/\//g, '');
33 | Venue.get(venue_id, function (err, venue) {
34 | if (!venue) {
35 | res.render('404', { title: '404 Not Found' });
36 | } else {
37 | if (err) throw err;
38 | Venue.getEvents(venue_id, function (err, events) {
39 | if (err) throw err;
40 | res.render('venue', { title: venue.name, venue: venue, events: events });
41 | });
42 | }
43 | });
44 | });
45 |
46 |
47 | module.exports = router;
48 |
--------------------------------------------------------------------------------
/public/components/corejs-typeahead/src/bloodhound/remote.js:
--------------------------------------------------------------------------------
1 | /*
2 | * typeahead.js
3 | * https://github.com/twitter/typeahead.js
4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
5 | */
6 |
7 | var Remote = (function() {
8 | 'use strict';
9 |
10 | // constructor
11 | // -----------
12 |
13 | function Remote(o) {
14 | this.url = o.url;
15 | this.prepare = o.prepare;
16 | this.transform = o.transform;
17 | this.indexResponse = o.indexResponse;
18 |
19 | this.transport = new Transport({
20 | cache: o.cache,
21 | limiter: o.limiter,
22 | transport: o.transport,
23 | maxPendingRequests: o.maxPendingRequests
24 | });
25 | }
26 |
27 | // instance methods
28 | // ----------------
29 |
30 | _.mixin(Remote.prototype, {
31 | // ### private
32 |
33 | _settings: function settings() {
34 | return { url: this.url, type: 'GET', dataType: 'json' };
35 | },
36 |
37 | // ### public
38 |
39 | get: function get(query, cb) {
40 | var that = this, settings;
41 |
42 | if (!cb) { return; }
43 |
44 | query = query || '';
45 | settings = this.prepare(query, this._settings());
46 |
47 | return this.transport.get(settings, onResponse);
48 |
49 | function onResponse(err, resp) {
50 | err ? cb([]) : cb(that.transform(resp));
51 | }
52 | },
53 |
54 | cancelLastRequest: function cancelLastRequest() {
55 | this.transport.cancel();
56 | }
57 | });
58 |
59 | return Remote;
60 | })();
61 |
--------------------------------------------------------------------------------
/public/components/geocomplete/examples/api.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $.geocomplete()
5 |
6 |
7 |
8 |
9 |
10 |
14 |
15 |
16 |
17 | Call:
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/public/components/typeahead.js/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function(config) {
2 | config.set({
3 | basePath: '',
4 |
5 | preprocessors: {
6 | 'src/**/*.js': 'coverage'
7 | },
8 |
9 | reporters: ['progress', 'coverage'],
10 |
11 | browsers: ['Chrome'],
12 |
13 | frameworks: ['jasmine'],
14 |
15 | coverageReporter: {
16 | type: 'html',
17 | dir: 'test/coverage/'
18 | },
19 |
20 | files: [
21 | 'bower_components/jquery/jquery.js',
22 | 'src/common/utils.js',
23 | 'src/bloodhound/version.js',
24 | 'src/bloodhound/tokenizers.js',
25 | 'src/bloodhound/lru_cache.js',
26 | 'src/bloodhound/persistent_storage.js',
27 | 'src/bloodhound/transport.js',
28 | 'src/bloodhound/remote.js',
29 | 'src/bloodhound/prefetch.js',
30 | 'src/bloodhound/search_index.js',
31 | 'src/bloodhound/options_parser.js',
32 | 'src/bloodhound/bloodhound.js',
33 | 'src/typeahead/www.js',
34 | 'src/typeahead/event_bus.js',
35 | 'src/typeahead/event_emitter.js',
36 | 'src/typeahead/highlight.js',
37 | 'src/typeahead/input.js',
38 | 'src/typeahead/dataset.js',
39 | 'src/typeahead/menu.js',
40 | 'src/typeahead/default_menu.js',
41 | 'src/typeahead/typeahead.js',
42 | 'src/typeahead/plugin.js',
43 | 'test/fixtures/**/*',
44 | 'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
45 | 'bower_components/jasmine-ajax/lib/mock-ajax.js',
46 | 'test/helpers/**/*',
47 | 'test/**/*_spec.js'
48 | ]
49 | });
50 | };
51 |
--------------------------------------------------------------------------------
/public/components/corejs-typeahead/src/bloodhound/tokenizers.js:
--------------------------------------------------------------------------------
1 | /*
2 | * typeahead.js
3 | * https://github.com/twitter/typeahead.js
4 | * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
5 | */
6 |
7 | var tokenizers = (function() {
8 | 'use strict';
9 |
10 | return {
11 | nonword: nonword,
12 | whitespace: whitespace,
13 | ngram: ngram,
14 | obj: {
15 | nonword: getObjTokenizer(nonword),
16 | whitespace: getObjTokenizer(whitespace),
17 | ngram: getObjTokenizer(ngram)
18 | }
19 | };
20 |
21 | function whitespace(str) {
22 | str = _.toStr(str);
23 | return str ? str.split(/\s+/) : [];
24 | }
25 |
26 | function nonword(str) {
27 | str = _.toStr(str);
28 | return str ? str.split(/\W+/) : [];
29 | }
30 |
31 | function ngram(str) {
32 | str = _.toStr(str);
33 |
34 | var tokens = [],
35 | word = '';
36 |
37 | _.each(str.split(''), function(char) {
38 | if (char.match(/\s+/)) {
39 | word = '';
40 | } else {
41 | tokens.push(word+char);
42 | word += char;
43 | }
44 | });
45 |
46 | return tokens;
47 | }
48 |
49 | function getObjTokenizer(tokenizer) {
50 | return function setKey(keys) {
51 | keys = _.isArray(keys) ? keys : [].slice.call(arguments, 0);
52 |
53 | return function tokenize(o) {
54 | var tokens = [];
55 |
56 | _.each(keys, function(k) {
57 | tokens = tokens.concat(tokenizer(_.toStr(o[k])));
58 | });
59 |
60 | return tokens;
61 | };
62 | };
63 | }
64 | })();
65 |
--------------------------------------------------------------------------------
/public/components/jquery/src/core/access.js:
--------------------------------------------------------------------------------
1 | define( [
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | "use strict";
6 |
7 | // Multifunctional method to get and set values of a collection
8 | // The value/s can optionally be executed if it's a function
9 | var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
10 | var i = 0,
11 | len = elems.length,
12 | bulk = key == null;
13 |
14 | // Sets many values
15 | if ( jQuery.type( key ) === "object" ) {
16 | chainable = true;
17 | for ( i in key ) {
18 | access( elems, fn, i, key[ i ], true, emptyGet, raw );
19 | }
20 |
21 | // Sets one value
22 | } else if ( value !== undefined ) {
23 | chainable = true;
24 |
25 | if ( !jQuery.isFunction( value ) ) {
26 | raw = true;
27 | }
28 |
29 | if ( bulk ) {
30 |
31 | // Bulk operations run against the entire set
32 | if ( raw ) {
33 | fn.call( elems, value );
34 | fn = null;
35 |
36 | // ...except when executing function values
37 | } else {
38 | bulk = fn;
39 | fn = function( elem, key, value ) {
40 | return bulk.call( jQuery( elem ), value );
41 | };
42 | }
43 | }
44 |
45 | if ( fn ) {
46 | for ( ; i < len; i++ ) {
47 | fn(
48 | elems[ i ], key, raw ?
49 | value :
50 | value.call( elems[ i ], i, fn( elems[ i ], key ) )
51 | );
52 | }
53 | }
54 | }
55 |
56 | if ( chainable ) {
57 | return elems;
58 | }
59 |
60 | // Gets
61 | if ( bulk ) {
62 | return fn.call( elems );
63 | }
64 |
65 | return len ? fn( elems[ 0 ], key ) : emptyGet;
66 | };
67 |
68 | return access;
69 |
70 | } );
71 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/create/valid.js:
--------------------------------------------------------------------------------
1 | import extend from '../utils/extend';
2 | import { createUTC } from './utc';
3 | import getParsingFlags from '../create/parsing-flags';
4 | import some from '../utils/some';
5 |
6 | export function isValid(m) {
7 | if (m._isValid == null) {
8 | var flags = getParsingFlags(m);
9 | var parsedParts = some.call(flags.parsedDateParts, function (i) {
10 | return i != null;
11 | });
12 | var isNowValid = !isNaN(m._d.getTime()) &&
13 | flags.overflow < 0 &&
14 | !flags.empty &&
15 | !flags.invalidMonth &&
16 | !flags.invalidWeekday &&
17 | !flags.nullInput &&
18 | !flags.invalidFormat &&
19 | !flags.userInvalidated &&
20 | (!flags.meridiem || (flags.meridiem && parsedParts));
21 |
22 | if (m._strict) {
23 | isNowValid = isNowValid &&
24 | flags.charsLeftOver === 0 &&
25 | flags.unusedTokens.length === 0 &&
26 | flags.bigHour === undefined;
27 | }
28 |
29 | if (Object.isFrozen == null || !Object.isFrozen(m)) {
30 | m._isValid = isNowValid;
31 | }
32 | else {
33 | return isNowValid;
34 | }
35 | }
36 | return m._isValid;
37 | }
38 |
39 | export function createInvalid (flags) {
40 | var m = createUTC(NaN);
41 | if (flags != null) {
42 | extend(getParsingFlags(m), flags);
43 | }
44 | else {
45 | getParsingFlags(m).userInvalidated = true;
46 | }
47 |
48 | return m;
49 | }
50 |
--------------------------------------------------------------------------------
/public/components/corejs-typeahead/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function(config) {
2 | config.set({
3 | basePath: '',
4 |
5 | preprocessors: {
6 | 'src/**/*.js': 'coverage'
7 | },
8 |
9 | reporters: ['progress', 'coverage'],
10 |
11 | browsers: ['Chrome'],
12 |
13 | frameworks: ['jasmine'],
14 |
15 | coverageReporter: {
16 | type: 'html',
17 | dir: 'test/coverage/'
18 | },
19 |
20 | files: [
21 | 'bower_components/jquery/dist/jquery.js',
22 | './node_modules/phantomjs-polyfill/bind-polyfill.js',
23 | 'src/common/utils.js',
24 | 'src/bloodhound/version.js',
25 | 'src/bloodhound/tokenizers.js',
26 | 'src/bloodhound/lru_cache.js',
27 | 'src/bloodhound/persistent_storage.js',
28 | 'src/bloodhound/transport.js',
29 | 'src/bloodhound/remote.js',
30 | 'src/bloodhound/prefetch.js',
31 | 'src/bloodhound/search_index.js',
32 | 'src/bloodhound/options_parser.js',
33 | 'src/bloodhound/bloodhound.js',
34 | 'src/typeahead/www.js',
35 | 'src/typeahead/event_bus.js',
36 | 'src/typeahead/event_emitter.js',
37 | 'src/typeahead/highlight.js',
38 | 'src/typeahead/input.js',
39 | 'src/typeahead/dataset.js',
40 | 'src/typeahead/menu.js',
41 | 'src/typeahead/status.js',
42 | 'src/typeahead/default_menu.js',
43 | 'src/typeahead/typeahead.js',
44 | 'src/typeahead/plugin.js',
45 | 'test/fixtures/**/*',
46 | 'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
47 | 'bower_components/jasmine-ajax/lib/mock-ajax.js',
48 | 'test/helpers/**/*',
49 | 'test/**/*_spec.js'
50 | ]
51 | });
52 | };
53 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/moment/get-set.js:
--------------------------------------------------------------------------------
1 | import { normalizeUnits, normalizeObjectUnits } from '../units/aliases';
2 | import { getPrioritizedUnits } from '../units/priorities';
3 | import { hooks } from '../utils/hooks';
4 | import isFunction from '../utils/is-function';
5 |
6 |
7 | export function makeGetSet (unit, keepTime) {
8 | return function (value) {
9 | if (value != null) {
10 | set(this, unit, value);
11 | hooks.updateOffset(this, keepTime);
12 | return this;
13 | } else {
14 | return get(this, unit);
15 | }
16 | };
17 | }
18 |
19 | export function get (mom, unit) {
20 | return mom.isValid() ?
21 | mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
22 | }
23 |
24 | export function set (mom, unit, value) {
25 | if (mom.isValid()) {
26 | mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
27 | }
28 | }
29 |
30 | // MOMENTS
31 |
32 | export function stringGet (units) {
33 | units = normalizeUnits(units);
34 | if (isFunction(this[units])) {
35 | return this[units]();
36 | }
37 | return this;
38 | }
39 |
40 |
41 | export function stringSet (units, value) {
42 | if (typeof units === 'object') {
43 | units = normalizeObjectUnits(units);
44 | var prioritized = getPrioritizedUnits(units);
45 | for (var i = 0; i < prioritized.length; i++) {
46 | this[prioritized[i].unit](units[prioritized[i].unit]);
47 | }
48 | } else {
49 | units = normalizeUnits(units);
50 | if (isFunction(this[units])) {
51 | return this[units](value);
52 | }
53 | }
54 | return this;
55 | }
56 |
--------------------------------------------------------------------------------
/public/components/corejs-typeahead/src/typeahead/status.js:
--------------------------------------------------------------------------------
1 | var Status = (function () {
2 | 'use strict';
3 |
4 | function Status(options) {
5 | this.$el = $('', {
6 | 'role': 'status',
7 | 'aria-live': 'polite',
8 | }).css({
9 | // This `.visuallyhidden` style is inspired by HTML5 Boilerplate
10 | // https://github.com/h5bp/html5-boilerplate/blob/fea7f22/src/css/main.css#L128
11 | 'position': 'absolute',
12 | 'padding': '0',
13 | 'border': '0',
14 | 'height': '1px',
15 | 'width': '1px',
16 | 'margin-bottom': '-1px',
17 | 'margin-right': '-1px',
18 | 'overflow': 'hidden',
19 | 'clip': 'rect(0 0 0 0)',
20 | 'white-space': 'nowrap',
21 | });
22 | options.$input.after(this.$el);
23 | _.each(options.menu.datasets, _.bind(function (dataset) {
24 | if (dataset.onSync) {
25 | dataset.onSync('rendered', _.bind(this.update, this));
26 | dataset.onSync('cleared', _.bind(this.cleared, this));
27 | }
28 | }, this));
29 | }
30 | _.mixin(Status.prototype, {
31 | update: function update(event, suggestions) {
32 | var length = suggestions.length;
33 | var words;
34 | if (length === 1) {
35 | words = {
36 | result: 'result',
37 | is: 'is'
38 | };
39 | } else {
40 | words = {
41 | result: 'results',
42 | is: 'are'
43 | };
44 | };
45 | this.$el.text(length + ' ' + words.result + ' ' + words.is + ' available, use up and down arrow keys to navigate.');
46 | },
47 | cleared: function () {
48 | this.$el.text('');
49 | }
50 | });
51 |
52 | return Status;
53 | })();
54 |
--------------------------------------------------------------------------------
/public/components/moment/src/lib/create/from-string-and-array.js:
--------------------------------------------------------------------------------
1 | import { copyConfig } from '../moment/constructor';
2 | import { configFromStringAndFormat } from './from-string-and-format';
3 | import getParsingFlags from './parsing-flags';
4 | import { isValid } from './valid';
5 | import extend from '../utils/extend';
6 |
7 | // date from string and array of format strings
8 | export function configFromStringAndArray(config) {
9 | var tempConfig,
10 | bestMoment,
11 |
12 | scoreToBeat,
13 | i,
14 | currentScore;
15 |
16 | if (config._f.length === 0) {
17 | getParsingFlags(config).invalidFormat = true;
18 | config._d = new Date(NaN);
19 | return;
20 | }
21 |
22 | for (i = 0; i < config._f.length; i++) {
23 | currentScore = 0;
24 | tempConfig = copyConfig({}, config);
25 | if (config._useUTC != null) {
26 | tempConfig._useUTC = config._useUTC;
27 | }
28 | tempConfig._f = config._f[i];
29 | configFromStringAndFormat(tempConfig);
30 |
31 | if (!isValid(tempConfig)) {
32 | continue;
33 | }
34 |
35 | // if there is any input that was not parsed add a penalty for that format
36 | currentScore += getParsingFlags(tempConfig).charsLeftOver;
37 |
38 | //or tokens
39 | currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
40 |
41 | getParsingFlags(tempConfig).score = currentScore;
42 |
43 | if (scoreToBeat == null || currentScore < scoreToBeat) {
44 | scoreToBeat = currentScore;
45 | bestMoment = tempConfig;
46 | }
47 | }
48 |
49 | extend(config, bestMoment || tempConfig);
50 | }
51 |
--------------------------------------------------------------------------------
/public/components/geocomplete/examples/multiple_results.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $.geocomplete()
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/public/components/jquery/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright JS Foundation and other contributors, https://js.foundation/
2 |
3 | This software consists of voluntary contributions made by many
4 | individuals. For exact contribution history, see the revision history
5 | available at https://github.com/jquery/jquery
6 |
7 | The following license applies to all parts of this software except as
8 | documented below:
9 |
10 | ====
11 |
12 | Permission is hereby granted, free of charge, to any person obtaining
13 | a copy of this software and associated documentation files (the
14 | "Software"), to deal in the Software without restriction, including
15 | without limitation the rights to use, copy, modify, merge, publish,
16 | distribute, sublicense, and/or sell copies of the Software, and to
17 | permit persons to whom the Software is furnished to do so, subject to
18 | the following conditions:
19 |
20 | The above copyright notice and this permission notice shall be
21 | included in all copies or substantial portions of the Software.
22 |
23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 |
31 | ====
32 |
33 | All files located in the node_modules and external directories are
34 | externally maintained libraries used by this software which have their
35 | own licenses; we recommend you read them, as their terms may differ from
36 | the terms above.
37 |
--------------------------------------------------------------------------------
/public/components/jquery/src/event/focusin.js:
--------------------------------------------------------------------------------
1 | define( [
2 | "../core",
3 | "../data/var/dataPriv",
4 | "./support",
5 |
6 | "../event",
7 | "./trigger"
8 | ], function( jQuery, dataPriv, support ) {
9 |
10 | "use strict";
11 |
12 | // Support: Firefox <=44
13 | // Firefox doesn't have focus(in | out) events
14 | // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
15 | //
16 | // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
17 | // focus(in | out) events fire after focus & blur events,
18 | // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
19 | // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
20 | if ( !support.focusin ) {
21 | jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
22 |
23 | // Attach a single capturing handler on the document while someone wants focusin/focusout
24 | var handler = function( event ) {
25 | jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
26 | };
27 |
28 | jQuery.event.special[ fix ] = {
29 | setup: function() {
30 | var doc = this.ownerDocument || this,
31 | attaches = dataPriv.access( doc, fix );
32 |
33 | if ( !attaches ) {
34 | doc.addEventListener( orig, handler, true );
35 | }
36 | dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
37 | },
38 | teardown: function() {
39 | var doc = this.ownerDocument || this,
40 | attaches = dataPriv.access( doc, fix ) - 1;
41 |
42 | if ( !attaches ) {
43 | doc.removeEventListener( orig, handler, true );
44 | dataPriv.remove( doc, fix );
45 |
46 | } else {
47 | dataPriv.access( doc, fix, attaches );
48 | }
49 | }
50 | };
51 | } );
52 | }
53 |
54 | return jQuery;
55 | } );
56 |
--------------------------------------------------------------------------------
/public/components/jquery/external/sizzle/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright jQuery Foundation and other contributors, https://jquery.org/
2 |
3 | This software consists of voluntary contributions made by many
4 | individuals. For exact contribution history, see the revision history
5 | available at https://github.com/jquery/sizzle
6 |
7 | The following license applies to all parts of this software except as
8 | documented below:
9 |
10 | ====
11 |
12 | Permission is hereby granted, free of charge, to any person obtaining
13 | a copy of this software and associated documentation files (the
14 | "Software"), to deal in the Software without restriction, including
15 | without limitation the rights to use, copy, modify, merge, publish,
16 | distribute, sublicense, and/or sell copies of the Software, and to
17 | permit persons to whom the Software is furnished to do so, subject to
18 | the following conditions:
19 |
20 | The above copyright notice and this permission notice shall be
21 | included in all copies or substantial portions of the Software.
22 |
23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 |
31 | ====
32 |
33 | All files located in the node_modules and external directories are
34 | externally maintained libraries used by this software which have their
35 | own licenses; we recommend you read them, as their terms may differ from
36 | the terms above.
37 |
--------------------------------------------------------------------------------
/public/components/geocomplete/examples/bounds.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $.geocomplete()
5 |
6 |
7 |
8 |
9 |
10 |
14 |
15 |
16 |
17 |