Comparing version 3.0.0-beta.1 to 3.0.0-beta.3
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
@@ -88,10 +88,8 @@ * Released under the MIT License. | ||
var isArray = Array.isArray; | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function isArrayLike (value) { | ||
if (isNil(value) || isFunction(value)) { | ||
return false; | ||
} | ||
var length = value.length; | ||
return isArray(value) || length === 0 || (+length > 0 && (length - 1) in value); | ||
return !isNil(value) && isNumber(value.length) && !isFunction(value); | ||
} | ||
@@ -118,6 +116,2 @@ | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function forIn (value, iterator, context) { | ||
@@ -124,0 +118,0 @@ var cb = iteratorCallback(iterator, context); |
16
array.js
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
@@ -92,10 +92,8 @@ * Released under the MIT License. | ||
var isArray = Array.isArray; | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function isArrayLike (value) { | ||
if (isNil(value) || isFunction(value)) { | ||
return false; | ||
} | ||
var length = value.length; | ||
return isArray(value) || length === 0 || (+length > 0 && (length - 1) in value); | ||
return !isNil(value) && isNumber(value.length) && !isFunction(value); | ||
} | ||
@@ -122,6 +120,2 @@ | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function forIn (value, iterator, context) { | ||
@@ -128,0 +122,0 @@ var cb = iteratorCallback(iterator, context); |
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
* Released under the MIT License. | ||
*/ | ||
"use strict";function append(r,n){r&&(r[r.length]=n)}function iteratorCallback(r,n){return n?r.bind(n):r}function forEach(r,n,e){for(var t=iteratorCallback(n,e),i=0,a=r.length,o=void 0;!1!==o&&i<a;i++)o=t(r[i],i,r)}function forEach$1(r,n,e){return r&&forEach(r,n,e)}function grep(r,n,e){var t=[];if(r){var i=0,a=r.length;for(e=!!e;i<a;i++)!n(r[i],i)===e&&(t[t.length]=r[i])}return t}function inArray(r,n,e){if(n){if(n.indexOf)return n.indexOf(r,e);for(var t=n.length,i=e?e<0?Math.max(0,t+e):e:0;i<t;i++)if(i in n&&n[i]===r)return i}return-1}function includes(r,n){return-1!==inArray(n,r)}function join(r,n){for(var e=+n.length,t=r.length,i=0;i<e;i++)r[t++]=n[i];return r.length=t,r}function isNil(r){return null==r}function isFunction(r){return"function"==typeof r}var isArray=Array.isArray;function isArrayLike(r){if(isNil(r)||isFunction(r))return!1;var n=r.length;return isArray(r)||0===n||0<+n&&n-1 in r}function isString(r){return"string"==typeof r}var ref=Array.prototype,push=ref.push;function makeArray(r,n){var e=n||[];return r&&(isArrayLike(Object(r))?join(e,isString(r)?[r]:r):e.push?e.push(r):push.call(e,r)),e}function isNumber(r){return"number"==typeof r}function forIn(r,n,e){var t=iteratorCallback(n,e);for(var i in r)if(!1===t(r[i],i,r))break}function forNumber(r,n,e){for(var t=iteratorCallback(n,e),i=0,a=void 0;!1!==a&&i<r;i++)a=t(i,i,i)}function each(r,n,e){r&&(isArrayLike(r)?forEach(r,n,e):isNumber(r)?forNumber(r,n,e):forIn(r,n,e))}function append$1(r,n){r[r.length]=n}function map(r,n,e){var t=[],i=iteratorCallback(n,e);return each(r,function(r){isNil(r=i(r))||append$1(t,r)}),t}function removeAt(r,n){return r.splice(n,1),n}function remove(r,n){var e=inArray(n,r);return 0<=e?(removeAt(r,e),n):null}function toArray(r){return r&&[].concat(r)}var array={append:append,forEach:forEach$1,grep:grep,inArray:inArray,includes:includes,join:join,makeArray:makeArray,map:map,remove:remove,removeAt:removeAt,toArray:toArray};module.exports=array; | ||
"use strict";function append(r,n){r&&(r[r.length]=n)}function iteratorCallback(r,n){return n?r.bind(n):r}function forEach(r,n,e){for(var t=iteratorCallback(n,e),i=0,a=r.length,o=void 0;!1!==o&&i<a;i++)o=t(r[i],i,r)}function forEach$1(r,n,e){return r&&forEach(r,n,e)}function grep(r,n,e){var t=[];if(r){var i=0,a=r.length;for(e=!!e;i<a;i++)!n(r[i],i)===e&&(t[t.length]=r[i])}return t}function inArray(r,n,e){if(n){if(n.indexOf)return n.indexOf(r,e);for(var t=n.length,i=e?e<0?Math.max(0,t+e):e:0;i<t;i++)if(i in n&&n[i]===r)return i}return-1}function includes(r,n){return-1!==inArray(n,r)}function join(r,n){for(var e=+n.length,t=r.length,i=0;i<e;i++)r[t++]=n[i];return r.length=t,r}function isNil(r){return null==r}function isFunction(r){return"function"==typeof r}function isNumber(r){return"number"==typeof r}function isArrayLike(r){return!isNil(r)&&isNumber(r.length)&&!isFunction(r)}function isString(r){return"string"==typeof r}var ref=Array.prototype,push=ref.push;function makeArray(r,n){var e=n||[];return r&&(isArrayLike(Object(r))?join(e,isString(r)?[r]:r):e.push?e.push(r):push.call(e,r)),e}function forIn(r,n,e){var t=iteratorCallback(n,e);for(var i in r)if(!1===t(r[i],i,r))break}function forNumber(r,n,e){for(var t=iteratorCallback(n,e),i=0,a=void 0;!1!==a&&i<r;i++)a=t(i,i,i)}function each(r,n,e){r&&(isArrayLike(r)?forEach(r,n,e):isNumber(r)?forNumber(r,n,e):forIn(r,n,e))}function append$1(r,n){r[r.length]=n}function map(r,n,e){var t=[],i=iteratorCallback(n,e);return each(r,function(r){isNil(r=i(r))||append$1(t,r)}),t}function removeAt(r,n){return r.splice(n,1),n}function remove(r,n){var e=inArray(n,r);return 0<=e?(removeAt(r,e),n):null}function toArray(r){return r&&[].concat(r)}var array={append:append,forEach:forEach$1,grep:grep,inArray:inArray,includes:includes,join:join,makeArray:makeArray,map:map,remove:remove,removeAt:removeAt,toArray:toArray};module.exports=array; |
@@ -1,1 +0,1 @@ | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).celia=r()}(this,function(){"use strict";function f(n,r){return r?n.bind(r):n}function e(n,r,t){for(var e=f(r,t),u=0,i=n.length,o=void 0;!1!==o&&u<i;u++)o=e(n[u],u,n)}function u(n,r,t){if(r){if(r.indexOf)return r.indexOf(n,t);for(var e=r.length,u=t?t<0?Math.max(0,e+t):t:0;u<e;u++)if(u in r&&r[u]===n)return u}return-1}function i(n,r){for(var t=+r.length,e=n.length,u=0;u<t;u++)n[e++]=r[u];return n.length=e,n}function o(n){return null==n}var t=Array.isArray;function c(n){if(o(n)||"function"==typeof n)return!1;var r=n.length;return t(n)||0===r||0<+r&&r-1 in n}var a=Array.prototype.push;function l(n,r,t){n&&(c(n)?e(n,r,t):"number"==typeof n?function(n,r,t){for(var e=f(r,t),u=0,i=void 0;!1!==i&&u<n;u++)i=e(u,u,u)}(n,r,t):function(n,r,t){var e=f(r,t);for(var u in n)if(!1===e(n[u],u,n))break}(n,r,t))}function v(n,r){return n.splice(r,1),r}return{append:function(n,r){n&&(n[n.length]=r)},forEach:function(n,r,t){return n&&e(n,r,t)},grep:function(n,r,t){var e=[];if(n){var u=0,i=n.length;for(t=!!t;u<i;u++)!r(n[u],u)===t&&(e[e.length]=n[u])}return e},inArray:u,includes:function(n,r){return-1!==u(r,n)},join:i,makeArray:function(n,r){var t=r||[];return n&&(c(Object(n))?i(t,"string"==typeof n?[n]:n):t.push?t.push(n):a.call(t,n)),t},map:function(n,r,t){var e=[],u=f(r,t);return l(n,function(n){var r,t;o(n=u(n))||(t=n,(r=e)[r.length]=t)}),e},remove:function(n,r){var t=u(r,n);return 0<=t?(v(n,t),r):null},removeAt:v,toArray:function(n){return n&&[].concat(n)}}}); | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).celia=r()}(this,function(){"use strict";function i(n,r){return r?n.bind(r):n}function e(n,r,t){for(var e=i(r,t),u=0,o=n.length,f=void 0;!1!==f&&u<o;u++)f=e(n[u],u,n)}function u(n,r,t){if(r){if(r.indexOf)return r.indexOf(n,t);for(var e=r.length,u=t?t<0?Math.max(0,e+t):t:0;u<e;u++)if(u in r&&r[u]===n)return u}return-1}function o(n,r){for(var t=+r.length,e=n.length,u=0;u<t;u++)n[e++]=r[u];return n.length=e,n}function f(n){return null==n}function c(n){return"number"==typeof n}function a(n){return!f(n)&&c(n.length)&&!("function"==typeof n)}var l=Array.prototype.push;function p(n,r,t){n&&(a(n)?e(n,r,t):c(n)?function(n,r,t){for(var e=i(r,t),u=0,o=void 0;!1!==o&&u<n;u++)o=e(u,u,u)}(n,r,t):function(n,r,t){var e=i(r,t);for(var u in n)if(!1===e(n[u],u,n))break}(n,r,t))}function v(n,r){return n.splice(r,1),r}return{append:function(n,r){n&&(n[n.length]=r)},forEach:function(n,r,t){return n&&e(n,r,t)},grep:function(n,r,t){var e=[];if(n){var u=0,o=n.length;for(t=!!t;u<o;u++)!r(n[u],u)===t&&(e[e.length]=n[u])}return e},inArray:u,includes:function(n,r){return-1!==u(r,n)},join:o,makeArray:function(n,r){var t=r||[];return n&&(a(Object(n))?o(t,"string"==typeof n?[n]:n):t.push?t.push(n):l.call(t,n)),t},map:function(n,r,t){var e=[],u=i(r,t);return p(n,function(n){var r,t;f(n=u(n))||(t=n,(r=e)[r.length]=t)}),e},remove:function(n,r){var t=u(r,n);return 0<=t?(v(n,t),r):null},removeAt:v,toArray:function(n){return n&&[].concat(n)}}}); |
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
@@ -88,10 +88,8 @@ * Released under the MIT License. | ||
var isArray = Array.isArray; | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function isArrayLike (value) { | ||
if (isNil(value) || isFunction(value)) { | ||
return false; | ||
} | ||
var length = value.length; | ||
return isArray(value) || length === 0 || (+length > 0 && (length - 1) in value); | ||
return !isNil(value) && isNumber(value.length) && !isFunction(value); | ||
} | ||
@@ -118,6 +116,2 @@ | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function forIn (value, iterator, context) { | ||
@@ -669,3 +663,3 @@ var cb = iteratorCallback(iterator, context); | ||
function format (date, inputString) { | ||
if (!inputString) { | ||
if (!inputString || inputString === 'UTC') { | ||
return date.toISOString(); | ||
@@ -820,2 +814,8 @@ } | ||
function sleep (ms) { | ||
return new Promise(function (resolve) { | ||
setTimeout(resolve, ms); | ||
}); | ||
} | ||
var RAW_DATA_TYPES = {}; | ||
@@ -852,2 +852,3 @@ 'Boolean,Number,String,Function,Array,Date,RegExp,Object,Error,Symbol'.split(',').forEach(function (name) { | ||
isUndefined: isUndefined, | ||
sleep: sleep, | ||
type: type | ||
@@ -854,0 +855,0 @@ }; |
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
@@ -86,10 +86,8 @@ * Released under the MIT License. | ||
var isArray = Array.isArray; | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function isArrayLike (value) { | ||
if (isNil(value) || isFunction(value)) { | ||
return false; | ||
} | ||
var length = value.length; | ||
return isArray(value) || length === 0 || (+length > 0 && (length - 1) in value); | ||
return !isNil(value) && isNumber(value.length) && !isFunction(value); | ||
} | ||
@@ -116,6 +114,2 @@ | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function forIn (value, iterator, context) { | ||
@@ -667,3 +661,3 @@ var cb = iteratorCallback(iterator, context); | ||
function format (date, inputString) { | ||
if (!inputString) { | ||
if (!inputString || inputString === 'UTC') { | ||
return date.toISOString(); | ||
@@ -818,2 +812,8 @@ } | ||
function sleep (ms) { | ||
return new Promise(function (resolve) { | ||
setTimeout(resolve, ms); | ||
}); | ||
} | ||
var RAW_DATA_TYPES = {}; | ||
@@ -850,2 +850,3 @@ 'Boolean,Number,String,Function,Array,Date,RegExp,Object,Error,Symbol'.split(',').forEach(function (name) { | ||
isUndefined: isUndefined, | ||
sleep: sleep, | ||
type: type | ||
@@ -852,0 +853,0 @@ }; |
25
celia.js
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
@@ -92,10 +92,8 @@ * Released under the MIT License. | ||
var isArray = Array.isArray; | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function isArrayLike (value) { | ||
if (isNil(value) || isFunction(value)) { | ||
return false; | ||
} | ||
var length = value.length; | ||
return isArray(value) || length === 0 || (+length > 0 && (length - 1) in value); | ||
return !isNil(value) && isNumber(value.length) && !isFunction(value); | ||
} | ||
@@ -122,6 +120,2 @@ | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function forIn (value, iterator, context) { | ||
@@ -673,3 +667,3 @@ var cb = iteratorCallback(iterator, context); | ||
function format (date, inputString) { | ||
if (!inputString) { | ||
if (!inputString || inputString === 'UTC') { | ||
return date.toISOString(); | ||
@@ -824,2 +818,8 @@ } | ||
function sleep (ms) { | ||
return new Promise(function (resolve) { | ||
setTimeout(resolve, ms); | ||
}); | ||
} | ||
var RAW_DATA_TYPES = {}; | ||
@@ -856,2 +856,3 @@ 'Boolean,Number,String,Function,Array,Date,RegExp,Object,Error,Symbol'.split(',').forEach(function (name) { | ||
isUndefined: isUndefined, | ||
sleep: sleep, | ||
type: type | ||
@@ -858,0 +859,0 @@ }; |
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
* Released under the MIT License. | ||
*/ | ||
"use strict";function append(e,r){e&&(e[e.length]=r)}function iteratorCallback(e,r){return r?e.bind(r):e}function forEach(e,r,t){for(var n=iteratorCallback(r,t),a=0,i=e.length,s=void 0;!1!==s&&a<i;a++)s=n(e[a],a,e)}function forEach$1(e,r,t){return e&&forEach(e,r,t)}function grep(e,r,t){var n=[];if(e){var a=0,i=e.length;for(t=!!t;a<i;a++)!r(e[a],a)===t&&(n[n.length]=e[a])}return n}function inArray(e,r,t){if(r){if(r.indexOf)return r.indexOf(e,t);for(var n=r.length,a=t?t<0?Math.max(0,n+t):t:0;a<n;a++)if(a in r&&r[a]===e)return a}return-1}function includes(e,r){return-1!==inArray(r,e)}function join(e,r){for(var t=+r.length,n=e.length,a=0;a<t;a++)e[n++]=r[a];return e.length=n,e}function isNil(e){return null==e}function isFunction(e){return"function"==typeof e}var isArray=Array.isArray;function isArrayLike(e){if(isNil(e)||isFunction(e))return!1;var r=e.length;return isArray(e)||0===r||0<+r&&r-1 in e}function isString(e){return"string"==typeof e}var ref=Array.prototype,push=ref.push;function makeArray(e,r){var t=r||[];return e&&(isArrayLike(Object(e))?join(t,isString(e)?[e]:e):t.push?t.push(e):push.call(t,e)),t}function isNumber(e){return"number"==typeof e}function forIn(e,r,t){var n=iteratorCallback(r,t);for(var a in e)if(!1===n(e[a],a,e))break}function forNumber(e,r,t){for(var n=iteratorCallback(r,t),a=0,i=void 0;!1!==i&&a<e;a++)i=n(a,a,a)}function each(e,r,t){e&&(isArrayLike(e)?forEach(e,r,t):isNumber(e)?forNumber(e,r,t):forIn(e,r,t))}function append$1(e,r){e[e.length]=r}function map(e,r,t){var n=[],a=iteratorCallback(r,t);return each(e,function(e){isNil(e=a(e))||append$1(n,e)}),n}function removeAt(e,r){return e.splice(r,1),r}function remove(e,r){var t=inArray(r,e);return 0<=t?(removeAt(e,t),r):null}function toArray(e){return e&&[].concat(e)}var array={append:append,forEach:forEach$1,grep:grep,inArray:inArray,includes:includes,join:join,makeArray:makeArray,map:map,remove:remove,removeAt:removeAt,toArray:toArray},DASH_ALPHA_REGEX=/-([a-z])/g;function camelCase(e){return e.replace(DASH_ALPHA_REGEX,function(e,r){return r.toUpperCase()})}function isObject(e){return!isNil(e)&&"object"==typeof e}function parseArray(e,r){return r?new Date(Date.UTC(e[0],e[1]||0,isNil(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)):new Date(e[0],e[1]||0,isNil(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)}var UNITS={},setter=function(e,r){UNITS[e]=UNITS[e.slice(0,-1)]=UNITS[r]=r};function normalizeUnit(e,r){return UNITS[e]||r}setter("years","Y"),setter("months","M"),setter("dates","D"),setter("days","d"),setter("hours","h"),setter("minutes","m"),setter("seconds","s"),setter("milliseconds","ms");var indexOfUnits={Y:0,M:1,d:2,h:3,m:4,s:5,ms:6};function getIndex(e){return e=normalizeUnit(e,"ms"),indexOfUnits[e]}function add(e,r,t){var n=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];if(isObject(r))forIn(r,function(e,r){var t=getIndex(r);n[t]+=e});else{var a=getIndex(t);n[a]+=r}return e.setTime(+parseArray(n)),e}function clone(e){return new Date(+e)}function isLeapYear(e){var r=e.getFullYear();return r%4==0&&r%100!=0||r%400==0}var arr=[31,28,31,30,31,30,31,31,30,31,30,31],arr2=[31,29,31,30,31,30,31,31,30,31,30,31];function daysInYear(e){return isLeapYear(e)?arr2:arr}function isUndefined(e){return void 0===e}function dayOfYear(e,r){var t=daysInYear(e),n=e.getMonth(),a=0;return forNumber(n,function(e){a+=t[e]}),a+=e.getDate(),isUndefined(r)?a:(e.setTime(+e+864e5*(r-a)),e)}function daysInMonth(e){return daysInYear(e)[e.getMonth()]}var ASP_NET_JSON_REGEX=/^\/?Date\((-?\d+)/i,BASIC_ISO_REGEX=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DATES_REGEX=[["YYYY-MM-DD",/(\d{4})-(\d\d)-(\d\d)/],["YYYY-MM",/(\d{4})-(\d\d)/,!1],["YYYYMMDD",/(\d{4})(\d\d)(\d\d)/],["YYYYMM",/(\d{4})(\d\d)/,!1],["YYYY",/\d{4}/,!1]],EXTENDED_ISO_REGEX=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,FORMAT_REGEX=/\[.*?\]|Y{2,4}|y{2,4}|M{1,2}|D{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|SSS|Z{1,2}/g,TIMES_REGEX=[["HH:mm:ss.SSSS",/(\d\d):(\d\d):(\d\d)\.(\d+)/],["HH:mm:ss,SSSS",/(\d\d):(\d\d):(\d\d),(\d+)/],["HH:mm:ss",/(\d\d):(\d\d):(\d\d)/],["HH:mm",/(\d\d):(\d\d)/],["HHmmss.SSSS",/(\d\d)(\d\d)(\d\d)\.(\d+)/],["HHmmss,SSSS",/(\d\d)(\d\d)(\d\d),(\d+)/],["HHmmss",/(\d\d)(\d\d)(\d\d)/],["HHmm",/(\d\d)(\d\d)/],["HH",/\d\d/]],TZ_REGEX=/(Z)|[+-](\d\d)(?::?(\d\d))?/,TIMEZONE_OFFSET=(new Date).getTimezoneOffset(),toString=Object.prototype.toString;function toString$1(e){return toString.call(e)}function isDate(e){return"[object Date]"===toString$1(e)}function extractFrom(e){var t,n,a=[],i=EXTENDED_ISO_REGEX.exec(e)||BASIC_ISO_REGEX.exec(e);if(i){if(forEach(DATES_REGEX,function(e,r){if(n=e[1].exec(i[1]))return forNumber(3,function(e){a[e]=parseInt(n[e+1]||1,10)}),a[1]-=1,t=!1!==e[2],!1}),e.indexOf(a[0]))return e;if(n=null,i[3]&&forEach(TIMES_REGEX,function(e){if(n=e[1].exec(i[3]))return a=a.concat(n.slice(1).map(function(e){return parseInt(e,10)})),!1}),!t&&n)return a;if(n=null,i[4]){n=TZ_REGEX.exec(i[4]);var r=TIMEZONE_OFFSET;n[1]||(a[3]-=n[2],a[4]-=n[3]||0),a[4]-=r}return a}return 4===e.length&&DATES_REGEX[4][1].test(e)?((a=[parseInt(e,10),0,1]).isUTC=!0,a):e}function parseFromFormat(t,n){var e,r=n.length,a=[],i=!1;if(forNumber(r,function(e){var r=t.charAt(e);switch(n.charAt(e)){case"Y":case"y":a[0]=(a[0]||"")+r;break;case"M":a[1]=(a[1]||"")+r;break;case"D":case"d":a[2]=(a[2]||"")+r;break;case"H":case"h":a[3]=(a[3]||"")+r;break;case"m":a[4]=(a[4]||"")+r;break;case"s":a[5]=(a[5]||"")+r;break;case"S":a[6]=(a[6]||"")+r;break;case"Z":i=!0}}),a=a.map(function(e){return parseInt(e,10)}),i)if(e=TZ_REGEX.exec(t.slice(-1<n.indexOf("ZZ")?-5:-6))){var s=TIMEZONE_OFFSET;if(!e[1]){var o="+"===e[0].charAt(0)?1:-1;a[3]-=e[2]*o,a[4]-=(e[3]||0)*o}a[4]-=s}else a.isUTC=i&-1<t.indexOf("Z");return isNil(a[1])||(a[1]-=1),a}function parseStringOrArray(e,r,t){if(!isString(e))return parseArray(e,!0===r);if(isString(r))return parseArray(parseFromFormat(e,r),t);var n=extractFrom(e);if(n!==e)return parseArray(n,n.isUTC||!0===r);var a=ASP_NET_JSON_REGEX.exec(e);return new Date(null!==a?+a[1]:e)}function parse(e,r,t){return e=isNil(e)?new Date:e.length?parseStringOrArray(e,r,t):isNumber(e)?new Date(e):isDate(e)?new Date(+e):e._i&&e.isValid()?new Date(+e):new Date}function monthDiff(e,r){var t=12*(r.getFullYear()-e.getFullYear())+(r.getMonth()-e.getMonth()),n=add(clone(e),t,"months");return-(t+(r<n?(r-n)/(n-add(clone(e),t-1,"months")):(r-n)/(add(clone(e),t+1,"months")-n)))||0}function absFloor(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function diff(e,r,t,n){var a;switch(r=parse(r),t=normalizeUnit(t)){case"Y":a=monthDiff(e,r)/12;break;case"M":a=monthDiff(e,r);break;case"s":a=(e-r)/1e3;break;case"m":a=(e-r)/6e4;break;case"h":a=(e-r)/36e5;break;case"d":a=(e-r)/864e5;break;default:a=e-r}return n?a:absFloor(a)}function startOf(e,r){switch(r=normalizeUnit(r)){case"Y":e.setMonth(0);case"M":e.setDate(1);case"D":case"d":e.setHours(0);case"h":e.setMinutes(0);case"m":e.setSeconds(0);case"s":e.setMilliseconds(0)}return e}function endOf(e,r){return"ms"===(r=normalizeUnit(r,"ms"))||(startOf(e,r),add(e,1,r),add(e,-1,"ms")),e}function padLeft(e,r){return void 0===r&&(r=2),("000000"+e).slice(-r)}function timezone(e,r){var t;return e<0?(t="+",e=Math.abs(e)):t="-",""+t+padLeft(Math.floor(e/60))+(r?"":":")+padLeft(Math.floor(e%60))}function h12(e){return 12<(e=e||24)?e-12:e}function format(r,e){return e?e.replace(FORMAT_REGEX,function(e){switch(e){case"YY":return String(r.getFullYear()).slice(-2);case"YYYY":case"yyyy":return r.getFullYear();case"M":return r.getMonth()+1;case"MM":return padLeft(r.getMonth()+1);case"D":case"d":return r.getDate();case"DD":case"dd":return padLeft(r.getDate());case"H":return r.getHours();case"HH":return padLeft(r.getHours());case"h":return h12(r.getHours());case"hh":return padLeft(h12(r.getHours()));case"m":return r.getMinutes();case"mm":return padLeft(r.getMinutes());case"s":return r.getSeconds();case"ss":return padLeft(r.getSeconds());case"SSS":return padLeft(r.getMilliseconds(),3);case"Z":return timezone(TIMEZONE_OFFSET);case"ZZ":return timezone(TIMEZONE_OFFSET,!0);default:return e}}):r.toISOString()}function compare(e,r,t,n){if(r=parse(r),"ms"===(t=normalizeUnit(t,"ms")))switch(n){case"before":return+e<+r;case"after":return+r<+e;default:return+e==+r}else{var a=+r;switch(n){case"before":return+endOf(clone(e),t)<a;case"after":return+startOf(clone(e),t)>a;default:return+startOf(clone(e),t)<=a&&a<=+endOf(clone(e),t)}}}function isAfter(e,r,t){return compare(e,r,t,"after")}function isBefore(e,r,t){return compare(e,r,t,"before")}function isBetween(e,r,t,n,a){return("("===(a=a||"()").charAt(0)?isAfter(e,r,n):!isBefore(e,r,n))&&(")"===a.charAt(1)?isBefore(e,t,n):!isAfter(e,t,n))}function isSame(e,r,t){return compare(e,r,t)}function isSameOrAfter(e,r,t){return!isBefore(e,r,t)}function isSameOrBefore(e,r,t){return!isAfter(e,r,t)}function isValid(e){return"Invalid Date"!==e.toString()}function subtract(e,r,t){return add(e,-r,t)}var date={add:add,clone:clone,dayOfYear:dayOfYear,daysInMonth:daysInMonth,diff:diff,endOf:endOf,format:format,isAfter:isAfter,isBefore:isBefore,isBetween:isBetween,isLeapYear:isLeapYear,isSame:isSame,isSameOrAfter:isSameOrAfter,isSameOrBefore:isSameOrBefore,isValid:isValid,parse:parse,startOf:startOf,subtract:subtract};function forIn$1(e,r,t){return e&&forIn(e,r,t)}function forNumber$1(e,r,t){return e&&forNumber(e,r,t)}function isAsyncFunction(e){return"[object AsyncFunction]"===toString$1(e)}function isBoolean(e){return"boolean"==typeof e}function isPromiseLike(e){return!!e&&isFunction(e.then)}var RAW_DATA_TYPES={};function type(e){return isNil(e)?e+"":isObject(e)||isFunction(e)?RAW_DATA_TYPES[toString$1(e)]||"object":typeof e}"Boolean,Number,String,Function,Array,Date,RegExp,Object,Error,Symbol".split(",").forEach(function(e){RAW_DATA_TYPES["[object "+e+"]"]=e.toLowerCase()});var index={array:array,camelCase:camelCase,date:date,each:each,forEach:forEach$1,forIn:forIn$1,forNumber:forNumber$1,isArrayLike:isArrayLike,isAsyncFunction:isAsyncFunction,isBoolean:isBoolean,isDate:isDate,isFunction:isFunction,isNil:isNil,isNumber:isNumber,isObject:isObject,isPromiseLike:isPromiseLike,isString:isString,isUndefined:isUndefined,type:type};module.exports=index; | ||
"use strict";function append(e,r){e&&(e[e.length]=r)}function iteratorCallback(e,r){return r?e.bind(r):e}function forEach(e,r,t){for(var n=iteratorCallback(r,t),a=0,i=e.length,s=void 0;!1!==s&&a<i;a++)s=n(e[a],a,e)}function forEach$1(e,r,t){return e&&forEach(e,r,t)}function grep(e,r,t){var n=[];if(e){var a=0,i=e.length;for(t=!!t;a<i;a++)!r(e[a],a)===t&&(n[n.length]=e[a])}return n}function inArray(e,r,t){if(r){if(r.indexOf)return r.indexOf(e,t);for(var n=r.length,a=t?t<0?Math.max(0,n+t):t:0;a<n;a++)if(a in r&&r[a]===e)return a}return-1}function includes(e,r){return-1!==inArray(r,e)}function join(e,r){for(var t=+r.length,n=e.length,a=0;a<t;a++)e[n++]=r[a];return e.length=n,e}function isNil(e){return null==e}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isArrayLike(e){return!isNil(e)&&isNumber(e.length)&&!isFunction(e)}function isString(e){return"string"==typeof e}var ref=Array.prototype,push=ref.push;function makeArray(e,r){var t=r||[];return e&&(isArrayLike(Object(e))?join(t,isString(e)?[e]:e):t.push?t.push(e):push.call(t,e)),t}function forIn(e,r,t){var n=iteratorCallback(r,t);for(var a in e)if(!1===n(e[a],a,e))break}function forNumber(e,r,t){for(var n=iteratorCallback(r,t),a=0,i=void 0;!1!==i&&a<e;a++)i=n(a,a,a)}function each(e,r,t){e&&(isArrayLike(e)?forEach(e,r,t):isNumber(e)?forNumber(e,r,t):forIn(e,r,t))}function append$1(e,r){e[e.length]=r}function map(e,r,t){var n=[],a=iteratorCallback(r,t);return each(e,function(e){isNil(e=a(e))||append$1(n,e)}),n}function removeAt(e,r){return e.splice(r,1),r}function remove(e,r){var t=inArray(r,e);return 0<=t?(removeAt(e,t),r):null}function toArray(e){return e&&[].concat(e)}var array={append:append,forEach:forEach$1,grep:grep,inArray:inArray,includes:includes,join:join,makeArray:makeArray,map:map,remove:remove,removeAt:removeAt,toArray:toArray},DASH_ALPHA_REGEX=/-([a-z])/g;function camelCase(e){return e.replace(DASH_ALPHA_REGEX,function(e,r){return r.toUpperCase()})}function isObject(e){return!isNil(e)&&"object"==typeof e}function parseArray(e,r){return r?new Date(Date.UTC(e[0],e[1]||0,isNil(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)):new Date(e[0],e[1]||0,isNil(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)}var UNITS={},setter=function(e,r){UNITS[e]=UNITS[e.slice(0,-1)]=UNITS[r]=r};function normalizeUnit(e,r){return UNITS[e]||r}setter("years","Y"),setter("months","M"),setter("dates","D"),setter("days","d"),setter("hours","h"),setter("minutes","m"),setter("seconds","s"),setter("milliseconds","ms");var indexOfUnits={Y:0,M:1,d:2,h:3,m:4,s:5,ms:6};function getIndex(e){return e=normalizeUnit(e,"ms"),indexOfUnits[e]}function add(e,r,t){var n=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];if(isObject(r))forIn(r,function(e,r){var t=getIndex(r);n[t]+=e});else{var a=getIndex(t);n[a]+=r}return e.setTime(+parseArray(n)),e}function clone(e){return new Date(+e)}function isLeapYear(e){var r=e.getFullYear();return r%4==0&&r%100!=0||r%400==0}var arr=[31,28,31,30,31,30,31,31,30,31,30,31],arr2=[31,29,31,30,31,30,31,31,30,31,30,31];function daysInYear(e){return isLeapYear(e)?arr2:arr}function isUndefined(e){return void 0===e}function dayOfYear(e,r){var t=daysInYear(e),n=e.getMonth(),a=0;return forNumber(n,function(e){a+=t[e]}),a+=e.getDate(),isUndefined(r)?a:(e.setTime(+e+864e5*(r-a)),e)}function daysInMonth(e){return daysInYear(e)[e.getMonth()]}var ASP_NET_JSON_REGEX=/^\/?Date\((-?\d+)/i,BASIC_ISO_REGEX=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DATES_REGEX=[["YYYY-MM-DD",/(\d{4})-(\d\d)-(\d\d)/],["YYYY-MM",/(\d{4})-(\d\d)/,!1],["YYYYMMDD",/(\d{4})(\d\d)(\d\d)/],["YYYYMM",/(\d{4})(\d\d)/,!1],["YYYY",/\d{4}/,!1]],EXTENDED_ISO_REGEX=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,FORMAT_REGEX=/\[.*?\]|Y{2,4}|y{2,4}|M{1,2}|D{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|SSS|Z{1,2}/g,TIMES_REGEX=[["HH:mm:ss.SSSS",/(\d\d):(\d\d):(\d\d)\.(\d+)/],["HH:mm:ss,SSSS",/(\d\d):(\d\d):(\d\d),(\d+)/],["HH:mm:ss",/(\d\d):(\d\d):(\d\d)/],["HH:mm",/(\d\d):(\d\d)/],["HHmmss.SSSS",/(\d\d)(\d\d)(\d\d)\.(\d+)/],["HHmmss,SSSS",/(\d\d)(\d\d)(\d\d),(\d+)/],["HHmmss",/(\d\d)(\d\d)(\d\d)/],["HHmm",/(\d\d)(\d\d)/],["HH",/\d\d/]],TZ_REGEX=/(Z)|[+-](\d\d)(?::?(\d\d))?/,TIMEZONE_OFFSET=(new Date).getTimezoneOffset(),toString=Object.prototype.toString;function toString$1(e){return toString.call(e)}function isDate(e){return"[object Date]"===toString$1(e)}function extractFrom(e){var t,n,a=[],i=EXTENDED_ISO_REGEX.exec(e)||BASIC_ISO_REGEX.exec(e);if(i){if(forEach(DATES_REGEX,function(e,r){if(n=e[1].exec(i[1]))return forNumber(3,function(e){a[e]=parseInt(n[e+1]||1,10)}),a[1]-=1,t=!1!==e[2],!1}),e.indexOf(a[0]))return e;if(n=null,i[3]&&forEach(TIMES_REGEX,function(e){if(n=e[1].exec(i[3]))return a=a.concat(n.slice(1).map(function(e){return parseInt(e,10)})),!1}),!t&&n)return a;if(n=null,i[4]){n=TZ_REGEX.exec(i[4]);var r=TIMEZONE_OFFSET;n[1]||(a[3]-=n[2],a[4]-=n[3]||0),a[4]-=r}return a}return 4===e.length&&DATES_REGEX[4][1].test(e)?((a=[parseInt(e,10),0,1]).isUTC=!0,a):e}function parseFromFormat(t,n){var e,r=n.length,a=[],i=!1;if(forNumber(r,function(e){var r=t.charAt(e);switch(n.charAt(e)){case"Y":case"y":a[0]=(a[0]||"")+r;break;case"M":a[1]=(a[1]||"")+r;break;case"D":case"d":a[2]=(a[2]||"")+r;break;case"H":case"h":a[3]=(a[3]||"")+r;break;case"m":a[4]=(a[4]||"")+r;break;case"s":a[5]=(a[5]||"")+r;break;case"S":a[6]=(a[6]||"")+r;break;case"Z":i=!0}}),a=a.map(function(e){return parseInt(e,10)}),i)if(e=TZ_REGEX.exec(t.slice(-1<n.indexOf("ZZ")?-5:-6))){var s=TIMEZONE_OFFSET;if(!e[1]){var o="+"===e[0].charAt(0)?1:-1;a[3]-=e[2]*o,a[4]-=(e[3]||0)*o}a[4]-=s}else a.isUTC=i&-1<t.indexOf("Z");return isNil(a[1])||(a[1]-=1),a}function parseStringOrArray(e,r,t){if(!isString(e))return parseArray(e,!0===r);if(isString(r))return parseArray(parseFromFormat(e,r),t);var n=extractFrom(e);if(n!==e)return parseArray(n,n.isUTC||!0===r);var a=ASP_NET_JSON_REGEX.exec(e);return new Date(null!==a?+a[1]:e)}function parse(e,r,t){return e=isNil(e)?new Date:e.length?parseStringOrArray(e,r,t):isNumber(e)?new Date(e):isDate(e)?new Date(+e):e._i&&e.isValid()?new Date(+e):new Date}function monthDiff(e,r){var t=12*(r.getFullYear()-e.getFullYear())+(r.getMonth()-e.getMonth()),n=add(clone(e),t,"months");return-(t+(r<n?(r-n)/(n-add(clone(e),t-1,"months")):(r-n)/(add(clone(e),t+1,"months")-n)))||0}function absFloor(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function diff(e,r,t,n){var a;switch(r=parse(r),t=normalizeUnit(t)){case"Y":a=monthDiff(e,r)/12;break;case"M":a=monthDiff(e,r);break;case"s":a=(e-r)/1e3;break;case"m":a=(e-r)/6e4;break;case"h":a=(e-r)/36e5;break;case"d":a=(e-r)/864e5;break;default:a=e-r}return n?a:absFloor(a)}function startOf(e,r){switch(r=normalizeUnit(r)){case"Y":e.setMonth(0);case"M":e.setDate(1);case"D":case"d":e.setHours(0);case"h":e.setMinutes(0);case"m":e.setSeconds(0);case"s":e.setMilliseconds(0)}return e}function endOf(e,r){return"ms"===(r=normalizeUnit(r,"ms"))||(startOf(e,r),add(e,1,r),add(e,-1,"ms")),e}function padLeft(e,r){return void 0===r&&(r=2),("000000"+e).slice(-r)}function timezone(e,r){var t;return e<0?(t="+",e=Math.abs(e)):t="-",""+t+padLeft(Math.floor(e/60))+(r?"":":")+padLeft(Math.floor(e%60))}function h12(e){return 12<(e=e||24)?e-12:e}function format(r,e){return e&&"UTC"!==e?e.replace(FORMAT_REGEX,function(e){switch(e){case"YY":return String(r.getFullYear()).slice(-2);case"YYYY":case"yyyy":return r.getFullYear();case"M":return r.getMonth()+1;case"MM":return padLeft(r.getMonth()+1);case"D":case"d":return r.getDate();case"DD":case"dd":return padLeft(r.getDate());case"H":return r.getHours();case"HH":return padLeft(r.getHours());case"h":return h12(r.getHours());case"hh":return padLeft(h12(r.getHours()));case"m":return r.getMinutes();case"mm":return padLeft(r.getMinutes());case"s":return r.getSeconds();case"ss":return padLeft(r.getSeconds());case"SSS":return padLeft(r.getMilliseconds(),3);case"Z":return timezone(TIMEZONE_OFFSET);case"ZZ":return timezone(TIMEZONE_OFFSET,!0);default:return e}}):r.toISOString()}function compare(e,r,t,n){if(r=parse(r),"ms"===(t=normalizeUnit(t,"ms")))switch(n){case"before":return+e<+r;case"after":return+r<+e;default:return+e==+r}else{var a=+r;switch(n){case"before":return+endOf(clone(e),t)<a;case"after":return+startOf(clone(e),t)>a;default:return+startOf(clone(e),t)<=a&&a<=+endOf(clone(e),t)}}}function isAfter(e,r,t){return compare(e,r,t,"after")}function isBefore(e,r,t){return compare(e,r,t,"before")}function isBetween(e,r,t,n,a){return("("===(a=a||"()").charAt(0)?isAfter(e,r,n):!isBefore(e,r,n))&&(")"===a.charAt(1)?isBefore(e,t,n):!isAfter(e,t,n))}function isSame(e,r,t){return compare(e,r,t)}function isSameOrAfter(e,r,t){return!isBefore(e,r,t)}function isSameOrBefore(e,r,t){return!isAfter(e,r,t)}function isValid(e){return"Invalid Date"!==e.toString()}function subtract(e,r,t){return add(e,-r,t)}var date={add:add,clone:clone,dayOfYear:dayOfYear,daysInMonth:daysInMonth,diff:diff,endOf:endOf,format:format,isAfter:isAfter,isBefore:isBefore,isBetween:isBetween,isLeapYear:isLeapYear,isSame:isSame,isSameOrAfter:isSameOrAfter,isSameOrBefore:isSameOrBefore,isValid:isValid,parse:parse,startOf:startOf,subtract:subtract};function forIn$1(e,r,t){return e&&forIn(e,r,t)}function forNumber$1(e,r,t){return e&&forNumber(e,r,t)}function isAsyncFunction(e){return"[object AsyncFunction]"===toString$1(e)}function isBoolean(e){return"boolean"==typeof e}function isPromiseLike(e){return!!e&&isFunction(e.then)}function sleep(r){return new Promise(function(e){setTimeout(e,r)})}var RAW_DATA_TYPES={};function type(e){return isNil(e)?e+"":isObject(e)||isFunction(e)?RAW_DATA_TYPES[toString$1(e)]||"object":typeof e}"Boolean,Number,String,Function,Array,Date,RegExp,Object,Error,Symbol".split(",").forEach(function(e){RAW_DATA_TYPES["[object "+e+"]"]=e.toLowerCase()});var index={array:array,camelCase:camelCase,date:date,each:each,forEach:forEach$1,forIn:forIn$1,forNumber:forNumber$1,isArrayLike:isArrayLike,isAsyncFunction:isAsyncFunction,isBoolean:isBoolean,isDate:isDate,isFunction:isFunction,isNil:isNil,isNumber:isNumber,isObject:isObject,isPromiseLike:isPromiseLike,isString:isString,isUndefined:isUndefined,sleep:sleep,type:type};module.exports=index; |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).celia=n()}(this,function(){"use strict";function c(e,n){return n?e.bind(n):e}function i(e,n,t){for(var r=c(n,t),u=0,a=e.length,i=void 0;!1!==i&&u<a;u++)i=r(e[u],u,e)}function e(e,n,t){return e&&i(e,n,t)}function r(e,n,t){if(n){if(n.indexOf)return n.indexOf(e,t);for(var r=n.length,u=t?t<0?Math.max(0,r+t):t:0;u<r;u++)if(u in n&&n[u]===e)return u}return-1}function u(e,n){for(var t=+n.length,r=e.length,u=0;u<t;u++)e[r++]=n[u];return e.length=r,e}function s(e){return null==e}function t(e){return"function"==typeof e}var a=Array.isArray;function o(e){if(s(e)||t(e))return!1;var n=e.length;return a(e)||0===n||0<+n&&n-1 in e}function d(e){return"string"==typeof e}var f=Array.prototype.push;function l(e){return"number"==typeof e}function m(e,n,t){var r=c(n,t);for(var u in e)if(!1===r(e[u],u,e))break}function h(e,n,t){for(var r=c(n,t),u=0,a=void 0;!1!==a&&u<e;u++)a=r(u,u,u)}function g(e,n,t){e&&(o(e)?i(e,n,t):l(e)?h(e,n,t):m(e,n,t))}function v(e,n){return e.splice(n,1),n}var n={append:function(e,n){e&&(e[e.length]=n)},forEach:e,grep:function(e,n,t){var r=[];if(e){var u=0,a=e.length;for(t=!!t;u<a;u++)!n(e[u],u)===t&&(r[r.length]=e[u])}return r},inArray:r,includes:function(e,n){return-1!==r(n,e)},join:u,makeArray:function(e,n){var t=n||[];return e&&(o(Object(e))?u(t,d(e)?[e]:e):t.push?t.push(e):f.call(t,e)),t},map:function(e,n,t){var r=[],u=c(n,t);return g(e,function(e){var n,t;s(e=u(e))||(t=e,(n=r)[n.length]=t)}),r},remove:function(e,n){var t=r(n,e);return 0<=t?(v(e,t),n):null},removeAt:v,toArray:function(e){return e&&[].concat(e)}},Y=/-([a-z])/g;function M(e){return!s(e)&&"object"==typeof e}function p(e,n){return n?new Date(Date.UTC(e[0],e[1]||0,s(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)):new Date(e[0],e[1]||0,s(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)}var S={},b=function(e,n){S[e]=S[e.slice(0,-1)]=S[n]=n};function y(e,n){return S[e]||n}b("years","Y"),b("months","M"),b("dates","D"),b("days","d"),b("hours","h"),b("minutes","m"),b("seconds","s"),b("milliseconds","ms");var D={Y:0,M:1,d:2,h:3,m:4,s:5,ms:6};function H(e){return e=y(e,"ms"),D[e]}function w(e,n,t){var r=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];if(M(n))m(n,function(e,n){var t=H(n);r[t]+=e});else{var u=H(t);r[u]+=n}return e.setTime(+p(r)),e}function A(e){return new Date(+e)}function k(e){var n=e.getFullYear();return n%4==0&&n%100!=0||n%400==0}var x=[31,28,31,30,31,30,31,31,30,31,30,31],O=[31,29,31,30,31,30,31,31,30,31,30,31];function j(e){return k(e)?O:x}function Z(e){return void 0===e}var F=/^\/?Date\((-?\d+)/i,T=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,I=[["YYYY-MM-DD",/(\d{4})-(\d\d)-(\d\d)/],["YYYY-MM",/(\d{4})-(\d\d)/,!1],["YYYYMMDD",/(\d{4})(\d\d)(\d\d)/],["YYYYMM",/(\d{4})(\d\d)/,!1],["YYYY",/\d{4}/,!1]],C=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,U=/\[.*?\]|Y{2,4}|y{2,4}|M{1,2}|D{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|SSS|Z{1,2}/g,B=[["HH:mm:ss.SSSS",/(\d\d):(\d\d):(\d\d)\.(\d+)/],["HH:mm:ss,SSSS",/(\d\d):(\d\d):(\d\d),(\d+)/],["HH:mm:ss",/(\d\d):(\d\d):(\d\d)/],["HH:mm",/(\d\d):(\d\d)/],["HHmmss.SSSS",/(\d\d)(\d\d)(\d\d)\.(\d+)/],["HHmmss,SSSS",/(\d\d)(\d\d)(\d\d),(\d+)/],["HHmmss",/(\d\d)(\d\d)(\d\d)/],["HHmm",/(\d\d)(\d\d)/],["HH",/\d\d/]],E=/(Z)|[+-](\d\d)(?::?(\d\d))?/,L=(new Date).getTimezoneOffset(),N=Object.prototype.toString;function W(e){return N.call(e)}function z(e){return"[object Date]"===W(e)}function V(e,n,t){if(!d(e))return p(e,!0===n);if(d(n))return p(function(t,r){var e,n=r.length,u=[],a=!1;if(h(n,function(e){var n=t.charAt(e);switch(r.charAt(e)){case"Y":case"y":u[0]=(u[0]||"")+n;break;case"M":u[1]=(u[1]||"")+n;break;case"D":case"d":u[2]=(u[2]||"")+n;break;case"H":case"h":u[3]=(u[3]||"")+n;break;case"m":u[4]=(u[4]||"")+n;break;case"s":u[5]=(u[5]||"")+n;break;case"S":u[6]=(u[6]||"")+n;break;case"Z":a=!0}}),u=u.map(function(e){return parseInt(e,10)}),a)if(e=E.exec(t.slice(-1<r.indexOf("ZZ")?-5:-6))){var i=L;if(!e[1]){var c="+"===e[0].charAt(0)?1:-1;u[3]-=e[2]*c,u[4]-=(e[3]||0)*c}u[4]-=i}else u.isUTC=a&-1<t.indexOf("Z");return s(u[1])||(u[1]-=1),u}(e,n),t);var r=function(e){var t,r,u=[],a=C.exec(e)||T.exec(e);if(a){if(i(I,function(e,n){if(r=e[1].exec(a[1]))return h(3,function(e){u[e]=parseInt(r[e+1]||1,10)}),u[1]-=1,t=!1!==e[2],!1}),e.indexOf(u[0]))return e;if(r=null,a[3]&&i(B,function(e){if(r=e[1].exec(a[3]))return u=u.concat(r.slice(1).map(function(e){return parseInt(e,10)})),!1}),!t&&r)return u;if(r=null,a[4]){r=E.exec(a[4]);var n=L;r[1]||(u[3]-=r[2],u[4]-=r[3]||0),u[4]-=n}return u}return 4===e.length&&I[4][1].test(e)?((u=[parseInt(e,10),0,1]).isUTC=!0,u):e}(e);if(r!==e)return p(r,r.isUTC||!0===n);var u=F.exec(e);return new Date(null!==u?+u[1]:e)}function $(e,n,t){return e=s(e)?new Date:e.length?V(e,n,t):l(e)?new Date(e):z(e)?new Date(+e):e._i&&e.isValid()?new Date(+e):new Date}function P(e,n){var t=12*(n.getFullYear()-e.getFullYear())+(n.getMonth()-e.getMonth()),r=w(A(e),t,"months");return-(t+(n<r?(n-r)/(r-w(A(e),t-1,"months")):(n-r)/(w(A(e),t+1,"months")-r)))||0}function R(e,n){switch(n=y(n)){case"Y":e.setMonth(0);case"M":e.setDate(1);case"D":case"d":e.setHours(0);case"h":e.setMinutes(0);case"m":e.setSeconds(0);case"s":e.setMilliseconds(0)}return e}function _(e,n){return"ms"===(n=y(n,"ms"))||(R(e,n),w(e,1,n),w(e,-1,"ms")),e}function q(e,n){return void 0===n&&(n=2),("000000"+e).slice(-n)}function G(e,n){var t;return e<0?(t="+",e=Math.abs(e)):t="-",""+t+q(Math.floor(e/60))+(n?"":":")+q(Math.floor(e%60))}function J(e){return 12<(e=e||24)?e-12:e}function K(e,n,t,r){if(n=$(n),"ms"===(t=y(t,"ms")))switch(r){case"before":return+e<+n;case"after":return+n<+e;default:return+e==+n}else{var u=+n;switch(r){case"before":return+_(A(e),t)<u;case"after":return+R(A(e),t)>u;default:return+R(A(e),t)<=u&&u<=+_(A(e),t)}}}function Q(e,n,t){return K(e,n,t,"after")}function X(e,n,t){return K(e,n,t,"before")}var ee={add:w,clone:A,dayOfYear:function(e,n){var t=j(e),r=e.getMonth(),u=0;return h(r,function(e){u+=t[e]}),u+=e.getDate(),Z(n)?u:(e.setTime(+e+864e5*(n-u)),e)},daysInMonth:function(e){return j(e)[e.getMonth()]},diff:function(e,n,t,r){var u,a;switch(n=$(n),t=y(t)){case"Y":u=P(e,n)/12;break;case"M":u=P(e,n);break;case"s":u=(e-n)/1e3;break;case"m":u=(e-n)/6e4;break;case"h":u=(e-n)/36e5;break;case"d":u=(e-n)/864e5;break;default:u=e-n}return r?u:(a=u)<0?Math.ceil(a)||0:Math.floor(a)},endOf:_,format:function(n,e){return e?e.replace(U,function(e){switch(e){case"YY":return String(n.getFullYear()).slice(-2);case"YYYY":case"yyyy":return n.getFullYear();case"M":return n.getMonth()+1;case"MM":return q(n.getMonth()+1);case"D":case"d":return n.getDate();case"DD":case"dd":return q(n.getDate());case"H":return n.getHours();case"HH":return q(n.getHours());case"h":return J(n.getHours());case"hh":return q(J(n.getHours()));case"m":return n.getMinutes();case"mm":return q(n.getMinutes());case"s":return n.getSeconds();case"ss":return q(n.getSeconds());case"SSS":return q(n.getMilliseconds(),3);case"Z":return G(L);case"ZZ":return G(L,!0);default:return e}}):n.toISOString()},isAfter:Q,isBefore:X,isBetween:function(e,n,t,r,u){return("("===(u=u||"()").charAt(0)?Q(e,n,r):!X(e,n,r))&&(")"===u.charAt(1)?X(e,t,r):!Q(e,t,r))},isLeapYear:k,isSame:function(e,n,t){return K(e,n,t)},isSameOrAfter:function(e,n,t){return!X(e,n,t)},isSameOrBefore:function(e,n,t){return!Q(e,n,t)},isValid:function(e){return"Invalid Date"!==e.toString()},parse:$,startOf:R,subtract:function(e,n,t){return w(e,-n,t)}};var ne={};return"Boolean,Number,String,Function,Array,Date,RegExp,Object,Error,Symbol".split(",").forEach(function(e){ne["[object "+e+"]"]=e.toLowerCase()}),{array:n,camelCase:function(e){return e.replace(Y,function(e,n){return n.toUpperCase()})},date:ee,each:g,forEach:e,forIn:function(e,n,t){return e&&m(e,n,t)},forNumber:function(e,n,t){return e&&h(e,n,t)},isArrayLike:o,isAsyncFunction:function(e){return"[object AsyncFunction]"===W(e)},isBoolean:function(e){return"boolean"==typeof e},isDate:z,isFunction:t,isNil:s,isNumber:l,isObject:M,isPromiseLike:function(e){return!!e&&t(e.then)},isString:d,isUndefined:Z,type:function(e){return s(e)?e+"":M(e)||t(e)?ne[W(e)]||"object":typeof e}}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).celia=n()}(this,function(){"use strict";function c(e,n){return n?e.bind(n):e}function i(e,n,t){for(var r=c(n,t),u=0,a=e.length,i=void 0;!1!==i&&u<a;u++)i=r(e[u],u,e)}function e(e,n,t){return e&&i(e,n,t)}function r(e,n,t){if(n){if(n.indexOf)return n.indexOf(e,t);for(var r=n.length,u=t?t<0?Math.max(0,r+t):t:0;u<r;u++)if(u in n&&n[u]===e)return u}return-1}function u(e,n){for(var t=+n.length,r=e.length,u=0;u<t;u++)e[r++]=n[u];return e.length=r,e}function s(e){return null==e}function n(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return!s(e)&&a(e.length)&&!n(e)}function d(e){return"string"==typeof e}var f=Array.prototype.push;function l(e,n,t){var r=c(n,t);for(var u in e)if(!1===r(e[u],u,e))break}function m(e,n,t){for(var r=c(n,t),u=0,a=void 0;!1!==a&&u<e;u++)a=r(u,u,u)}function h(e,n,t){e&&(o(e)?i(e,n,t):a(e)?m(e,n,t):l(e,n,t))}function g(e,n){return e.splice(n,1),n}var t={append:function(e,n){e&&(e[e.length]=n)},forEach:e,grep:function(e,n,t){var r=[];if(e){var u=0,a=e.length;for(t=!!t;u<a;u++)!n(e[u],u)===t&&(r[r.length]=e[u])}return r},inArray:r,includes:function(e,n){return-1!==r(n,e)},join:u,makeArray:function(e,n){var t=n||[];return e&&(o(Object(e))?u(t,d(e)?[e]:e):t.push?t.push(e):f.call(t,e)),t},map:function(e,n,t){var r=[],u=c(n,t);return h(e,function(e){var n,t;s(e=u(e))||(t=e,(n=r)[n.length]=t)}),r},remove:function(e,n){var t=r(n,e);return 0<=t?(g(e,t),n):null},removeAt:g,toArray:function(e){return e&&[].concat(e)}},v=/-([a-z])/g;function Y(e){return!s(e)&&"object"==typeof e}function p(e,n){return n?new Date(Date.UTC(e[0],e[1]||0,s(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)):new Date(e[0],e[1]||0,s(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)}var M={},S=function(e,n){M[e]=M[e.slice(0,-1)]=M[n]=n};function b(e,n){return M[e]||n}S("years","Y"),S("months","M"),S("dates","D"),S("days","d"),S("hours","h"),S("minutes","m"),S("seconds","s"),S("milliseconds","ms");var y={Y:0,M:1,d:2,h:3,m:4,s:5,ms:6};function D(e){return e=b(e,"ms"),y[e]}function H(e,n,t){var r=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];if(Y(n))l(n,function(e,n){var t=D(n);r[t]+=e});else{var u=D(t);r[u]+=n}return e.setTime(+p(r)),e}function w(e){return new Date(+e)}function k(e){var n=e.getFullYear();return n%4==0&&n%100!=0||n%400==0}var x=[31,28,31,30,31,30,31,31,30,31,30,31],A=[31,29,31,30,31,30,31,31,30,31,30,31];function O(e){return k(e)?A:x}function j(e){return void 0===e}var T=/^\/?Date\((-?\d+)/i,Z=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,F=[["YYYY-MM-DD",/(\d{4})-(\d\d)-(\d\d)/],["YYYY-MM",/(\d{4})-(\d\d)/,!1],["YYYYMMDD",/(\d{4})(\d\d)(\d\d)/],["YYYYMM",/(\d{4})(\d\d)/,!1],["YYYY",/\d{4}/,!1]],C=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,I=/\[.*?\]|Y{2,4}|y{2,4}|M{1,2}|D{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|SSS|Z{1,2}/g,U=[["HH:mm:ss.SSSS",/(\d\d):(\d\d):(\d\d)\.(\d+)/],["HH:mm:ss,SSSS",/(\d\d):(\d\d):(\d\d),(\d+)/],["HH:mm:ss",/(\d\d):(\d\d):(\d\d)/],["HH:mm",/(\d\d):(\d\d)/],["HHmmss.SSSS",/(\d\d)(\d\d)(\d\d)\.(\d+)/],["HHmmss,SSSS",/(\d\d)(\d\d)(\d\d),(\d+)/],["HHmmss",/(\d\d)(\d\d)(\d\d)/],["HHmm",/(\d\d)(\d\d)/],["HH",/\d\d/]],B=/(Z)|[+-](\d\d)(?::?(\d\d))?/,E=(new Date).getTimezoneOffset(),L=Object.prototype.toString;function N(e){return L.call(e)}function W(e){return"[object Date]"===N(e)}function z(e,n,t){if(!d(e))return p(e,!0===n);if(d(n))return p(function(t,r){var e,n=r.length,u=[],a=!1;if(m(n,function(e){var n=t.charAt(e);switch(r.charAt(e)){case"Y":case"y":u[0]=(u[0]||"")+n;break;case"M":u[1]=(u[1]||"")+n;break;case"D":case"d":u[2]=(u[2]||"")+n;break;case"H":case"h":u[3]=(u[3]||"")+n;break;case"m":u[4]=(u[4]||"")+n;break;case"s":u[5]=(u[5]||"")+n;break;case"S":u[6]=(u[6]||"")+n;break;case"Z":a=!0}}),u=u.map(function(e){return parseInt(e,10)}),a)if(e=B.exec(t.slice(-1<r.indexOf("ZZ")?-5:-6))){var i=E;if(!e[1]){var c="+"===e[0].charAt(0)?1:-1;u[3]-=e[2]*c,u[4]-=(e[3]||0)*c}u[4]-=i}else u.isUTC=a&-1<t.indexOf("Z");return s(u[1])||(u[1]-=1),u}(e,n),t);var r=function(e){var t,r,u=[],a=C.exec(e)||Z.exec(e);if(a){if(i(F,function(e,n){if(r=e[1].exec(a[1]))return m(3,function(e){u[e]=parseInt(r[e+1]||1,10)}),u[1]-=1,t=!1!==e[2],!1}),e.indexOf(u[0]))return e;if(r=null,a[3]&&i(U,function(e){if(r=e[1].exec(a[3]))return u=u.concat(r.slice(1).map(function(e){return parseInt(e,10)})),!1}),!t&&r)return u;if(r=null,a[4]){r=B.exec(a[4]);var n=E;r[1]||(u[3]-=r[2],u[4]-=r[3]||0),u[4]-=n}return u}return 4===e.length&&F[4][1].test(e)?((u=[parseInt(e,10),0,1]).isUTC=!0,u):e}(e);if(r!==e)return p(r,r.isUTC||!0===n);var u=T.exec(e);return new Date(null!==u?+u[1]:e)}function P(e,n,t){return e=s(e)?new Date:e.length?z(e,n,t):a(e)?new Date(e):W(e)?new Date(+e):e._i&&e.isValid()?new Date(+e):new Date}function V(e,n){var t=12*(n.getFullYear()-e.getFullYear())+(n.getMonth()-e.getMonth()),r=H(w(e),t,"months");return-(t+(n<r?(n-r)/(r-H(w(e),t-1,"months")):(n-r)/(H(w(e),t+1,"months")-r)))||0}function $(e,n){switch(n=b(n)){case"Y":e.setMonth(0);case"M":e.setDate(1);case"D":case"d":e.setHours(0);case"h":e.setMinutes(0);case"m":e.setSeconds(0);case"s":e.setMilliseconds(0)}return e}function R(e,n){return"ms"===(n=b(n,"ms"))||($(e,n),H(e,1,n),H(e,-1,"ms")),e}function _(e,n){return void 0===n&&(n=2),("000000"+e).slice(-n)}function q(e,n){var t;return e<0?(t="+",e=Math.abs(e)):t="-",""+t+_(Math.floor(e/60))+(n?"":":")+_(Math.floor(e%60))}function G(e){return 12<(e=e||24)?e-12:e}function J(e,n,t,r){if(n=P(n),"ms"===(t=b(t,"ms")))switch(r){case"before":return+e<+n;case"after":return+n<+e;default:return+e==+n}else{var u=+n;switch(r){case"before":return+R(w(e),t)<u;case"after":return+$(w(e),t)>u;default:return+$(w(e),t)<=u&&u<=+R(w(e),t)}}}function K(e,n,t){return J(e,n,t,"after")}function Q(e,n,t){return J(e,n,t,"before")}var X={add:H,clone:w,dayOfYear:function(e,n){var t=O(e),r=e.getMonth(),u=0;return m(r,function(e){u+=t[e]}),u+=e.getDate(),j(n)?u:(e.setTime(+e+864e5*(n-u)),e)},daysInMonth:function(e){return O(e)[e.getMonth()]},diff:function(e,n,t,r){var u,a;switch(n=P(n),t=b(t)){case"Y":u=V(e,n)/12;break;case"M":u=V(e,n);break;case"s":u=(e-n)/1e3;break;case"m":u=(e-n)/6e4;break;case"h":u=(e-n)/36e5;break;case"d":u=(e-n)/864e5;break;default:u=e-n}return r?u:(a=u)<0?Math.ceil(a)||0:Math.floor(a)},endOf:R,format:function(n,e){return e&&"UTC"!==e?e.replace(I,function(e){switch(e){case"YY":return String(n.getFullYear()).slice(-2);case"YYYY":case"yyyy":return n.getFullYear();case"M":return n.getMonth()+1;case"MM":return _(n.getMonth()+1);case"D":case"d":return n.getDate();case"DD":case"dd":return _(n.getDate());case"H":return n.getHours();case"HH":return _(n.getHours());case"h":return G(n.getHours());case"hh":return _(G(n.getHours()));case"m":return n.getMinutes();case"mm":return _(n.getMinutes());case"s":return n.getSeconds();case"ss":return _(n.getSeconds());case"SSS":return _(n.getMilliseconds(),3);case"Z":return q(E);case"ZZ":return q(E,!0);default:return e}}):n.toISOString()},isAfter:K,isBefore:Q,isBetween:function(e,n,t,r,u){return("("===(u=u||"()").charAt(0)?K(e,n,r):!Q(e,n,r))&&(")"===u.charAt(1)?Q(e,t,r):!K(e,t,r))},isLeapYear:k,isSame:function(e,n,t){return J(e,n,t)},isSameOrAfter:function(e,n,t){return!Q(e,n,t)},isSameOrBefore:function(e,n,t){return!K(e,n,t)},isValid:function(e){return"Invalid Date"!==e.toString()},parse:P,startOf:$,subtract:function(e,n,t){return H(e,-n,t)}};var ee={};return"Boolean,Number,String,Function,Array,Date,RegExp,Object,Error,Symbol".split(",").forEach(function(e){ee["[object "+e+"]"]=e.toLowerCase()}),{array:t,camelCase:function(e){return e.replace(v,function(e,n){return n.toUpperCase()})},date:X,each:h,forEach:e,forIn:function(e,n,t){return e&&l(e,n,t)},forNumber:function(e,n,t){return e&&m(e,n,t)},isArrayLike:o,isAsyncFunction:function(e){return"[object AsyncFunction]"===N(e)},isBoolean:function(e){return"boolean"==typeof e},isDate:W,isFunction:n,isNil:s,isNumber:a,isObject:Y,isPromiseLike:function(e){return!!e&&n(e.then)},isString:d,isUndefined:j,sleep:function(n){return new Promise(function(e){setTimeout(e,n)})},type:function(e){return s(e)?e+"":Y(e)||n(e)?ee[N(e)]||"object":typeof e}}}); |
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
@@ -508,3 +508,3 @@ * Released under the MIT License. | ||
function format (date, inputString) { | ||
if (!inputString) { | ||
if (!inputString || inputString === 'UTC') { | ||
return date.toISOString(); | ||
@@ -511,0 +511,0 @@ } |
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
@@ -512,3 +512,3 @@ * Released under the MIT License. | ||
function format (date, inputString) { | ||
if (!inputString) { | ||
if (!inputString || inputString === 'UTC') { | ||
return date.toISOString(); | ||
@@ -515,0 +515,0 @@ } |
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
* Released under the MIT License. | ||
*/ | ||
"use strict";function isNil(e){return null==e}function isObject(e){return!isNil(e)&&"object"==typeof e}function iteratorCallback(e,r){return r?e.bind(r):e}function forIn(e,r,t){var n=iteratorCallback(r,t);for(var a in e)if(!1===n(e[a],a,e))break}function parseArray(e,r){return r?new Date(Date.UTC(e[0],e[1]||0,isNil(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)):new Date(e[0],e[1]||0,isNil(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)}var UNITS={},setter=function(e,r){UNITS[e]=UNITS[e.slice(0,-1)]=UNITS[r]=r};function normalizeUnit(e,r){return UNITS[e]||r}setter("years","Y"),setter("months","M"),setter("dates","D"),setter("days","d"),setter("hours","h"),setter("minutes","m"),setter("seconds","s"),setter("milliseconds","ms");var indexOfUnits={Y:0,M:1,d:2,h:3,m:4,s:5,ms:6};function getIndex(e){return e=normalizeUnit(e,"ms"),indexOfUnits[e]}function add(e,r,t){var n=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];if(isObject(r))forIn(r,function(e,r){var t=getIndex(r);n[t]+=e});else{var a=getIndex(t);n[a]+=r}return e.setTime(+parseArray(n)),e}function clone(e){return new Date(+e)}function isLeapYear(e){var r=e.getFullYear();return r%4==0&&r%100!=0||r%400==0}var arr=[31,28,31,30,31,30,31,31,30,31,30,31],arr2=[31,29,31,30,31,30,31,31,30,31,30,31];function daysInYear(e){return isLeapYear(e)?arr2:arr}function forNumber(e,r,t){for(var n=iteratorCallback(r,t),a=0,s=void 0;!1!==s&&a<e;a++)s=n(a,a,a)}function isUndefined(e){return void 0===e}function dayOfYear(e,r){var t=daysInYear(e),n=e.getMonth(),a=0;return forNumber(n,function(e){a+=t[e]}),a+=e.getDate(),isUndefined(r)?a:(e.setTime(+e+864e5*(r-a)),e)}function daysInMonth(e){return daysInYear(e)[e.getMonth()]}var ASP_NET_JSON_REGEX=/^\/?Date\((-?\d+)/i,BASIC_ISO_REGEX=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DATES_REGEX=[["YYYY-MM-DD",/(\d{4})-(\d\d)-(\d\d)/],["YYYY-MM",/(\d{4})-(\d\d)/,!1],["YYYYMMDD",/(\d{4})(\d\d)(\d\d)/],["YYYYMM",/(\d{4})(\d\d)/,!1],["YYYY",/\d{4}/,!1]],EXTENDED_ISO_REGEX=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,FORMAT_REGEX=/\[.*?\]|Y{2,4}|y{2,4}|M{1,2}|D{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|SSS|Z{1,2}/g,TIMES_REGEX=[["HH:mm:ss.SSSS",/(\d\d):(\d\d):(\d\d)\.(\d+)/],["HH:mm:ss,SSSS",/(\d\d):(\d\d):(\d\d),(\d+)/],["HH:mm:ss",/(\d\d):(\d\d):(\d\d)/],["HH:mm",/(\d\d):(\d\d)/],["HHmmss.SSSS",/(\d\d)(\d\d)(\d\d)\.(\d+)/],["HHmmss,SSSS",/(\d\d)(\d\d)(\d\d),(\d+)/],["HHmmss",/(\d\d)(\d\d)(\d\d)/],["HHmm",/(\d\d)(\d\d)/],["HH",/\d\d/]],TZ_REGEX=/(Z)|[+-](\d\d)(?::?(\d\d))?/,TIMEZONE_OFFSET=(new Date).getTimezoneOffset();function isString(e){return"string"==typeof e}function forEach(e,r,t){for(var n=iteratorCallback(r,t),a=0,s=e.length,d=void 0;!1!==d&&a<s;a++)d=n(e[a],a,e)}function isNumber(e){return"number"==typeof e}var toString=Object.prototype.toString;function toString$1(e){return toString.call(e)}function isDate(e){return"[object Date]"===toString$1(e)}function extractFrom(e){var t,n,a=[],s=EXTENDED_ISO_REGEX.exec(e)||BASIC_ISO_REGEX.exec(e);if(s){if(forEach(DATES_REGEX,function(e,r){if(n=e[1].exec(s[1]))return forNumber(3,function(e){a[e]=parseInt(n[e+1]||1,10)}),a[1]-=1,t=!1!==e[2],!1}),e.indexOf(a[0]))return e;if(n=null,s[3]&&forEach(TIMES_REGEX,function(e){if(n=e[1].exec(s[3]))return a=a.concat(n.slice(1).map(function(e){return parseInt(e,10)})),!1}),!t&&n)return a;if(n=null,s[4]){n=TZ_REGEX.exec(s[4]);var r=TIMEZONE_OFFSET;n[1]||(a[3]-=n[2],a[4]-=n[3]||0),a[4]-=r}return a}return 4===e.length&&DATES_REGEX[4][1].test(e)?((a=[parseInt(e,10),0,1]).isUTC=!0,a):e}function parseFromFormat(t,n){var e,r=n.length,a=[],s=!1;if(forNumber(r,function(e){var r=t.charAt(e);switch(n.charAt(e)){case"Y":case"y":a[0]=(a[0]||"")+r;break;case"M":a[1]=(a[1]||"")+r;break;case"D":case"d":a[2]=(a[2]||"")+r;break;case"H":case"h":a[3]=(a[3]||"")+r;break;case"m":a[4]=(a[4]||"")+r;break;case"s":a[5]=(a[5]||"")+r;break;case"S":a[6]=(a[6]||"")+r;break;case"Z":s=!0}}),a=a.map(function(e){return parseInt(e,10)}),s)if(e=TZ_REGEX.exec(t.slice(-1<n.indexOf("ZZ")?-5:-6))){var d=TIMEZONE_OFFSET;if(!e[1]){var i="+"===e[0].charAt(0)?1:-1;a[3]-=e[2]*i,a[4]-=(e[3]||0)*i}a[4]-=d}else a.isUTC=s&-1<t.indexOf("Z");return isNil(a[1])||(a[1]-=1),a}function parseStringOrArray(e,r,t){if(!isString(e))return parseArray(e,!0===r);if(isString(r))return parseArray(parseFromFormat(e,r),t);var n=extractFrom(e);if(n!==e)return parseArray(n,n.isUTC||!0===r);var a=ASP_NET_JSON_REGEX.exec(e);return new Date(null!==a?+a[1]:e)}function parse(e,r,t){return e=isNil(e)?new Date:e.length?parseStringOrArray(e,r,t):isNumber(e)?new Date(e):isDate(e)?new Date(+e):e._i&&e.isValid()?new Date(+e):new Date}function monthDiff(e,r){var t=12*(r.getFullYear()-e.getFullYear())+(r.getMonth()-e.getMonth()),n=add(clone(e),t,"months");return-(t+(r<n?(r-n)/(n-add(clone(e),t-1,"months")):(r-n)/(add(clone(e),t+1,"months")-n)))||0}function absFloor(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function diff(e,r,t,n){var a;switch(r=parse(r),t=normalizeUnit(t)){case"Y":a=monthDiff(e,r)/12;break;case"M":a=monthDiff(e,r);break;case"s":a=(e-r)/1e3;break;case"m":a=(e-r)/6e4;break;case"h":a=(e-r)/36e5;break;case"d":a=(e-r)/864e5;break;default:a=e-r}return n?a:absFloor(a)}function startOf(e,r){switch(r=normalizeUnit(r)){case"Y":e.setMonth(0);case"M":e.setDate(1);case"D":case"d":e.setHours(0);case"h":e.setMinutes(0);case"m":e.setSeconds(0);case"s":e.setMilliseconds(0)}return e}function endOf(e,r){return"ms"===(r=normalizeUnit(r,"ms"))||(startOf(e,r),add(e,1,r),add(e,-1,"ms")),e}function padLeft(e,r){return void 0===r&&(r=2),("000000"+e).slice(-r)}function timezone(e,r){var t;return e<0?(t="+",e=Math.abs(e)):t="-",""+t+padLeft(Math.floor(e/60))+(r?"":":")+padLeft(Math.floor(e%60))}function h12(e){return 12<(e=e||24)?e-12:e}function format(r,e){return e?e.replace(FORMAT_REGEX,function(e){switch(e){case"YY":return String(r.getFullYear()).slice(-2);case"YYYY":case"yyyy":return r.getFullYear();case"M":return r.getMonth()+1;case"MM":return padLeft(r.getMonth()+1);case"D":case"d":return r.getDate();case"DD":case"dd":return padLeft(r.getDate());case"H":return r.getHours();case"HH":return padLeft(r.getHours());case"h":return h12(r.getHours());case"hh":return padLeft(h12(r.getHours()));case"m":return r.getMinutes();case"mm":return padLeft(r.getMinutes());case"s":return r.getSeconds();case"ss":return padLeft(r.getSeconds());case"SSS":return padLeft(r.getMilliseconds(),3);case"Z":return timezone(TIMEZONE_OFFSET);case"ZZ":return timezone(TIMEZONE_OFFSET,!0);default:return e}}):r.toISOString()}function compare(e,r,t,n){if(r=parse(r),"ms"===(t=normalizeUnit(t,"ms")))switch(n){case"before":return+e<+r;case"after":return+r<+e;default:return+e==+r}else{var a=+r;switch(n){case"before":return+endOf(clone(e),t)<a;case"after":return+startOf(clone(e),t)>a;default:return+startOf(clone(e),t)<=a&&a<=+endOf(clone(e),t)}}}function isAfter(e,r,t){return compare(e,r,t,"after")}function isBefore(e,r,t){return compare(e,r,t,"before")}function isBetween(e,r,t,n,a){return("("===(a=a||"()").charAt(0)?isAfter(e,r,n):!isBefore(e,r,n))&&(")"===a.charAt(1)?isBefore(e,t,n):!isAfter(e,t,n))}function isSame(e,r,t){return compare(e,r,t)}function isSameOrAfter(e,r,t){return!isBefore(e,r,t)}function isSameOrBefore(e,r,t){return!isAfter(e,r,t)}function isValid(e){return"Invalid Date"!==e.toString()}function subtract(e,r,t){return add(e,-r,t)}var date={add:add,clone:clone,dayOfYear:dayOfYear,daysInMonth:daysInMonth,diff:diff,endOf:endOf,format:format,isAfter:isAfter,isBefore:isBefore,isBetween:isBetween,isLeapYear:isLeapYear,isSame:isSame,isSameOrAfter:isSameOrAfter,isSameOrBefore:isSameOrBefore,isValid:isValid,parse:parse,startOf:startOf,subtract:subtract};module.exports=date; | ||
"use strict";function isNil(e){return null==e}function isObject(e){return!isNil(e)&&"object"==typeof e}function iteratorCallback(e,r){return r?e.bind(r):e}function forIn(e,r,t){var n=iteratorCallback(r,t);for(var a in e)if(!1===n(e[a],a,e))break}function parseArray(e,r){return r?new Date(Date.UTC(e[0],e[1]||0,isNil(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)):new Date(e[0],e[1]||0,isNil(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)}var UNITS={},setter=function(e,r){UNITS[e]=UNITS[e.slice(0,-1)]=UNITS[r]=r};function normalizeUnit(e,r){return UNITS[e]||r}setter("years","Y"),setter("months","M"),setter("dates","D"),setter("days","d"),setter("hours","h"),setter("minutes","m"),setter("seconds","s"),setter("milliseconds","ms");var indexOfUnits={Y:0,M:1,d:2,h:3,m:4,s:5,ms:6};function getIndex(e){return e=normalizeUnit(e,"ms"),indexOfUnits[e]}function add(e,r,t){var n=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];if(isObject(r))forIn(r,function(e,r){var t=getIndex(r);n[t]+=e});else{var a=getIndex(t);n[a]+=r}return e.setTime(+parseArray(n)),e}function clone(e){return new Date(+e)}function isLeapYear(e){var r=e.getFullYear();return r%4==0&&r%100!=0||r%400==0}var arr=[31,28,31,30,31,30,31,31,30,31,30,31],arr2=[31,29,31,30,31,30,31,31,30,31,30,31];function daysInYear(e){return isLeapYear(e)?arr2:arr}function forNumber(e,r,t){for(var n=iteratorCallback(r,t),a=0,s=void 0;!1!==s&&a<e;a++)s=n(a,a,a)}function isUndefined(e){return void 0===e}function dayOfYear(e,r){var t=daysInYear(e),n=e.getMonth(),a=0;return forNumber(n,function(e){a+=t[e]}),a+=e.getDate(),isUndefined(r)?a:(e.setTime(+e+864e5*(r-a)),e)}function daysInMonth(e){return daysInYear(e)[e.getMonth()]}var ASP_NET_JSON_REGEX=/^\/?Date\((-?\d+)/i,BASIC_ISO_REGEX=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DATES_REGEX=[["YYYY-MM-DD",/(\d{4})-(\d\d)-(\d\d)/],["YYYY-MM",/(\d{4})-(\d\d)/,!1],["YYYYMMDD",/(\d{4})(\d\d)(\d\d)/],["YYYYMM",/(\d{4})(\d\d)/,!1],["YYYY",/\d{4}/,!1]],EXTENDED_ISO_REGEX=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,FORMAT_REGEX=/\[.*?\]|Y{2,4}|y{2,4}|M{1,2}|D{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|SSS|Z{1,2}/g,TIMES_REGEX=[["HH:mm:ss.SSSS",/(\d\d):(\d\d):(\d\d)\.(\d+)/],["HH:mm:ss,SSSS",/(\d\d):(\d\d):(\d\d),(\d+)/],["HH:mm:ss",/(\d\d):(\d\d):(\d\d)/],["HH:mm",/(\d\d):(\d\d)/],["HHmmss.SSSS",/(\d\d)(\d\d)(\d\d)\.(\d+)/],["HHmmss,SSSS",/(\d\d)(\d\d)(\d\d),(\d+)/],["HHmmss",/(\d\d)(\d\d)(\d\d)/],["HHmm",/(\d\d)(\d\d)/],["HH",/\d\d/]],TZ_REGEX=/(Z)|[+-](\d\d)(?::?(\d\d))?/,TIMEZONE_OFFSET=(new Date).getTimezoneOffset();function isString(e){return"string"==typeof e}function forEach(e,r,t){for(var n=iteratorCallback(r,t),a=0,s=e.length,d=void 0;!1!==d&&a<s;a++)d=n(e[a],a,e)}function isNumber(e){return"number"==typeof e}var toString=Object.prototype.toString;function toString$1(e){return toString.call(e)}function isDate(e){return"[object Date]"===toString$1(e)}function extractFrom(e){var t,n,a=[],s=EXTENDED_ISO_REGEX.exec(e)||BASIC_ISO_REGEX.exec(e);if(s){if(forEach(DATES_REGEX,function(e,r){if(n=e[1].exec(s[1]))return forNumber(3,function(e){a[e]=parseInt(n[e+1]||1,10)}),a[1]-=1,t=!1!==e[2],!1}),e.indexOf(a[0]))return e;if(n=null,s[3]&&forEach(TIMES_REGEX,function(e){if(n=e[1].exec(s[3]))return a=a.concat(n.slice(1).map(function(e){return parseInt(e,10)})),!1}),!t&&n)return a;if(n=null,s[4]){n=TZ_REGEX.exec(s[4]);var r=TIMEZONE_OFFSET;n[1]||(a[3]-=n[2],a[4]-=n[3]||0),a[4]-=r}return a}return 4===e.length&&DATES_REGEX[4][1].test(e)?((a=[parseInt(e,10),0,1]).isUTC=!0,a):e}function parseFromFormat(t,n){var e,r=n.length,a=[],s=!1;if(forNumber(r,function(e){var r=t.charAt(e);switch(n.charAt(e)){case"Y":case"y":a[0]=(a[0]||"")+r;break;case"M":a[1]=(a[1]||"")+r;break;case"D":case"d":a[2]=(a[2]||"")+r;break;case"H":case"h":a[3]=(a[3]||"")+r;break;case"m":a[4]=(a[4]||"")+r;break;case"s":a[5]=(a[5]||"")+r;break;case"S":a[6]=(a[6]||"")+r;break;case"Z":s=!0}}),a=a.map(function(e){return parseInt(e,10)}),s)if(e=TZ_REGEX.exec(t.slice(-1<n.indexOf("ZZ")?-5:-6))){var d=TIMEZONE_OFFSET;if(!e[1]){var i="+"===e[0].charAt(0)?1:-1;a[3]-=e[2]*i,a[4]-=(e[3]||0)*i}a[4]-=d}else a.isUTC=s&-1<t.indexOf("Z");return isNil(a[1])||(a[1]-=1),a}function parseStringOrArray(e,r,t){if(!isString(e))return parseArray(e,!0===r);if(isString(r))return parseArray(parseFromFormat(e,r),t);var n=extractFrom(e);if(n!==e)return parseArray(n,n.isUTC||!0===r);var a=ASP_NET_JSON_REGEX.exec(e);return new Date(null!==a?+a[1]:e)}function parse(e,r,t){return e=isNil(e)?new Date:e.length?parseStringOrArray(e,r,t):isNumber(e)?new Date(e):isDate(e)?new Date(+e):e._i&&e.isValid()?new Date(+e):new Date}function monthDiff(e,r){var t=12*(r.getFullYear()-e.getFullYear())+(r.getMonth()-e.getMonth()),n=add(clone(e),t,"months");return-(t+(r<n?(r-n)/(n-add(clone(e),t-1,"months")):(r-n)/(add(clone(e),t+1,"months")-n)))||0}function absFloor(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function diff(e,r,t,n){var a;switch(r=parse(r),t=normalizeUnit(t)){case"Y":a=monthDiff(e,r)/12;break;case"M":a=monthDiff(e,r);break;case"s":a=(e-r)/1e3;break;case"m":a=(e-r)/6e4;break;case"h":a=(e-r)/36e5;break;case"d":a=(e-r)/864e5;break;default:a=e-r}return n?a:absFloor(a)}function startOf(e,r){switch(r=normalizeUnit(r)){case"Y":e.setMonth(0);case"M":e.setDate(1);case"D":case"d":e.setHours(0);case"h":e.setMinutes(0);case"m":e.setSeconds(0);case"s":e.setMilliseconds(0)}return e}function endOf(e,r){return"ms"===(r=normalizeUnit(r,"ms"))||(startOf(e,r),add(e,1,r),add(e,-1,"ms")),e}function padLeft(e,r){return void 0===r&&(r=2),("000000"+e).slice(-r)}function timezone(e,r){var t;return e<0?(t="+",e=Math.abs(e)):t="-",""+t+padLeft(Math.floor(e/60))+(r?"":":")+padLeft(Math.floor(e%60))}function h12(e){return 12<(e=e||24)?e-12:e}function format(r,e){return e&&"UTC"!==e?e.replace(FORMAT_REGEX,function(e){switch(e){case"YY":return String(r.getFullYear()).slice(-2);case"YYYY":case"yyyy":return r.getFullYear();case"M":return r.getMonth()+1;case"MM":return padLeft(r.getMonth()+1);case"D":case"d":return r.getDate();case"DD":case"dd":return padLeft(r.getDate());case"H":return r.getHours();case"HH":return padLeft(r.getHours());case"h":return h12(r.getHours());case"hh":return padLeft(h12(r.getHours()));case"m":return r.getMinutes();case"mm":return padLeft(r.getMinutes());case"s":return r.getSeconds();case"ss":return padLeft(r.getSeconds());case"SSS":return padLeft(r.getMilliseconds(),3);case"Z":return timezone(TIMEZONE_OFFSET);case"ZZ":return timezone(TIMEZONE_OFFSET,!0);default:return e}}):r.toISOString()}function compare(e,r,t,n){if(r=parse(r),"ms"===(t=normalizeUnit(t,"ms")))switch(n){case"before":return+e<+r;case"after":return+r<+e;default:return+e==+r}else{var a=+r;switch(n){case"before":return+endOf(clone(e),t)<a;case"after":return+startOf(clone(e),t)>a;default:return+startOf(clone(e),t)<=a&&a<=+endOf(clone(e),t)}}}function isAfter(e,r,t){return compare(e,r,t,"after")}function isBefore(e,r,t){return compare(e,r,t,"before")}function isBetween(e,r,t,n,a){return("("===(a=a||"()").charAt(0)?isAfter(e,r,n):!isBefore(e,r,n))&&(")"===a.charAt(1)?isBefore(e,t,n):!isAfter(e,t,n))}function isSame(e,r,t){return compare(e,r,t)}function isSameOrAfter(e,r,t){return!isBefore(e,r,t)}function isSameOrBefore(e,r,t){return!isAfter(e,r,t)}function isValid(e){return"Invalid Date"!==e.toString()}function subtract(e,r,t){return add(e,-r,t)}var date={add:add,clone:clone,dayOfYear:dayOfYear,daysInMonth:daysInMonth,diff:diff,endOf:endOf,format:format,isAfter:isAfter,isBefore:isBefore,isBetween:isBetween,isLeapYear:isLeapYear,isSame:isSame,isSameOrAfter:isSameOrAfter,isSameOrBefore:isSameOrBefore,isValid:isValid,parse:parse,startOf:startOf,subtract:subtract};module.exports=date; |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).celia=t()}(this,function(){"use strict";function c(e){return null==e}function u(e,t){return t?e.bind(t):e}function a(e,t){return t?new Date(Date.UTC(e[0],e[1]||0,c(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)):new Date(e[0],e[1]||0,c(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)}var n={},e=function(e,t){n[e]=n[e.slice(0,-1)]=n[t]=t};function i(e,t){return n[e]||t}e("years","Y"),e("months","M"),e("dates","D"),e("days","d"),e("hours","h"),e("minutes","m"),e("seconds","s"),e("milliseconds","ms");var t={Y:0,M:1,d:2,h:3,m:4,s:5,ms:6};function o(e){return e=i(e,"ms"),t[e]}function d(e,t,n){var r,d=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];if(c(r=t)||"object"!=typeof r){var s=o(n);d[s]+=t}else!function(e,t,n){var r=u(t,n);for(var d in e)if(!1===r(e[d],d,e))break}(t,function(e,t){var n=o(t);d[n]+=e});return e.setTime(+a(d)),e}function s(e){return new Date(+e)}function r(e){var t=e.getFullYear();return t%4==0&&t%100!=0||t%400==0}var f=[31,28,31,30,31,30,31,31,30,31,30,31],l=[31,29,31,30,31,30,31,31,30,31,30,31];function m(e){return r(e)?l:f}function h(e,t,n){for(var r=u(t,n),d=0,s=void 0;!1!==s&&d<e;d++)s=r(d,d,d)}var g=/^\/?Date\((-?\d+)/i,Y=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,M=[["YYYY-MM-DD",/(\d{4})-(\d\d)-(\d\d)/],["YYYY-MM",/(\d{4})-(\d\d)/,!1],["YYYYMMDD",/(\d{4})(\d\d)(\d\d)/],["YYYYMM",/(\d{4})(\d\d)/,!1],["YYYY",/\d{4}/,!1]],S=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,v=/\[.*?\]|Y{2,4}|y{2,4}|M{1,2}|D{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|SSS|Z{1,2}/g,D=[["HH:mm:ss.SSSS",/(\d\d):(\d\d):(\d\d)\.(\d+)/],["HH:mm:ss,SSSS",/(\d\d):(\d\d):(\d\d),(\d+)/],["HH:mm:ss",/(\d\d):(\d\d):(\d\d)/],["HH:mm",/(\d\d):(\d\d)/],["HHmmss.SSSS",/(\d\d)(\d\d)(\d\d)\.(\d+)/],["HHmmss,SSSS",/(\d\d)(\d\d)(\d\d),(\d+)/],["HHmmss",/(\d\d)(\d\d)(\d\d)/],["HHmm",/(\d\d)(\d\d)/],["HH",/\d\d/]],H=/(Z)|[+-](\d\d)(?::?(\d\d))?/,b=(new Date).getTimezoneOffset();function p(e){return"string"==typeof e}function w(e,t,n){for(var r=u(t,n),d=0,s=e.length,a=void 0;!1!==a&&d<s;d++)a=r(e[d],d,e)}var y=Object.prototype.toString;function k(e){return"[object Date]"===(t=e,y.call(t));var t}function x(e,t,n){if(!p(e))return a(e,!0===t);if(p(t))return a(function(n,r){var e,t=r.length,d=[],s=!1;if(h(t,function(e){var t=n.charAt(e);switch(r.charAt(e)){case"Y":case"y":d[0]=(d[0]||"")+t;break;case"M":d[1]=(d[1]||"")+t;break;case"D":case"d":d[2]=(d[2]||"")+t;break;case"H":case"h":d[3]=(d[3]||"")+t;break;case"m":d[4]=(d[4]||"")+t;break;case"s":d[5]=(d[5]||"")+t;break;case"S":d[6]=(d[6]||"")+t;break;case"Z":s=!0}}),d=d.map(function(e){return parseInt(e,10)}),s)if(e=H.exec(n.slice(-1<r.indexOf("ZZ")?-5:-6))){var a=b;if(!e[1]){var u="+"===e[0].charAt(0)?1:-1;d[3]-=e[2]*u,d[4]-=(e[3]||0)*u}d[4]-=a}else d.isUTC=s&-1<n.indexOf("Z");return c(d[1])||(d[1]-=1),d}(e,t),n);var r=function(e){var n,r,d=[],s=S.exec(e)||Y.exec(e);if(s){if(w(M,function(e,t){if(r=e[1].exec(s[1]))return h(3,function(e){d[e]=parseInt(r[e+1]||1,10)}),d[1]-=1,n=!1!==e[2],!1}),e.indexOf(d[0]))return e;if(r=null,s[3]&&w(D,function(e){if(r=e[1].exec(s[3]))return d=d.concat(r.slice(1).map(function(e){return parseInt(e,10)})),!1}),!n&&r)return d;if(r=null,s[4]){r=H.exec(s[4]);var t=b;r[1]||(d[3]-=r[2],d[4]-=r[3]||0),d[4]-=t}return d}return 4===e.length&&M[4][1].test(e)?((d=[parseInt(e,10),0,1]).isUTC=!0,d):e}(e);if(r!==e)return a(r,r.isUTC||!0===t);var d=g.exec(e);return new Date(null!==d?+d[1]:e)}function O(e,t,n){return e=c(e)?new Date:e.length?x(e,t,n):"number"==typeof e?new Date(e):k(e)?new Date(+e):e._i&&e.isValid()?new Date(+e):new Date}function Z(e,t){var n=12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth()),r=d(s(e),n,"months");return-(n+(t<r?(t-r)/(r-d(s(e),n-1,"months")):(t-r)/(d(s(e),n+1,"months")-r)))||0}function T(e,t){switch(t=i(t)){case"Y":e.setMonth(0);case"M":e.setDate(1);case"D":case"d":e.setHours(0);case"h":e.setMinutes(0);case"m":e.setSeconds(0);case"s":e.setMilliseconds(0)}return e}function A(e,t){return"ms"===(t=i(t,"ms"))||(T(e,t),d(e,1,t),d(e,-1,"ms")),e}function I(e,t){return void 0===t&&(t=2),("000000"+e).slice(-t)}function F(e,t){var n;return e<0?(n="+",e=Math.abs(e)):n="-",""+n+I(Math.floor(e/60))+(t?"":":")+I(Math.floor(e%60))}function j(e){return 12<(e=e||24)?e-12:e}function C(e,t,n,r){if(t=O(t),"ms"===(n=i(n,"ms")))switch(r){case"before":return+e<+t;case"after":return+t<+e;default:return+e==+t}else{var d=+t;switch(r){case"before":return+A(s(e),n)<d;case"after":return+T(s(e),n)>d;default:return+T(s(e),n)<=d&&d<=+A(s(e),n)}}}function U(e,t,n){return C(e,t,n,"after")}function W(e,t,n){return C(e,t,n,"before")}return{add:d,clone:s,dayOfYear:function(e,t){var n=m(e),r=e.getMonth(),d=0;return h(r,function(e){d+=n[e]}),d+=e.getDate(),void 0===t?d:(e.setTime(+e+864e5*(t-d)),e)},daysInMonth:function(e){return m(e)[e.getMonth()]},diff:function(e,t,n,r){var d,s;switch(t=O(t),n=i(n)){case"Y":d=Z(e,t)/12;break;case"M":d=Z(e,t);break;case"s":d=(e-t)/1e3;break;case"m":d=(e-t)/6e4;break;case"h":d=(e-t)/36e5;break;case"d":d=(e-t)/864e5;break;default:d=e-t}return r?d:(s=d)<0?Math.ceil(s)||0:Math.floor(s)},endOf:A,format:function(t,e){return e?e.replace(v,function(e){switch(e){case"YY":return String(t.getFullYear()).slice(-2);case"YYYY":case"yyyy":return t.getFullYear();case"M":return t.getMonth()+1;case"MM":return I(t.getMonth()+1);case"D":case"d":return t.getDate();case"DD":case"dd":return I(t.getDate());case"H":return t.getHours();case"HH":return I(t.getHours());case"h":return j(t.getHours());case"hh":return I(j(t.getHours()));case"m":return t.getMinutes();case"mm":return I(t.getMinutes());case"s":return t.getSeconds();case"ss":return I(t.getSeconds());case"SSS":return I(t.getMilliseconds(),3);case"Z":return F(b);case"ZZ":return F(b,!0);default:return e}}):t.toISOString()},isAfter:U,isBefore:W,isBetween:function(e,t,n,r,d){return("("===(d=d||"()").charAt(0)?U(e,t,r):!W(e,t,r))&&(")"===d.charAt(1)?W(e,n,r):!U(e,n,r))},isLeapYear:r,isSame:function(e,t,n){return C(e,t,n)},isSameOrAfter:function(e,t,n){return!W(e,t,n)},isSameOrBefore:function(e,t,n){return!U(e,t,n)},isValid:function(e){return"Invalid Date"!==e.toString()},parse:O,startOf:T,subtract:function(e,t,n){return d(e,-t,n)}}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).celia=t()}(this,function(){"use strict";function c(e){return null==e}function u(e,t){return t?e.bind(t):e}function a(e,t){return t?new Date(Date.UTC(e[0],e[1]||0,c(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)):new Date(e[0],e[1]||0,c(e[2])?1:e[2],e[3]||0,e[4]||0,e[5]||0,e[6]||0)}var n={},e=function(e,t){n[e]=n[e.slice(0,-1)]=n[t]=t};function i(e,t){return n[e]||t}e("years","Y"),e("months","M"),e("dates","D"),e("days","d"),e("hours","h"),e("minutes","m"),e("seconds","s"),e("milliseconds","ms");var t={Y:0,M:1,d:2,h:3,m:4,s:5,ms:6};function o(e){return e=i(e,"ms"),t[e]}function d(e,t,n){var r,d=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()];if(c(r=t)||"object"!=typeof r){var s=o(n);d[s]+=t}else!function(e,t,n){var r=u(t,n);for(var d in e)if(!1===r(e[d],d,e))break}(t,function(e,t){var n=o(t);d[n]+=e});return e.setTime(+a(d)),e}function s(e){return new Date(+e)}function r(e){var t=e.getFullYear();return t%4==0&&t%100!=0||t%400==0}var f=[31,28,31,30,31,30,31,31,30,31,30,31],l=[31,29,31,30,31,30,31,31,30,31,30,31];function m(e){return r(e)?l:f}function h(e,t,n){for(var r=u(t,n),d=0,s=void 0;!1!==s&&d<e;d++)s=r(d,d,d)}var g=/^\/?Date\((-?\d+)/i,Y=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,M=[["YYYY-MM-DD",/(\d{4})-(\d\d)-(\d\d)/],["YYYY-MM",/(\d{4})-(\d\d)/,!1],["YYYYMMDD",/(\d{4})(\d\d)(\d\d)/],["YYYYMM",/(\d{4})(\d\d)/,!1],["YYYY",/\d{4}/,!1]],S=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)\s*([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,v=/\[.*?\]|Y{2,4}|y{2,4}|M{1,2}|D{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|SSS|Z{1,2}/g,D=[["HH:mm:ss.SSSS",/(\d\d):(\d\d):(\d\d)\.(\d+)/],["HH:mm:ss,SSSS",/(\d\d):(\d\d):(\d\d),(\d+)/],["HH:mm:ss",/(\d\d):(\d\d):(\d\d)/],["HH:mm",/(\d\d):(\d\d)/],["HHmmss.SSSS",/(\d\d)(\d\d)(\d\d)\.(\d+)/],["HHmmss,SSSS",/(\d\d)(\d\d)(\d\d),(\d+)/],["HHmmss",/(\d\d)(\d\d)(\d\d)/],["HHmm",/(\d\d)(\d\d)/],["HH",/\d\d/]],H=/(Z)|[+-](\d\d)(?::?(\d\d))?/,b=(new Date).getTimezoneOffset();function p(e){return"string"==typeof e}function w(e,t,n){for(var r=u(t,n),d=0,s=e.length,a=void 0;!1!==a&&d<s;d++)a=r(e[d],d,e)}var y=Object.prototype.toString;function k(e){return"[object Date]"===(t=e,y.call(t));var t}function x(e,t,n){if(!p(e))return a(e,!0===t);if(p(t))return a(function(n,r){var e,t=r.length,d=[],s=!1;if(h(t,function(e){var t=n.charAt(e);switch(r.charAt(e)){case"Y":case"y":d[0]=(d[0]||"")+t;break;case"M":d[1]=(d[1]||"")+t;break;case"D":case"d":d[2]=(d[2]||"")+t;break;case"H":case"h":d[3]=(d[3]||"")+t;break;case"m":d[4]=(d[4]||"")+t;break;case"s":d[5]=(d[5]||"")+t;break;case"S":d[6]=(d[6]||"")+t;break;case"Z":s=!0}}),d=d.map(function(e){return parseInt(e,10)}),s)if(e=H.exec(n.slice(-1<r.indexOf("ZZ")?-5:-6))){var a=b;if(!e[1]){var u="+"===e[0].charAt(0)?1:-1;d[3]-=e[2]*u,d[4]-=(e[3]||0)*u}d[4]-=a}else d.isUTC=s&-1<n.indexOf("Z");return c(d[1])||(d[1]-=1),d}(e,t),n);var r=function(e){var n,r,d=[],s=S.exec(e)||Y.exec(e);if(s){if(w(M,function(e,t){if(r=e[1].exec(s[1]))return h(3,function(e){d[e]=parseInt(r[e+1]||1,10)}),d[1]-=1,n=!1!==e[2],!1}),e.indexOf(d[0]))return e;if(r=null,s[3]&&w(D,function(e){if(r=e[1].exec(s[3]))return d=d.concat(r.slice(1).map(function(e){return parseInt(e,10)})),!1}),!n&&r)return d;if(r=null,s[4]){r=H.exec(s[4]);var t=b;r[1]||(d[3]-=r[2],d[4]-=r[3]||0),d[4]-=t}return d}return 4===e.length&&M[4][1].test(e)?((d=[parseInt(e,10),0,1]).isUTC=!0,d):e}(e);if(r!==e)return a(r,r.isUTC||!0===t);var d=g.exec(e);return new Date(null!==d?+d[1]:e)}function O(e,t,n){return e=c(e)?new Date:e.length?x(e,t,n):"number"==typeof e?new Date(e):k(e)?new Date(+e):e._i&&e.isValid()?new Date(+e):new Date}function Z(e,t){var n=12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth()),r=d(s(e),n,"months");return-(n+(t<r?(t-r)/(r-d(s(e),n-1,"months")):(t-r)/(d(s(e),n+1,"months")-r)))||0}function T(e,t){switch(t=i(t)){case"Y":e.setMonth(0);case"M":e.setDate(1);case"D":case"d":e.setHours(0);case"h":e.setMinutes(0);case"m":e.setSeconds(0);case"s":e.setMilliseconds(0)}return e}function A(e,t){return"ms"===(t=i(t,"ms"))||(T(e,t),d(e,1,t),d(e,-1,"ms")),e}function I(e,t){return void 0===t&&(t=2),("000000"+e).slice(-t)}function F(e,t){var n;return e<0?(n="+",e=Math.abs(e)):n="-",""+n+I(Math.floor(e/60))+(t?"":":")+I(Math.floor(e%60))}function C(e){return 12<(e=e||24)?e-12:e}function U(e,t,n,r){if(t=O(t),"ms"===(n=i(n,"ms")))switch(r){case"before":return+e<+t;case"after":return+t<+e;default:return+e==+t}else{var d=+t;switch(r){case"before":return+A(s(e),n)<d;case"after":return+T(s(e),n)>d;default:return+T(s(e),n)<=d&&d<=+A(s(e),n)}}}function j(e,t,n){return U(e,t,n,"after")}function W(e,t,n){return U(e,t,n,"before")}return{add:d,clone:s,dayOfYear:function(e,t){var n=m(e),r=e.getMonth(),d=0;return h(r,function(e){d+=n[e]}),d+=e.getDate(),void 0===t?d:(e.setTime(+e+864e5*(t-d)),e)},daysInMonth:function(e){return m(e)[e.getMonth()]},diff:function(e,t,n,r){var d,s;switch(t=O(t),n=i(n)){case"Y":d=Z(e,t)/12;break;case"M":d=Z(e,t);break;case"s":d=(e-t)/1e3;break;case"m":d=(e-t)/6e4;break;case"h":d=(e-t)/36e5;break;case"d":d=(e-t)/864e5;break;default:d=e-t}return r?d:(s=d)<0?Math.ceil(s)||0:Math.floor(s)},endOf:A,format:function(t,e){return e&&"UTC"!==e?e.replace(v,function(e){switch(e){case"YY":return String(t.getFullYear()).slice(-2);case"YYYY":case"yyyy":return t.getFullYear();case"M":return t.getMonth()+1;case"MM":return I(t.getMonth()+1);case"D":case"d":return t.getDate();case"DD":case"dd":return I(t.getDate());case"H":return t.getHours();case"HH":return I(t.getHours());case"h":return C(t.getHours());case"hh":return I(C(t.getHours()));case"m":return t.getMinutes();case"mm":return I(t.getMinutes());case"s":return t.getSeconds();case"ss":return I(t.getSeconds());case"SSS":return I(t.getMilliseconds(),3);case"Z":return F(b);case"ZZ":return F(b,!0);default:return e}}):t.toISOString()},isAfter:j,isBefore:W,isBetween:function(e,t,n,r,d){return("("===(d=d||"()").charAt(0)?j(e,t,r):!W(e,t,r))&&(")"===d.charAt(1)?W(e,n,r):!j(e,n,r))},isLeapYear:r,isSame:function(e,t,n){return U(e,t,n)},isSameOrAfter:function(e,t,n){return!W(e,t,n)},isSameOrBefore:function(e,t,n){return!j(e,t,n)},isValid:function(e){return"Invalid Date"!==e.toString()},parse:O,startOf:T,subtract:function(e,t,n){return d(e,-t,n)}}}); |
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
@@ -96,2 +96,6 @@ * Released under the MIT License. | ||
function append (arr, obj) { | ||
arr[arr.length] = obj; | ||
} | ||
var addClass = classListSupported ? function (dom, classes) { | ||
@@ -106,3 +110,3 @@ classes.forEach(function (cls) { | ||
if (oprClasses.indexOf(cls) === -1) { | ||
oprClasses.append(cls); | ||
append(oprClasses, cls); | ||
} | ||
@@ -139,10 +143,8 @@ }); | ||
var isArray = Array.isArray; | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function isArrayLike (value) { | ||
if (isNil(value) || isFunction(value)) { | ||
return false; | ||
} | ||
var length = value.length; | ||
return isArray(value) || length === 0 || (+length > 0 && (length - 1) in value); | ||
return !isNil(value) && isNumber(value.length) && !isFunction(value); | ||
} | ||
@@ -162,6 +164,2 @@ | ||
function append (arr, obj) { | ||
arr[arr.length] = obj; | ||
} | ||
function childNodes (dom, cb) { | ||
@@ -192,2 +190,4 @@ var nodes = []; | ||
childNodes(testEl, fn); | ||
} else { | ||
fn(document.createTextNode(html)); | ||
} | ||
@@ -199,6 +199,6 @@ } | ||
forEach(arr, function (content) { | ||
// NodeElement | ||
if (content && content.nodeType === 1) { | ||
// Node | ||
if (content.nodeType === 1) { | ||
frag.appendChild(content); | ||
} else if (isArrayLike(content)) { | ||
} else if (!isString(content) && isArrayLike(content)) { | ||
forEach(content, function (elem) { | ||
@@ -208,3 +208,3 @@ frag.appendChild(elem); | ||
} else { | ||
fragment(String(content), null, function (elem) { | ||
fragment(content, null, function (elem) { | ||
frag.appendChild(elem); | ||
@@ -234,6 +234,7 @@ }); | ||
if (len) { | ||
for (var i = 0, j = len - 2; i < j; i++) { | ||
var last = len - 1; | ||
for (var i = 0, j = last; i < j; i++) { | ||
fallback(list[i], frag.cloneNode(true)); | ||
} | ||
fallback(list[len - 1], frag); | ||
fallback(list[last], frag); | ||
} else { | ||
@@ -248,3 +249,3 @@ fallback(list, frag); | ||
* 在node节点之后添加新元素 | ||
* @param {Node|Node} dom | ||
* @param {Node|NodeList} dom | ||
* @param {...any} args | ||
@@ -251,0 +252,0 @@ */ |
39
dom.js
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
@@ -100,2 +100,6 @@ * Released under the MIT License. | ||
function append (arr, obj) { | ||
arr[arr.length] = obj; | ||
} | ||
var addClass = classListSupported ? function (dom, classes) { | ||
@@ -110,3 +114,3 @@ classes.forEach(function (cls) { | ||
if (oprClasses.indexOf(cls) === -1) { | ||
oprClasses.append(cls); | ||
append(oprClasses, cls); | ||
} | ||
@@ -143,10 +147,8 @@ }); | ||
var isArray = Array.isArray; | ||
function isNumber (value) { | ||
return typeof value === 'number'; | ||
} | ||
function isArrayLike (value) { | ||
if (isNil(value) || isFunction(value)) { | ||
return false; | ||
} | ||
var length = value.length; | ||
return isArray(value) || length === 0 || (+length > 0 && (length - 1) in value); | ||
return !isNil(value) && isNumber(value.length) && !isFunction(value); | ||
} | ||
@@ -166,6 +168,2 @@ | ||
function append (arr, obj) { | ||
arr[arr.length] = obj; | ||
} | ||
function childNodes (dom, cb) { | ||
@@ -196,2 +194,4 @@ var nodes = []; | ||
childNodes(testEl, fn); | ||
} else { | ||
fn(document.createTextNode(html)); | ||
} | ||
@@ -203,6 +203,6 @@ } | ||
forEach(arr, function (content) { | ||
// NodeElement | ||
if (content && content.nodeType === 1) { | ||
// Node | ||
if (content.nodeType === 1) { | ||
frag.appendChild(content); | ||
} else if (isArrayLike(content)) { | ||
} else if (!isString(content) && isArrayLike(content)) { | ||
forEach(content, function (elem) { | ||
@@ -212,3 +212,3 @@ frag.appendChild(elem); | ||
} else { | ||
fragment(String(content), null, function (elem) { | ||
fragment(content, null, function (elem) { | ||
frag.appendChild(elem); | ||
@@ -238,6 +238,7 @@ }); | ||
if (len) { | ||
for (var i = 0, j = len - 2; i < j; i++) { | ||
var last = len - 1; | ||
for (var i = 0, j = last; i < j; i++) { | ||
fallback(list[i], frag.cloneNode(true)); | ||
} | ||
fallback(list[len - 1], frag); | ||
fallback(list[last], frag); | ||
} else { | ||
@@ -252,3 +253,3 @@ fallback(list, frag); | ||
* 在node节点之后添加新元素 | ||
* @param {Node|Node} dom | ||
* @param {Node|NodeList} dom | ||
* @param {...any} args | ||
@@ -255,0 +256,0 @@ */ |
/*! | ||
* celia.js v3.0.0-beta.0 | ||
* celia.js v3.0.0-beta.3 | ||
* (c) 2018-2019 Jesse Feng | ||
* Released under the MIT License. | ||
*/ | ||
"use strict";var fragmentRE=/^\s*<(\w+|!)[^>]*>/,singleTagRE=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,rnothtmlwhiteRE=/[^\x20\t\r\n\f]+/g;function isString(e){return"string"==typeof e}function classesToArray(e){return Array.isArray(e)?e:isString(e)&&e.match(rnothtmlwhiteRE)||[]}var classListSupported=!!document.body.classList,propFix={for:"htmlFor",class:"className"};["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"].forEach(function(e){propFix[e.toLowerCase()]=e});var testEl=document.createElement("div"),cssPrefixes=["Webkit","Moz","ms"],emptyStyle=testEl.style;function vendorPropName(e){if(e in emptyStyle)return e;for(var n=e[0].toUpperCase()+e.slice(1),t=cssPrefixes.length;t--;)if((e=cssPrefixes[t]+n)in emptyStyle)return e}var siblingHooker={nextElementSibling:"nextSibling",previousElementSibling:"previousSibling"};function iteratorCallback(e,n){return n?e.bind(n):e}function forEach(e,n,t){for(var r=iteratorCallback(n,t),o=0,i=e.length,a=void 0;!1!==a&&o<i;o++)a=r(e[o],o,e)}function firstNode(e){return e&&(-1<e.length?e[0]:e)}function checkDom(e,n){return e&&(-1<e.length?forEach(e,n):n(e)),e}var addClass=classListSupported?function(n,e){e.forEach(function(e){n.classList.add(e)})}:function(e,n){var t=classesToArray(e.className),r=t.slice(0);n.forEach(function(e){-1===r.indexOf(e)&&r.append(e)}),(t=t.join(" "))!==(r=r.join(" "))&&(e.className=r)};function addClass$1(e,n){var t=classesToArray(n);return checkDom(e,function(e){addClass(e,t)}),e}function isNil(e){return null==e}function isFunction(e){return"function"==typeof e}var isArray=Array.isArray;function isArrayLike(e){if(isNil(e)||isFunction(e))return!1;var n=e.length;return isArray(e)||0===n||0<+n&&n-1 in e}function forIn(e,n,t){var r=iteratorCallback(n,t);for(var o in e)if(!1===r(e[o],o,e))break}function forIn$1(e,n,t){return e&&forIn(e,n,t)}function append(e,n){e[e.length]=n}function childNodes(e,n){var t=[],r=n||function(e){append(t,e)};return forEach(e.childNodes,function(e,n){var t=0;1===e.nodeType&&r(e,++t,n)}),t}function fragment(e,n,t){var r=e.match(singleTagRE);if(r){var o=document.createElement(r[1]);forIn$1(n,function(e,n){o.setAttribute(n,e)}),t(o)}else fragmentRE.test(e)&&(testEl.innerHTML=e,childNodes(testEl,t))}function fragmentForList(e){var n=document.createDocumentFragment();return forEach(e,function(e){e&&1===e.nodeType?n.appendChild(e):isArrayLike(e)?forEach(e,function(e){n.appendChild(e)}):fragment(String(e),null,function(e){n.appendChild(e)})}),n}function domManip(e,n,t,r){if(e){document.body[t]&&(r=function(e,n){e[t](n)});var o=fragmentForList(n),i=e.length;if(i){for(var a=0,c=i-2;a<c;a++)r(e[a],o.cloneNode(!0));r(e[i-1],o)}else r(e,o)}return e}function after(e){for(var n=[],t=arguments.length-1;0<t--;)n[t]=arguments[t+1];return domManip(e,n,"after",function(e,n){var t=e.parentNode;t&&t.insertBefore(n,e.nextSibling)})}function append$1(e){for(var n=[],t=arguments.length-1;0<t--;)n[t]=arguments[t+1];return domManip(e,n,"appendChild")}function isUndefined(e){return void 0===e}function getAttribute(e,n){return(e=firstNode(e))&&e.getAttribute(n)}function setAttribute(e,n,t){return checkDom(e,function(e){e.setAttribute(n,t)}),e}function attr(e,n,t){return isUndefined(t)?getAttribute(e,n):setAttribute(e,n,t)}function before(e){for(var n=[],t=arguments.length-1;0<t--;)n[t]=arguments[t+1];return domManip(e,n,"before",function(e,n){var t=e.parentNode;t&&t.insertBefore(n,e)})}function append$2(e,n){e&&(e[e.length]=n)}function dir(e,n,t){var r=[];return checkDom(e,function(e){t(e,n,function(e){append$2(r,e)})}),r}function children(e){return dir(e,"",function(e,n,t){childNodes(t)})}var DASH_ALPHA_REGEX=/-([a-z])/g;function camelCase(e){return e.replace(DASH_ALPHA_REGEX,function(e,n){return n.toUpperCase()})}var cssProps={};function style(e,n,t){var r=e.style;if(n=cssProps[n]||(cssProps[n]=vendorPropName(n)||n),isNil(t))return r[n];r[n]=t}function getStyles(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=window),n.getComputedStyle(e)}function curCSS(e,n,t){var r;return(t=t||getStyles(e))&&(r=t.getPropertyValue(n)||t[n]),r}function getter(e,n){return(e=firstNode(e))?curCSS(e,n):""}function setter(e,n,t){return checkDom(e,function(e){style(e,n,t)}),e}function css(e,n,t){return n=camelCase(n),isUndefined(t)?getter(e,n):setter(e,n,t)}function isObject(e){return!isNil(e)&&"object"==typeof e}var expandoSequence=1,expandoKey="expando9527",cache={};function nextId(){return++expandoSequence}function expandoStore(e,n,t){var r=e[expandoKey],o=cache[r||-1];if(isUndefined(t))return o&&o[n];o||(e[expandoKey]=r=nextId(),o=cache[r]={}),o[n]=t}function data(e,i,a){return checkDom(e,function(e){var t=expandoStore(e,"data"),n=!isUndefined(a),r=!n&&!isUndefined(i),o=r&&!isObject(i);if(t||o||expandoStore(e,"data",t={}),n)t[i]=a;else{if(!r)return t;if(o)return t&&t[i];forIn$1(i,function(e,n){t[n]=e})}}),e}function empty(){}function hasClass(e,n){var t=!1,r=classesToArray(e.className);return forEach(n,function(e){if(-1<r.indexOf(e))return!(t=!0)}),t}function hasClass$1(e,n){var t=!1;return checkDom(e,function(e){if(hasClass(e,n))return!(t=!0)}),t}function showHide(e,r){return checkDom(e,function(e){var n=e.style.display||"",t=expandoStore(e,"display");(isUndefined(t)&&(expandoStore(e,"display",n),t=n),r)?n?"none"===n&&(e.style.display=t):"none"===curCSS(e,"display")&&(e.style.display="block"):e.style.display="none"}),e}function hide(e){return showHide(e)}function html(e,n){isNil(n)||checkDom(e,1===n.nodeType?function(e){append$1(e,n)}:function(e){e.innerHTML=String(n)});return e}function sibling(e,n,t){var r=e[n];if(r)t(r);else{for(n=siblingHooker[n];(e=e[n])&&1!==e.nodeType;);e&&t(e)}}function next(e){return dir(e,"nextElementSibling",sibling)}function siblings(e,n,t){if(n in e)for(;e=e[n];)t(e);else for(n=siblingHooker[n];(e=e[n])&&1===e.nodeType;)t(e)}function nextAll(e){return dir(e,"nextElementSibling",siblings)}function forEach$1(e,n,t){return e&&forEach(e,n,t)}function inArray(e,n,t){if(n){if(n.indexOf)return n.indexOf(e,t);for(var r=n.length,o=t?t<0?Math.max(0,r+t):t:0;o<r;o++)if(o in n&&n[o]===e)return o}return-1}function removeAt(e,n){return e.splice(n,1),n}function remove(e,n){var t=inArray(n,e);return 0<=t?(removeAt(e,t),n):null}var removeEventListenerFn=window.removeEventListener?function(e,n,t){e.removeEventListener(n,t,!1)}:function(e,n,t){e.detachEvent("on"+n,t)};function off(e,n,o){return checkDom(e,function(t){var r=expandoStore(t,"events");expandoStore(t,"handle")&&(isUndefined(n)?forEach$1(r,function(e,n){removeEventListenerFn(t,n,e),delete r[n]}):forEach$1(n.split(" "),function(e){isUndefined(o)?(removeEventListenerFn(t,e,r[e]),delete r[e]):remove(r[e],o)}))}),e}var addEventListenerFn=window.addEventListener?function(e,n,t){e.addEventListener(n,t,!1)}:function(e,n,t){e.attachEvent("on"+n,t)};function createEventHandler(t,r){var e=function(n){if(n.preventDefault||(n.preventDefault=function(){n.returnValue=!1}),n.stopPropagation||(n.stopPropagation=function(){n.cancelBubble=!0}),n.target||(n.target=n.srcElement||document),isUndefined(n.defaultPrevented)){var e=n.preventDefault;e=e.bind(n),n.preventDefault=function(){n.defaultPrevented=!0,e()},n.defaultPrevented=!1}n.isDefaultPrevented=function(){return n.defaultPrevented||!1===n.returnValue},forEach$1(r[n.type],function(e){return e.call(t,n)});try{delete n.preventDefault,delete n.stopPropagation,delete n.isDefaultPrevented}catch(e){n.preventDefault=null,n.stopPropagation=null,n.isDefaultPrevented=null}};return e.elem=t,e}function on(e,n,i){return checkDom(e,function(t){var r=expandoStore(t,"events"),o=expandoStore(t,"handle");r||expandoStore(t,"events",r={}),o||expandoStore(t,"handle",o=createEventHandler(t,r)),n.split(" ").forEach(function(e){var n=r[e];n||(addEventListenerFn(t,e,o),n=r[e]=[]),n[n.length]=i})}),e}function parent(e){return dir(e,"",function(e,n,t){var r=e.parentNode;r&&t(r)})}function prepend(e){for(var n=[],t=arguments.length-1;0<t--;)n[t]=arguments[t+1];return domManip(e,n,"prepend",function(e,n){1!==e.nodeType&&11!==e.nodeType&&9!==e.nodeType||e.insertBefore(n,e.firstChild)})}function prev(e){return dir(e,"previousElementSibling",sibling)}function prevAll(e){return dir(e,"previousElementSibling",siblings)}function getProperty(e,n){return(e=firstNode(e))&&e[n]}function setProperty(e,n,t){return n=propFix[n]||n,checkDom(e,function(e){e[n]=t}),e}function prop(e,n,t){return isUndefined(t)?getProperty(e,n):setProperty(e,n,t)}function remove$1(e){return checkDom(e,function(e){var n=e.parentNode;n&&n.removeChild(e)}),e}function removeAttr(e,n){var t=classesToArray(n);return checkDom(e,function(n){t.forEach(function(e){n.removeAttribute(e)})}),e}var removeClass=classListSupported?function(n,e){e.forEach(function(e){n.classList.remove(e)})}:function(e,n){var t=classesToArray(e.className),r=t.slice(0);n.forEach(function(e){var n=r.indexOf(e);-1<n&&r.splice(n,1)}),(t=t.join(" "))!==(r=r.join(" "))&&(e.className=r)};function removeClass$1(e,n){if(!arguments.length)return prop(e,"className","");var t=classesToArray(n);return checkDom(e,function(e){removeClass(e,t)}),e}function removeProp(e,n){return checkDom(e,function(e){delete e[propFix[n]||n]}),e}function show(e){return showHide(e,!0)}function wrap(e){e.wrap=function(o){return o?(fragment(o,null,function(e){return o=e,!1}),checkDom(function(e,n){var t=o;n&&(t=o.cloneNode(!0));var r=e.parentNode;r&&r.replaceChild(t,e),t.appendChild(e)})):this}}var dom={addClass:addClass$1,after:after,append:append$1,attr:attr,before:before,children:children,css:css,data:data,empty:empty,hasClass:hasClass$1,hide:hide,html:html,next:next,nextAll:nextAll,off:off,on:on,parent:parent,prepend:prepend,prev:prev,prevAll:prevAll,prop:prop,remove:remove$1,removeAttr:removeAttr,removeClass:removeClass$1,removeProp:removeProp,show:show,wrap:wrap};module.exports=dom; | ||
"use strict";var fragmentRE=/^\s*<(\w+|!)[^>]*>/,singleTagRE=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,rnothtmlwhiteRE=/[^\x20\t\r\n\f]+/g;function isString(e){return"string"==typeof e}function classesToArray(e){return Array.isArray(e)?e:isString(e)&&e.match(rnothtmlwhiteRE)||[]}var classListSupported=!!document.body.classList,propFix={for:"htmlFor",class:"className"};["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"].forEach(function(e){propFix[e.toLowerCase()]=e});var testEl=document.createElement("div"),cssPrefixes=["Webkit","Moz","ms"],emptyStyle=testEl.style;function vendorPropName(e){if(e in emptyStyle)return e;for(var n=e[0].toUpperCase()+e.slice(1),t=cssPrefixes.length;t--;)if((e=cssPrefixes[t]+n)in emptyStyle)return e}var siblingHooker={nextElementSibling:"nextSibling",previousElementSibling:"previousSibling"};function iteratorCallback(e,n){return n?e.bind(n):e}function forEach(e,n,t){for(var r=iteratorCallback(n,t),o=0,i=e.length,a=void 0;!1!==a&&o<i;o++)a=r(e[o],o,e)}function firstNode(e){return e&&(-1<e.length?e[0]:e)}function checkDom(e,n){return e&&(-1<e.length?forEach(e,n):n(e)),e}function append(e,n){e[e.length]=n}var addClass=classListSupported?function(n,e){e.forEach(function(e){n.classList.add(e)})}:function(e,n){var t=classesToArray(e.className),r=t.slice(0);n.forEach(function(e){-1===r.indexOf(e)&&append(r,e)}),(t=t.join(" "))!==(r=r.join(" "))&&(e.className=r)};function addClass$1(e,n){var t=classesToArray(n);return checkDom(e,function(e){addClass(e,t)}),e}function isNil(e){return null==e}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isArrayLike(e){return!isNil(e)&&isNumber(e.length)&&!isFunction(e)}function forIn(e,n,t){var r=iteratorCallback(n,t);for(var o in e)if(!1===r(e[o],o,e))break}function forIn$1(e,n,t){return e&&forIn(e,n,t)}function childNodes(e,n){var t=[],r=n||function(e){append(t,e)};return forEach(e.childNodes,function(e,n){var t=0;1===e.nodeType&&r(e,++t,n)}),t}function fragment(e,n,t){var r=e.match(singleTagRE);if(r){var o=document.createElement(r[1]);forIn$1(n,function(e,n){o.setAttribute(n,e)}),t(o)}else fragmentRE.test(e)?(testEl.innerHTML=e,childNodes(testEl,t)):t(document.createTextNode(e))}function fragmentForList(e){var n=document.createDocumentFragment();return forEach(e,function(e){1===e.nodeType?n.appendChild(e):!isString(e)&&isArrayLike(e)?forEach(e,function(e){n.appendChild(e)}):fragment(e,null,function(e){n.appendChild(e)})}),n}function domManip(e,n,t,r){if(e){document.body[t]&&(r=function(e,n){e[t](n)});var o=fragmentForList(n),i=e.length;if(i){for(var a=i-1,c=0,u=a;c<u;c++)r(e[c],o.cloneNode(!0));r(e[a],o)}else r(e,o)}return e}function after(e){for(var n=[],t=arguments.length-1;0<t--;)n[t]=arguments[t+1];return domManip(e,n,"after",function(e,n){var t=e.parentNode;t&&t.insertBefore(n,e.nextSibling)})}function append$1(e){for(var n=[],t=arguments.length-1;0<t--;)n[t]=arguments[t+1];return domManip(e,n,"appendChild")}function isUndefined(e){return void 0===e}function getAttribute(e,n){return(e=firstNode(e))&&e.getAttribute(n)}function setAttribute(e,n,t){return checkDom(e,function(e){e.setAttribute(n,t)}),e}function attr(e,n,t){return isUndefined(t)?getAttribute(e,n):setAttribute(e,n,t)}function before(e){for(var n=[],t=arguments.length-1;0<t--;)n[t]=arguments[t+1];return domManip(e,n,"before",function(e,n){var t=e.parentNode;t&&t.insertBefore(n,e)})}function append$2(e,n){e&&(e[e.length]=n)}function dir(e,n,t){var r=[];return checkDom(e,function(e){t(e,n,function(e){append$2(r,e)})}),r}function children(e){return dir(e,"",function(e,n,t){childNodes(t)})}var DASH_ALPHA_REGEX=/-([a-z])/g;function camelCase(e){return e.replace(DASH_ALPHA_REGEX,function(e,n){return n.toUpperCase()})}var cssProps={};function style(e,n,t){var r=e.style;if(n=cssProps[n]||(cssProps[n]=vendorPropName(n)||n),isNil(t))return r[n];r[n]=t}function getStyles(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=window),n.getComputedStyle(e)}function curCSS(e,n,t){var r;return(t=t||getStyles(e))&&(r=t.getPropertyValue(n)||t[n]),r}function getter(e,n){return(e=firstNode(e))?curCSS(e,n):""}function setter(e,n,t){return checkDom(e,function(e){style(e,n,t)}),e}function css(e,n,t){return n=camelCase(n),isUndefined(t)?getter(e,n):setter(e,n,t)}function isObject(e){return!isNil(e)&&"object"==typeof e}var expandoSequence=1,expandoKey="expando9527",cache={};function nextId(){return++expandoSequence}function expandoStore(e,n,t){var r=e[expandoKey],o=cache[r||-1];if(isUndefined(t))return o&&o[n];o||(e[expandoKey]=r=nextId(),o=cache[r]={}),o[n]=t}function data(e,i,a){return checkDom(e,function(e){var t=expandoStore(e,"data"),n=!isUndefined(a),r=!n&&!isUndefined(i),o=r&&!isObject(i);if(t||o||expandoStore(e,"data",t={}),n)t[i]=a;else{if(!r)return t;if(o)return t&&t[i];forIn$1(i,function(e,n){t[n]=e})}}),e}function empty(){}function hasClass(e,n){var t=!1,r=classesToArray(e.className);return forEach(n,function(e){if(-1<r.indexOf(e))return!(t=!0)}),t}function hasClass$1(e,n){var t=!1;return checkDom(e,function(e){if(hasClass(e,n))return!(t=!0)}),t}function showHide(e,r){return checkDom(e,function(e){var n=e.style.display||"",t=expandoStore(e,"display");(isUndefined(t)&&(expandoStore(e,"display",n),t=n),r)?n?"none"===n&&(e.style.display=t):"none"===curCSS(e,"display")&&(e.style.display="block"):e.style.display="none"}),e}function hide(e){return showHide(e)}function html(e,n){isNil(n)||checkDom(e,1===n.nodeType?function(e){append$1(e,n)}:function(e){e.innerHTML=String(n)});return e}function sibling(e,n,t){var r=e[n];if(r)t(r);else{for(n=siblingHooker[n];(e=e[n])&&1!==e.nodeType;);e&&t(e)}}function next(e){return dir(e,"nextElementSibling",sibling)}function siblings(e,n,t){if(n in e)for(;e=e[n];)t(e);else for(n=siblingHooker[n];(e=e[n])&&1===e.nodeType;)t(e)}function nextAll(e){return dir(e,"nextElementSibling",siblings)}function forEach$1(e,n,t){return e&&forEach(e,n,t)}function inArray(e,n,t){if(n){if(n.indexOf)return n.indexOf(e,t);for(var r=n.length,o=t?t<0?Math.max(0,r+t):t:0;o<r;o++)if(o in n&&n[o]===e)return o}return-1}function removeAt(e,n){return e.splice(n,1),n}function remove(e,n){var t=inArray(n,e);return 0<=t?(removeAt(e,t),n):null}var removeEventListenerFn=window.removeEventListener?function(e,n,t){e.removeEventListener(n,t,!1)}:function(e,n,t){e.detachEvent("on"+n,t)};function off(e,n,o){return checkDom(e,function(t){var r=expandoStore(t,"events");expandoStore(t,"handle")&&(isUndefined(n)?forEach$1(r,function(e,n){removeEventListenerFn(t,n,e),delete r[n]}):forEach$1(n.split(" "),function(e){isUndefined(o)?(removeEventListenerFn(t,e,r[e]),delete r[e]):remove(r[e],o)}))}),e}var addEventListenerFn=window.addEventListener?function(e,n,t){e.addEventListener(n,t,!1)}:function(e,n,t){e.attachEvent("on"+n,t)};function createEventHandler(t,r){var e=function(n){if(n.preventDefault||(n.preventDefault=function(){n.returnValue=!1}),n.stopPropagation||(n.stopPropagation=function(){n.cancelBubble=!0}),n.target||(n.target=n.srcElement||document),isUndefined(n.defaultPrevented)){var e=n.preventDefault;e=e.bind(n),n.preventDefault=function(){n.defaultPrevented=!0,e()},n.defaultPrevented=!1}n.isDefaultPrevented=function(){return n.defaultPrevented||!1===n.returnValue},forEach$1(r[n.type],function(e){return e.call(t,n)});try{delete n.preventDefault,delete n.stopPropagation,delete n.isDefaultPrevented}catch(e){n.preventDefault=null,n.stopPropagation=null,n.isDefaultPrevented=null}};return e.elem=t,e}function on(e,n,i){return checkDom(e,function(t){var r=expandoStore(t,"events"),o=expandoStore(t,"handle");r||expandoStore(t,"events",r={}),o||expandoStore(t,"handle",o=createEventHandler(t,r)),n.split(" ").forEach(function(e){var n=r[e];n||(addEventListenerFn(t,e,o),n=r[e]=[]),n[n.length]=i})}),e}function parent(e){return dir(e,"",function(e,n,t){var r=e.parentNode;r&&t(r)})}function prepend(e){for(var n=[],t=arguments.length-1;0<t--;)n[t]=arguments[t+1];return domManip(e,n,"prepend",function(e,n){1!==e.nodeType&&11!==e.nodeType&&9!==e.nodeType||e.insertBefore(n,e.firstChild)})}function prev(e){return dir(e,"previousElementSibling",sibling)}function prevAll(e){return dir(e,"previousElementSibling",siblings)}function getProperty(e,n){return(e=firstNode(e))&&e[n]}function setProperty(e,n,t){return n=propFix[n]||n,checkDom(e,function(e){e[n]=t}),e}function prop(e,n,t){return isUndefined(t)?getProperty(e,n):setProperty(e,n,t)}function remove$1(e){return checkDom(e,function(e){var n=e.parentNode;n&&n.removeChild(e)}),e}function removeAttr(e,n){var t=classesToArray(n);return checkDom(e,function(n){t.forEach(function(e){n.removeAttribute(e)})}),e}var removeClass=classListSupported?function(n,e){e.forEach(function(e){n.classList.remove(e)})}:function(e,n){var t=classesToArray(e.className),r=t.slice(0);n.forEach(function(e){var n=r.indexOf(e);-1<n&&r.splice(n,1)}),(t=t.join(" "))!==(r=r.join(" "))&&(e.className=r)};function removeClass$1(e,n){if(!arguments.length)return prop(e,"className","");var t=classesToArray(n);return checkDom(e,function(e){removeClass(e,t)}),e}function removeProp(e,n){return checkDom(e,function(e){delete e[propFix[n]||n]}),e}function show(e){return showHide(e,!0)}function wrap(e){e.wrap=function(o){return o?(fragment(o,null,function(e){return o=e,!1}),checkDom(function(e,n){var t=o;n&&(t=o.cloneNode(!0));var r=e.parentNode;r&&r.replaceChild(t,e),t.appendChild(e)})):this}}var dom={addClass:addClass$1,after:after,append:append$1,attr:attr,before:before,children:children,css:css,data:data,empty:empty,hasClass:hasClass$1,hide:hide,html:html,next:next,nextAll:nextAll,off:off,on:on,parent:parent,prepend:prepend,prev:prev,prevAll:prevAll,prop:prop,remove:remove$1,removeAttr:removeAttr,removeClass:removeClass$1,removeProp:removeProp,show:show,wrap:wrap};module.exports=dom; |
@@ -1,1 +0,1 @@ | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n=n||self).celia=e()}(this,function(){"use strict";var o=/^\s*<(\w+|!)[^>]*>/,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,e=/[^\x20\t\r\n\f]+/g;function f(n){return Array.isArray(n)?n:"string"==typeof n&&n.match(e)||[]}var n=!!document.body.classList,a={for:"htmlFor",class:"className"};["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"].forEach(function(n){a[n.toLowerCase()]=n});var c=document.createElement("div"),i=["Webkit","Moz","ms"],l=c.style;var d={nextElementSibling:"nextSibling",previousElementSibling:"previousSibling"};function s(n,e){return e?n.bind(e):n}function v(n,e,t){for(var r=s(e,t),i=0,o=n.length,u=void 0;!1!==u&&i<o;i++)u=r(n[i],i,n)}function p(n){return n&&(-1<n.length?n[0]:n)}function h(n,e){return n&&(-1<n.length?v(n,e):e(n)),n}var r=n?function(e,n){n.forEach(function(n){e.classList.add(n)})}:function(n,e){var t=f(n.className),r=t.slice(0);e.forEach(function(n){-1===r.indexOf(n)&&r.append(n)}),(t=t.join(" "))!==(r=r.join(" "))&&(n.className=r)};function m(n){return null==n}var t=Array.isArray;function g(n,e,t){return n&&function(n,e,t){var r=s(e,t);for(var i in n)if(!1===r(n[i],i,n))break}(n,e,t)}function y(n,e){var r=[],i=e||function(n){var e,t;t=n,(e=r)[e.length]=t};return v(n.childNodes,function(n,e){var t=0;1===n.nodeType&&i(n,++t,e)}),r}function b(n,e,t){var r=n.match(u);if(r){var i=document.createElement(r[1]);g(e,function(n,e){i.setAttribute(e,n)}),t(i)}else o.test(n)&&(c.innerHTML=n,y(c,t))}function E(n){var e=document.createDocumentFragment();return v(n,function(n){n&&1===n.nodeType?e.appendChild(n):!function(n){if(m(n)||"function"==typeof n)return!1;var e=n.length;return t(n)||0===e||0<+e&&e-1 in n}(n)?b(String(n),null,function(n){e.appendChild(n)}):v(n,function(n){e.appendChild(n)})}),e}function x(n,e,t,r){if(n){document.body[t]&&(r=function(n,e){n[t](e)});var i=E(e),o=n.length;if(o){for(var u=0,f=o-2;u<f;u++)r(n[u],i.cloneNode(!0));r(n[o-1],i)}else r(n,i)}return n}function w(n){for(var e=[],t=arguments.length-1;0<t--;)e[t]=arguments[t+1];return x(n,e,"appendChild")}function C(n){return void 0===n}function N(n,e,t){var r=[];return h(n,function(n){t(n,e,function(n){var e,t;t=n,(e=r)&&(e[e.length]=t)})}),r}var S=/-([a-z])/g;var P={};function A(n,e,t){var r=n.style;if(e=P[e]||(P[e]=function(n){if(n in l)return n;for(var e=n[0].toUpperCase()+n.slice(1),t=i.length;t--;)if((n=i[t]+e)in l)return n}(e)||e),m(t))return r[e];r[e]=t}function D(n,e,t){var r,i,o;return(t=t||((i=(r=n).ownerDocument.defaultView)&&i.opener||(i=window),i.getComputedStyle(r)))&&(o=t.getPropertyValue(e)||t[e]),o}var L=1,T="expando9527",j={};function O(n,e,t){var r=n[T],i=j[r||-1];if(C(t))return i&&i[e];i||(n[T]=r=++L,i=j[r]={}),i[e]=t}function B(n,r){return h(n,function(n){var e=n.style.display||"",t=O(n,"display");(C(t)&&(O(n,"display",e),t=e),r)?e?"none"===e&&(n.style.display=t):"none"===D(n,"display")&&(n.style.display="block"):n.style.display="none"}),n}function M(n,e,t){var r=n[e];if(r)t(r);else{for(e=d[e];(n=n[e])&&1!==n.nodeType;);n&&t(n)}}function V(n,e,t){if(e in n)for(;n=n[e];)t(n);else for(e=d[e];(n=n[e])&&1===n.nodeType;)t(n)}function k(n,e,t){return n&&v(n,e,t)}function z(n,e){var t,r=function(n,e,t){if(e){if(e.indexOf)return e.indexOf(n,t);for(var r=e.length,i=t?t<0?Math.max(0,r+t):t:0;i<r;i++)if(i in e&&e[i]===n)return i}return-1}(e,n);return 0<=r?(t=r,n.splice(t,1),e):null}var F=window.removeEventListener?function(n,e,t){n.removeEventListener(e,t,!1)}:function(n,e,t){n.detachEvent("on"+e,t)};var H=window.addEventListener?function(n,e,t){n.addEventListener(e,t,!1)}:function(n,e,t){n.attachEvent("on"+e,t)};function U(n,e,t){return C(t)?(f=e,(u=p(u=n))&&u[f]):(r=n,o=t,i=a[i=e]||i,h(r,function(n){n[i]=o}),r);var r,i,o,u,f}var I=n?function(e,n){n.forEach(function(n){e.classList.remove(n)})}:function(n,e){var t=f(n.className),r=t.slice(0);e.forEach(function(n){var e=r.indexOf(n);-1<e&&r.splice(e,1)}),(t=t.join(" "))!==(r=r.join(" "))&&(n.className=r)};return{addClass:function(n,e){var t=f(e);return h(n,function(n){r(n,t)}),n},after:function(n){for(var e=[],t=arguments.length-1;0<t--;)e[t]=arguments[t+1];return x(n,e,"after",function(n,e){var t=n.parentNode;t&&t.insertBefore(e,n.nextSibling)})},append:w,attr:function(n,e,t){return C(t)?(f=e,(u=p(u=n))&&u.getAttribute(f)):(i=e,o=t,h(r=n,function(n){n.setAttribute(i,o)}),r);var r,i,o,u,f},before:function(n){for(var e=[],t=arguments.length-1;0<t--;)e[t]=arguments[t+1];return x(n,e,"before",function(n,e){var t=n.parentNode;t&&t.insertBefore(e,n)})},children:function(n){return N(n,"",function(n,e,t){y(t)})},css:function(n,e,t){var r,i,o,u,f;return e=e.replace(S,function(n,e){return e.toUpperCase()}),C(t)?(f=e,(u=p(u=n))?D(u,f):""):(i=e,o=t,h(r=n,function(n){A(n,i,o)}),r)},data:function(n,u,f){return h(n,function(n){var e,t=O(n,"data"),r=!C(f),i=!r&&!C(u),o=i&&!(!m(e=u)&&"object"==typeof e);if(t||o||O(n,"data",t={}),r)t[u]=f;else{if(!i)return t;if(o)return t&&t[u];g(u,function(n,e){t[e]=n})}}),n},empty:function(){},hasClass:function(n,i){var o=!1;return h(n,function(n){if(e=i,t=!1,r=f(n.className),v(e,function(n){if(-1<r.indexOf(n))return!(t=!0)}),t)return!(o=!0);var e,t,r}),o},hide:function(n){return B(n)},html:function(n,e){return m(e)||h(n,1===e.nodeType?function(n){w(n,e)}:function(n){n.innerHTML=String(e)}),n},next:function(n){return N(n,"nextElementSibling",M)},nextAll:function(n){return N(n,"nextElementSibling",V)},off:function(n,e,i){return h(n,function(t){var r=O(t,"events");O(t,"handle")&&(C(e)?k(r,function(n,e){F(t,e,n),delete r[e]}):k(e.split(" "),function(n){C(i)?(F(t,n,r[n]),delete r[n]):z(r[n],i)}))}),n},on:function(n,e,f){return h(n,function(t){var r,i,n,o=O(t,"events"),u=O(t,"handle");o||O(t,"events",o={}),u||O(t,"handle",(i=o,(n=function(e){if(e.preventDefault||(e.preventDefault=function(){e.returnValue=!1}),e.stopPropagation||(e.stopPropagation=function(){e.cancelBubble=!0}),e.target||(e.target=e.srcElement||document),C(e.defaultPrevented)){var n=e.preventDefault;n=n.bind(e),e.preventDefault=function(){e.defaultPrevented=!0,n()},e.defaultPrevented=!1}e.isDefaultPrevented=function(){return e.defaultPrevented||!1===e.returnValue},k(i[e.type],function(n){return n.call(r,e)});try{delete e.preventDefault,delete e.stopPropagation,delete e.isDefaultPrevented}catch(n){e.preventDefault=null,e.stopPropagation=null,e.isDefaultPrevented=null}}).elem=r=t,u=n)),e.split(" ").forEach(function(n){var e=o[n];e||(H(t,n,u),e=o[n]=[]),e[e.length]=f})}),n},parent:function(n){return N(n,"",function(n,e,t){var r=n.parentNode;r&&t(r)})},prepend:function(n){for(var e=[],t=arguments.length-1;0<t--;)e[t]=arguments[t+1];return x(n,e,"prepend",function(n,e){1!==n.nodeType&&11!==n.nodeType&&9!==n.nodeType||n.insertBefore(e,n.firstChild)})},prev:function(n){return N(n,"previousElementSibling",M)},prevAll:function(n){return N(n,"previousElementSibling",V)},prop:U,remove:function(n){return h(n,function(n){var e=n.parentNode;e&&e.removeChild(n)}),n},removeAttr:function(n,e){var t=f(e);return h(n,function(e){t.forEach(function(n){e.removeAttribute(n)})}),n},removeClass:function(n,e){if(!arguments.length)return U(n,"className","");var t=f(e);return h(n,function(n){I(n,t)}),n},removeProp:function(n,e){return h(n,function(n){delete n[a[e]||e]}),n},show:function(n){return B(n,!0)},wrap:function(n){n.wrap=function(i){return i?(b(i,null,function(n){return i=n,!1}),h(function(n,e){var t=i;e&&(t=i.cloneNode(!0));var r=n.parentNode;r&&r.replaceChild(t,n),t.appendChild(n)})):this}}}}); | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n=n||self).celia=e()}(this,function(){"use strict";var o=/^\s*<(\w+|!)[^>]*>/,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,e=/[^\x20\t\r\n\f]+/g;function r(n){return"string"==typeof n}function f(n){return Array.isArray(n)?n:r(n)&&n.match(e)||[]}var n=!!document.body.classList,a={for:"htmlFor",class:"className"};["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"].forEach(function(n){a[n.toLowerCase()]=n});var c=document.createElement("div"),i=["Webkit","Moz","ms"],l=c.style;var d={nextElementSibling:"nextSibling",previousElementSibling:"previousSibling"};function s(n,e){return e?n.bind(e):n}function v(n,e,t){for(var r=s(e,t),i=0,o=n.length,u=void 0;!1!==u&&i<o;i++)u=r(n[i],i,n)}function p(n){return n&&(-1<n.length?n[0]:n)}function m(n,e){return n&&(-1<n.length?v(n,e):e(n)),n}function h(n,e){n[n.length]=e}var g=n?function(e,n){n.forEach(function(n){e.classList.add(n)})}:function(n,e){var t=f(n.className),r=t.slice(0);e.forEach(function(n){-1===r.indexOf(n)&&h(r,n)}),(t=t.join(" "))!==(r=r.join(" "))&&(n.className=r)};function y(n){return null==n}function b(n,e,t){return n&&function(n,e,t){var r=s(e,t);for(var i in n)if(!1===r(n[i],i,n))break}(n,e,t)}function E(n,e){var t=[],r=e||function(n){h(t,n)};return v(n.childNodes,function(n,e){var t=0;1===n.nodeType&&r(n,++t,e)}),t}function x(n,e,t){var r=n.match(u);if(r){var i=document.createElement(r[1]);b(e,function(n,e){i.setAttribute(e,n)}),t(i)}else o.test(n)?(c.innerHTML=n,E(c,t)):t(document.createTextNode(n))}function N(n){var t=document.createDocumentFragment();return v(n,function(n){var e;1===n.nodeType?t.appendChild(n):r(n)||(y(e=n)||"number"!=typeof e.length||"function"==typeof e)?x(n,null,function(n){t.appendChild(n)}):v(n,function(n){t.appendChild(n)})}),t}function w(n,e,t,r){if(n){document.body[t]&&(r=function(n,e){n[t](e)});var i=N(e),o=n.length;if(o){for(var u=o-1,f=0,a=u;f<a;f++)r(n[f],i.cloneNode(!0));r(n[u],i)}else r(n,i)}return n}function t(n){for(var e=[],t=arguments.length-1;0<t--;)e[t]=arguments[t+1];return w(n,e,"appendChild")}function C(n){return void 0===n}function P(n,e,t){var r=[];return m(n,function(n){t(n,e,function(n){var e,t;t=n,(e=r)&&(e[e.length]=t)})}),r}var S=/-([a-z])/g;var D={};function L(n,e,t){var r=n.style;if(e=D[e]||(D[e]=function(n){if(n in l)return n;for(var e=n[0].toUpperCase()+n.slice(1),t=i.length;t--;)if((n=i[t]+e)in l)return n}(e)||e),y(t))return r[e];r[e]=t}function T(n,e,t){var r,i,o;return(t=t||((i=(r=n).ownerDocument.defaultView)&&i.opener||(i=window),i.getComputedStyle(r)))&&(o=t.getPropertyValue(e)||t[e]),o}var A=1,j="expando9527",O={};function B(n,e,t){var r=n[j],i=O[r||-1];if(C(t))return i&&i[e];i||(n[j]=r=++A,i=O[r]={}),i[e]=t}function M(n,r){return m(n,function(n){var e=n.style.display||"",t=B(n,"display");(C(t)&&(B(n,"display",e),t=e),r)?e?"none"===e&&(n.style.display=t):"none"===T(n,"display")&&(n.style.display="block"):n.style.display="none"}),n}function V(n,e,t){var r=n[e];if(r)t(r);else{for(e=d[e];(n=n[e])&&1!==n.nodeType;);n&&t(n)}}function k(n,e,t){if(e in n)for(;n=n[e];)t(n);else for(e=d[e];(n=n[e])&&1===n.nodeType;)t(n)}function z(n,e,t){return n&&v(n,e,t)}function F(n,e){var t,r=function(n,e,t){if(e){if(e.indexOf)return e.indexOf(n,t);for(var r=e.length,i=t?t<0?Math.max(0,r+t):t:0;i<r;i++)if(i in e&&e[i]===n)return i}return-1}(e,n);return 0<=r?(t=r,n.splice(t,1),e):null}var H=window.removeEventListener?function(n,e,t){n.removeEventListener(e,t,!1)}:function(n,e,t){n.detachEvent("on"+e,t)};var U=window.addEventListener?function(n,e,t){n.addEventListener(e,t,!1)}:function(n,e,t){n.attachEvent("on"+e,t)};function I(n,e,t){return C(t)?(f=e,(u=p(u=n))&&u[f]):(r=n,o=t,i=a[i=e]||i,m(r,function(n){n[i]=o}),r);var r,i,o,u,f}var W=n?function(e,n){n.forEach(function(n){e.classList.remove(n)})}:function(n,e){var t=f(n.className),r=t.slice(0);e.forEach(function(n){var e=r.indexOf(n);-1<e&&r.splice(e,1)}),(t=t.join(" "))!==(r=r.join(" "))&&(n.className=r)};return{addClass:function(n,e){var t=f(e);return m(n,function(n){g(n,t)}),n},after:function(n){for(var e=[],t=arguments.length-1;0<t--;)e[t]=arguments[t+1];return w(n,e,"after",function(n,e){var t=n.parentNode;t&&t.insertBefore(e,n.nextSibling)})},append:t,attr:function(n,e,t){return C(t)?(f=e,(u=p(u=n))&&u.getAttribute(f)):(i=e,o=t,m(r=n,function(n){n.setAttribute(i,o)}),r);var r,i,o,u,f},before:function(n){for(var e=[],t=arguments.length-1;0<t--;)e[t]=arguments[t+1];return w(n,e,"before",function(n,e){var t=n.parentNode;t&&t.insertBefore(e,n)})},children:function(n){return P(n,"",function(n,e,t){E(t)})},css:function(n,e,t){var r,i,o,u,f;return e=e.replace(S,function(n,e){return e.toUpperCase()}),C(t)?(f=e,(u=p(u=n))?T(u,f):""):(i=e,o=t,m(r=n,function(n){L(n,i,o)}),r)},data:function(n,u,f){return m(n,function(n){var e,t=B(n,"data"),r=!C(f),i=!r&&!C(u),o=i&&!(!y(e=u)&&"object"==typeof e);if(t||o||B(n,"data",t={}),r)t[u]=f;else{if(!i)return t;if(o)return t&&t[u];b(u,function(n,e){t[e]=n})}}),n},empty:function(){},hasClass:function(n,i){var o=!1;return m(n,function(n){if(e=i,t=!1,r=f(n.className),v(e,function(n){if(-1<r.indexOf(n))return!(t=!0)}),t)return!(o=!0);var e,t,r}),o},hide:function(n){return M(n)},html:function(n,e){return y(e)||m(n,1===e.nodeType?function(n){t(n,e)}:function(n){n.innerHTML=String(e)}),n},next:function(n){return P(n,"nextElementSibling",V)},nextAll:function(n){return P(n,"nextElementSibling",k)},off:function(n,e,i){return m(n,function(t){var r=B(t,"events");B(t,"handle")&&(C(e)?z(r,function(n,e){H(t,e,n),delete r[e]}):z(e.split(" "),function(n){C(i)?(H(t,n,r[n]),delete r[n]):F(r[n],i)}))}),n},on:function(n,e,f){return m(n,function(t){var r,i,n,o=B(t,"events"),u=B(t,"handle");o||B(t,"events",o={}),u||B(t,"handle",(i=o,(n=function(e){if(e.preventDefault||(e.preventDefault=function(){e.returnValue=!1}),e.stopPropagation||(e.stopPropagation=function(){e.cancelBubble=!0}),e.target||(e.target=e.srcElement||document),C(e.defaultPrevented)){var n=e.preventDefault;n=n.bind(e),e.preventDefault=function(){e.defaultPrevented=!0,n()},e.defaultPrevented=!1}e.isDefaultPrevented=function(){return e.defaultPrevented||!1===e.returnValue},z(i[e.type],function(n){return n.call(r,e)});try{delete e.preventDefault,delete e.stopPropagation,delete e.isDefaultPrevented}catch(n){e.preventDefault=null,e.stopPropagation=null,e.isDefaultPrevented=null}}).elem=r=t,u=n)),e.split(" ").forEach(function(n){var e=o[n];e||(U(t,n,u),e=o[n]=[]),e[e.length]=f})}),n},parent:function(n){return P(n,"",function(n,e,t){var r=n.parentNode;r&&t(r)})},prepend:function(n){for(var e=[],t=arguments.length-1;0<t--;)e[t]=arguments[t+1];return w(n,e,"prepend",function(n,e){1!==n.nodeType&&11!==n.nodeType&&9!==n.nodeType||n.insertBefore(e,n.firstChild)})},prev:function(n){return P(n,"previousElementSibling",V)},prevAll:function(n){return P(n,"previousElementSibling",k)},prop:I,remove:function(n){return m(n,function(n){var e=n.parentNode;e&&e.removeChild(n)}),n},removeAttr:function(n,e){var t=f(e);return m(n,function(e){t.forEach(function(n){e.removeAttribute(n)})}),n},removeClass:function(n,e){if(!arguments.length)return I(n,"className","");var t=f(e);return m(n,function(n){W(n,t)}),n},removeProp:function(n,e){return m(n,function(n){delete n[a[e]||e]}),n},show:function(n){return M(n,!0)},wrap:function(n){n.wrap=function(i){return i?(x(i,null,function(n){return i=n,!1}),m(function(n,e){var t=i;e&&(t=i.cloneNode(!0));var r=n.parentNode;r&&r.replaceChild(t,n),t.appendChild(n)})):this}}}}); |
import forEach from '../_forEach'; | ||
import isArrayLike from '../../isArrayLike'; | ||
import isString from '../../isString'; | ||
import fragment from './_fragment'; | ||
@@ -8,6 +9,6 @@ | ||
forEach(arr, (content) => { | ||
// NodeElement | ||
if (content && content.nodeType === 1) { | ||
// Node | ||
if (content.nodeType === 1) { | ||
frag.appendChild(content); | ||
} else if (isArrayLike(content)) { | ||
} else if (!isString(content) && isArrayLike(content)) { | ||
forEach(content, (elem) => { | ||
@@ -17,3 +18,3 @@ frag.appendChild(elem); | ||
} else { | ||
fragment(String(content), null, (elem) => { | ||
fragment(content, null, (elem) => { | ||
frag.appendChild(elem); | ||
@@ -43,6 +44,7 @@ }); | ||
if (len) { | ||
for (let i = 0, j = len - 2; i < j; i++) { | ||
const last = len - 1; | ||
for (let i = 0, j = last; i < j; i++) { | ||
fallback(list[i], frag.cloneNode(true)); | ||
} | ||
fallback(list[len - 1], frag); | ||
fallback(list[last], frag); | ||
} else { | ||
@@ -49,0 +51,0 @@ fallback(list, frag); |
@@ -20,3 +20,5 @@ import { | ||
childNodes(testEl, fn); | ||
} else { | ||
fn(document.createTextNode(html)); | ||
} | ||
} |
@@ -25,3 +25,3 @@ import { FORMAT_REGEX } from '../_internal/_date/_dateRegex'; | ||
export default function (date, inputString) { | ||
if (!inputString) { | ||
if (!inputString || inputString === 'UTC') { | ||
return date.toISOString(); | ||
@@ -28,0 +28,0 @@ } |
import classesToArray from '../_internal/_dom/_classesToArray'; | ||
import { classListSupported } from '../_internal/_dom/_domConsts'; | ||
import checkDom from '../_internal/_dom/_checkDom'; | ||
import append from '../_internal/_array/_append'; | ||
@@ -14,3 +15,3 @@ const addClass = classListSupported ? (dom, classes) => { | ||
if (oprClasses.indexOf(cls) === -1) { | ||
oprClasses.append(cls); | ||
append(oprClasses, cls); | ||
} | ||
@@ -17,0 +18,0 @@ }); |
@@ -5,3 +5,3 @@ import domManip from '../_internal/_dom/_domManip'; | ||
* 在node节点之后添加新元素 | ||
* @param {Node|Node} dom | ||
* @param {Node|NodeList} dom | ||
* @param {...any} args | ||
@@ -8,0 +8,0 @@ */ |
@@ -19,2 +19,3 @@ import array from './array.js'; | ||
import isUndefined from './isUndefined.js'; | ||
import sleep from './sleep.js'; | ||
import type from './type.js'; | ||
@@ -40,3 +41,4 @@ export default { | ||
isUndefined, | ||
sleep, | ||
type | ||
}; |
import isNil from './isNil'; | ||
import isFunction from './isFunction'; | ||
import isNumber from './isNumber'; | ||
const isArray = Array.isArray; | ||
export default function (value) { | ||
if (isNil(value) || isFunction(value)) { | ||
return false; | ||
} | ||
const length = value.length; | ||
return isArray(value) || length === 0 || (+length > 0 && (length - 1) in value); | ||
return !isNil(value) && isNumber(value.length) && !isFunction(value); | ||
}; |
{ | ||
"name": "celia", | ||
"version": "3.0.0-beta.1", | ||
"version": "3.0.0-beta.3", | ||
"description": "A modern JavaScript utility library delivering modularity, performance, & extras.", | ||
@@ -48,2 +48,3 @@ "main": "./celia.common.js", | ||
"moment": "^2.24.0", | ||
"pug": "^2.0.3", | ||
"rimraf": "^2.6.3", | ||
@@ -50,0 +51,0 @@ "rollup": "^1.1.2", |
@@ -22,12 +22,7 @@ # celia | ||
<script src="https://cdn.jsdelivr.net/npm/celia/celia.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/celia/date.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/celia/dom.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/celia/array.min.js"></script> | ||
``` | ||
### Load `celia` via AMD (requirejs) | ||
```javascript | ||
define(['celia'], function(corieDate) { | ||
// your code | ||
}); | ||
``` | ||
### CommonJS style with npm | ||
@@ -48,5 +43,12 @@ | ||
import isDate from 'celia/es/isDate'; | ||
import append from 'celia/es/dom/append'; | ||
import add from 'celia/es/date/add'; | ||
import remove from 'celia/es/array/remove'; | ||
// node | ||
const celia = require('celia'); | ||
const { isDate } = celia; | ||
const { append } = celia.dom; | ||
const { add } = celia.date; | ||
const { remove } = celia.array; | ||
@@ -76,2 +78,3 @@ ``` | ||
- isUndefined | ||
- sleep | ||
- type | ||
@@ -78,0 +81,0 @@ - array/append |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
249841
126
7299
137
0
25