code
stringlengths 2
1.05M
| repo_name
stringlengths 5
114
| path
stringlengths 4
991
| language
stringclasses 1
value | license
stringclasses 15
values | size
int32 2
1.05M
|
|---|---|---|---|---|---|
import request from 'superagent';
export default class IonicPush {
constructor(jwt, profile, options = {}) {
this.jwt = jwt;
this.profile = profile;
this.Promise = options.Promise || Promise;
this.baseApi = options.baseApi || 'https://api.ionic.io';
}
testToken() {
return new this.Promise((resolve, reject) => {
request.get(`${this.baseApi}/auth/test`)
.set('Authorization', `Bearer ${this.jwt}`)
.end((err, res) => {
if (err) return reject(err.response.body);
return resolve(res.body);
});
});
}
push(data) {
return new this.Promise((resolve, reject) => {
const params = Object.assign({
profile: this.profile,
}, data);
request.post(`${this.baseApi}/push/notifications`)
.send(params)
.set('Authorization', `Bearer ${this.jwt}`)
.end((err, res) => {
if (err) return reject(err.response.body);
return resolve(res.body);
});
});
}
checkStatus(id) {
return new this.Promise((resolve, reject) => {
request.get(`${this.baseApi}/push/notifications/${id}/messages`)
.set('Authorization', `Bearer ${this.jwt}`)
.end((err, res) => {
if (err) return reject(err.response.body);
return resolve(res.body);
});
});
}
}
|
pradel/ionic-push
|
src/main.js
|
JavaScript
|
mit
| 1,345
|
import Card from '../card/'
import React from 'react'
const App = () =>
<Card title='test' />
export default App
|
dustinspecker/the-x-effect
|
app/components/app/index.js
|
JavaScript
|
mit
| 117
|
"use strict";
/**
* Appeal class
*/
export default class Appeal {
/**
* Appeal Constructor
* @param reason
* @param verdict
*/
constructor(reason, verdict) {
this._reason = reason;
this._verdict = verdict;
}
/**
* Get reason
* @returns {*}
*/
get reason() {
return this._reason;
}
/**
* Set reason
* @params value
*/
set reason(value) {
this._reason = value;
}
/**
* Get verdict
* @returns {*}
*/
get verdict() {
return this._verdict;
}
/**
* Set verdict
* @params value
*/
set verdict(value) {
this._verdict = value;
}
}
|
bermaj/parkingtix
|
src/server/entities/appeal.js
|
JavaScript
|
mit
| 633
|
import babel from 'rollup-plugin-babel'
export default {
entry: 'src/main.es6.js',
format: 'iife',
dest: 'dist/danmakubox.es6global.js',
moduleName: 'DanmakuBox'
}
|
benpigchu/danmakubox.js
|
rollup.config.es6global.js
|
JavaScript
|
mit
| 172
|
/*
* Copyright (c) André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
const {
assertFalse, assertTrue, fail
} = Assert;
// Proxy [[SetPrototypeOf]] improvement
// https://github.com/tc39/ecma262/pull/329
var setPrototypeOfCalled = false;
var t = new Proxy({}, {
isExtensible() {
fail `isExtensible trap called`;
}
});
var p = new Proxy(t, {
setPrototypeOf() {
assertFalse(setPrototypeOfCalled);
setPrototypeOfCalled = true;
return false;
}
});
assertFalse(setPrototypeOfCalled);
Reflect.setPrototypeOf(p, {});
assertTrue(setPrototypeOfCalled);
|
anba/es6draft
|
src/test/scripts/suite/regress/gh329.js
|
JavaScript
|
mit
| 669
|
import Icon from '../components/Icon.vue'
Icon.register({
'text-width': {
width: 448,
height: 512,
paths: [
{
d: 'M432 32c8.8 0 16 7.2 16 16v80c0 8.8-7.2 16-16 16h-32c-8.8 0-16-7.2-16-16v-16h-120v112h24c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16h-128c-8.8 0-16-7.2-16-16v-32c0-8.8 7.2-16 16-16h24v-112h-120v16c0 8.8-7.2 16-16 16h-32c-8.8 0-16-7.2-16-16v-80c0-8.8 7.2-16 16-16h416zM363.3 292.7l80 80c2.9 2.9 4.7 6.9 4.7 11.3 0 4.4-1.8 8.4-4.7 11.3l-80 80c-10 10-27.3 3-27.3-11.3v-48h-224v48c0 15.6-18 20.6-27.3 11.3l-80-80c-2.9-2.9-4.7-6.9-4.7-11.3 0-4.4 1.8-8.4 4.7-11.3l80-80c10-10 27.3-3 27.3 11.3v48h224v-48c0-15.6 18-20.6 27.3-11.3z'
}
]
}
})
|
Justineo/vue-awesome
|
src/icons/text-width.js
|
JavaScript
|
mit
| 686
|
"use strict";
var chance = require('../../extlibs/wrap_chance');
var Question = (function () {
function Question() {
this.num = chance.natural({ min: 41, max: 59 });
}
Object.defineProperty(Question.prototype, "cans", {
get: function () {
return this.num * this.num;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Question.prototype, "qtxt", {
get: function () {
return "$$ " + this.num + "^2 $$";
},
enumerable: true,
configurable: true
});
return Question;
}());
exports.Question = Question;
//# sourceMappingURL=q_00003.js.map
|
pskhodad/mathmate-templates
|
dist/templates/numericals/q_00003.js
|
JavaScript
|
mit
| 672
|
var myApp = angular.module("angularSmartAdminApp", ["commonModule"]);
|
angularjsSmartAdmin/angularjsSmartAdmin.github.io
|
angular/mvc/home/angularSmartAdmin_module.js
|
JavaScript
|
mit
| 69
|
exports.pnaRestaurants = [
{
command: '/juvenes',
url: 'http://www.juvenes.fi/fi-fi/ravintolatjakahvilat/opiskelijaravintolat/tayp%C3%A4%C3%A4kampus/yliopistonravintola.aspx',
orderNum: 0,
messageTitle: 'Yliopiston ravintola (Juvenes)'
},
{
command: '/vegebar',
url: 'http://www.juvenes.fi/fi-fi/ravintolatjakahvilat/opiskelijaravintolat/tayp%C3%A4%C3%A4kampus/yliopistonravintola.aspx',
orderNum: 1,
messageTitle: 'Yliopiston ravintola (Vegebar)'
},
{
command: '/cafecampus',
url: 'http://www.juvenes.fi/fi-fi/ravintolatjakahvilat/opiskelijaravintolat/tayp%C3%A4%C3%A4kampus/caf%C3%A9campus.aspx',
orderNum: 0,
messageTitle: 'Café Campus'
},
{
command: '/minerva',
url: 'http://www.amica.fi/minerva',
orderNum: 0,
messageTitle: 'Amica Minerva'
},
{
command: '/cafepinni',
url: 'http://www.juvenes.fi/fi-fi/ravintolatjakahvilat/opiskelijaravintolat/tayp%C3%A4%C3%A4kampus/caf%C3%A9lunchpinni.aspx',
orderNum: 0,
messageTitle: 'Café Pinni'
},
{
command: '/linna',
url: 'http://www.sodexo.fi/linna',
orderNum: 0,
messageTitle: 'Sodexo Linna'
},
{
command: '/fusari',
url: 'http://www.juvenes.fi/fi-fi/ravintolatjakahvilat/opiskelijaravintolat/tayp%C3%A4%C3%A4kampus/yliopistonravintola.aspx',
orderNum: 0,
messageTitle: 'Yliopiston ravintola (Fusion Kitchen)'
}
];
|
enmaaa/looby_bot
|
restaurants.js
|
JavaScript
|
mit
| 1,404
|
/*
* Copyright 2014-2015 MarkLogic Corporation
*
* 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.
*/
var should = require('should');
var testconfig = require('../etc/test-config-qa.js');
var marklogic = require('../');
var q = marklogic.queryBuilder;
var p = marklogic.patchBuilder;
var db = marklogic.createDatabaseClient(testconfig.restReaderConnection);
var dbWriter = marklogic.createDatabaseClient(testconfig.restWriterConnection);
var dbAdmin = marklogic.createDatabaseClient(testconfig.restAdminConnection);
describe('document patch test', function(){
before(function(done){
this.timeout(6000);
// NOTE: must create a string range index on rangeKey1 and rangeKey2
dbWriter.documents.write({
uri: '/test/patch/doc1.json',
collections: ['matchCollection1'],
contentType: 'application/json',
content: {
title: 'Vannevar Bush',
popularity: 5,
id: '0011',
date: '2005-01-01',
price: {
amt: 0.1
},
p: 'Vannevar Bush wrote an article for The Atlantic Monthly'
}
}, {
uri: '/test/patch/doc2.json',
collections: ['matchCollection1', 'matchCollection2'],
contentType: 'application/json',
content: {
title: 'The Bush article',
popularity: 4,
id: '0012',
date: '2006-02-02',
price: {
amt: 0.12
},
p: 'The Bush article described a device called a Memex'
}
}, {
uri: '/test/patch/doc3.json',
collections: ['matchCollection2'],
contentType: 'application/json',
content: {
title: 'For 1945',
popularity: 3,
id: '0013',
date: '2007-03-03',
price: {
amt: 1.23
},
p: 'For 1945, the thoughts expressed in the Atlantic Monthly were groundbreaking'
}
}, {
uri: '/test/patch/doc4.json',
collections: [],
contentType: 'application/json',
content: {
title: 'Vannevar served',
popularity: 5,
id: '0024',
date: '2008-04-04',
price: {
amt: 12.34
},
p: 'Vannevar served as a prominent policymaker and public intellectual'
}
}, {
uri: '/test/patch/doc5.json',
collections: ['matchList'],
contentType: 'application/json',
content: {
title: 'The memex',
popularity: 5,
id: '0026',
date: '2009-05-05',
price: {
amt: 123.45
},
p: 'The Memex, unfortunately, had no automated search feature'
}
}).
result(function(response){done();}, done);
});
var uri1 = '/test/patch/doc5.json';
var uri2 = '/test/patch/doc4.json';
it('should apply the patch', function(done){
dbWriter.documents.patch('/test/patch/doc5.json',
p.pathLanguage('jsonpath'),
p.insert('$.title', 'after', {newKey:'newChild'}),
p.insert('$.price.amt', 'before', {numberKey:1234.456}),
p.replace('$.popularity', 1),
p.remove('$.p')
).result(function(response) {
//console.log(JSON.stringify(response, null, 4));
response.uri.should.equal(uri1);
done();
}, done);
});
// Possibly unhandled ReferenceError: txid is not defined (Need to work on this error)
/* it('should apply the patchwith transaction', function(done){
var tid = null;
dbWriter.transactions.open().result().
then(function(response) {
console.log('Tranc Open');
console.log(JSON.stringify(response, null, 4));
tid = response.txid;
return dbWriter.documents.patch('/test/patch/doc5.json',
p.pathLanguage('jsonpath'),
p.insert('$.title', 'after', {newKey:'newChild'}),
p.insert('$.price.amt', 'before', {numberKey:1234.456}),
p.replace('$.popularity', 1),
p.remove('$.p'),
txid('tid')
).result(function(response) {
console.log(JSON.stringify(response, null, 4));
response.uri.should.equal(uri1);
return dbWriter.transactions.commit(tid).result();
}).then(function(response) {
console.log(JSON.stringify(response, null, 4));
response.should.be.ok;
done();
}, done);
});
}); */
it('should read the patch', function(done){
db.documents.read('/test/patch/doc5.json').
result(function(response) {
var document = response[0];
//console.log(JSON.stringify(response, null, 4));
document.content.newKey.should.equal('newChild');
document.content.popularity.should.equal(1);
document.should.not.have.property('p');
done();
}, done);
});
it('should apply the patch on metadata', function(done){
dbWriter.documents.patch({
uri: '/test/patch/doc4.json',
categories: ['metadata'],
operations: [
p.insert('array-node("collections")', 'last-child', 'addedCollection'),
p.insert('properties', 'last-child', {newPropKey: 'newPropValue'}),
p.replace('quality', 24),
p.insert('array-node("permissions")', 'last-child', {'role-name': 'app-builder', capabilities: ['read', 'update']})
]
}).result(function(response) {
//console.log(JSON.stringify(response, null, 4));
response.uri.should.equal(uri2);
done();
}, done);
});
it('should read the metadata patch', function(done){
db.documents.read({uris: '/test/patch/doc4.json', categories: ['metadata']}).
result(function(response) {
var document = response[0];
//console.log(JSON.stringify(response, null, 4));
document.collections[0].should.equal('addedCollection');
document.quality.should.equal(24);
document.properties.newPropKey.should.equal('newPropValue');
var foundAppBuilder = false;
document.permissions.forEach(function(permission) {
switch(permission['role-name']) {
case 'app-builder':
foundAppBuilder = true;
break;
}
});
foundAppBuilder.should.equal(true);
done();
}, done);
});
it('should modify the patch on metadata', function(done){
dbWriter.documents.patch({
uri: '/test/patch/doc4.json',
categories: ['metadata'],
operations: [
p.replace('collections[. eq "addedCollection"]', 'modifiedCollection'),
p.insert('properties/newPropKey', 'after', {anotherPropKey: 'anotherPropValue'}),
p.replace('quality', 42),
p.remove('permissions[role-name eq "app-builder"]')
]
}).result(function(response) {
//console.log(JSON.stringify(response, null, 4));
response.uri.should.equal(uri2);
done();
}, done);
});
it('should read the metadata patch after modified', function(done){
db.documents.read({uris: '/test/patch/doc4.json', categories: ['metadata']}).
result(function(response) {
var document = response[0];
//console.log(JSON.stringify(response, null, 4));
document.collections[0].should.equal('modifiedCollection');
document.quality.should.equal(42);
document.properties.anotherPropKey.should.equal('anotherPropValue');
var foundAppBuilder = false;
document.permissions.forEach(function(permission) {
switch(permission['role-name']) {
case 'app-builder':
foundAppBuilder = true;
break;
}
});
foundAppBuilder.should.equal(false);
done();
}, done);
});
it('should write xml doc for test', function(done){
dbWriter.documents.write({
uri: '/test/patch/xmlDoc1.xml',
contentType: 'application/xml',
content: '<parent><firstname>John</firstname><lastname>Doe</lastname><id>5</id></parent>'
}).result(function(response) {
//console.log(JSON.stringify(response, null, 4));
done();
}, done);
});
it('should apply patch on xml doc', function(done){
dbWriter.documents.patch(
'/test/patch/xmlDoc1.xml',
'<rapi:patch xmlns:rapi="http://marklogic.com/rest-api">' +
' <rapi:insert context="/parent" position="last-child">' +
' <job>engineer</job>' +
' </rapi:insert>' +
'</rapi:patch>'
).result(function(response) {
//console.log(JSON.stringify(response, null, 2));
response.uri.should.equal('/test/patch/xmlDoc1.xml');
done();
}, done);
});
it('should read the patch from xml doc', function(done){
db.documents.read('/test/patch/xmlDoc1.xml').
result(function(response) {
var document = response[0];
strResult = JSON.stringify(document, null, 2);
strResult.should.containEql('<job>engineer</job>');
done();
}, done);
});
it('should remove the documents', function(done){
dbAdmin.documents.removeAll({
directory: '/test/patch/'
}).
result(function(response) {
response.should.be.ok;
done();
}, done);
});
});
|
sashamitrovich/markscript-todo
|
server/node_modules/marklogic/test-complete/nodejs-documents-patch.js
|
JavaScript
|
mit
| 9,458
|
'use strict';
/**
* Module dependencies
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Categorie Schema
*/
var CategorieSchema = new Schema({
created: {
type: Date,
default: Date.now
},
title: {
type: String,
default: '',
trim: true,
required: 'Title cannot be blank'
},
content: {
type: String,
default: '',
trim: true
},
user: {
type: Schema.ObjectId,
ref: 'User'
}
});
mongoose.model('Categorie', CategorieSchema);
|
cone-7/sistema-liga
|
modules/categories/server/models/categories.server.model.js
|
JavaScript
|
mit
| 511
|
const { User } = require('../../api/db');
module.exports = async (id, done) => {
const user = await User.deserializeUser(id);
return done(null, user);
};
|
ap-o/intro
|
src/server/passport/callbacks/deserialize_user.js
|
JavaScript
|
mit
| 159
|
var xmlHttp
function changeprice(it)
{
con= confirm("ARE YOU SURE YOU WANT TO NULLIFY TRANSACTION ?");
if(con==false){it.checked=''}else{
if(it.checked==true){value="yes"}
if(it.checked==false) {return }
//alert ("type is"+type +"value is "+value)
xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
}
//var valu=it.value;
//alert ("Browser does not support HTTP Request");
var url="admit.php"
url=url+"?name="+it.id;
url=url+"&value="+value;
url=url+"&sid="+Math.random()
it.disabled='disabled';
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null);
//alert(url);
}
}
function stateChanged()
{
if (xmlHttp.readyState==4 )
{
}
}
function GetXmlHttpObject()
{
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}
|
1988gadocansey/srms-laravel
|
public/assets/js/ajax.js
|
JavaScript
|
mit
| 986
|
import React from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { currentUserSelector } from '../../selectors/userSelectors';
import { playlistsSelector } from '../../selectors/playlistSelectors';
import { toggleSettings, toggleAbout } from '../../actions/OverlayActionCreators';
import { drawerIsOpenSelector } from '../selectors/drawerSelectors';
import { setDrawer } from '../actions/DrawerActionCreators';
import { toggleServerList, openPlaylist } from '../actions/OverlayActionCreators';
import DrawerMenu from '../components/DrawerMenu';
import UwaveContext from '../../context/UwaveContext';
const {
useCallback,
useContext,
} = React;
function DrawerMenuContainer() {
const uwave = useContext(UwaveContext);
const hasAboutPage = !!(uwave && uwave.getAboutPageComponent());
const user = useSelector(currentUserSelector);
const playlists = useSelector(playlistsSelector);
const open = useSelector(drawerIsOpenSelector);
const dispatch = useDispatch();
const onShowAbout = useCallback(() => dispatch(toggleAbout()), [dispatch]);
const onShowServerList = useCallback(() => dispatch(toggleServerList()), [dispatch]);
const onShowSettings = useCallback(() => dispatch(toggleSettings()), [dispatch]);
const onShowPlaylist = useCallback(
(playlistID) => dispatch(openPlaylist(playlistID)),
[dispatch],
);
const onDrawerClose = useCallback(() => dispatch(setDrawer(false)), [dispatch]);
return (
<DrawerMenu
hasAboutPage={hasAboutPage}
user={user}
playlists={playlists}
open={open}
onShowAbout={onShowAbout}
onShowServerList={onShowServerList}
onShowSettings={onShowSettings}
onShowPlaylist={onShowPlaylist}
onDrawerClose={onDrawerClose}
/>
);
}
export default DrawerMenuContainer;
|
u-wave/web
|
src/mobile/containers/DrawerMenu.js
|
JavaScript
|
mit
| 1,813
|
import fumen from "./fumen.js";
import gfycat from "./gfycat.js";
import image from "./image.js";
import imgur from "./imgur.js";
import soundcloud from "./soundcloud.js";
import twitch from "./twitch.js";
import video from "./video.js";
import youtube from "./youtube.js";
export default [fumen,gfycat,image,imgur,soundcloud,twitch,video,youtube];
|
eight04/Embed-Me
|
src/modules/index.js
|
JavaScript
|
mit
| 348
|
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var HttpBadRequestException = require('../../errors/HttpBadRequestException');
'use strict';
/**
* 不適切な要求です。パラメータに含まれている値の範囲が一部不正です。
*/
var InvalidRangeException = (function (_super) {
__extends(InvalidRangeException, _super);
/**
* @constructor
* @public
* @param {number} status
* @param {string} code=null
* @param {string} message=""
*/
function InvalidRangeException(status, code, message) {
if (typeof code === "undefined") { code = null; }
if (typeof message === "undefined") { message = ""; }
_super.call(this, status, code, message == null || message == "" ? "不適切な要求です。パラメータに含まれている値の範囲が一部不正です。" : message);
}
return InvalidRangeException;
})(HttpBadRequestException);
module.exports = InvalidRangeException;
|
sakura-internet/saklient.node
|
lib/saklient/cloud/errors/InvalidRangeException.js
|
JavaScript
|
mit
| 1,138
|
// Use Tailwind
import "tailwindcss/base.css"
import "tailwindcss/components.css"
import "tailwindcss/utilities.css"
// Highlighting for code blocks
import "prismjs/themes/prism.css"
import "prismjs/themes/prism-okaidia.css"
// Customize (mostly code blocks)
import "./src/style.css"
|
chrishunt/chrishunt.github.com
|
gatsby-browser.js
|
JavaScript
|
mit
| 287
|
//FOR loop
// 1: initialization of the loop
// 2: condition to keep going
// 3: upon complete of each cycle
arr=['jack sparrow','blackbeard','johnny depp'];
for(var inc = 0; inc < arr.length; inc++){
console.log('the incrementer is',inc);
console.log(arr[inc]);
}
//FOR-IN loop
for(var pirate in arr){
console.log(arr[pirate]);
console.log(pirate);
}
chicagoPlaces=['United Center','Wrigley Field','Navy Pier', 'Museum of Science and Industry', 'Skydeck'];
var len = chicagoPlaces.length
for(var x = 0 ; x < len ; x++){
if(x==len-1){
console.log(chicagoPlaces[x],'is the last place I\'ve visited');
} else {
console.log(chicagoPlaces[x]);
}
}
for(place in chicagoPlaces){
console.log(chicagoPlaces[place]);
}
chicagoPlaces.forEach(function(place){
console.log(chicagoPlaces[place]);
});
|
ga-chicago/ga-chicago.github.io
|
dragons/01_front_end_fundamentals/paul_boyle/d03_loops.js
|
JavaScript
|
mit
| 820
|
"use strict";
var helpers = require("../../helpers/helpers");
exports["Europe/Sarajevo"] = {
"guess:by:offset" : helpers.makeTestGuess("Europe/Sarajevo", { offset: true, expect: "Europe/Paris" }),
"guess:by:abbr" : helpers.makeTestGuess("Europe/Sarajevo", { abbr: true, expect: "Europe/Paris" }),
"1941" : helpers.makeTestYear("Europe/Sarajevo", [
["1941-04-18T21:59:59+00:00", "22:59:59", "CET", -60],
["1941-04-18T22:00:00+00:00", "00:00:00", "CEST", -120]
]),
"1942" : helpers.makeTestYear("Europe/Sarajevo", [
["1942-11-02T00:59:59+00:00", "02:59:59", "CEST", -120],
["1942-11-02T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1943" : helpers.makeTestYear("Europe/Sarajevo", [
["1943-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["1943-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["1943-10-04T00:59:59+00:00", "02:59:59", "CEST", -120],
["1943-10-04T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1944" : helpers.makeTestYear("Europe/Sarajevo", [
["1944-04-03T00:59:59+00:00", "01:59:59", "CET", -60],
["1944-04-03T01:00:00+00:00", "03:00:00", "CEST", -120],
["1944-10-02T00:59:59+00:00", "02:59:59", "CEST", -120],
["1944-10-02T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1945" : helpers.makeTestYear("Europe/Sarajevo", [
["1945-05-08T00:59:59+00:00", "01:59:59", "CET", -60],
["1945-05-08T01:00:00+00:00", "03:00:00", "CEST", -120],
["1945-09-16T00:59:59+00:00", "02:59:59", "CEST", -120],
["1945-09-16T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1983" : helpers.makeTestYear("Europe/Sarajevo", [
["1983-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["1983-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["1983-09-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["1983-09-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1984" : helpers.makeTestYear("Europe/Sarajevo", [
["1984-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["1984-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["1984-09-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["1984-09-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1985" : helpers.makeTestYear("Europe/Sarajevo", [
["1985-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["1985-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["1985-09-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["1985-09-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1986" : helpers.makeTestYear("Europe/Sarajevo", [
["1986-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["1986-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["1986-09-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["1986-09-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1987" : helpers.makeTestYear("Europe/Sarajevo", [
["1987-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["1987-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["1987-09-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["1987-09-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1988" : helpers.makeTestYear("Europe/Sarajevo", [
["1988-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["1988-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["1988-09-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["1988-09-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1989" : helpers.makeTestYear("Europe/Sarajevo", [
["1989-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["1989-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["1989-09-24T00:59:59+00:00", "02:59:59", "CEST", -120],
["1989-09-24T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1990" : helpers.makeTestYear("Europe/Sarajevo", [
["1990-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["1990-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["1990-09-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["1990-09-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1991" : helpers.makeTestYear("Europe/Sarajevo", [
["1991-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["1991-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["1991-09-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["1991-09-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1992" : helpers.makeTestYear("Europe/Sarajevo", [
["1992-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["1992-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["1992-09-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["1992-09-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1993" : helpers.makeTestYear("Europe/Sarajevo", [
["1993-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["1993-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["1993-09-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["1993-09-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1994" : helpers.makeTestYear("Europe/Sarajevo", [
["1994-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["1994-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["1994-09-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["1994-09-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1995" : helpers.makeTestYear("Europe/Sarajevo", [
["1995-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["1995-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["1995-09-24T00:59:59+00:00", "02:59:59", "CEST", -120],
["1995-09-24T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1996" : helpers.makeTestYear("Europe/Sarajevo", [
["1996-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["1996-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["1996-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["1996-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1997" : helpers.makeTestYear("Europe/Sarajevo", [
["1997-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["1997-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["1997-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["1997-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1998" : helpers.makeTestYear("Europe/Sarajevo", [
["1998-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["1998-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["1998-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["1998-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"1999" : helpers.makeTestYear("Europe/Sarajevo", [
["1999-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["1999-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["1999-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["1999-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2000" : helpers.makeTestYear("Europe/Sarajevo", [
["2000-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2000-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2000-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2000-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2001" : helpers.makeTestYear("Europe/Sarajevo", [
["2001-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2001-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2001-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2001-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2002" : helpers.makeTestYear("Europe/Sarajevo", [
["2002-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2002-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2002-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2002-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2003" : helpers.makeTestYear("Europe/Sarajevo", [
["2003-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2003-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2003-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2003-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2004" : helpers.makeTestYear("Europe/Sarajevo", [
["2004-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2004-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2004-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2004-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2005" : helpers.makeTestYear("Europe/Sarajevo", [
["2005-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2005-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2005-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2005-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2006" : helpers.makeTestYear("Europe/Sarajevo", [
["2006-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2006-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2006-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2006-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2007" : helpers.makeTestYear("Europe/Sarajevo", [
["2007-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2007-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2007-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2007-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2008" : helpers.makeTestYear("Europe/Sarajevo", [
["2008-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2008-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2008-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2008-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2009" : helpers.makeTestYear("Europe/Sarajevo", [
["2009-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2009-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2009-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2009-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2010" : helpers.makeTestYear("Europe/Sarajevo", [
["2010-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2010-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2010-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2010-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2011" : helpers.makeTestYear("Europe/Sarajevo", [
["2011-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2011-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2011-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2011-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2012" : helpers.makeTestYear("Europe/Sarajevo", [
["2012-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2012-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2012-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2012-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2013" : helpers.makeTestYear("Europe/Sarajevo", [
["2013-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2013-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2013-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2013-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2014" : helpers.makeTestYear("Europe/Sarajevo", [
["2014-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2014-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2014-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2014-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2015" : helpers.makeTestYear("Europe/Sarajevo", [
["2015-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2015-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2015-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2015-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2016" : helpers.makeTestYear("Europe/Sarajevo", [
["2016-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2016-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2016-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2016-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2017" : helpers.makeTestYear("Europe/Sarajevo", [
["2017-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2017-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2017-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2017-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2018" : helpers.makeTestYear("Europe/Sarajevo", [
["2018-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2018-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2018-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2018-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2019" : helpers.makeTestYear("Europe/Sarajevo", [
["2019-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2019-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2019-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2019-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2020" : helpers.makeTestYear("Europe/Sarajevo", [
["2020-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2020-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2020-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2020-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2021" : helpers.makeTestYear("Europe/Sarajevo", [
["2021-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2021-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2021-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2021-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2022" : helpers.makeTestYear("Europe/Sarajevo", [
["2022-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2022-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2022-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2022-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2023" : helpers.makeTestYear("Europe/Sarajevo", [
["2023-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2023-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2023-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2023-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2024" : helpers.makeTestYear("Europe/Sarajevo", [
["2024-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2024-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2024-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2024-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2025" : helpers.makeTestYear("Europe/Sarajevo", [
["2025-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2025-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2025-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2025-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2026" : helpers.makeTestYear("Europe/Sarajevo", [
["2026-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2026-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2026-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2026-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2027" : helpers.makeTestYear("Europe/Sarajevo", [
["2027-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2027-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2027-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2027-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2028" : helpers.makeTestYear("Europe/Sarajevo", [
["2028-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2028-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2028-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2028-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2029" : helpers.makeTestYear("Europe/Sarajevo", [
["2029-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2029-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2029-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2029-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2030" : helpers.makeTestYear("Europe/Sarajevo", [
["2030-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2030-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2030-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2030-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2031" : helpers.makeTestYear("Europe/Sarajevo", [
["2031-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2031-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2031-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2031-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2032" : helpers.makeTestYear("Europe/Sarajevo", [
["2032-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2032-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2032-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2032-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2033" : helpers.makeTestYear("Europe/Sarajevo", [
["2033-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2033-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2033-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2033-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2034" : helpers.makeTestYear("Europe/Sarajevo", [
["2034-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2034-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2034-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2034-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2035" : helpers.makeTestYear("Europe/Sarajevo", [
["2035-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2035-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2035-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2035-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2036" : helpers.makeTestYear("Europe/Sarajevo", [
["2036-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2036-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2036-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2036-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2037" : helpers.makeTestYear("Europe/Sarajevo", [
["2037-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2037-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2037-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2037-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2038" : helpers.makeTestYear("Europe/Sarajevo", [
["2038-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2038-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2038-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2038-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2039" : helpers.makeTestYear("Europe/Sarajevo", [
["2039-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2039-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2039-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2039-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2040" : helpers.makeTestYear("Europe/Sarajevo", [
["2040-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2040-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2040-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2040-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2041" : helpers.makeTestYear("Europe/Sarajevo", [
["2041-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2041-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2041-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2041-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2042" : helpers.makeTestYear("Europe/Sarajevo", [
["2042-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2042-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2042-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2042-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2043" : helpers.makeTestYear("Europe/Sarajevo", [
["2043-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2043-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2043-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2043-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2044" : helpers.makeTestYear("Europe/Sarajevo", [
["2044-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2044-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2044-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2044-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2045" : helpers.makeTestYear("Europe/Sarajevo", [
["2045-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2045-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2045-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2045-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2046" : helpers.makeTestYear("Europe/Sarajevo", [
["2046-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2046-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2046-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2046-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2047" : helpers.makeTestYear("Europe/Sarajevo", [
["2047-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2047-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2047-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2047-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2048" : helpers.makeTestYear("Europe/Sarajevo", [
["2048-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2048-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2048-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2048-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2049" : helpers.makeTestYear("Europe/Sarajevo", [
["2049-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2049-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2049-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2049-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2050" : helpers.makeTestYear("Europe/Sarajevo", [
["2050-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2050-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2050-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2050-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2051" : helpers.makeTestYear("Europe/Sarajevo", [
["2051-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2051-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2051-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2051-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2052" : helpers.makeTestYear("Europe/Sarajevo", [
["2052-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2052-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2052-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2052-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2053" : helpers.makeTestYear("Europe/Sarajevo", [
["2053-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2053-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2053-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2053-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2054" : helpers.makeTestYear("Europe/Sarajevo", [
["2054-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2054-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2054-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2054-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2055" : helpers.makeTestYear("Europe/Sarajevo", [
["2055-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2055-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2055-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2055-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2056" : helpers.makeTestYear("Europe/Sarajevo", [
["2056-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2056-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2056-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2056-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2057" : helpers.makeTestYear("Europe/Sarajevo", [
["2057-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2057-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2057-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2057-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2058" : helpers.makeTestYear("Europe/Sarajevo", [
["2058-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2058-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2058-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2058-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2059" : helpers.makeTestYear("Europe/Sarajevo", [
["2059-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2059-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2059-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2059-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2060" : helpers.makeTestYear("Europe/Sarajevo", [
["2060-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2060-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2060-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2060-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2061" : helpers.makeTestYear("Europe/Sarajevo", [
["2061-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2061-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2061-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2061-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2062" : helpers.makeTestYear("Europe/Sarajevo", [
["2062-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2062-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2062-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2062-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2063" : helpers.makeTestYear("Europe/Sarajevo", [
["2063-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2063-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2063-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2063-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2064" : helpers.makeTestYear("Europe/Sarajevo", [
["2064-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2064-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2064-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2064-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2065" : helpers.makeTestYear("Europe/Sarajevo", [
["2065-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2065-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2065-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2065-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2066" : helpers.makeTestYear("Europe/Sarajevo", [
["2066-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2066-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2066-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2066-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2067" : helpers.makeTestYear("Europe/Sarajevo", [
["2067-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2067-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2067-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2067-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2068" : helpers.makeTestYear("Europe/Sarajevo", [
["2068-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2068-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2068-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2068-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2069" : helpers.makeTestYear("Europe/Sarajevo", [
["2069-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2069-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2069-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2069-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2070" : helpers.makeTestYear("Europe/Sarajevo", [
["2070-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2070-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2070-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2070-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2071" : helpers.makeTestYear("Europe/Sarajevo", [
["2071-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2071-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2071-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2071-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2072" : helpers.makeTestYear("Europe/Sarajevo", [
["2072-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2072-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2072-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2072-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2073" : helpers.makeTestYear("Europe/Sarajevo", [
["2073-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2073-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2073-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2073-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2074" : helpers.makeTestYear("Europe/Sarajevo", [
["2074-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2074-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2074-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2074-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2075" : helpers.makeTestYear("Europe/Sarajevo", [
["2075-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2075-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2075-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2075-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2076" : helpers.makeTestYear("Europe/Sarajevo", [
["2076-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2076-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2076-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2076-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2077" : helpers.makeTestYear("Europe/Sarajevo", [
["2077-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2077-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2077-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2077-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2078" : helpers.makeTestYear("Europe/Sarajevo", [
["2078-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2078-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2078-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2078-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2079" : helpers.makeTestYear("Europe/Sarajevo", [
["2079-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2079-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2079-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2079-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2080" : helpers.makeTestYear("Europe/Sarajevo", [
["2080-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2080-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2080-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2080-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2081" : helpers.makeTestYear("Europe/Sarajevo", [
["2081-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2081-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2081-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2081-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2082" : helpers.makeTestYear("Europe/Sarajevo", [
["2082-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2082-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2082-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2082-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2083" : helpers.makeTestYear("Europe/Sarajevo", [
["2083-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2083-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2083-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2083-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2084" : helpers.makeTestYear("Europe/Sarajevo", [
["2084-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2084-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2084-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2084-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2085" : helpers.makeTestYear("Europe/Sarajevo", [
["2085-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2085-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2085-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2085-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2086" : helpers.makeTestYear("Europe/Sarajevo", [
["2086-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2086-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2086-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2086-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2087" : helpers.makeTestYear("Europe/Sarajevo", [
["2087-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2087-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2087-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2087-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2088" : helpers.makeTestYear("Europe/Sarajevo", [
["2088-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2088-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2088-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2088-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2089" : helpers.makeTestYear("Europe/Sarajevo", [
["2089-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2089-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2089-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2089-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2090" : helpers.makeTestYear("Europe/Sarajevo", [
["2090-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2090-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2090-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2090-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2091" : helpers.makeTestYear("Europe/Sarajevo", [
["2091-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2091-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2091-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2091-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2092" : helpers.makeTestYear("Europe/Sarajevo", [
["2092-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2092-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2092-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2092-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2093" : helpers.makeTestYear("Europe/Sarajevo", [
["2093-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2093-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2093-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2093-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2094" : helpers.makeTestYear("Europe/Sarajevo", [
["2094-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2094-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2094-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2094-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2095" : helpers.makeTestYear("Europe/Sarajevo", [
["2095-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2095-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2095-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2095-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2096" : helpers.makeTestYear("Europe/Sarajevo", [
["2096-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2096-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2096-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2096-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2097" : helpers.makeTestYear("Europe/Sarajevo", [
["2097-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2097-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2097-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2097-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2098" : helpers.makeTestYear("Europe/Sarajevo", [
["2098-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2098-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2098-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2098-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2099" : helpers.makeTestYear("Europe/Sarajevo", [
["2099-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2099-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2099-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2099-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2100" : helpers.makeTestYear("Europe/Sarajevo", [
["2100-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2100-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2100-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2100-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2101" : helpers.makeTestYear("Europe/Sarajevo", [
["2101-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2101-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2101-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2101-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2102" : helpers.makeTestYear("Europe/Sarajevo", [
["2102-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2102-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2102-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2102-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2103" : helpers.makeTestYear("Europe/Sarajevo", [
["2103-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2103-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2103-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2103-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2104" : helpers.makeTestYear("Europe/Sarajevo", [
["2104-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2104-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2104-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2104-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2105" : helpers.makeTestYear("Europe/Sarajevo", [
["2105-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2105-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2105-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2105-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2106" : helpers.makeTestYear("Europe/Sarajevo", [
["2106-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2106-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2106-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2106-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2107" : helpers.makeTestYear("Europe/Sarajevo", [
["2107-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2107-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2107-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2107-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2108" : helpers.makeTestYear("Europe/Sarajevo", [
["2108-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2108-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2108-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2108-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2109" : helpers.makeTestYear("Europe/Sarajevo", [
["2109-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2109-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2109-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2109-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2110" : helpers.makeTestYear("Europe/Sarajevo", [
["2110-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2110-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2110-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2110-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2111" : helpers.makeTestYear("Europe/Sarajevo", [
["2111-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2111-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2111-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2111-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2112" : helpers.makeTestYear("Europe/Sarajevo", [
["2112-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2112-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2112-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2112-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2113" : helpers.makeTestYear("Europe/Sarajevo", [
["2113-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2113-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2113-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2113-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2114" : helpers.makeTestYear("Europe/Sarajevo", [
["2114-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2114-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2114-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2114-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2115" : helpers.makeTestYear("Europe/Sarajevo", [
["2115-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2115-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2115-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2115-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2116" : helpers.makeTestYear("Europe/Sarajevo", [
["2116-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2116-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2116-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2116-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2117" : helpers.makeTestYear("Europe/Sarajevo", [
["2117-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2117-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2117-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2117-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2118" : helpers.makeTestYear("Europe/Sarajevo", [
["2118-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2118-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2118-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2118-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2119" : helpers.makeTestYear("Europe/Sarajevo", [
["2119-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2119-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2119-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2119-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2120" : helpers.makeTestYear("Europe/Sarajevo", [
["2120-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2120-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2120-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2120-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2121" : helpers.makeTestYear("Europe/Sarajevo", [
["2121-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2121-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2121-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2121-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2122" : helpers.makeTestYear("Europe/Sarajevo", [
["2122-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2122-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2122-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2122-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2123" : helpers.makeTestYear("Europe/Sarajevo", [
["2123-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2123-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2123-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2123-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2124" : helpers.makeTestYear("Europe/Sarajevo", [
["2124-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2124-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2124-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2124-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2125" : helpers.makeTestYear("Europe/Sarajevo", [
["2125-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2125-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2125-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2125-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2126" : helpers.makeTestYear("Europe/Sarajevo", [
["2126-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2126-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2126-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2126-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2127" : helpers.makeTestYear("Europe/Sarajevo", [
["2127-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2127-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2127-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2127-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2128" : helpers.makeTestYear("Europe/Sarajevo", [
["2128-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2128-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2128-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2128-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2129" : helpers.makeTestYear("Europe/Sarajevo", [
["2129-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2129-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2129-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2129-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2130" : helpers.makeTestYear("Europe/Sarajevo", [
["2130-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2130-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2130-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2130-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2131" : helpers.makeTestYear("Europe/Sarajevo", [
["2131-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2131-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2131-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2131-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2132" : helpers.makeTestYear("Europe/Sarajevo", [
["2132-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2132-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2132-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2132-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2133" : helpers.makeTestYear("Europe/Sarajevo", [
["2133-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2133-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2133-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2133-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2134" : helpers.makeTestYear("Europe/Sarajevo", [
["2134-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2134-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2134-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2134-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2135" : helpers.makeTestYear("Europe/Sarajevo", [
["2135-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2135-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2135-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2135-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2136" : helpers.makeTestYear("Europe/Sarajevo", [
["2136-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2136-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2136-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2136-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2137" : helpers.makeTestYear("Europe/Sarajevo", [
["2137-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2137-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2137-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2137-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2138" : helpers.makeTestYear("Europe/Sarajevo", [
["2138-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2138-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2138-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2138-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2139" : helpers.makeTestYear("Europe/Sarajevo", [
["2139-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2139-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2139-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2139-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2140" : helpers.makeTestYear("Europe/Sarajevo", [
["2140-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2140-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2140-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2140-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2141" : helpers.makeTestYear("Europe/Sarajevo", [
["2141-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2141-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2141-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2141-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2142" : helpers.makeTestYear("Europe/Sarajevo", [
["2142-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2142-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2142-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2142-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2143" : helpers.makeTestYear("Europe/Sarajevo", [
["2143-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2143-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2143-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2143-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2144" : helpers.makeTestYear("Europe/Sarajevo", [
["2144-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2144-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2144-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2144-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2145" : helpers.makeTestYear("Europe/Sarajevo", [
["2145-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2145-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2145-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2145-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2146" : helpers.makeTestYear("Europe/Sarajevo", [
["2146-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2146-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2146-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2146-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2147" : helpers.makeTestYear("Europe/Sarajevo", [
["2147-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2147-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2147-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2147-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2148" : helpers.makeTestYear("Europe/Sarajevo", [
["2148-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2148-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2148-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2148-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2149" : helpers.makeTestYear("Europe/Sarajevo", [
["2149-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2149-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2149-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2149-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2150" : helpers.makeTestYear("Europe/Sarajevo", [
["2150-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2150-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2150-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2150-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2151" : helpers.makeTestYear("Europe/Sarajevo", [
["2151-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2151-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2151-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2151-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2152" : helpers.makeTestYear("Europe/Sarajevo", [
["2152-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2152-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2152-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2152-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2153" : helpers.makeTestYear("Europe/Sarajevo", [
["2153-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2153-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2153-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2153-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2154" : helpers.makeTestYear("Europe/Sarajevo", [
["2154-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2154-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2154-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2154-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2155" : helpers.makeTestYear("Europe/Sarajevo", [
["2155-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2155-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2155-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2155-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2156" : helpers.makeTestYear("Europe/Sarajevo", [
["2156-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2156-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2156-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2156-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2157" : helpers.makeTestYear("Europe/Sarajevo", [
["2157-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2157-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2157-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2157-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2158" : helpers.makeTestYear("Europe/Sarajevo", [
["2158-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2158-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2158-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2158-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2159" : helpers.makeTestYear("Europe/Sarajevo", [
["2159-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2159-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2159-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2159-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2160" : helpers.makeTestYear("Europe/Sarajevo", [
["2160-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2160-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2160-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2160-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2161" : helpers.makeTestYear("Europe/Sarajevo", [
["2161-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2161-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2161-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2161-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2162" : helpers.makeTestYear("Europe/Sarajevo", [
["2162-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2162-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2162-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2162-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2163" : helpers.makeTestYear("Europe/Sarajevo", [
["2163-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2163-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2163-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2163-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2164" : helpers.makeTestYear("Europe/Sarajevo", [
["2164-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2164-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2164-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2164-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2165" : helpers.makeTestYear("Europe/Sarajevo", [
["2165-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2165-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2165-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2165-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2166" : helpers.makeTestYear("Europe/Sarajevo", [
["2166-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2166-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2166-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2166-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2167" : helpers.makeTestYear("Europe/Sarajevo", [
["2167-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2167-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2167-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2167-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2168" : helpers.makeTestYear("Europe/Sarajevo", [
["2168-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2168-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2168-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2168-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2169" : helpers.makeTestYear("Europe/Sarajevo", [
["2169-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2169-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2169-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2169-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2170" : helpers.makeTestYear("Europe/Sarajevo", [
["2170-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2170-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2170-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2170-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2171" : helpers.makeTestYear("Europe/Sarajevo", [
["2171-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2171-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2171-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2171-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2172" : helpers.makeTestYear("Europe/Sarajevo", [
["2172-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2172-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2172-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2172-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2173" : helpers.makeTestYear("Europe/Sarajevo", [
["2173-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2173-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2173-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2173-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2174" : helpers.makeTestYear("Europe/Sarajevo", [
["2174-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2174-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2174-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2174-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2175" : helpers.makeTestYear("Europe/Sarajevo", [
["2175-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2175-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2175-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2175-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2176" : helpers.makeTestYear("Europe/Sarajevo", [
["2176-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2176-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2176-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2176-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2177" : helpers.makeTestYear("Europe/Sarajevo", [
["2177-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2177-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2177-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2177-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2178" : helpers.makeTestYear("Europe/Sarajevo", [
["2178-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2178-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2178-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2178-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2179" : helpers.makeTestYear("Europe/Sarajevo", [
["2179-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2179-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2179-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2179-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2180" : helpers.makeTestYear("Europe/Sarajevo", [
["2180-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2180-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2180-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2180-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2181" : helpers.makeTestYear("Europe/Sarajevo", [
["2181-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2181-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2181-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2181-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2182" : helpers.makeTestYear("Europe/Sarajevo", [
["2182-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2182-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2182-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2182-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2183" : helpers.makeTestYear("Europe/Sarajevo", [
["2183-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2183-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2183-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2183-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2184" : helpers.makeTestYear("Europe/Sarajevo", [
["2184-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2184-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2184-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2184-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2185" : helpers.makeTestYear("Europe/Sarajevo", [
["2185-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2185-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2185-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2185-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2186" : helpers.makeTestYear("Europe/Sarajevo", [
["2186-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2186-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2186-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2186-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2187" : helpers.makeTestYear("Europe/Sarajevo", [
["2187-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2187-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2187-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2187-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2188" : helpers.makeTestYear("Europe/Sarajevo", [
["2188-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2188-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2188-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2188-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2189" : helpers.makeTestYear("Europe/Sarajevo", [
["2189-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2189-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2189-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2189-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2190" : helpers.makeTestYear("Europe/Sarajevo", [
["2190-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2190-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2190-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2190-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2191" : helpers.makeTestYear("Europe/Sarajevo", [
["2191-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2191-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2191-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2191-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2192" : helpers.makeTestYear("Europe/Sarajevo", [
["2192-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2192-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2192-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2192-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2193" : helpers.makeTestYear("Europe/Sarajevo", [
["2193-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2193-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2193-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2193-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2194" : helpers.makeTestYear("Europe/Sarajevo", [
["2194-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2194-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2194-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2194-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2195" : helpers.makeTestYear("Europe/Sarajevo", [
["2195-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2195-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2195-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2195-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2196" : helpers.makeTestYear("Europe/Sarajevo", [
["2196-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2196-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2196-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2196-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2197" : helpers.makeTestYear("Europe/Sarajevo", [
["2197-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2197-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2197-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2197-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2198" : helpers.makeTestYear("Europe/Sarajevo", [
["2198-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2198-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2198-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2198-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2199" : helpers.makeTestYear("Europe/Sarajevo", [
["2199-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2199-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2199-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2199-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2200" : helpers.makeTestYear("Europe/Sarajevo", [
["2200-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2200-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2200-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2200-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2201" : helpers.makeTestYear("Europe/Sarajevo", [
["2201-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2201-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2201-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2201-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2202" : helpers.makeTestYear("Europe/Sarajevo", [
["2202-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2202-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2202-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2202-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2203" : helpers.makeTestYear("Europe/Sarajevo", [
["2203-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2203-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2203-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2203-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2204" : helpers.makeTestYear("Europe/Sarajevo", [
["2204-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2204-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2204-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2204-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2205" : helpers.makeTestYear("Europe/Sarajevo", [
["2205-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2205-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2205-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2205-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2206" : helpers.makeTestYear("Europe/Sarajevo", [
["2206-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2206-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2206-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2206-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2207" : helpers.makeTestYear("Europe/Sarajevo", [
["2207-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2207-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2207-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2207-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2208" : helpers.makeTestYear("Europe/Sarajevo", [
["2208-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2208-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2208-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2208-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2209" : helpers.makeTestYear("Europe/Sarajevo", [
["2209-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2209-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2209-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2209-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2210" : helpers.makeTestYear("Europe/Sarajevo", [
["2210-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2210-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2210-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2210-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2211" : helpers.makeTestYear("Europe/Sarajevo", [
["2211-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2211-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2211-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2211-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2212" : helpers.makeTestYear("Europe/Sarajevo", [
["2212-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2212-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2212-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2212-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2213" : helpers.makeTestYear("Europe/Sarajevo", [
["2213-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2213-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2213-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2213-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2214" : helpers.makeTestYear("Europe/Sarajevo", [
["2214-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2214-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2214-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2214-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2215" : helpers.makeTestYear("Europe/Sarajevo", [
["2215-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2215-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2215-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2215-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2216" : helpers.makeTestYear("Europe/Sarajevo", [
["2216-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2216-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2216-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2216-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2217" : helpers.makeTestYear("Europe/Sarajevo", [
["2217-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2217-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2217-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2217-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2218" : helpers.makeTestYear("Europe/Sarajevo", [
["2218-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2218-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2218-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2218-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2219" : helpers.makeTestYear("Europe/Sarajevo", [
["2219-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2219-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2219-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2219-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2220" : helpers.makeTestYear("Europe/Sarajevo", [
["2220-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2220-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2220-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2220-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2221" : helpers.makeTestYear("Europe/Sarajevo", [
["2221-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2221-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2221-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2221-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2222" : helpers.makeTestYear("Europe/Sarajevo", [
["2222-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2222-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2222-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2222-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2223" : helpers.makeTestYear("Europe/Sarajevo", [
["2223-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2223-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2223-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2223-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2224" : helpers.makeTestYear("Europe/Sarajevo", [
["2224-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2224-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2224-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2224-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2225" : helpers.makeTestYear("Europe/Sarajevo", [
["2225-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2225-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2225-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2225-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2226" : helpers.makeTestYear("Europe/Sarajevo", [
["2226-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2226-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2226-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2226-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2227" : helpers.makeTestYear("Europe/Sarajevo", [
["2227-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2227-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2227-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2227-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2228" : helpers.makeTestYear("Europe/Sarajevo", [
["2228-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2228-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2228-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2228-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2229" : helpers.makeTestYear("Europe/Sarajevo", [
["2229-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2229-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2229-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2229-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2230" : helpers.makeTestYear("Europe/Sarajevo", [
["2230-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2230-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2230-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2230-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2231" : helpers.makeTestYear("Europe/Sarajevo", [
["2231-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2231-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2231-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2231-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2232" : helpers.makeTestYear("Europe/Sarajevo", [
["2232-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2232-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2232-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2232-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2233" : helpers.makeTestYear("Europe/Sarajevo", [
["2233-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2233-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2233-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2233-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2234" : helpers.makeTestYear("Europe/Sarajevo", [
["2234-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2234-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2234-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2234-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2235" : helpers.makeTestYear("Europe/Sarajevo", [
["2235-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2235-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2235-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2235-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2236" : helpers.makeTestYear("Europe/Sarajevo", [
["2236-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2236-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2236-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2236-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2237" : helpers.makeTestYear("Europe/Sarajevo", [
["2237-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2237-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2237-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2237-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2238" : helpers.makeTestYear("Europe/Sarajevo", [
["2238-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2238-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2238-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2238-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2239" : helpers.makeTestYear("Europe/Sarajevo", [
["2239-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2239-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2239-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2239-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2240" : helpers.makeTestYear("Europe/Sarajevo", [
["2240-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2240-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2240-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2240-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2241" : helpers.makeTestYear("Europe/Sarajevo", [
["2241-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2241-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2241-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2241-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2242" : helpers.makeTestYear("Europe/Sarajevo", [
["2242-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2242-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2242-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2242-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2243" : helpers.makeTestYear("Europe/Sarajevo", [
["2243-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2243-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2243-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2243-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2244" : helpers.makeTestYear("Europe/Sarajevo", [
["2244-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2244-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2244-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2244-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2245" : helpers.makeTestYear("Europe/Sarajevo", [
["2245-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2245-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2245-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2245-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2246" : helpers.makeTestYear("Europe/Sarajevo", [
["2246-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2246-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2246-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2246-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2247" : helpers.makeTestYear("Europe/Sarajevo", [
["2247-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2247-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2247-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2247-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2248" : helpers.makeTestYear("Europe/Sarajevo", [
["2248-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2248-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2248-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2248-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2249" : helpers.makeTestYear("Europe/Sarajevo", [
["2249-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2249-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2249-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2249-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2250" : helpers.makeTestYear("Europe/Sarajevo", [
["2250-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2250-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2250-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2250-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2251" : helpers.makeTestYear("Europe/Sarajevo", [
["2251-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2251-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2251-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2251-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2252" : helpers.makeTestYear("Europe/Sarajevo", [
["2252-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2252-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2252-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2252-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2253" : helpers.makeTestYear("Europe/Sarajevo", [
["2253-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2253-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2253-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2253-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2254" : helpers.makeTestYear("Europe/Sarajevo", [
["2254-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2254-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2254-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2254-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2255" : helpers.makeTestYear("Europe/Sarajevo", [
["2255-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2255-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2255-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2255-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2256" : helpers.makeTestYear("Europe/Sarajevo", [
["2256-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2256-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2256-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2256-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2257" : helpers.makeTestYear("Europe/Sarajevo", [
["2257-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2257-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2257-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2257-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2258" : helpers.makeTestYear("Europe/Sarajevo", [
["2258-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2258-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2258-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2258-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2259" : helpers.makeTestYear("Europe/Sarajevo", [
["2259-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2259-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2259-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2259-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2260" : helpers.makeTestYear("Europe/Sarajevo", [
["2260-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2260-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2260-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2260-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2261" : helpers.makeTestYear("Europe/Sarajevo", [
["2261-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2261-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2261-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2261-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2262" : helpers.makeTestYear("Europe/Sarajevo", [
["2262-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2262-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2262-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2262-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2263" : helpers.makeTestYear("Europe/Sarajevo", [
["2263-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2263-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2263-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2263-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2264" : helpers.makeTestYear("Europe/Sarajevo", [
["2264-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2264-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2264-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2264-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2265" : helpers.makeTestYear("Europe/Sarajevo", [
["2265-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2265-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2265-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2265-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2266" : helpers.makeTestYear("Europe/Sarajevo", [
["2266-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2266-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2266-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2266-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2267" : helpers.makeTestYear("Europe/Sarajevo", [
["2267-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2267-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2267-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2267-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2268" : helpers.makeTestYear("Europe/Sarajevo", [
["2268-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2268-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2268-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2268-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2269" : helpers.makeTestYear("Europe/Sarajevo", [
["2269-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2269-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2269-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2269-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2270" : helpers.makeTestYear("Europe/Sarajevo", [
["2270-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2270-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2270-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2270-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2271" : helpers.makeTestYear("Europe/Sarajevo", [
["2271-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2271-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2271-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2271-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2272" : helpers.makeTestYear("Europe/Sarajevo", [
["2272-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2272-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2272-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2272-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2273" : helpers.makeTestYear("Europe/Sarajevo", [
["2273-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2273-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2273-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2273-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2274" : helpers.makeTestYear("Europe/Sarajevo", [
["2274-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2274-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2274-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2274-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2275" : helpers.makeTestYear("Europe/Sarajevo", [
["2275-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2275-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2275-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2275-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2276" : helpers.makeTestYear("Europe/Sarajevo", [
["2276-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2276-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2276-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2276-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2277" : helpers.makeTestYear("Europe/Sarajevo", [
["2277-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2277-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2277-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2277-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2278" : helpers.makeTestYear("Europe/Sarajevo", [
["2278-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2278-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2278-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2278-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2279" : helpers.makeTestYear("Europe/Sarajevo", [
["2279-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2279-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2279-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2279-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2280" : helpers.makeTestYear("Europe/Sarajevo", [
["2280-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2280-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2280-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2280-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2281" : helpers.makeTestYear("Europe/Sarajevo", [
["2281-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2281-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2281-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2281-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2282" : helpers.makeTestYear("Europe/Sarajevo", [
["2282-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2282-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2282-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2282-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2283" : helpers.makeTestYear("Europe/Sarajevo", [
["2283-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2283-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2283-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2283-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2284" : helpers.makeTestYear("Europe/Sarajevo", [
["2284-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2284-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2284-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2284-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2285" : helpers.makeTestYear("Europe/Sarajevo", [
["2285-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2285-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2285-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2285-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2286" : helpers.makeTestYear("Europe/Sarajevo", [
["2286-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2286-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2286-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2286-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2287" : helpers.makeTestYear("Europe/Sarajevo", [
["2287-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2287-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2287-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2287-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2288" : helpers.makeTestYear("Europe/Sarajevo", [
["2288-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2288-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2288-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2288-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2289" : helpers.makeTestYear("Europe/Sarajevo", [
["2289-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2289-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2289-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2289-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2290" : helpers.makeTestYear("Europe/Sarajevo", [
["2290-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2290-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2290-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2290-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2291" : helpers.makeTestYear("Europe/Sarajevo", [
["2291-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2291-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2291-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2291-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2292" : helpers.makeTestYear("Europe/Sarajevo", [
["2292-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2292-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2292-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2292-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2293" : helpers.makeTestYear("Europe/Sarajevo", [
["2293-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2293-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2293-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2293-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2294" : helpers.makeTestYear("Europe/Sarajevo", [
["2294-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2294-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2294-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2294-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2295" : helpers.makeTestYear("Europe/Sarajevo", [
["2295-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2295-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2295-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2295-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2296" : helpers.makeTestYear("Europe/Sarajevo", [
["2296-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2296-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2296-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2296-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2297" : helpers.makeTestYear("Europe/Sarajevo", [
["2297-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2297-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2297-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2297-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2298" : helpers.makeTestYear("Europe/Sarajevo", [
["2298-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2298-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2298-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2298-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2299" : helpers.makeTestYear("Europe/Sarajevo", [
["2299-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2299-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2299-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2299-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2300" : helpers.makeTestYear("Europe/Sarajevo", [
["2300-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2300-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2300-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2300-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2301" : helpers.makeTestYear("Europe/Sarajevo", [
["2301-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2301-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2301-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2301-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2302" : helpers.makeTestYear("Europe/Sarajevo", [
["2302-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2302-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2302-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2302-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2303" : helpers.makeTestYear("Europe/Sarajevo", [
["2303-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2303-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2303-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2303-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2304" : helpers.makeTestYear("Europe/Sarajevo", [
["2304-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2304-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2304-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2304-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2305" : helpers.makeTestYear("Europe/Sarajevo", [
["2305-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2305-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2305-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2305-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2306" : helpers.makeTestYear("Europe/Sarajevo", [
["2306-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2306-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2306-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2306-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2307" : helpers.makeTestYear("Europe/Sarajevo", [
["2307-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2307-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2307-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2307-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2308" : helpers.makeTestYear("Europe/Sarajevo", [
["2308-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2308-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2308-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2308-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2309" : helpers.makeTestYear("Europe/Sarajevo", [
["2309-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2309-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2309-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2309-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2310" : helpers.makeTestYear("Europe/Sarajevo", [
["2310-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2310-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2310-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2310-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2311" : helpers.makeTestYear("Europe/Sarajevo", [
["2311-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2311-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2311-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2311-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2312" : helpers.makeTestYear("Europe/Sarajevo", [
["2312-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2312-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2312-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2312-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2313" : helpers.makeTestYear("Europe/Sarajevo", [
["2313-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2313-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2313-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2313-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2314" : helpers.makeTestYear("Europe/Sarajevo", [
["2314-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2314-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2314-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2314-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2315" : helpers.makeTestYear("Europe/Sarajevo", [
["2315-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2315-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2315-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2315-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2316" : helpers.makeTestYear("Europe/Sarajevo", [
["2316-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2316-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2316-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2316-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2317" : helpers.makeTestYear("Europe/Sarajevo", [
["2317-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2317-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2317-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2317-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2318" : helpers.makeTestYear("Europe/Sarajevo", [
["2318-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2318-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2318-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2318-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2319" : helpers.makeTestYear("Europe/Sarajevo", [
["2319-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2319-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2319-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2319-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2320" : helpers.makeTestYear("Europe/Sarajevo", [
["2320-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2320-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2320-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2320-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2321" : helpers.makeTestYear("Europe/Sarajevo", [
["2321-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2321-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2321-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2321-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2322" : helpers.makeTestYear("Europe/Sarajevo", [
["2322-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2322-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2322-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2322-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2323" : helpers.makeTestYear("Europe/Sarajevo", [
["2323-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2323-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2323-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2323-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2324" : helpers.makeTestYear("Europe/Sarajevo", [
["2324-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2324-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2324-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2324-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2325" : helpers.makeTestYear("Europe/Sarajevo", [
["2325-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2325-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2325-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2325-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2326" : helpers.makeTestYear("Europe/Sarajevo", [
["2326-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2326-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2326-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2326-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2327" : helpers.makeTestYear("Europe/Sarajevo", [
["2327-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2327-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2327-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2327-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2328" : helpers.makeTestYear("Europe/Sarajevo", [
["2328-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2328-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2328-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2328-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2329" : helpers.makeTestYear("Europe/Sarajevo", [
["2329-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2329-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2329-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2329-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2330" : helpers.makeTestYear("Europe/Sarajevo", [
["2330-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2330-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2330-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2330-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2331" : helpers.makeTestYear("Europe/Sarajevo", [
["2331-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2331-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2331-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2331-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2332" : helpers.makeTestYear("Europe/Sarajevo", [
["2332-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2332-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2332-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2332-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2333" : helpers.makeTestYear("Europe/Sarajevo", [
["2333-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2333-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2333-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2333-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2334" : helpers.makeTestYear("Europe/Sarajevo", [
["2334-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2334-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2334-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2334-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2335" : helpers.makeTestYear("Europe/Sarajevo", [
["2335-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2335-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2335-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2335-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2336" : helpers.makeTestYear("Europe/Sarajevo", [
["2336-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2336-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2336-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2336-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2337" : helpers.makeTestYear("Europe/Sarajevo", [
["2337-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2337-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2337-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2337-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2338" : helpers.makeTestYear("Europe/Sarajevo", [
["2338-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2338-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2338-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2338-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2339" : helpers.makeTestYear("Europe/Sarajevo", [
["2339-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2339-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2339-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2339-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2340" : helpers.makeTestYear("Europe/Sarajevo", [
["2340-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2340-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2340-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2340-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2341" : helpers.makeTestYear("Europe/Sarajevo", [
["2341-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2341-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2341-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2341-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2342" : helpers.makeTestYear("Europe/Sarajevo", [
["2342-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2342-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2342-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2342-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2343" : helpers.makeTestYear("Europe/Sarajevo", [
["2343-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2343-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2343-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2343-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2344" : helpers.makeTestYear("Europe/Sarajevo", [
["2344-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2344-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2344-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2344-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2345" : helpers.makeTestYear("Europe/Sarajevo", [
["2345-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2345-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2345-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2345-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2346" : helpers.makeTestYear("Europe/Sarajevo", [
["2346-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2346-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2346-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2346-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2347" : helpers.makeTestYear("Europe/Sarajevo", [
["2347-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2347-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2347-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2347-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2348" : helpers.makeTestYear("Europe/Sarajevo", [
["2348-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2348-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2348-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2348-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2349" : helpers.makeTestYear("Europe/Sarajevo", [
["2349-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2349-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2349-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2349-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2350" : helpers.makeTestYear("Europe/Sarajevo", [
["2350-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2350-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2350-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2350-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2351" : helpers.makeTestYear("Europe/Sarajevo", [
["2351-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2351-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2351-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2351-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2352" : helpers.makeTestYear("Europe/Sarajevo", [
["2352-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2352-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2352-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2352-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2353" : helpers.makeTestYear("Europe/Sarajevo", [
["2353-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2353-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2353-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2353-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2354" : helpers.makeTestYear("Europe/Sarajevo", [
["2354-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2354-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2354-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2354-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2355" : helpers.makeTestYear("Europe/Sarajevo", [
["2355-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2355-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2355-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2355-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2356" : helpers.makeTestYear("Europe/Sarajevo", [
["2356-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2356-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2356-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2356-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2357" : helpers.makeTestYear("Europe/Sarajevo", [
["2357-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2357-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2357-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2357-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2358" : helpers.makeTestYear("Europe/Sarajevo", [
["2358-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2358-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2358-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2358-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2359" : helpers.makeTestYear("Europe/Sarajevo", [
["2359-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2359-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2359-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2359-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2360" : helpers.makeTestYear("Europe/Sarajevo", [
["2360-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2360-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2360-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2360-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2361" : helpers.makeTestYear("Europe/Sarajevo", [
["2361-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2361-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2361-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2361-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2362" : helpers.makeTestYear("Europe/Sarajevo", [
["2362-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2362-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2362-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2362-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2363" : helpers.makeTestYear("Europe/Sarajevo", [
["2363-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2363-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2363-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2363-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2364" : helpers.makeTestYear("Europe/Sarajevo", [
["2364-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2364-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2364-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2364-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2365" : helpers.makeTestYear("Europe/Sarajevo", [
["2365-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2365-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2365-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2365-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2366" : helpers.makeTestYear("Europe/Sarajevo", [
["2366-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2366-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2366-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2366-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2367" : helpers.makeTestYear("Europe/Sarajevo", [
["2367-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2367-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2367-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2367-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2368" : helpers.makeTestYear("Europe/Sarajevo", [
["2368-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2368-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2368-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2368-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2369" : helpers.makeTestYear("Europe/Sarajevo", [
["2369-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2369-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2369-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2369-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2370" : helpers.makeTestYear("Europe/Sarajevo", [
["2370-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2370-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2370-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2370-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2371" : helpers.makeTestYear("Europe/Sarajevo", [
["2371-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2371-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2371-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2371-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2372" : helpers.makeTestYear("Europe/Sarajevo", [
["2372-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2372-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2372-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2372-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2373" : helpers.makeTestYear("Europe/Sarajevo", [
["2373-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2373-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2373-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2373-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2374" : helpers.makeTestYear("Europe/Sarajevo", [
["2374-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2374-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2374-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2374-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2375" : helpers.makeTestYear("Europe/Sarajevo", [
["2375-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2375-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2375-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2375-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2376" : helpers.makeTestYear("Europe/Sarajevo", [
["2376-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2376-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2376-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2376-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2377" : helpers.makeTestYear("Europe/Sarajevo", [
["2377-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2377-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2377-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2377-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2378" : helpers.makeTestYear("Europe/Sarajevo", [
["2378-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2378-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2378-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2378-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2379" : helpers.makeTestYear("Europe/Sarajevo", [
["2379-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2379-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2379-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2379-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2380" : helpers.makeTestYear("Europe/Sarajevo", [
["2380-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2380-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2380-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2380-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2381" : helpers.makeTestYear("Europe/Sarajevo", [
["2381-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2381-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2381-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2381-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2382" : helpers.makeTestYear("Europe/Sarajevo", [
["2382-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2382-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2382-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2382-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2383" : helpers.makeTestYear("Europe/Sarajevo", [
["2383-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2383-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2383-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2383-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2384" : helpers.makeTestYear("Europe/Sarajevo", [
["2384-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2384-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2384-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2384-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2385" : helpers.makeTestYear("Europe/Sarajevo", [
["2385-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2385-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2385-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2385-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2386" : helpers.makeTestYear("Europe/Sarajevo", [
["2386-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2386-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2386-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2386-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2387" : helpers.makeTestYear("Europe/Sarajevo", [
["2387-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2387-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2387-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2387-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2388" : helpers.makeTestYear("Europe/Sarajevo", [
["2388-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2388-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2388-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2388-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2389" : helpers.makeTestYear("Europe/Sarajevo", [
["2389-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2389-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2389-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2389-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2390" : helpers.makeTestYear("Europe/Sarajevo", [
["2390-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2390-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2390-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2390-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2391" : helpers.makeTestYear("Europe/Sarajevo", [
["2391-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2391-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2391-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2391-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2392" : helpers.makeTestYear("Europe/Sarajevo", [
["2392-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2392-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2392-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2392-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2393" : helpers.makeTestYear("Europe/Sarajevo", [
["2393-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2393-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2393-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2393-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2394" : helpers.makeTestYear("Europe/Sarajevo", [
["2394-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2394-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2394-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2394-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2395" : helpers.makeTestYear("Europe/Sarajevo", [
["2395-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2395-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2395-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2395-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2396" : helpers.makeTestYear("Europe/Sarajevo", [
["2396-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2396-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2396-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2396-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2397" : helpers.makeTestYear("Europe/Sarajevo", [
["2397-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2397-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2397-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2397-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2398" : helpers.makeTestYear("Europe/Sarajevo", [
["2398-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2398-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2398-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2398-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2399" : helpers.makeTestYear("Europe/Sarajevo", [
["2399-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2399-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2399-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2399-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2400" : helpers.makeTestYear("Europe/Sarajevo", [
["2400-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2400-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2400-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2400-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2401" : helpers.makeTestYear("Europe/Sarajevo", [
["2401-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2401-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2401-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2401-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2402" : helpers.makeTestYear("Europe/Sarajevo", [
["2402-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2402-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2402-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2402-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2403" : helpers.makeTestYear("Europe/Sarajevo", [
["2403-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2403-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2403-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2403-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2404" : helpers.makeTestYear("Europe/Sarajevo", [
["2404-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2404-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2404-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2404-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2405" : helpers.makeTestYear("Europe/Sarajevo", [
["2405-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2405-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2405-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2405-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2406" : helpers.makeTestYear("Europe/Sarajevo", [
["2406-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2406-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2406-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2406-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2407" : helpers.makeTestYear("Europe/Sarajevo", [
["2407-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2407-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2407-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2407-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2408" : helpers.makeTestYear("Europe/Sarajevo", [
["2408-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2408-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2408-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2408-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2409" : helpers.makeTestYear("Europe/Sarajevo", [
["2409-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2409-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2409-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2409-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2410" : helpers.makeTestYear("Europe/Sarajevo", [
["2410-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2410-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2410-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2410-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2411" : helpers.makeTestYear("Europe/Sarajevo", [
["2411-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2411-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2411-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2411-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2412" : helpers.makeTestYear("Europe/Sarajevo", [
["2412-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2412-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2412-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2412-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2413" : helpers.makeTestYear("Europe/Sarajevo", [
["2413-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2413-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2413-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2413-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2414" : helpers.makeTestYear("Europe/Sarajevo", [
["2414-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2414-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2414-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2414-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2415" : helpers.makeTestYear("Europe/Sarajevo", [
["2415-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2415-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2415-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2415-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2416" : helpers.makeTestYear("Europe/Sarajevo", [
["2416-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2416-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2416-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2416-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2417" : helpers.makeTestYear("Europe/Sarajevo", [
["2417-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2417-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2417-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2417-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2418" : helpers.makeTestYear("Europe/Sarajevo", [
["2418-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2418-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2418-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2418-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2419" : helpers.makeTestYear("Europe/Sarajevo", [
["2419-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2419-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2419-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2419-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2420" : helpers.makeTestYear("Europe/Sarajevo", [
["2420-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2420-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2420-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2420-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2421" : helpers.makeTestYear("Europe/Sarajevo", [
["2421-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2421-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2421-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2421-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2422" : helpers.makeTestYear("Europe/Sarajevo", [
["2422-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2422-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2422-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2422-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2423" : helpers.makeTestYear("Europe/Sarajevo", [
["2423-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2423-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2423-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2423-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2424" : helpers.makeTestYear("Europe/Sarajevo", [
["2424-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2424-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2424-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2424-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2425" : helpers.makeTestYear("Europe/Sarajevo", [
["2425-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2425-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2425-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2425-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2426" : helpers.makeTestYear("Europe/Sarajevo", [
["2426-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2426-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2426-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2426-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2427" : helpers.makeTestYear("Europe/Sarajevo", [
["2427-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2427-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2427-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2427-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2428" : helpers.makeTestYear("Europe/Sarajevo", [
["2428-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2428-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2428-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2428-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2429" : helpers.makeTestYear("Europe/Sarajevo", [
["2429-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2429-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2429-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2429-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2430" : helpers.makeTestYear("Europe/Sarajevo", [
["2430-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2430-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2430-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2430-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2431" : helpers.makeTestYear("Europe/Sarajevo", [
["2431-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2431-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2431-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2431-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2432" : helpers.makeTestYear("Europe/Sarajevo", [
["2432-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2432-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2432-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2432-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2433" : helpers.makeTestYear("Europe/Sarajevo", [
["2433-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2433-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2433-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2433-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2434" : helpers.makeTestYear("Europe/Sarajevo", [
["2434-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2434-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2434-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2434-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2435" : helpers.makeTestYear("Europe/Sarajevo", [
["2435-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2435-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2435-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2435-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2436" : helpers.makeTestYear("Europe/Sarajevo", [
["2436-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2436-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2436-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2436-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2437" : helpers.makeTestYear("Europe/Sarajevo", [
["2437-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2437-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2437-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2437-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2438" : helpers.makeTestYear("Europe/Sarajevo", [
["2438-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2438-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2438-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2438-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2439" : helpers.makeTestYear("Europe/Sarajevo", [
["2439-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2439-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2439-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2439-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2440" : helpers.makeTestYear("Europe/Sarajevo", [
["2440-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2440-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2440-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2440-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2441" : helpers.makeTestYear("Europe/Sarajevo", [
["2441-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2441-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2441-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2441-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2442" : helpers.makeTestYear("Europe/Sarajevo", [
["2442-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2442-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2442-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2442-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2443" : helpers.makeTestYear("Europe/Sarajevo", [
["2443-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2443-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2443-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2443-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2444" : helpers.makeTestYear("Europe/Sarajevo", [
["2444-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2444-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2444-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2444-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2445" : helpers.makeTestYear("Europe/Sarajevo", [
["2445-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2445-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2445-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2445-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2446" : helpers.makeTestYear("Europe/Sarajevo", [
["2446-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2446-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2446-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2446-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2447" : helpers.makeTestYear("Europe/Sarajevo", [
["2447-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2447-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2447-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2447-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2448" : helpers.makeTestYear("Europe/Sarajevo", [
["2448-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2448-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2448-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2448-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2449" : helpers.makeTestYear("Europe/Sarajevo", [
["2449-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2449-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2449-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2449-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2450" : helpers.makeTestYear("Europe/Sarajevo", [
["2450-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2450-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2450-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2450-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2451" : helpers.makeTestYear("Europe/Sarajevo", [
["2451-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2451-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2451-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2451-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2452" : helpers.makeTestYear("Europe/Sarajevo", [
["2452-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2452-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2452-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2452-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2453" : helpers.makeTestYear("Europe/Sarajevo", [
["2453-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2453-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2453-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2453-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2454" : helpers.makeTestYear("Europe/Sarajevo", [
["2454-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2454-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2454-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2454-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2455" : helpers.makeTestYear("Europe/Sarajevo", [
["2455-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2455-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2455-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2455-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2456" : helpers.makeTestYear("Europe/Sarajevo", [
["2456-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2456-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2456-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2456-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2457" : helpers.makeTestYear("Europe/Sarajevo", [
["2457-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2457-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2457-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2457-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2458" : helpers.makeTestYear("Europe/Sarajevo", [
["2458-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2458-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2458-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2458-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2459" : helpers.makeTestYear("Europe/Sarajevo", [
["2459-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2459-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2459-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2459-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2460" : helpers.makeTestYear("Europe/Sarajevo", [
["2460-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2460-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2460-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2460-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2461" : helpers.makeTestYear("Europe/Sarajevo", [
["2461-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2461-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2461-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2461-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2462" : helpers.makeTestYear("Europe/Sarajevo", [
["2462-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2462-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2462-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2462-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2463" : helpers.makeTestYear("Europe/Sarajevo", [
["2463-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2463-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2463-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2463-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2464" : helpers.makeTestYear("Europe/Sarajevo", [
["2464-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2464-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2464-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2464-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2465" : helpers.makeTestYear("Europe/Sarajevo", [
["2465-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2465-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2465-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2465-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2466" : helpers.makeTestYear("Europe/Sarajevo", [
["2466-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2466-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2466-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2466-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2467" : helpers.makeTestYear("Europe/Sarajevo", [
["2467-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2467-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2467-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2467-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2468" : helpers.makeTestYear("Europe/Sarajevo", [
["2468-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2468-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2468-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2468-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2469" : helpers.makeTestYear("Europe/Sarajevo", [
["2469-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2469-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2469-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2469-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2470" : helpers.makeTestYear("Europe/Sarajevo", [
["2470-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2470-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2470-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2470-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2471" : helpers.makeTestYear("Europe/Sarajevo", [
["2471-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2471-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2471-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2471-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2472" : helpers.makeTestYear("Europe/Sarajevo", [
["2472-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2472-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2472-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2472-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2473" : helpers.makeTestYear("Europe/Sarajevo", [
["2473-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2473-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2473-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2473-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2474" : helpers.makeTestYear("Europe/Sarajevo", [
["2474-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2474-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2474-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2474-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2475" : helpers.makeTestYear("Europe/Sarajevo", [
["2475-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2475-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2475-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2475-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2476" : helpers.makeTestYear("Europe/Sarajevo", [
["2476-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2476-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2476-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2476-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2477" : helpers.makeTestYear("Europe/Sarajevo", [
["2477-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2477-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2477-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2477-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2478" : helpers.makeTestYear("Europe/Sarajevo", [
["2478-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2478-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2478-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2478-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2479" : helpers.makeTestYear("Europe/Sarajevo", [
["2479-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2479-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2479-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2479-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2480" : helpers.makeTestYear("Europe/Sarajevo", [
["2480-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2480-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2480-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2480-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2481" : helpers.makeTestYear("Europe/Sarajevo", [
["2481-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2481-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2481-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2481-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2482" : helpers.makeTestYear("Europe/Sarajevo", [
["2482-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2482-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2482-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2482-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2483" : helpers.makeTestYear("Europe/Sarajevo", [
["2483-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2483-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2483-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2483-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2484" : helpers.makeTestYear("Europe/Sarajevo", [
["2484-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2484-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2484-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2484-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2485" : helpers.makeTestYear("Europe/Sarajevo", [
["2485-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2485-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2485-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2485-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2486" : helpers.makeTestYear("Europe/Sarajevo", [
["2486-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2486-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2486-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2486-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2487" : helpers.makeTestYear("Europe/Sarajevo", [
["2487-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2487-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2487-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2487-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2488" : helpers.makeTestYear("Europe/Sarajevo", [
["2488-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2488-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2488-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2488-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2489" : helpers.makeTestYear("Europe/Sarajevo", [
["2489-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2489-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2489-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2489-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2490" : helpers.makeTestYear("Europe/Sarajevo", [
["2490-03-26T00:59:59+00:00", "01:59:59", "CET", -60],
["2490-03-26T01:00:00+00:00", "03:00:00", "CEST", -120],
["2490-10-29T00:59:59+00:00", "02:59:59", "CEST", -120],
["2490-10-29T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2491" : helpers.makeTestYear("Europe/Sarajevo", [
["2491-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2491-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2491-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2491-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2492" : helpers.makeTestYear("Europe/Sarajevo", [
["2492-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2492-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2492-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2492-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2493" : helpers.makeTestYear("Europe/Sarajevo", [
["2493-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2493-03-29T01:00:00+00:00", "03:00:00", "CEST", -120],
["2493-10-25T00:59:59+00:00", "02:59:59", "CEST", -120],
["2493-10-25T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2494" : helpers.makeTestYear("Europe/Sarajevo", [
["2494-03-28T00:59:59+00:00", "01:59:59", "CET", -60],
["2494-03-28T01:00:00+00:00", "03:00:00", "CEST", -120],
["2494-10-31T00:59:59+00:00", "02:59:59", "CEST", -120],
["2494-10-31T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2495" : helpers.makeTestYear("Europe/Sarajevo", [
["2495-03-27T00:59:59+00:00", "01:59:59", "CET", -60],
["2495-03-27T01:00:00+00:00", "03:00:00", "CEST", -120],
["2495-10-30T00:59:59+00:00", "02:59:59", "CEST", -120],
["2495-10-30T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2496" : helpers.makeTestYear("Europe/Sarajevo", [
["2496-03-25T00:59:59+00:00", "01:59:59", "CET", -60],
["2496-03-25T01:00:00+00:00", "03:00:00", "CEST", -120],
["2496-10-28T00:59:59+00:00", "02:59:59", "CEST", -120],
["2496-10-28T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2497" : helpers.makeTestYear("Europe/Sarajevo", [
["2497-03-31T00:59:59+00:00", "01:59:59", "CET", -60],
["2497-03-31T01:00:00+00:00", "03:00:00", "CEST", -120],
["2497-10-27T00:59:59+00:00", "02:59:59", "CEST", -120],
["2497-10-27T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2498" : helpers.makeTestYear("Europe/Sarajevo", [
["2498-03-30T00:59:59+00:00", "01:59:59", "CET", -60],
["2498-03-30T01:00:00+00:00", "03:00:00", "CEST", -120],
["2498-10-26T00:59:59+00:00", "02:59:59", "CEST", -120],
["2498-10-26T01:00:00+00:00", "02:00:00", "CET", -60]
]),
"2499" : helpers.makeTestYear("Europe/Sarajevo", [
["2499-03-29T00:59:59+00:00", "01:59:59", "CET", -60],
["2499-03-29T01:00:00+00:00", "03:00:00", "CEST", -120]
])
};
|
almamedia/moment-timezone
|
tests/zones/europe/sarajevo.js
|
JavaScript
|
mit
| 150,814
|
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['user_current_playlist_template'] = template({"1":function(container,depth0,helpers,partials,data) {
var stack1;
return " <img height=100 width=100 src=\""
+ container.escapeExpression(container.lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.images : depth0)) != null ? stack1["0"] : stack1)) != null ? stack1.url : stack1), depth0))
+ "\"/>\n";
},"3":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=container.escapeExpression;
return " <a href=\""
+ alias1(container.lambda(((stack1 = (depth0 != null ? depth0.external_urls : depth0)) != null ? stack1.spotify : stack1), depth0))
+ "\" target=\"_blank\">"
+ alias1(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data}) : helper)))
+ "</a>\n";
},"5":function(container,depth0,helpers,partials,data) {
var helper;
return " "
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data}) : helper)))
+ "\n";
},"7":function(container,depth0,helpers,partials,data) {
var helper;
return " <div>Description: "
+ container.escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"description","hash":{},"data":data}) : helper)))
+ "</div>\n";
},"9":function(container,depth0,helpers,partials,data) {
var stack1;
return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.track : depth0),{"name":"with","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
},"10":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=container.escapeExpression;
return " <div class=\"track-item\" data-id="
+ alias3(((helper = (helper = helpers.uri || (depth0 != null ? depth0.uri : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"uri","hash":{},"data":data}) : helper)))
+ ">\n <div class=\"track-info\">\n <span class=\"drag-handle\">☰</span>\n"
+ ((stack1 = helpers.each.call(alias1,((stack1 = (depth0 != null ? depth0.album : depth0)) != null ? stack1.images : stack1),{"name":"each","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " <div class=\"track-description-container\">\n <div class=\"track-number-and-title\">\n <div class=\"track-number\">"
+ alias3((helpers.sum || (depth0 && depth0.sum) || alias2).call(alias1,1,(data && data.index),{"name":"sum","hash":{},"data":data}))
+ ".</div>\n <div class=\"track-name\">\n"
+ ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.external_urls : depth0)) != null ? stack1.spotify : stack1),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.program(16, data, 0),"data":data})) != null ? stack1 : "")
+ " </div>\n </div>\n <div class=\"track-artists-and-album\">\n"
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.artists : depth0),{"name":"each","hash":{},"fn":container.program(18, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " <div class=\"inline-divider\">•</div>\n <div class=\"album-name\">"
+ alias3(container.lambda(((stack1 = (depth0 != null ? depth0.album : depth0)) != null ? stack1.name : stack1), depth0))
+ "</div>\n </div>\n </div>\n <div class=\"remove-button\">✖</div>\n </div>\n <div class=\"track-preview\" title=\"Preview\">\n <span>Preview:</span>\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.preview_url : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.program(23, data, 0),"data":data})) != null ? stack1 : "")
+ " </div>\n </div>\n";
},"11":function(container,depth0,helpers,partials,data) {
var stack1;
return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(data && data.last),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
},"12":function(container,depth0,helpers,partials,data) {
var helper;
return " <img class=\"album-image\" src="
+ container.escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"url","hash":{},"data":data}) : helper)))
+ "> \n";
},"14":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=container.escapeExpression;
return " <a href=\""
+ alias1(container.lambda(((stack1 = (depth0 != null ? depth0.external_urls : depth0)) != null ? stack1.spotify : stack1), depth0))
+ "\" target=\"_blank\">"
+ alias1(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data}) : helper)))
+ "</a>\n";
},"16":function(container,depth0,helpers,partials,data) {
var helper;
return " "
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data}) : helper)))
+ "\n";
},"18":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {});
return " <div class=\"artist-name\">"
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper)))
+ "</div>\n"
+ ((stack1 = helpers.unless.call(alias1,(data && data.last),{"name":"unless","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
},"19":function(container,depth0,helpers,partials,data) {
return " <div class=\"inline-divider\">–</div>\n";
},"21":function(container,depth0,helpers,partials,data) {
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
return " <audio id=\"audio-control-"
+ alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"id","hash":{},"data":data}) : helper)))
+ "\" class=\"audio-control\" src=\""
+ alias4(((helper = (helper = helpers.preview_url || (depth0 != null ? depth0.preview_url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"preview_url","hash":{},"data":data}) : helper)))
+ "\" controls></audio>\n";
},"23":function(container,depth0,helpers,partials,data) {
return " N/A\n";
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});
return "<hr/>\n<h2>\n"
+ ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.images : depth0)) != null ? stack1["0"] : stack1),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " <span>\n Playlist \n"
+ ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.external_urls : depth0)) != null ? stack1.spotify : stack1),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "")
+ " ("
+ container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.tracks : depth0)) != null ? stack1.total : stack1), depth0))
+ " Tracks)\n </span>\n</h2>\n"
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "<div id=\"track-list\" class=\"track-list-group\">\n"
+ ((stack1 = helpers.each.call(alias1,((stack1 = (depth0 != null ? depth0.tracks : depth0)) != null ? stack1.items : stack1),{"name":"each","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ "</div>";
},"useData":true});
templates['user_playlist_template'] = template({"1":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.escapeExpression, alias3=helpers.helperMissing, alias4="function";
return "<div class=\"user-playlist-container\">\n"
+ ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.images : depth0)) != null ? stack1["0"] : stack1)) != null ? stack1.url : stack1),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "")
+ " <div class=\"playlist-name\">\n"
+ ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.external_urls : depth0)) != null ? stack1.spotify : stack1),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.program(8, data, 0),"data":data})) != null ? stack1 : "")
+ " </div>\n <div class=\"playlist-tracks\">Tracks: "
+ alias2(container.lambda(((stack1 = (depth0 != null ? depth0.tracks : depth0)) != null ? stack1.total : stack1), depth0))
+ "</div>\n <!--\n <div class=\"playlist-type\">Type: "
+ alias2(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias1,{"name":"type","hash":{},"data":data}) : helper)))
+ "</div>\n -->\n <button class=\"btn btn-default btn-load-tracks\" id=\"playlist-"
+ alias2(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias1,{"name":"id","hash":{},"data":data}) : helper)))
+ "\" data-playlist-id=\""
+ alias2(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias1,{"name":"id","hash":{},"data":data}) : helper)))
+ "\">Load Tracks</button>\n</div>\n";
},"2":function(container,depth0,helpers,partials,data) {
var stack1;
return " <img class=\"playlist-image\" src=\""
+ container.escapeExpression(container.lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.images : depth0)) != null ? stack1["0"] : stack1)) != null ? stack1.url : stack1), depth0))
+ "\"/>\n";
},"4":function(container,depth0,helpers,partials,data) {
return " <div class=\"playlist-image\"></div>\n";
},"6":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=container.escapeExpression;
return " <a href=\""
+ alias1(container.lambda(((stack1 = (depth0 != null ? depth0.external_urls : depth0)) != null ? stack1.spotify : stack1), depth0))
+ "\" target=\"_blank\">"
+ alias1(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data}) : helper)))
+ "</a>\n";
},"8":function(container,depth0,helpers,partials,data) {
var helper;
return " "
+ container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data}) : helper)))
+ "\n";
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {});
return "<div><a href=\""
+ container.escapeExpression(((helper = (helper = helpers.href || (depth0 != null ? depth0.href : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"href","hash":{},"data":data}) : helper)))
+ "\">Source</a></div>\n"
+ ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.items : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
},"useData":true});
templates['user_profile_template'] = template({"1":function(container,depth0,helpers,partials,data) {
var helper;
return " "
+ container.escapeExpression(((helper = (helper = helpers.display_name || (depth0 != null ? depth0.display_name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"display_name","hash":{},"data":data}) : helper)))
+ "\n";
},"3":function(container,depth0,helpers,partials,data) {
var helper;
return " "
+ container.escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"id","hash":{},"data":data}) : helper)))
+ "\n";
},"5":function(container,depth0,helpers,partials,data) {
var stack1;
return " <div class=\"pull-left\">\n <img class=\"media-object\" width=\"150\" src=\""
+ container.escapeExpression(container.lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.images : depth0)) != null ? stack1["0"] : stack1)) != null ? stack1.url : stack1), depth0))
+ "\" />\n </div>\n";
},"7":function(container,depth0,helpers,partials,data) {
var helper;
return " <dt>Display name</dt><dd class=\"clearfix\">"
+ container.escapeExpression(((helper = (helper = helpers.display_name || (depth0 != null ? depth0.display_name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"display_name","hash":{},"data":data}) : helper)))
+ "</dd>\n";
},"9":function(container,depth0,helpers,partials,data) {
var stack1, alias1=container.lambda, alias2=container.escapeExpression;
return " <dt>Profile Image</dt><dd class=\"clearfix\"><a href=\""
+ alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.images : depth0)) != null ? stack1["0"] : stack1)) != null ? stack1.url : stack1), depth0))
+ "\">"
+ alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.images : depth0)) != null ? stack1["0"] : stack1)) != null ? stack1.url : stack1), depth0))
+ "</a></dd>\n";
},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=helpers.helperMissing, alias5="function";
return "<h3>Hi \n <a href=\""
+ alias2(alias1(((stack1 = (depth0 != null ? depth0.external_urls : depth0)) != null ? stack1.spotify : stack1), depth0))
+ "\" target=\"_blank\">\n"
+ ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.display_name : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "")
+ " </a>\n</h3>\n<!--\n<div class=\"media\">\n"
+ ((stack1 = helpers["if"].call(alias3,((stack1 = ((stack1 = (depth0 != null ? depth0.images : depth0)) != null ? stack1["0"] : stack1)) != null ? stack1.url : stack1),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " <div id=\"user-info\" class=\"media-body\">\n <dl class=\"dl-horizontal\">\n"
+ ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.display_name : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " <dt>Id</dt><dd>"
+ alias2(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"id","hash":{},"data":data}) : helper)))
+ "</dd>\n <dt>Email</dt><dd>"
+ alias2(((helper = (helper = helpers.email || (depth0 != null ? depth0.email : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"email","hash":{},"data":data}) : helper)))
+ "</dd>\n <dt>Spotify URI</dt><dd><a href=\""
+ alias2(alias1(((stack1 = (depth0 != null ? depth0.external_urls : depth0)) != null ? stack1.spotify : stack1), depth0))
+ "\">"
+ alias2(alias1(((stack1 = (depth0 != null ? depth0.external_urls : depth0)) != null ? stack1.spotify : stack1), depth0))
+ "</a></dd>\n <dt>Link</dt><dd><a href=\""
+ alias2(((helper = (helper = helpers.href || (depth0 != null ? depth0.href : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"href","hash":{},"data":data}) : helper)))
+ "\">"
+ alias2(((helper = (helper = helpers.href || (depth0 != null ? depth0.href : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"href","hash":{},"data":data}) : helper)))
+ "</a></dd>\n"
+ ((stack1 = helpers["if"].call(alias3,((stack1 = ((stack1 = (depth0 != null ? depth0.images : depth0)) != null ? stack1["0"] : stack1)) != null ? stack1.url : stack1),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ " <dt>Country</dt><dd>"
+ alias2(((helper = (helper = helpers.country || (depth0 != null ? depth0.country : depth0)) != null ? helper : alias4),(typeof helper === alias5 ? helper.call(alias3,{"name":"country","hash":{},"data":data}) : helper)))
+ "</dd>\n </dl>\n </div>\n</div>\n-->";
},"useData":true});
})();
|
gordody/spotify-playlist-shuffle
|
public/handlebars_out/templates.js
|
JavaScript
|
mit
| 19,430
|
import React from 'react'
export default class App extends React.Component {
//Container for application
render() {
return (
<div>
{this.props.children}
</div>)
}
}
|
pgryko/meeting
|
src/client/container/App.js
|
JavaScript
|
mit
| 195
|
IonicModule
.controller('$ionicHeaderBar', [
'$scope',
'$element',
'$attrs',
'$q',
'$ionicConfig',
'$ionicHistory',
function($scope, $element, $attrs, $q, $ionicConfig, $ionicHistory) {
var TITLE = 'title';
var BACK_TEXT = 'back-text';
var BACK_BUTTON = 'back-button';
var DEFAULT_TITLE = 'default-title';
var PREVIOUS_TITLE = 'previous-title';
var HIDE = 'hide';
var self = this;
var titleText = '';
var previousTitleText = '';
var titleLeft = 0;
var titleRight = 0;
var titleCss = '';
var isBackShown;
var titleTextWidth = 0;
self.beforeEnter = function(viewData) {
$scope.$broadcast('$ionicView.beforeEnter', viewData);
};
self.title = function(newTitleText) {
if (arguments.length && newTitleText !== titleText) {
getEle(TITLE).innerHTML = newTitleText;
titleText = newTitleText;
titleTextWidth = 0;
}
return titleText;
};
self.showBack = function(shouldShow) {
if (arguments.length && shouldShow !== isBackShown) {
var backBtnEle = getEle(BACK_BUTTON);
if (backBtnEle) {
backBtnEle.classList[ shouldShow ? 'remove' : 'add' ](HIDE);
isBackShown = shouldShow;
}
}
return isBackShown;
};
self.titleTextWidth = function() {
if (!titleTextWidth) {
var bounds = ionic.DomUtil.getTextBounds(getEle(TITLE));
titleTextWidth = Math.min(bounds && bounds.width || 30);
}
return titleTextWidth;
};
self.titleWidth = function() {
var titleWidth = self.titleTextWidth();
var offsetWidth = getEle(TITLE).offsetWidth;
if (offsetWidth < titleWidth) {
titleWidth = offsetWidth + (titleLeft - titleRight - 5);
}
return titleWidth;
};
self.titleTextX = function() {
return ($element[0].offsetWidth / 2) - (self.titleWidth() / 2);
};
self.titleLeftRight = function() {
return titleLeft - titleRight;
};
self.backButtonTextLeft = function() {
var offsetLeft = 0;
var ele = getEle(BACK_TEXT);
while (ele) {
offsetLeft += ele.offsetLeft;
ele = ele.parentElement;
}
return offsetLeft;
};
self.resetBackButton = function() {
if ($ionicConfig.backButton.previousTitleText()) {
var previousTitleEle = getEle(PREVIOUS_TITLE);
if (previousTitleEle) {
previousTitleEle.classList.remove(HIDE);
var newPreviousTitleText = $ionicHistory.backTitle();
if (newPreviousTitleText !== previousTitleText) {
previousTitleText = previousTitleEle.innerHTML = newPreviousTitleText;
}
}
var defaultTitleEle = getEle(DEFAULT_TITLE);
if (defaultTitleEle) {
defaultTitleEle.classList.remove(HIDE);
}
}
};
self.align = function(textAlign) {
var titleEle = getEle(TITLE);
textAlign = textAlign || $attrs.alignTitle || $ionicConfig.navBar.alignTitle();
var widths = self.calcWidths(textAlign, false);
if (isBackShown && previousTitleText && $ionicConfig.backButton.previousTitleText()) {
var previousTitleWidths = self.calcWidths(textAlign, true);
var availableTitleWidth = $element[0].offsetWidth - previousTitleWidths.titleLeft - previousTitleWidths.titleRight;
if (self.titleTextWidth() <= availableTitleWidth) {
widths = previousTitleWidths;
}
}
return self.updatePositions(titleEle, widths.titleLeft, widths.titleRight, widths.buttonsLeft, widths.buttonsRight, widths.css, widths.showPrevTitle);
};
self.calcWidths = function(textAlign, isPreviousTitle) {
var titleEle = getEle(TITLE);
var backBtnEle = getEle(BACK_BUTTON);
var x, y, z, b, c, d, childSize, bounds;
var childNodes = $element[0].childNodes;
var buttonsLeft = 0;
var buttonsRight = 0;
var isCountRightOfTitle;
var updateTitleLeft = 0;
var updateTitleRight = 0;
var updateCss = '';
var backButtonWidth = 0;
// Compute how wide the left children are
// Skip all titles (there may still be two titles, one leaving the dom)
// Once we encounter a titleEle, realize we are now counting the right-buttons, not left
for (x = 0; x < childNodes.length; x++) {
c = childNodes[x];
childSize = 0;
if (c.nodeType == 1) {
// element node
if (c === titleEle) {
isCountRightOfTitle = true;
continue;
}
if (c.classList.contains(HIDE)) {
continue;
}
if (isBackShown && c === backBtnEle) {
for (y = 0; y < c.childNodes.length; y++) {
b = c.childNodes[y];
if (b.nodeType == 1) {
if (b.classList.contains(BACK_TEXT)) {
for (z = 0; z < b.children.length; z++) {
d = b.children[z];
if (isPreviousTitle) {
if (d.classList.contains(DEFAULT_TITLE)) continue;
backButtonWidth += d.offsetWidth;
} else {
if (d.classList.contains(PREVIOUS_TITLE)) continue;
backButtonWidth += d.offsetWidth;
}
}
} else {
backButtonWidth += b.offsetWidth;
}
} else if (b.nodeType == 3 && b.nodeValue.trim()) {
bounds = ionic.DomUtil.getTextBounds(b);
backButtonWidth += bounds && bounds.width || 0;
}
}
childSize = backButtonWidth || c.offsetWidth;
} else {
// not the title, not the back button, not a hidden element
childSize = c.offsetWidth;
}
} else if (c.nodeType == 3 && c.nodeValue.trim()) {
// text node
bounds = ionic.DomUtil.getTextBounds(c);
childSize = bounds && bounds.width || 0;
}
if (isCountRightOfTitle) {
buttonsRight += childSize;
} else {
buttonsLeft += childSize;
}
}
// Size and align the header titleEle based on the sizes of the left and
// right children, and the desired alignment mode
if (textAlign == 'left') {
updateCss = 'title-left';
if (buttonsLeft) {
updateTitleLeft = buttonsLeft + 15;
}
if (buttonsRight) {
updateTitleRight = buttonsRight + 15;
}
} else if (textAlign == 'right') {
updateCss = 'title-right';
if (buttonsLeft) {
updateTitleLeft = buttonsLeft + 15;
}
if (buttonsRight) {
updateTitleRight = buttonsRight + 15;
}
} else {
// center the default
var margin = Math.max(buttonsLeft, buttonsRight) + 10;
if (margin > 10) {
updateTitleLeft = updateTitleRight = margin;
}
}
return {
backButtonWidth: backButtonWidth,
buttonsLeft: buttonsLeft,
buttonsRight: buttonsRight,
titleLeft: updateTitleLeft,
titleRight: updateTitleRight,
showPrevTitle: isPreviousTitle,
css: updateCss
};
};
self.updatePositions = function(titleEle, updateTitleLeft, updateTitleRight, buttonsLeft, buttonsRight, updateCss, showPreviousTitle) {
var deferred = $q.defer();
// only make DOM updates when there are actual changes
if (titleEle) {
if (updateTitleLeft !== titleLeft) {
titleEle.style.left = updateTitleLeft ? updateTitleLeft + 'px' : '';
titleLeft = updateTitleLeft;
}
if (updateTitleRight !== titleRight) {
titleEle.style.right = updateTitleRight ? updateTitleRight + 'px' : '';
titleRight = updateTitleRight;
}
if (updateCss !== titleCss) {
updateCss && titleEle.classList.add(updateCss);
titleCss && titleEle.classList.remove(titleCss);
titleCss = updateCss;
}
}
if ($ionicConfig.backButton.previousTitleText()) {
var prevTitle = getEle(PREVIOUS_TITLE);
var defaultTitle = getEle(DEFAULT_TITLE);
prevTitle && prevTitle.classList[ showPreviousTitle ? 'remove' : 'add'](HIDE);
defaultTitle && defaultTitle.classList[ showPreviousTitle ? 'add' : 'remove'](HIDE);
}
ionic.requestAnimationFrame(function() {
if (titleEle && titleEle.offsetWidth + 10 < titleEle.scrollWidth) {
var minRight = buttonsRight + 5;
var testRight = $element[0].offsetWidth - titleLeft - self.titleTextWidth() - 20;
updateTitleRight = testRight < minRight ? minRight : testRight;
if (updateTitleRight !== titleRight) {
titleEle.style.right = updateTitleRight + 'px';
titleRight = updateTitleRight;
}
}
deferred.resolve();
});
return deferred.promise;
};
self.setCss = function(elementClassname, css) {
ionic.DomUtil.cachedStyles(getEle(elementClassname), css);
};
var eleCache = {};
function getEle(className) {
if (!eleCache[className]) {
eleCache[className] = $element[0].querySelector('.' + className);
}
return eleCache[className];
}
$scope.$on('$destroy', function() {
for (var n in eleCache) eleCache[n] = null;
});
}]);
|
mallzee/ionic
|
js/angular/controller/headerBarController.js
|
JavaScript
|
mit
| 9,054
|
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(3333, '0.0.0.0', function (err, result) {
if (err) {
console.log(err);
}
console.log('Listening at 0.0.0.0:3333');
});
|
PAK90/comparisons
|
server.js
|
JavaScript
|
mit
| 391
|
function (doc) {
if (doc.TYPE_NAME === 'config.syncToken') {
var type = doc._id.split(':')[1];
emit(type, doc);
}
}
|
wmakeev/moysklad-couch-sync
|
res/couch-db/views/tools/sync-tokens/map.js
|
JavaScript
|
mit
| 128
|
import React from 'react'
import PropTypes from 'prop-types'
import { FormGroup, Label, Col } from 'reactstrap'
const InputWrapper = props => {
const { fieldName } = props
return (
<FormGroup key={fieldName} row>
<Label for={fieldName} sm={4}>
{fieldName}
</Label>
<Col sm={8}>
{props.children}
</Col>
</FormGroup>
)
}
InputWrapper.propTypes = {
fieldName: PropTypes.string.isRequired,
children: PropTypes.node.isRequired
}
export default InputWrapper
|
Eaternity/eaternity-edb-solution
|
app/components/InputWrapper/InputWrapper.js
|
JavaScript
|
mit
| 513
|
import VolumeOffIcon from 'svg-react-loader?name=RepeatIcon!material-design-icons/av/svg/design/ic_volume_off_48px.svg?';
import VolumeMuteIcon from 'svg-react-loader?name=RepeatIcon!material-design-icons/av/svg/design/ic_volume_mute_48px.svg?';
import VolumeDownIcon from 'svg-react-loader?name=RepeatIcon!material-design-icons/av/svg/design/ic_volume_down_48px.svg?';
import VolumeUpIcon from 'svg-react-loader?name=RepeatIcon!material-design-icons/av/svg/design/ic_volume_up_48px.svg?';
function getVolumeIconComponent(volume, muted) {
if (muted) {
return VolumeOffIcon;
}
if (volume === 0) {
return VolumeMuteIcon;
}
if (volume <= 1 / 2) {
return VolumeDownIcon;
}
return VolumeUpIcon;
}
export default getVolumeIconComponent;
|
benwiley4000/react-responsive-audio-player
|
packages/player/src/utils/getVolumeIconComponent.js
|
JavaScript
|
mit
| 759
|
const UI = require('../ui').UI;
const CLIOptions = require('../cli-options').CLIOptions;
const Container = require('aurelia-dependency-injection').Container;
const Project = require('../project').Project;
module.exports = class {
static inject() { return [Container, UI, CLIOptions, Project]; }
constructor(container, ui, options, project) {
this.container = container;
this.ui = ui;
this.options = options;
this.project = project;
}
execute() {
return new Promise((resolve, reject) => {
const gulp = require('gulp');
this.connectLogging(gulp);
this.project.installTranspiler();
makeInjectable(gulp, 'series', this.container);
makeInjectable(gulp, 'parallel', this.container);
process.nextTick(() => {
let task = this.project.getExport(require(this.options.taskPath), this.options.commandName);
gulp.series(task)(error => {
if (error) reject(error);
else resolve();
});
});
});
}
connectLogging(gulp) {
gulp.on('start', e => {
if (e.name[0] === '<') return;
this.ui.log(`Starting '${e.name}'...`);
});
gulp.on('stop', e => {
if (e.name[0] === '<') return;
this.ui.log(`Finished '${e.name}'`);
});
gulp.on('error', e => this.ui.log(e));
}
};
function makeInjectable(gulp, name, container) {
let original = gulp[name];
gulp[name] = function() {
let args = new Array(arguments.length);
for (let i = 0, ii = arguments.length; i < ii; ++i) {
let task = arguments[i];
if (task.inject) {
let taskName = task.name;
task = container.get(task);
task = task.execute.bind(task);
task.displayName = taskName;
}
args[i] = task;
}
return original.apply(gulp, args);
};
}
|
aurelia/cli
|
lib/commands/gulp.js
|
JavaScript
|
mit
| 1,818
|
var validator = require('validator');
var eventproxy = require('eventproxy');
var config = require('../config');
var User = require('../proxy').User;
var mail = require('../common/mail');
var tools = require('../common/tools');
var utility = require('utility');
var authMiddleWare = require('../middlewares/auth');
var uuid = require('node-uuid');
//sign up
exports.showSignup = function (req, res) {
res.render('sign/signup');
};
exports.signup = function (req, res, next) {
var loginname = validator.trim(req.body.loginname).toLowerCase();
var email = validator.trim(req.body.email).toLowerCase();
var pass = validator.trim(req.body.pass);
var rePass = validator.trim(req.body.re_pass);
var ep = new eventproxy();
ep.fail(next);
ep.on('prop_err', function (msg) {
res.status(422);
res.render('sign/signup', {error: msg, loginname: loginname, email: email});
});
// 验证信息的正确性
if ([loginname, pass, rePass, email].some(function (item) { return item === ''; })) {
ep.emit('prop_err', '信息不完整。');
return;
}
if (loginname.length < 5) {
ep.emit('prop_err', '用户名至少需要5个字符。');
return;
}
if (!tools.validateId(loginname)) {
return ep.emit('prop_err', '用户名不合法。');
}
if (!validator.isEmail(email)) {
return ep.emit('prop_err', '邮箱不合法。');
}
if (pass !== rePass) {
return ep.emit('prop_err', '两次密码输入不一致。');
}
// END 验证信息的正确性
User.getUsersByQuery({'$or': [
{'loginname': loginname},
{'email': email}
]}, {}, function (err, users) {
if (err) {
return next(err);
}
if (users.length > 0) {
ep.emit('prop_err', '用户名或邮箱已被使用。');
return;
}
tools.bhash(pass, ep.done(function (passhash) {
// create gravatar
var avatarUrl = User.makeGravatar(email);
User.newAndSave(loginname, loginname, passhash, email, avatarUrl, false, function (err) {
if (err) {
return next(err);
}
// 发送激活邮件
// mail.sendActiveMail(email, utility.md5(email + passhash + config.session_secret), loginname);
/*res.render('sign/signup', {
success: '欢迎加入 ' + config.name + '!我们已给您的注册邮箱发送了一封邮件,请点击里面的链接来激活您的帐号。'
});*/
res.redirect('/signin');
});
}));
});
};
/**
* Show user login page.
*
* @param {HttpRequest} req
* @param {HttpResponse} res
*/
exports.showLogin = function (req, res) {
req.session._loginReferer = req.headers.referer;
res.render('sign/signin');
};
/**
* define some page when login just jump to the home page
* @type {Array}
*/
var notJump = [
'/active_account', //active page
'/reset_pass', //reset password page, avoid to reset twice
'/signup', //regist page
'/search_pass' //serch pass page
];
/**
* Handle user login.
*
* @param {HttpRequest} req
* @param {HttpResponse} res
* @param {Function} next
*/
exports.login = function (req, res, next) {
var loginname = validator.trim(req.body.name).toLowerCase();
var pass = validator.trim(req.body.pass);
var ep = new eventproxy();
ep.fail(next);
if (!loginname || !pass) {
res.status(422);
return res.render('sign/signin', { error: '信息不完整。' });
}
var getUser;
if (loginname.indexOf('@') !== -1) {
getUser = User.getUserByMail;
} else {
getUser = User.getUserByLoginName;
}
ep.on('login_error', function (login_error) {
res.status(403);
res.render('sign/signin', { error: '用户名或密码错误' });
});
getUser(loginname, function (err, user) {
if (err) {
return next(err);
}
if (!user) {
return ep.emit('login_error');
}
var passhash = user.pass;
tools.bcompare(pass, passhash, ep.done(function (bool) {
if (!bool) {
return ep.emit('login_error');
}
/*if (!user.active) {
// 重新发送激活邮件
mail.sendActiveMail(user.email, utility.md5(user.email + passhash + config.session_secret), user.loginname);
res.status(403);
return res.render('sign/signin', { error: '此帐号还没有被激活,激活链接已发送到 ' + user.email + ' 邮箱,请查收。' });
}*/
// store session cookie
authMiddleWare.gen_session(user, res);
//check at some page just jump to home page
var refer = req.session._loginReferer || '/';
for (var i = 0, len = notJump.length; i !== len; ++i) {
if (refer.indexOf(notJump[i]) >= 0) {
refer = '/';
break;
}
}
res.redirect(refer);
}));
});
};
// sign out
exports.signout = function (req, res, next) {
req.session.destroy();
res.clearCookie(config.auth_cookie_name, { path: '/' });
res.redirect('/');
};
exports.activeAccount = function (req, res, next) {
var key = validator.trim(req.query.key);
var name = validator.trim(req.query.name);
User.getUserByLoginName(name, function (err, user) {
if (err) {
return next(err);
}
if (!user) {
return next(new Error('[ACTIVE_ACCOUNT] no such user: ' + name));
}
var passhash = user.pass;
if (!user || utility.md5(user.email + passhash + config.session_secret) !== key) {
return res.render('notify/notify', {error: '信息有误,帐号无法被激活。'});
}
if (user.active) {
return res.render('notify/notify', {error: '帐号已经是激活状态。'});
}
user.active = true;
user.save(function (err) {
if (err) {
return next(err);
}
res.render('notify/notify', {success: '帐号已被激活,请登录'});
});
});
};
exports.showSearchPass = function (req, res) {
res.render('sign/search_pass');
};
exports.updateSearchPass = function (req, res, next) {
var email = validator.trim(req.body.email).toLowerCase();
if (!validator.isEmail(email)) {
return res.render('sign/search_pass', {error: '邮箱不合法', email: email});
}
// 动态生成retrive_key和timestamp到users collection,之后重置密码进行验证
var retrieveKey = uuid.v4();
var retrieveTime = new Date().getTime();
User.getUserByMail(email, function (err, user) {
if (!user) {
res.render('sign/search_pass', {error: '没有这个电子邮箱。', email: email});
return;
}
user.retrieve_key = retrieveKey;
user.retrieve_time = retrieveTime;
user.save(function (err) {
if (err) {
return next(err);
}
// 发送重置密码邮件
mail.sendResetPassMail(email, retrieveKey, user.loginname);
res.render('notify/notify', {success: '我们已给您填写的电子邮箱发送了一封邮件,请在24小时内点击里面的链接来重置密码。'});
});
});
};
/**
* reset password
* 'get' to show the page, 'post' to reset password
* after reset password, retrieve_key&time will be destroy
* @param {http.req} req
* @param {http.res} res
* @param {Function} next
*/
exports.resetPass = function (req, res, next) {
var key = validator.trim(req.query.key);
var name = validator.trim(req.query.name);
User.getUserByNameAndKey(name, key, function (err, user) {
if (!user) {
res.status(403);
return res.render('notify/notify', {error: '信息有误,密码无法重置。'});
}
var now = new Date().getTime();
var oneDay = 1000 * 60 * 60 * 24;
if (!user.retrieve_time || now - user.retrieve_time > oneDay) {
res.status(403);
return res.render('notify/notify', {error: '该链接已过期,请重新申请。'});
}
return res.render('sign/reset', {name: name, key: key});
});
};
exports.updatePass = function (req, res, next) {
var psw = validator.trim(req.body.psw) || '';
var repsw = validator.trim(req.body.repsw) || '';
var key = validator.trim(req.body.key) || '';
var name = validator.trim(req.body.name) || '';
var ep = new eventproxy();
ep.fail(next);
if (psw !== repsw) {
return res.render('sign/reset', {name: name, key: key, error: '两次密码输入不一致。'});
}
User.getUserByNameAndKey(name, key, ep.done(function (user) {
if (!user) {
return res.render('notify/notify', {error: '错误的激活链接'});
}
tools.bhash(psw, ep.done(function (passhash) {
user.pass = passhash;
user.retrieve_key = null;
user.retrieve_time = null;
user.active = true; // 用户激活
user.save(function (err) {
if (err) {
return next(err);
}
return res.render('notify/notify', {success: '你的密码已重置。'});
});
}));
}));
};
|
zaiyu-dev/club
|
controllers/sign.js
|
JavaScript
|
mit
| 8,890
|
(function(define, describe) {
"use strict";
var dependencies = [
'bootstrap'
];
define(dependencies, function(AppBootstrap) {
describe('User management service', function() {
var loginApi = '/api/auth/login';
beforeEach(module('app'));
var userService, $httpBackend, $location, $rootScope;
beforeEach(function() {
inject(function(_dngUserManagement_, _$httpBackend_, _$location_, _$rootScope_, $cookies) {
userService = _dngUserManagement_;
$httpBackend = _$httpBackend_;
$location = _$location_;
$rootScope = _$rootScope_;
// Make sure user authentication data is not available
$cookies.remove('authUser');
});
});
it('supports user login', function() {
spyOn($location, 'path').and.callThrough();
$httpBackend.whenGET('/api/generic').respond(200, AppTestResponses.metaApiResponse);
$httpBackend.whenPOST(loginApi).respond(200, AppTestResponses.auth.loginResponse);
// GIVEN user credentials
var username = 'test';
var password = 'test';
// WHEN user does successful login
userService.login({username: username, password: password});
$httpBackend.flush();
// THEN user is authenticated
expect($rootScope.user.isAuthenticated()).toBeTruthy();
// AND redirected to main page
expect($location.path).toHaveBeenCalledWith('/');
});
it('login page can be accessed by unauthenticated user', function() {
// GIVEN unauthenticated user wants to view login page
// WHEN validating access to the view
var status = userService.canAccess({
href: function() {
return '#!/auth/login';
}
}, null, {name: '', public: true}, null);
// THEN it should return expected return code
expect(status).toBeFalsy();
// AND no redirect is made (as no runtime error occurs due to missing "go" method)
});
it('restricted views can be accessed only authenticated user', function() {
var route;
// GIVEN unauthenticated user wants to view restricted page
// WHEN validating access to the view
var status = userService.canAccess({
href: function() {
return '#!/main';
},
go: function(_route) {
route = _route;
}
}, {
preventDefault: function() {}
}, {name: '', public: false}, null);
// THEN access is denied and redirect to login page occurs
expect(status).toBeFalsy();
expect(route).toEqual('auth.login');
});
});
});
})(define, describe);
|
jojanper/ng-app
|
test/specs/services/userSpec.js
|
JavaScript
|
mit
| 3,235
|
class DateHelper {
constructor() {
}
getCurrentDateTime() {
var date = new Date();
var hour = date.getHours();
hour = (hour < 10 ? "0" : "") + hour;
var min = date.getMinutes();
min = (min < 10 ? "0" : "") + min;
var sec = date.getSeconds();
sec = (sec < 10 ? "0" : "") + sec;
var year = date.getFullYear();
var month = date.getMonth() + 1;
month = (month < 10 ? "0" : "") + month;
var day = date.getDate();
day = (day < 10 ? "0" : "") + day;
return year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec;
}
}
module.exports = new DateHelper();
|
fitzlucassen/itineraris_api
|
helpers/date.js
|
JavaScript
|
mit
| 686
|
'use strict';
// Use vanilla JS only in case jQuery doesn't load
var mapError = function() {
document.getElementById('map-error').style.display = 'block';
document.getElementById('map-error').innerHTML = 'Sorry, something went wrong. Please try again later.';
};
|
Witchfather/Neighbourhood-Map
|
js/maperror.js
|
JavaScript
|
mit
| 275
|
const knex = require('../db/knex');
function verify (req, res, next) {
//setup a container to store errors
const errors = [];
//grab values from req.body
const firstName = req.body.preferredName;
const lastName = req.body.lastName;
const email = req.body.email;
const password = req.body.password;
//check if the fields are blank
if (firstName === '') {
errors.push('Please Input First Name! ');
}
if (lastName === '') {
errors.push('Please Input Last Name! ');
}
if (email === '') {
errors.push('Please Input an Email! ');
}
if (password === '' || password.length < 8) {
errors.push('Please Input a Password at Least 8 characters long! ');
}
//does the username already exist??
isUnique('email', email, (err, response) => {
if (err) {
return next(err);
}
if (!response) {
errors.push('Login credentials already exist!');
}
if (errors.length) {
const renderObject = {};
renderObject.errors = errors;
res.render('signup', renderObject);
} else {
return next();
}
});
}
//some helper function
function isUnique (column, value, callback) {
// const mult = { error: 'already exists'};
knex('users')
.select()
.where(column, value)
.then((results) => {
if (results.length) {
callback(null, false);
} else {
callback(null, true);
}
})
.catch((err) => {
callback(err);
});
}
module.exports = {
verify
};
|
nathanejbrown/restaurant-project
|
src/server/routes/validations.js
|
JavaScript
|
mit
| 1,465
|
module.exports = {
sync: (list, callback) => {
(function loop(list, callback, i, result) {
list[i]((err, data) => {
return list[++i] && !err ? loop(list, callback, i, data) : callback(err, data)
}, result)
})(list, callback, 0)
},
parallel: (list, callback) => {
let listCount = list.length, lock = 1
for (let i = list.length - 1; i >= 0; i -= 1) {
list[i]((err, data) => {
list[i] = data
return (--listCount !== 0 && lock === 1 && !err) === true || --lock || callback(err, list)
})
}
}
}
|
mjasnikovs/scpp
|
index.js
|
JavaScript
|
mit
| 527
|
function UserProfile(url, auth, auth_cb, timeout, async_job_check_time_ms, service_version) {
var self = this;
this.url = url;
var _url = url;
this.timeout = timeout;
var _timeout = timeout;
this.async_job_check_time_ms = async_job_check_time_ms;
if (!this.async_job_check_time_ms)
this.async_job_check_time_ms = 100;
this.async_job_check_time_scale_percent = 150;
this.async_job_check_max_time_ms = 300000; // 5 minutes
this.service_version = service_version;
if (typeof(_url) != "string" || _url.length == 0) {
_url = "https://kbase.us/services/user_profile/rpc";
}
var _auth = auth ? auth : { 'token' : '', 'user_id' : ''};
var _auth_cb = auth_cb;
this.ver = function (_callback, _errorCallback) {
if (_callback && typeof _callback !== 'function')
throw 'Argument _callback must be a function if defined';
if (_errorCallback && typeof _errorCallback !== 'function')
throw 'Argument _errorCallback must be a function if defined';
if (typeof arguments === 'function' && arguments.length > 0+2)
throw 'Too many arguments ('+arguments.length+' instead of '+(0+2)+')';
return json_call_ajax(_url, "UserProfile.ver",
[], 1, _callback, _errorCallback);
};
this.filter_users = function (p, _callback, _errorCallback) {
if (typeof p === 'function')
throw 'Argument p can not be a function';
if (_callback && typeof _callback !== 'function')
throw 'Argument _callback must be a function if defined';
if (_errorCallback && typeof _errorCallback !== 'function')
throw 'Argument _errorCallback must be a function if defined';
if (typeof arguments === 'function' && arguments.length > 1+2)
throw 'Too many arguments ('+arguments.length+' instead of '+(1+2)+')';
return json_call_ajax(_url, "UserProfile.filter_users",
[p], 1, _callback, _errorCallback);
};
this.get_user_profile = function (usernames, _callback, _errorCallback) {
if (typeof usernames === 'function')
throw 'Argument usernames can not be a function';
if (_callback && typeof _callback !== 'function')
throw 'Argument _callback must be a function if defined';
if (_errorCallback && typeof _errorCallback !== 'function')
throw 'Argument _errorCallback must be a function if defined';
if (typeof arguments === 'function' && arguments.length > 1+2)
throw 'Too many arguments ('+arguments.length+' instead of '+(1+2)+')';
return json_call_ajax(_url, "UserProfile.get_user_profile",
[usernames], 1, _callback, _errorCallback);
};
this.set_user_profile = function (p, _callback, _errorCallback) {
if (typeof p === 'function')
throw 'Argument p can not be a function';
if (_callback && typeof _callback !== 'function')
throw 'Argument _callback must be a function if defined';
if (_errorCallback && typeof _errorCallback !== 'function')
throw 'Argument _errorCallback must be a function if defined';
if (typeof arguments === 'function' && arguments.length > 1+2)
throw 'Too many arguments ('+arguments.length+' instead of '+(1+2)+')';
return json_call_ajax(_url, "UserProfile.set_user_profile",
[p], 0, _callback, _errorCallback);
};
this.update_user_profile = function (p, _callback, _errorCallback) {
if (typeof p === 'function')
throw 'Argument p can not be a function';
if (_callback && typeof _callback !== 'function')
throw 'Argument _callback must be a function if defined';
if (_errorCallback && typeof _errorCallback !== 'function')
throw 'Argument _errorCallback must be a function if defined';
if (typeof arguments === 'function' && arguments.length > 1+2)
throw 'Too many arguments ('+arguments.length+' instead of '+(1+2)+')';
return json_call_ajax(_url, "UserProfile.update_user_profile",
[p], 0, _callback, _errorCallback);
};
this.lookup_globus_user = function (usernames, _callback, _errorCallback) {
if (typeof usernames === 'function')
throw 'Argument usernames can not be a function';
if (_callback && typeof _callback !== 'function')
throw 'Argument _callback must be a function if defined';
if (_errorCallback && typeof _errorCallback !== 'function')
throw 'Argument _errorCallback must be a function if defined';
if (typeof arguments === 'function' && arguments.length > 1+2)
throw 'Too many arguments ('+arguments.length+' instead of '+(1+2)+')';
return json_call_ajax(_url, "UserProfile.lookup_globus_user",
[usernames], 1, _callback, _errorCallback);
};
this.status = function (_callback, _errorCallback) {
if (_callback && typeof _callback !== 'function')
throw 'Argument _callback must be a function if defined';
if (_errorCallback && typeof _errorCallback !== 'function')
throw 'Argument _errorCallback must be a function if defined';
if (typeof arguments === 'function' && arguments.length > 2)
throw 'Too many arguments ('+arguments.length+' instead of 2)';
return json_call_ajax(_url, "UserProfile.status",
[], 1, _callback, _errorCallback);
};
/*
* JSON call using jQuery method.
*/
function json_call_ajax(srv_url, method, params, numRets, callback, errorCallback, json_rpc_context, deferred) {
if (!deferred)
deferred = $.Deferred();
if (typeof callback === 'function') {
deferred.done(callback);
}
if (typeof errorCallback === 'function') {
deferred.fail(errorCallback);
}
var rpc = {
params : params,
method : method,
version: "1.1",
id: String(Math.random()).slice(2),
};
if (json_rpc_context)
rpc['context'] = json_rpc_context;
var beforeSend = null;
var token = (_auth_cb && typeof _auth_cb === 'function') ? _auth_cb()
: (_auth.token ? _auth.token : null);
if (token != null) {
beforeSend = function (xhr) {
xhr.setRequestHeader("Authorization", token);
}
}
var xhr = jQuery.ajax({
url: srv_url,
dataType: "text",
type: 'POST',
processData: false,
data: JSON.stringify(rpc),
beforeSend: beforeSend,
timeout: _timeout,
success: function (data, status, xhr) {
var result;
try {
var resp = JSON.parse(data);
result = (numRets === 1 ? resp.result[0] : resp.result);
} catch (err) {
deferred.reject({
status: 503,
error: err,
url: srv_url,
resp: data
});
return;
}
deferred.resolve(result);
},
error: function (xhr, textStatus, errorThrown) {
var error;
if (xhr.responseText) {
try {
var resp = JSON.parse(xhr.responseText);
error = resp.error;
} catch (err) { // Not JSON
error = "Unknown error - " + xhr.responseText;
}
} else {
error = "Unknown Error";
}
deferred.reject({
status: 500,
error: error
});
}
});
var promise = deferred.promise();
promise.xhr = xhr;
return promise;
}
}
|
kbase/user_profile
|
lib/javascript/UserProfile/Client.js
|
JavaScript
|
mit
| 8,294
|
/** @license
* RequireJS plugin for async dependency load like JSONP and Google Maps
* Author: Miller Medeiros
* Version: 0.1.1 (2011/11/17)
* Released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
define(function(){
var DEFAULT_PARAM_NAME = "callback",
_uid = 0;
function injectScript(src){
var s, t;
s = document.createElement("script"); s.type = "text/javascript"; s.async = true; s.src = src;
t = document.getElementsByTagName("script")[0]; t.parentNode.insertBefore(s,t);
}
/*
http://maps.google.com/maps/api/js?sensor=false&callback=__mm_asynch_req__1321522823097
http://twitter.com/statuses/user_timeline/Integralist.json?callback&callback=__mm_asynch_req__1321522831339
*/
function formatUrl(name, id){
var paramRegex = /!(.+)/,
url = name.replace(paramRegex, ""),
param = (paramRegex.test(name))? name.replace(/.+!/, "") : DEFAULT_PARAM_NAME;
url += (url.indexOf("?") < 0)? "?" : "&";
return url + param + "=" + id;
}
function uid() {
_uid += 1;
return "__async_req_" + _uid + "__";
}
return{
load : function(name, req, onLoad, config){
if(config.isBuild){
onLoad(null); //avoid errors on the optimizer
}else{
var id = uid();
window[id] = onLoad; //create a global variable that stores onLoad so callback function can define new module after async load
injectScript(formatUrl(name, id));
}
}
};
});
|
dineshkummarc/Embryo
|
Assets/Scripts/Plugins/async.js
|
JavaScript
|
mit
| 1,604
|
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
bcrypt = require('bcrypt-nodejs');
// user Schema
var UserSchema = new Schema({
name: String,
username: { type: String, required: true, index: { unique: true } },
password: { type: String, required: true, select: false },
admin: {type: Boolean, require: true, default: false},
sourceFeeds: [{type: String, ref: 'SourceFeed'}], // Array of Source Feed ID's
outputFeeds: [{type: Schema.Types.ObjectId, ref: 'OutputFeed'}] // Array of Output Feed ID's
});
//Hash password before save
UserSchema.pre('save', function(next) {
var user = this;
// Has only if modified
if (!user.isModified('password')) {
return next();
}
// Generate Hash
bcrypt.hash(user.password, null, null, function(err, hash) {
if (err) {
return next(err);
}
// change password to hashed version
user.password = hash;
next();
});
});
//Method to compare given password with db hash
UserSchema.methods.comparePassword = function(password) {
var user = this;
return bcrypt.compareSync(password, user.password);
};
module.exports = mongoose.model('User', UserSchema);
|
moorepatrick/oyster
|
app/models/user.js
|
JavaScript
|
mit
| 1,163
|
var Room = require('./models/Room')
var User = require('./models/User')
module.exports = function (client, io) {
let connectedClient = io.sockets.connected[client.id]
client
.on('join', function (data) {
if (!client.authenticated) {
connectedClient.emit('reject')
connectedClient.disconnect()
} else {
client.join(data.room)
client.room = data.room
connectedClient.emit('authenticated')
console.log(connectedClient.user, 'joined:', data)
client.broadcast.to(client.room).emit('message', {
user: 'Server Bot',
msg: connectedClient.user.username+ ' has joined.'})
Room.findOne({'alias': data.room})
.populate('messages.user_id')
.populate('users.user_id')
.exec(function (err, room) {
if (err) {
console.log('Invalid Room specified')
} else {
if (!room) {
console.log('No room found')
} else {
console.log('room:', room)
connectedClient.emit('joined', room)
}
}
})
/* Room.findOneAndUpdate(
{'alias': data.room},
{$set:
{users: {
user: {
online: true,
user_id: connectedClient.user.id
}
//user_id: req.user || ''
}
}},
{safe: true, new : true},
function(err, room) {
if (err) {
console.log('err:', err)
// return connectedClient.emit('error', 'Something went wrong, sorry.', err)
} else {
return connectedClient.emit('joined', room)
}
}
) */
}
})
.on('message', function (data) {
console.log('got message data:', data)
console.log('client room?', client.room)
Room.findOneAndUpdate(
{'alias': client.room},
{$push:
{messages: {
message: data,
user_id: connectedClient.user.id
}
}},
{safe: true, upsert: true, new : true},
function(err, room) {
if (err) {
return console.log('(PUT) message:', err)
// next(err)
}
client.broadcast.to(client.room).emit('message', {user: connectedClient.user.username, msg: data})
// return res.status(201).json(room)
}
)
})
return client
}
|
NathanBland/resound
|
api/socketHandle.js
|
JavaScript
|
mit
| 2,468
|
import React from 'react';
import { Router, Route } from 'dva/router';
import IndexPage from './routes/IndexPage';
import Users from "./routes/Users.js";
const RouterConfig = ({ history }) => {
return (
<Router history={history}>
<Route path="/" component={IndexPage} />
<Route path="/users" component={Users} />
</Router>
);
}
export default RouterConfig;
|
anchoretics/ztf-work-app
|
manager/src/router.js
|
JavaScript
|
mit
| 384
|
var R = require('ramda');
var _join = R.join(' , ');
var log = console.log.bind(console);
var _trace = R.curry(function(tag, x){
log(tag, x);
return x;
});
var trace = _trace("logger");
var CARS = [
{name: "Ferrari FF", horsepower: 160, dollar_value: 700000, in_stock: true, property: {a:{b:2}},delicious:[1,2,3]},
{name: "Spyker C12 Zagato", horsepower: 550, dollar_value: 132000, in_stock: false, property: {a:{b:2}},delicious:[4,5,6]},
{name: "Jaguar XKR-S", horsepower: 450, dollar_value: 132000, in_stock: false, property: {a:{b:2}},delicious:[7,8,9]},
{name: "Audi R8", horsepower: 325, dollar_value: 114200, in_stock: false, property: {a:{b:2}},delicious:[0,1,2]},
{name: "Aston Martin One-77", horsepower: 650, dollar_value: 1850000, in_stock: true, property: {a:{b:2}},delicious:[2,3,4]},
{name: "Pagani Huayra", horsepower: 200, dollar_value: 1300000, in_stock: false, property: {a:{b:2}},delicious:[3,4,5]},
];
var _prop = R.prop(R.__);
var _isNumber = R.is(Number);
var _headLens = R.lensIndex(0);
var _xpath = R.lensPath(['property', 'a']);
var _xLens = R.lensProp('name');
var _setLens = R.lens(R.prop('name'), R.assoc('name'));
var _defaultProp = {
name:'Alice',
val: 100
};
var _condPower = R.cond([
[R.gte(200),R.always('A')],
[R.gte(300),R.always('C')],
[R.gte(400),R.always('B')],
[R.gte(500),R.always('D')],
[R.gte(600),R.always('E')],
[R.T,R.always('F')]
]);
var _propEqInstock = R.propEq('in_stock',R.__);
var _propEqDollarValue = R.propEq('dollar_value',R.__);
var _groupByHorsepower = R.groupBy(R.pipe(_prop('horsepower'),_condPower));
var _allpassT = R.allPass([_propEqInstock(false), _propEqDollarValue(1300000)]);
var _allpassF = R.allPass([_propEqInstock(false), _propEqDollarValue(1400000)]);
var _anypass = R.anyPass([_propEqInstock(false), _propEqDollarValue(1400000)]);
var _and = R.and(_propEqInstock(false), _propEqDollarValue(1400000));
var _or = R.or(_propEqInstock(false), _propEqDollarValue(1400000));
var t1 = R.pipe(R.head,R.has('name'));
var t2 = R.pipe(R.head,R.hasIn('name'));
var t3 = R.pipe(R.head,_prop('delicious'),R.init);
var t4 = R.pipe(R.head,_prop('delicious'),R.indexOf(3));
var t5 = R.pipe(R.head,_prop('delicious'),R.lastIndexOf(-1));
var t6 = R.reduce(R.max,2);
var t7 = R.reduce(R.min,4);
var t8 = R.reduce(R.maxBy(R.multiply),1);
var t9 = R.reduce(R.minBy(R.multiply),Infinity);
var tt1 = R.pipe(R.head,_prop('horsepower'),R.inc);
var tt2 = R.compose(R.is(Number),R.propOr(1,'power'));
var tt3 = R.find(R.propEq('dollar_value', 132000)); //find返回第一条符合条件的
var tt4 = R.findIndex(R.propEq('dollar_value', 132000)); //findIndex返回第一条符合条件的索引
var tt5 = R.findLast(R.propEq('in_stock', true)); //findLast返回最后一条符合条件的
var tt6 = R.compose(R.repeat(R.__,3),R.findLastIndex(R.propEq('in_stock', true)));//findLastIndex返回最后一条符合条件的索引
var tt7 = R.compose(R.toString,R.head);
var tt8 = R.compose(R.isEmpty,trace,R.identity,R.type,trace,R.empty,R.head);
var tt9 = R.pipe(R.last,R.view(_xLens)); //view 类似R.prop
var tt10 = R.pipe(R.last,R.valuesIn); //R.valuesIn 类似R.props
var tt11 = R.pipe(R.last,R.keysIn,R.contains('name'));
var _mapIndexed = R.addIndex(R.map);
log(_mapIndexed(function(val,idx){
return idx + '-' + val;
},['a', 'b', 'c']));
var tt12 = R.pipe(R.head,_prop('delicious'),R.append(4),R.prepend(0),R.remove(1,2));
var tt13 = R.pipe(R.head,R.toPairs);
var tt14 = R.pipe(R.last,R.toPairsIn);
var tt15 = R.pipe(R.last,R.values);
var tt16 = R.pipe(R.last,R.set(_setLens, 'Ma zi da'),_prop('name'));
var tt17 = R.pipe(R.last,_prop('delicious'),trace,R.set(_headLens, 0));
var tt18 = R.pipe(R.over(_headLens,R.toLower),trace);
var tt19 = R.pipe(R.head,_prop('delicious'),trace,R.zip(R.__,['a', 'b', 'c']));
var tt20 = R.pipe(R.head,R.keys,trace,R.zipObj(R.__,['h1','h2','h3','h4','h5','h6']),R.assoc('wheels',4))
var tt21 = R.zipWith(R.add, R.__, [2, 3, 4]);
var tt22 = R.pipe(R.head,R.assoc('wheels',4),R.dissoc('property'));
var tt23 = R.pipe(R.head,R.assocPath(['property','a','b'],3),R.dissocPath(['property','a','b']));
var tt24 = R.pipe(R.indexBy(R.prop('name')),R.init);
var tt25 = R.groupWith(R.equals);
var tt26 = R.once(R.add(1));
var tt27 = R.all(R.lte(200),[200,300]);
var tt28 = R.compose(_allpassT,R.last);
var tt29 = R.compose(_allpassF,R.last);
var tt30 = R.compose(_anypass,R.last);
var tt31 = R.partial(function(){
return R.values(arguments);
}, ['parm1','parm2']);
var tt32 = R.partialRight(function(){
return R.values(arguments);
}, ['parm1','parm2']);
var tt33 = R.any(R.lte(200),[100,300]);
var tt34 = R.compose(_and,R.last);
var tt35 = R.compose(_or,R.last);
log(tt1(CARS));
log(tt2(CARS));
log(tt3(CARS));
log(tt4(CARS));
log(tt5(CARS));
log(tt6(CARS));
log(tt7(CARS));
log(tt8(CARS));
log(tt9(CARS));
log(tt10(CARS));
log(tt11(CARS));
log(tt12(CARS));
log(tt13(CARS));
log(tt14(CARS));
log(tt15(CARS));
log(tt16(CARS));
log(tt17(CARS));
log(tt18(tt15(CARS)));
log(tt19(CARS));
log(tt20(CARS));
log(tt21([1,2,3]));
log(tt22(CARS));
log(tt23(CARS));
log(tt24(CARS));
log(_groupByHorsepower(CARS))
log(tt25([0, 1, 1, 2, 3, 5, 8, 13, 21]))
log(tt26(10));
log(tt26(20));
log(tt27);
log(tt33);
log(tt28(CARS));
log(tt29(CARS));
log(tt30(CARS));
log(tt31("parm3","parm4",['parm5']));
log(tt32("parm3","parm4",['parm5']));
log(tt34(CARS));
log(tt35(CARS));
log("===================================")
log(R.inc(1));
log(t1(CARS));
log(t2(CARS));
log(t3(CARS));
log(R.is(Object, {}));
log(R.is(Number, false));
log(t4(CARS));
log(t5(CARS));
log(t6([1,2,3,4,5]));
log(t7([1,2,3,4,5]));
log(t8([3, -5, 4, 1, -2]));
log(t9([]));
|
szh0526/ramda_practice
|
demo/test2.js
|
JavaScript
|
mit
| 5,807
|
'use strict';
var React = require('react');
var mui = require('material-ui');
var SvgIcon = mui.SvgIcon;
var createClass = require('create-react-class');
var CommunicationChatBubble = createClass({
displayName: 'CommunicationChatBubble',
render: function render() {
return React.createElement(
SvgIcon,
this.props,
React.createElement('path', { d: 'M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z' })
);
}
});
module.exports = CommunicationChatBubble;
|
mikamaunula/react-material-icons
|
icons/communication/chat-bubble.js
|
JavaScript
|
mit
| 508
|
const emitter = require('../eventBus')
const { crud } = require('../../src/db')
const printCommand = ( message ) => {
const { user , text } = message
const player = { slackId: user }
crud.findOne( player, (err, doc) => {
const username = doc ? doc.username : user
console.log(`${username} runs -> ${text}`)
})
}
emitter.on( 'PRINT_COMMAND', printCommand )
console.log('middleware PRINT_COMMAND')
|
delete/jira-score
|
slackbot/middlewares/print-command.js
|
JavaScript
|
mit
| 429
|
/*
* VideoBuffer
* Visit http://createjs.com/ for documentation, updates and examples.
*
* Copyright (c) 2010 gskinner.com, inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* @module EaselJS
*/
// namespace:
this.createjs = this.createjs||{};
(function() {
"use strict";
// constructor:
/**
* When an HTML video seeks, including when looping, there is an indeterminate period before a new frame is available.
* This can result in the video blinking or flashing when it is drawn to a canvas. The VideoBuffer class resolves
* this issue by drawing each frame to an off-screen canvas and preserving the prior frame during a seek.
*
* var myBuffer = new createjs.VideoBuffer(myVideo);
* var myBitmap = new createjs.Bitmap(myBuffer);
*
* @class VideoBuffer
* @param {HTMLVideoElement} video The HTML video element to buffer.
* @constructor
**/
function VideoBuffer(video) {
// private properties:
/**
* Used by Bitmap to determine when the video buffer is ready to be drawn. Not intended for general use.
* @property readyState
* @protected
* @type {Number}
* @default 0
**/
this.readyState = video.readyState;
/**
* @property _video
* @protected
* @type {HTMLVideoElement}
* @default 0
**/
this._video = video;
/**
* @property _canvas
* @protected
* @type {HTMLCanvasElement}
* @default 0
**/
this._canvas = null;
/**
* @property _lastTime
* @protected
* @type {Number}
* @default -1
**/
this._lastTime = -1;
if (this.readyState < 2) { video.addEventListener("canplaythrough", this._videoReady.bind(this)); } //once:true isn't supported everywhere, but its a non-critical optimization here.
}
var p = VideoBuffer.prototype;
// public methods:
/**
* Gets an HTML canvas element showing the current video frame, or the previous frame if in a seek / loop.
* Primarily for use by {{#crossLink "Bitmap"}}{{/crossLink}}.
* @method getImage
**/
p.getImage = function() {
if (this.readyState < 2) { return; }
var canvas=this._canvas, video = this._video;
if (!canvas) {
canvas = this._canvas = createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
}
if (video.readyState >= 2 && video.currentTime !== this._lastTime) {
var ctx = canvas.getContext("2d");
ctx.clearRect(0,0,canvas.width,canvas.height);
ctx.drawImage(video,0,0,canvas.width,canvas.height);
this._lastTime = video.currentTime;
}
return canvas;
};
// private methods:
/**
* @method _videoReady
* @protected
**/
p._videoReady = function() {
this.readyState = 2;
};
createjs.VideoBuffer = VideoBuffer;
}());
|
CreateJS/EaselJS
|
src/easeljs/utils/VideoBuffer.js
|
JavaScript
|
mit
| 3,777
|
#!/usr/bin/env node
'use strict';
var fs = require('fs');
fs.stat('platforms/android', function (err, stat) {
if (!err && stat.isDirectory()) {
fs.stat('google-services.json', function (err, stat) {
if (!err && stat.isFile()) {
var readStream = fs.createReadStream('google-services.json');
var writeStream = fs.createWriteStream('platforms/android/google-services.json');
readStream.pipe(writeStream);
}
});
}
});
fs.stat('platforms/ios', function (err, stat) {
if (!err && stat.isDirectory()) {
fs.stat('GoogleService-Info.plist', function (err, stat) {
if (!err && stat.isFile()) {
var readStream = fs.createReadStream('GoogleService-Info.plist');
var writeStream = fs.createWriteStream('platforms/ios/GoogleService-Info.plist');
readStream.pipe(writeStream);
}
});
}
});
|
stormwin/cordova-plugin-firebase
|
scripts/after_prepare.js
|
JavaScript
|
mit
| 970
|
version https://git-lfs.github.com/spec/v1
oid sha256:acf2f65bc6418b0c117368913aa11a686121c946e728b05dd4a982931d1a2a13
size 746
|
yogeshsaroya/new-cdnjs
|
ajax/libs/highlight.js/8.3/languages/bash.min.js
|
JavaScript
|
mit
| 128
|
'use strict';
/**
* @type {F2}
* */
module.exports = require('./f2').create().
type('s', require('./types/s')).
type('d', require('./types/d')).
type('j', require('./types/j'));
|
golyshevd/f2
|
index.js
|
JavaScript
|
mit
| 193
|
/** @constructor */
ScalaJS.c.scala_runtime_AbstractFunction2$mcJJI$sp = (function() {
ScalaJS.c.scala_runtime_AbstractFunction2.call(this)
});
ScalaJS.c.scala_runtime_AbstractFunction2$mcJJI$sp.prototype = new ScalaJS.inheritable.scala_runtime_AbstractFunction2();
ScalaJS.c.scala_runtime_AbstractFunction2$mcJJI$sp.prototype.constructor = ScalaJS.c.scala_runtime_AbstractFunction2$mcJJI$sp;
ScalaJS.c.scala_runtime_AbstractFunction2$mcJJI$sp.prototype.init___ = (function() {
ScalaJS.c.scala_runtime_AbstractFunction2.prototype.init___.call(this);
ScalaJS.impls.scala_Function2$mcJJI$sp$class__$init$__Lscala_Function2$mcJJI$sp__V(this);
return this
});
ScalaJS.c.scala_runtime_AbstractFunction2$mcJJI$sp.prototype.apply__J__I__ = (function(v1, v2) {
return ScalaJS.bJ(this.apply__J__I__J(v1, v2))
});
/** @constructor */
ScalaJS.inheritable.scala_runtime_AbstractFunction2$mcJJI$sp = (function() {
/*<skip>*/
});
ScalaJS.inheritable.scala_runtime_AbstractFunction2$mcJJI$sp.prototype = ScalaJS.c.scala_runtime_AbstractFunction2$mcJJI$sp.prototype;
ScalaJS.is.scala_runtime_AbstractFunction2$mcJJI$sp = (function(obj) {
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.scala_runtime_AbstractFunction2$mcJJI$sp)))
});
ScalaJS.as.scala_runtime_AbstractFunction2$mcJJI$sp = (function(obj) {
if ((ScalaJS.is.scala_runtime_AbstractFunction2$mcJJI$sp(obj) || (obj === null))) {
return obj
} else {
ScalaJS.throwClassCastException(obj, "scala.runtime.AbstractFunction2$mcJJI$sp")
}
});
ScalaJS.isArrayOf.scala_runtime_AbstractFunction2$mcJJI$sp = (function(obj, depth) {
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.scala_runtime_AbstractFunction2$mcJJI$sp)))
});
ScalaJS.asArrayOf.scala_runtime_AbstractFunction2$mcJJI$sp = (function(obj, depth) {
if ((ScalaJS.isArrayOf.scala_runtime_AbstractFunction2$mcJJI$sp(obj, depth) || (obj === null))) {
return obj
} else {
ScalaJS.throwArrayCastException(obj, "Lscala.runtime.AbstractFunction2$mcJJI$sp;", depth)
}
});
ScalaJS.data.scala_runtime_AbstractFunction2$mcJJI$sp = new ScalaJS.ClassTypeData({
scala_runtime_AbstractFunction2$mcJJI$sp: 0
}, false, "scala.runtime.AbstractFunction2$mcJJI$sp", ScalaJS.data.scala_runtime_AbstractFunction2, {
scala_runtime_AbstractFunction2$mcJJI$sp: 1,
scala_Function2$mcJJI$sp: 1,
scala_runtime_AbstractFunction2: 1,
scala_Function2: 1,
java_lang_Object: 1
});
ScalaJS.c.scala_runtime_AbstractFunction2$mcJJI$sp.prototype.$classData = ScalaJS.data.scala_runtime_AbstractFunction2$mcJJI$sp;
//@ sourceMappingURL=AbstractFunction2$mcJJI$sp.js.map
|
ignaciocases/hermeneumatics
|
node_modules/scala-node/main/target/streams/compile/externalDependencyClasspath/$global/package-js/extracted-jars/scalajs-library_2.10-0.4.0.jar--29fb2f8b/scala/runtime/AbstractFunction2$mcJJI$sp.js
|
JavaScript
|
mit
| 2,669
|
/**
* Return the checksum of a value and label
*/
var checksum = function (label, value) {
var data = ('' + label + value);
var sum = 32;
for (var i=0,l=data.length; i<l; i++) {
sum += data.charCodeAt(i);
}
return String.fromCharCode((sum & 63) + 32);
}
var integerKeys = [
'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM',
'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR',
'PEJP', 'IINST', 'IINST1', 'IINST2', 'IINST3', 'ADPS', 'IMAX',
'IMAX1', 'IMAX2', 'IMAX3', 'PAPP', 'ADIR1', 'ADIR2', 'ADIR3' ];
/**
* Read and verify Teleinfo datagram and return it as an object
*/
var parse = function (message) {
var line;
var data = {};
var lines = message.toString().replace(/^[\r\n\x03\x02]+|[\r\n\x03\x02]+$/g, '').split("\r\n");
for(var i=0,l=lines.length; i<l; i++) {
line = lines[i].split(' ', 3);
if(line.length !== 3) continue;
if(checksum(line[0], line[1]) == (line[2]||' ')) {
data[line[0]] = integerKeys.indexOf(line[0]) >= 0 ? parseInt(line[1]) : line[1];
}
}
return data;
}
module.exports.parse = parse;
|
pyrou/node-teleinfo-server
|
lib/teleinfo-parser.js
|
JavaScript
|
mit
| 1,065
|
import { Text, View, Platform, Image, ScrollView } from 'react-native';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import I18n from 'react-native-i18n';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
import NavigationBar from 'react-native-navbar';
import { setHomeTab } from '@actions/globals';
import { openDrawer } from '@actions/drawer';
import { replaceRoute, pushNewRoute } from '@actions/route';
import Constants from '@src/constants';
import { Metrics, Styles, Colors, Fonts, Icon } from '@theme/';
import styles from './styles';
import CommonWidgets from '@components/CommonWidgets';
import DashboardItem from '@components/DashboardItem';
class Home extends Component {
render() {
return (
<View style={{ flex: 1, backgroundColor: 'white' }}>
{CommonWidgets.renderStatusBar(Colors.brandPrimary) }
<NavigationBar
style={Styles.navBarStyle}
title={CommonWidgets.renderNavBarHeader(I18n.t('CAMPID_DASHBOARD'))}
tintColor={Colors.brandSecondary}
leftButton={CommonWidgets.renderNavBarLeftButton(() => this.props.openDrawer(), 'menu')}
rightButton={CommonWidgets.renderNavBarLeftButton(() => this.props.pushNewRoute('searchView'), 'search')} />
<ScrollView>
{CommonWidgets.renderListHeader('Camp Spotlight', Colors.brandSecondary, Colors.textPrimary)}
<ScrollView horizontal >
<DashboardItem txtSchool="" txtPrice="" />
<DashboardItem txtSchool="" txtPrice="" />
</ScrollView>
{CommonWidgets.renderListHeader('Camps For You', Colors.brandPrimary, Colors.brandSecondary)}
<DashboardItem />
<DashboardItem />
</ScrollView>
</View>
);
}
}
Home.propTypes = {
dispatch: React.PropTypes.func.isRequired,
setHomeTab: React.PropTypes.func.isRequired,
replaceRoute: React.PropTypes.func.isRequired,
pushNewRoute: React.PropTypes.func.isRequired,
openDrawer: React.PropTypes.func.isRequired,
};
function mapDispatchToProps(dispatch) {
return {
dispatch,
setHomeTab: homeTab => dispatch(setHomeTab(homeTab)),
openDrawer: () => dispatch(openDrawer()),
replaceRoute: route => dispatch(replaceRoute(route)),
pushNewRoute: route => dispatch(pushNewRoute(route)),
};
}
function mapStateToProps(state) {
const globals = state.get('globals');
return { globals };
}
export default connect(mapStateToProps, mapDispatchToProps)(Home);
|
JamesJin038801/CampID
|
src/containers/Home/Home.js
|
JavaScript
|
mit
| 2,527
|
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
/**
* Creates and initializes a Firebase app.
*/
const app = firebase.initializeApp({
apiKey: process.env.FIREBASE_API_KEY,
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
databaseURL: process.env.FIREBASE_DATABASE_URL
});
export default app;
|
esausilva/profile-updater
|
client/src/firebase.js
|
JavaScript
|
mit
| 340
|
/**
*
* Open new window in browser. This command is the equivalent function to `window.open()`. This command does not
* work in mobile environments.
*
* __Note:__ When calling this command you automatically switch to the new window.
*
* <example>
:newWindowSync.js
it('should open a new tab', () => {
browser.url('http://google.com')
console.log(browser.getTitle()) // outputs: "Google"
browser.newWindow('https://webdriver.io', 'WebdriverIO window', 'width=420,height=230,resizable,scrollbars=yes,status=1')
console.log(browser.getTitle()) // outputs: "WebdriverIO · Next-gen WebDriver test framework for Node.js"
browser.closeWindow()
console.log(browser.getTitle()) // outputs: "Google"
});
* </example>
*
* @param {String} url website URL to open
* @param {String=} windowName name of the new window
* @param {String=} windowFeatures features of opened window (e.g. size, position, scrollbars, etc.)
* @return {String} id of window handle of new tab
*
* @uses browser/execute, protocol/getWindowHandles, protocol/switchToWindow
* @alias browser.newWindow
* @type window
*/
import newWindowHelper from '../../scripts/newWindow'
export default async function newWindow (url, windowName = 'New Window', windowFeatures = '') {
/*!
* parameter check
*/
if (typeof url !== 'string') {
throw new Error('number or type of arguments don\'t agree with newWindow command')
}
/*!
* mobile check
*/
if (this.isMobile) {
throw new Error('newWindow command is not supported on mobile platforms')
}
await this.execute(newWindowHelper, url, windowName, windowFeatures)
const tabs = await this.getWindowHandles()
const newTab = tabs.pop()
await this.switchToWindow(newTab)
return newTab
}
|
klamping/webdriverio
|
packages/webdriverio/src/commands/browser/newWindow.js
|
JavaScript
|
mit
| 1,873
|
/**
* @author fengqiu.wu
*/
import angular from 'angular';
import injector from 'angular-es-utils/injector';
export default function tabContentTranscludeLink(scope, element, attrs, tabset) {
const $compile = injector.get('$compile');
scope.active = 0;
// 点击tab 设置相关内容
scope.$watch('$parent.$tabset.active', () => {
scope.active = tabset.active;
tabset.tabs.forEach(tab => {
if (Number(tab.index) === tabset.active) {
if (!tab.pane) {
let contentWrap = angular.element('<div></div>');
tab.pane = contentWrap;
contentWrap.append(tab.tab.contents);
element.append(contentWrap);
$compile(contentWrap)(angular.extend(scope, {index: tab.index}));
} else {
tab.pane.removeClass('ng-hide');
}
} else if (tab.pane) {
tab.pane.addClass('ng-hide');
}
});
});
}
|
ShuyunFF2E/ccms-components
|
src/components/tabset/tabContentTranscludeLink.js
|
JavaScript
|
mit
| 842
|
import Ember from 'ember';
var get = Ember.get;
/**
WARNING: This interface is likely to change in order to accomodate https://github.com/emberjs/rfcs/pull/4
## Using BuildURLMixin
To use url building, include the mixin when extending an adapter, and call `buildURL` where needed.
The default behaviour is designed for RESTAdapter.
### Example
```javascript
export default DS.Adapter.extend(BuildURLMixin, {
findRecord: function(store, type, id, snapshot) {
var url = this.buildURL(type.modelName, id, snapshot, 'findRecord');
return this.ajax(url, 'GET');
}
});
```
### Attributes
The `host` and `namespace` attributes will be used if defined, and are optional.
@class BuildURLMixin
@namespace DS
*/
export default Ember.Mixin.create({
/**
Builds a URL for a given type and optional ID.
By default, it pluralizes the type's name (for example, 'post'
becomes 'posts' and 'person' becomes 'people'). To override the
pluralization see [pathForType](#method_pathForType).
If an ID is specified, it adds the ID to the path generated
for the type, separated by a `/`.
When called by RESTAdapter.findMany() the `id` and `snapshot` parameters
will be arrays of ids and snapshots.
@method buildURL
@param {String} modelName
@param {(String|Array|Object)} id single id or array of ids or query
@param {(DS.Snapshot|Array)} snapshot single snapshot or array of snapshots
@param {String} requestType
@param {Object} query object of query parameters to send for query requests.
@return {String} url
*/
buildURL(modelName, id, snapshot, requestType, query) {
switch (requestType) {
case 'findRecord':
return this.urlForFindRecord(id, modelName, snapshot);
case 'findAll':
return this.urlForFindAll(modelName, snapshot);
case 'query':
return this.urlForQuery(query, modelName);
case 'queryRecord':
return this.urlForQueryRecord(query, modelName);
case 'findMany':
return this.urlForFindMany(id, modelName, snapshot);
case 'findHasMany':
return this.urlForFindHasMany(id, modelName, snapshot);
case 'findBelongsTo':
return this.urlForFindBelongsTo(id, modelName, snapshot);
case 'createRecord':
return this.urlForCreateRecord(modelName, snapshot);
case 'updateRecord':
return this.urlForUpdateRecord(id, modelName, snapshot);
case 'deleteRecord':
return this.urlForDeleteRecord(id, modelName, snapshot);
default:
return this._buildURL(modelName, id);
}
},
/**
@method _buildURL
@private
@param {String} modelName
@param {String} id
@return {String} url
*/
_buildURL(modelName, id) {
var url = [];
var host = get(this, 'host');
var prefix = this.urlPrefix();
var path;
if (modelName) {
path = this.pathForType(modelName);
if (path) { url.push(path); }
}
if (id) { url.push(encodeURIComponent(id)); }
if (prefix) { url.unshift(prefix); }
url = url.join('/');
if (!host && url && url.charAt(0) !== '/') {
url = '/' + url;
}
return url;
},
/**
* @method urlForFindRecord
* @param {String} id
* @param {String} modelName
* @param {DS.Snapshot} snapshot
* @return {String} url
*/
urlForFindRecord(id, modelName, snapshot) {
return this._buildURL(modelName, id);
},
/**
* @method urlForFindAll
* @param {String} modelName
* @param {DS.SnapshotRecordArray} snapshot
* @return {String} url
*/
urlForFindAll(modelName, snapshot) {
return this._buildURL(modelName);
},
/**
* @method urlForQuery
* @param {Object} query
* @param {String} modelName
* @return {String} url
*/
urlForQuery(query, modelName) {
return this._buildURL(modelName);
},
/**
* @method urlForQueryRecord
* @param {Object} query
* @param {String} modelName
* @return {String} url
*/
urlForQueryRecord(query, modelName) {
return this._buildURL(modelName);
},
/**
* @method urlForFindMany
* @param {Array} ids
* @param {String} modelName
* @param {Array} snapshots
* @return {String} url
*/
urlForFindMany(ids, modelName, snapshots) {
return this._buildURL(modelName);
},
/**
* @method urlForFindHasMany
* @param {String} id
* @param {String} modelName
* @param {DS.Snapshot} snapshot
* @return {String} url
*/
urlForFindHasMany(id, modelName, snapshot) {
return this._buildURL(modelName, id);
},
/**
* @method urlForFindBelongsTo
* @param {String} id
* @param {String} modelName
* @param {DS.Snapshot} snapshot
* @return {String} url
*/
urlForFindBelongsTo(id, modelName, snapshot) {
return this._buildURL(modelName, id);
},
/**
* @method urlForCreateRecord
* @param {String} modelName
* @param {DS.Snapshot} snapshot
* @return {String} url
*/
urlForCreateRecord(modelName, snapshot) {
return this._buildURL(modelName);
},
/**
* @method urlForUpdateRecord
* @param {String} id
* @param {String} modelName
* @param {DS.Snapshot} snapshot
* @return {String} url
*/
urlForUpdateRecord(id, modelName, snapshot) {
return this._buildURL(modelName, id);
},
/**
* @method urlForDeleteRecord
* @param {String} id
* @param {String} modelName
* @param {DS.Snapshot} snapshot
* @return {String} url
*/
urlForDeleteRecord(id, modelName, snapshot) {
return this._buildURL(modelName, id);
},
/**
@method urlPrefix
@private
@param {String} path
@param {String} parentURL
@return {String} urlPrefix
*/
urlPrefix(path, parentURL) {
var host = get(this, 'host');
var namespace = get(this, 'namespace');
if (!host || host === '/') {
host = '';
}
if (path) {
// Protocol relative url
if (/^\/\//.test(path) || /http(s)?:\/\//.test(path)) {
// Do nothing, the full host is already included.
return path;
// Absolute path
} else if (path.charAt(0) === '/') {
return `${host}${path}`;
// Relative path
} else {
return `${parentURL}/${path}`;
}
}
// No path provided
var url = [];
if (host) { url.push(host); }
if (namespace) { url.push(namespace); }
return url.join('/');
},
/**
Determines the pathname for a given type.
By default, it pluralizes the type's name (for example,
'post' becomes 'posts' and 'person' becomes 'people').
### Pathname customization
For example if you have an object LineItem with an
endpoint of "/line_items/".
```app/adapters/application.js
import DS from 'ember-data';
export default DS.RESTAdapter.extend({
pathForType: function(modelName) {
var decamelized = Ember.String.decamelize(modelName);
return Ember.String.pluralize(decamelized);
}
});
```
@method pathForType
@param {String} modelName
@return {String} path
**/
pathForType(modelName) {
var camelized = Ember.String.camelize(modelName);
return Ember.String.pluralize(camelized);
}
});
|
nickiaconis/data
|
addon/-private/adapters/build-url-mixin.js
|
JavaScript
|
mit
| 7,224
|
// Generated by CoffeeScript 1.7.1
var Logentries, logentries, winston,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
winston = require('winston');
logentries = require('logentries');
Logentries = (function(_super) {
__extends(Logentries, _super);
function Logentries(_arg) {
var level, token;
token = _arg.token, level = _arg.level;
Logentries.__super__.constructor.apply(this, arguments);
this.name = 'logentries';
this.level = level || 'info';
this.logentries = new logentries.logger({
token: token
});
this.logentries.level(this.level);
}
Logentries.prototype.log = function(level, msg, meta, callback) {
var data;
if (meta != null) {
meta = JSON.stringify(meta);
meta = meta === '{}' ? '' : " " + meta;
}
data = msg + meta;
this.logentries.log(level, data);
return callback(null, true);
};
return Logentries;
})(winston.Transport);
winston.transports.Logentries = Logentries;
module.exports = {
Logentries: Logentries
};
|
ingshtrom/easy-jenkins-jobs
|
node_modules/winston-logentries/lib/winston-logentries.js
|
JavaScript
|
mit
| 1,301
|
/* browserify task
---------------
Bundle javascripty things with browserify!
This task is set up to generate multiple separate bundles, from
different sources, and to use Watchify when run from the default task.
See browserify.bundleConfigs in gulp/config.js
*/
var browserify = require('browserify');
var watchify = require('watchify');
var bundleLogger = require('../util/bundleLogger');
var gulp = require('gulp');
var handleErrors = require('../util/handleErrors');
var source = require('vinyl-source-stream');
var config = require('../config').browserify;
var babelify = require('babelify');
gulp.task('browserify', function(callback) {
var bundleQueue = config.bundleConfigs.length;
var browserifyThis = function(bundleConfig) {
var bundler = browserify({
// Required watchify args
cache: {}, packageCache: {}, fullPaths: false,
// Specify the entry point of your app
entries: bundleConfig.entries,
// Add file extentions to make optional in your requires
extensions: config.extensions,
// Enable source maps!
debug: config.debug
});
var bundle = function() {
// Log when bundling starts
bundleLogger.start(bundleConfig.outputName);
return bundler
.bundle()
// Report compile errors
.on('error', handleErrors)
// Use vinyl-source-stream to make the
// stream gulp compatible. Specifiy the
// desired output filename here.
.pipe(source(bundleConfig.outputName))
// Specify the output destination
.pipe(gulp.dest(bundleConfig.dest))
.on('end', reportFinished);
};
bundler.transform(babelify.configure({stage: 1, optional: ["runtime"]}));
if (global.isWatching) {
// Wrap with watchify and rebundle on changes
bundler = watchify(bundler);
// Rebundle on update
bundler.on('update', bundle);
}
var reportFinished = function() {
// Log when bundling completes
bundleLogger.end(bundleConfig.outputName);
if (bundleQueue) {
bundleQueue--;
if (bundleQueue === 0) {
// If queue is empty, tell gulp the task is complete.
// https://github.com/gulpjs/gulp/blob/master/docs/API.md#accept-a-callback
callback();
}
}
};
return bundle();
};
// Start bundling with Browserify for each bundleConfig specified
config.bundleConfigs.forEach(browserifyThis);
});
|
lubosz/tetris.js
|
gulp/tasks/browserify.js
|
JavaScript
|
mit
| 2,507
|
import { Slim } from '../src/index.js';
// import '../src/directives/repeat.directive.js';
import '../src/directives/foreach.directive.js';
import '../src/directives/attribute.directive.js';
import '../src/directives/event.directive.js';
function _random(max) {
return Math.round(Math.random() * 1000) % max;
}
const store = {
data: [],
backup: null,
selected: null,
id: 1,
buildData(count = 1000) {
var adjectives = [
'pretty',
'large',
'big',
'small',
'tall',
'short',
'long',
'handsome',
'plain',
'quaint',
'clean',
'elegant',
'easy',
'angry',
'crazy',
'helpful',
'mushy',
'odd',
'unsightly',
'adorable',
'important',
'inexpensive',
'cheap',
'expensive',
'fancy',
];
var colours = [
'red',
'yellow',
'blue',
'green',
'pink',
'brown',
'purple',
'brown',
'white',
'black',
'orange',
];
var nouns = [
'table',
'chair',
'house',
'bbq',
'desk',
'car',
'pony',
'cookie',
'sandwich',
'burger',
'pizza',
'mouse',
'keyboard',
];
var data = [];
for (var i = 0; i < count; i++)
data.push({
id: this.id++,
label:
adjectives[_random(adjectives.length)] +
' ' +
colours[_random(colours.length)] +
' ' +
nouns[_random(nouns.length)],
});
return data;
},
updateData(mod = 10) {
for (let i = 0; i < this.data.length; i += 10) {
// this.data[i].label += ' !!!';
this.data[i] = Object.assign({}, this.data[i], {
label: this.data[i].label + ' !!!',
});
}
},
delete(id) {
id = parseInt(id);
const idx = this.data.findIndex((d) => d.id == id);
this.data = this.data.filter((e, i) => i != idx);
return this;
},
run(amount) {
this.data = this.buildData(amount);
this.selected = null;
},
add(amount) {
this.data = this.data.concat(this.buildData(amount));
this.selected = null;
},
update() {
this.updateData();
this.selected = null;
},
select(id) {
this.selected = parseInt(id);
},
hideAll() {
this.backup = this.data;
this.data = [];
this.selected = null;
},
showAll() {
this.data = this.backup;
this.backup = null;
this.selected = null;
},
runLots() {
this.data = this.buildData(10000);
this.selected = null;
},
clear() {
this.data = [];
this.selected = null;
},
swapRows() {
if (this.data.length > 998) {
var a = this.data[1];
this.data[1] = this.data[998];
this.data[998] = a;
}
},
};
class MainApp extends Slim {
items = [];
selected = null;
test = [1, 2, 3, 4, 5];
getClass(item) {
return item === this.selected ? 'danger' : '';
}
deleteOne(item) {
console.time('delete1');
store.delete(item.id);
this.items = store.data;
console.timeEnd('delete1');
}
selectOne(item) {
console.time('select1');
this.selected = item;
console.timeEnd('select1');
}
create1k() {
console.time('create1k');
store.clear();
store.run(1000);
this.items = [...store.data];
console.timeEnd('create1k');
}
append1k() {
console.time('append1k');
store.add(1000);
this.items = [...store.data];
console.timeEnd('append1k');
}
update10() {
console.time('update10');
store.update();
this.items = [...store.data];
console.timeEnd('update10');
}
testClear() {
console.time('clear');
store.clear();
this.items = [...store.data];
console.timeEnd('clear');
}
create10k() {
performance.mark('create10kstart');
store.runLots();
this.items = [...store.data];
performance.mark('create10kend');
console.log(
performance.measure('create10k', 'create10kstart', 'create10kend')
);
}
swap() {
console.time('swap');
store.swapRows();
this.items = [...store.data];
console.timeEnd('swap');
}
}
MainApp.useShadow = false;
Slim.element(
'main-app',
/*html*/ `
<div id='main'>
<div class="container">
<div class="jumbotron">
<div class="row">
<div class="col-md-6">
<h1>Slim.js</h1>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-sm-6 smallpad">
<button @click="this.create1k()" type='button' class='btn btn-primary btn-block' id='run'>Create 1,000 rows</button>
</div>
<div class="col-sm-6 smallpad">
<button @click="this.create10k()" type='button' class='btn btn-primary btn-block' id='runlots'>Create 10,000 rows</button>
</div>
<div class="col-sm-6 smallpad">
<button @click="this.append1k()" type='button' class='btn btn-primary btn-block' id='add'>Append 1,000 rows</button>
</div>
<div class="col-sm-6 smallpad">
<button @click="this.update10()" type='button' class='btn btn-primary btn-block' id='update'>Update every 10th row</button>
</div>
<div class="col-sm-6 smallpad">
<button @click="this.testClear()" type='button' class='btn btn-primary btn-block' id='clear'>Clear</button>
</div>
<div class="col-sm-6 smallpad">
<button @click="this.swap()" type='button' class='btn btn-primary btn-block' id='swaprows'>Swap Rows</button>
</div>
</div>
</div>
</div>
</div>
<table class="table table-hover table-striped test-data">
<tbody id="tbody">
<tr *foreach="{{this.items}}" *repeat-cleanup="500" class="{{item === this.selected ? 'danger' : ''}}">
<td class="col-md-1">{{item.id}}</td>
<td class="col-md-4">
<a role="select" @click="this.selectOne(item)">{{item.label}}</a>
</td>
<td class="col-md-1">
<a>
<span role="delete" @click="this.deleteOne(item)"class="glyphicon glyphicon-remove" aria-hidden="true"></span>
</a>
</td>
<td class="col-md-6">
</td>
</tr>
</tbody>
</div>
<span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true"></span>
</div>
</div>`,
MainApp
);
|
eavichay/slim-web-components
|
benchmarks/benchmark-foreach.js
|
JavaScript
|
mit
| 6,337
|
import getOptionsURL from 'misc/getOptionsURL';
import Buffer from 'render/Buffer';
import ShaderMatcap from 'render/shaders/ShaderMatcap';
var RenderData = function (gl) {
var opts = getOptionsURL();
return {
_gl: gl,
_shaderType: opts.shader,
_flatShading: opts.flatshading,
_showWireframe: opts.wireframe,
_matcap: Math.min(opts.matcap, ShaderMatcap.matcaps.length - 1), // matcap id
_curvature: Math.min(opts.curvature, 5.0),
_texture0: null,
_useDrawArrays: false,
_vertexBuffer: new Buffer(gl, gl.ARRAY_BUFFER, gl.DYNAMIC_DRAW),
_normalBuffer: new Buffer(gl, gl.ARRAY_BUFFER, gl.DYNAMIC_DRAW),
_colorBuffer: new Buffer(gl, gl.ARRAY_BUFFER, gl.DYNAMIC_DRAW),
_materialBuffer: new Buffer(gl, gl.ARRAY_BUFFER, gl.DYNAMIC_DRAW),
_texCoordBuffer: new Buffer(gl, gl.ARRAY_BUFFER, gl.STATIC_DRAW),
_indexBuffer: new Buffer(gl, gl.ELEMENT_ARRAY_BUFFER, gl.STATIC_DRAW),
_wireframeBuffer: new Buffer(gl, gl.ELEMENT_ARRAY_BUFFER, gl.STATIC_DRAW),
// these material values overrides the vertex attributes
// it's here for debug or preview
_albedo: new Float32Array([-1.0, -1.0, -1.0]),
_roughness: -0.18,
_metallic: -0.78,
_alpha: 1.0,
_flatColor: new Float32Array([1.0, 0.0, 0.0]),
_mode: gl.TRIANGLES
};
};
RenderData.ONLY_DRAW_ARRAYS = false;
export default RenderData;
|
stephomi/sculptgl
|
src/mesh/RenderData.js
|
JavaScript
|
mit
| 1,374
|
'use strict';
var babel = require('gulp-babel');
var config = require('../config');
var eslint = require('gulp-eslint');
var gulp = require('gulp');
var react = require('gulp-react');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
module.exports = gulp.task('scripts-build', function () {
var src = config.plugins.concat(config.src);
return gulp.src(src)
.pipe(eslint({ useEslintrc: true }))
.pipe(eslint.format())
.pipe(eslint.failAfterError())
.pipe(babel({ modules: 'amd', blacklist: ['strict']}))
.pipe(react())
.pipe(uglify())
.pipe(rename(config.build.app))
.pipe(gulp.dest(config.dist));
});
|
quidmonkey/elisse
|
gulp/tasks/scripts-build.js
|
JavaScript
|
mit
| 701
|
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'ozymandias',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
}
};
if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_VIEW_LOOKUPS = true;
}
if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';
// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.rootElement = '#ember-testing';
}
if (environment === 'production') {
}
return ENV;
};
|
frxnz/ozymandias-server
|
config/environment.js
|
JavaScript
|
mit
| 1,076
|
angular.module('plantApp').directive('keyEvents', [
'$document',
'$rootScope',
function($document, $rootScope) {
return {
restrict: 'A',
link: function() {
$document.bind('keydown', function(e) {
$rootScope.$broadcast('keypress', e.which);
});
}
};
}
]);
|
BonesAndTeeth/EPlant
|
public/js/directives/keyboard.js
|
JavaScript
|
mit
| 314
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var facebookOfficial = exports.facebookOfficial = { "viewBox": "0 0 1536 1792", "children": [{ "name": "path", "attribs": { "d": "M1451 128q35 0 60 25t25 60v1366q0 35-25 60t-60 25h-391v-595h199l30-232h-229v-148q0-56 23.5-84t91.5-28l122-1v-207q-63-9-178-9-136 0-217.5 80t-81.5 226v171h-200v232h200v595h-735q-35 0-60-25t-25-60v-1366q0-35 25-60t60-25h1366z" } }] };
|
xuan6/admin_dashboard_local_dev
|
node_modules/react-icons-kit/fa/facebookOfficial.js
|
JavaScript
|
mit
| 442
|
'use strict';
define(
[
'flight/lib/component',
'mixin/ComponentBasic',
],
function(defineComponent, ComponentBasic) {
return defineComponent(Component, ComponentBasic);
function Component() {
this.defaultAttrs({
});
this.applicationInfo = function () {
var data = {
projectName: 'example.com',
};
//console.log('data:applicationInfo', data);
this.trigger('data:applicationInfo', data);
};
this.after('initialize', function() {
this.setup();
this.on('ui:need:applicationInfo', this.applicationInfo);
this.announceRunning();
});
}
}
);
|
alexandervpetrov/cms-ui
|
app/scripts/service/ApplicationProfile.js
|
JavaScript
|
mit
| 681
|
angular.module("WalrusPunch").service("dataSourceService", [
"$rootScope",
"DATASOURCE_EVENTS",
function ($rootScope, DATASOURCE_EVENTS) {
var currentDataSourceId = "openDota";
var dataSources = [
// {
// name: "Combined",
// id: "combined",
// advantageFunction: function(hero){
// return hero.advantages.combined;
// }
// },
// {
// name: "DotaBuff",
// id: "dotabuff",
// advantageFunction: function(hero){
// return hero.advantages.dotabuff;
// }
// },
// {
// name: "DotaMax",
// id: "dotaMax",
// advantageFunction: function(hero){
// return hero.advantages.dotamax;
// }
// },
{
name: "OpenDota",
id: "openDota",
advantageFunction: function(hero){
return hero.advantages.opendota;
}
},
];
var currentDataSource = dataSources[0];
function DataSourceService() {
var previousDataSource = getDataSourceFromLocalStorage();
currentDataSourceId = previousDataSource;
}
DataSourceService.prototype.getDataSources = function(){
return dataSources;
};
DataSourceService.prototype.getCurrentDataSourceId = function(){
return currentDataSourceId;
};
DataSourceService.prototype.changeDataSource = function (dataSourceId) {
saveDataSourceToLocalStorage(dataSourceId);
currentDataSourceId = dataSourceId;
currentDataSource = dataSources.filter(function(dataSource){
return dataSource.id === dataSourceId;
})[0];
$rootScope.$broadcast(DATASOURCE_EVENTS.dataSourceChanged);
};
DataSourceService.prototype.getAdvantages = function(hero){
return currentDataSource.advantageFunction(hero);
};
function getDataSourceFromLocalStorage(){
return localStorage.getItem("walrusPunchDataSource") === undefined ? "english" : localStorage.getItem("walrusPunchDataSource");
}
function saveDataSourceToLocalStorage(dataSource){
localStorage.setItem("walrusPunchDataSource", dataSource);
}
return new DataSourceService();
}]);
|
bxyoung89/dota2picker
|
public/app/services/dataSourceService.js
|
JavaScript
|
mit
| 2,079
|
import 'babel-polyfill'
import express from 'express'
import extend from 'extend'
import registerAuthMiddleware from './registerAuthMiddleware'
import registerGraphApiMiddleware from './registerGraphApiMiddleware'
import registerStaticMiddleware from './registerStaticMiddleware'
import registerRenderingMiddleware from './registerRenderingMiddleware'
import registerErrorHandler from './registerErrorHandler'
import startListening from './startListening'
type FactoryType = () => object
const serverFactory: FactoryType = () => express()
export default class ExpressBasedServer {
server: object
configured: boolean
constructor(factory: FactoryType = serverFactory) {
this.configured = false
this.guaranteeFreshServer(factory)
}
guaranteeFreshServer (factory: FactoryType = serverFactory) {
this.server = global.server = factory()
}
configure () {
if (!this.configured) {
try {
const s = this.server
registerStaticMiddleware(s)
registerAuthMiddleware(s)
registerGraphApiMiddleware(s)
registerRenderingMiddleware(s)
registerErrorHandler(s)
this.configured = true
} catch (e) {
this.configured = false
this.guaranteeFreshServer()
}
}
}
run (failIfNotConfigured: boolean = false) {
if (!this.configured) {
if (failIfNotConfigured)
throw new EventException('noipe')
else {
this.configure()
this.run(true)
}
} else {
startListening(server, 3000)
}
}
}
|
jshin47/ireactforyou
|
src/server/ExpressBasedServer.js
|
JavaScript
|
mit
| 1,558
|
export function setDrawer({ open }) {
return {
type: "SET__DRAWER", payload: { open }
}
}
|
nfour/js-structures
|
layouts/react-redux/client/actions/header.js
|
JavaScript
|
mit
| 106
|
import React from 'react'
import map from 'lodash/map'
import isEmpty from 'lodash/isEmpty'
import Category from 'components/HomePage/Category'
import AddCategoryButton from 'components/HomePage/AddCategoryButton'
import './HomePage.scss'
import { DragDropContext } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
import * as DataService from 'services/data'
import * as CategoryUtils from 'utils/category'
import * as ItemUtils from 'utils/item'
import Tabs from 'antd/lib/Tabs'
import 'antd/dist/antd.css'
@DragDropContext(HTML5Backend)
export default class HomePage extends React.Component {
constructor() {
super()
this.state = {
jsonData: [],
isEdit: false,
searchWord: '',
savePending: false,
searchTimeOut: undefined,
activeTagId: ''
}
this.handleClickSave = this.handleClickSave.bind(this)
this.handleIsEdit = this.handleIsEdit.bind(this)
this.handleChangeSearchWord = this.handleChangeSearchWord.bind(this)
this.handleMoveCategory = this.handleMoveCategory.bind(this)
this.handleAddCategory = this.handleAddCategory.bind(this)
this.handleEditCategory = this.handleEditCategory.bind(this)
this.handleDeleteCategory = this.handleDeleteCategory.bind(this)
this.handleMoveItem = this.handleMoveItem.bind(this)
this.handleMoveItemToEmptyCategory = this.handleMoveItemToEmptyCategory.bind(this)
this.handleAddItem = this.handleAddItem.bind(this)
this.handleEditItem = this.handleEditItem.bind(this)
this.handleDeleteItem = this.handleDeleteItem.bind(this)
this.handleChangeTags = this.handleChangeTags.bind(this)
}
componentWillMount() {
DataService.loadData().then((jsonData) => {
this.setState({jsonData, activeTagId: jsonData[0].id})
})
}
componentWillUpdate (nextProps, nextState) {
if (nextState.isEdit) {
window.onbeforeunload = () => {return 'leave without save?'}
} else {
window.onbeforeunload = null
}
}
handleClickSave() {
if (!this.state.savePending) {
this.setState({savePending: true})
DataService.saveData(this.state.jsonData).then(
() => {this.setState({
isEdit: false,
savePending: false
})
},
() => {alert('save fail!')}
)
}
}
handleIsEdit() {
if (this.state.isEdit) {
this.setState({isEdit: false})
} else {
this.setState({isEdit: true})
}
}
handleMoveCategory(dragId, hoverId) {
const jsonData = CategoryUtils.moveCategory(this.state.jsonData, dragId, hoverId)
this.setState({
jsonData
})
}
handleAddCategory(newCategory) {
const jsonData = CategoryUtils.addCategory(this.state.jsonData, newCategory)
this.setState({
jsonData
})
}
handleEditCategory(newCategory) {
const jsonData = CategoryUtils.editCategory(this.state.jsonData, newCategory)
this.setState({
jsonData
})
}
handleDeleteCategory(categoryId) {
const jsonData = CategoryUtils.deleteCategory(this.state.jsonData, categoryId)
this.setState({
jsonData
})
}
handleMoveItem(dragId, hoverId) {
const jsonData = ItemUtils.moveItem(this.state.jsonData, dragId, hoverId)
this.setState({
jsonData
})
}
handleMoveItemToEmptyCategory(dragId, hoverCategoryId) {
const jsonData = ItemUtils.moveItemToEmptyCategory(this.state.jsonData, dragId, hoverCategoryId)
this.setState({
jsonData
})
}
handleAddItem(categoryId, newItem) {
const jsonData = ItemUtils.addItem(this.state.jsonData, categoryId, newItem)
this.setState({
jsonData
})
}
handleEditItem(categoryId, newItem) {
const jsonData = ItemUtils.editItem(this.state.jsonData, categoryId, newItem)
this.setState({
jsonData
})
}
handleDeleteItem(ItemId) {
const jsonData = ItemUtils.deleteItem(this.state.jsonData, ItemId)
this.setState({
jsonData
})
}
handleChangeSearchWord() {
if (!isEmpty(this.state.searchTimeOut)) {
clearTimeout(this.state.searchTimeOut)
}
this.setState({
searchTimeOut: setTimeout(() => {
this.setState({
searchWord: this.refs.searchWord.value
})
}, 300)
})
}
handleChangeTags(id) {
console.log(id);
this.setState({
activeTagId: id
})
}
render() {
const {jsonData} = this.state
return (
<div className='homePage'>
<div className='Menu'>
{this.renderMenu()}
<input type='text' placeholder='defaultValue is sesword' onChange={this.handleChangeSearchWord} ref='searchWord'></input>
</div>
{this.renderTabs(jsonData)}
{this.renderAddButton()}
</div>
)
}
renderTabs(jsonData) {
const TabPane = Tabs.TabPane
const panes = map(jsonData, tab =>
<TabPane tab={tab.name} key={tab.id}>{this.renderCategories(tab.categories)}</TabPane>
)
//console.log(panes);
return (
<Tabs
onChange={this.handleChangeTags}
activeKey={this.state.activeTagId}
type='editable-card'
//onEdit={this.onEdit}
>
{panes}
</Tabs>
)
}
renderCategories(categories) {
return (
<div className='categories'>
{map(categories, (category) => {
return (<Category
onMoveItem={this.handleMoveItem}
onMoveItemToEmptyCategory={this.handleMoveItemToEmptyCategory}
onAddItem={this.handleAddItem}
onEditItem={this.handleEditItem}
onDeleteItem={this.handleDeleteItem}
category={category}
isEdit={this.state.isEdit}
key={category.id}
searchWord={this.state.searchWord}
onMoveCategory={this.handleMoveCategory}
onEditCategory={this.handleEditCategory}
onDeleteCategory={this.handleDeleteCategory}
/>)
}
)}
</div>
)
}
renderMenu() {
if (this.state.isEdit) {
return (
<div>
<span onClick={this.handleIsEdit}>取消</span>
<span onClick={this.handleClickSave}>保存</span>
</div>
)
}
return (
<div>
<span onClick={this.handleIsEdit}>编辑</span>
</div>
)
}
renderAddButton() {
if (!this.state.isEdit) {
return null
}
return (
<AddCategoryButton onAddCategory={this.handleAddCategory}/>
)
}
}
|
mnm1001/draggable-homepage
|
src/js/components/HomePage/HomePage.js
|
JavaScript
|
mit
| 6,501
|
"use strict"; // run code in ES5 strict mode
var Class = require("../../lib/index.js").Class;
var NonPrimitivePresets = new Class("NonPrimitivePresets", {
arrProp: [],
objProp: {}
});
module.exports = NonPrimitivePresets;
|
peerigon/nodeclass
|
test/Class/NonPrimitivePresets.class.js
|
JavaScript
|
mit
| 232
|
describe('Instrumentor suite', function() {
beforeEach(function(){
var blockThread = function (waitInMillis) {
var start = Date.now() - 0;
var stop = start + waitInMillis;
while ((Date.now() - 0) < stop) {
}
};
window.FakeProject = {
pakage1: {
ClassA: function(){},
ClassB: function(){},
funcC: function(){}
},
pakage2: {
pakage3 : {
ClassC: function(){},
funcD: function(){}
}
},
pakage4: {
ClassD: function(){}
}
};
FakeProject.pakage1.ClassA.staticFuncA = function(){
blockThread(10);
(new FakeProject.pakage1.ClassA()).memberFuncA();
};
FakeProject.pakage1.ClassA.prototype.memberFuncA = function(){
blockThread(10);
(new FakeProject.pakage1.ClassB()).memberFuncB();
};
// Simple inheritance
FakeProject.pakage1.ClassB.prototype = new FakeProject.pakage1.ClassA();
FakeProject.pakage1.ClassB.prototype.memberFuncB = function(){
blockThread(10);
};
// Treat a Clazz as a Pakage
FakeProject.pakage1.ClassB.NestedClass = function(){};
FakeProject.pakage1.ClassB.NestedClass.prototype.nestedFunc = function(){};
// Duplicate pakage reference - Kojak should be able to handle this and not die
FakeProject.dupPakageRefA = {};
FakeProject.dupPakageRefB = FakeProject.dupPakageRefB;
window.FakeProject.pakage4.ClassD.prototype.classDFunc = function(){};
Kojak.instrumentor = new Kojak.Instrumentor();
// Spoof the config to include the right stuff
Kojak.Config.load();
Kojak.Config.setIncludedPakages(['FakeProject']);
});
it('Basic instrumentation', function() {
Kojak.instrumentor.instrument();
expect(FakeProject).toBeDefined();
expect(FakeProject._kPath).toBe('FakeProject');
expect(FakeProject.pakage1).toBeDefined();
expect(FakeProject.pakage1._kPath).toBe('FakeProject.pakage1');
expect(FakeProject.pakage2._kPath).toBe('FakeProject.pakage2');
expect(FakeProject.pakage4._kPath).toBe('FakeProject.pakage4');
expect(FakeProject.pakage1.ClassA._kPath).toBe('FakeProject.pakage1.ClassA');
expect(FakeProject.pakage1.ClassA.prototype._kPath).toBe('FakeProject.pakage1.ClassA.prototype');
expect(FakeProject.pakage1.ClassA._kFProfile).toBeUndefined();
expect(FakeProject.pakage1.ClassA.prototype._kFProfile).toBeUndefined();
expect(FakeProject.pakage1.ClassA.prototype.memberFuncA).toBeDefined();
expect(FakeProject.pakage1.ClassA.staticFuncA).toBeDefined();
expect(FakeProject.pakage1.ClassB.NestedClass._kPath).toBe('FakeProject.pakage1.ClassB.NestedClass');
expect(FakeProject.pakage1.ClassB.NestedClass.prototype.nestedFunc._kFProfile).toBeDefined();
expect(FakeProject.pakage1.ClassB.prototype.memberFuncB._kFProfile).toBeDefined();
expect(FakeProject.pakage4.ClassD._kPath).toBe('FakeProject.pakage4.ClassD');
// expect(FakeProject.pakage4.ClassD.prototype.classDFunc._kFProfile).toBeDefined();
});
it('Instrumentation exclusion at pakage level', function() {
Kojak.Config.setExcludedPaths(['FakeProject.pakage4']);
Kojak.instrumentor.instrument();
expect(FakeProject.pakage4.ClassD._kPath).toBeUndefined();
expect(FakeProject.pakage4.ClassD.prototype.classDFunc._kFProfile).toBeUndefined();
});
it('Instrumentation exclusion at function level', function() {
Kojak.Config.setExcludedPaths(['FakeProject.pakage4.ClassD.prototype.classDFunc']);
Kojak.instrumentor.instrument();
expect(FakeProject.pakage4.ClassD._kPath).toBe('FakeProject.pakage4.ClassD');
expect(FakeProject.pakage4.ClassD.prototype.classDFunc._kFProfile).toBeUndefined();
});
it('Duplicate function references, one is a Clazz', function() {
FakeProject.pakage1.dupFuncA = FakeProject.pakage1.ClassA.prototype.memberFuncA;
FakeProject.pakage1.DupFuncB = FakeProject.pakage1.ClassA.prototype.memberFuncA;
Kojak.instrumentor.instrument();
expect(FakeProject.pakage1.ClassA.prototype.memberFuncA._kFProfile).not.toBeDefined();
});
it('Duplicate function references, none is a Clazz', function() {
FakeProject.pakage1.dupFuncA = FakeProject.pakage1.ClassA.prototype.memberFuncA;
FakeProject.pakage1.dupFuncB = FakeProject.pakage1.ClassA.prototype.memberFuncA;
Kojak.instrumentor.instrument();
expect(FakeProject.pakage1.ClassA.prototype.memberFuncA._kFProfile).toBeDefined();
// Each duplicate function should have it's own unique kFProfile
expect(FakeProject.pakage1.dupFuncA._kFProfile).not.toEqual(FakeProject.pakage1.dupFuncB._kFProfile);
// Each duplicate function profile should reference the same original function
expect(FakeProject.pakage1.dupFuncA._kFProfile.getOrigFunction()).toEqual(FakeProject.pakage1.dupFuncB._kFProfile.getOrigFunction());
// The call counts etc. should be independent even though they wrap the same function
FakeProject.pakage1.dupFuncA();
expect(FakeProject.pakage1.dupFuncA._kFProfile.getCallCount()).toEqual(1);
expect(FakeProject.pakage1.dupFuncB._kFProfile.getCallCount()).toEqual(0);
});
it('Measured times look ok', function(){
Kojak.instrumentor.instrument();
FakeProject.pakage1.ClassA.staticFuncA();
expect(FakeProject.pakage1.ClassA.staticFuncA._kFProfile.getCallCount()).toBe(1);
expect(Math.abs(30 - FakeProject.pakage1.ClassA.staticFuncA._kFProfile.getWholeTime()) < 5).toBeTruthy();
expect(Math.abs(10 - FakeProject.pakage1.ClassA.staticFuncA._kFProfile.getIsolatedTime()) < 5).toBeTruthy();
})
});
|
theironcook/Kojak
|
spec/integration/InstrumentBasicSpec.js
|
JavaScript
|
mit
| 6,068
|
/*
* Foundation Responsive Library
* http://foundation.zurb.com
* Copyright 2014, ZURB
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function ($, window, document, undefined) {
'use strict';
var header_helpers = function (class_array) {
var i = class_array.length;
var head = $('head');
while (i--) {
if (head.has('.' + class_array[i]).length === 0) {
head.append('<meta class="' + class_array[i] + '" />');
}
}
};
header_helpers([
'foundation-mq-small',
'foundation-mq-small-only',
'foundation-mq-medium',
'foundation-mq-medium-only',
'foundation-mq-large',
'foundation-mq-large-only',
'foundation-mq-xlarge',
'foundation-mq-xlarge-only',
'foundation-mq-xxlarge',
'foundation-data-attribute-namespace']);
// Enable FastClick if present
$(function () {
if (typeof FastClick !== 'undefined') {
// Don't attach to body if undefined
if (typeof document.body !== 'undefined') {
FastClick.attach(document.body);
}
}
});
// private Fast Selector wrapper,
// returns jQuery object. Only use where
// getElementById is not available.
var S = function (selector, context) {
if (typeof selector === 'string') {
if (context) {
var cont;
if (context.jquery) {
cont = context[0];
if (!cont) {
return context;
}
} else {
cont = context;
}
return $(cont.querySelectorAll(selector));
}
return $(document.querySelectorAll(selector));
}
return $(selector, context);
};
// Namespace functions.
var attr_name = function (init) {
var arr = [];
if (!init) {
arr.push('data');
}
if (this.namespace.length > 0) {
arr.push(this.namespace);
}
arr.push(this.name);
return arr.join('-');
};
var add_namespace = function (str) {
var parts = str.split('-'),
i = parts.length,
arr = [];
while (i--) {
if (i !== 0) {
arr.push(parts[i]);
} else {
if (this.namespace.length > 0) {
arr.push(this.namespace, parts[i]);
} else {
arr.push(parts[i]);
}
}
}
return arr.reverse().join('-');
};
// Event binding and data-options updating.
var bindings = function (method, options) {
var self = this,
bind = function(){
var $this = S(this),
should_bind_events = !$this.data(self.attr_name(true) + '-init');
$this.data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options($this)));
if (should_bind_events) {
self.events(this);
}
};
if (S(this.scope).is('[' + this.attr_name() +']')) {
bind.call(this.scope);
} else {
S('[' + this.attr_name() +']', this.scope).each(bind);
}
// # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating.
if (typeof method === 'string') {
return this[method].call(this, options);
}
};
var single_image_loaded = function (image, callback) {
function loaded () {
callback(image[0]);
}
function bindLoad () {
this.one('load', loaded);
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
var src = this.attr( 'src' ),
param = src.match( /\?/ ) ? '&' : '?';
param += 'random=' + (new Date()).getTime();
this.attr('src', src + param);
}
}
if (!image.attr('src')) {
loaded();
return;
}
if (image[0].complete || image[0].readyState === 4) {
loaded();
} else {
bindLoad.call(image);
}
};
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
window.matchMedia || (window.matchMedia = function() {
"use strict";
// For browsers that support matchMedium api such as IE 9 and webkit
var styleMedia = (window.styleMedia || window.media);
// For those that don't support matchMedium
if (!styleMedia) {
var style = document.createElement('style'),
script = document.getElementsByTagName('script')[0],
info = null;
style.type = 'text/css';
style.id = 'matchmediajs-test';
script.parentNode.insertBefore(style, script);
// 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;
styleMedia = {
matchMedium: function(media) {
var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
// 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
if (style.styleSheet) {
style.styleSheet.cssText = text;
} else {
style.textContent = text;
}
// Test if media query is true or false
return info.width === '1px';
}
};
}
return function(media) {
return {
matches: styleMedia.matchMedium(media || 'all'),
media: media || 'all'
};
};
}());
/*
* jquery.requestAnimationFrame
* https://github.com/gnarf37/jquery-requestAnimationFrame
* Requires jQuery 1.8+
*
* Copyright (c) 2012 Corey Frang
* Licensed under the MIT license.
*/
(function(jQuery) {
// requestAnimationFrame polyfill adapted from Erik Möller
// fixes from Paul Irish and Tino Zijdel
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
var animating,
lastTime = 0,
vendors = ['webkit', 'moz'],
requestAnimationFrame = window.requestAnimationFrame,
cancelAnimationFrame = window.cancelAnimationFrame,
jqueryFxAvailable = 'undefined' !== typeof jQuery.fx;
for (; lastTime < vendors.length && !requestAnimationFrame; lastTime++) {
requestAnimationFrame = window[ vendors[lastTime] + 'RequestAnimationFrame' ];
cancelAnimationFrame = cancelAnimationFrame ||
window[ vendors[lastTime] + 'CancelAnimationFrame' ] ||
window[ vendors[lastTime] + 'CancelRequestAnimationFrame' ];
}
function raf() {
if (animating) {
requestAnimationFrame(raf);
if (jqueryFxAvailable) {
jQuery.fx.tick();
}
}
}
if (requestAnimationFrame) {
// use rAF
window.requestAnimationFrame = requestAnimationFrame;
window.cancelAnimationFrame = cancelAnimationFrame;
if (jqueryFxAvailable) {
jQuery.fx.timer = function (timer) {
if (timer() && jQuery.timers.push(timer) && !animating) {
animating = true;
raf();
}
};
jQuery.fx.stop = function () {
animating = false;
};
}
} else {
// polyfill
window.requestAnimationFrame = function (callback) {
var currTime = new Date().getTime(),
timeToCall = Math.max(0, 16 - (currTime - lastTime)),
id = window.setTimeout(function () {
callback(currTime + timeToCall);
}, timeToCall);
lastTime = currTime + timeToCall;
return id;
};
window.cancelAnimationFrame = function (id) {
clearTimeout(id);
};
}
}( $ ));
function removeQuotes (string) {
if (typeof string === 'string' || string instanceof String) {
string = string.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g, '');
}
return string;
}
window.Foundation = {
name : 'Foundation',
version : '5.5.2',
media_queries : {
'small' : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
'small-only' : S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
'medium' : S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
'medium-only' : S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
'large' : S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
'large-only' : S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
'xlarge' : S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
'xlarge-only' : S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
'xxlarge' : S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, '')
},
stylesheet : $('<style></style>').appendTo('head')[0].sheet,
global : {
namespace : undefined
},
init : function (scope, libraries, method, options, response) {
var args = [scope, method, options, response],
responses = [];
// check RTL
this.rtl = /rtl/i.test(S('html').attr('dir'));
// set foundation global scope
this.scope = scope || this.scope;
this.set_namespace();
if (libraries && typeof libraries === 'string' && !/reflow/i.test(libraries)) {
if (this.libs.hasOwnProperty(libraries)) {
responses.push(this.init_lib(libraries, args));
}
} else {
for (var lib in this.libs) {
responses.push(this.init_lib(lib, libraries));
}
}
S(window).load(function () {
S(window)
.trigger('resize.fndtn.clearing')
.trigger('resize.fndtn.dropdown')
.trigger('resize.fndtn.equalizer')
.trigger('resize.fndtn.interchange')
.trigger('resize.fndtn.joyride')
.trigger('resize.fndtn.magellan')
.trigger('resize.fndtn.topbar')
.trigger('resize.fndtn.slider');
});
return scope;
},
init_lib : function (lib, args) {
if (this.libs.hasOwnProperty(lib)) {
this.patch(this.libs[lib]);
if (args && args.hasOwnProperty(lib)) {
if (typeof this.libs[lib].settings !== 'undefined') {
$.extend(true, this.libs[lib].settings, args[lib]);
} else if (typeof this.libs[lib].defaults !== 'undefined') {
$.extend(true, this.libs[lib].defaults, args[lib]);
}
return this.libs[lib].init.apply(this.libs[lib], [this.scope, args[lib]]);
}
args = args instanceof Array ? args : new Array(args);
return this.libs[lib].init.apply(this.libs[lib], args);
}
return function () {};
},
patch : function (lib) {
lib.scope = this.scope;
lib.namespace = this.global.namespace;
lib.rtl = this.rtl;
lib['data_options'] = this.utils.data_options;
lib['attr_name'] = attr_name;
lib['add_namespace'] = add_namespace;
lib['bindings'] = bindings;
lib['S'] = this.utils.S;
},
inherit : function (scope, methods) {
var methods_arr = methods.split(' '),
i = methods_arr.length;
while (i--) {
if (this.utils.hasOwnProperty(methods_arr[i])) {
scope[methods_arr[i]] = this.utils[methods_arr[i]];
}
}
},
set_namespace : function () {
// Description:
// Don't bother reading the namespace out of the meta tag
// if the namespace has been set globally in javascript
//
// Example:
// Foundation.global.namespace = 'my-namespace';
// or make it an empty string:
// Foundation.global.namespace = '';
//
//
// If the namespace has not been set (is undefined), try to read it out of the meta element.
// Otherwise use the globally defined namespace, even if it's empty ('')
var namespace = ( this.global.namespace === undefined ) ? $('.foundation-data-attribute-namespace').css('font-family') : this.global.namespace;
// Finally, if the namsepace is either undefined or false, set it to an empty string.
// Otherwise use the namespace value.
this.global.namespace = ( namespace === undefined || /false/i.test(namespace) ) ? '' : namespace;
},
libs : {},
// methods that can be inherited in libraries
utils : {
// Description:
// Fast Selector wrapper returns jQuery object. Only use where getElementById
// is not available.
//
// Arguments:
// Selector (String): CSS selector describing the element(s) to be
// returned as a jQuery object.
//
// Scope (String): CSS selector describing the area to be searched. Default
// is document.
//
// Returns:
// Element (jQuery Object): jQuery object containing elements matching the
// selector within the scope.
S : S,
// Description:
// Executes a function a max of once every n milliseconds
//
// Arguments:
// Func (Function): Function to be throttled.
//
// Delay (Integer): Function execution threshold in milliseconds.
//
// Returns:
// Lazy_function (Function): Function with throttling applied.
throttle : function (func, delay) {
var timer = null;
return function () {
var context = this, args = arguments;
if (timer == null) {
timer = setTimeout(function () {
func.apply(context, args);
timer = null;
}, delay);
}
};
},
// Description:
// Executes a function when it stops being invoked for n seconds
// Modified version of _.debounce() http://underscorejs.org
//
// Arguments:
// Func (Function): Function to be debounced.
//
// Delay (Integer): Function execution threshold in milliseconds.
//
// Immediate (Bool): Whether the function should be called at the beginning
// of the delay instead of the end. Default is false.
//
// Returns:
// Lazy_function (Function): Function with debouncing applied.
debounce : function (func, delay, immediate) {
var timeout, result;
return function () {
var context = this, args = arguments;
var later = function () {
timeout = null;
if (!immediate) {
result = func.apply(context, args);
}
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, delay);
if (callNow) {
result = func.apply(context, args);
}
return result;
};
},
// Description:
// Parses data-options attribute
//
// Arguments:
// El (jQuery Object): Element to be parsed.
//
// Returns:
// Options (Javascript Object): Contents of the element's data-options
// attribute.
data_options : function (el, data_attr_name) {
data_attr_name = data_attr_name || 'options';
var opts = {}, ii, p, opts_arr,
data_options = function (el) {
var namespace = Foundation.global.namespace;
if (namespace.length > 0) {
return el.data(namespace + '-' + data_attr_name);
}
return el.data(data_attr_name);
};
var cached_options = data_options(el);
if (typeof cached_options === 'object') {
return cached_options;
}
opts_arr = (cached_options || ':').split(';');
ii = opts_arr.length;
function isNumber (o) {
return !isNaN (o - 0) && o !== null && o !== '' && o !== false && o !== true;
}
function trim (str) {
if (typeof str === 'string') {
return $.trim(str);
}
return str;
}
while (ii--) {
p = opts_arr[ii].split(':');
p = [p[0], p.slice(1).join(':')];
if (/true/i.test(p[1])) {
p[1] = true;
}
if (/false/i.test(p[1])) {
p[1] = false;
}
if (isNumber(p[1])) {
if (p[1].indexOf('.') === -1) {
p[1] = parseInt(p[1], 10);
} else {
p[1] = parseFloat(p[1]);
}
}
if (p.length === 2 && p[0].length > 0) {
opts[trim(p[0])] = trim(p[1]);
}
}
return opts;
},
// Description:
// Adds JS-recognizable media queries
//
// Arguments:
// Media (String): Key string for the media query to be stored as in
// Foundation.media_queries
//
// Class (String): Class name for the generated <meta> tag
register_media : function (media, media_class) {
if (Foundation.media_queries[media] === undefined) {
$('head').append('<meta class="' + media_class + '"/>');
Foundation.media_queries[media] = removeQuotes($('.' + media_class).css('font-family'));
}
},
// Description:
// Add custom CSS within a JS-defined media query
//
// Arguments:
// Rule (String): CSS rule to be appended to the document.
//
// Media (String): Optional media query string for the CSS rule to be
// nested under.
add_custom_rule : function (rule, media) {
if (media === undefined && Foundation.stylesheet) {
Foundation.stylesheet.insertRule(rule, Foundation.stylesheet.cssRules.length);
} else {
var query = Foundation.media_queries[media];
if (query !== undefined) {
Foundation.stylesheet.insertRule('@media ' +
Foundation.media_queries[media] + '{ ' + rule + ' }', Foundation.stylesheet.cssRules.length);
}
}
},
// Description:
// Performs a callback function when an image is fully loaded
//
// Arguments:
// Image (jQuery Object): Image(s) to check if loaded.
//
// Callback (Function): Function to execute when image is fully loaded.
image_loaded : function (images, callback) {
var self = this,
unloaded = images.length;
function pictures_has_height(images) {
var pictures_number = images.length;
for (var i = pictures_number - 1; i >= 0; i--) {
if(images.attr('height') === undefined) {
return false;
};
};
return true;
}
if (unloaded === 0 || pictures_has_height(images)) {
callback(images);
}
images.each(function () {
single_image_loaded(self.S(this), function () {
unloaded -= 1;
if (unloaded === 0) {
callback(images);
}
});
});
},
// Description:
// Returns a random, alphanumeric string
//
// Arguments:
// Length (Integer): Length of string to be generated. Defaults to random
// integer.
//
// Returns:
// Rand (String): Pseudo-random, alphanumeric string.
random_str : function () {
if (!this.fidx) {
this.fidx = 0;
}
this.prefix = this.prefix || [(this.name || 'F'), (+new Date).toString(36)].join('-');
return this.prefix + (this.fidx++).toString(36);
},
// Description:
// Helper for window.matchMedia
//
// Arguments:
// mq (String): Media query
//
// Returns:
// (Boolean): Whether the media query passes or not
match : function (mq) {
return window.matchMedia(mq).matches;
},
// Description:
// Helpers for checking Foundation default media queries with JS
//
// Returns:
// (Boolean): Whether the media query passes or not
is_small_up : function () {
return this.match(Foundation.media_queries.small);
},
is_medium_up : function () {
return this.match(Foundation.media_queries.medium);
},
is_large_up : function () {
return this.match(Foundation.media_queries.large);
},
is_xlarge_up : function () {
return this.match(Foundation.media_queries.xlarge);
},
is_xxlarge_up : function () {
return this.match(Foundation.media_queries.xxlarge);
},
is_small_only : function () {
return !this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
},
is_medium_only : function () {
return this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
},
is_large_only : function () {
return this.is_medium_up() && this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
},
is_xlarge_only : function () {
return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && !this.is_xxlarge_up();
},
is_xxlarge_only : function () {
return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && this.is_xxlarge_up();
}
}
};
$.fn.foundation = function () {
var args = Array.prototype.slice.call(arguments, 0);
return this.each(function () {
Foundation.init.apply(Foundation, [this].concat(args));
return this;
});
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.slider = {
name : 'slider',
version : '5.5.2',
settings : {
start : 0,
end : 100,
step : 1,
precision : null,
initial : null,
display_selector : '',
vertical : false,
trigger_input_change : false,
on_change : function () {}
},
cache : {},
init : function (scope, method, options) {
Foundation.inherit(this, 'throttle');
this.bindings(method, options);
this.reflow();
},
events : function () {
var self = this;
$(this.scope)
.off('.slider')
.on('mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider',
'[' + self.attr_name() + ']:not(.disabled, [disabled]) .range-slider-handle', function (e) {
if (!self.cache.active) {
e.preventDefault();
self.set_active_slider($(e.target));
}
})
.on('mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider', function (e) {
if (!!self.cache.active) {
e.preventDefault();
if ($.data(self.cache.active[0], 'settings').vertical) {
var scroll_offset = 0;
if (!e.pageY) {
scroll_offset = window.scrollY;
}
self.calculate_position(self.cache.active, self.get_cursor_position(e, 'y') + scroll_offset);
} else {
self.calculate_position(self.cache.active, self.get_cursor_position(e, 'x'));
}
}
})
.on('mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider', function (e) {
self.remove_active_slider();
})
.on('change.fndtn.slider', function (e) {
self.settings.on_change();
});
self.S(window)
.on('resize.fndtn.slider', self.throttle(function (e) {
self.reflow();
}, 300));
// update slider value as users change input value
this.S('[' + this.attr_name() + ']').each(function () {
var slider = $(this),
handle = slider.children('.range-slider-handle')[0],
settings = self.initialize_settings(handle);
if (settings.display_selector != '') {
$(settings.display_selector).each(function(){
if (this.hasOwnProperty('value')) {
$(this).change(function(){
// is there a better way to do this?
slider.foundation("slider", "set_value", $(this).val());
});
}
});
}
});
},
get_cursor_position : function (e, xy) {
var pageXY = 'page' + xy.toUpperCase(),
clientXY = 'client' + xy.toUpperCase(),
position;
if (typeof e[pageXY] !== 'undefined') {
position = e[pageXY];
} else if (typeof e.originalEvent[clientXY] !== 'undefined') {
position = e.originalEvent[clientXY];
} else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0][clientXY] !== 'undefined') {
position = e.originalEvent.touches[0][clientXY];
} else if (e.currentPoint && typeof e.currentPoint[xy] !== 'undefined') {
position = e.currentPoint[xy];
}
return position;
},
set_active_slider : function ($handle) {
this.cache.active = $handle;
},
remove_active_slider : function () {
this.cache.active = null;
},
calculate_position : function ($handle, cursor_x) {
var self = this,
settings = $.data($handle[0], 'settings'),
handle_l = $.data($handle[0], 'handle_l'),
handle_o = $.data($handle[0], 'handle_o'),
bar_l = $.data($handle[0], 'bar_l'),
bar_o = $.data($handle[0], 'bar_o');
requestAnimationFrame(function () {
var pct;
if (Foundation.rtl && !settings.vertical) {
pct = self.limit_to(((bar_o + bar_l - cursor_x) / bar_l), 0, 1);
} else {
pct = self.limit_to(((cursor_x - bar_o) / bar_l), 0, 1);
}
pct = settings.vertical ? 1 - pct : pct;
var norm = self.normalized_value(pct, settings.start, settings.end, settings.step, settings.precision);
self.set_ui($handle, norm, true);
});
},
set_ui : function ($handle, value, trigger) {
var settings = $.data($handle[0], 'settings'),
handle_l = $.data($handle[0], 'handle_l'),
bar_l = $.data($handle[0], 'bar_l'),
norm_pct = this.normalized_percentage(value, settings.start, settings.end),
handle_offset = norm_pct * (bar_l - handle_l) - 1,
progress_bar_length = norm_pct * 100,
$handle_parent = $handle.parent(),
$hidden_inputs = $handle.parent().children('input[type=hidden]');
if (Foundation.rtl && !settings.vertical) {
handle_offset = -handle_offset;
}
handle_offset = settings.vertical ? -handle_offset + bar_l - handle_l + 1 : handle_offset;
this.set_translate($handle, handle_offset, settings.vertical);
if (settings.vertical) {
$handle.siblings('.range-slider-active-segment').css('height', progress_bar_length + '%');
} else {
$handle.siblings('.range-slider-active-segment').css('width', progress_bar_length + '%');
}
// HACK to avoid loop !
if(trigger) {
$handle_parent.attr(this.attr_name(), value).trigger('change.fndtn.slider');
}
$hidden_inputs.val(value);
if (settings.trigger_input_change) {
$hidden_inputs.trigger('change.fndtn.slider');
}
if (!$handle[0].hasAttribute('aria-valuemin')) {
$handle.attr({
'aria-valuemin' : settings.start,
'aria-valuemax' : settings.end
});
}
$handle.attr('aria-valuenow', value);
if (settings.display_selector != '') {
$(settings.display_selector).each(function () {
if (this.hasAttribute('value')) {
$(this).val(value);
} else {
$(this).text(value);
}
});
}
},
normalized_percentage : function (val, start, end) {
return Math.min(1, (val - start) / (end - start));
},
normalized_value : function (val, start, end, step, precision) {
var range = end - start,
point = val * range,
mod = (point - (point % step)) / step,
rem = point % step,
round = ( rem >= step * 0.5 ? step : 0);
return ((mod * step + round) + start).toFixed(precision);
},
set_translate : function (ele, offset, vertical) {
if (vertical) {
$(ele)
.css('-webkit-transform', 'translateY(' + offset + 'px)')
.css('-moz-transform', 'translateY(' + offset + 'px)')
.css('-ms-transform', 'translateY(' + offset + 'px)')
.css('-o-transform', 'translateY(' + offset + 'px)')
.css('transform', 'translateY(' + offset + 'px)');
} else {
$(ele)
.css('-webkit-transform', 'translateX(' + offset + 'px)')
.css('-moz-transform', 'translateX(' + offset + 'px)')
.css('-ms-transform', 'translateX(' + offset + 'px)')
.css('-o-transform', 'translateX(' + offset + 'px)')
.css('transform', 'translateX(' + offset + 'px)');
}
},
limit_to : function (val, min, max) {
return Math.min(Math.max(val, min), max);
},
initialize_settings : function (handle) {
var settings = $.extend({}, this.settings, this.data_options($(handle).parent())),
decimal_places_match_result;
if (settings.precision === null) {
decimal_places_match_result = ('' + settings.step).match(/\.([\d]*)/);
settings.precision = decimal_places_match_result && decimal_places_match_result[1] ? decimal_places_match_result[1].length : 0;
}
if (settings.vertical) {
$.data(handle, 'bar_o', $(handle).parent().offset().top);
$.data(handle, 'bar_l', $(handle).parent().outerHeight());
$.data(handle, 'handle_o', $(handle).offset().top);
$.data(handle, 'handle_l', $(handle).outerHeight());
} else {
$.data(handle, 'bar_o', $(handle).parent().offset().left);
$.data(handle, 'bar_l', $(handle).parent().outerWidth());
$.data(handle, 'handle_o', $(handle).offset().left);
$.data(handle, 'handle_l', $(handle).outerWidth());
}
$.data(handle, 'bar', $(handle).parent());
return $.data(handle, 'settings', settings);
},
set_initial_position : function ($ele) {
var settings = $.data($ele.children('.range-slider-handle')[0], 'settings'),
initial = ((typeof settings.initial == 'number' && !isNaN(settings.initial)) ? settings.initial : Math.floor((settings.end - settings.start) * 0.5 / settings.step) * settings.step + settings.start),
$handle = $ele.children('.range-slider-handle');
this.set_ui($handle, initial, true);
},
set_value : function (value, trigger) {
var self = this;
$('[' + self.attr_name() + ']', this.scope).each(function () {
$(this).attr(self.attr_name(), value);
});
if (!!$(this.scope).attr(self.attr_name())) {
$(this.scope).attr(self.attr_name(), value);
}
self.reflow(trigger);
},
reflow : function (trigger) {
var self = this;
self.S('[' + this.attr_name() + ']').each(function () {
var handle = $(this).children('.range-slider-handle')[0],
val = $(this).attr(self.attr_name());
self.initialize_settings(handle);
if (val) {
self.set_ui($(handle), parseFloat(val), trigger);
} else {
self.set_initial_position($(this));
}
});
}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
var Modernizr = Modernizr || false;
Foundation.libs.joyride = {
name : 'joyride',
version : '5.5.2',
defaults : {
expose : false, // turn on or off the expose feature
modal : true, // Whether to cover page with modal during the tour
keyboard : true, // enable left, right and esc keystrokes
tip_location : 'bottom', // 'top' or 'bottom' in relation to parent
nub_position : 'auto', // override on a per tooltip bases
scroll_speed : 1500, // Page scrolling speed in milliseconds, 0 = no scroll animation
scroll_animation : 'linear', // supports 'swing' and 'linear', extend with jQuery UI.
timer : 0, // 0 = no timer , all other numbers = timer in milliseconds
start_timer_on_click : true, // true or false - true requires clicking the first button start the timer
start_offset : 0, // the index of the tooltip you want to start on (index of the li)
next_button : true, // true or false to control whether a next button is used
prev_button : true, // true or false to control whether a prev button is used
tip_animation : 'fade', // 'pop' or 'fade' in each tip
pause_after : [], // array of indexes where to pause the tour after
exposed : [], // array of expose elements
tip_animation_fade_speed : 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition
cookie_monster : false, // true or false to control whether cookies are used
cookie_name : 'joyride', // Name the cookie you'll use
cookie_domain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com'
cookie_expires : 365, // set when you would like the cookie to expire.
tip_container : 'body', // Where will the tip be attached
abort_on_close : true, // When true, the close event will not fire any callback
tip_location_patterns : {
top : ['bottom'],
bottom : [], // bottom should not need to be repositioned
left : ['right', 'top', 'bottom'],
right : ['left', 'top', 'bottom']
},
post_ride_callback : function () {}, // A method to call once the tour closes (canceled or complete)
post_step_callback : function () {}, // A method to call after each step
pre_step_callback : function () {}, // A method to call before each step
pre_ride_callback : function () {}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
post_expose_callback : function () {}, // A method to call after an element has been exposed
template : { // HTML segments for tip layout
link : '<a href="#close" class="joyride-close-tip">×</a>',
timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
tip : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
wrapper : '<div class="joyride-content-wrapper"></div>',
button : '<a href="#" class="small button joyride-next-tip"></a>',
prev_button : '<a href="#" class="small button joyride-prev-tip"></a>',
modal : '<div class="joyride-modal-bg"></div>',
expose : '<div class="joyride-expose-wrapper"></div>',
expose_cover : '<div class="joyride-expose-cover"></div>'
},
expose_add_class : '' // One or more space-separated class names to be added to exposed element
},
init : function (scope, method, options) {
Foundation.inherit(this, 'throttle random_str');
this.settings = this.settings || $.extend({}, this.defaults, (options || method));
this.bindings(method, options)
},
go_next : function () {
if (this.settings.$li.next().length < 1) {
this.end();
} else if (this.settings.timer > 0) {
clearTimeout(this.settings.automate);
this.hide();
this.show();
this.startTimer();
} else {
this.hide();
this.show();
}
},
go_prev : function () {
if (this.settings.$li.prev().length < 1) {
// Do nothing if there are no prev element
} else if (this.settings.timer > 0) {
clearTimeout(this.settings.automate);
this.hide();
this.show(null, true);
this.startTimer();
} else {
this.hide();
this.show(null, true);
}
},
events : function () {
var self = this;
$(this.scope)
.off('.joyride')
.on('click.fndtn.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
e.preventDefault();
this.go_next()
}.bind(this))
.on('click.fndtn.joyride', '.joyride-prev-tip', function (e) {
e.preventDefault();
this.go_prev();
}.bind(this))
.on('click.fndtn.joyride', '.joyride-close-tip', function (e) {
e.preventDefault();
this.end(this.settings.abort_on_close);
}.bind(this))
.on('keyup.fndtn.joyride', function (e) {
// Don't do anything if keystrokes are disabled
// or if the joyride is not being shown
if (!this.settings.keyboard || !this.settings.riding) {
return;
}
switch (e.which) {
case 39: // right arrow
e.preventDefault();
this.go_next();
break;
case 37: // left arrow
e.preventDefault();
this.go_prev();
break;
case 27: // escape
e.preventDefault();
this.end(this.settings.abort_on_close);
}
}.bind(this));
$(window)
.off('.joyride')
.on('resize.fndtn.joyride', self.throttle(function () {
if ($('[' + self.attr_name() + ']').length > 0 && self.settings.$next_tip && self.settings.riding) {
if (self.settings.exposed.length > 0) {
var $els = $(self.settings.exposed);
$els.each(function () {
var $this = $(this);
self.un_expose($this);
self.expose($this);
});
}
if (self.is_phone()) {
self.pos_phone();
} else {
self.pos_default(false);
}
}
}, 100));
},
start : function () {
var self = this,
$this = $('[' + this.attr_name() + ']', this.scope),
integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
int_settings_count = integer_settings.length;
if (!$this.length > 0) {
return;
}
if (!this.settings.init) {
this.events();
}
this.settings = $this.data(this.attr_name(true) + '-init');
// non configureable settings
this.settings.$content_el = $this;
this.settings.$body = $(this.settings.tip_container);
this.settings.body_offset = $(this.settings.tip_container).position();
this.settings.$tip_content = this.settings.$content_el.find('> li');
this.settings.paused = false;
this.settings.attempts = 0;
this.settings.riding = true;
// can we create cookies?
if (typeof $.cookie !== 'function') {
this.settings.cookie_monster = false;
}
// generate the tips and insert into dom.
if (!this.settings.cookie_monster || this.settings.cookie_monster && !$.cookie(this.settings.cookie_name)) {
this.settings.$tip_content.each(function (index) {
var $this = $(this);
this.settings = $.extend({}, self.defaults, self.data_options($this));
// Make sure that settings parsed from data_options are integers where necessary
var i = int_settings_count;
while (i--) {
self.settings[integer_settings[i]] = parseInt(self.settings[integer_settings[i]], 10);
}
self.create({$li : $this, index : index});
});
// show first tip
if (!this.settings.start_timer_on_click && this.settings.timer > 0) {
this.show('init');
this.startTimer();
} else {
this.show('init');
}
}
},
resume : function () {
this.set_li();
this.show();
},
tip_template : function (opts) {
var $blank, content;
opts.tip_class = opts.tip_class || '';
$blank = $(this.settings.template.tip).addClass(opts.tip_class);
content = $.trim($(opts.li).html()) +
this.prev_button_text(opts.prev_button_text, opts.index) +
this.button_text(opts.button_text) +
this.settings.template.link +
this.timer_instance(opts.index);
$blank.append($(this.settings.template.wrapper));
$blank.first().attr(this.add_namespace('data-index'), opts.index);
$('.joyride-content-wrapper', $blank).append(content);
return $blank[0];
},
timer_instance : function (index) {
var txt;
if ((index === 0 && this.settings.start_timer_on_click && this.settings.timer > 0) || this.settings.timer === 0) {
txt = '';
} else {
txt = $(this.settings.template.timer)[0].outerHTML;
}
return txt;
},
button_text : function (txt) {
if (this.settings.tip_settings.next_button) {
txt = $.trim(txt) || 'Next';
txt = $(this.settings.template.button).append(txt)[0].outerHTML;
} else {
txt = '';
}
return txt;
},
prev_button_text : function (txt, idx) {
if (this.settings.tip_settings.prev_button) {
txt = $.trim(txt) || 'Previous';
// Add the disabled class to the button if it's the first element
if (idx == 0) {
txt = $(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;
} else {
txt = $(this.settings.template.prev_button).append(txt)[0].outerHTML;
}
} else {
txt = '';
}
return txt;
},
create : function (opts) {
this.settings.tip_settings = $.extend({}, this.settings, this.data_options(opts.$li));
var buttonText = opts.$li.attr(this.add_namespace('data-button')) || opts.$li.attr(this.add_namespace('data-text')),
prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev')) || opts.$li.attr(this.add_namespace('data-prev-text')),
tipClass = opts.$li.attr('class'),
$tip_content = $(this.tip_template({
tip_class : tipClass,
index : opts.index,
button_text : buttonText,
prev_button_text : prevButtonText,
li : opts.$li
}));
$(this.settings.tip_container).append($tip_content);
},
show : function (init, is_prev) {
var $timer = null;
// are we paused?
if (this.settings.$li === undefined || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
// don't go to the next li if the tour was paused
if (this.settings.paused) {
this.settings.paused = false;
} else {
this.set_li(init, is_prev);
}
this.settings.attempts = 0;
if (this.settings.$li.length && this.settings.$target.length > 0) {
if (init) { //run when we first start
this.settings.pre_ride_callback(this.settings.$li.index(), this.settings.$next_tip);
if (this.settings.modal) {
this.show_modal();
}
}
this.settings.pre_step_callback(this.settings.$li.index(), this.settings.$next_tip);
if (this.settings.modal && this.settings.expose) {
this.expose();
}
this.settings.tip_settings = $.extend({}, this.settings, this.data_options(this.settings.$li));
this.settings.timer = parseInt(this.settings.timer, 10);
this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
// scroll and hide bg if not modal
if (!/body/i.test(this.settings.$target.selector)) {
var joyridemodalbg = $('.joyride-modal-bg');
if (/pop/i.test(this.settings.tipAnimation)) {
joyridemodalbg.hide();
} else {
joyridemodalbg.fadeOut(this.settings.tipAnimationFadeSpeed);
}
this.scroll_to();
}
if (this.is_phone()) {
this.pos_phone(true);
} else {
this.pos_default(true);
}
$timer = this.settings.$next_tip.find('.joyride-timer-indicator');
if (/pop/i.test(this.settings.tip_animation)) {
$timer.width(0);
if (this.settings.timer > 0) {
this.settings.$next_tip.show();
setTimeout(function () {
$timer.animate({
width : $timer.parent().width()
}, this.settings.timer, 'linear');
}.bind(this), this.settings.tip_animation_fade_speed);
} else {
this.settings.$next_tip.show();
}
} else if (/fade/i.test(this.settings.tip_animation)) {
$timer.width(0);
if (this.settings.timer > 0) {
this.settings.$next_tip
.fadeIn(this.settings.tip_animation_fade_speed)
.show();
setTimeout(function () {
$timer.animate({
width : $timer.parent().width()
}, this.settings.timer, 'linear');
}.bind(this), this.settings.tip_animation_fade_speed);
} else {
this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed);
}
}
this.settings.$current_tip = this.settings.$next_tip;
// skip non-existant targets
} else if (this.settings.$li && this.settings.$target.length < 1) {
this.show(init, is_prev);
} else {
this.end();
}
} else {
this.settings.paused = true;
}
},
is_phone : function () {
return matchMedia(Foundation.media_queries.small).matches &&
!matchMedia(Foundation.media_queries.medium).matches;
},
hide : function () {
if (this.settings.modal && this.settings.expose) {
this.un_expose();
}
if (!this.settings.modal) {
$('.joyride-modal-bg').hide();
}
// Prevent scroll bouncing...wait to remove from layout
this.settings.$current_tip.css('visibility', 'hidden');
setTimeout($.proxy(function () {
this.hide();
this.css('visibility', 'visible');
}, this.settings.$current_tip), 0);
this.settings.post_step_callback(this.settings.$li.index(),
this.settings.$current_tip);
},
set_li : function (init, is_prev) {
if (init) {
this.settings.$li = this.settings.$tip_content.eq(this.settings.start_offset);
this.set_next_tip();
this.settings.$current_tip = this.settings.$next_tip;
} else {
if (is_prev) {
this.settings.$li = this.settings.$li.prev();
} else {
this.settings.$li = this.settings.$li.next();
}
this.set_next_tip();
}
this.set_target();
},
set_next_tip : function () {
this.settings.$next_tip = $('.joyride-tip-guide').eq(this.settings.$li.index());
this.settings.$next_tip.data('closed', '');
},
set_target : function () {
var cl = this.settings.$li.attr(this.add_namespace('data-class')),
id = this.settings.$li.attr(this.add_namespace('data-id')),
$sel = function () {
if (id) {
return $(document.getElementById(id));
} else if (cl) {
return $('.' + cl).first();
} else {
return $('body');
}
};
this.settings.$target = $sel();
},
scroll_to : function () {
var window_half, tipOffset;
window_half = $(window).height() / 2;
tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight());
if (tipOffset != 0) {
$('html, body').stop().animate({
scrollTop : tipOffset
}, this.settings.scroll_speed, 'swing');
}
},
paused : function () {
return ($.inArray((this.settings.$li.index() + 1), this.settings.pause_after) === -1);
},
restart : function () {
this.hide();
this.settings.$li = undefined;
this.show('init');
},
pos_default : function (init) {
var $nub = this.settings.$next_tip.find('.joyride-nub'),
nub_width = Math.ceil($nub.outerWidth() / 2),
nub_height = Math.ceil($nub.outerHeight() / 2),
toggle = init || false;
// tip must not be "display: none" to calculate position
if (toggle) {
this.settings.$next_tip.css('visibility', 'hidden');
this.settings.$next_tip.show();
}
if (!/body/i.test(this.settings.$target.selector)) {
var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
if (this.bottom()) {
if (this.rtl) {
this.settings.$next_tip.css({
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
} else {
this.settings.$next_tip.css({
top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
left : this.settings.$target.offset().left + leftAdjustment});
}
this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
} else if (this.top()) {
if (this.rtl) {
this.settings.$next_tip.css({
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
} else {
this.settings.$next_tip.css({
top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
left : this.settings.$target.offset().left + leftAdjustment});
}
this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
} else if (this.right()) {
this.settings.$next_tip.css({
top : this.settings.$target.offset().top + topAdjustment,
left : (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
} else if (this.left()) {
this.settings.$next_tip.css({
top : this.settings.$target.offset().top + topAdjustment,
left : (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
}
if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tip_settings.tip_location_pattern.length) {
$nub.removeClass('bottom')
.removeClass('top')
.removeClass('right')
.removeClass('left');
this.settings.tip_settings.tip_location = this.settings.tip_settings.tip_location_pattern[this.settings.attempts];
this.settings.attempts++;
this.pos_default();
}
} else if (this.settings.$li.length) {
this.pos_modal($nub);
}
if (toggle) {
this.settings.$next_tip.hide();
this.settings.$next_tip.css('visibility', 'visible');
}
},
pos_phone : function (init) {
var tip_height = this.settings.$next_tip.outerHeight(),
tip_offset = this.settings.$next_tip.offset(),
target_height = this.settings.$target.outerHeight(),
$nub = $('.joyride-nub', this.settings.$next_tip),
nub_height = Math.ceil($nub.outerHeight() / 2),
toggle = init || false;
$nub.removeClass('bottom')
.removeClass('top')
.removeClass('right')
.removeClass('left');
if (toggle) {
this.settings.$next_tip.css('visibility', 'hidden');
this.settings.$next_tip.show();
}
if (!/body/i.test(this.settings.$target.selector)) {
if (this.top()) {
this.settings.$next_tip.offset({top : this.settings.$target.offset().top - tip_height - nub_height});
$nub.addClass('bottom');
} else {
this.settings.$next_tip.offset({top : this.settings.$target.offset().top + target_height + nub_height});
$nub.addClass('top');
}
} else if (this.settings.$li.length) {
this.pos_modal($nub);
}
if (toggle) {
this.settings.$next_tip.hide();
this.settings.$next_tip.css('visibility', 'visible');
}
},
pos_modal : function ($nub) {
this.center();
$nub.hide();
this.show_modal();
},
show_modal : function () {
if (!this.settings.$next_tip.data('closed')) {
var joyridemodalbg = $('.joyride-modal-bg');
if (joyridemodalbg.length < 1) {
var joyridemodalbg = $(this.settings.template.modal);
joyridemodalbg.appendTo('body');
}
if (/pop/i.test(this.settings.tip_animation)) {
joyridemodalbg.show();
} else {
joyridemodalbg.fadeIn(this.settings.tip_animation_fade_speed);
}
}
},
expose : function () {
var expose,
exposeCover,
el,
origCSS,
origClasses,
randId = 'expose-' + this.random_str(6);
if (arguments.length > 0 && arguments[0] instanceof $) {
el = arguments[0];
} else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
el = this.settings.$target;
} else {
return false;
}
if (el.length < 1) {
if (window.console) {
console.error('element not valid', el);
}
return false;
}
expose = $(this.settings.template.expose);
this.settings.$body.append(expose);
expose.css({
top : el.offset().top,
left : el.offset().left,
width : el.outerWidth(true),
height : el.outerHeight(true)
});
exposeCover = $(this.settings.template.expose_cover);
origCSS = {
zIndex : el.css('z-index'),
position : el.css('position')
};
origClasses = el.attr('class') == null ? '' : el.attr('class');
el.css('z-index', parseInt(expose.css('z-index')) + 1);
if (origCSS.position == 'static') {
el.css('position', 'relative');
}
el.data('expose-css', origCSS);
el.data('orig-class', origClasses);
el.attr('class', origClasses + ' ' + this.settings.expose_add_class);
exposeCover.css({
top : el.offset().top,
left : el.offset().left,
width : el.outerWidth(true),
height : el.outerHeight(true)
});
if (this.settings.modal) {
this.show_modal();
}
this.settings.$body.append(exposeCover);
expose.addClass(randId);
exposeCover.addClass(randId);
el.data('expose', randId);
this.settings.post_expose_callback(this.settings.$li.index(), this.settings.$next_tip, el);
this.add_exposed(el);
},
un_expose : function () {
var exposeId,
el,
expose,
origCSS,
origClasses,
clearAll = false;
if (arguments.length > 0 && arguments[0] instanceof $) {
el = arguments[0];
} else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
el = this.settings.$target;
} else {
return false;
}
if (el.length < 1) {
if (window.console) {
console.error('element not valid', el);
}
return false;
}
exposeId = el.data('expose');
expose = $('.' + exposeId);
if (arguments.length > 1) {
clearAll = arguments[1];
}
if (clearAll === true) {
$('.joyride-expose-wrapper,.joyride-expose-cover').remove();
} else {
expose.remove();
}
origCSS = el.data('expose-css');
if (origCSS.zIndex == 'auto') {
el.css('z-index', '');
} else {
el.css('z-index', origCSS.zIndex);
}
if (origCSS.position != el.css('position')) {
if (origCSS.position == 'static') {// this is default, no need to set it.
el.css('position', '');
} else {
el.css('position', origCSS.position);
}
}
origClasses = el.data('orig-class');
el.attr('class', origClasses);
el.removeData('orig-classes');
el.removeData('expose');
el.removeData('expose-z-index');
this.remove_exposed(el);
},
add_exposed : function (el) {
this.settings.exposed = this.settings.exposed || [];
if (el instanceof $ || typeof el === 'object') {
this.settings.exposed.push(el[0]);
} else if (typeof el == 'string') {
this.settings.exposed.push(el);
}
},
remove_exposed : function (el) {
var search, i;
if (el instanceof $) {
search = el[0]
} else if (typeof el == 'string') {
search = el;
}
this.settings.exposed = this.settings.exposed || [];
i = this.settings.exposed.length;
while (i--) {
if (this.settings.exposed[i] == search) {
this.settings.exposed.splice(i, 1);
return;
}
}
},
center : function () {
var $w = $(window);
this.settings.$next_tip.css({
top : ((($w.height() - this.settings.$next_tip.outerHeight()) / 2) + $w.scrollTop()),
left : ((($w.width() - this.settings.$next_tip.outerWidth()) / 2) + $w.scrollLeft())
});
return true;
},
bottom : function () {
return /bottom/i.test(this.settings.tip_settings.tip_location);
},
top : function () {
return /top/i.test(this.settings.tip_settings.tip_location);
},
right : function () {
return /right/i.test(this.settings.tip_settings.tip_location);
},
left : function () {
return /left/i.test(this.settings.tip_settings.tip_location);
},
corners : function (el) {
var w = $(window),
window_half = w.height() / 2,
//using this to calculate since scroll may not have finished yet.
tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()),
right = w.width() + w.scrollLeft(),
offsetBottom = w.height() + tipOffset,
bottom = w.height() + w.scrollTop(),
top = w.scrollTop();
if (tipOffset < top) {
if (tipOffset < 0) {
top = 0;
} else {
top = tipOffset;
}
}
if (offsetBottom > bottom) {
bottom = offsetBottom;
}
return [
el.offset().top < top,
right < el.offset().left + el.outerWidth(),
bottom < el.offset().top + el.outerHeight(),
w.scrollLeft() > el.offset().left
];
},
visible : function (hidden_corners) {
var i = hidden_corners.length;
while (i--) {
if (hidden_corners[i]) {
return false;
}
}
return true;
},
nub_position : function (nub, pos, def) {
if (pos === 'auto') {
nub.addClass(def);
} else {
nub.addClass(pos);
}
},
startTimer : function () {
if (this.settings.$li.length) {
this.settings.automate = setTimeout(function () {
this.hide();
this.show();
this.startTimer();
}.bind(this), this.settings.timer);
} else {
clearTimeout(this.settings.automate);
}
},
end : function (abort) {
if (this.settings.cookie_monster) {
$.cookie(this.settings.cookie_name, 'ridden', {expires : this.settings.cookie_expires, domain : this.settings.cookie_domain});
}
if (this.settings.timer > 0) {
clearTimeout(this.settings.automate);
}
if (this.settings.modal && this.settings.expose) {
this.un_expose();
}
// Unplug keystrokes listener
$(this.scope).off('keyup.joyride')
this.settings.$next_tip.data('closed', true);
this.settings.riding = false;
$('.joyride-modal-bg').hide();
this.settings.$current_tip.hide();
if (typeof abort === 'undefined' || abort === false) {
this.settings.post_step_callback(this.settings.$li.index(), this.settings.$current_tip);
this.settings.post_ride_callback(this.settings.$li.index(), this.settings.$current_tip);
}
$('.joyride-tip-guide').remove();
},
off : function () {
$(this.scope).off('.joyride');
$(window).off('.joyride');
$('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
$('.joyride-tip-guide, .joyride-modal-bg').remove();
clearTimeout(this.settings.automate);
this.settings = {};
},
reflow : function () {}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.equalizer = {
name : 'equalizer',
version : '5.5.2',
settings : {
use_tallest : true,
before_height_change : $.noop,
after_height_change : $.noop,
equalize_on_stack : false,
act_on_hidden_el: false
},
init : function (scope, method, options) {
Foundation.inherit(this, 'image_loaded');
this.bindings(method, options);
this.reflow();
},
events : function () {
this.S(window).off('.equalizer').on('resize.fndtn.equalizer', function (e) {
this.reflow();
}.bind(this));
},
equalize : function (equalizer) {
var isStacked = false,
group = equalizer.data('equalizer'),
settings = equalizer.data(this.attr_name(true)+'-init') || this.settings,
vals,
firstTopOffset;
if (settings.act_on_hidden_el) {
vals = group ? equalizer.find('['+this.attr_name()+'-watch="'+group+'"]') : equalizer.find('['+this.attr_name()+'-watch]');
}
else {
vals = group ? equalizer.find('['+this.attr_name()+'-watch="'+group+'"]:visible') : equalizer.find('['+this.attr_name()+'-watch]:visible');
}
if (vals.length === 0) {
return;
}
settings.before_height_change();
equalizer.trigger('before-height-change.fndth.equalizer');
vals.height('inherit');
if (settings.equalize_on_stack === false) {
firstTopOffset = vals.first().offset().top;
vals.each(function () {
if ($(this).offset().top !== firstTopOffset) {
isStacked = true;
return false;
}
});
if (isStacked) {
return;
}
}
var heights = vals.map(function () { return $(this).outerHeight(false) }).get();
if (settings.use_tallest) {
var max = Math.max.apply(null, heights);
vals.css('height', max);
} else {
var min = Math.min.apply(null, heights);
vals.css('height', min);
}
settings.after_height_change();
equalizer.trigger('after-height-change.fndtn.equalizer');
},
reflow : function () {
var self = this;
this.S('[' + this.attr_name() + ']', this.scope).each(function () {
var $eq_target = $(this),
media_query = $eq_target.data('equalizer-mq'),
ignore_media_query = true;
if (media_query) {
media_query = 'is_' + media_query.replace(/-/g, '_');
if (Foundation.utils.hasOwnProperty(media_query)) {
ignore_media_query = false;
}
}
self.image_loaded(self.S('img', this), function () {
if (ignore_media_query || Foundation.utils[media_query]()) {
self.equalize($eq_target)
} else {
var vals = $eq_target.find('[' + self.attr_name() + '-watch]:visible');
vals.css('height', 'auto');
}
});
});
}
};
})(jQuery, window, window.document);
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.dropdown = {
name : 'dropdown',
version : '5.5.2',
settings : {
active_class : 'open',
disabled_class : 'disabled',
mega_class : 'mega',
align : 'bottom',
is_hover : false,
hover_timeout : 150,
opened : function () {},
closed : function () {}
},
init : function (scope, method, options) {
Foundation.inherit(this, 'throttle');
$.extend(true, this.settings, method, options);
this.bindings(method, options);
},
events : function (scope) {
var self = this,
S = self.S;
S(this.scope)
.off('.dropdown')
.on('click.fndtn.dropdown', '[' + this.attr_name() + ']', function (e) {
var settings = S(this).data(self.attr_name(true) + '-init') || self.settings;
if (!settings.is_hover || Modernizr.touch) {
e.preventDefault();
if (S(this).parent('[data-reveal-id]').length) {
e.stopPropagation();
}
self.toggle($(this));
}
})
.on('mouseenter.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
var $this = S(this),
dropdown,
target;
clearTimeout(self.timeout);
if ($this.data(self.data_attr())) {
dropdown = S('#' + $this.data(self.data_attr()));
target = $this;
} else {
dropdown = $this;
target = S('[' + self.attr_name() + '="' + dropdown.attr('id') + '"]');
}
var settings = target.data(self.attr_name(true) + '-init') || self.settings;
if (S(e.currentTarget).data(self.data_attr()) && settings.is_hover) {
self.closeall.call(self);
}
if (settings.is_hover) {
self.open.apply(self, [dropdown, target]);
}
})
.on('mouseleave.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
var $this = S(this);
var settings;
if ($this.data(self.data_attr())) {
settings = $this.data(self.data_attr(true) + '-init') || self.settings;
} else {
var target = S('[' + self.attr_name() + '="' + S(this).attr('id') + '"]'),
settings = target.data(self.attr_name(true) + '-init') || self.settings;
}
self.timeout = setTimeout(function () {
if ($this.data(self.data_attr())) {
if (settings.is_hover) {
self.close.call(self, S('#' + $this.data(self.data_attr())));
}
} else {
if (settings.is_hover) {
self.close.call(self, $this);
}
}
}.bind(this), settings.hover_timeout);
})
.on('click.fndtn.dropdown', function (e) {
var parent = S(e.target).closest('[' + self.attr_name() + '-content]');
var links = parent.find('a');
if (links.length > 0 && parent.attr('aria-autoclose') !== 'false') {
self.close.call(self, S('[' + self.attr_name() + '-content]'));
}
if (e.target !== document && !$.contains(document.documentElement, e.target)) {
return;
}
if (S(e.target).closest('[' + self.attr_name() + ']').length > 0) {
return;
}
if (!(S(e.target).data('revealId')) &&
(parent.length > 0 && (S(e.target).is('[' + self.attr_name() + '-content]') ||
$.contains(parent.first()[0], e.target)))) {
e.stopPropagation();
return;
}
self.close.call(self, S('[' + self.attr_name() + '-content]'));
})
.on('opened.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
self.settings.opened.call(this);
})
.on('closed.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
self.settings.closed.call(this);
});
S(window)
.off('.dropdown')
.on('resize.fndtn.dropdown', self.throttle(function () {
self.resize.call(self);
}, 50));
this.resize();
},
close : function (dropdown) {
var self = this;
dropdown.each(function (idx) {
var original_target = $('[' + self.attr_name() + '=' + dropdown[idx].id + ']') || $('aria-controls=' + dropdown[idx].id + ']');
original_target.attr('aria-expanded', 'false');
if (self.S(this).hasClass(self.settings.active_class)) {
self.S(this)
.css(Foundation.rtl ? 'right' : 'left', '-99999px')
.attr('aria-hidden', 'true')
.removeClass(self.settings.active_class)
.prev('[' + self.attr_name() + ']')
.removeClass(self.settings.active_class)
.removeData('target');
self.S(this).trigger('closed.fndtn.dropdown', [dropdown]);
}
});
dropdown.removeClass('f-open-' + this.attr_name(true));
},
closeall : function () {
var self = this;
$.each(self.S('.f-open-' + this.attr_name(true)), function () {
self.close.call(self, self.S(this));
});
},
open : function (dropdown, target) {
this
.css(dropdown
.addClass(this.settings.active_class), target);
dropdown.prev('[' + this.attr_name() + ']').addClass(this.settings.active_class);
dropdown.data('target', target.get(0)).trigger('opened.fndtn.dropdown', [dropdown, target]);
dropdown.attr('aria-hidden', 'false');
target.attr('aria-expanded', 'true');
dropdown.focus();
dropdown.addClass('f-open-' + this.attr_name(true));
},
data_attr : function () {
if (this.namespace.length > 0) {
return this.namespace + '-' + this.name;
}
return this.name;
},
toggle : function (target) {
if (target.hasClass(this.settings.disabled_class)) {
return;
}
var dropdown = this.S('#' + target.data(this.data_attr()));
if (dropdown.length === 0) {
// No dropdown found, not continuing
return;
}
this.close.call(this, this.S('[' + this.attr_name() + '-content]').not(dropdown));
if (dropdown.hasClass(this.settings.active_class)) {
this.close.call(this, dropdown);
if (dropdown.data('target') !== target.get(0)) {
this.open.call(this, dropdown, target);
}
} else {
this.open.call(this, dropdown, target);
}
},
resize : function () {
var dropdown = this.S('[' + this.attr_name() + '-content].open');
var target = $(dropdown.data("target"));
if (dropdown.length && target.length) {
this.css(dropdown, target);
}
},
css : function (dropdown, target) {
var left_offset = Math.max((target.width() - dropdown.width()) / 2, 8),
settings = target.data(this.attr_name(true) + '-init') || this.settings,
parentOverflow = dropdown.parent().css('overflow-y') || dropdown.parent().css('overflow');
this.clear_idx();
if (this.small()) {
var p = this.dirs.bottom.call(dropdown, target, settings);
dropdown.attr('style', '').removeClass('drop-left drop-right drop-top').css({
position : 'absolute',
width : '95%',
'max-width' : 'none',
top : p.top
});
dropdown.css(Foundation.rtl ? 'right' : 'left', left_offset);
}
// detect if dropdown is in an overflow container
else if (parentOverflow !== 'visible') {
var offset = target[0].offsetTop + target[0].offsetHeight;
dropdown.attr('style', '').css({
position : 'absolute',
top : offset
});
dropdown.css(Foundation.rtl ? 'right' : 'left', left_offset);
}
else {
this.style(dropdown, target, settings);
}
return dropdown;
},
style : function (dropdown, target, settings) {
var css = $.extend({position : 'absolute'},
this.dirs[settings.align].call(dropdown, target, settings));
dropdown.attr('style', '').css(css);
},
// return CSS property object
// `this` is the dropdown
dirs : {
// Calculate target offset
_base : function (t) {
var o_p = this.offsetParent(),
o = o_p.offset(),
p = t.offset();
p.top -= o.top;
p.left -= o.left;
//set some flags on the p object to pass along
p.missRight = false;
p.missTop = false;
p.missLeft = false;
p.leftRightFlag = false;
//lets see if the panel will be off the screen
//get the actual width of the page and store it
var actualBodyWidth;
if (document.getElementsByClassName('row')[0]) {
actualBodyWidth = document.getElementsByClassName('row')[0].clientWidth;
} else {
actualBodyWidth = window.innerWidth;
}
var actualMarginWidth = (window.innerWidth - actualBodyWidth) / 2;
var actualBoundary = actualBodyWidth;
if (!this.hasClass('mega')) {
//miss top
if (t.offset().top <= this.outerHeight()) {
p.missTop = true;
actualBoundary = window.innerWidth - actualMarginWidth;
p.leftRightFlag = true;
}
//miss right
if (t.offset().left + this.outerWidth() > t.offset().left + actualMarginWidth && t.offset().left - actualMarginWidth > this.outerWidth()) {
p.missRight = true;
p.missLeft = false;
}
//miss left
if (t.offset().left - this.outerWidth() <= 0) {
p.missLeft = true;
p.missRight = false;
}
}
return p;
},
top : function (t, s) {
var self = Foundation.libs.dropdown,
p = self.dirs._base.call(this, t);
this.addClass('drop-top');
if (p.missTop == true) {
p.top = p.top + t.outerHeight() + this.outerHeight();
this.removeClass('drop-top');
}
if (p.missRight == true) {
p.left = p.left - this.outerWidth() + t.outerWidth();
}
if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
self.adjust_pip(this, t, s, p);
}
if (Foundation.rtl) {
return {left : p.left - this.outerWidth() + t.outerWidth(),
top : p.top - this.outerHeight()};
}
return {left : p.left, top : p.top - this.outerHeight()};
},
bottom : function (t, s) {
var self = Foundation.libs.dropdown,
p = self.dirs._base.call(this, t);
if (p.missRight == true) {
p.left = p.left - this.outerWidth() + t.outerWidth();
}
if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
self.adjust_pip(this, t, s, p);
}
if (self.rtl) {
return {left : p.left - this.outerWidth() + t.outerWidth(), top : p.top + t.outerHeight()};
}
return {left : p.left, top : p.top + t.outerHeight()};
},
left : function (t, s) {
var p = Foundation.libs.dropdown.dirs._base.call(this, t);
this.addClass('drop-left');
if (p.missLeft == true) {
p.left = p.left + this.outerWidth();
p.top = p.top + t.outerHeight();
this.removeClass('drop-left');
}
return {left : p.left - this.outerWidth(), top : p.top};
},
right : function (t, s) {
var p = Foundation.libs.dropdown.dirs._base.call(this, t);
this.addClass('drop-right');
if (p.missRight == true) {
p.left = p.left - this.outerWidth();
p.top = p.top + t.outerHeight();
this.removeClass('drop-right');
} else {
p.triggeredRight = true;
}
var self = Foundation.libs.dropdown;
if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
self.adjust_pip(this, t, s, p);
}
return {left : p.left + t.outerWidth(), top : p.top};
}
},
// Insert rule to style psuedo elements
adjust_pip : function (dropdown, target, settings, position) {
var sheet = Foundation.stylesheet,
pip_offset_base = 8;
if (dropdown.hasClass(settings.mega_class)) {
pip_offset_base = position.left + (target.outerWidth() / 2) - 8;
} else if (this.small()) {
pip_offset_base += position.left - 8;
}
this.rule_idx = sheet.cssRules.length;
//default
var sel_before = '.f-dropdown.open:before',
sel_after = '.f-dropdown.open:after',
css_before = 'left: ' + pip_offset_base + 'px;',
css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
if (position.missRight == true) {
pip_offset_base = dropdown.outerWidth() - 23;
sel_before = '.f-dropdown.open:before',
sel_after = '.f-dropdown.open:after',
css_before = 'left: ' + pip_offset_base + 'px;',
css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
}
//just a case where right is fired, but its not missing right
if (position.triggeredRight == true) {
sel_before = '.f-dropdown.open:before',
sel_after = '.f-dropdown.open:after',
css_before = 'left:-12px;',
css_after = 'left:-14px;';
}
if (sheet.insertRule) {
sheet.insertRule([sel_before, '{', css_before, '}'].join(' '), this.rule_idx);
sheet.insertRule([sel_after, '{', css_after, '}'].join(' '), this.rule_idx + 1);
} else {
sheet.addRule(sel_before, css_before, this.rule_idx);
sheet.addRule(sel_after, css_after, this.rule_idx + 1);
}
},
// Remove old dropdown rule index
clear_idx : function () {
var sheet = Foundation.stylesheet;
if (typeof this.rule_idx !== 'undefined') {
sheet.deleteRule(this.rule_idx);
sheet.deleteRule(this.rule_idx);
delete this.rule_idx;
}
},
small : function () {
return matchMedia(Foundation.media_queries.small).matches &&
!matchMedia(Foundation.media_queries.medium).matches;
},
off : function () {
this.S(this.scope).off('.fndtn.dropdown');
this.S('html, body').off('.fndtn.dropdown');
this.S(window).off('.fndtn.dropdown');
this.S('[data-dropdown-content]').off('.fndtn.dropdown');
},
reflow : function () {}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.clearing = {
name : 'clearing',
version : '5.5.2',
settings : {
templates : {
viewing : '<a href="#" class="clearing-close">×</a>' +
'<div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
'<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>' +
'<a href="#" class="clearing-main-next"><span></span></a></div>' +
'<img class="clearing-preload-next" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
'<img class="clearing-preload-prev" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'
},
// comma delimited list of selectors that, on click, will close clearing,
// add 'div.clearing-blackout, div.visible-img' to close on background click
close_selectors : '.clearing-close, div.clearing-blackout',
// Default to the entire li element.
open_selectors : '',
// Image will be skipped in carousel.
skip_selector : '',
touch_label : '',
// event initializers and locks
init : false,
locked : false
},
init : function (scope, method, options) {
var self = this;
Foundation.inherit(this, 'throttle image_loaded');
this.bindings(method, options);
if (self.S(this.scope).is('[' + this.attr_name() + ']')) {
this.assemble(self.S('li', this.scope));
} else {
self.S('[' + this.attr_name() + ']', this.scope).each(function () {
self.assemble(self.S('li', this));
});
}
},
events : function (scope) {
var self = this,
S = self.S,
$scroll_container = $('.scroll-container');
if ($scroll_container.length > 0) {
this.scope = $scroll_container;
}
S(this.scope)
.off('.clearing')
.on('click.fndtn.clearing', 'ul[' + this.attr_name() + '] li ' + this.settings.open_selectors,
function (e, current, target) {
var current = current || S(this),
target = target || current,
next = current.next('li'),
settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init'),
image = S(e.target);
e.preventDefault();
if (!settings) {
self.init();
settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
}
// if clearing is open and the current image is
// clicked, go to the next image in sequence
if (target.hasClass('visible') &&
current[0] === target[0] &&
next.length > 0 && self.is_open(current)) {
target = next;
image = S('img', target);
}
// set current and target to the clicked li if not otherwise defined.
self.open(image, current, target);
self.update_paddles(target);
})
.on('click.fndtn.clearing', '.clearing-main-next',
function (e) { self.nav(e, 'next') })
.on('click.fndtn.clearing', '.clearing-main-prev',
function (e) { self.nav(e, 'prev') })
.on('click.fndtn.clearing', this.settings.close_selectors,
function (e) { Foundation.libs.clearing.close(e, this) });
$(document).on('keydown.fndtn.clearing',
function (e) { self.keydown(e) });
S(window).off('.clearing').on('resize.fndtn.clearing',
function () { self.resize() });
this.swipe_events(scope);
},
swipe_events : function (scope) {
var self = this,
S = self.S;
S(this.scope)
.on('touchstart.fndtn.clearing', '.visible-img', function (e) {
if (!e.touches) { e = e.originalEvent; }
var data = {
start_page_x : e.touches[0].pageX,
start_page_y : e.touches[0].pageY,
start_time : (new Date()).getTime(),
delta_x : 0,
is_scrolling : undefined
};
S(this).data('swipe-transition', data);
e.stopPropagation();
})
.on('touchmove.fndtn.clearing', '.visible-img', function (e) {
if (!e.touches) {
e = e.originalEvent;
}
// Ignore pinch/zoom events
if (e.touches.length > 1 || e.scale && e.scale !== 1) {
return;
}
var data = S(this).data('swipe-transition');
if (typeof data === 'undefined') {
data = {};
}
data.delta_x = e.touches[0].pageX - data.start_page_x;
if (Foundation.rtl) {
data.delta_x = -data.delta_x;
}
if (typeof data.is_scrolling === 'undefined') {
data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
}
if (!data.is_scrolling && !data.active) {
e.preventDefault();
var direction = (data.delta_x < 0) ? 'next' : 'prev';
data.active = true;
self.nav(e, direction);
}
})
.on('touchend.fndtn.clearing', '.visible-img', function (e) {
S(this).data('swipe-transition', {});
e.stopPropagation();
});
},
assemble : function ($li) {
var $el = $li.parent();
if ($el.parent().hasClass('carousel')) {
return;
}
$el.after('<div id="foundationClearingHolder"></div>');
var grid = $el.detach(),
grid_outerHTML = '';
if (grid[0] == null) {
return;
} else {
grid_outerHTML = grid[0].outerHTML;
}
var holder = this.S('#foundationClearingHolder'),
settings = $el.data(this.attr_name(true) + '-init'),
data = {
grid : '<div class="carousel">' + grid_outerHTML + '</div>',
viewing : settings.templates.viewing
},
wrapper = '<div class="clearing-assembled"><div>' + data.viewing +
data.grid + '</div></div>',
touch_label = this.settings.touch_label;
if (Modernizr.touch) {
wrapper = $(wrapper).find('.clearing-touch-label').html(touch_label).end();
}
holder.after(wrapper).remove();
},
open : function ($image, current, target) {
var self = this,
body = $(document.body),
root = target.closest('.clearing-assembled'),
container = self.S('div', root).first(),
visible_image = self.S('.visible-img', container),
image = self.S('img', visible_image).not($image),
label = self.S('.clearing-touch-label', container),
error = false,
loaded = {};
// Event to disable scrolling on touch devices when Clearing is activated
$('body').on('touchmove', function (e) {
e.preventDefault();
});
image.error(function () {
error = true;
});
function startLoad() {
setTimeout(function () {
this.image_loaded(image, function () {
if (image.outerWidth() === 1 && !error) {
startLoad.call(this);
} else {
cb.call(this, image);
}
}.bind(this));
}.bind(this), 100);
}
function cb (image) {
var $image = $(image);
$image.css('visibility', 'visible');
$image.trigger('imageVisible');
// toggle the gallery
body.css('overflow', 'hidden');
root.addClass('clearing-blackout');
container.addClass('clearing-container');
visible_image.show();
this.fix_height(target)
.caption(self.S('.clearing-caption', visible_image), self.S('img', target))
.center_and_label(image, label)
.shift(current, target, function () {
target.closest('li').siblings().removeClass('visible');
target.closest('li').addClass('visible');
});
visible_image.trigger('opened.fndtn.clearing')
}
if (!this.locked()) {
visible_image.trigger('open.fndtn.clearing');
// set the image to the selected thumbnail
loaded = this.load($image);
if (loaded.interchange) {
image
.attr('data-interchange', loaded.interchange)
.foundation('interchange', 'reflow');
} else {
image
.attr('src', loaded.src)
.attr('data-interchange', '');
}
image.css('visibility', 'hidden');
startLoad.call(this);
}
},
close : function (e, el) {
e.preventDefault();
var root = (function (target) {
if (/blackout/.test(target.selector)) {
return target;
} else {
return target.closest('.clearing-blackout');
}
}($(el))),
body = $(document.body), container, visible_image;
if (el === e.target && root) {
body.css('overflow', '');
container = $('div', root).first();
visible_image = $('.visible-img', container);
visible_image.trigger('close.fndtn.clearing');
this.settings.prev_index = 0;
$('ul[' + this.attr_name() + ']', root)
.attr('style', '').closest('.clearing-blackout')
.removeClass('clearing-blackout');
container.removeClass('clearing-container');
visible_image.hide();
visible_image.trigger('closed.fndtn.clearing');
}
// Event to re-enable scrolling on touch devices
$('body').off('touchmove');
return false;
},
is_open : function (current) {
return current.parent().prop('style').length > 0;
},
keydown : function (e) {
var clearing = $('.clearing-blackout ul[' + this.attr_name() + ']'),
NEXT_KEY = this.rtl ? 37 : 39,
PREV_KEY = this.rtl ? 39 : 37,
ESC_KEY = 27;
if (e.which === NEXT_KEY) {
this.go(clearing, 'next');
}
if (e.which === PREV_KEY) {
this.go(clearing, 'prev');
}
if (e.which === ESC_KEY) {
this.S('a.clearing-close').trigger('click.fndtn.clearing');
}
},
nav : function (e, direction) {
var clearing = $('ul[' + this.attr_name() + ']', '.clearing-blackout');
e.preventDefault();
this.go(clearing, direction);
},
resize : function () {
var image = $('img', '.clearing-blackout .visible-img'),
label = $('.clearing-touch-label', '.clearing-blackout');
if (image.length) {
this.center_and_label(image, label);
image.trigger('resized.fndtn.clearing')
}
},
// visual adjustments
fix_height : function (target) {
var lis = target.parent().children(),
self = this;
lis.each(function () {
var li = self.S(this),
image = li.find('img');
if (li.height() > image.outerHeight()) {
li.addClass('fix-height');
}
})
.closest('ul')
.width(lis.length * 100 + '%');
return this;
},
update_paddles : function (target) {
target = target.closest('li');
var visible_image = target
.closest('.carousel')
.siblings('.visible-img');
if (target.next().length > 0) {
this.S('.clearing-main-next', visible_image).removeClass('disabled');
} else {
this.S('.clearing-main-next', visible_image).addClass('disabled');
}
if (target.prev().length > 0) {
this.S('.clearing-main-prev', visible_image).removeClass('disabled');
} else {
this.S('.clearing-main-prev', visible_image).addClass('disabled');
}
},
center_and_label : function (target, label) {
if (!this.rtl && label.length > 0) {
label.css({
marginLeft : -(label.outerWidth() / 2),
marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10
});
} else {
label.css({
marginRight : -(label.outerWidth() / 2),
marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10,
left: 'auto',
right: '50%'
});
}
return this;
},
// image loading and preloading
load : function ($image) {
var href,
interchange,
closest_a;
if ($image[0].nodeName === 'A') {
href = $image.attr('href');
interchange = $image.data('clearing-interchange');
} else {
closest_a = $image.closest('a');
href = closest_a.attr('href');
interchange = closest_a.data('clearing-interchange');
}
this.preload($image);
return {
'src': href ? href : $image.attr('src'),
'interchange': href ? interchange : $image.data('clearing-interchange')
}
},
preload : function ($image) {
this
.img($image.closest('li').next(), 'next')
.img($image.closest('li').prev(), 'prev');
},
img : function (img, sibling_type) {
if (img.length) {
var preload_img = $('.clearing-preload-' + sibling_type),
new_a = this.S('a', img),
src,
interchange,
image;
if (new_a.length) {
src = new_a.attr('href');
interchange = new_a.data('clearing-interchange');
} else {
image = this.S('img', img);
src = image.attr('src');
interchange = image.data('clearing-interchange');
}
if (interchange) {
preload_img.attr('data-interchange', interchange);
} else {
preload_img.attr('src', src);
preload_img.attr('data-interchange', '');
}
}
return this;
},
// image caption
caption : function (container, $image) {
var caption = $image.attr('data-caption');
if (caption) {
container
.html(caption)
.show();
} else {
container
.text('')
.hide();
}
return this;
},
// directional methods
go : function ($ul, direction) {
var current = this.S('.visible', $ul),
target = current[direction]();
// Check for skip selector.
if (this.settings.skip_selector && target.find(this.settings.skip_selector).length != 0) {
target = target[direction]();
}
if (target.length) {
this.S('img', target)
.trigger('click.fndtn.clearing', [current, target])
.trigger('change.fndtn.clearing');
}
},
shift : function (current, target, callback) {
var clearing = target.parent(),
old_index = this.settings.prev_index || target.index(),
direction = this.direction(clearing, current, target),
dir = this.rtl ? 'right' : 'left',
left = parseInt(clearing.css('left'), 10),
width = target.outerWidth(),
skip_shift;
var dir_obj = {};
// we use jQuery animate instead of CSS transitions because we
// need a callback to unlock the next animation
// needs support for RTL **
if (target.index() !== old_index && !/skip/.test(direction)) {
if (/left/.test(direction)) {
this.lock();
dir_obj[dir] = left + width;
clearing.animate(dir_obj, 300, this.unlock());
} else if (/right/.test(direction)) {
this.lock();
dir_obj[dir] = left - width;
clearing.animate(dir_obj, 300, this.unlock());
}
} else if (/skip/.test(direction)) {
// the target image is not adjacent to the current image, so
// do we scroll right or not
skip_shift = target.index() - this.settings.up_count;
this.lock();
if (skip_shift > 0) {
dir_obj[dir] = -(skip_shift * width);
clearing.animate(dir_obj, 300, this.unlock());
} else {
dir_obj[dir] = 0;
clearing.animate(dir_obj, 300, this.unlock());
}
}
callback();
},
direction : function ($el, current, target) {
var lis = this.S('li', $el),
li_width = lis.outerWidth() + (lis.outerWidth() / 4),
up_count = Math.floor(this.S('.clearing-container').outerWidth() / li_width) - 1,
target_index = lis.index(target),
response;
this.settings.up_count = up_count;
if (this.adjacent(this.settings.prev_index, target_index)) {
if ((target_index > up_count) && target_index > this.settings.prev_index) {
response = 'right';
} else if ((target_index > up_count - 1) && target_index <= this.settings.prev_index) {
response = 'left';
} else {
response = false;
}
} else {
response = 'skip';
}
this.settings.prev_index = target_index;
return response;
},
adjacent : function (current_index, target_index) {
for (var i = target_index + 1; i >= target_index - 1; i--) {
if (i === current_index) {
return true;
}
}
return false;
},
// lock management
lock : function () {
this.settings.locked = true;
},
unlock : function () {
this.settings.locked = false;
},
locked : function () {
return this.settings.locked;
},
off : function () {
this.S(this.scope).off('.fndtn.clearing');
this.S(window).off('.fndtn.clearing');
},
reflow : function () {
this.init();
}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
var noop = function () {};
var Orbit = function (el, settings) {
// Don't reinitialize plugin
if (el.hasClass(settings.slides_container_class)) {
return this;
}
var self = this,
container,
slides_container = el,
number_container,
bullets_container,
timer_container,
idx = 0,
animate,
timer,
locked = false,
adjust_height_after = false;
self.slides = function () {
return slides_container.children(settings.slide_selector);
};
self.slides().first().addClass(settings.active_slide_class);
self.update_slide_number = function (index) {
if (settings.slide_number) {
number_container.find('span:first').text(parseInt(index) + 1);
number_container.find('span:last').text(self.slides().length);
}
if (settings.bullets) {
bullets_container.children().removeClass(settings.bullets_active_class);
$(bullets_container.children().get(index)).addClass(settings.bullets_active_class);
}
};
self.update_active_link = function (index) {
var link = $('[data-orbit-link="' + self.slides().eq(index).attr('data-orbit-slide') + '"]');
link.siblings().removeClass(settings.bullets_active_class);
link.addClass(settings.bullets_active_class);
};
self.build_markup = function () {
slides_container.wrap('<div class="' + settings.container_class + '"></div>');
container = slides_container.parent();
slides_container.addClass(settings.slides_container_class);
if (settings.stack_on_small) {
container.addClass(settings.stack_on_small_class);
}
if (settings.navigation_arrows) {
container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
}
if (settings.timer) {
timer_container = $('<div>').addClass(settings.timer_container_class);
timer_container.append('<span>');
timer_container.append($('<div>').addClass(settings.timer_progress_class));
timer_container.addClass(settings.timer_paused_class);
container.append(timer_container);
}
if (settings.slide_number) {
number_container = $('<div>').addClass(settings.slide_number_class);
number_container.append('<span></span> ' + settings.slide_number_text + ' <span></span>');
container.append(number_container);
}
if (settings.bullets) {
bullets_container = $('<ol>').addClass(settings.bullets_container_class);
container.append(bullets_container);
bullets_container.wrap('<div class="orbit-bullets-container"></div>');
self.slides().each(function (idx, el) {
var bullet = $('<li>').attr('data-orbit-slide', idx).on('click', self.link_bullet);;
bullets_container.append(bullet);
});
}
};
self._goto = function (next_idx, start_timer) {
// if (locked) {return false;}
if (next_idx === idx) {return false;}
if (typeof timer === 'object') {timer.restart();}
var slides = self.slides();
var dir = 'next';
locked = true;
if (next_idx < idx) {dir = 'prev';}
if (next_idx >= slides.length) {
if (!settings.circular) {
return false;
}
next_idx = 0;
} else if (next_idx < 0) {
if (!settings.circular) {
return false;
}
next_idx = slides.length - 1;
}
var current = $(slides.get(idx));
var next = $(slides.get(next_idx));
current.css('zIndex', 2);
current.removeClass(settings.active_slide_class);
next.css('zIndex', 4).addClass(settings.active_slide_class);
slides_container.trigger('before-slide-change.fndtn.orbit');
settings.before_slide_change();
self.update_active_link(next_idx);
var callback = function () {
var unlock = function () {
idx = next_idx;
locked = false;
if (start_timer === true) {timer = self.create_timer(); timer.start();}
self.update_slide_number(idx);
slides_container.trigger('after-slide-change.fndtn.orbit', [{slide_number : idx, total_slides : slides.length}]);
settings.after_slide_change(idx, slides.length);
};
if (slides_container.outerHeight() != next.outerHeight() && settings.variable_height) {
slides_container.animate({'height': next.outerHeight()}, 250, 'linear', unlock);
} else {
unlock();
}
};
if (slides.length === 1) {callback(); return false;}
var start_animation = function () {
if (dir === 'next') {animate.next(current, next, callback);}
if (dir === 'prev') {animate.prev(current, next, callback);}
};
if (next.outerHeight() > slides_container.outerHeight() && settings.variable_height) {
slides_container.animate({'height': next.outerHeight()}, 250, 'linear', start_animation);
} else {
start_animation();
}
};
self.next = function (e) {
e.stopImmediatePropagation();
e.preventDefault();
self._goto(idx + 1);
};
self.prev = function (e) {
e.stopImmediatePropagation();
e.preventDefault();
self._goto(idx - 1);
};
self.link_custom = function (e) {
e.preventDefault();
var link = $(this).attr('data-orbit-link');
if ((typeof link === 'string') && (link = $.trim(link)) != '') {
var slide = container.find('[data-orbit-slide=' + link + ']');
if (slide.index() != -1) {self._goto(slide.index());}
}
};
self.link_bullet = function (e) {
var index = $(this).attr('data-orbit-slide');
if ((typeof index === 'string') && (index = $.trim(index)) != '') {
if (isNaN(parseInt(index))) {
var slide = container.find('[data-orbit-slide=' + index + ']');
if (slide.index() != -1) {self._goto(slide.index() + 1);}
} else {
self._goto(parseInt(index));
}
}
}
self.timer_callback = function () {
self._goto(idx + 1, true);
}
self.compute_dimensions = function () {
var current = $(self.slides().get(idx));
var h = current.outerHeight();
if (!settings.variable_height) {
self.slides().each(function(){
if ($(this).outerHeight() > h) { h = $(this).outerHeight(); }
});
}
slides_container.height(h);
};
self.create_timer = function () {
var t = new Timer(
container.find('.' + settings.timer_container_class),
settings,
self.timer_callback
);
return t;
};
self.stop_timer = function () {
if (typeof timer === 'object') {
timer.stop();
}
};
self.toggle_timer = function () {
var t = container.find('.' + settings.timer_container_class);
if (t.hasClass(settings.timer_paused_class)) {
if (typeof timer === 'undefined') {timer = self.create_timer();}
timer.start();
} else {
if (typeof timer === 'object') {timer.stop();}
}
};
self.init = function () {
self.build_markup();
if (settings.timer) {
timer = self.create_timer();
Foundation.utils.image_loaded(this.slides().children('img'), timer.start);
}
animate = new FadeAnimation(settings, slides_container);
if (settings.animation === 'slide') {
animate = new SlideAnimation(settings, slides_container);
}
container.on('click', '.' + settings.next_class, self.next);
container.on('click', '.' + settings.prev_class, self.prev);
if (settings.next_on_click) {
container.on('click', '.' + settings.slides_container_class + ' [data-orbit-slide]', self.link_bullet);
}
container.on('click', self.toggle_timer);
if (settings.swipe) {
container.on('touchstart.fndtn.orbit', function (e) {
if (!e.touches) {e = e.originalEvent;}
var data = {
start_page_x : e.touches[0].pageX,
start_page_y : e.touches[0].pageY,
start_time : (new Date()).getTime(),
delta_x : 0,
is_scrolling : undefined
};
container.data('swipe-transition', data);
e.stopPropagation();
})
.on('touchmove.fndtn.orbit', function (e) {
if (!e.touches) {
e = e.originalEvent;
}
// Ignore pinch/zoom events
if (e.touches.length > 1 || e.scale && e.scale !== 1) {
return;
}
var data = container.data('swipe-transition');
if (typeof data === 'undefined') {data = {};}
data.delta_x = e.touches[0].pageX - data.start_page_x;
if ( typeof data.is_scrolling === 'undefined') {
data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
}
if (!data.is_scrolling && !data.active) {
e.preventDefault();
var direction = (data.delta_x < 0) ? (idx + 1) : (idx - 1);
data.active = true;
self._goto(direction);
}
})
.on('touchend.fndtn.orbit', function (e) {
container.data('swipe-transition', {});
e.stopPropagation();
})
}
container.on('mouseenter.fndtn.orbit', function (e) {
if (settings.timer && settings.pause_on_hover) {
self.stop_timer();
}
})
.on('mouseleave.fndtn.orbit', function (e) {
if (settings.timer && settings.resume_on_mouseout) {
timer.start();
}
});
$(document).on('click', '[data-orbit-link]', self.link_custom);
$(window).on('load resize', self.compute_dimensions);
Foundation.utils.image_loaded(this.slides().children('img'), self.compute_dimensions);
Foundation.utils.image_loaded(this.slides().children('img'), function () {
container.prev('.' + settings.preloader_class).css('display', 'none');
self.update_slide_number(0);
self.update_active_link(0);
slides_container.trigger('ready.fndtn.orbit');
});
};
self.init();
};
var Timer = function (el, settings, callback) {
var self = this,
duration = settings.timer_speed,
progress = el.find('.' + settings.timer_progress_class),
start,
timeout,
left = -1;
this.update_progress = function (w) {
var new_progress = progress.clone();
new_progress.attr('style', '');
new_progress.css('width', w + '%');
progress.replaceWith(new_progress);
progress = new_progress;
};
this.restart = function () {
clearTimeout(timeout);
el.addClass(settings.timer_paused_class);
left = -1;
self.update_progress(0);
};
this.start = function () {
if (!el.hasClass(settings.timer_paused_class)) {return true;}
left = (left === -1) ? duration : left;
el.removeClass(settings.timer_paused_class);
start = new Date().getTime();
progress.animate({'width' : '100%'}, left, 'linear');
timeout = setTimeout(function () {
self.restart();
callback();
}, left);
el.trigger('timer-started.fndtn.orbit')
};
this.stop = function () {
if (el.hasClass(settings.timer_paused_class)) {return true;}
clearTimeout(timeout);
el.addClass(settings.timer_paused_class);
var end = new Date().getTime();
left = left - (end - start);
var w = 100 - ((left / duration) * 100);
self.update_progress(w);
el.trigger('timer-stopped.fndtn.orbit');
};
};
var SlideAnimation = function (settings, container) {
var duration = settings.animation_speed;
var is_rtl = ($('html[dir=rtl]').length === 1);
var margin = is_rtl ? 'marginRight' : 'marginLeft';
var animMargin = {};
animMargin[margin] = '0%';
this.next = function (current, next, callback) {
current.animate({marginLeft : '-100%'}, duration);
next.animate(animMargin, duration, function () {
current.css(margin, '100%');
callback();
});
};
this.prev = function (current, prev, callback) {
current.animate({marginLeft : '100%'}, duration);
prev.css(margin, '-100%');
prev.animate(animMargin, duration, function () {
current.css(margin, '100%');
callback();
});
};
};
var FadeAnimation = function (settings, container) {
var duration = settings.animation_speed;
var is_rtl = ($('html[dir=rtl]').length === 1);
var margin = is_rtl ? 'marginRight' : 'marginLeft';
this.next = function (current, next, callback) {
next.css({'margin' : '0%', 'opacity' : '0.01'});
next.animate({'opacity' :'1'}, duration, 'linear', function () {
current.css('margin', '100%');
callback();
});
};
this.prev = function (current, prev, callback) {
prev.css({'margin' : '0%', 'opacity' : '0.01'});
prev.animate({'opacity' : '1'}, duration, 'linear', function () {
current.css('margin', '100%');
callback();
});
};
};
Foundation.libs = Foundation.libs || {};
Foundation.libs.orbit = {
name : 'orbit',
version : '5.5.2',
settings : {
animation : 'slide',
timer_speed : 10000,
pause_on_hover : true,
resume_on_mouseout : false,
next_on_click : true,
animation_speed : 500,
stack_on_small : false,
navigation_arrows : true,
slide_number : true,
slide_number_text : 'of',
container_class : 'orbit-container',
stack_on_small_class : 'orbit-stack-on-small',
next_class : 'orbit-next',
prev_class : 'orbit-prev',
timer_container_class : 'orbit-timer',
timer_paused_class : 'paused',
timer_progress_class : 'orbit-progress',
slides_container_class : 'orbit-slides-container',
preloader_class : 'preloader',
slide_selector : '*',
bullets_container_class : 'orbit-bullets',
bullets_active_class : 'active',
slide_number_class : 'orbit-slide-number',
caption_class : 'orbit-caption',
active_slide_class : 'active',
orbit_transition_class : 'orbit-transitioning',
bullets : true,
circular : true,
timer : true,
variable_height : false,
swipe : true,
before_slide_change : noop,
after_slide_change : noop
},
init : function (scope, method, options) {
var self = this;
this.bindings(method, options);
},
events : function (instance) {
var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
this.S(instance).data(this.name + '-instance', orbit_instance);
},
reflow : function () {
var self = this;
if (self.S(self.scope).is('[data-orbit]')) {
var $el = self.S(self.scope);
var instance = $el.data(self.name + '-instance');
instance.compute_dimensions();
} else {
self.S('[data-orbit]', self.scope).each(function (idx, el) {
var $el = self.S(el);
var opts = self.data_options($el);
var instance = $el.data(self.name + '-instance');
instance.compute_dimensions();
});
}
}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.offcanvas = {
name : 'offcanvas',
version : '5.5.2',
settings : {
open_method : 'move',
close_on_click : false
},
init : function (scope, method, options) {
this.bindings(method, options);
},
events : function () {
var self = this,
S = self.S,
move_class = '',
right_postfix = '',
left_postfix = '';
if (this.settings.open_method === 'move') {
move_class = 'move-';
right_postfix = 'right';
left_postfix = 'left';
} else if (this.settings.open_method === 'overlap_single') {
move_class = 'offcanvas-overlap-';
right_postfix = 'right';
left_postfix = 'left';
} else if (this.settings.open_method === 'overlap') {
move_class = 'offcanvas-overlap';
}
S(this.scope).off('.offcanvas')
.on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
self.click_toggle_class(e, move_class + right_postfix);
if (self.settings.open_method !== 'overlap') {
S('.left-submenu').removeClass(move_class + right_postfix);
}
$('.left-off-canvas-toggle').attr('aria-expanded', 'true');
})
.on('click.fndtn.offcanvas', '.left-off-canvas-menu a', function (e) {
var settings = self.get_settings(e);
var parent = S(this).parent();
if (settings.close_on_click && !parent.hasClass('has-submenu') && !parent.hasClass('back')) {
self.hide.call(self, move_class + right_postfix, self.get_wrapper(e));
parent.parent().removeClass(move_class + right_postfix);
} else if (S(this).parent().hasClass('has-submenu')) {
e.preventDefault();
S(this).siblings('.left-submenu').toggleClass(move_class + right_postfix);
} else if (parent.hasClass('back')) {
e.preventDefault();
parent.parent().removeClass(move_class + right_postfix);
}
$('.left-off-canvas-toggle').attr('aria-expanded', 'true');
})
.on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
self.click_toggle_class(e, move_class + left_postfix);
if (self.settings.open_method !== 'overlap') {
S('.right-submenu').removeClass(move_class + left_postfix);
}
$('.right-off-canvas-toggle').attr('aria-expanded', 'true');
})
.on('click.fndtn.offcanvas', '.right-off-canvas-menu a', function (e) {
var settings = self.get_settings(e);
var parent = S(this).parent();
if (settings.close_on_click && !parent.hasClass('has-submenu') && !parent.hasClass('back')) {
self.hide.call(self, move_class + left_postfix, self.get_wrapper(e));
parent.parent().removeClass(move_class + left_postfix);
} else if (S(this).parent().hasClass('has-submenu')) {
e.preventDefault();
S(this).siblings('.right-submenu').toggleClass(move_class + left_postfix);
} else if (parent.hasClass('back')) {
e.preventDefault();
parent.parent().removeClass(move_class + left_postfix);
}
$('.right-off-canvas-toggle').attr('aria-expanded', 'true');
})
.on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
self.click_remove_class(e, move_class + left_postfix);
S('.right-submenu').removeClass(move_class + left_postfix);
if (right_postfix) {
self.click_remove_class(e, move_class + right_postfix);
S('.left-submenu').removeClass(move_class + left_postfix);
}
$('.right-off-canvas-toggle').attr('aria-expanded', 'true');
})
.on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
self.click_remove_class(e, move_class + left_postfix);
$('.left-off-canvas-toggle').attr('aria-expanded', 'false');
if (right_postfix) {
self.click_remove_class(e, move_class + right_postfix);
$('.right-off-canvas-toggle').attr('aria-expanded', 'false');
}
});
},
toggle : function (class_name, $off_canvas) {
$off_canvas = $off_canvas || this.get_wrapper();
if ($off_canvas.is('.' + class_name)) {
this.hide(class_name, $off_canvas);
} else {
this.show(class_name, $off_canvas);
}
},
show : function (class_name, $off_canvas) {
$off_canvas = $off_canvas || this.get_wrapper();
$off_canvas.trigger('open.fndtn.offcanvas');
$off_canvas.addClass(class_name);
},
hide : function (class_name, $off_canvas) {
$off_canvas = $off_canvas || this.get_wrapper();
$off_canvas.trigger('close.fndtn.offcanvas');
$off_canvas.removeClass(class_name);
},
click_toggle_class : function (e, class_name) {
e.preventDefault();
var $off_canvas = this.get_wrapper(e);
this.toggle(class_name, $off_canvas);
},
click_remove_class : function (e, class_name) {
e.preventDefault();
var $off_canvas = this.get_wrapper(e);
this.hide(class_name, $off_canvas);
},
get_settings : function (e) {
var offcanvas = this.S(e.target).closest('[' + this.attr_name() + ']');
return offcanvas.data(this.attr_name(true) + '-init') || this.settings;
},
get_wrapper : function (e) {
var $off_canvas = this.S(e ? e.target : this.scope).closest('.off-canvas-wrap');
if ($off_canvas.length === 0) {
$off_canvas = this.S('.off-canvas-wrap');
}
return $off_canvas;
},
reflow : function () {}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.alert = {
name : 'alert',
version : '5.5.2',
settings : {
callback : function () {}
},
init : function (scope, method, options) {
this.bindings(method, options);
},
events : function () {
var self = this,
S = this.S;
$(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] .close', function (e) {
var alertBox = S(this).closest('[' + self.attr_name() + ']'),
settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;
e.preventDefault();
if (Modernizr.csstransitions) {
alertBox.addClass('alert-close');
alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function (e) {
S(this).trigger('close.fndtn.alert').remove();
settings.callback();
});
} else {
alertBox.fadeOut(300, function () {
S(this).trigger('close.fndtn.alert').remove();
settings.callback();
});
}
});
},
reflow : function () {}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.reveal = {
name : 'reveal',
version : '5.5.2',
locked : false,
settings : {
animation : 'fadeAndPop',
animation_speed : 250,
close_on_background_click : true,
close_on_esc : true,
dismiss_modal_class : 'close-reveal-modal',
multiple_opened : false,
bg_class : 'reveal-modal-bg',
root_element : 'body',
open : function(){},
opened : function(){},
close : function(){},
closed : function(){},
on_ajax_error: $.noop,
bg : $('.reveal-modal-bg'),
css : {
open : {
'opacity' : 0,
'visibility' : 'visible',
'display' : 'block'
},
close : {
'opacity' : 1,
'visibility' : 'hidden',
'display' : 'none'
}
}
},
init : function (scope, method, options) {
$.extend(true, this.settings, method, options);
this.bindings(method, options);
},
events : function (scope) {
var self = this,
S = self.S;
S(this.scope)
.off('.reveal')
.on('click.fndtn.reveal', '[' + this.add_namespace('data-reveal-id') + ']:not([disabled])', function (e) {
e.preventDefault();
if (!self.locked) {
var element = S(this),
ajax = element.data(self.data_attr('reveal-ajax')),
replaceContentSel = element.data(self.data_attr('reveal-replace-content'));
self.locked = true;
if (typeof ajax === 'undefined') {
self.open.call(self, element);
} else {
var url = ajax === true ? element.attr('href') : ajax;
self.open.call(self, element, {url : url}, { replaceContentSel : replaceContentSel });
}
}
});
S(document)
.on('click.fndtn.reveal', this.close_targets(), function (e) {
e.preventDefault();
if (!self.locked) {
var settings = S('[' + self.attr_name() + '].open').data(self.attr_name(true) + '-init') || self.settings,
bg_clicked = S(e.target)[0] === S('.' + settings.bg_class)[0];
if (bg_clicked) {
if (settings.close_on_background_click) {
e.stopPropagation();
} else {
return;
}
}
self.locked = true;
self.close.call(self, bg_clicked ? S('[' + self.attr_name() + '].open:not(.toback)') : S(this).closest('[' + self.attr_name() + ']'));
}
});
if (S('[' + self.attr_name() + ']', this.scope).length > 0) {
S(this.scope)
// .off('.reveal')
.on('open.fndtn.reveal', this.settings.open)
.on('opened.fndtn.reveal', this.settings.opened)
.on('opened.fndtn.reveal', this.open_video)
.on('close.fndtn.reveal', this.settings.close)
.on('closed.fndtn.reveal', this.settings.closed)
.on('closed.fndtn.reveal', this.close_video);
} else {
S(this.scope)
// .off('.reveal')
.on('open.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.open)
.on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.opened)
.on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.open_video)
.on('close.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.close)
.on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.closed)
.on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.close_video);
}
return true;
},
// PATCH #3: turning on key up capture only when a reveal window is open
key_up_on : function (scope) {
var self = this;
// PATCH #1: fixing multiple keyup event trigger from single key press
self.S('body').off('keyup.fndtn.reveal').on('keyup.fndtn.reveal', function ( event ) {
var open_modal = self.S('[' + self.attr_name() + '].open'),
settings = open_modal.data(self.attr_name(true) + '-init') || self.settings ;
// PATCH #2: making sure that the close event can be called only while unlocked,
// so that multiple keyup.fndtn.reveal events don't prevent clean closing of the reveal window.
if ( settings && event.which === 27 && settings.close_on_esc && !self.locked) { // 27 is the keycode for the Escape key
self.close.call(self, open_modal);
}
});
return true;
},
// PATCH #3: turning on key up capture only when a reveal window is open
key_up_off : function (scope) {
this.S('body').off('keyup.fndtn.reveal');
return true;
},
open : function (target, ajax_settings) {
var self = this,
modal;
if (target) {
if (typeof target.selector !== 'undefined') {
// Find the named node; only use the first one found, since the rest of the code assumes there's only one node
modal = self.S('#' + target.data(self.data_attr('reveal-id'))).first();
} else {
modal = self.S(this.scope);
ajax_settings = target;
}
} else {
modal = self.S(this.scope);
}
var settings = modal.data(self.attr_name(true) + '-init');
settings = settings || this.settings;
if (modal.hasClass('open') && target.attr('data-reveal-id') == modal.attr('id')) {
return self.close(modal);
}
if (!modal.hasClass('open')) {
var open_modal = self.S('[' + self.attr_name() + '].open');
if (typeof modal.data('css-top') === 'undefined') {
modal.data('css-top', parseInt(modal.css('top'), 10))
.data('offset', this.cache_offset(modal));
}
modal.attr('tabindex','0').attr('aria-hidden','false');
this.key_up_on(modal); // PATCH #3: turning on key up capture only when a reveal window is open
// Prevent namespace event from triggering twice
modal.on('open.fndtn.reveal', function(e) {
if (e.namespace !== 'fndtn.reveal') return;
});
modal.on('open.fndtn.reveal').trigger('open.fndtn.reveal');
if (open_modal.length < 1) {
this.toggle_bg(modal, true);
}
if (typeof ajax_settings === 'string') {
ajax_settings = {
url : ajax_settings
};
}
if (typeof ajax_settings === 'undefined' || !ajax_settings.url) {
if (open_modal.length > 0) {
if (settings.multiple_opened) {
self.to_back(open_modal);
} else {
self.hide(open_modal, settings.css.close);
}
}
this.show(modal, settings.css.open);
} else {
var old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null;
$.extend(ajax_settings, {
success : function (data, textStatus, jqXHR) {
if ( $.isFunction(old_success) ) {
var result = old_success(data, textStatus, jqXHR);
if (typeof result == 'string') {
data = result;
}
}
if (typeof options !== 'undefined' && typeof options.replaceContentSel !== 'undefined') {
modal.find(options.replaceContentSel).html(data);
} else {
modal.html(data);
}
self.S(modal).foundation('section', 'reflow');
self.S(modal).children().foundation();
if (open_modal.length > 0) {
if (settings.multiple_opened) {
self.to_back(open_modal);
} else {
self.hide(open_modal, settings.css.close);
}
}
self.show(modal, settings.css.open);
}
});
// check for if user initalized with error callback
if (settings.on_ajax_error !== $.noop) {
$.extend(ajax_settings, {
error : settings.on_ajax_error
});
}
$.ajax(ajax_settings);
}
}
self.S(window).trigger('resize');
},
close : function (modal) {
var modal = modal && modal.length ? modal : this.S(this.scope),
open_modals = this.S('[' + this.attr_name() + '].open'),
settings = modal.data(this.attr_name(true) + '-init') || this.settings,
self = this;
if (open_modals.length > 0) {
modal.removeAttr('tabindex','0').attr('aria-hidden','true');
this.locked = true;
this.key_up_off(modal); // PATCH #3: turning on key up capture only when a reveal window is open
modal.trigger('close.fndtn.reveal');
if ((settings.multiple_opened && open_modals.length === 1) || !settings.multiple_opened || modal.length > 1) {
self.toggle_bg(modal, false);
self.to_front(modal);
}
if (settings.multiple_opened) {
self.hide(modal, settings.css.close, settings);
self.to_front($($.makeArray(open_modals).reverse()[1]));
} else {
self.hide(open_modals, settings.css.close, settings);
}
}
},
close_targets : function () {
var base = '.' + this.settings.dismiss_modal_class;
if (this.settings.close_on_background_click) {
return base + ', .' + this.settings.bg_class;
}
return base;
},
toggle_bg : function (modal, state) {
if (this.S('.' + this.settings.bg_class).length === 0) {
this.settings.bg = $('<div />', {'class': this.settings.bg_class})
.appendTo('body').hide();
}
var visible = this.settings.bg.filter(':visible').length > 0;
if ( state != visible ) {
if ( state == undefined ? visible : !state ) {
this.hide(this.settings.bg);
} else {
this.show(this.settings.bg);
}
}
},
show : function (el, css) {
// is modal
if (css) {
var settings = el.data(this.attr_name(true) + '-init') || this.settings,
root_element = settings.root_element,
context = this;
if (el.parent(root_element).length === 0) {
var placeholder = el.wrap('<div style="display: none;" />').parent();
el.on('closed.fndtn.reveal.wrapped', function () {
el.detach().appendTo(placeholder);
el.unwrap().unbind('closed.fndtn.reveal.wrapped');
});
el.detach().appendTo(root_element);
}
var animData = getAnimationData(settings.animation);
if (!animData.animate) {
this.locked = false;
}
if (animData.pop) {
css.top = $(window).scrollTop() - el.data('offset') + 'px';
var end_css = {
top: $(window).scrollTop() + el.data('css-top') + 'px',
opacity: 1
};
return setTimeout(function () {
return el
.css(css)
.animate(end_css, settings.animation_speed, 'linear', function () {
context.locked = false;
el.trigger('opened.fndtn.reveal');
})
.addClass('open');
}, settings.animation_speed / 2);
}
if (animData.fade) {
css.top = $(window).scrollTop() + el.data('css-top') + 'px';
var end_css = {opacity: 1};
return setTimeout(function () {
return el
.css(css)
.animate(end_css, settings.animation_speed, 'linear', function () {
context.locked = false;
el.trigger('opened.fndtn.reveal');
})
.addClass('open');
}, settings.animation_speed / 2);
}
return el.css(css).show().css({opacity : 1}).addClass('open').trigger('opened.fndtn.reveal');
}
var settings = this.settings;
// should we animate the background?
if (getAnimationData(settings.animation).fade) {
return el.fadeIn(settings.animation_speed / 2);
}
this.locked = false;
return el.show();
},
to_back : function(el) {
el.addClass('toback');
},
to_front : function(el) {
el.removeClass('toback');
},
hide : function (el, css) {
// is modal
if (css) {
var settings = el.data(this.attr_name(true) + '-init'),
context = this;
settings = settings || this.settings;
var animData = getAnimationData(settings.animation);
if (!animData.animate) {
this.locked = false;
}
if (animData.pop) {
var end_css = {
top: - $(window).scrollTop() - el.data('offset') + 'px',
opacity: 0
};
return setTimeout(function () {
return el
.animate(end_css, settings.animation_speed, 'linear', function () {
context.locked = false;
el.css(css).trigger('closed.fndtn.reveal');
})
.removeClass('open');
}, settings.animation_speed / 2);
}
if (animData.fade) {
var end_css = {opacity : 0};
return setTimeout(function () {
return el
.animate(end_css, settings.animation_speed, 'linear', function () {
context.locked = false;
el.css(css).trigger('closed.fndtn.reveal');
})
.removeClass('open');
}, settings.animation_speed / 2);
}
return el.hide().css(css).removeClass('open').trigger('closed.fndtn.reveal');
}
var settings = this.settings;
// should we animate the background?
if (getAnimationData(settings.animation).fade) {
return el.fadeOut(settings.animation_speed / 2);
}
return el.hide();
},
close_video : function (e) {
var video = $('.flex-video', e.target),
iframe = $('iframe', video);
if (iframe.length > 0) {
iframe.attr('data-src', iframe[0].src);
iframe.attr('src', iframe.attr('src'));
video.hide();
}
},
open_video : function (e) {
var video = $('.flex-video', e.target),
iframe = video.find('iframe');
if (iframe.length > 0) {
var data_src = iframe.attr('data-src');
if (typeof data_src === 'string') {
iframe[0].src = iframe.attr('data-src');
} else {
var src = iframe[0].src;
iframe[0].src = undefined;
iframe[0].src = src;
}
video.show();
}
},
data_attr : function (str) {
if (this.namespace.length > 0) {
return this.namespace + '-' + str;
}
return str;
},
cache_offset : function (modal) {
var offset = modal.show().height() + parseInt(modal.css('top'), 10) + modal.scrollY;
modal.hide();
return offset;
},
off : function () {
$(this.scope).off('.fndtn.reveal');
},
reflow : function () {}
};
/*
* getAnimationData('popAndFade') // {animate: true, pop: true, fade: true}
* getAnimationData('fade') // {animate: true, pop: false, fade: true}
* getAnimationData('pop') // {animate: true, pop: true, fade: false}
* getAnimationData('foo') // {animate: false, pop: false, fade: false}
* getAnimationData(null) // {animate: false, pop: false, fade: false}
*/
function getAnimationData(str) {
var fade = /fade/i.test(str);
var pop = /pop/i.test(str);
return {
animate : fade || pop,
pop : pop,
fade : fade
};
}
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.interchange = {
name : 'interchange',
version : '5.5.2',
cache : {},
images_loaded : false,
nodes_loaded : false,
settings : {
load_attr : 'interchange',
named_queries : {
'default' : 'only screen',
'small' : Foundation.media_queries['small'],
'small-only' : Foundation.media_queries['small-only'],
'medium' : Foundation.media_queries['medium'],
'medium-only' : Foundation.media_queries['medium-only'],
'large' : Foundation.media_queries['large'],
'large-only' : Foundation.media_queries['large-only'],
'xlarge' : Foundation.media_queries['xlarge'],
'xlarge-only' : Foundation.media_queries['xlarge-only'],
'xxlarge' : Foundation.media_queries['xxlarge'],
'landscape' : 'only screen and (orientation: landscape)',
'portrait' : 'only screen and (orientation: portrait)',
'retina' : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
'only screen and (min--moz-device-pixel-ratio: 2),' +
'only screen and (-o-min-device-pixel-ratio: 2/1),' +
'only screen and (min-device-pixel-ratio: 2),' +
'only screen and (min-resolution: 192dpi),' +
'only screen and (min-resolution: 2dppx)'
},
directives : {
replace : function (el, path, trigger) {
// The trigger argument, if called within the directive, fires
// an event named after the directive on the element, passing
// any parameters along to the event that you pass to trigger.
//
// ex. trigger(), trigger([a, b, c]), or trigger(a, b, c)
//
// This allows you to bind a callback like so:
// $('#interchangeContainer').on('replace', function (e, a, b, c) {
// console.log($(this).html(), a, b, c);
// });
if (el !== null && /IMG/.test(el[0].nodeName)) {
var orig_path = el[0].src;
if (new RegExp(path, 'i').test(orig_path)) {
return;
}
el.attr("src", path);
return trigger(el[0].src);
}
var last_path = el.data(this.data_attr + '-last-path'),
self = this;
if (last_path == path) {
return;
}
if (/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(path)) {
$(el).css('background-image', 'url(' + path + ')');
el.data('interchange-last-path', path);
return trigger(path);
}
return $.get(path, function (response) {
el.html(response);
el.data(self.data_attr + '-last-path', path);
trigger();
});
}
}
},
init : function (scope, method, options) {
Foundation.inherit(this, 'throttle random_str');
this.data_attr = this.set_data_attr();
$.extend(true, this.settings, method, options);
this.bindings(method, options);
this.reflow();
},
get_media_hash : function () {
var mediaHash = '';
for (var queryName in this.settings.named_queries ) {
mediaHash += matchMedia(this.settings.named_queries[queryName]).matches.toString();
}
return mediaHash;
},
events : function () {
var self = this, prevMediaHash;
$(window)
.off('.interchange')
.on('resize.fndtn.interchange', self.throttle(function () {
var currMediaHash = self.get_media_hash();
if (currMediaHash !== prevMediaHash) {
self.resize();
}
prevMediaHash = currMediaHash;
}, 50));
return this;
},
resize : function () {
var cache = this.cache;
if (!this.images_loaded || !this.nodes_loaded) {
setTimeout($.proxy(this.resize, this), 50);
return;
}
for (var uuid in cache) {
if (cache.hasOwnProperty(uuid)) {
var passed = this.results(uuid, cache[uuid]);
if (passed) {
this.settings.directives[passed
.scenario[1]].call(this, passed.el, passed.scenario[0], (function (passed) {
if (arguments[0] instanceof Array) {
var args = arguments[0];
} else {
var args = Array.prototype.slice.call(arguments, 0);
}
return function() {
passed.el.trigger(passed.scenario[1], args);
}
}(passed)));
}
}
}
},
results : function (uuid, scenarios) {
var count = scenarios.length;
if (count > 0) {
var el = this.S('[' + this.add_namespace('data-uuid') + '="' + uuid + '"]');
while (count--) {
var mq, rule = scenarios[count][2];
if (this.settings.named_queries.hasOwnProperty(rule)) {
mq = matchMedia(this.settings.named_queries[rule]);
} else {
mq = matchMedia(rule);
}
if (mq.matches) {
return {el : el, scenario : scenarios[count]};
}
}
}
return false;
},
load : function (type, force_update) {
if (typeof this['cached_' + type] === 'undefined' || force_update) {
this['update_' + type]();
}
return this['cached_' + type];
},
update_images : function () {
var images = this.S('img[' + this.data_attr + ']'),
count = images.length,
i = count,
loaded_count = 0,
data_attr = this.data_attr;
this.cache = {};
this.cached_images = [];
this.images_loaded = (count === 0);
while (i--) {
loaded_count++;
if (images[i]) {
var str = images[i].getAttribute(data_attr) || '';
if (str.length > 0) {
this.cached_images.push(images[i]);
}
}
if (loaded_count === count) {
this.images_loaded = true;
this.enhance('images');
}
}
return this;
},
update_nodes : function () {
var nodes = this.S('[' + this.data_attr + ']').not('img'),
count = nodes.length,
i = count,
loaded_count = 0,
data_attr = this.data_attr;
this.cached_nodes = [];
this.nodes_loaded = (count === 0);
while (i--) {
loaded_count++;
var str = nodes[i].getAttribute(data_attr) || '';
if (str.length > 0) {
this.cached_nodes.push(nodes[i]);
}
if (loaded_count === count) {
this.nodes_loaded = true;
this.enhance('nodes');
}
}
return this;
},
enhance : function (type) {
var i = this['cached_' + type].length;
while (i--) {
this.object($(this['cached_' + type][i]));
}
return $(window).trigger('resize.fndtn.interchange');
},
convert_directive : function (directive) {
var trimmed = this.trim(directive);
if (trimmed.length > 0) {
return trimmed;
}
return 'replace';
},
parse_scenario : function (scenario) {
// This logic had to be made more complex since some users were using commas in the url path
// So we cannot simply just split on a comma
var directive_match = scenario[0].match(/(.+),\s*(\w+)\s*$/),
// getting the mq has gotten a bit complicated since we started accounting for several use cases
// of URLs. For now we'll continue to match these scenarios, but we may consider having these scenarios
// as nested objects or arrays in F6.
// regex: match everything before close parenthesis for mq
media_query = scenario[1].match(/(.*)\)/);
if (directive_match) {
var path = directive_match[1],
directive = directive_match[2];
} else {
var cached_split = scenario[0].split(/,\s*$/),
path = cached_split[0],
directive = '';
}
return [this.trim(path), this.convert_directive(directive), this.trim(media_query[1])];
},
object : function (el) {
var raw_arr = this.parse_data_attr(el),
scenarios = [],
i = raw_arr.length;
if (i > 0) {
while (i--) {
// split array between comma delimited content and mq
// regex: comma, optional space, open parenthesis
var scenario = raw_arr[i].split(/,\s?\(/);
if (scenario.length > 1) {
var params = this.parse_scenario(scenario);
scenarios.push(params);
}
}
}
return this.store(el, scenarios);
},
store : function (el, scenarios) {
var uuid = this.random_str(),
current_uuid = el.data(this.add_namespace('uuid', true));
if (this.cache[current_uuid]) {
return this.cache[current_uuid];
}
el.attr(this.add_namespace('data-uuid'), uuid);
return this.cache[uuid] = scenarios;
},
trim : function (str) {
if (typeof str === 'string') {
return $.trim(str);
}
return str;
},
set_data_attr : function (init) {
if (init) {
if (this.namespace.length > 0) {
return this.namespace + '-' + this.settings.load_attr;
}
return this.settings.load_attr;
}
if (this.namespace.length > 0) {
return 'data-' + this.namespace + '-' + this.settings.load_attr;
}
return 'data-' + this.settings.load_attr;
},
parse_data_attr : function (el) {
var raw = el.attr(this.attr_name()).split(/\[(.*?)\]/),
i = raw.length,
output = [];
while (i--) {
if (raw[i].replace(/[\W\d]+/, '').length > 4) {
output.push(raw[i]);
}
}
return output;
},
reflow : function () {
this.load('images', true);
this.load('nodes', true);
}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs['magellan-expedition'] = {
name : 'magellan-expedition',
version : '5.5.2',
settings : {
active_class : 'active',
threshold : 0, // pixels from the top of the expedition for it to become fixes
destination_threshold : 20, // pixels from the top of destination for it to be considered active
throttle_delay : 30, // calculation throttling to increase framerate
fixed_top : 0, // top distance in pixels assigend to the fixed element on scroll
offset_by_height : true, // whether to offset the destination by the expedition height. Usually you want this to be true, unless your expedition is on the side.
duration : 700, // animation duration time
easing : 'swing' // animation easing
},
init : function (scope, method, options) {
Foundation.inherit(this, 'throttle');
this.bindings(method, options);
},
events : function () {
var self = this,
S = self.S,
settings = self.settings;
// initialize expedition offset
self.set_expedition_position();
S(self.scope)
.off('.magellan')
.on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href*=#]', function (e) {
var sameHost = ((this.hostname === location.hostname) || !this.hostname),
samePath = self.filterPathname(location.pathname) === self.filterPathname(this.pathname),
testHash = this.hash.replace(/(:|\.|\/)/g, '\\$1'),
anchor = this;
if (sameHost && samePath && testHash) {
e.preventDefault();
var expedition = $(this).closest('[' + self.attr_name() + ']'),
settings = expedition.data('magellan-expedition-init'),
hash = this.hash.split('#').join(''),
target = $('a[name="' + hash + '"]');
if (target.length === 0) {
target = $('#' + hash);
}
// Account for expedition height if fixed position
var scroll_top = target.offset().top - settings.destination_threshold + 1;
if (settings.offset_by_height) {
scroll_top = scroll_top - expedition.outerHeight();
}
$('html, body').stop().animate({
'scrollTop' : scroll_top
}, settings.duration, settings.easing, function () {
if (history.pushState) {
history.pushState(null, null, anchor.pathname + '#' + hash);
}
else {
location.hash = anchor.pathname + '#' + hash;
}
});
}
})
.on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay));
},
check_for_arrivals : function () {
var self = this;
self.update_arrivals();
self.update_expedition_positions();
},
set_expedition_position : function () {
var self = this;
$('[' + this.attr_name() + '=fixed]', self.scope).each(function (idx, el) {
var expedition = $(this),
settings = expedition.data('magellan-expedition-init'),
styles = expedition.attr('styles'), // save styles
top_offset, fixed_top;
expedition.attr('style', '');
top_offset = expedition.offset().top + settings.threshold;
//set fixed-top by attribute
fixed_top = parseInt(expedition.data('magellan-fixed-top'));
if (!isNaN(fixed_top)) {
self.settings.fixed_top = fixed_top;
}
expedition.data(self.data_attr('magellan-top-offset'), top_offset);
expedition.attr('style', styles);
});
},
update_expedition_positions : function () {
var self = this,
window_top_offset = $(window).scrollTop();
$('[' + this.attr_name() + '=fixed]', self.scope).each(function () {
var expedition = $(this),
settings = expedition.data('magellan-expedition-init'),
styles = expedition.attr('style'), // save styles
top_offset = expedition.data('magellan-top-offset');
//scroll to the top distance
if (window_top_offset + self.settings.fixed_top >= top_offset) {
// Placeholder allows height calculations to be consistent even when
// appearing to switch between fixed/non-fixed placement
var placeholder = expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']');
if (placeholder.length === 0) {
placeholder = expedition.clone();
placeholder.removeAttr(self.attr_name());
placeholder.attr(self.add_namespace('data-magellan-expedition-clone'), '');
expedition.before(placeholder);
}
expedition.css({position :'fixed', top : settings.fixed_top}).addClass('fixed');
} else {
expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove();
expedition.attr('style', styles).css('position', '').css('top', '').removeClass('fixed');
}
});
},
update_arrivals : function () {
var self = this,
window_top_offset = $(window).scrollTop();
$('[' + this.attr_name() + ']', self.scope).each(function () {
var expedition = $(this),
settings = expedition.data(self.attr_name(true) + '-init'),
offsets = self.offsets(expedition, window_top_offset),
arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']'),
active_item = false;
offsets.each(function (idx, item) {
if (item.viewport_offset >= item.top_offset) {
var arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']');
arrivals.not(item.arrival).removeClass(settings.active_class);
item.arrival.addClass(settings.active_class);
active_item = true;
return true;
}
});
if (!active_item) {
arrivals.removeClass(settings.active_class);
}
});
},
offsets : function (expedition, window_offset) {
var self = this,
settings = expedition.data(self.attr_name(true) + '-init'),
viewport_offset = window_offset;
return expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']').map(function (idx, el) {
var name = $(this).data(self.data_attr('magellan-arrival')),
dest = $('[' + self.add_namespace('data-magellan-destination') + '=' + name + ']');
if (dest.length > 0) {
var top_offset = dest.offset().top - settings.destination_threshold;
if (settings.offset_by_height) {
top_offset = top_offset - expedition.outerHeight();
}
top_offset = Math.floor(top_offset);
return {
destination : dest,
arrival : $(this),
top_offset : top_offset,
viewport_offset : viewport_offset
}
}
}).sort(function (a, b) {
if (a.top_offset < b.top_offset) {
return -1;
}
if (a.top_offset > b.top_offset) {
return 1;
}
return 0;
});
},
data_attr : function (str) {
if (this.namespace.length > 0) {
return this.namespace + '-' + str;
}
return str;
},
off : function () {
this.S(this.scope).off('.magellan');
this.S(window).off('.magellan');
},
filterPathname : function (pathname) {
pathname = pathname || '';
return pathname
.replace(/^\//,'')
.replace(/(?:index|default).[a-zA-Z]{3,4}$/,'')
.replace(/\/$/,'');
},
reflow : function () {
var self = this;
// remove placeholder expeditions used for height calculation purposes
$('[' + self.add_namespace('data-magellan-expedition-clone') + ']', self.scope).remove();
}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.accordion = {
name : 'accordion',
version : '5.5.2',
settings : {
content_class : 'content',
active_class : 'active',
multi_expand : false,
toggleable : true,
callback : function () {}
},
init : function (scope, method, options) {
this.bindings(method, options);
},
events : function (instance) {
var self = this;
var S = this.S;
self.create(this.S(instance));
S(this.scope)
.off('.fndtn.accordion')
.on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a, [' + this.attr_name() + '] > li > a', function (e) {
var accordion = S(this).closest('[' + self.attr_name() + ']'),
groupSelector = self.attr_name() + '=' + accordion.attr(self.attr_name()),
settings = accordion.data(self.attr_name(true) + '-init') || self.settings,
target = S('#' + this.href.split('#')[1]),
aunts = $('> dd, > li', accordion),
siblings = aunts.children('.' + settings.content_class),
active_content = siblings.filter('.' + settings.active_class);
e.preventDefault();
if (accordion.attr(self.attr_name())) {
siblings = siblings.add('[' + groupSelector + '] dd > ' + '.' + settings.content_class + ', [' + groupSelector + '] li > ' + '.' + settings.content_class);
aunts = aunts.add('[' + groupSelector + '] dd, [' + groupSelector + '] li');
}
if (settings.toggleable && target.is(active_content)) {
target.parent('dd, li').toggleClass(settings.active_class, false);
target.toggleClass(settings.active_class, false);
S(this).attr('aria-expanded', function(i, attr){
return attr === 'true' ? 'false' : 'true';
});
settings.callback(target);
target.triggerHandler('toggled', [accordion]);
accordion.triggerHandler('toggled', [target]);
return;
}
if (!settings.multi_expand) {
siblings.removeClass(settings.active_class);
aunts.removeClass(settings.active_class);
aunts.children('a').attr('aria-expanded','false');
}
target.addClass(settings.active_class).parent().addClass(settings.active_class);
settings.callback(target);
target.triggerHandler('toggled', [accordion]);
accordion.triggerHandler('toggled', [target]);
S(this).attr('aria-expanded','true');
});
},
create: function($instance) {
var self = this,
accordion = $instance,
aunts = $('> .accordion-navigation', accordion),
settings = accordion.data(self.attr_name(true) + '-init') || self.settings;
aunts.children('a').attr('aria-expanded','false');
aunts.has('.' + settings.content_class + '.' + settings.active_class).children('a').attr('aria-expanded','true');
if (settings.multi_expand) {
$instance.attr('aria-multiselectable','true');
}
},
off : function () {},
reflow : function () {}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.topbar = {
name : 'topbar',
version : '5.5.2',
settings : {
index : 0,
start_offset : 0,
sticky_class : 'sticky',
custom_back_text : true,
back_text : 'Back',
mobile_show_parent_link : true,
is_hover : true,
scrolltop : true, // jump to top when sticky nav menu toggle is clicked
sticky_on : 'all',
dropdown_autoclose: true
},
init : function (section, method, options) {
Foundation.inherit(this, 'add_custom_rule register_media throttle');
var self = this;
self.register_media('topbar', 'foundation-mq-topbar');
this.bindings(method, options);
self.S('[' + this.attr_name() + ']', this.scope).each(function () {
var topbar = $(this),
settings = topbar.data(self.attr_name(true) + '-init'),
section = self.S('section, .top-bar-section', this);
topbar.data('index', 0);
var topbarContainer = topbar.parent();
if (topbarContainer.hasClass('fixed') || self.is_sticky(topbar, topbarContainer, settings) ) {
self.settings.sticky_class = settings.sticky_class;
self.settings.sticky_topbar = topbar;
topbar.data('height', topbarContainer.outerHeight());
topbar.data('stickyoffset', topbarContainer.offset().top);
} else {
topbar.data('height', topbar.outerHeight());
}
if (!settings.assembled) {
self.assemble(topbar);
}
if (settings.is_hover) {
self.S('.has-dropdown', topbar).addClass('not-click');
} else {
self.S('.has-dropdown', topbar).removeClass('not-click');
}
// Pad body when sticky (scrolled) or fixed.
self.add_custom_rule('.f-topbar-fixed { padding-top: ' + topbar.data('height') + 'px }');
if (topbarContainer.hasClass('fixed')) {
self.S('body').addClass('f-topbar-fixed');
}
});
},
is_sticky : function (topbar, topbarContainer, settings) {
var sticky = topbarContainer.hasClass(settings.sticky_class);
var smallMatch = matchMedia(Foundation.media_queries.small).matches;
var medMatch = matchMedia(Foundation.media_queries.medium).matches;
var lrgMatch = matchMedia(Foundation.media_queries.large).matches;
if (sticky && settings.sticky_on === 'all') {
return true;
}
if (sticky && this.small() && settings.sticky_on.indexOf('small') !== -1) {
if (smallMatch && !medMatch && !lrgMatch) { return true; }
}
if (sticky && this.medium() && settings.sticky_on.indexOf('medium') !== -1) {
if (smallMatch && medMatch && !lrgMatch) { return true; }
}
if (sticky && this.large() && settings.sticky_on.indexOf('large') !== -1) {
if (smallMatch && medMatch && lrgMatch) { return true; }
}
return false;
},
toggle : function (toggleEl) {
var self = this,
topbar;
if (toggleEl) {
topbar = self.S(toggleEl).closest('[' + this.attr_name() + ']');
} else {
topbar = self.S('[' + this.attr_name() + ']');
}
var settings = topbar.data(this.attr_name(true) + '-init');
var section = self.S('section, .top-bar-section', topbar);
if (self.breakpoint()) {
if (!self.rtl) {
section.css({left : '0%'});
$('>.name', section).css({left : '100%'});
} else {
section.css({right : '0%'});
$('>.name', section).css({right : '100%'});
}
self.S('li.moved', section).removeClass('moved');
topbar.data('index', 0);
topbar
.toggleClass('expanded')
.css('height', '');
}
if (settings.scrolltop) {
if (!topbar.hasClass('expanded')) {
if (topbar.hasClass('fixed')) {
topbar.parent().addClass('fixed');
topbar.removeClass('fixed');
self.S('body').addClass('f-topbar-fixed');
}
} else if (topbar.parent().hasClass('fixed')) {
if (settings.scrolltop) {
topbar.parent().removeClass('fixed');
topbar.addClass('fixed');
self.S('body').removeClass('f-topbar-fixed');
window.scrollTo(0, 0);
} else {
topbar.parent().removeClass('expanded');
}
}
} else {
if (self.is_sticky(topbar, topbar.parent(), settings)) {
topbar.parent().addClass('fixed');
}
if (topbar.parent().hasClass('fixed')) {
if (!topbar.hasClass('expanded')) {
topbar.removeClass('fixed');
topbar.parent().removeClass('expanded');
self.update_sticky_positioning();
} else {
topbar.addClass('fixed');
topbar.parent().addClass('expanded');
self.S('body').addClass('f-topbar-fixed');
}
}
}
},
timer : null,
events : function (bar) {
var self = this,
S = this.S;
S(this.scope)
.off('.topbar')
.on('click.fndtn.topbar', '[' + this.attr_name() + '] .toggle-topbar', function (e) {
e.preventDefault();
self.toggle(this);
})
.on('click.fndtn.topbar contextmenu.fndtn.topbar', '.top-bar .top-bar-section li a[href^="#"],[' + this.attr_name() + '] .top-bar-section li a[href^="#"]', function (e) {
var li = $(this).closest('li'),
topbar = li.closest('[' + self.attr_name() + ']'),
settings = topbar.data(self.attr_name(true) + '-init');
if (settings.dropdown_autoclose && settings.is_hover) {
var hoverLi = $(this).closest('.hover');
hoverLi.removeClass('hover');
}
if (self.breakpoint() && !li.hasClass('back') && !li.hasClass('has-dropdown')) {
self.toggle();
}
})
.on('click.fndtn.topbar', '[' + this.attr_name() + '] li.has-dropdown', function (e) {
var li = S(this),
target = S(e.target),
topbar = li.closest('[' + self.attr_name() + ']'),
settings = topbar.data(self.attr_name(true) + '-init');
if (target.data('revealId')) {
self.toggle();
return;
}
if (self.breakpoint()) {
return;
}
if (settings.is_hover && !Modernizr.touch) {
return;
}
e.stopImmediatePropagation();
if (li.hasClass('hover')) {
li
.removeClass('hover')
.find('li')
.removeClass('hover');
li.parents('li.hover')
.removeClass('hover');
} else {
li.addClass('hover');
$(li).siblings().removeClass('hover');
if (target[0].nodeName === 'A' && target.parent().hasClass('has-dropdown')) {
e.preventDefault();
}
}
})
.on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown>a', function (e) {
if (self.breakpoint()) {
e.preventDefault();
var $this = S(this),
topbar = $this.closest('[' + self.attr_name() + ']'),
section = topbar.find('section, .top-bar-section'),
dropdownHeight = $this.next('.dropdown').outerHeight(),
$selectedLi = $this.closest('li');
topbar.data('index', topbar.data('index') + 1);
$selectedLi.addClass('moved');
if (!self.rtl) {
section.css({left : -(100 * topbar.data('index')) + '%'});
section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
} else {
section.css({right : -(100 * topbar.data('index')) + '%'});
section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
}
topbar.css('height', $this.siblings('ul').outerHeight(true) + topbar.data('height'));
}
});
S(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function () {
self.resize.call(self);
}, 50)).trigger('resize.fndtn.topbar').load(function () {
// Ensure that the offset is calculated after all of the pages resources have loaded
S(this).trigger('resize.fndtn.topbar');
});
S('body').off('.topbar').on('click.fndtn.topbar', function (e) {
var parent = S(e.target).closest('li').closest('li.hover');
if (parent.length > 0) {
return;
}
S('[' + self.attr_name() + '] li.hover').removeClass('hover');
});
// Go up a level on Click
S(this.scope).on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown .back', function (e) {
e.preventDefault();
var $this = S(this),
topbar = $this.closest('[' + self.attr_name() + ']'),
section = topbar.find('section, .top-bar-section'),
settings = topbar.data(self.attr_name(true) + '-init'),
$movedLi = $this.closest('li.moved'),
$previousLevelUl = $movedLi.parent();
topbar.data('index', topbar.data('index') - 1);
if (!self.rtl) {
section.css({left : -(100 * topbar.data('index')) + '%'});
section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
} else {
section.css({right : -(100 * topbar.data('index')) + '%'});
section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
}
if (topbar.data('index') === 0) {
topbar.css('height', '');
} else {
topbar.css('height', $previousLevelUl.outerHeight(true) + topbar.data('height'));
}
setTimeout(function () {
$movedLi.removeClass('moved');
}, 300);
});
// Show dropdown menus when their items are focused
S(this.scope).find('.dropdown a')
.focus(function () {
$(this).parents('.has-dropdown').addClass('hover');
})
.blur(function () {
$(this).parents('.has-dropdown').removeClass('hover');
});
},
resize : function () {
var self = this;
self.S('[' + this.attr_name() + ']').each(function () {
var topbar = self.S(this),
settings = topbar.data(self.attr_name(true) + '-init');
var stickyContainer = topbar.parent('.' + self.settings.sticky_class);
var stickyOffset;
if (!self.breakpoint()) {
var doToggle = topbar.hasClass('expanded');
topbar
.css('height', '')
.removeClass('expanded')
.find('li')
.removeClass('hover');
if (doToggle) {
self.toggle(topbar);
}
}
if (self.is_sticky(topbar, stickyContainer, settings)) {
if (stickyContainer.hasClass('fixed')) {
// Remove the fixed to allow for correct calculation of the offset.
stickyContainer.removeClass('fixed');
stickyOffset = stickyContainer.offset().top;
if (self.S(document.body).hasClass('f-topbar-fixed')) {
stickyOffset -= topbar.data('height');
}
topbar.data('stickyoffset', stickyOffset);
stickyContainer.addClass('fixed');
} else {
stickyOffset = stickyContainer.offset().top;
topbar.data('stickyoffset', stickyOffset);
}
}
});
},
breakpoint : function () {
return !matchMedia(Foundation.media_queries['topbar']).matches;
},
small : function () {
return matchMedia(Foundation.media_queries['small']).matches;
},
medium : function () {
return matchMedia(Foundation.media_queries['medium']).matches;
},
large : function () {
return matchMedia(Foundation.media_queries['large']).matches;
},
assemble : function (topbar) {
var self = this,
settings = topbar.data(this.attr_name(true) + '-init'),
section = self.S('section, .top-bar-section', topbar);
// Pull element out of the DOM for manipulation
section.detach();
self.S('.has-dropdown>a', section).each(function () {
var $link = self.S(this),
$dropdown = $link.siblings('.dropdown'),
url = $link.attr('href'),
$titleLi;
if (!$dropdown.find('.title.back').length) {
if (settings.mobile_show_parent_link == true && url) {
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="' + url + '">' + $link.html() +'</a></li>');
} else {
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>');
}
// Copy link to subnav
if (settings.custom_back_text == true) {
$('h5>a', $titleLi).html(settings.back_text);
} else {
$('h5>a', $titleLi).html('« ' + $link.html());
}
$dropdown.prepend($titleLi);
}
});
// Put element back in the DOM
section.appendTo(topbar);
// check for sticky
this.sticky();
this.assembled(topbar);
},
assembled : function (topbar) {
topbar.data(this.attr_name(true), $.extend({}, topbar.data(this.attr_name(true)), {assembled : true}));
},
height : function (ul) {
var total = 0,
self = this;
$('> li', ul).each(function () {
total += self.S(this).outerHeight(true);
});
return total;
},
sticky : function () {
var self = this;
this.S(window).on('scroll', function () {
self.update_sticky_positioning();
});
},
update_sticky_positioning : function () {
var klass = '.' + this.settings.sticky_class,
$window = this.S(window),
self = this;
if (self.settings.sticky_topbar && self.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(), this.settings)) {
var distance = this.settings.sticky_topbar.data('stickyoffset') + this.settings.start_offset;
if (!self.S(klass).hasClass('expanded')) {
if ($window.scrollTop() > (distance)) {
if (!self.S(klass).hasClass('fixed')) {
self.S(klass).addClass('fixed');
self.S('body').addClass('f-topbar-fixed');
}
} else if ($window.scrollTop() <= distance) {
if (self.S(klass).hasClass('fixed')) {
self.S(klass).removeClass('fixed');
self.S('body').removeClass('f-topbar-fixed');
}
}
}
}
},
off : function () {
this.S(this.scope).off('.fndtn.topbar');
this.S(window).off('.fndtn.topbar');
},
reflow : function () {}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.tab = {
name : 'tab',
version : '5.5.2',
settings : {
active_class : 'active',
callback : function () {},
deep_linking : false,
scroll_to_content : true,
is_hover : false
},
default_tab_hashes : [],
init : function (scope, method, options) {
var self = this,
S = this.S;
// Store the default active tabs which will be referenced when the
// location hash is absent, as in the case of navigating the tabs and
// returning to the first viewing via the browser Back button.
S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () {
self.default_tab_hashes.push(this.hash);
});
// store the initial href, which is used to allow correct behaviour of the
// browser back button when deep linking is turned on.
self.entry_location = window.location.href;
this.bindings(method, options);
this.handle_location_hash_change();
},
events : function () {
var self = this,
S = this.S;
var usual_tab_behavior = function (e, target) {
var settings = S(target).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
if (!settings.is_hover || Modernizr.touch) {
e.preventDefault();
e.stopPropagation();
self.toggle_active_tab(S(target).parent());
}
};
S(this.scope)
.off('.tab')
// Key event: focus/tab key
.on('keydown.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
var el = this;
var keyCode = e.keyCode || e.which;
// if user pressed tab key
if (keyCode == 9) {
e.preventDefault();
// TODO: Change usual_tab_behavior into accessibility function?
usual_tab_behavior(e, el);
}
})
// Click event: tab title
.on('click.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
var el = this;
usual_tab_behavior(e, el);
})
// Hover event: tab title
.on('mouseenter.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
var settings = S(this).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
if (settings.is_hover) {
self.toggle_active_tab(S(this).parent());
}
});
// Location hash change event
S(window).on('hashchange.fndtn.tab', function (e) {
e.preventDefault();
self.handle_location_hash_change();
});
},
handle_location_hash_change : function () {
var self = this,
S = this.S;
S('[' + this.attr_name() + ']', this.scope).each(function () {
var settings = S(this).data(self.attr_name(true) + '-init');
if (settings.deep_linking) {
// Match the location hash to a label
var hash;
if (settings.scroll_to_content) {
hash = self.scope.location.hash;
} else {
// prefix the hash to prevent anchor scrolling
hash = self.scope.location.hash.replace('fndtn-', '');
}
if (hash != '') {
// Check whether the location hash references a tab content div or
// another element on the page (inside or outside the tab content div)
var hash_element = S(hash);
if (hash_element.hasClass('content') && hash_element.parent().hasClass('tabs-content')) {
// Tab content div
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + hash + ']').parent());
} else {
// Not the tab content div. If inside the tab content, find the
// containing tab and toggle it as active.
var hash_tab_container_id = hash_element.closest('.content').attr('id');
if (hash_tab_container_id != undefined) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=#' + hash_tab_container_id + ']').parent(), hash);
}
}
} else {
// Reference the default tab hashes which were initialized in the init function
for (var ind = 0; ind < self.default_tab_hashes.length; ind++) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + self.default_tab_hashes[ind] + ']').parent());
}
}
}
});
},
toggle_active_tab : function (tab, location_hash) {
var self = this,
S = self.S,
tabs = tab.closest('[' + this.attr_name() + ']'),
tab_link = tab.find('a'),
anchor = tab.children('a').first(),
target_hash = '#' + anchor.attr('href').split('#')[1],
target = S(target_hash),
siblings = tab.siblings(),
settings = tabs.data(this.attr_name(true) + '-init'),
interpret_keyup_action = function (e) {
// Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
// define current, previous and next (possible) tabs
var $original = $(this);
var $prev = $(this).parents('li').prev().children('[role="tab"]');
var $next = $(this).parents('li').next().children('[role="tab"]');
var $target;
// find the direction (prev or next)
switch (e.keyCode) {
case 37:
$target = $prev;
break;
case 39:
$target = $next;
break;
default:
$target = false
break;
}
if ($target.length) {
$original.attr({
'tabindex' : '-1',
'aria-selected' : null
});
$target.attr({
'tabindex' : '0',
'aria-selected' : true
}).focus();
}
// Hide panels
$('[role="tabpanel"]')
.attr('aria-hidden', 'true');
// Show panel which corresponds to target
$('#' + $(document.activeElement).attr('href').substring(1))
.attr('aria-hidden', null);
},
go_to_hash = function(hash) {
// This function allows correct behaviour of the browser's back button when deep linking is enabled. Without it
// the user would get continually redirected to the default hash.
var is_entry_location = window.location.href === self.entry_location,
default_hash = settings.scroll_to_content ? self.default_tab_hashes[0] : is_entry_location ? window.location.hash :'fndtn-' + self.default_tab_hashes[0].replace('#', '')
if (!(is_entry_location && hash === default_hash)) {
window.location.hash = hash;
}
};
// allow usage of data-tab-content attribute instead of href
if (anchor.data('tab-content')) {
target_hash = '#' + anchor.data('tab-content').split('#')[1];
target = S(target_hash);
}
if (settings.deep_linking) {
if (settings.scroll_to_content) {
// retain current hash to scroll to content
go_to_hash(location_hash || target_hash);
if (location_hash == undefined || location_hash == target_hash) {
tab.parent()[0].scrollIntoView();
} else {
S(target_hash)[0].scrollIntoView();
}
} else {
// prefix the hashes so that the browser doesn't scroll down
if (location_hash != undefined) {
go_to_hash('fndtn-' + location_hash.replace('#', ''));
} else {
go_to_hash('fndtn-' + target_hash.replace('#', ''));
}
}
}
// WARNING: The activation and deactivation of the tab content must
// occur after the deep linking in order to properly refresh the browser
// window (notably in Chrome).
// Clean up multiple attr instances to done once
tab.addClass(settings.active_class).triggerHandler('opened');
tab_link.attr({'aria-selected' : 'true', tabindex : 0});
siblings.removeClass(settings.active_class)
siblings.find('a').attr({'aria-selected' : 'false', tabindex : -1});
target.siblings().removeClass(settings.active_class).attr({'aria-hidden' : 'true', tabindex : -1});
target.addClass(settings.active_class).attr('aria-hidden', 'false').removeAttr('tabindex');
settings.callback(tab);
target.triggerHandler('toggled', [target]);
tabs.triggerHandler('toggled', [tab]);
tab_link.off('keydown').on('keydown', interpret_keyup_action );
},
data_attr : function (str) {
if (this.namespace.length > 0) {
return this.namespace + '-' + str;
}
return str;
},
off : function () {},
reflow : function () {}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.abide = {
name : 'abide',
version : '5.5.2',
settings : {
live_validate : true,
validate_on_blur : true,
// validate_on: 'tab', // tab (when user tabs between fields), change (input changes), manual (call custom events)
focus_on_invalid : true,
error_labels : true, // labels with a for="inputId" will recieve an `error` class
error_class : 'error',
timeout : 1000,
patterns : {
alpha : /^[a-zA-Z]+$/,
alpha_numeric : /^[a-zA-Z0-9]+$/,
integer : /^[-+]?\d+$/,
number : /^[-+]?\d*(?:[\.\,]\d+)?$/,
// amex, visa, diners
card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
cvv : /^([0-9]){3,4}$/,
// http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
email : /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,
// http://blogs.lse.ac.uk/lti/2008/04/23/a-regular-expression-to-match-any-url/
url: /^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,
// abc.de
domain : /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,
datetime : /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,
// YYYY-MM-DD
date : /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,
// HH:MM:SS
time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,
dateISO : /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
// MM/DD/YYYY
month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,
// DD/MM/YYYY
day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,
// #FFF or #FFFFFF
color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
},
validators : {
equalTo : function (el, required, parent) {
var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
to = el.value,
valid = (from === to);
return valid;
}
}
},
timer : null,
init : function (scope, method, options) {
this.bindings(method, options);
},
events : function (scope) {
var self = this,
form = self.S(scope).attr('novalidate', 'novalidate'),
settings = form.data(this.attr_name(true) + '-init') || {};
this.invalid_attr = this.add_namespace('data-invalid');
function validate(originalSelf, e) {
clearTimeout(self.timer);
self.timer = setTimeout(function () {
self.validate([originalSelf], e);
}.bind(originalSelf), settings.timeout);
}
form
.off('.abide')
.on('submit.fndtn.abide', function (e) {
var is_ajax = /ajax/i.test(self.S(this).attr(self.attr_name()));
return self.validate(self.S(this).find('input, textarea, select').not(":hidden, [data-abide-ignore]").get(), e, is_ajax);
})
.on('validate.fndtn.abide', function (e) {
if (settings.validate_on === 'manual') {
self.validate([e.target], e);
}
})
.on('reset', function (e) {
return self.reset($(this), e);
})
.find('input, textarea, select').not(":hidden, [data-abide-ignore]")
.off('.abide')
.on('blur.fndtn.abide change.fndtn.abide', function (e) {
// old settings fallback
// will be deprecated with F6 release
if (settings.validate_on_blur && settings.validate_on_blur === true) {
validate(this, e);
}
// new settings combining validate options into one setting
if (settings.validate_on === 'change') {
validate(this, e);
}
})
.on('keydown.fndtn.abide', function (e) {
// old settings fallback
// will be deprecated with F6 release
if (settings.live_validate && settings.live_validate === true && e.which != 9) {
validate(this, e);
}
// new settings combining validate options into one setting
if (settings.validate_on === 'tab' && e.which === 9) {
validate(this, e);
}
else if (settings.validate_on === 'change') {
validate(this, e);
}
})
.on('focus', function (e) {
if (navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)) {
$('html, body').animate({
scrollTop: $(e.target).offset().top
}, 100);
}
});
},
reset : function (form, e) {
var self = this;
form.removeAttr(self.invalid_attr);
$('[' + self.invalid_attr + ']', form).removeAttr(self.invalid_attr);
$('.' + self.settings.error_class, form).not('small').removeClass(self.settings.error_class);
$(':input', form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr(self.invalid_attr);
},
validate : function (els, e, is_ajax) {
var validations = this.parse_patterns(els),
validation_count = validations.length,
form = this.S(els[0]).closest('form'),
submit_event = /submit/.test(e.type);
// Has to count up to make sure the focus gets applied to the top error
for (var i = 0; i < validation_count; i++) {
if (!validations[i] && (submit_event || is_ajax)) {
if (this.settings.focus_on_invalid) {
els[i].focus();
}
form.trigger('invalid.fndtn.abide');
this.S(els[i]).closest('form').attr(this.invalid_attr, '');
return false;
}
}
if (submit_event || is_ajax) {
form.trigger('valid.fndtn.abide');
}
form.removeAttr(this.invalid_attr);
if (is_ajax) {
return false;
}
return true;
},
parse_patterns : function (els) {
var i = els.length,
el_patterns = [];
while (i--) {
el_patterns.push(this.pattern(els[i]));
}
return this.check_validation_and_apply_styles(el_patterns);
},
pattern : function (el) {
var type = el.getAttribute('type'),
required = typeof el.getAttribute('required') === 'string';
var pattern = el.getAttribute('pattern') || '';
if (this.settings.patterns.hasOwnProperty(pattern) && pattern.length > 0) {
return [el, this.settings.patterns[pattern], required];
} else if (pattern.length > 0) {
return [el, new RegExp(pattern), required];
}
if (this.settings.patterns.hasOwnProperty(type)) {
return [el, this.settings.patterns[type], required];
}
pattern = /.*/;
return [el, pattern, required];
},
// TODO: Break this up into smaller methods, getting hard to read.
check_validation_and_apply_styles : function (el_patterns) {
var i = el_patterns.length,
validations = [],
form = this.S(el_patterns[0][0]).closest('[data-' + this.attr_name(true) + ']'),
settings = form.data(this.attr_name(true) + '-init') || {};
while (i--) {
var el = el_patterns[i][0],
required = el_patterns[i][2],
value = el.value.trim(),
direct_parent = this.S(el).parent(),
validator = el.getAttribute(this.add_namespace('data-abide-validator')),
is_radio = el.type === 'radio',
is_checkbox = el.type === 'checkbox',
label = this.S('label[for="' + el.getAttribute('id') + '"]'),
valid_length = (required) ? (el.value.length > 0) : true,
el_validations = [];
var parent, valid;
// support old way to do equalTo validations
if (el.getAttribute(this.add_namespace('data-equalto'))) { validator = 'equalTo' }
if (!direct_parent.is('label')) {
parent = direct_parent;
} else {
parent = direct_parent.parent();
}
if (is_radio && required) {
el_validations.push(this.valid_radio(el, required));
} else if (is_checkbox && required) {
el_validations.push(this.valid_checkbox(el, required));
} else if (validator) {
// Validate using each of the specified (space-delimited) validators.
var validators = validator.split(' ');
var last_valid = true, all_valid = true;
for (var iv = 0; iv < validators.length; iv++) {
valid = this.settings.validators[validators[iv]].apply(this, [el, required, parent])
el_validations.push(valid);
all_valid = valid && last_valid;
last_valid = valid;
}
if (all_valid) {
this.S(el).removeAttr(this.invalid_attr);
parent.removeClass('error');
if (label.length > 0 && this.settings.error_labels) {
label.removeClass(this.settings.error_class).removeAttr('role');
}
$(el).triggerHandler('valid');
} else {
this.S(el).attr(this.invalid_attr, '');
parent.addClass('error');
if (label.length > 0 && this.settings.error_labels) {
label.addClass(this.settings.error_class).attr('role', 'alert');
}
$(el).triggerHandler('invalid');
}
} else {
if (el_patterns[i][1].test(value) && valid_length ||
!required && el.value.length < 1 || $(el).attr('disabled')) {
el_validations.push(true);
} else {
el_validations.push(false);
}
el_validations = [el_validations.every(function (valid) {return valid;})];
if (el_validations[0]) {
this.S(el).removeAttr(this.invalid_attr);
el.setAttribute('aria-invalid', 'false');
el.removeAttribute('aria-describedby');
parent.removeClass(this.settings.error_class);
if (label.length > 0 && this.settings.error_labels) {
label.removeClass(this.settings.error_class).removeAttr('role');
}
$(el).triggerHandler('valid');
} else {
this.S(el).attr(this.invalid_attr, '');
el.setAttribute('aria-invalid', 'true');
// Try to find the error associated with the input
var errorElem = parent.find('small.' + this.settings.error_class, 'span.' + this.settings.error_class);
var errorID = errorElem.length > 0 ? errorElem[0].id : '';
if (errorID.length > 0) {
el.setAttribute('aria-describedby', errorID);
}
// el.setAttribute('aria-describedby', $(el).find('.error')[0].id);
parent.addClass(this.settings.error_class);
if (label.length > 0 && this.settings.error_labels) {
label.addClass(this.settings.error_class).attr('role', 'alert');
}
$(el).triggerHandler('invalid');
}
}
validations = validations.concat(el_validations);
}
return validations;
},
valid_checkbox : function (el, required) {
var el = this.S(el),
valid = (el.is(':checked') || !required || el.get(0).getAttribute('disabled'));
if (valid) {
el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
$(el).triggerHandler('valid');
} else {
el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
$(el).triggerHandler('invalid');
}
return valid;
},
valid_radio : function (el, required) {
var name = el.getAttribute('name'),
group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='" + name + "']"),
count = group.length,
valid = false,
disabled = false;
// Has to count up to make sure the focus gets applied to the top error
for (var i=0; i < count; i++) {
if( group[i].getAttribute('disabled') ){
disabled=true;
valid=true;
} else {
if (group[i].checked){
valid = true;
} else {
if( disabled ){
valid = false;
}
}
}
}
// Has to count up to make sure the focus gets applied to the top error
for (var i = 0; i < count; i++) {
if (valid) {
this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
$(group[i]).triggerHandler('valid');
} else {
this.S(group[i]).attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
$(group[i]).triggerHandler('invalid');
}
}
return valid;
},
valid_equal : function (el, required, parent) {
var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
to = el.value,
valid = (from === to);
if (valid) {
this.S(el).removeAttr(this.invalid_attr);
parent.removeClass(this.settings.error_class);
if (label.length > 0 && settings.error_labels) {
label.removeClass(this.settings.error_class);
}
} else {
this.S(el).attr(this.invalid_attr, '');
parent.addClass(this.settings.error_class);
if (label.length > 0 && settings.error_labels) {
label.addClass(this.settings.error_class);
}
}
return valid;
},
valid_oneof : function (el, required, parent, doNotValidateOthers) {
var el = this.S(el),
others = this.S('[' + this.add_namespace('data-oneof') + ']'),
valid = others.filter(':checked').length > 0;
if (valid) {
el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
} else {
el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
}
if (!doNotValidateOthers) {
var _this = this;
others.each(function () {
_this.valid_oneof.call(_this, this, null, null, true);
});
}
return valid;
},
reflow : function(scope, options) {
var self = this,
form = self.S('[' + this.attr_name() + ']').attr('novalidate', 'novalidate');
self.S(form).each(function (idx, el) {
self.events(el);
});
}
};
}(jQuery, window, window.document));
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.tooltip = {
name : 'tooltip',
version : '5.5.2',
settings : {
additional_inheritable_classes : [],
tooltip_class : '.tooltip',
append_to : 'body',
touch_close_text : 'Tap To Close',
disable_for_touch : false,
hover_delay : 200,
show_on : 'all',
tip_template : function (selector, content) {
return '<span data-selector="' + selector + '" id="' + selector + '" class="'
+ Foundation.libs.tooltip.settings.tooltip_class.substring(1)
+ '" role="tooltip">' + content + '<span class="nub"></span></span>';
}
},
cache : {},
init : function (scope, method, options) {
Foundation.inherit(this, 'random_str');
this.bindings(method, options);
},
should_show : function (target, tip) {
var settings = $.extend({}, this.settings, this.data_options(target));
if (settings.show_on === 'all') {
return true;
} else if (this.small() && settings.show_on === 'small') {
return true;
} else if (this.medium() && settings.show_on === 'medium') {
return true;
} else if (this.large() && settings.show_on === 'large') {
return true;
}
return false;
},
medium : function () {
return matchMedia(Foundation.media_queries['medium']).matches;
},
large : function () {
return matchMedia(Foundation.media_queries['large']).matches;
},
events : function (instance) {
var self = this,
S = self.S;
self.create(this.S(instance));
function _startShow(elt, $this, immediate) {
if (elt.timer) {
return;
}
if (immediate) {
elt.timer = null;
self.showTip($this);
} else {
elt.timer = setTimeout(function () {
elt.timer = null;
self.showTip($this);
}.bind(elt), self.settings.hover_delay);
}
}
function _startHide(elt, $this) {
if (elt.timer) {
clearTimeout(elt.timer);
elt.timer = null;
}
self.hide($this);
}
$(this.scope)
.off('.tooltip')
.on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip',
'[' + this.attr_name() + ']', function (e) {
var $this = S(this),
settings = $.extend({}, self.settings, self.data_options($this)),
is_touch = false;
if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type) && S(e.target).is('a')) {
return false;
}
if (/mouse/i.test(e.type) && self.ie_touch(e)) {
return false;
}
if ($this.hasClass('open')) {
if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
e.preventDefault();
}
self.hide($this);
} else {
if (settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
return;
} else if (!settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
e.preventDefault();
S(settings.tooltip_class + '.open').hide();
is_touch = true;
// close other open tooltips on touch
if ($('.open[' + self.attr_name() + ']').length > 0) {
var prevOpen = S($('.open[' + self.attr_name() + ']')[0]);
self.hide(prevOpen);
}
}
if (/enter|over/i.test(e.type)) {
_startShow(this, $this);
} else if (e.type === 'mouseout' || e.type === 'mouseleave') {
_startHide(this, $this);
} else {
_startShow(this, $this, true);
}
}
})
.on('mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', '[' + this.attr_name() + '].open', function (e) {
if (/mouse/i.test(e.type) && self.ie_touch(e)) {
return false;
}
if ($(this).data('tooltip-open-event-type') == 'touch' && e.type == 'mouseleave') {
return;
} else if ($(this).data('tooltip-open-event-type') == 'mouse' && /MSPointerDown|touchstart/i.test(e.type)) {
self.convert_to_touch($(this));
} else {
_startHide(this, $(this));
}
})
.on('DOMNodeRemoved DOMAttrModified', '[' + this.attr_name() + ']:not(a)', function (e) {
_startHide(this, S(this));
});
},
ie_touch : function (e) {
// How do I distinguish between IE11 and Windows Phone 8?????
return false;
},
showTip : function ($target) {
var $tip = this.getTip($target);
if (this.should_show($target, $tip)) {
return this.show($target);
}
return;
},
getTip : function ($target) {
var selector = this.selector($target),
settings = $.extend({}, this.settings, this.data_options($target)),
tip = null;
if (selector) {
tip = this.S('span[data-selector="' + selector + '"]' + settings.tooltip_class);
}
return (typeof tip === 'object') ? tip : false;
},
selector : function ($target) {
var dataSelector = $target.attr(this.attr_name()) || $target.attr('data-selector');
if (typeof dataSelector != 'string') {
dataSelector = this.random_str(6);
$target
.attr('data-selector', dataSelector)
.attr('aria-describedby', dataSelector);
}
return dataSelector;
},
create : function ($target) {
var self = this,
settings = $.extend({}, this.settings, this.data_options($target)),
tip_template = this.settings.tip_template;
if (typeof settings.tip_template === 'string' && window.hasOwnProperty(settings.tip_template)) {
tip_template = window[settings.tip_template];
}
var $tip = $(tip_template(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
classes = this.inheritable_classes($target);
$tip.addClass(classes).appendTo(settings.append_to);
if (Modernizr.touch) {
$tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
$tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', function (e) {
self.hide($target);
});
}
$target.removeAttr('title').attr('title', '');
},
reposition : function (target, tip, classes) {
var width, nub, nubHeight, nubWidth, column, objPos;
tip.css('visibility', 'hidden').show();
width = target.data('width');
nub = tip.children('.nub');
nubHeight = nub.outerHeight();
nubWidth = nub.outerHeight();
if (this.small()) {
tip.css({'width' : '100%'});
} else {
tip.css({'width' : (width) ? width : 'auto'});
}
objPos = function (obj, top, right, bottom, left, width) {
return obj.css({
'top' : (top) ? top : 'auto',
'bottom' : (bottom) ? bottom : 'auto',
'left' : (left) ? left : 'auto',
'right' : (right) ? right : 'auto'
}).end();
};
objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', target.offset().left);
if (this.small()) {
objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', 12.5, $(this.scope).width());
tip.addClass('tip-override');
objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
} else {
var left = target.offset().left;
if (Foundation.rtl) {
nub.addClass('rtl');
left = target.offset().left + target.outerWidth() - tip.outerWidth();
}
objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', left);
// reset nub from small styles, if they've been applied
if (nub.attr('style')) {
nub.removeAttr('style');
}
tip.removeClass('tip-override');
if (classes && classes.indexOf('tip-top') > -1) {
if (Foundation.rtl) {
nub.addClass('rtl');
}
objPos(tip, (target.offset().top - tip.outerHeight()), 'auto', 'auto', left)
.removeClass('tip-override');
} else if (classes && classes.indexOf('tip-left') > -1) {
objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left - tip.outerWidth() - nubHeight))
.removeClass('tip-override');
nub.removeClass('rtl');
} else if (classes && classes.indexOf('tip-right') > -1) {
objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left + target.outerWidth() + nubHeight))
.removeClass('tip-override');
nub.removeClass('rtl');
}
}
tip.css('visibility', 'visible').hide();
},
small : function () {
return matchMedia(Foundation.media_queries.small).matches &&
!matchMedia(Foundation.media_queries.medium).matches;
},
inheritable_classes : function ($target) {
var settings = $.extend({}, this.settings, this.data_options($target)),
inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'radius', 'round'].concat(settings.additional_inheritable_classes),
classes = $target.attr('class'),
filtered = classes ? $.map(classes.split(' '), function (el, i) {
if ($.inArray(el, inheritables) !== -1) {
return el;
}
}).join(' ') : '';
return $.trim(filtered);
},
convert_to_touch : function ($target) {
var self = this,
$tip = self.getTip($target),
settings = $.extend({}, self.settings, self.data_options($target));
if ($tip.find('.tap-to-close').length === 0) {
$tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
$tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose', function (e) {
self.hide($target);
});
}
$target.data('tooltip-open-event-type', 'touch');
},
show : function ($target) {
var $tip = this.getTip($target);
if ($target.data('tooltip-open-event-type') == 'touch') {
this.convert_to_touch($target);
}
this.reposition($target, $tip, $target.attr('class'));
$target.addClass('open');
$tip.fadeIn(150);
},
hide : function ($target) {
var $tip = this.getTip($target);
$tip.fadeOut(150, function () {
$tip.find('.tap-to-close').remove();
$tip.off('click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');
$target.removeClass('open');
});
},
off : function () {
var self = this;
this.S(this.scope).off('.fndtn.tooltip');
this.S(this.settings.tooltip_class).each(function (i) {
$('[' + self.attr_name() + ']').eq(i).attr('title', $(this).text());
}).remove();
},
reflow : function () {}
};
}(jQuery, window, window.document));
|
tterrasson/glider
|
public/javascripts/foundation.min.js
|
JavaScript
|
mit
| 209,208
|
'use strict';
angular.module('dandelionApp')
.controller('CheckoutCtrl', function($scope, Auth, Checkout, $cookies) {
Checkout.queryAddress()
.then((res) => {
$scope.addresses = res;
if($cookies.get('chosenAddress')){
$scope.chosenAddress = Checkout.getAddress($cookies.get('chosenAddress'));
}
else {
console.log('No cookies');
$scope.chosenAddress = Checkout.getDefaultAddress();
}
});
});
|
TamHi/Dandelion
|
client/app/checkout/checkout.controller.js
|
JavaScript
|
mit
| 482
|
version https://git-lfs.github.com/spec/v1
oid sha256:99ae94d3e1137aa3185aa9a3bf42ec070ea3474d9d8825273ca7aff2c6d98383
size 83856
|
yogeshsaroya/new-cdnjs
|
ajax/libs/yui/3.6.0/yui/yui-min.js
|
JavaScript
|
mit
| 130
|
$('nav span').mouseenter(function() {
$('nav').removeClass('closed');
});
$('nav').mouseleave(function() {
$('nav').addClass('closed');
});
$('nav a').click(function() {
var page = $(this).parent().index();
$('html,body').animate({
scrollTop: $('.section-container > section').eq(page).offset().top
}, 500);
});
$(window).scroll(function() {
var bottom = $(window).scrollTop() + window.innerHeight,
contentBottom = $('.keywords').offset().top,
footerTop = $('footer').offset().top;
if (bottom < contentBottom || bottom > footerTop) {
$('.arrow').removeClass('black');
} else {
$('.arrow').addClass('black');
}
});
$('.section-container').imagesLoaded().always(function() {
console.log('images have loaded');
$('.preloader').addClass('loaded');
setTimeout(function() {
$('.preloader').addClass('hidden');
}, 1000);
});
(function(window){
if (Modernizr.touch) {
[].slice.call(document.querySelectorAll("figure")).forEach(function(el,i){
var fingerMove = false;
el.addEventListener("touchmove",function(e){
e.stopPropagation();
fingerMove = true;
});
el.addEventListener("touchstart",function(e){
e.stopPropagation();
fingerMove = false;
});
el.addEventListener("touchend",function(e){
e.stopPropagation();
if (fingerMove === false) {
classie.toggle(el,"hover");
}
});
});
}
})(window);
|
illicit-design/illicit-design.github.io
|
js/main.js
|
JavaScript
|
mit
| 1,566
|
(function() {
'use strict';
angular
.module('ngRouteApp')
.run(runBlock);
/** @ngInject */
function runBlock($log) {
$log.debug('runBlock end');
}
})();
|
Toilal/showcase-ng-routers
|
ng-route-app/src/app/index.run.js
|
JavaScript
|
mit
| 179
|
function setup() {
createCanvas(600, 900);
background(175, 233, 255);
// Balloons
for (var i = 0; i < 1000; i++) {
var randomX = Math.floor((Math.random() * 580) + 10);
var randomY = Math.floor((Math.random() * 525) + 1);
while(Math.sqrt(((randomX-600)*(randomX)-600) + (randomY-250)*(randomY-250)) < 300){
randomX = Math.floor((Math.random() * 580) + 10);
}
var c = color('hsl('+Math.floor((Math.random() * 360))+', 100%, 60%)');
noFill();
stroke(c);
curve(randomX-100, randomY+100, randomX, randomY+28, 300, 650, randomX+100, randomY-100);
fill(c);
noStroke();
ellipse(randomX, randomY, 30, 30);
triangle(randomX-13,randomY+8, randomX+13,randomY+8, randomX,randomY+30);
}
// House
fill(130, 60, 0); // brown chim
quad(280, 700, 310, 700, 310, 645, 280, 645);
fill(238, 139, 139); // pink
rect(245, 750, 140, 100);
strokeWeight(3);
stroke(255);
fill(98, 213, 239); //blue
rect(245, 750, 140, 10);
noStroke();
fill(110, 80, 0); // brown roof
quad(225, 750, 405, 750, 375, 700, 255, 700);
fill(244, 229, 66); //yellow
triangle(370, 730, 310, 730, 340, 660);
quad(370, 730, 310, 730, 310, 760, 370, 760);
fill(144, 229, 98); //green
quad(370, 850, 310, 850, 310, 760, 370, 760);
fill(255, 211, 236); //light pink lower house
rect(245, 835, 140, 15);
// pink upper window
strokeWeight(3);
stroke(238, 139, 139);
noFill();
rect(330, 705, 20, 40);
strokeWeight(1);
line(330, 725, 350, 725);
//orange line
stroke(255, 152, 17);
strokeWeight(8);
noFill();
line(310, 760, 370, 760);
// brown lower window
strokeWeight(3);
stroke(130, 60, 0);
noFill();
rect(325, 775, 30, 40);
strokeWeight(1);
line(325, 795, 355, 795);
line(340, 775, 340, 815);
// door
stroke(255);
strokeWeight(1);
fill(130, 60, 0); // brown
quad(285, 835, 305, 835, 305, 790, 285, 790);
// white railing
strokeWeight(3);
stroke(255);
noFill();
line(245, 750, 245, 850);
line(255, 825, 255, 850);
line(265, 825, 265, 850);
line(275, 750, 275, 850);
strokeWeight(1);
line(245, 824, 275, 824);
}
|
melissaelopez/melissaelopez.github.io
|
interactive/assignment01/sketch.js
|
JavaScript
|
mit
| 2,204
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _crossValidate = require('./cross-validate');
var _crossValidate2 = _interopRequireDefault(_crossValidate);
var _likely = require('./likely');
var _likely2 = _interopRequireDefault(_likely);
var _lookup = require('./lookup');
var _lookup2 = _interopRequireDefault(_lookup);
var _neuralNetwork = require('./neural-network');
var _neuralNetwork2 = _interopRequireDefault(_neuralNetwork);
var _neuralNetworkGpu = require('./neural-network-gpu');
var _neuralNetworkGpu2 = _interopRequireDefault(_neuralNetworkGpu);
var _trainStream = require('./train-stream');
var _trainStream2 = _interopRequireDefault(_trainStream);
var _rnn = require('./recurrent/rnn');
var _rnn2 = _interopRequireDefault(_rnn);
var _lstm = require('./recurrent/lstm');
var _lstm2 = _interopRequireDefault(_lstm);
var _gru = require('./recurrent/gru');
var _gru2 = _interopRequireDefault(_gru);
var _rnnTimeStep = require('./recurrent/rnn-time-step');
var _rnnTimeStep2 = _interopRequireDefault(_rnnTimeStep);
var _lstmTimeStep = require('./recurrent/lstm-time-step');
var _lstmTimeStep2 = _interopRequireDefault(_lstmTimeStep);
var _gruTimeStep = require('./recurrent/gru-time-step');
var _gruTimeStep2 = _interopRequireDefault(_gruTimeStep);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = {
crossValidate: _crossValidate2.default,
likely: _likely2.default,
lookup: _lookup2.default,
NeuralNetwork: _neuralNetwork2.default,
NeuralNetworkGPU: _neuralNetworkGpu2.default,
TrainStream: _trainStream2.default,
recurrent: {
RNN: _rnn2.default,
LSTM: _lstm2.default,
GRU: _gru2.default,
RNNTimeStep: _rnnTimeStep2.default,
LSTMTimeStep: _lstmTimeStep2.default,
GRUTimeStep: _gruTimeStep2.default
}
};
//# sourceMappingURL=index.js.map
|
PreCogSecurity/PreCogSecurity.github.io
|
js/dist/index.js
|
JavaScript
|
mit
| 1,913
|
import https from 'https'
import xml2js from 'xml2js'
export default class Request {
constructor (endpoint) {
this.endpoint = endpoint
}
async fetch () {
return new Promise((resolve, reject) => {
var req = https.get(this.endpoint, res => {
let xml = ''
res.on('data', chunk => {
xml += chunk
})
res.on('end', () => {
return resolve(this.parse(xml))
})
})
req.on('error', reject)
})
}
async parse (xml) {
return new Promise((resolve, reject) => {
xml2js.parseString(xml, {
strict: false,
parseNumbers: true,
parseBooleans: true,
explicitArray: false,
emptyTag: null,
trim: true
}, (err, data) => {
if (err) {
return reject(err)
}
return resolve(data)
})
})
}
}
|
larsha/bolaget.io
|
services/web/src/lib/request.js
|
JavaScript
|
mit
| 876
|
var res = {
HelloWorld_png : "res/HelloWorld.png",
CloseNormal_png : "res/CloseNormal.png",
CloseSelected_png : "res/CloseSelected.png",
BasketBoxAction0plist : "res/BasketBoxAction0.plist",
BasketBoxAction0png : "res/BasketBoxAction0.png",
BasketBoxAction : "res/BasketBoxAction.ExportJson",
mynum_fnt : 'res/mynum.fnt',
mynum_png : 'res/mynum.png',
ArialBold_90fnt:"res/bmfontbug/ArialBold_90.fnt",
ArialBold_90png:"res/bmfontbug/ArialBold_90.png",
arialBold90fnt:"res/bmfontbug/arialBold90.fnt",
arialBold90png:"res/bmfontbug/arialBold90.png"
};
var g_resources = [];
for (var i in res) {
g_resources.push(res[i]);
}
|
jianglong0156/cocos2d-js
|
samples/issueTest/src/resource.js
|
JavaScript
|
mit
| 672
|
(function() {
'use strict';
angular
.module('rtsApp')
.controller('JhiConfigurationController', JhiConfigurationController);
JhiConfigurationController.$inject = ['$filter','JhiConfigurationService'];
function JhiConfigurationController (filter,JhiConfigurationService) {
var vm = this;
vm.allConfiguration = null;
vm.configuration = null;
JhiConfigurationService.get().then(function(configuration) {
vm.configuration = configuration;
});
JhiConfigurationService.getEnv().then(function (configuration) {
vm.allConfiguration = configuration;
});
}
})();
|
EnricoSchw/readthisstuff.com
|
src/main/webapp/app/admin/configuration/configuration.controller.js
|
JavaScript
|
mit
| 674
|
(function(window) {
window.BarLineChart = BarLineChart;
var x, y, xAxis, yAxis, xDomain;
var defaultOption = {
margin : {top: 20, right: 20, bottom: 70, left: 40},
height : 200,
dateFormat: '%Y/%m/%d',
showLine: true
};
function BarLineChart(id, data, tipHTML, options) {
this.id = id;
this.data = data;
this.tipHTML = tipHTML;
this.options = defaultOption;
options = options || {};
$.extend(this.options, options);
this.barDivWidth = $(id).width();
this.options.width = this.barDivWidth - this.options.margin.left -
this.options.margin.right;
this.tip = d3.tip()
.attr('class', 'd3-tip')
.offset([-10, 0]);
this.drawChart();
}
BarLineChart.prototype.drawChart = function() {
var vm = this;
var parseDate = d3.time.format(vm.options.dateFormat).parse,
svgHeight = vm.options.height + vm.options.margin.top +
vm.options.margin.bottom;
vm.tip.html(vm.tipHTML);
svg = d3.select(vm.id).append("svg")
.attr("width", '100%')
.attr("height", svgHeight)
.append("g")
.attr("transform",
"translate(" + vm.options.margin.left + "," + vm.options.margin.top + ")")
.call(vm.tip);
vm.data.forEach(function(d) {
if (typeof d.date === 'string') d.date = parseDate(d.date);
d.value = +d.value;
});
xDomain =d3.extent(vm.data, function(d) { return d.date; } );
x = d3.time.scale().domain(xDomain).range([0, vm.options.width]);
y = d3.scale.linear().range([vm.options.height, 0]);
xAxis = d3.svg.axis()
.scale(x)
.orient("bottom")
.ticks(30)
.tickFormat(d3.time.format("%m/%d"));
yAxis = d3.svg.axis()
.scale(y)
.orient("left")
.ticks(10);
//x.domain(data.map(function(d) { return d.date; }));
y.domain([0, d3.max(vm.data, function(d) { return d.value; })]);
vm.addBar();
vm.addAxis();
if (vm.options.showLine) {
vm.addMovingLine(5, '五日移動平均線', '#E10707', -10, vm.options.width-100);
vm.addMovingLine(10, '十日移動平均線', '#15B321', -10, vm.options.width-220);
}
};
BarLineChart.prototype.addMovingLine = function(days, title, color, y_pos, x_pos) {
var vm = this;
var movingAverageLine = movingAvg(days);
var lineData = movingAverageLine(vm.data);
var line = d3.svg.line()
.interpolate("basis")
.x(function(d) { return x(d.date); })
.y(function(d) { return y(d.value); });
svg.append("path")
.datum(lineData)
.attr("class", "line")
.attr("stroke", color)
.attr("d", line);
svg.append("text")
.attr("transform", "translate(" + x_pos + "," + y_pos + ")")
.attr("dy", ".35em")
.attr("text-anchor", "start")
.style("fill", color)
.text(title);
};
BarLineChart.prototype.addBar = function() {
var vm = this;
var barWidth = vm.options.width / getDiffDays(xDomain[0], xDomain[1]);
if (barWidth < 0) barWidth = 1;
svg.selectAll("bar")
.data(vm.data)
.enter().append("rect")
.style("fill", function(d) {
if (d.降水量 > 0) {
return 'orange';
}
return "steelblue";
})
.attr("x", function(d) { return x(d.date); })
.attr("width", barWidth)
.attr("y", function(d) { return y(d.value); })
.attr("height", function(d) { return vm.options.height - y(d.value); })
.attr('id', function(d) {
var _d = new Date(d.date.getTime()+86400000);
var id = 'bar-'+_d.toISOString().substring(0, 10).replace(/-/g, '-');
return id;
})
.on('mouseover', vm.tip.show)
.on('mouseout', vm.tip.hide)
.on('click', function(d) {
var value = getDiffDays(d.date, new Date('2015/06/01'));
var input = $('.range input')[0];
input.value = value;
window.updateVis(input, null);
});
};
BarLineChart.prototype.addAxis = function() {
var vm = this;
svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + vm.options.height + ")")
.call(xAxis)
.selectAll("text")
.style("text-anchor", "end")
.attr("dx", "-.8em")
.attr("dy", "-.55em")
.attr("transform", "rotate(-65)" );
svg.append("g")
.attr("class", "y axis")
.call(yAxis)
.append("text")
.attr("transform", "rotate(-90)")
.attr("y", 6)
.attr("dy", ".71em")
.style("text-anchor", "end")
.text("當日病例數(人)");
};
function movingAvg(n) {
return function (points) {
points = points.map(function(each, index, array) {
var to = index + n - 1;
var subSeq, sum, indexDay;
if (to < points.length) {
subSeq = array.slice(index, to + 1);
indexDay = subSeq[subSeq.length-1];
sum = subSeq.reduce(function(a,b) {
if (getDiffDays(a.date, b.date) < n) {
return {value: a.value + b.value, date: indexDay.date };
}
return {value: a.value, date: indexDay.date};
});
return {value: sum.value/n, date: indexDay.date};
}
return undefined;
});
points = points.filter(function(each) { return typeof each !== 'undefined';});
return points;
};
}
function getDiffDays(d1, d2) {
var timeDiff = Math.abs(d1.getTime() - d2.getTime());
var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
return diffDays;
}
})(window);
|
TaiwanStat/real.taiwanstat.com
|
kaohsiung-2015-dengue/js/bar.js
|
JavaScript
|
mit
| 5,596
|
import React from 'react';
import mui from 'material-ui';
var RaisedButton = mui.RaisedButton;
var ThemeManager = new mui.Styles.ThemeManager();
import EnergyStore from 'app/stores/EnergyStore';
import GeneratorActions from 'app/actions/GeneratorActions';
class Generator extends React.Component {
render() {
return <div>
energy: {this.state.energy}
<RaisedButton label="start" onClick={this.start} />
<RaisedButton label="stop" onClick={this.stop} />
<RaisedButton label="inc" onClick={this.inc} />
</div>
}
constructor(props) {
super(props);
this.state = this.getGeneratorState();
// required by ES6 classes in all class methods NOT
// normally apart of the React.Component
// To reiterate: this is not standard ES6 and is not needed for normal ES6 classes
// This is referred to as a "stopgap" - https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#autobinding
this.start = this.start.bind(this);
this.stop = this.stop.bind(this);
this.onChange = this.onChange.bind(this);
// this.getChildContext = this.getChildContext.bind(this);
//this.childContextTypes = this.childContextTypes.bind(this);
}
componentWillMount() {
// this.setState({energy:0});
EnergyStore.addChangeListener(this.onChange);
}
componentWillUnmount() {
if(this.energyInterval)
clearInterval(this.energyInterval);
EnergyStore.removeChangeListener(this.onChange);
}
// TODO: GeneratorActions.increaseEnergy()
start () {
GeneratorActions.startGenerator();
}
stop () {
GeneratorActions.stopGenerator();
}
inc() {
GeneratorActions.increaseEnergy();
}
getGeneratorState() {
return {
energy: EnergyStore.get()
}
}
onChange() {
this.setState(this.getGeneratorState());
}
getChildContext() {
return {
muiTheme: ThemeManager.getCurrentTheme()
};
}
}
// static properties not supported
// TODO: try a get/set with this name
// that returns a module-level object?
Generator.childContextTypes = {
muiTheme: React.PropTypes.object
};
export default Generator;
|
BennuAshes/react-in-the-ashes
|
www/app/components/Generator.react.js
|
JavaScript
|
mit
| 2,367
|
import { expect } from 'chai'
import { shallow, render, mount } from 'enzyme'
import React from 'react'
import chaiEnzyme from 'chai-enzyme'
// chai.use(chaiEnzyme())
import GalleryPhoto from '../../src/components/GalleryPhoto'
import PhotoFooter from '../../src/components/PhotoFooter'
describe('GalleryPhoto', () => {
it('renders a gallery photo', () => {
const wrapper = shallow(React.createElement(GalleryPhoto))
expect(wrapper.find('div.galleryPhoto')).to.be.length(1)
})
it('contains a photoFooter component', () => {
const wrapper = shallow(React.createElement(GalleryPhoto))
expect(wrapper.find(PhotoFooter)).to.be.length(1)
})
it('has a name property',() => {
const wrapper = shallow(React.createElement(GalleryPhoto))
expect(wrapper.props().name).to.be.defined
})
it('has to be clickable',() => {
const wrapper = mount(React.createElement(GalleryPhoto))
let hasClicked = false
let galleryClick = () => hasClicked = true
})
it('has to send a query to the database',() => {
const wrapper = shallow(React.createElement(GalleryPhoto))
expect(wrapper.props().name).to.be.defined
})
it('has to pull the query from the database',() => {
const wrapper = shallow(React.createElement(GalleryPhoto))
expect(wrapper.props().name).to.be.defined
})
})
|
kakapo2016-projects/tooth-and-pail
|
test/components/gallery-photo-test.js
|
JavaScript
|
mit
| 1,334
|
/* eslint-env node */
/* eslint no-console: 0 */
const browserSync = require('browser-sync');
const gulp = require('gulp');
const plugins = require('gulp-load-plugins')();
const getBrowserSync = (name = 'default') => {
if (browserSync.has(name)) {
return browserSync.get(name);
}
return browserSync.create(name);
};
const getModule = (task, type) => {
let module = require(`tasks/${task}`)(gulp, plugins);
if (typeof type === 'undefined') {
return module;
}
if (typeof module[type] !== 'undefined') {
return module[type];
}
console.error(task, type);
return {};
};
module.exports = {
getBrowserSync,
getModule
};
|
Penguinee/project-boilerplate
|
resources/gulp/helpers.js
|
JavaScript
|
mit
| 705
|
"use strict";
const { check, files, bump } = require("../utils");
const { expect } = require("chai");
describe("bump minor", () => {
it("should increment an all-zero version number", () => {
files.create("package.json", { version: "0.0.0" });
let cli = bump("minor");
expect(cli).to.have.stderr("");
expect(cli).to.have.exitCode(0);
expect(cli).to.have.stdout(
`${check} Updated package.json to 0.1.0\n`
);
expect(files.json("package.json")).to.deep.equal({ version: "0.1.0" });
});
it("should reset the patch", () => {
files.create("package.json", { version: "1.2.3" });
let cli = bump("minor");
expect(cli).to.have.stderr("");
expect(cli).to.have.exitCode(0);
expect(cli).to.have.stdout(
`${check} Updated package.json to 1.3.0\n`
);
expect(files.json("package.json")).to.deep.equal({ version: "1.3.0" });
});
it("should reset the prerelease version", () => {
files.create("package.json", { version: "1.2.3-beta.4" });
let cli = bump("minor");
expect(cli).to.have.stderr("");
expect(cli).to.have.exitCode(0);
expect(cli).to.have.stdout(
`${check} Updated package.json to 1.3.0\n`
);
expect(files.json("package.json")).to.deep.equal({ version: "1.3.0" });
});
it("should not be affected by the --preid flag", () => {
files.create("package.json", { version: "1.2.3-beta.4" });
let cli = bump("minor --preid alpha");
expect(cli).to.have.stderr("");
expect(cli).to.have.exitCode(0);
expect(cli).to.have.stdout(
`${check} Updated package.json to 1.3.0\n`
);
expect(files.json("package.json")).to.deep.equal({ version: "1.3.0" });
});
it("should error if there is no existing version number", () => {
files.create("package.json", { name: "my-app" });
files.create("bower.json", { version: "" });
files.create("component.json", { version: 0 });
let cli = bump("minor *.json");
expect(cli).to.have.stdout("");
expect(cli).to.have.stderr("Unable to determine the current version number. Checked bower.json, component.json, package.json.\n");
expect(cli).to.have.exitCode(1);
expect(files.json("package.json")).to.deep.equal({ name: "my-app" });
expect(files.json("bower.json")).to.deep.equal({ version: "" });
expect(files.json("component.json")).to.deep.equal({ version: 0 });
});
});
|
BigstickCarpet/version-bump-prompt
|
test/specs/minor.spec.js
|
JavaScript
|
mit
| 2,402
|
var _ = require('lodash');
export default _;
|
dobre-robert-marius/nucleo-cli
|
packages/vendor/lodash/main.js
|
JavaScript
|
mit
| 45
|
var HaProxy = require("github.com/quilt/haproxy").Haproxy;
var Mongo = require("github.com/quilt/mongo");
var Node = require("github.com/NetSys/quilt/specs/node/node");
// AWS
var namespace = createDeployment({
namespace: "CHANGE_ME",
adminACL: ["local"],
});
var baseMachine = new Machine({
provider: "Amazon",
cpu: new Range(2),
ram: new Range(2),
sshKeys: githubKeys("ejj"),
});
namespace.deploy(baseMachine.asMaster());
namespace.deploy(baseMachine.asWorker().replicate(3));
var mongo = new Mongo(3);
var app = new Node({
nWorker: 3,
image: "quilt/mean-service",
env: {
PORT: "80",
MONGO_URI: mongo.uri("mean-example")
}
});
var haproxy = new HaProxy(3, app.services());
// Places all haproxy containers on separate Worker VMs.
// This is just for convenience for the example instructions, as it allows us to
// access the web application by using the IP address of any Worker VM.
haproxy.service.place(new LabelRule(true, haproxy.service));
mongo.connect(mongo.port(), app);
app.connect(mongo.port(), mongo);
haproxy.public();
namespace.deploy(app);
namespace.deploy(mongo);
namespace.deploy(haproxy);
|
mmussomele/quilt
|
specs/mean/example.js
|
JavaScript
|
mit
| 1,152
|
import "./src/css/style.css";
require("inter-ui");
require("prism-solarized-dark/prism-solarizeddark.css");
|
jaydenwindle/jaydenwindle.github.io
|
gatsby-browser.js
|
JavaScript
|
mit
| 109
|
/**
* Created by Ashu on 23/10/14.
*/
jQuery(function($) {
if (navigator.userAgent.indexOf("MSIE") < 0) {
//IE8 不支持console
console.log("^_^ 想加入笔戈科技开发团队?请发送邮件到 liuxing@meizu.com");
}
if($("img.lazy") && $("img.lazy").length > 0)
$("img.lazy").lazyload({
effect: "fadeIn",
threshold : 500
});
$(document).ready( function() {
var qrcode = $(".qrcode");
$(".icon-wechat").hover(function(){
var pos = $(this).position();
qrcode.css("left", ($(window).width()-qrcode.width())/2);
qrcode.css("top", pos.top-270);
qrcode.fadeIn().show();
},function(){
qrcode.hide();
});
});
});
|
wangsai/bigertech.com
|
content/themes/bigertech/assets/js/index.js
|
JavaScript
|
mit
| 701
|
/**
* @constructor UpdateLogger
*/
'use strict'
const colorprint = require('colorprint')
const path = require('path')
/** @lends UpdateLogger */
module.exports = colorprint.define(
/** @lends UpdateLogger.prototype */
{
logSecretUpdated (filename) {
const s = this
let updated = path.relative(process.cwd(), path.resolve(filename))
s.debug(`File updated: ${updated}`)
}
}
)
|
apeman-cmd-labo/apeman-scrt
|
lib/logging/update_logger.js
|
JavaScript
|
mit
| 412
|
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _lodash = require('lodash');
var _autoBind = require('../utils/autoBind');
var _autoBind2 = _interopRequireDefault(_autoBind);
var _getTypeProps = require('../utils/getTypeProps');
var _getTypeProps2 = _interopRequireDefault(_getTypeProps);
var _Struct = require('./Struct');
var _Struct2 = _interopRequireDefault(_Struct);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
// eslint-disable-line
var ObjectEditor = function (_Component) {
_inherits(ObjectEditor, _Component);
function ObjectEditor() {
_classCallCheck(this, ObjectEditor);
var _this = _possibleConstructorReturn(this, _Component.call(this));
_this.state = {};
(0, _autoBind2["default"])(_this, ['updateStateKey', 'createChangeHandler']);
return _this;
}
ObjectEditor.prototype.componentWillMount = function componentWillMount() {
this.setState(this.props.value);
};
ObjectEditor.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
this.setState(nextProps.value);
};
ObjectEditor.prototype.updateStateKey = function updateStateKey(key, val) {
var _setState,
_this2 = this;
this.setState((_setState = {}, _setState[key] = val, _setState), function () {
return _this2.props.onChange(_this2.state);
});
};
ObjectEditor.prototype.createChangeHandler = function createChangeHandler(key) {
return this.updateStateKey.bind(this, key);
};
ObjectEditor.prototype.render = function render() {
var _this3 = this;
var _props = this.props,
objectStruct = _props.struct.objectStruct,
displayProps = _props.displayProps;
var value = (0, _lodash.cloneDeep)(this.state);
return _react2["default"].createElement(
'div',
null,
Object.keys(objectStruct).map(function (key, index) {
return _react2["default"].createElement(_Struct2["default"], _extends({
key: index,
value: value[key],
struct: objectStruct[key],
onChange: _this3.createChangeHandler(key),
displayProps: displayProps
}, (0, _getTypeProps2["default"])(_this3.props)));
})
);
};
return ObjectEditor;
}(_react.Component);
ObjectEditor.propTypes = {
value: _propTypes2["default"].object,
struct: _propTypes2["default"].object.isRequired,
onChange: _propTypes2["default"].func.isRequired,
textTypes: _propTypes2["default"].object.isRequired,
arrayTypes: _propTypes2["default"].object.isRequired,
numberTypes: _propTypes2["default"].object.isRequired,
optionTypes: _propTypes2["default"].object.isRequired,
objectTypes: _propTypes2["default"].object.isRequired,
booleanTypes: _propTypes2["default"].object.isRequired,
keyValueTypes: _propTypes2["default"].object.isRequired,
collectionTypes: _propTypes2["default"].object.isRequired
};
exports["default"] = ObjectEditor;
|
jcgertig/react-struct-editor
|
lib/components/ObjectEditor.js
|
JavaScript
|
mit
| 4,290
|
/* =========================================================
* bootstrap-datepicker.js
* http://www.eyecon.ro/bootstrap-datepicker
* =========================================================
* Copyright 2012 Stefan Petre
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
!function( $ ) {
// Picker object
var Datepicker = function(element, options){
this.element = $(element);
this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');
this.picker = $(DPGlobal.template)
.appendTo('body')
.on({
click: $.proxy(this.click, this),
mousedown: $.proxy(this.mousedown, this)
});
this.isInput = this.element.is('input');
this.component = this.element.is('.date') ? this.element.find('.add-on') : false;
if (this.isInput) {
this.element.on({
focus: $.proxy(this.show, this),
blur: $.proxy(this.hide, this),
keyup: $.proxy(this.update, this)
});
} else {
if (this.component){
this.component.on('click', $.proxy(this.show, this));
} else {
this.element.on('click', $.proxy(this.show, this));
}
}
this.minViewMode = options.minViewMode||this.element.data('date-minviewmode')||0;
if (typeof this.minViewMode === 'string') {
switch (this.minViewMode) {
case 'months':
this.minViewMode = 1;
break;
case 'years':
this.minViewMode = 2;
break;
default:
this.minViewMode = 0;
break;
}
}
this.viewMode = options.viewMode||this.element.data('date-viewmode')||0;
if (typeof this.viewMode === 'string') {
switch (this.viewMode) {
case 'months':
this.viewMode = 1;
break;
case 'years':
this.viewMode = 2;
break;
default:
this.viewMode = 0;
break;
}
}
this.startViewMode = this.viewMode;
this.weekStart = options.weekStart||this.element.data('date-weekstart')||0;
this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1;
this.fillDow();
this.fillMonths();
this.update();
this.showMode();
};
Datepicker.prototype = {
constructor: Datepicker,
show: function(e) {
this.picker.show();
this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
this.place();
$(window).on('resize', $.proxy(this.place, this));
if (e ) {
e.stopPropagation();
e.preventDefault();
}
if (!this.isInput) {
$(document).on('mousedown', $.proxy(this.hide, this));
}
this.element.trigger({
type: 'show',
date: this.date
});
},
hide: function(){
this.picker.hide();
$(window).off('resize', this.place);
this.viewMode = this.startViewMode;
this.showMode();
if (!this.isInput) {
$(document).off('mousedown', this.hide);
}
this.set();
this.element.trigger({
type: 'hide',
date: this.date
});
},
set: function() {
var formated = DPGlobal.formatDate(this.date, this.format);
if (!this.isInput) {
if (this.component){
this.element.find('input').prop('value', formated);
}
this.element.data('date', formated);
} else {
this.element.prop('value', formated);
}
},
setValue: function(newDate) {
if (typeof newDate === 'string') {
this.date = DPGlobal.parseDate(newDate, this.format);
} else {
this.date = new Date(newDate);
}
this.set();
this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);
this.fill();
},
place: function(){
var offset = this.component ? this.component.offset() : this.element.offset();
this.picker.css({
top: offset.top + this.height,
left: offset.left
});
},
update: function(newDate){
newDate = '';
this.date = DPGlobal.parseDate(
typeof newDate === 'string' ? newDate : (this.isInput ? this.element.prop('value') : this.element.data('date')),
this.format
);
this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);
this.fill();
},
fillDow: function(){
var dowCnt = this.weekStart;
var html = '<tr>';
while (dowCnt < this.weekStart + 7) {
html += '<th class="dow">'+DPGlobal.dates.daysMin[(dowCnt++)%7]+'</th>';
}
html += '</tr>';
this.picker.find('.datepicker-days thead').append(html);
},
fillMonths: function(){
var html = '';
var i = 0
while (i < 12) {
html += '<span class="month">'+DPGlobal.dates.monthsShort[i++]+'</span>';
}
this.picker.find('.datepicker-months td').append(html);
},
fill: function() {
var d = new Date(this.viewDate),
year = d.getFullYear(),
month = d.getMonth(),
currentDate = this.date.valueOf();
this.picker.find('.datepicker-days th:eq(1)')
.text(DPGlobal.dates.months[month]+' '+year);
var prevMonth = new Date(year, month-1, 28,0,0,0,0),
day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());
prevMonth.setDate(day);
prevMonth.setDate(day - (prevMonth.getDay() - this.weekStart + 7)%7);
var nextMonth = new Date(prevMonth);
nextMonth.setDate(nextMonth.getDate() + 42);
nextMonth = nextMonth.valueOf();
html = [];
var clsName;
while(prevMonth.valueOf() < nextMonth) {
if (prevMonth.getDay() === this.weekStart) {
html.push('<tr>');
}
clsName = '';
if (prevMonth.getMonth() < month) {
clsName += ' old';
} else if (prevMonth.getMonth() > month) {
clsName += ' new';
}
if (prevMonth.valueOf() === currentDate) {
clsName += ' active';
}
html.push('<td class="day'+clsName+'">'+prevMonth.getDate() + '</td>');
if (prevMonth.getDay() === this.weekEnd) {
html.push('</tr>');
}
prevMonth.setDate(prevMonth.getDate()+1);
}
this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
var currentYear = this.date.getFullYear();
var months = this.picker.find('.datepicker-months')
.find('th:eq(1)')
.text(year)
.end()
.find('span').removeClass('active');
if (currentYear === year) {
months.eq(this.date.getMonth()).addClass('active');
}
html = '';
year = parseInt(year/10, 10) * 10;
var yearCont = this.picker.find('.datepicker-years')
.find('th:eq(1)')
.text(year + '-' + (year + 9))
.end()
.find('td');
year -= 1;
for (var i = -1; i < 11; i++) {
html += '<span class="year'+(i === -1 || i === 10 ? ' old' : '')+(currentYear === year ? ' active' : '')+'">'+year+'</span>';
year += 1;
}
yearCont.html(html);
},
click: function(e) {
e.stopPropagation();
e.preventDefault();
var target = $(e.target).closest('span, td, th');
if (target.length === 1) {
switch(target[0].nodeName.toLowerCase()) {
case 'th':
switch(target[0].className) {
case 'switch':
this.showMode(1);
break;
case 'prev':
case 'next':
this.viewDate['set'+DPGlobal.modes[this.viewMode].navFnc].call(
this.viewDate,
this.viewDate['get'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate) +
DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1)
);
this.fill();
this.set();
break;
}
break;
case 'span':
if (target.is('.month')) {
var month = target.parent().find('span').index(target);
this.viewDate.setMonth(month);
} else {
var year = parseInt(target.text(), 10)||0;
this.viewDate.setFullYear(year);
}
if (this.viewMode !== 0) {
this.date = new Date(this.viewDate);
this.element.trigger({
type: 'changeDate',
date: this.date,
viewMode: DPGlobal.modes[this.viewMode].clsName
});
}
this.showMode(-1);
this.fill();
this.set();
break;
case 'td':
if (target.is('.day')){
var day = parseInt(target.text(), 10)||1;
var month = this.viewDate.getMonth();
if (target.is('.old')) {
month -= 1;
} else if (target.is('.new')) {
month += 1;
}
var year = this.viewDate.getFullYear();
this.date = new Date(year, month, day,0,0,0,0);
this.viewDate = new Date(year, month, Math.min(28, day),0,0,0,0);
this.fill();
this.set();
this.element.trigger({
type: 'changeDate',
date: this.date,
viewMode: DPGlobal.modes[this.viewMode].clsName
});
}
break;
}
}
},
mousedown: function(e){
e.stopPropagation();
e.preventDefault();
},
showMode: function(dir) {
if (dir) {
this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + dir));
}
this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
}
};
$.fn.datepicker = function ( option, val ) {
return this.each(function () {
var $this = $(this),
data = $this.data('datepicker'),
options = typeof option === 'object' && option;
if (!data) {
$this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options))));
}
if (typeof option === 'string') data[option](val);
});
};
$.fn.datepicker.defaults = {
};
$.fn.datepicker.Constructor = Datepicker;
var DPGlobal = {
modes: [
{
clsName: 'days',
navFnc: 'Month',
navStep: 1
},
{
clsName: 'months',
navFnc: 'FullYear',
navStep: 1
},
{
clsName: 'years',
navFnc: 'FullYear',
navStep: 10
}],
dates:{
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
},
isLeapYear: function (year) {
return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0))
},
getDaysInMonth: function (year, month) {
return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]
},
parseFormat: function(format){
var separator = format.match(/[.\/\-\s].*?/),
parts = format.split(/\W+/);
if (!separator || !parts || parts.length === 0){
throw new Error("Invalid date format.");
}
return {separator: separator, parts: parts};
},
parseDate: function(date, format) {
var parts = date.split(format.separator),
date = new Date(),
val;
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
if (parts.length === format.parts.length) {
for (var i=0, cnt = format.parts.length; i < cnt; i++) {
val = parseInt(parts[i], 10)||1;
switch(format.parts[i]) {
case 'dd':
case 'd':
date.setDate(val);
break;
case 'mm':
case 'm':
date.setMonth(val - 1);
break;
case 'yy':
date.setFullYear(2000 + val);
break;
case 'yyyy':
date.setFullYear(val);
break;
}
}
}
return date;
},
formatDate: function(date, format){
var val = {
d: date.getDate(),
m: date.getMonth() + 1,
yy: date.getFullYear().toString().substring(2),
yyyy: date.getFullYear()
};
val.dd = (val.d < 10 ? '0' : '') + val.d;
val.mm = (val.m < 10 ? '0' : '') + val.m;
var date = [];
for (var i=0, cnt = format.parts.length; i < cnt; i++) {
date.push(val[format.parts[i]]);
}
return date.join(format.separator);
},
headTemplate: '<thead>'+
'<tr>'+
'<th class="prev">‹</th>'+
'<th colspan="5" class="switch"></th>'+
'<th class="next">›</th>'+
'</tr>'+
'</thead>',
contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>'
};
DPGlobal.template = '<div class="datepicker dropdown-menu">'+
'<div class="datepicker-days">'+
'<table class=" table-condensed">'+
DPGlobal.headTemplate+
'<tbody></tbody>'+
'</table>'+
'</div>'+
'<div class="datepicker-months">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-years">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
'</table>'+
'</div>'+
'</div>';
}( window.jQuery );
|
gregorybesson/PlaygroundFuse
|
design/admin/default/playground/assets/js/lib/bootstrap-datepicker.js
|
JavaScript
|
mit
| 13,200
|
///////////////////////////////
// Fix the Home Height
///////////////////////////////
$(function() {
var setHomeBannerHeight = function(){
var homeHeight= $(window).height();
$('#height-fix').height(homeHeight);
}
setHomeBannerHeight();
});
/*=================================================================
Load more
===================================================================*/
$(document).ready(function () {
var map;
var interval = null;
var ccu_interval, fault_interval;
// var gmarkers = [];
var markers = {};
/**
* Concatenates given lat and lng with an underscore and returns it.
* This id will be used as a key of marker to cache the marker in markers object.
* @param {!number} lat Latitude.
* @param {!number} lng Longitude.
* @return {string} Concatenated marker id.
*/
var getMarkerUniqueId= function(lat, lng) {
return lat + '_' + lng;
}
/**
* Creates an instance of google.maps.LatLng by given lat and lng values and returns it.
* This function can be useful for getting new coordinates quickly.
* @param {!number} lat Latitude.
* @param {!number} lng Longitude.
* @return {google.maps.LatLng} An instance of google.maps.LatLng object
*/
// var getLatLng = function(lat, lng) {
// return new google.maps.LatLng(lat, lng);
// };
/**
* Binds click event to given map and invokes a callback that appends a new marker to clicked location.
*/
// var addMarker = google.maps.event.addListener(map, 'click', function(e) {
// var lat = e.latLng.lat(); // lat of clicked point
// var lng = e.latLng.lng(); // lng of clicked point
// var markerId = getMarkerUniqueId(lat, lng); // an that will be used to cache this marker in markers object.
// var marker = new google.maps.Marker({
// position: getLatLng(lat, lng),
// map: map,
// id: 'marker_' + markerId
// });
// markers[markerId] = marker; // cache marker in markers object
// bindMarkerEvents(marker); // bind right click event to marker
// });
/**
* Binds right click event to given marker and invokes a callback function that will remove the marker from map.
* @param {!google.maps.Marker} marker A google.maps.Marker instance that the handler will binded.
*/
// var bindMarkerEvents = function(marker) {
// google.maps.event.addListener(marker, "rightclick", function (point) {
// var markerId = getMarkerUniqueId(point.latLng.lat(), point.latLng.lng()); // get marker id by using clicked point's coordinate
// var marker = markers[markerId]; // find marker
// removeMarker(marker, markerId); // remove it
// });
// };
/**
* Removes given marker from map.
* @param {!google.maps.Marker} marker A google.maps.Marker instance that will be removed.
* @param {!string} markerId Id of marker.
*/
var removeMarker = function(marker, markerId) {
marker.setMap(null); // set markers setMap to null to remove it from map
delete markers[markerId]; // delete marker instance from markers object
};
$('#graph-1').highcharts({
chart: {
colors: ['#0000FF', '#0066FF', '#00CCFF'],
// type: 'spline',
// zoomType: 'x',
animation: Highcharts.svg, // don't animate in old IE
// marginRight: 10,
events: {
load: function () {
// set up the updating of the chart each second
var series = this.series[0];
var series2 = this.series[1];
var series3 = this.series[2];
setInterval(function () {
$.get("get_outage", function(data){
var x = (new Date()).getTime(), // current time
y = data['val'];
// z = data['cust'];
console.log((new Date()).getTime());
console.log(x);
series.addPoint([x, y], false, true);
// series2.addPoint([x, z], true, true);
series2.addPoint([x, 5], true, true);
}, "json");
}, 5000);
}
}
},
title: {
text: 'Average User Outage per Hour'
},
xAxis: {
title: {
text: 'Time'
},
type: 'datetime',
tickPixelInterval: 150
},
yAxis: [
// {
// title: {
// text: 'Number of Customers'
// },
// opposite:true,
// labels: {
// align: 'left'
// }
// },
{ // Secondary yAxis
// gridLineWidth: 0,
title: {
text: 'Outage Time (minutes)',
},
}],
// tooltip: {
// formatter: function () {
// return '<b>' + this.series.name + '</b><br/>' +
// Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>' +
// Highcharts.numberFormat(this.y, 2);
// },
// shared: true
// },
legend: {
layout: 'vertical',
align: 'left',
// x: 80,
verticalAlign: 'top',
// y: 55,
floating: true,
// backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
},
exporting: {
enabled: true
},
series: [{
type: 'area',
name: 'avg outage time',
data: (function () {
// generate an array of random data
var data = [],
time = (new Date()).getTime(),
i;
for (i = -4; i <= 0; i += 1) {
data.push({
x: time + i * 1000,
y: 0
});
}
return data;
}())
},
// {
// // type: 'area',
// type: 'spline',
// name: 'customers',
// data: (function () {
// // generate an array of random data
// var data = [],
// time = (new Date()).getTime(),
// i;
// for (i = -4; i <= 0; i += 1) {
// data.push({
// x: time + i * 1000,
// y: 0
// });
// }
// return data;
// }())
// },
{
// type: 'area',
type: 'spline',
name: 'threshold',
data: (function () {
// generate an array of random data
var data = [],
time = (new Date()).getTime(),
i;
for (i = -4; i <= 0; i += 1) {
data.push({
x: time + i * 1000,
y: 5
});
}
return data;
}())
}]
}); //end graph 1
$('#graph-2').highcharts({
chart: {
type: 'spline',
colors: ['#0066FF', '#0066FF'],
animation: Highcharts.svg, // don't animate in old IE
marginRight: 10,
events: {
load: function () {
// set up the updating of the chart each second
var series = this.series[0];
var series2 = this.series[1];
setInterval(function () {
$.get("get_outage", function(data){
value = data['out_p'];
var x = (new Date()).getTime(), // current time
y = value;
series.addPoint([x, y], true, true);
series2.addPoint([x, 13], true, true);
}, "json");
}, 5000);
}
}
},
title: {
text: 'Health'
},
xAxis: {
title: {
text: 'Time'
},
type: 'datetime',
tickPixelInterval: 150
},
yAxis: {
title: {
text: 'Cutomers with Failures (%)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
legend: {
layout: 'vertical',
align: 'left',
// x: 80,
verticalAlign: 'top',
// y: 55,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
},
exporting: {
enabled: true
},
series: [{
name: 'Data',
data: (function () {
// generate an array of random data
var data = [],
time = (new Date()).getTime(),
i;
for (i = -5; i <= 0; i += 1) {
data.push({
x: time + i * 1000,
y: 0
});
}
return data;
}())
},
{
// type: 'area',
type: 'spline',
name: 'threshold',
data: (function () {
// generate an array of random data
var data = [],
time = (new Date()).getTime(),
i;
for (i = -5; i <= 0; i += 1) {
data.push({
x: time + i * 1000,
y: 13
});
}
return data;
}())
}]
}); //end of graph 2
$('#graph-3').highcharts({
chart: {
type: 'spline',
animation: Highcharts.svg, // don't animate in old IE
marginRight: 10,
events: {
load: function () {
// set up the updating of the chart each second
var series = this.series[0];
var series2 = this.series[1];
setInterval(function () {
$.get("get_trans_outage", function(data){
value = data['out_p'];
var x = (new Date()).getTime(), // current time
y = value;
series.addPoint([x, y], true, true);
series2.addPoint([x, 10], true, true);
}, "json");
}, 5000);
}
}
},
title: {
text: 'Percent of Transformer Failures'
},
xAxis: {
type: 'datetime',
tickPixelInterval: 150
},
yAxis: {
title: {
text: 'Transformers with Failures (%)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
legend: {
layout: 'vertical',
align: 'left',
x: 80,
verticalAlign: 'top',
y: 55,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
},
exporting: {
enabled: true
},
series: [{
name: 'Data',
data: (function () {
// generate an array of random data
var data = [],
time = (new Date()).getTime(),
i;
for (i = -19; i <= 0; i += 1) {
data.push({
x: time + i * 1000,
y: 0
});
}
return data;
}())
},
{
name: 'threshold',
data: (function () {
// generate an array of random data
var data = [],
time = (new Date()).getTime(),
i;
for (i = -19; i <= 0; i += 1) {
data.push({
x: time + i * 1000,
y: 10
});
}
return data;
}())
}]
}); //end of graph 3
// var markerId = getMarkerUniqueId(point.latLng.lat(), point.latLng.lng()); // get marker id by using clicked point's coordinate
// var marker = markers[markerId]; // find marker
// removeMarker(marker, markerId); // remove it
// $("#map-btn").click(function(){
// map = new google.maps.Map(
// document.getElementById('view-side'), {
// center: new google.maps.LatLng(10.383734, -61.244866),
// zoom: 10,
// mapTypeId: google.maps.MapTypeId.ROADMAP
// });
// //get all the data points and display
// $.get("get_data_points", function(data){
// lat = data['lat'];
// lon = data['long'];
// var i;
// for (i = 0; i < lat.length; i++) {
// var markerId = getMarkerUniqueId(lat[i], lon[i]);
// var marker = new google.maps.Marker({
// position: new google.maps.LatLng(lat[i], lon[i]),
// map: map,
// icon: "http://www.geocodezip.com/mapIcons/small_green_dot.png"
// });
// // gmarkers.push(marker);
// markers[markerId] = marker;
// }
// }, "json");
// //add tranformers, power stations and substations
// $.get("get_stations_points", function(data){
// lat = data['lat'];
// lon = data['long'];
// var i;
// // add transformers
// for (i = 0; i < 20; i++) {
// var markerId = getMarkerUniqueId(lat[i], lon[i]);
// var marker = new google.maps.Marker({
// position: new google.maps.LatLng(lat[i], lon[i]),
// map: map,
// icon: "http://maps.google.com/mapfiles/kml/paddle/blu-square-lv.png"
// });
// // gmarkers.push(marker);
// markers[markerId] = marker;
// }
// // add substations
// for (i = 20; i < 22; i++) {
// var markerId = getMarkerUniqueId(lat[i], lon[i]);
// var marker = new google.maps.Marker({
// position: new google.maps.LatLng(lat[i], lon[i]),
// map: map,
// icon: "http://maps.google.com/mapfiles/kml/paddle/blu-diamond.png"
// });
// // gmarkers.push(marker);
// markers[markerId] = marker;
// }
// var markerId = getMarkerUniqueId(10.383734, -61.244866);
// // add power station
// var marker = new google.maps.Marker({
// position: new google.maps.LatLng(10.383734, -61.244866),
// map: map,
// icon: "http://maps.google.com/mapfiles/kml/paddle/blu-stars.png"
// });
// // gmarkers.push(marker);
// markers[markerId] = marker;
// }, "json");
// var time = 0;
// // i = setInterval( get_pon, 3000 );
// // function get_pon(){
// // $.get("/get_data/"+time , function(data){
// // lat = data['lat'];
// // lon = data['long'];
// // pon = data['pon'];
// // var i ;
// // for (i = 0; i < lat.length; i++) {
// // var icon = "";
// // switch (pon[i]) {
// // case 0: //means sending out pon
// // icon = "125";
// // break;
// // case 1: //means it is running
// // icon = "129";
// // break;
// // default:
// // icon = "129";
// // break;
// // }
// // // icon = "https://storage.googleapis.com/support-kms-prod/SNP_2752" + icon + "_en_v0";
// // var marker = new google.maps.Marker({
// // position: new google.maps.LatLng(lat[i], lon[i]),
// // map: map,
// // icon: "https://storage.googleapis.com/support-kms-prod/SNP_2752" + icon + "_en_v0"
// // });
// // }
// // },"json");
// // time = time + 10;
// // }
// // a = 100;
// // var i = setInterval( timer, 1000 );
// // function timer() {
// // console.log( a );
// // if ( a < 1 ) {
// // console.log( 'Reaching Stop' );
// // clearInterval( i );
// // return;
// // }
// // a -= 1;
// // }
// }); //end map-btn
$("#map-btn-ccu").click(function(){
clearInterval(fault_interval);
map = new google.maps.Map(
document.getElementById('view-side'), {
center: new google.maps.LatLng(10.383734, -61.244866),
zoom: 10,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
//get all the data points and display
$.get("get_data_points", function(data){
lat = data['lat'];
lon = data['long'];
var i;
for (i = 0; i < lat.length; i++) {
var markerId = getMarkerUniqueId(lat[i], lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(lat[i], lon[i]),
map: map,
icon: "http://www.geocodezip.com/mapIcons/small_green_dot.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
}
}, "json");
var markerId = getMarkerUniqueId(10.457549, -61.349466);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(10.457549, -61.349466),
map: map,
icon: "http://maps.google.com/mapfiles/kml/pushpin/wht-pushpin.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
var markerId = getMarkerUniqueId(10.431873, -61.131320);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(10.431873, -61.131320),
map: map,
icon: "http://maps.google.com/mapfiles/kml/pushpin/wht-pushpin.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
ccu_interval = setInterval( get_pon, 3000 );
function get_pon(){
$.get("/get_data", function(data){
lat = data['lat'];
lon = data['long'];
pon = data['pon'];
sub = data['sub'];
console.log(sub);
var i, icn;
for (i = 0; i < lat.length; i++) {
if(pon[i] == 1 ) {
icn = "http://www.geocodezip.com/mapIcons/small_red_dot.png"
} else {
icn = "http://www.geocodezip.com/mapIcons/small_green_dot.png"
}
var markerId = getMarkerUniqueId(lat[i], lon[i]); // get marker id by using clicked point's coordinate
var marker = markers[markerId]; // find marker
removeMarker(marker, markerId); // remove it
var markerId = getMarkerUniqueId(lat[i], lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(lat[i], lon[i]),
map: map,
icon: icn
});
// icon = "https://storage.googleapis.com/support-kms-prod/SNP_2752" + icon + "_en_v0";
// gmarkers.push(marker);
markers[markerId] = marker;
}
var icn_1 = "http://maps.google.com/mapfiles/kml/pushpin/wht-pushpin.png";
var icn_2 = "http://maps.google.com/mapfiles/kml/pushpin/wht-pushpin.png"
for (i = 0; i < sub.length; i++) {
if(sub[i] == 1) {
console.log("i1");
icn_1 = "http://maps.google.com/mapfiles/kml/pushpin/red-pushpin.png"
}
if(sub[i] == 2){
console.log("i2");
icn_2 = "http://maps.google.com/mapfiles/kml/pushpin/red-pushpin.png"
}
}// end for
var markerId = getMarkerUniqueId(10.457549, -61.349466); // get marker id by using clicked point's coordinate
var marker = markers[markerId]; // find marker
removeMarker(marker, markerId); // remove it
var markerId = getMarkerUniqueId(10.457549, -61.349466);
// console.log("icn_1 is" + icn_1)
var marker = new google.maps.Marker({
position: new google.maps.LatLng(10.457549, -61.349466),
map: map,
icon: icn_1
});
// gmarkers.push(marker);
markers[markerId] = marker;
var markerId = getMarkerUniqueId(10.431873, -61.131320); // get marker id by using clicked point's coordinate
var marker = markers[markerId]; // find marker
removeMarker(marker, markerId); // remove it
var markerId = getMarkerUniqueId(10.431873, -61.131320);
// console.log("icn_2 is" + icn_2)
var marker = new google.maps.Marker({
position: new google.maps.LatLng(10.431873, -61.131320),
map: map,
icon: icn_2
});
// gmarkers.push(marker);
markers[markerId] = marker;
},"json");
}
}); //end map-ccu
$("#stop-btn").click(function(){
clearInterval(ccu_interval);
clearInterval(fault_interval);
});
$("#map-btn-fault").click(function(){
// map = new google.maps.Map(
// document.getElementById('view-side'), {
// center: new google.maps.LatLng(10.383734, -61.244866),
// zoom: 10,
// mapTypeId: google.maps.MapTypeId.ROADMAP
// });
clearInterval(ccu_interval);
map = new google.maps.Map(
document.getElementById('view-side'), {
center: new google.maps.LatLng(10.383734, -61.244866),
zoom: 10,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
//get all the data points and display
$.get("get_data_points", function(data){
lat = data['lat'];
lon = data['long'];
var i;
for (i = 0; i < lat.length; i++) {
var markerId = getMarkerUniqueId(lat[i], lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(lat[i], lon[i]),
map: map,
icon: "http://www.geocodezip.com/mapIcons/small_green_dot.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
}
}, "json");
//add tranformers, power stations and substations
$.get("get_stations_points", function(data){
lat = data['lat'];
lon = data['long'];
var i;
// add transformers
for (i = 0; i < 20; i++) {
var markerId = getMarkerUniqueId(lat[i], lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(lat[i], lon[i]),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/blu-square-lv.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
}
// add substations
for (i = 20; i < 22; i++) {
var markerId = getMarkerUniqueId(lat[i], lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(lat[i], lon[i]),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/blu-diamond.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
}
var markerId = getMarkerUniqueId(10.383734, -61.244866);
// add power station
var marker = new google.maps.Marker({
position: new google.maps.LatLng(10.383734, -61.244866),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/blu-stars.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
}, "json");
fault_interval = setInterval( get_faults, 3000 );
function get_faults(){
//get all the data points and display
$.get("get_faults", function(data){
sm_pon = data['sm_pon']; //meters pon
tr_pon = data['tr_pon']; //tranformer pon
sb_pon = data['sb_pon']; //substation pon
ps_pon = data['ps_pon']; //power station pon
sm_lat = data['sm_lat']; //meters latitude
sm_lon = data['sm_lon']; //meters long
s_lat = data['s_lat']; //stations latitude
s_lon = data['s_lon']; //stations long
console.log(tr_pon);
var i;
for (i = 0; i < sm_pon.length; i++) {
var markerId = getMarkerUniqueId(sm_lat[i], sm_lon[i]); // get marker id by using clicked point's coordinate
var marker = markers[markerId]; // find marker
removeMarker(marker, markerId); // remove it
if(sm_pon[i] === 1) {
var markerId = getMarkerUniqueId(sm_lat[i], sm_lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(sm_lat[i], sm_lon[i]),
map: map,
icon: "http://www.geocodezip.com/mapIcons/small_yellow_dot.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
} else {
var markerId = getMarkerUniqueId(sm_lat[i], sm_lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(sm_lat[i], sm_lon[i]),
map: map,
icon: "http://www.geocodezip.com/mapIcons/small_green_dot.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
}
}//end for
for (i = 0; i < tr_pon.length; i++) {
var markerId = getMarkerUniqueId(s_lat[i], s_lon[i]); // get marker id by using clicked point's coordinate
var marker = markers[markerId]; // find marker
removeMarker(marker, markerId); // remove it
if(tr_pon[i] === 1) {
var markerId = getMarkerUniqueId(s_lat[i], s_lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(s_lat[i], s_lon[i]),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/ylw-square-lv.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
} else if(tr_pon[i] === -1) {
var markerId = getMarkerUniqueId(s_lat[i], s_lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(s_lat[i], s_lon[i]),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/stop-lv.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
} else {
var markerId = getMarkerUniqueId(s_lat[i], s_lon[i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(s_lat[i], s_lon[i]),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/blu-square-lv.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
}//end if
}//end for
for (i = 0; i < sb_pon.length; i++) { //substations down
var markerId = getMarkerUniqueId(s_lat[20+i], s_lon[20+i]); // get marker id by using clicked point's coordinate
var marker = markers[markerId]; // find marker
removeMarker(marker, markerId); // remove it
if(sb_pon[i] === 1) {
var markerId = getMarkerUniqueId(s_lat[20+i], s_lon[20+i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(s_lat[20+i], s_lon[20+i]),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/orange-diamond.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
} else if(sb_pon[i] === -1) {
var markerId = getMarkerUniqueId(s_lat[20+i], s_lon[20+i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(s_lat[20+i], s_lon[20+i]),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/red-diamond.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
} else {
var markerId = getMarkerUniqueId(s_lat[20+i], s_lon[20+i]);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(s_lat[20+i], s_lon[20+i]),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/blu-diamond.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
}//end if
}//end for
var markerId = getMarkerUniqueId(10.383734, -61.244866); // get marker id by using clicked point's coordinate
var marker = markers[markerId]; // find marker
removeMarker(marker, markerId); // remove it
if(ps_pon[0] === -1) { //power station down
var markerId = getMarkerUniqueId(10.383734, -61.244866);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(10.383734, -61.244866),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/red-stars.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
} else {
var markerId = getMarkerUniqueId(10.383734, -61.244866);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(10.383734, -61.244866),
map: map,
icon: "http://maps.google.com/mapfiles/kml/paddle/blu-stars.png"
});
// gmarkers.push(marker);
markers[markerId] = marker;
}//end if
}, "json"); //end get_data_points
} //end get fault function
}); //end map-fault
$("#clear-btn").click(function(){
// for(i=0; i< gmarkers.length; i++){
// gmarkers[i].setMap(null);
// }
for(var id in markers) {
var marker = markers[id]; // find marker
removeMarker(marker, id); // remove it
}
}); //end of stop button
});
|
smhosein/tntec_web_app
|
app/static/js/script.js
|
JavaScript
|
mit
| 35,307
|
(function () {
var isZipPath = function (path) {
return (path.indexOf('/!') != -1);
};
var splitZipPath = function (path) {
var parts = path.split('/!');
if (parts.length != 2) {
throw new Error("For now, you must have exactly one '/!' in your path when indexing into .zip files");
}
var zipPath = parts[0];
var entryPath = parts[1];
return { zipPath: zipPath, entryPath: entryPath };
};
fs.___original___readFileSync = fs.readFileSync;
fs.readFileSync = function (path, options) {
if (!options) {
options = { encoding: null, flag: 'r' };
} else if (util.isString(options)) {
options = { encoding: options, flag: 'r' };
} else if (!util.isObject(options)) {
throw new TypeError('Bad arguments');
}
var encoding = options.encoding;
assertEncoding(encoding);
var flag = options.flag || 'r';
if (encoding && ((encoding.toLowerCase() == 'utf8') || (encoding.toLowerCase() == 'utf-8')) && (flag == 'r')) {
return binding.___CoreNode___readFileSyncUTF8(path);
}
return fs.___original___readFileSync(path, options);
}
fs.___original___readFile = fs.readFile;
fs.readFile = function (path, options, callback_) {
var callback = maybeCallback(arguments[arguments.length - 1]);
if (util.isFunction(options) || !options) {
options = { encoding: null, flag: 'r' };
} else if (util.isString(options)) {
options = { encoding: options, flag: 'r' };
} else if (!util.isObject(options)) {
throw new TypeError('Bad arguments');
}
var encoding = options.encoding;
assertEncoding(encoding);
var flag = options.flag || 'r';
if (encoding && ((encoding.toLowerCase() == 'utf8') || (encoding.toLowerCase() == 'utf-8')) && (flag == 'r')) {
return binding.___CoreNode___readFileUTF8(path, callback);
}
return fs.___original___readFile(path, options, callback_);
}
fs.___withoutZip___readFileSync = fs.readFileSync
fs.readFileSync = function (path, options) {
if (!isZipPath(path)) {
return fs.___withoutZip___readFileSync(path, options);
}
if (!options) {
options = { encoding: null, flag: 'r' };
} else if (util.isString(options)) {
options = { encoding: options, flag: 'r' };
} else if (!util.isObject(options)) {
throw new TypeError('Bad arguments');
}
var encoding = options.encoding;
assertEncoding(encoding);
var flag = options.flag || 'r';
if (encoding && ((encoding.toLowerCase() == 'utf8') || (encoding.toLowerCase() == 'utf-8')) && (flag == 'r')) {
var ze = splitZipPath(path);
return binding.___CoreNode___readZipSyncUTF8(ze.zipPath, ze.entryPath);
}
throw new Error("/! shorthand for indexing into zip files only works with UTF-8 encoding file reading");
}
fs.___withoutZip___statSync = fs.statSync;
fs.___withoutZip___lstatSync = fs.lstatSync;
fs.statSync = function (path) {
if (isZipPath(path)) {
return binding.stat(path);
} else {
return fs.___withoutZip___statSync(path);
}
};
fs.lstatSync = function (path) {
if (isZipPath(path)) {
return binding.lstat(path);
} else {
return fs.___withoutZip___lstatSync(path);
}
};
})();
|
ccheever/CoreNode
|
CoreNode/js/ios-lib/_fs-coda.js
|
JavaScript
|
mit
| 3,449
|
'use strict';
const connectCollection = require('./connect_collection');
const logErrorAndReject = require('../util/log_error_and_reject');
module.exports = (collectionName, customCriteria) => {
const criteria = customCriteria || {};
return connectCollection(collectionName)
.then(col => col.find(criteria))
.catch(logErrorAndReject('Unable to retrieve from db, error'));
};
|
angelsanchez/nodejs-atdd-example
|
src/storage/find_many.js
|
JavaScript
|
mit
| 390
|
// Application configuration
const config = {
// Server configuration
appName: "Blogger app",
serverPort: "8080",
// MongoDB configuration
dbName: "bloggerAppDb",
mongoPort: "27017",
mongoUsesAuth: true,
}
module.exports = config;
|
cbmira01/Blogger
|
server/config.js
|
JavaScript
|
mit
| 250
|
// Load in our dependencies
var request = require('request');
var Project = require('./project');
// Define our model
var ScriptRepo = Project.extend({
update: function (cb) {
// If it not a gist, update it
var github = this.get('github') || '';
var that = this;
if (github.indexOf('gist') === -1) {
this._fetchGitHubStats(github, function (err, data) {
// If there is no error, update the script
if (!err) {
if (data.stars !== undefined) { that.set('stars', data.stars); }
if (data.forks !== undefined) { that.set('forks', data.forks); }
}
if (cb) {
return cb(err);
}
});
} else if (cb) {
return process.nextTick(cb);
}
},
_fetchGitHubStats: function (repo, cb) {
// Break out the name from the owner
var repoArr = repo.split('/');
var owner = repoArr[0];
var repoName = repoArr[1];
// Fetch the repo and callback
// https://developer.github.com/v3/
// https://developer.github.com/v3/repos/#get
request({
method: 'GET',
url: 'https://api.github.com/repos/' + encodeURIComponent(owner) + '/' + encodeURIComponent(repoName),
headers: {
Accept: 'application/vnd.github.v3+json',
'User-Agent': 'request/twolfson.com'
},
json: true
}, function handleRequest(err, res, body) {
// If there is an error callback with it
if (err) { return cb(err); }
// If the status code was bad, callback with it
if (res.statusCode !== 200) {
return cb(new Error('Expected status code 200 but got ' + res.statusCode + ', body: ' + JSON.stringify(body)));
}
// Otherwise, callback with the data
var retObj = {
stars: body.watchers_count,
forks: body.forks_count
};
cb(null, retObj);
});
}
});
module.exports = ScriptRepo;
|
twolfson/twolfson.com
|
server/models/projects/script-project.js
|
JavaScript
|
mit
| 1,888
|
'use strict'
module.exports = (obj) => {
if(obj === null || obj === undefined) {
return obj
}
let parsed = parseInt(obj)
if(isNaN(parsed)) {
return undefined
}
return parsed
}
|
martianfield/iceworm
|
src/projectors/int-projector.js
|
JavaScript
|
mit
| 197
|
var searchData=
[
['schedule_5fvisitor_332',['schedule_visitor',['../structtranswarp_1_1detail_1_1schedule__visitor.html',1,'transwarp::detail']]],
['sequential_333',['sequential',['../classtranswarp_1_1sequential.html',1,'transwarp']]],
['set_5fcustom_5fdata_5fvisitor_334',['set_custom_data_visitor',['../structtranswarp_1_1detail_1_1set__custom__data__visitor.html',1,'transwarp::detail']]],
['set_5fexecutor_5fvisitor_335',['set_executor_visitor',['../structtranswarp_1_1detail_1_1set__executor__visitor.html',1,'transwarp::detail']]],
['set_5fpriority_5fvisitor_336',['set_priority_visitor',['../structtranswarp_1_1detail_1_1set__priority__visitor.html',1,'transwarp::detail']]],
['spinlock_337',['spinlock',['../classtranswarp_1_1detail_1_1spinlock.html',1,'transwarp::detail']]]
];
|
bloomen/transwarp
|
docs/search/classes_c.js
|
JavaScript
|
mit
| 801
|
import React from 'react';
import { Link } from 'react-router';
export function RouterLink(props) {
return (
props.href.match(/^(https?:)?\/\//)
? <a href={props.href} target={'_blank'}>{props.children}</a>
: <Link to={props.href}>{props.children}</Link>
);
}
|
rapicastillo/beautifulrising-client
|
app/utils/markdown.js
|
JavaScript
|
mit
| 281
|
(function(angular) {
'use strict';
var bind = function(fn, context) {
return function() {
return fn.apply(context, arguments);
};
};
var templateUrl = 'template/flash-messages.html';
var module = angular.module('ngFlash', ['ng', 'ngSanitize']);
module.provider('$flash', function() {
// How long to wait before removing the flash message.
var defaultDuration = 5000;
this.setDefaultDuration = function(duration) {
defaultDuration = duration;
};
// The type of message.
var defaultType = 'alert';
this.setDefaultType = function(type) {
defaultType = type;
};
// Where the flash messages are stored on the scope.
var flashScopeKey = '_flash';
this.setFlashScopeKey = function(newflashScopeKey) {
flashScopeKey = newflashScopeKey;
};
// Flash messages will not persist across route change events unless
// explicitly specified.
var routeChangeSuccess = '$routeChangeSuccess';
this.setRouteChangeSuccess = function(event) {
routeChangeSuccess = event;
};
this.$get = function($rootScope, $timeout) {
var flash;
var rootScope = $rootScope;
/**
* Flash that represents a flash message.
*/
function FlashMessage(message, options) {
options = options || {};
this.message = message;
this.duration = options.duration || defaultDuration;
this.type = options.type || defaultType;
this.persist = options.persist;
this.key = options.key || this.message;
this.unique = true;
this.scope = options.scope || rootScope;
if (!this.scope.hasOwnProperty(flashScopeKey)) {
this.scope[flashScopeKey] = { messages: [] };
}
}
FlashMessage.prototype._messages = function() {
return this.scope[flashScopeKey].messages;
};
FlashMessage.prototype.findExisting = function() {
var found;
var _this = this;
angular.forEach(this._messages(), function(flashMessage) {
if (flashMessage.key === _this.key) {
found = flashMessage;
}
});
return found;
};
/**
* Init and add this flash message.
*/
FlashMessage.prototype.add = function() {
var existing = this.findExisting();
if (existing) {
// If we're replacing a message on the same scope, don't reset. Otherwise,
// this new message will show up at the higher scope
var shouldResetScope = existing.scope != this.scope;
existing._remove(shouldResetScope);
}
this._messages().push(this.init());
return this;
};
/**
* Remove this flash message.
*
* @param {Boolean} shouldResetScope - Determines whether we should reset the local scope.
*
*/
FlashMessage.prototype._remove = function(shouldResetScope) {
this.cancelTimeout();
this._messages().splice(this._messages().indexOf(this), 1);
// Fall back to the higher scope if required. If we don't do this, the directive will
// never go back to it default behaviour of displaying rootScope messages
var noMoreScopedMessages = this.scope != rootScope && this._messages().length == 0;
if (shouldResetScope && noMoreScopedMessages) {
delete this.scope._flash;
}
};
/**
* Remove this flash message.
*/
FlashMessage.prototype.remove = function() {
this._remove(true);
};
/**
* Starts the timeout to remove this message. Cancels the existing
* timeout if it's present.
*/
FlashMessage.prototype.startTimeout = function() {
this.cancelTimeout();
this.timeout = $timeout(bind(this.remove, this), this.duration);
return this.timeout;
};
/**
* Cancel a previous timeout.
*/
FlashMessage.prototype.cancelTimeout = function() {
if (this.timeout) {
$timeout.cancel(this.timeout);
}
};
/**
* Initialize timeouts.
*/
FlashMessage.prototype.init = function() {
var remove = bind(this.remove, this);
this.startTimeout();
// Remove the flash message when the user navigates.
if (this.persist) {
var _this = this;
/**
* Only runs `func` after the function has been executed `times` times. Each time that `func` is not run,
* it will restart the timeout to remove this message.
*
* See
* https://github.com/jashkenas/underscore/blob/2c709d72c89a1ae9e06c56fc256c14435bfa7893/underscore.js#L770
*/
var after = function(times, func) {
return function() {
if (--times < 1) {
return func.apply(this, arguments);
} else {
_this.startTimeout();
}
};
};
$rootScope.$on(routeChangeSuccess, after(this.persist + 1, remove));
} else {
$rootScope.$on(routeChangeSuccess, remove);
}
return this;
};
/**
* Add a flash message.
*
* @param {String} message - The flash message to display.
*
* @return {Object} The flash message that was added.
*/
flash = function(message, options) {
return new FlashMessage(message, options).add();
};
/**
* Reset the flash messages
*/
flash.reset = function(scope) {
scope = scope || rootScope;
scope[flashScopeKey].messages.length = 0;
};
return flash;
};
});
module.directive('flashMessages', function() {
return {
restrict: 'EA',
replace: true,
templateUrl: templateUrl
};
});
module.run(function($templateCache) {
if (!$templateCache.get(templateUrl)) {
$templateCache.put(templateUrl,
'<div class="flash-messages">' +
'<div class="flash-message {{message.type}}" ng-repeat="message in _flash.messages">' +
'<a href="" class="close" ng-click="message.remove()"></a>' +
'<span class="flash-content" ng-bind-html="message.message"></span>' +
'</div>' +
'</div>');
}
});
})(angular);
|
remind101/angular-flash
|
src/angular-flash.js
|
JavaScript
|
mit
| 6,395
|
'use strict'
const config = require(__dirname + '/../config')
const GitHub = require('./GitHub')
const markdownTable = require('markdown-table')
const md5 = require('md5')
const Mailgun = require('mailgun-js')
const NodeRSA = require('node-rsa')
const objectPath = require('object-path')
const SiteConfig = require(__dirname + '/../siteConfig')
const slugify = require('slug')
const SubscriptionsManager = require('./SubscriptionsManager')
const uuid = require('node-uuid')
const yaml = require('js-yaml')
const Staticman = function (parameters) {
this.parameters = parameters
// Initialise GitHub API
this.github = new GitHub({
username: this.parameters.username,
repository: this.parameters.repository,
branch: this.parameters.branch
})
// Generate unique id
this.uid = uuid.v1()
// Initialise RSA
this.rsa = new NodeRSA()
this.rsa.importKey(config.get('rsaPrivateKey'))
}
Staticman.prototype._applyInternalFields = function (data) {
let internalFields = {
_id: this.uid
}
// Inject parent, if present
if (this.options.parent) {
internalFields._parent = this.options.parent
}
return Object.assign(internalFields, data)
}
Staticman.prototype._applyGeneratedFields = function (data) {
const generatedFields = this.siteConfig.get('generatedFields')
if (!generatedFields) return data
Object.keys(generatedFields).forEach(field => {
const generatedField = generatedFields[field]
if ((typeof generatedField === 'object') && (!(generatedField instanceof Array))) {
const options = generatedField.options || {}
switch (generatedField.type) {
case 'date':
data[field] = this._createDate(options)
break
case 'slugify':
if (typeof options.field === 'string') {
data[field] = slugify(data[options.field]).toLowerCase()
}
break
}
} else {
data[field] = generatedField
}
})
return data
}
Staticman.prototype._applyTransforms = function (fields) {
const transforms = this.siteConfig.get('transforms')
if (!transforms) return Promise.resolve(fields)
// This doesn't serve any purpose for now, but we might want to have
// asynchronous transforms in the future.
let queue = []
Object.keys(transforms).forEach(field => {
if (!fields[field]) return
if (transforms[field] === 'md5') {
fields[field] = md5(fields[field])
}
})
return Promise.all(queue).then((results) => {
return fields
})
}
Staticman.prototype._checkForSpam = function (fields) {
if (!this.siteConfig.get('akismet.enabled')) return Promise.resolve(fields)
return new Promise((resolve, reject) => {
const akismet = require('akismet').client({
blog: config.get('akismet.site'),
apiKey: config.get('akismet.apiKey')
})
akismet.checkSpam({
user_ip: this.ip,
user_agent: this.userAgent,
comment_type: this.siteConfig.get('akismet.type'),
comment_author: fields[this.siteConfig.get('akismet.author')],
comment_author_email: fields[this.siteConfig.get('akismet.authorEmail')],
comment_author_url: fields[this.siteConfig.get('akismet.authorUrl')],
comment_content: fields[this.siteConfig.get('akismet.content')]
}, (err, isSpam) => {
if (err) return reject(err)
if (isSpam) return reject('IS_SPAM')
return resolve(fields)
})
})
}
Staticman.prototype._createDate = function (options) {
const date = new Date()
switch (options.format) {
case 'timestamp':
return date.getTime()
case 'timestamp-seconds':
return Math.floor(date.getTime() / 1000)
case 'iso8601':
default:
return date.toISOString()
}
}
Staticman.prototype._createFile = function (fields) {
return new Promise((resolve, reject) => {
switch (this.siteConfig.get('format').toLowerCase()) {
case 'json':
return resolve(JSON.stringify(fields))
case 'yaml':
case 'yml':
try {
const output = yaml.safeDump(fields)
return resolve(output)
} catch (err) {
return reject(err)
}
break
case 'frontmatter':
const transforms = this.siteConfig.get('transforms')
const contentField = transforms && Object.keys(transforms).find(field => {
return transforms[field] === 'frontmatterContent'
})
if (!contentField) {
return reject('NO_FRONTMATTER_CONTENT_TRANSFORM')
}
const content = fields[contentField]
delete fields[contentField]
try {
const output = `---\n${yaml.safeDump(fields)}---\n${content}\n`
return resolve(output)
} catch (err) {
return reject(err)
}
break
default:
return reject('INVALID_FORMAT')
}
})
}
Staticman.prototype._generatePRBody = function (fields) {
let table = [
['Field', 'Content']
]
Object.keys(fields).forEach(field => {
table.push([field, fields[field]])
})
let message = this.siteConfig.get('pullRequestBody') + markdownTable(table)
if (this.siteConfig.get('notifications.enabled')) {
const notificationsPayload = {
configPath: this.configPath,
fields,
options: this.options,
parameters: this.parameters
}
message += `\n\n<!--staticman_notification:${JSON.stringify(notificationsPayload)}-->`
}
return message
}
Staticman.prototype._getConfig = function (force) {
if (this.siteConfig && !force) return Promise.resolve(this.siteConfig)
if (!this.configPath) return Promise.reject('NO_CONFIG_PATH')
return this.github.readFile(this.configPath.file).then(data => {
const config = objectPath.get(data, this.configPath.path)
const validationErrors = this._validateConfig(config)
if (validationErrors) {
return Promise.reject(validationErrors)
}
if (config.branch !== this.parameters.branch) {
return Promise.reject('BRANCH_MISMATCH')
}
return this.siteConfig
})
}
Staticman.prototype._getNewFilePath = function (data) {
const configFilename = this.siteConfig.get('filename')
const filename = configFilename ? this._resolvePlaceholders(configFilename, {
fields: data,
options: this.options
}) : this.uid
const path = this._resolvePlaceholders(this.siteConfig.get('path'), {
fields: data,
options: this.options
})
const extension = this._getExtensionForFormat(this.siteConfig.get('format'))
return `${path}/${filename}.${extension}`
}
Staticman.prototype._getExtensionForFormat = function (format) {
switch (format.toLowerCase()) {
case 'json':
return 'json'
case 'yaml':
case 'yml':
return 'yml'
case 'frontmatter':
return 'md'
}
}
Staticman.prototype._initialiseSubscriptions = function () {
if (!this.siteConfig.get('notifications.enabled')) return null
// Initialise Mailgun
const mailgun = Mailgun({
apiKey: this.siteConfig.get('notifications.apiKey') || config.get('email.apiKey'),
domain: this.siteConfig.get('notifications.domain') || config.get('email.domain')
})
// Initialise SubscriptionsManager
const subscriptions = new SubscriptionsManager(this.parameters, this.github, mailgun)
return subscriptions
}
Staticman.prototype._resolvePlaceholders = function (subject, baseObject) {
const matches = subject.match(/{(.*?)}/g)
if (!matches) return subject
matches.forEach((match) => {
const escapedMatch = match.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
const property = match.slice(1, -1)
let newText
switch (property) {
case '@timestamp':
newText = new Date().getTime()
break
case '@id':
newText = this.uid
break
default:
newText = objectPath.get(baseObject, property) || ''
}
subject = subject.replace(new RegExp(escapedMatch, 'g'), newText)
})
return subject
}
Staticman.prototype._validateConfig = function (config) {
if (!config) {
return {
code: 'MISSING_CONFIG_BLOCK'
}
}
const requiredFields = [
'allowedFields',
'branch',
'format',
'path'
]
let missingFields = []
// Checking for missing required fields
requiredFields.forEach(requiredField => {
if (objectPath.get(config, requiredField) === undefined) {
missingFields.push(requiredField)
}
})
if (missingFields.length) {
return {
code: 'MISSING_CONFIG_FIELDS',
data: missingFields
}
}
// Check origin
if (config.allowedOrigins && config.allowedOrigins.length) {
if (this.options.origin) {
const url = require('url').parse(this.options.origin)
const validOrigin = config.allowedOrigins.some(origin => {
return origin === url.hostname
})
if (!validOrigin) {
return {
code: 'INVALID_ORIGIN',
data: null
}
}
} else {
return {
code: 'MISSING_ORIGIN',
data: null
}
}
}
this.siteConfig = SiteConfig(config, this.rsa)
return null
}
Staticman.prototype._validateFields = function (fields) {
let errors = []
let missingRequiredFields = []
let invalidFields = []
Object.keys(fields).forEach(field => {
// Check for any invalid fields
if ((this.siteConfig.get('allowedFields').indexOf(field) === -1) && (fields[field] !== '')) {
invalidFields.push(field)
}
// Trim fields
if (typeof fields[field] === 'string') {
fields[field] = fields[field].trim()
}
})
// Check for missing required fields
this.siteConfig.get('requiredFields').forEach(field => {
if ((fields[field] === undefined) || (fields[field] === '')) {
missingRequiredFields.push(field)
}
})
if (missingRequiredFields.length) {
errors.push({
code: 'MISSING_REQUIRED_FIELDS',
data: missingRequiredFields
})
}
if (invalidFields.length) {
errors.push({
code: 'INVALID_FIELDS',
data: invalidFields
})
}
if (errors.length) return errors
return null
}
Staticman.prototype.processEntry = function (fields, options) {
this.fields = Object.assign({}, fields)
this.options = Object.assign({}, options)
return this._getConfig().then(config => {
return this._checkForSpam(fields)
}).then(fields => {
// Validate fields
const fieldErrors = this._validateFields(fields)
if (fieldErrors) return Promise.reject(fieldErrors)
// Add generated fields
fields = this._applyGeneratedFields(fields)
// Apply transforms
return this._applyTransforms(fields)
}).then(transformedFields => {
return this._applyInternalFields(transformedFields)
}).then(extendedFields => {
// Create file
return this._createFile(extendedFields)
}).then(data => {
const filePath = this._getNewFilePath(fields)
const subscriptions = this._initialiseSubscriptions()
const commitMessage = this._resolvePlaceholders(this.siteConfig.get('commitMessage'), {
fields,
options
})
// Subscribe user, if applicable
if (subscriptions && options.parent && options.subscribe && this.fields[options.subscribe]) {
subscriptions.set(options.parent, this.fields[options.subscribe]).catch(err => {
console.log(err.stack || err)
})
}
if (this.siteConfig.get('moderation')) {
const newBranch = 'staticman_' + this.uid
return this.github.writeFileAndSendPR(filePath, data, newBranch, commitMessage, this._generatePRBody(fields))
} else if (subscriptions && options.parent) {
subscriptions.send(options.parent, fields, options)
}
return this.github.writeFile(filePath, data, this.parameters.branch, commitMessage)
}).then(result => {
return {
fields: fields,
redirect: options.redirect ? options.redirect : false
}
})
}
Staticman.prototype.processMerge = function (fields, options) {
this.fields = Object.assign({}, fields)
this.options = Object.assign({}, options)
return this._getConfig().then(config => {
const subscriptions = this._initialiseSubscriptions()
return subscriptions.send(options.parent, fields, options, this.siteConfig)
})
}
Staticman.prototype.setConfigPath = function (configPath) {
this.configPath = configPath
}
Staticman.prototype.setIp = function (ip) {
this.ip = ip
}
Staticman.prototype.setUserAgent = function (userAgent) {
this.userAgent = userAgent
}
module.exports = Staticman
|
zburgermeiszter/staticman
|
lib/Staticman.js
|
JavaScript
|
mit
| 12,523
|
const live2d_path = "http://meetbill.github.io/DuXiaoDie/"
// 封装异步加载资源的方法
function loadExternalResource(url, type) {
return new Promise((resolve, reject) => {
let tag;
if (type === "css") {
tag = document.createElement("link");
tag.rel = "stylesheet";
tag.href = url;
}
else if (type === "js") {
tag = document.createElement("script");
tag.src = url;
}
if (tag) {
tag.onload = () => resolve(url);
tag.onerror = () => reject(url);
document.head.appendChild(tag);
}
});
}
// 加载 waifu.css live2d.min.js waifu-tips.js
if (screen.width >= 768) {
Promise.all([
loadExternalResource(live2d_path + "waifu.css", "css"),
loadExternalResource(live2d_path + "live2d.min.js", "js"),
loadExternalResource(live2d_path + "waifu-tips.js", "js")
]).then(() => {
initWidget({
waifuPath: live2d_path + "waifu-tips.json",
//apiPath: "https://live2d.fghrsh.net/api/",
cdnPath: "https://cdn.jsdelivr.net/gh/fghrsh/live2d_api/"
});
});
}
// initWidget 第一个参数为 waifu-tips.json 的路径,第二个参数为 API 地址
// API 后端可自行搭建,参考 https://github.com/fghrsh/live2d_api
// 初始化看板娘会自动加载指定目录下的 waifu-tips.json
|
BillWang139967/BillWang139967.github.io
|
DuXiaoDie/autoload.js
|
JavaScript
|
mit
| 1,428
|