Merge remote-tracking branch 'upstream/master' into routing-ui-tweaks-2
Conflicts: config/locales/de.yml
This commit is contained in:
commit
c3e2e6462f
381 changed files with 5384 additions and 1904 deletions
33
vendor/assets/javascripts/html5shiv.js
vendored
33
vendor/assets/javascripts/html5shiv.js
vendored
|
@ -1,10 +1,10 @@
|
|||
/**
|
||||
* @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
;(function(window, document) {
|
||||
/*jshint evil:true */
|
||||
/** version */
|
||||
var version = '3.7.0';
|
||||
var version = '3.7.2';
|
||||
|
||||
/** Preset options */
|
||||
var options = window.html5 || {};
|
||||
|
@ -82,7 +82,25 @@
|
|||
return typeof elements == 'string' ? elements.split(' ') : elements;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Extends the built-in list of html5 elements
|
||||
* @memberOf html5
|
||||
* @param {String|Array} newElements whitespace separated list or array of new element names to shiv
|
||||
* @param {Document} ownerDocument The context document.
|
||||
*/
|
||||
function addElements(newElements, ownerDocument) {
|
||||
var elements = html5.elements;
|
||||
if(typeof elements != 'string'){
|
||||
elements = elements.join(' ');
|
||||
}
|
||||
if(typeof newElements != 'string'){
|
||||
newElements = newElements.join(' ');
|
||||
}
|
||||
html5.elements = elements +' '+ newElements;
|
||||
shivDocument(ownerDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data associated to the given document
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
|
@ -187,7 +205,7 @@
|
|||
'var n=f.cloneNode(),c=n.createElement;' +
|
||||
'h.shivMethods&&(' +
|
||||
// unroll the `createElement` calls
|
||||
getElements().join().replace(/[\w\-]+/g, function(nodeName) {
|
||||
getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
|
||||
data.createElem(nodeName);
|
||||
data.frag.createElement(nodeName);
|
||||
return 'c("' + nodeName + '")';
|
||||
|
@ -244,7 +262,7 @@
|
|||
* @memberOf html5
|
||||
* @type Array|String
|
||||
*/
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
|
||||
|
||||
/**
|
||||
* current version of html5shiv
|
||||
|
@ -287,7 +305,10 @@
|
|||
createElement: createElement,
|
||||
|
||||
//creates a shived documentFragment
|
||||
createDocumentFragment: createDocumentFragment
|
||||
createDocumentFragment: createDocumentFragment,
|
||||
|
||||
//extends list of elements
|
||||
addElements: addElements
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
|
13
vendor/assets/jquery/jquery.cookie.js
vendored
13
vendor/assets/jquery/jquery.cookie.js
vendored
|
@ -1,16 +1,19 @@
|
|||
/*!
|
||||
* jQuery Cookie Plugin v1.4.0
|
||||
* jQuery Cookie Plugin v1.4.1
|
||||
* https://github.com/carhartl/jquery-cookie
|
||||
*
|
||||
* Copyright 2013 Klaus Hartl
|
||||
* Copyright 2006, 2014 Klaus Hartl
|
||||
* Released under the MIT license
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as anonymous module.
|
||||
// AMD
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// CommonJS
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals.
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
@ -53,7 +56,7 @@
|
|||
|
||||
// Write
|
||||
|
||||
if (value !== undefined && !$.isFunction(value)) {
|
||||
if (arguments.length > 1 && !$.isFunction(value)) {
|
||||
options = $.extend({}, config.defaults, options);
|
||||
|
||||
if (typeof options.expires === 'number') {
|
||||
|
|
10
vendor/assets/jquery/jquery.simulate.js
vendored
10
vendor/assets/jquery/jquery.simulate.js
vendored
|
@ -1,12 +1,12 @@
|
|||
/*!
|
||||
* jQuery Simulate v0.0.1 - simulate browser mouse and keyboard events
|
||||
* jQuery Simulate v1.0.0 - simulate browser mouse and keyboard events
|
||||
* https://github.com/jquery/jquery-simulate
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: Sun Dec 9 12:15:33 2012 -0500
|
||||
* Date: 2014-08-22
|
||||
*/
|
||||
|
||||
;(function( $, undefined ) {
|
||||
|
@ -144,7 +144,7 @@ $.extend( $.simulate.prototype, {
|
|||
0: 1,
|
||||
1: 4,
|
||||
2: 2
|
||||
}[ event.button ] || event.button;
|
||||
}[ event.button ] || ( event.button === -1 ? 0 : event.button );
|
||||
}
|
||||
|
||||
return event;
|
||||
|
@ -201,7 +201,9 @@ $.extend( $.simulate.prototype, {
|
|||
},
|
||||
|
||||
dispatchEvent: function( elem, type, event ) {
|
||||
if ( elem.dispatchEvent ) {
|
||||
if ( elem[ type ] ) {
|
||||
elem[ type ]();
|
||||
} else if ( elem.dispatchEvent ) {
|
||||
elem.dispatchEvent( event );
|
||||
} else if ( elem.fireEvent ) {
|
||||
elem.fireEvent( "on" + type, event );
|
||||
|
|
14
vendor/assets/leaflet/leaflet.osm.js
vendored
14
vendor/assets/leaflet/leaflet.osm.js
vendored
|
@ -5,7 +5,7 @@ L.OSM.TileLayer = L.TileLayer.extend({
|
|||
url: document.location.protocol === 'https:' ?
|
||||
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' :
|
||||
'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
attribution: '© <a target="_parent" href="http://www.openstreetmap.org">OpenStreetMap</a> and contributors, under an <a target="_parent" href="http://www.openstreetmap.org/copyright">open license</a>'
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
|
@ -26,14 +26,14 @@ L.OSM.Mapnik = L.OSM.TileLayer.extend({
|
|||
L.OSM.CycleMap = L.OSM.TileLayer.extend({
|
||||
options: {
|
||||
url: 'http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',
|
||||
attribution: "Tiles courtesy of <a href='http://www.thunderforest.com/' target='_blank'>Andy Allan</a>"
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors. Tiles courtesy of <a href="http://www.thunderforest.com/" target="_blank">Andy Allan</a>'
|
||||
}
|
||||
});
|
||||
|
||||
L.OSM.TransportMap = L.OSM.TileLayer.extend({
|
||||
options: {
|
||||
url: 'http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png',
|
||||
attribution: "Tiles courtesy of <a href='http://www.thunderforest.com/' target='_blank'>Andy Allan</a>"
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors. Tiles courtesy of <a href="http://www.thunderforest.com/" target="_blank">Andy Allan</a>'
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -43,9 +43,9 @@ L.OSM.MapQuestOpen = L.OSM.TileLayer.extend({
|
|||
'https://otile{s}-s.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png' :
|
||||
'http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png',
|
||||
subdomains: '1234',
|
||||
attribution: document.location.protocol === 'https:' ?
|
||||
"Tiles courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='https://developer.mapquest.com/content/osm/mq_logo.png'>" :
|
||||
"Tiles courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png'>"
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors. ' + document.location.protocol === 'https:' ?
|
||||
'Tiles courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">' :
|
||||
'Tiles courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">'
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -54,7 +54,7 @@ L.OSM.HOT = L.OSM.TileLayer.extend({
|
|||
url: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
||||
maxZoom: 20,
|
||||
subdomains: 'abc',
|
||||
attribution: "Tiles courtesy of <a href='http://hot.openstreetmap.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>"
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors. Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'
|
||||
}
|
||||
});
|
||||
|
||||
|
|
860
vendor/assets/ohauth/ohauth.js
vendored
860
vendor/assets/ohauth/ohauth.js
vendored
|
@ -87,8 +87,9 @@ ohauth.signature = function(oauth_secret, token_secret, baseString) {
|
|||
|
||||
/**
|
||||
* Takes an options object for configuration (consumer_key,
|
||||
* consumer_secret, version, signature_method, token) and returns a
|
||||
* function that generates the Authorization header for given data.
|
||||
* consumer_secret, version, signature_method, token, token_secret)
|
||||
* and returns a function that generates the Authorization header
|
||||
* for given data.
|
||||
*
|
||||
* The returned function takes these parameters:
|
||||
* - method: GET/POST/...
|
||||
|
@ -141,45 +142,7 @@ ohauth.headerGenerator = function(options) {
|
|||
|
||||
module.exports = ohauth;
|
||||
|
||||
},{"xtend":2,"jshashes":3}],2:[function(require,module,exports){
|
||||
var Keys = Object.keys || objectKeys
|
||||
|
||||
module.exports = extend
|
||||
|
||||
function extend() {
|
||||
var target = {}
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var source = arguments[i]
|
||||
|
||||
if (!isObject(source)) {
|
||||
continue
|
||||
}
|
||||
|
||||
var keys = Keys(source)
|
||||
|
||||
for (var j = 0; j < keys.length; j++) {
|
||||
var name = keys[j]
|
||||
target[name] = source[name]
|
||||
}
|
||||
}
|
||||
|
||||
return target
|
||||
}
|
||||
|
||||
function objectKeys(obj) {
|
||||
var keys = []
|
||||
for (var k in obj) {
|
||||
keys.push(k)
|
||||
}
|
||||
return keys
|
||||
}
|
||||
|
||||
function isObject(obj) {
|
||||
return obj !== null && typeof obj === "object"
|
||||
}
|
||||
|
||||
},{}],3:[function(require,module,exports){
|
||||
},{"jshashes":2,"xtend":3}],2:[function(require,module,exports){
|
||||
(function(global){/**
|
||||
* jsHashes - A fast and independent hashing library pure JavaScript implemented (ES5 compliant) for both server and client side
|
||||
*
|
||||
|
@ -1801,6 +1764,819 @@ function isObject(obj) {
|
|||
}( this ));
|
||||
}()); // IIFE
|
||||
})(window)
|
||||
},{}],4:[function(require,module,exports){
|
||||
module.exports = hasKeys
|
||||
|
||||
function hasKeys(source) {
|
||||
return source !== null &&
|
||||
(typeof source === "object" ||
|
||||
typeof source === "function")
|
||||
}
|
||||
|
||||
},{}],3:[function(require,module,exports){
|
||||
var Keys = require("object-keys")
|
||||
var hasKeys = require("./has-keys")
|
||||
|
||||
module.exports = extend
|
||||
|
||||
function extend() {
|
||||
var target = {}
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var source = arguments[i]
|
||||
|
||||
if (!hasKeys(source)) {
|
||||
continue
|
||||
}
|
||||
|
||||
var keys = Keys(source)
|
||||
|
||||
for (var j = 0; j < keys.length; j++) {
|
||||
var name = keys[j]
|
||||
target[name] = source[name]
|
||||
}
|
||||
}
|
||||
|
||||
return target
|
||||
}
|
||||
|
||||
},{"./has-keys":4,"object-keys":5}],5:[function(require,module,exports){
|
||||
module.exports = Object.keys || require('./shim');
|
||||
|
||||
|
||||
},{"./shim":6}],6:[function(require,module,exports){
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
// modified from https://github.com/kriskowal/es5-shim
|
||||
var has = Object.prototype.hasOwnProperty,
|
||||
is = require('is'),
|
||||
forEach = require('foreach'),
|
||||
hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),
|
||||
dontEnums = [
|
||||
"toString",
|
||||
"toLocaleString",
|
||||
"valueOf",
|
||||
"hasOwnProperty",
|
||||
"isPrototypeOf",
|
||||
"propertyIsEnumerable",
|
||||
"constructor"
|
||||
],
|
||||
keysShim;
|
||||
|
||||
keysShim = function keys(object) {
|
||||
if (!is.object(object) && !is.array(object)) {
|
||||
throw new TypeError("Object.keys called on a non-object");
|
||||
}
|
||||
|
||||
var name, theKeys = [];
|
||||
for (name in object) {
|
||||
if (has.call(object, name)) {
|
||||
theKeys.push(name);
|
||||
}
|
||||
}
|
||||
|
||||
if (hasDontEnumBug) {
|
||||
forEach(dontEnums, function (dontEnum) {
|
||||
if (has.call(object, dontEnum)) {
|
||||
theKeys.push(dontEnum);
|
||||
}
|
||||
});
|
||||
}
|
||||
return theKeys;
|
||||
};
|
||||
|
||||
module.exports = keysShim;
|
||||
}());
|
||||
|
||||
|
||||
},{"is":7,"foreach":8}],7:[function(require,module,exports){
|
||||
|
||||
/**!
|
||||
* is
|
||||
* the definitive JavaScript type testing library
|
||||
*
|
||||
* @copyright 2013 Enrico Marino
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
var objProto = Object.prototype;
|
||||
var owns = objProto.hasOwnProperty;
|
||||
var toString = objProto.toString;
|
||||
var isActualNaN = function (value) {
|
||||
return value !== value;
|
||||
};
|
||||
var NON_HOST_TYPES = {
|
||||
"boolean": 1,
|
||||
"number": 1,
|
||||
"string": 1,
|
||||
"undefined": 1
|
||||
};
|
||||
|
||||
/**
|
||||
* Expose `is`
|
||||
*/
|
||||
|
||||
var is = module.exports = {};
|
||||
|
||||
/**
|
||||
* Test general.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.type
|
||||
* Test if `value` is a type of `type`.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @param {String} type type
|
||||
* @return {Boolean} true if `value` is a type of `type`, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.a =
|
||||
is.type = function (value, type) {
|
||||
return typeof value === type;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.defined
|
||||
* Test if `value` is defined.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if 'value' is defined, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.defined = function (value) {
|
||||
return value !== undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.empty
|
||||
* Test if `value` is empty.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is empty, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.empty = function (value) {
|
||||
var type = toString.call(value);
|
||||
var key;
|
||||
|
||||
if ('[object Array]' === type || '[object Arguments]' === type) {
|
||||
return value.length === 0;
|
||||
}
|
||||
|
||||
if ('[object Object]' === type) {
|
||||
for (key in value) if (owns.call(value, key)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ('[object String]' === type) {
|
||||
return '' === value;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.equal
|
||||
* Test if `value` is equal to `other`.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @param {Mixed} other value to compare with
|
||||
* @return {Boolean} true if `value` is equal to `other`, false otherwise
|
||||
*/
|
||||
|
||||
is.equal = function (value, other) {
|
||||
var type = toString.call(value)
|
||||
var key;
|
||||
|
||||
if (type !== toString.call(other)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ('[object Object]' === type) {
|
||||
for (key in value) {
|
||||
if (!is.equal(value[key], other[key])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if ('[object Array]' === type) {
|
||||
key = value.length;
|
||||
if (key !== other.length) {
|
||||
return false;
|
||||
}
|
||||
while (--key) {
|
||||
if (!is.equal(value[key], other[key])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if ('[object Function]' === type) {
|
||||
return value.prototype === other.prototype;
|
||||
}
|
||||
|
||||
if ('[object Date]' === type) {
|
||||
return value.getTime() === other.getTime();
|
||||
}
|
||||
|
||||
return value === other;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.hosted
|
||||
* Test if `value` is hosted by `host`.
|
||||
*
|
||||
* @param {Mixed} value to test
|
||||
* @param {Mixed} host host to test with
|
||||
* @return {Boolean} true if `value` is hosted by `host`, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.hosted = function (value, host) {
|
||||
var type = typeof host[value];
|
||||
return type === 'object' ? !!host[value] : !NON_HOST_TYPES[type];
|
||||
};
|
||||
|
||||
/**
|
||||
* is.instance
|
||||
* Test if `value` is an instance of `constructor`.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is an instance of `constructor`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.instance = is['instanceof'] = function (value, constructor) {
|
||||
return value instanceof constructor;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.null
|
||||
* Test if `value` is null.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is null, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is['null'] = function (value) {
|
||||
return value === null;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.undefined
|
||||
* Test if `value` is undefined.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is undefined, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.undefined = function (value) {
|
||||
return value === undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Test arguments.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.arguments
|
||||
* Test if `value` is an arguments object.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is an arguments object, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.arguments = function (value) {
|
||||
var isStandardArguments = '[object Arguments]' === toString.call(value);
|
||||
var isOldArguments = !is.array(value) && is.arraylike(value) && is.object(value) && is.fn(value.callee);
|
||||
return isStandardArguments || isOldArguments;
|
||||
};
|
||||
|
||||
/**
|
||||
* Test array.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.array
|
||||
* Test if 'value' is an array.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is an array, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.array = function (value) {
|
||||
return '[object Array]' === toString.call(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* is.arguments.empty
|
||||
* Test if `value` is an empty arguments object.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is an empty arguments object, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
is.arguments.empty = function (value) {
|
||||
return is.arguments(value) && value.length === 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.array.empty
|
||||
* Test if `value` is an empty array.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is an empty array, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
is.array.empty = function (value) {
|
||||
return is.array(value) && value.length === 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.arraylike
|
||||
* Test if `value` is an arraylike object.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is an arguments object, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.arraylike = function (value) {
|
||||
return !!value && !is.boolean(value)
|
||||
&& owns.call(value, 'length')
|
||||
&& isFinite(value.length)
|
||||
&& is.number(value.length)
|
||||
&& value.length >= 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Test boolean.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.boolean
|
||||
* Test if `value` is a boolean.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is a boolean, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.boolean = function (value) {
|
||||
return '[object Boolean]' === toString.call(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* is.false
|
||||
* Test if `value` is false.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is false, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is['false'] = function (value) {
|
||||
return is.boolean(value) && (value === false || value.valueOf() === false);
|
||||
};
|
||||
|
||||
/**
|
||||
* is.true
|
||||
* Test if `value` is true.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is true, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is['true'] = function (value) {
|
||||
return is.boolean(value) && (value === true || value.valueOf() === true);
|
||||
};
|
||||
|
||||
/**
|
||||
* Test date.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.date
|
||||
* Test if `value` is a date.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is a date, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.date = function (value) {
|
||||
return '[object Date]' === toString.call(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* Test element.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.element
|
||||
* Test if `value` is an html element.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is an HTML Element, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.element = function (value) {
|
||||
return value !== undefined
|
||||
&& typeof HTMLElement !== 'undefined'
|
||||
&& value instanceof HTMLElement
|
||||
&& value.nodeType === 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Test error.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.error
|
||||
* Test if `value` is an error object.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is an error object, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.error = function (value) {
|
||||
return '[object Error]' === toString.call(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* Test function.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.fn / is.function (deprecated)
|
||||
* Test if `value` is a function.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is a function, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.fn = is['function'] = function (value) {
|
||||
var isAlert = typeof window !== 'undefined' && value === window.alert;
|
||||
return isAlert || '[object Function]' === toString.call(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* Test number.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.number
|
||||
* Test if `value` is a number.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is a number, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.number = function (value) {
|
||||
return '[object Number]' === toString.call(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* is.infinite
|
||||
* Test if `value` is positive or negative infinity.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is positive or negative Infinity, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
is.infinite = function (value) {
|
||||
return value === Infinity || value === -Infinity;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.decimal
|
||||
* Test if `value` is a decimal number.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is a decimal number, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.decimal = function (value) {
|
||||
return is.number(value) && !isActualNaN(value) && value % 1 !== 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.divisibleBy
|
||||
* Test if `value` is divisible by `n`.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @param {Number} n dividend
|
||||
* @return {Boolean} true if `value` is divisible by `n`, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.divisibleBy = function (value, n) {
|
||||
var isDividendInfinite = is.infinite(value);
|
||||
var isDivisorInfinite = is.infinite(n);
|
||||
var isNonZeroNumber = is.number(value) && !isActualNaN(value) && is.number(n) && !isActualNaN(n) && n !== 0;
|
||||
return isDividendInfinite || isDivisorInfinite || (isNonZeroNumber && value % n === 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* is.int
|
||||
* Test if `value` is an integer.
|
||||
*
|
||||
* @param value to test
|
||||
* @return {Boolean} true if `value` is an integer, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.int = function (value) {
|
||||
return is.number(value) && !isActualNaN(value) && value % 1 === 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.maximum
|
||||
* Test if `value` is greater than 'others' values.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @param {Array} others values to compare with
|
||||
* @return {Boolean} true if `value` is greater than `others` values
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.maximum = function (value, others) {
|
||||
if (isActualNaN(value)) {
|
||||
throw new TypeError('NaN is not a valid value');
|
||||
} else if (!is.arraylike(others)) {
|
||||
throw new TypeError('second argument must be array-like');
|
||||
}
|
||||
var len = others.length;
|
||||
|
||||
while (--len >= 0) {
|
||||
if (value < others[len]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.minimum
|
||||
* Test if `value` is less than `others` values.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @param {Array} others values to compare with
|
||||
* @return {Boolean} true if `value` is less than `others` values
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.minimum = function (value, others) {
|
||||
if (isActualNaN(value)) {
|
||||
throw new TypeError('NaN is not a valid value');
|
||||
} else if (!is.arraylike(others)) {
|
||||
throw new TypeError('second argument must be array-like');
|
||||
}
|
||||
var len = others.length;
|
||||
|
||||
while (--len >= 0) {
|
||||
if (value > others[len]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.nan
|
||||
* Test if `value` is not a number.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is not a number, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.nan = function (value) {
|
||||
return !is.number(value) || value !== value;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.even
|
||||
* Test if `value` is an even number.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @return {Boolean} true if `value` is an even number, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.even = function (value) {
|
||||
return is.infinite(value) || (is.number(value) && value === value && value % 2 === 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* is.odd
|
||||
* Test if `value` is an odd number.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @return {Boolean} true if `value` is an odd number, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.odd = function (value) {
|
||||
return is.infinite(value) || (is.number(value) && value === value && value % 2 !== 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* is.ge
|
||||
* Test if `value` is greater than or equal to `other`.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @param {Number} other value to compare with
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.ge = function (value, other) {
|
||||
if (isActualNaN(value) || isActualNaN(other)) {
|
||||
throw new TypeError('NaN is not a valid value');
|
||||
}
|
||||
return !is.infinite(value) && !is.infinite(other) && value >= other;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.gt
|
||||
* Test if `value` is greater than `other`.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @param {Number} other value to compare with
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.gt = function (value, other) {
|
||||
if (isActualNaN(value) || isActualNaN(other)) {
|
||||
throw new TypeError('NaN is not a valid value');
|
||||
}
|
||||
return !is.infinite(value) && !is.infinite(other) && value > other;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.le
|
||||
* Test if `value` is less than or equal to `other`.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @param {Number} other value to compare with
|
||||
* @return {Boolean} if 'value' is less than or equal to 'other'
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.le = function (value, other) {
|
||||
if (isActualNaN(value) || isActualNaN(other)) {
|
||||
throw new TypeError('NaN is not a valid value');
|
||||
}
|
||||
return !is.infinite(value) && !is.infinite(other) && value <= other;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.lt
|
||||
* Test if `value` is less than `other`.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @param {Number} other value to compare with
|
||||
* @return {Boolean} if `value` is less than `other`
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.lt = function (value, other) {
|
||||
if (isActualNaN(value) || isActualNaN(other)) {
|
||||
throw new TypeError('NaN is not a valid value');
|
||||
}
|
||||
return !is.infinite(value) && !is.infinite(other) && value < other;
|
||||
};
|
||||
|
||||
/**
|
||||
* is.within
|
||||
* Test if `value` is within `start` and `finish`.
|
||||
*
|
||||
* @param {Number} value value to test
|
||||
* @param {Number} start lower bound
|
||||
* @param {Number} finish upper bound
|
||||
* @return {Boolean} true if 'value' is is within 'start' and 'finish'
|
||||
* @api public
|
||||
*/
|
||||
is.within = function (value, start, finish) {
|
||||
if (isActualNaN(value) || isActualNaN(start) || isActualNaN(finish)) {
|
||||
throw new TypeError('NaN is not a valid value');
|
||||
} else if (!is.number(value) || !is.number(start) || !is.number(finish)) {
|
||||
throw new TypeError('all arguments must be numbers');
|
||||
}
|
||||
var isAnyInfinite = is.infinite(value) || is.infinite(start) || is.infinite(finish);
|
||||
return isAnyInfinite || (value >= start && value <= finish);
|
||||
};
|
||||
|
||||
/**
|
||||
* Test object.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.object
|
||||
* Test if `value` is an object.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is an object, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.object = function (value) {
|
||||
return value && '[object Object]' === toString.call(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* is.hash
|
||||
* Test if `value` is a hash - a plain object literal.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is a hash, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.hash = function (value) {
|
||||
return is.object(value) && value.constructor === Object && !value.nodeType && !value.setInterval;
|
||||
};
|
||||
|
||||
/**
|
||||
* Test regexp.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.regexp
|
||||
* Test if `value` is a regular expression.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if `value` is a regexp, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.regexp = function (value) {
|
||||
return '[object RegExp]' === toString.call(value);
|
||||
};
|
||||
|
||||
/**
|
||||
* Test string.
|
||||
*/
|
||||
|
||||
/**
|
||||
* is.string
|
||||
* Test if `value` is a string.
|
||||
*
|
||||
* @param {Mixed} value value to test
|
||||
* @return {Boolean} true if 'value' is a string, false otherwise
|
||||
* @api public
|
||||
*/
|
||||
|
||||
is.string = function (value) {
|
||||
return '[object String]' === toString.call(value);
|
||||
};
|
||||
|
||||
|
||||
},{}],8:[function(require,module,exports){
|
||||
|
||||
var hasOwn = Object.prototype.hasOwnProperty;
|
||||
|
||||
module.exports = function forEach (obj, fn, ctx) {
|
||||
if (typeof fn !== 'function') {
|
||||
throw new TypeError('iterator must be a function');
|
||||
}
|
||||
var l = obj.length;
|
||||
if (l === +l) {
|
||||
for (var i = 0; i < l; i++) {
|
||||
fn.call(ctx, obj[i], i, obj);
|
||||
}
|
||||
} else {
|
||||
for (var k in obj) {
|
||||
if (hasOwn.call(obj, k)) {
|
||||
fn.call(ctx, obj[k], k, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
},{}]},{},[1])(1)
|
||||
});
|
||||
;
|
||||
;
|
BIN
vendor/assets/potlatch2/potlatch2.swf
vendored
BIN
vendor/assets/potlatch2/potlatch2.swf
vendored
Binary file not shown.
BIN
vendor/assets/potlatch2/potlatch2/assets.zip
vendored
BIN
vendor/assets/potlatch2/potlatch2/assets.zip
vendored
Binary file not shown.
BIN
vendor/assets/potlatch2/potlatch2/locales/zh_TW.swf
vendored
BIN
vendor/assets/potlatch2/potlatch2/locales/zh_TW.swf
vendored
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue