express-sweet 1.0.36 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import e from"fs";import a from"path";import express from"express";import crypto from"crypto";import passport from"passport";import{Strategy}from"passport-local";import buffer from"buffer";import tty from"tty";import util$1 from"util";import net from"net";import url from"url";import events from"events";import i from"os";import o from"assert";import sequelize from"sequelize";import{Agent}from"https";import*as AWS from"@aws-sdk/client-rekognition";import{NodeHttpHandler}from"@aws-sdk/node-http-handler";import*as AWS$1 from"@aws-sdk/client-ses";import libmime from"libmime";class Global{static mount(){global.APP_DIR=process.cwd(),process.env.EXPRESS_DEBUG&&console.log("Set global variable APP_DIR")}}function log$2(e){console.log(`[dotenv][DEBUG] ${e}`)}const NEWLINE="\n",RE_INI_KEY_VAL=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,RE_NEWLINES=/\\n/g,NEWLINES_MATCH=/\n|\r|\r\n/;function parse$4(e,t){const n=Boolean(t&&t.debug),i={};return e.toString().split(NEWLINES_MATCH).forEach((function(e,t){const a=e.match(RE_INI_KEY_VAL);if(null!=a){const e=a[1];let t=a[2]||"";const n=t.length-1,s='"'===t[0]&&'"'===t[n];"'"===t[0]&&"'"===t[n]||s?(t=t.substring(1,n),s&&(t=t.replace(RE_NEWLINES,NEWLINE))):t=t.trim(),i[e]=t}else n&&log$2(`did not match key and value when parsing line ${t+1}: ${e}`)})),i}function config(t){let n=a.resolve(process.cwd(),".env"),i="utf8",s=!1;t&&(null!=t.path&&(n=t.path),null!=t.encoding&&(i=t.encoding),null!=t.debug&&(s=!0));try{const t=parse$4(e.readFileSync(n,{encoding:i}),{debug:s});return Object.keys(t).forEach((function(e){Object.prototype.hasOwnProperty.call(process.env,e)?s&&log$2(`"${e}" is already defined in \`process.env\` and will not be overwritten`):process.env[e]=t[e]})),{parsed:t}}catch(e){return{error:e}}}var config_1=config,parse_1$2=parse$4,main={config:config_1,parse:parse_1$2},isArray=e=>"[object Array]"===Object.prototype.toString.call(e),isAsyncFunction=e=>e&&e.constructor&&e.constructor===Object.getPrototypeOf((async function(){})).constructor,isFunction=e=>e&&e.constructor&&(e.constructor===Object.getPrototypeOf((function(){})).constructor||e.constructor===Object.getPrototypeOf((async function(){})).constructor),isObject=e=>null!=e&&"object"==typeof e&&!1===Array.isArray(e),isString=e=>"string"==typeof e&&""!==e,loadAuthenticationConfig=()=>{const t={enabled:!1,session_store:"memory",redis_host:void 0,username:"username",password:"password",success_redirect:"/",failure_redirect:"/login",authenticate_user:(e,t,n)=>new Promise((e=>e(null))),subscribe_user:e=>new Promise((e=>e({}))),allow_unauthenticated:[],expiration:864e5},n=`${process.cwd()}/config/authentication`;if(!e.existsSync(`${n}.js`))return t;const i=Object.assign(t,require(n).default||require(n));if("redis"===i.session_store&&!i.redis_host)throw new TypeError("If the session store is redis, redis_host in the authentication configuration is required");return i},loadBasicConfig=()=>{const t={env_path:void 0,cors_enabled:!1,max_body_size:"100kb",router_dir:a.join(process.cwd(),"routes"),default_router:void 0,rewrite_base_url:e=>e,is_ajax:e=>!!e.xhr,hook_handle_error:void 0},n=`${process.cwd()}/config/config`;return e.existsSync(`${n}.js`)?Object.assign(t,require(n).default||require(n)):t},loadDatabaseConfig=()=>{const t={database:"unkown",username:"unkown",password:void 0,host:"localhost",dialect:"mariadb"},n=`${process.cwd()}/config/database`;if(!e.existsSync(`${n}.js`))return t;const i=process.env.NODE_ENV||"development",a=require(n).default||require(n),s=Object.assign(t,a[i]);return process.env.EXPRESS_DEBUG&&console.log(`Connection DB is ${s.host} ${s.database}`),s},loadViewConfig=()=>{const t={views_dir:a.join(process.cwd(),"views"),partials_dir:a.join(process.cwd(),"views/partials"),layouts_dir:a.join(process.cwd(),"views/layout"),default_layout:a.join(process.cwd(),"views/layout/default.hbs"),extension:".hbs",beforeRender:(e,t)=>{}},n=`${process.cwd()}/config/view`;return e.existsSync(`${n}.js`)?Object.assign(t,require(n).default||require(n)):t},utils={isArray:isArray,isAsyncFunction:isAsyncFunction,isFunction:isFunction,isObject:isObject,isString:isString,loadAuthenticationConfig:loadAuthenticationConfig,loadBasicConfig:loadBasicConfig,loadDatabaseConfig:loadDatabaseConfig,loadViewConfig:loadViewConfig},index$5=Object.freeze({__proto__:null,default:utils});class Environment{static mount(){if(global.loadedEnv)return;const t=utils.loadBasicConfig();if(!t.env_path)return;const n=main.parse(e.readFileSync(t.env_path));for(let e in n)process.env[e]=n[e];global.loadedEnv=!0}}function cacheBusting(t,n){const i=`${a.join(process.cwd(),"public")}/${t.replace(/^\//,"")}`;if(!e.existsSync(i))return t;const s=new Date(e.statSync(i).mtime).getTime();let o="";return n&&n.replace(/\/$/,""),o+=`/${t.replace(/^\//,"")}?${s}`,o}var html=Object.freeze({__proto__:null,cacheBusting:cacheBusting});function jsonStringify(e,t=0){return JSON.stringify(e,null,t)}function jsonParse(e){return JSON.parse(e)}var object=Object.freeze({__proto__:null,jsonStringify:jsonStringify,jsonParse:jsonParse});function replace(e,t,n){return e.replace(t,n)}function split(e,t){return utils.isString(e)?(utils.isString(t)||(t=","),e.split(t)):[]}function formatBytes(e,t=0){let n=0,i="Bytes";if(e&&e>0){const a=1024,s=t<0?0:t,o=Math.floor(Math.log(e)/Math.log(a));i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][o],n=parseFloat((e/Math.pow(a,o)).toFixed(s))}return`${n}${i}`}var string=Object.freeze({__proto__:null,replace:replace,split:split,formatBytes:formatBytes});function eq(e,t){return e===t}function eqw(e,t){return e==t}function neq(e,t){return e!==t}function neqw(e,t){return e!=t}function lt(e,t){return e<t}function lte(e,t){return e<=t}function gt(e,t){return e>t}function gte(e,t){return e>=t}function not(e){return!e}function ifx(e,t,n){return utils.isObject(n)&&"ifx"===n.name&&n.hasOwnProperty("hash")&&(n=""),e?t:n}function empty(e){return"string"==typeof e?e=e.replace(/^[\s ]+|[\s ]+$/g,""):Array.isArray(e)&&0===e.length&&(e=null),!e}function notEmpty(e){return"string"==typeof e?e=e.replace(/^[\s ]+|[\s ]+$/g,""):Array.isArray(e)&&0===e.length&&(e=null),!!e}function count(e){return!!Array.isArray(e)&&e.length}function and(...e){utils.isObject(e[e.length-1])&&e.pop();for(let t of e)if(!t)return!1;return!0}function or(...e){utils.isObject(e[e.length-1])&&e.pop();for(let t of e)if(t)return!0;return!1}function coalesce(...e){utils.isObject(e[e.length-1])&&e.pop();for(let t of e)if(t)return t;return e.pop()}function includes(e,t,n=!0){if(!Array.isArray(e)||0===e.length)return!1;for(let i of e)if(n&&i===t||!n&&i==t)return!0;return!1}function regexMatch(e,t,n){utils.isString(e)||(e=e.toString()),utils.isObject(n)&&(n=void 0);return new RegExp(t,n).test(e)}var comparison=Object.freeze({__proto__:null,eq:eq,eqw:eqw,neq:neq,neqw:neqw,lt:lt,lte:lte,gt:gt,gte:gte,not:not,ifx:ifx,empty:empty,notEmpty:notEmpty,count:count,and:and,or:or,coalesce:coalesce,includes:includes,regexMatch:regexMatch}),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}function getCjsExportFromNamespace(e){return e&&e.default||e}var moment=createCommonjsModule((function(e,t){e.exports=function(){var t,n;function i(){return t.apply(null,arguments)}function a(e){t=e}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(r(e,t))return!1;return!0}function l(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function p(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,i=[],a=e.length;for(n=0;n<a;++n)i.push(t(e[n],n));return i}function h(e,t){for(var n in t)r(t,n)&&(e[n]=t[n]);return r(t,"toString")&&(e.toString=t.toString),r(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,i){return qn(e,t,n,i,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=f()),e._pf}function v(e){if(null==e._isValid){var t=g(e),i=n.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function x(e){var t=m(NaN);return null!=e?h(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),i=n.length>>>0;for(t=0;t<i;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var y=i.momentProperties=[],b=!1;function _(e,t){var n,i,a,s=y.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)l(a=t[i=y[n]])||(e[i]=a);return e}function w(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function k(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function S(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var n=!0;return h((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){var a,s,o,c=[],l=arguments.length;for(s=0;s<l;s++){if(a="","object"==typeof arguments[s]){for(o in a+="\n["+s+"] ",arguments[0])r(arguments[0],o)&&(a+=o+": "+arguments[0][o]+", ");a=a.slice(0,-2)}else a=arguments[s];c.push(a)}S(e+"\nArguments: "+Array.prototype.slice.call(c).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var O,D={};function C(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),D[e]||(S(t),D[e]=!0)}function E(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function T(e){var t,n;for(n in e)r(e,n)&&(E(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function N(e,t){var n,i=h({},e);for(n in t)r(t,n)&&(o(e[n])&&o(t[n])?(i[n]={},h(i[n],e[n]),h(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)r(e,n)&&!r(t,n)&&o(e[n])&&(i[n]=h({},i[n]));return i}function P(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,O=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)r(e,t)&&n.push(t);return n};var j={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Y(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return E(i)?i.call(t,n):i}function A(e,t,n){var i=""+Math.abs(e),a=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+i}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,R=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},F={};function $(e,t,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),e&&(F[e]=a),t&&(F[t[0]]=function(){return A(a.apply(this,arguments),t[1],t[2])}),n&&(F[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function H(e){var t,n,i=e.match(L);for(t=0,n=i.length;t<n;t++)F[i[t]]?i[t]=F[i[t]]:i[t]=U(i[t]);return function(t){var a,s="";for(a=0;a<n;a++)s+=E(i[a])?i[a].call(t,e):i[a];return s}}function W(e,t){return e.isValid()?(t=B(t,e.localeData()),I[t]=I[t]||H(t),I[t](e)):e.localeData().invalidDate()}function B(e,t){var n=5;function i(e){return t.longDateFormat(e)||e}for(R.lastIndex=0;n>=0&&R.test(e);)e=e.replace(R,i),R.lastIndex=0,n-=1;return e}var G={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function V(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(L).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var z="Invalid date";function q(){return this._invalidDate}var Z="%d",Q=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var K={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function X(e,t,n,i){var a=this._relativeTime[n];return E(a)?a(e,t,n,i):a.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return E(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function ie(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function ae(e){var t,n,i={};for(n in e)r(e,n)&&(t=ie(n))&&(i[t]=e[n]);return i}var se={};function oe(e,t){se[e]=t}function re(e){var t,n=[];for(t in e)r(e,t)&&n.push({unit:t,priority:se[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function ce(e){return e%4==0&&e%100!=0||e%400==0}function le(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ue(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=le(t)),n}function pe(e,t){return function(n){return null!=n?(he(this,e,n),i.updateOffset(this,t),this):de(this,e)}}function de(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function he(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ce(e.year())&&1===e.month()&&29===e.date()?(n=ue(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Xe(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function me(e){return E(this[e=ie(e)])?this[e]():this}function fe(e,t){if("object"==typeof e){var n,i=re(e=ae(e)),a=i.length;for(n=0;n<a;n++)this[i[n].unit](e[i[n].unit])}else if(E(this[e=ie(e)]))return this[e](t);return this}var ge,ve=/\d/,xe=/\d\d/,ye=/\d{3}/,be=/\d{4}/,_e=/[+-]?\d{6}/,we=/\d\d?/,ke=/\d\d\d\d?/,Se=/\d\d\d\d\d\d?/,Me=/\d{1,3}/,Oe=/\d{1,4}/,De=/[+-]?\d{1,6}/,Ce=/\d+/,Ee=/[+-]?\d+/,Te=/Z|[+-]\d\d:?\d\d/gi,Ne=/Z|[+-]\d\d(?::?\d\d)?/gi,Pe=/[+-]?\d+(\.\d{1,3})?/,je=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Ye(e,t,n){ge[e]=E(t)?t:function(e,i){return e&&n?n:t}}function Ae(e,t){return r(ge,e)?ge[e](t._strict,t._locale):new RegExp(Le(e))}function Le(e){return Re(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,a){return t||n||i||a})))}function Re(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ge={};var Ie={};function Fe(e,t){var n,i,a=t;for("string"==typeof e&&(e=[e]),u(t)&&(a=function(e,n){n[t]=ue(e)}),i=e.length,n=0;n<i;n++)Ie[e[n]]=a}function $e(e,t){Fe(e,(function(e,n,i,a){i._w=i._w||{},t(e,i._w,i,a)}))}function Ue(e,t,n){null!=t&&r(Ie,e)&&Ie[e](t,n._a,n,e)}var He,We=0,Be=1,Ge=2,Ve=3,ze=4,qe=5,Ze=6,Qe=7,Je=8;function Ke(e,t){return(e%t+t)%t}function Xe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Ke(t,12);return e+=(t-n)/12,1===n?ce(e)?29:28:31-n%7%2}He=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},$("M",["MM",2],"Mo",(function(){return this.month()+1})),$("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),$("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),oe("month",8),Ye("M",we),Ye("MM",we,xe),Ye("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ye("MMMM",(function(e,t){return t.monthsRegex(e)})),Fe(["M","MM"],(function(e,t){t[Be]=ue(e)-1})),Fe(["MMM","MMMM"],(function(e,t,n,i){var a=n._locale.monthsParse(e,i,n._strict);null!=a?t[Be]=a:g(n).invalidMonth=e}));var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it=je,at=je;function st(e,t){return e?s(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:s(this._months)?this._months:this._months.standalone}function ot(e,t){return e?s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function rt(e,t,n){var i,a,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)s=m([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=He.call(this._shortMonthsParse,o))?a:null:-1!==(a=He.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=He.call(this._shortMonthsParse,o))||-1!==(a=He.call(this._longMonthsParse,o))?a:null:-1!==(a=He.call(this._longMonthsParse,o))||-1!==(a=He.call(this._shortMonthsParse,o))?a:null}function ct(e,t,n){var i,a,s;if(this._monthsParseExact)return rt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(a=m([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(s="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}}function lt(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ue(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Xe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ut(e){return null!=e?(lt(this,e),i.updateOffset(this,!0),this):de(this,"Month")}function pt(){return Xe(this.year(),this.month())}function dt(e){return this._monthsParseExact?(r(this,"_monthsRegex")||mt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(r(this,"_monthsShortRegex")||(this._monthsShortRegex=it),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ht(e){return this._monthsParseExact?(r(this,"_monthsRegex")||mt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(r(this,"_monthsRegex")||(this._monthsRegex=at),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function mt(){function e(e,t){return t.length-e.length}var t,n,i=[],a=[],s=[];for(t=0;t<12;t++)n=m([2e3,t]),i.push(this.monthsShort(n,"")),a.push(this.months(n,"")),s.push(this.months(n,"")),s.push(this.monthsShort(n,""));for(i.sort(e),a.sort(e),s.sort(e),t=0;t<12;t++)i[t]=Re(i[t]),a[t]=Re(a[t]);for(t=0;t<24;t++)s[t]=Re(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function ft(e){return ce(e)?366:365}$("Y",0,0,(function(){var e=this.year();return e<=9999?A(e,4):"+"+e})),$(0,["YY",2],0,(function(){return this.year()%100})),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),oe("year",1),Ye("Y",Ee),Ye("YY",we,xe),Ye("YYYY",Oe,be),Ye("YYYYY",De,_e),Ye("YYYYYY",De,_e),Fe(["YYYYY","YYYYYY"],We),Fe("YYYY",(function(e,t){t[We]=2===e.length?i.parseTwoDigitYear(e):ue(e)})),Fe("YY",(function(e,t){t[We]=i.parseTwoDigitYear(e)})),Fe("Y",(function(e,t){t[We]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return ue(e)+(ue(e)>68?1900:2e3)};var gt=pe("FullYear",!0);function vt(){return ce(this.year())}function xt(e,t,n,i,a,s,o){var r;return e<100&&e>=0?(r=new Date(e+400,t,n,i,a,s,o),isFinite(r.getFullYear())&&r.setFullYear(e)):r=new Date(e,t,n,i,a,s,o),r}function yt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,n){var i=7+t-n;return-(7+yt(e,0,i).getUTCDay()-t)%7+i-1}function _t(e,t,n,i,a){var s,o,r=1+7*(t-1)+(7+n-i)%7+bt(e,i,a);return r<=0?o=ft(s=e-1)+r:r>ft(e)?(s=e+1,o=r-ft(e)):(s=e,o=r),{year:s,dayOfYear:o}}function wt(e,t,n){var i,a,s=bt(e.year(),t,n),o=Math.floor((e.dayOfYear()-s-1)/7)+1;return o<1?i=o+kt(a=e.year()-1,t,n):o>kt(e.year(),t,n)?(i=o-kt(e.year(),t,n),a=e.year()+1):(a=e.year(),i=o),{week:i,year:a}}function kt(e,t,n){var i=bt(e,t,n),a=bt(e+1,t,n);return(ft(e)-i+a)/7}function St(e){return wt(e,this._week.dow,this._week.doy).week}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),oe("week",5),oe("isoWeek",5),Ye("w",we),Ye("ww",we,xe),Ye("W",we),Ye("WW",we,xe),$e(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=ue(e)}));var Mt={dow:0,doy:6};function Ot(){return this._week.dow}function Dt(){return this._week.doy}function Ct(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Et(e){var t=wt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Tt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Nt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pt(e,t){return e.slice(t,7).concat(e.slice(0,t))}$("d",0,"do","day"),$("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),$("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),$("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),oe("day",11),oe("weekday",11),oe("isoWeekday",11),Ye("d",we),Ye("e",we),Ye("E",we),Ye("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ye("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ye("dddd",(function(e,t){return t.weekdaysRegex(e)})),$e(["dd","ddd","dddd"],(function(e,t,n,i){var a=n._locale.weekdaysParse(e,i,n._strict);null!=a?t.d=a:g(n).invalidWeekday=e})),$e(["d","e","E"],(function(e,t,n,i){t[i]=ue(e)}));var jt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Yt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),At="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Lt=je,Rt=je,It=je;function Ft(e,t){var n=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Pt(n,this._week.dow):e?n[e.day()]:n}function $t(e){return!0===e?Pt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ut(e){return!0===e?Pt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ht(e,t,n){var i,a,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)s=m([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=He.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=He.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=He.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=He.call(this._weekdaysParse,o))||-1!==(a=He.call(this._shortWeekdaysParse,o))||-1!==(a=He.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=He.call(this._shortWeekdaysParse,o))||-1!==(a=He.call(this._weekdaysParse,o))||-1!==(a=He.call(this._minWeekdaysParse,o))?a:null:-1!==(a=He.call(this._minWeekdaysParse,o))||-1!==(a=He.call(this._weekdaysParse,o))||-1!==(a=He.call(this._shortWeekdaysParse,o))?a:null}function Wt(e,t,n){var i,a,s;if(this._weekdaysParseExact)return Ht.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(a=m([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(s="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function Bt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Tt(e,this.localeData()),this.add(e-t,"d")):t}function Gt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Vt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Nt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function zt(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(r(this,"_weekdaysRegex")||(this._weekdaysRegex=Lt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(r(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Rt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Zt(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(r(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=It),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,n,i,a,s,o=[],r=[],c=[],l=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),i=Re(this.weekdaysMin(n,"")),a=Re(this.weekdaysShort(n,"")),s=Re(this.weekdays(n,"")),o.push(i),r.push(a),c.push(s),l.push(i),l.push(a),l.push(s);o.sort(e),r.sort(e),c.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Jt(){return this.hours()%12||12}function Kt(){return this.hours()||24}function Xt(e,t){$(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Jt),$("k",["kk",2],0,Kt),$("hmm",0,0,(function(){return""+Jt.apply(this)+A(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+Jt.apply(this)+A(this.minutes(),2)+A(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+A(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+A(this.minutes(),2)+A(this.seconds(),2)})),Xt("a",!0),Xt("A",!1),ne("hour","h"),oe("hour",13),Ye("a",en),Ye("A",en),Ye("H",we),Ye("h",we),Ye("k",we),Ye("HH",we,xe),Ye("hh",we,xe),Ye("kk",we,xe),Ye("hmm",ke),Ye("hmmss",Se),Ye("Hmm",ke),Ye("Hmmss",Se),Fe(["H","HH"],Ve),Fe(["k","kk"],(function(e,t,n){var i=ue(e);t[Ve]=24===i?0:i})),Fe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Fe(["h","hh"],(function(e,t,n){t[Ve]=ue(e),g(n).bigHour=!0})),Fe("hmm",(function(e,t,n){var i=e.length-2;t[Ve]=ue(e.substr(0,i)),t[ze]=ue(e.substr(i)),g(n).bigHour=!0})),Fe("hmmss",(function(e,t,n){var i=e.length-4,a=e.length-2;t[Ve]=ue(e.substr(0,i)),t[ze]=ue(e.substr(i,2)),t[qe]=ue(e.substr(a)),g(n).bigHour=!0})),Fe("Hmm",(function(e,t,n){var i=e.length-2;t[Ve]=ue(e.substr(0,i)),t[ze]=ue(e.substr(i))})),Fe("Hmmss",(function(e,t,n){var i=e.length-4,a=e.length-2;t[Ve]=ue(e.substr(0,i)),t[ze]=ue(e.substr(i,2)),t[qe]=ue(e.substr(a))}));var nn=/[ap]\.?m?\.?/i,an=pe("Hours",!0);function sn(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var on,rn={calendar:j,longDateFormat:G,invalidDate:z,ordinal:Z,dayOfMonthOrdinalParse:Q,relativeTime:K,months:et,monthsShort:tt,week:Mt,weekdays:jt,weekdaysMin:At,weekdaysShort:Yt,meridiemParse:nn},cn={},ln={};function un(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}function pn(e){return e?e.toLowerCase().replace("_","-"):e}function dn(e){for(var t,n,i,a,s=0;s<e.length;){for(t=(a=pn(e[s]).split("-")).length,n=(n=pn(e[s+1]))?n.split("-"):null;t>0;){if(i=mn(a.slice(0,t).join("-")))return i;if(n&&n.length>=t&&un(a,n)>=t-1)break;t--}s++}return on}function hn(e){return null!=e.match("^[^/\\\\]*$")}function mn(t){var n=null;if(void 0===cn[t]&&e&&e.exports&&hn(t))try{n=on._abbr,commonjsRequire("./locale/"+t),fn(n)}catch(e){cn[t]=null}return cn[t]}function fn(e,t){var n;return e&&((n=l(t)?xn(e):gn(e,t))?on=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),on._abbr}function gn(e,t){if(null!==t){var n,i=rn;if(t.abbr=e,null!=cn[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=cn[e]._config;else if(null!=t.parentLocale)if(null!=cn[t.parentLocale])i=cn[t.parentLocale]._config;else{if(null==(n=mn(t.parentLocale)))return ln[t.parentLocale]||(ln[t.parentLocale]=[]),ln[t.parentLocale].push({name:e,config:t}),null;i=n._config}return cn[e]=new P(N(i,t)),ln[e]&&ln[e].forEach((function(e){gn(e.name,e.config)})),fn(e),cn[e]}return delete cn[e],null}function vn(e,t){if(null!=t){var n,i,a=rn;null!=cn[e]&&null!=cn[e].parentLocale?cn[e].set(N(cn[e]._config,t)):(null!=(i=mn(e))&&(a=i._config),t=N(a,t),null==i&&(t.abbr=e),(n=new P(t)).parentLocale=cn[e],cn[e]=n),fn(e)}else null!=cn[e]&&(null!=cn[e].parentLocale?(cn[e]=cn[e].parentLocale,e===fn()&&fn(e)):null!=cn[e]&&delete cn[e]);return cn[e]}function xn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return on;if(!s(e)){if(t=mn(e))return t;e=[e]}return dn(e)}function yn(){return O(cn)}function bn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Be]<0||n[Be]>11?Be:n[Ge]<1||n[Ge]>Xe(n[We],n[Be])?Ge:n[Ve]<0||n[Ve]>24||24===n[Ve]&&(0!==n[ze]||0!==n[qe]||0!==n[Ze])?Ve:n[ze]<0||n[ze]>59?ze:n[qe]<0||n[qe]>59?qe:n[Ze]<0||n[Ze]>999?Ze:-1,g(e)._overflowDayOfYear&&(t<We||t>Ge)&&(t=Ge),g(e)._overflowWeeks&&-1===t&&(t=Qe),g(e)._overflowWeekday&&-1===t&&(t=Je),g(e).overflow=t),e}var _n=/^\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+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/^\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+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kn=/Z|[+-]\d\d(?::?\d\d)?/,Sn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Mn=[["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/]],On=/^\/?Date\((-?\d+)/i,Dn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Cn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function En(e){var t,n,i,a,s,o,r=e._i,c=_n.exec(r)||wn.exec(r),l=Sn.length,u=Mn.length;if(c){for(g(e).iso=!0,t=0,n=l;t<n;t++)if(Sn[t][1].exec(c[1])){a=Sn[t][0],i=!1!==Sn[t][2];break}if(null==a)return void(e._isValid=!1);if(c[3]){for(t=0,n=u;t<n;t++)if(Mn[t][1].exec(c[3])){s=(c[2]||" ")+Mn[t][0];break}if(null==s)return void(e._isValid=!1)}if(!i&&null!=s)return void(e._isValid=!1);if(c[4]){if(!kn.exec(c[4]))return void(e._isValid=!1);o="Z"}e._f=a+(s||"")+(o||""),Un(e)}else e._isValid=!1}function Tn(e,t,n,i,a,s){var o=[Nn(e),tt.indexOf(t),parseInt(n,10),parseInt(i,10),parseInt(a,10)];return s&&o.push(parseInt(s,10)),o}function Nn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Pn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function jn(e,t,n){return!e||Yt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Yn(e,t,n){if(e)return Cn[e];if(t)return 0;var i=parseInt(n,10),a=i%100;return(i-a)/100*60+a}function An(e){var t,n=Dn.exec(Pn(e._i));if(n){if(t=Tn(n[4],n[3],n[2],n[5],n[6],n[7]),!jn(n[1],t,e))return;e._a=t,e._tzm=Yn(n[8],n[9],n[10]),e._d=yt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Ln(e){var t=On.exec(e._i);null===t?(En(e),!1===e._isValid&&(delete e._isValid,An(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:i.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Rn(e,t,n){return null!=e?e:null!=t?t:n}function In(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Fn(e){var t,n,i,a,s,o=[];if(!e._d){for(i=In(e),e._w&&null==e._a[Ge]&&null==e._a[Be]&&$n(e),null!=e._dayOfYear&&(s=Rn(e._a[We],i[We]),(e._dayOfYear>ft(s)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=yt(s,0,e._dayOfYear),e._a[Be]=n.getUTCMonth(),e._a[Ge]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ve]&&0===e._a[ze]&&0===e._a[qe]&&0===e._a[Ze]&&(e._nextDay=!0,e._a[Ve]=0),e._d=(e._useUTC?yt:xt).apply(null,o),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(g(e).weekdayMismatch=!0)}}function $n(e){var t,n,i,a,s,o,r,c,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,o=4,n=Rn(t.GG,e._a[We],wt(Zn(),1,4).year),i=Rn(t.W,1),((a=Rn(t.E,1))<1||a>7)&&(c=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,l=wt(Zn(),s,o),n=Rn(t.gg,e._a[We],l.year),i=Rn(t.w,l.week),null!=t.d?((a=t.d)<0||a>6)&&(c=!0):null!=t.e?(a=t.e+s,(t.e<0||t.e>6)&&(c=!0)):a=s),i<1||i>kt(n,s,o)?g(e)._overflowWeeks=!0:null!=c?g(e)._overflowWeekday=!0:(r=_t(n,i,a,s,o),e._a[We]=r.year,e._dayOfYear=r.dayOfYear)}function Un(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],g(e).empty=!0;var t,n,a,s,o,r,c,l=""+e._i,u=l.length,p=0;for(c=(a=B(e._f,e._locale).match(L)||[]).length,t=0;t<c;t++)s=a[t],(n=(l.match(Ae(s,e))||[])[0])&&((o=l.substr(0,l.indexOf(n))).length>0&&g(e).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),p+=n.length),F[s]?(n?g(e).empty=!1:g(e).unusedTokens.push(s),Ue(s,n,e)):e._strict&&!n&&g(e).unusedTokens.push(s);g(e).charsLeftOver=u-p,l.length>0&&g(e).unusedInput.push(l),e._a[Ve]<=12&&!0===g(e).bigHour&&e._a[Ve]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Ve]=Hn(e._locale,e._a[Ve],e._meridiem),null!==(r=g(e).era)&&(e._a[We]=e._locale.erasConvertYear(r,e._a[We])),Fn(e),bn(e)}else An(e);else En(e)}function Hn(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function Wn(e){var t,n,i,a,s,o,r=!1,c=e._f.length;if(0===c)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<c;a++)s=0,o=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],Un(t),v(t)&&(o=!0),s+=g(t).charsLeftOver,s+=10*g(t).unusedTokens.length,g(t).score=s,r?s<i&&(i=s,n=t):(null==i||s<i||o)&&(i=s,n=t,o&&(r=!0));h(e,n||t)}function Bn(e){if(!e._d){var t=ae(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Fn(e)}}function Gn(e){var t=new w(bn(Vn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Vn(e){var t=e._i,n=e._f;return e._locale=e._locale||xn(e._l),null===t||void 0===n&&""===t?x({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new w(bn(t)):(p(t)?e._d=t:s(n)?Wn(e):n?Un(e):zn(e),v(e)||(e._d=null),e))}function zn(e){var t=e._i;l(t)?e._d=new Date(i.now()):p(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Ln(e):s(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),Fn(e)):o(t)?Bn(e):u(t)?e._d=new Date(t):i.createFromInputFallback(e)}function qn(e,t,n,i,a){var r={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(o(e)&&c(e)||s(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=a,r._l=n,r._i=e,r._f=t,r._strict=i,Gn(r)}function Zn(e,t,n,i){return qn(e,t,n,i,!1)}i.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Qn=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:x()})),Jn=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:x()}));function Kn(e,t){var n,i;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return Zn();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}function Xn(){return Kn("isBefore",[].slice.call(arguments,0))}function ei(){return Kn("isAfter",[].slice.call(arguments,0))}var ti=function(){return Date.now?Date.now():+new Date},ni=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ii(e){var t,n,i=!1,a=ni.length;for(t in e)if(r(e,t)&&(-1===He.call(ni,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<a;++n)if(e[ni[n]]){if(i)return!1;parseFloat(e[ni[n]])!==ue(e[ni[n]])&&(i=!0)}return!0}function ai(){return this._isValid}function si(){return Ci(NaN)}function oi(e){var t=ae(e),n=t.year||0,i=t.quarter||0,a=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,r=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=ii(t),this._milliseconds=+u+1e3*l+6e4*c+1e3*r*60*60,this._days=+o+7*s,this._months=+a+3*i+12*n,this._data={},this._locale=xn(),this._bubble()}function ri(e){return e instanceof oi}function ci(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function li(e,t,n){var i,a=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0;for(i=0;i<a;i++)(n&&e[i]!==t[i]||!n&&ue(e[i])!==ue(t[i]))&&o++;return o+s}function ui(e,t){$(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+A(~~(e/60),2)+t+A(~~e%60,2)}))}ui("Z",":"),ui("ZZ",""),Ye("Z",Ne),Ye("ZZ",Ne),Fe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=di(Ne,e)}));var pi=/([\+\-]|\d\d)/gi;function di(e,t){var n,i,a=(t||"").match(e);return null===a?null:0===(i=60*(n=((a[a.length-1]||[])+"").match(pi)||["-",0,0])[1]+ue(n[2]))?0:"+"===n[0]?i:-i}function hi(e,t){var n,a;return t._isUTC?(n=t.clone(),a=(k(e)||p(e)?e.valueOf():Zn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),i.updateOffset(n,!1),n):Zn(e).local()}function mi(e){return-Math.round(e._d.getTimezoneOffset())}function fi(e,t,n){var a,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=di(Ne,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=mi(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),s!==e&&(!t||this._changeInProgress?ji(this,Ci(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:mi(this)}function gi(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vi(e){return this.utcOffset(0,e)}function xi(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mi(this),"m")),this}function yi(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=di(Te,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function bi(e){return!!this.isValid()&&(e=e?Zn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function _i(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wi(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Vn(t))._a?(e=t._isUTC?m(t._a):Zn(t._a),this._isDSTShifted=this.isValid()&&li(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ki(){return!!this.isValid()&&!this._isUTC}function Si(){return!!this.isValid()&&this._isUTC}function Mi(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Oi=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Di=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ci(e,t){var n,i,a,s=e,o=null;return ri(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(o=Oi.exec(e))?(n="-"===o[1]?-1:1,s={y:0,d:ue(o[Ge])*n,h:ue(o[Ve])*n,m:ue(o[ze])*n,s:ue(o[qe])*n,ms:ue(ci(1e3*o[Ze]))*n}):(o=Di.exec(e))?(n="-"===o[1]?-1:1,s={y:Ei(o[2],n),M:Ei(o[3],n),w:Ei(o[4],n),d:Ei(o[5],n),h:Ei(o[6],n),m:Ei(o[7],n),s:Ei(o[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(a=Ni(Zn(s.from),Zn(s.to)),(s={}).ms=a.milliseconds,s.M=a.months),i=new oi(s),ri(e)&&r(e,"_locale")&&(i._locale=e._locale),ri(e)&&r(e,"_isValid")&&(i._isValid=e._isValid),i}function Ei(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ti(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ni(e,t){var n;return e.isValid()&&t.isValid()?(t=hi(t,e),e.isBefore(t)?n=Ti(e,t):((n=Ti(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Pi(e,t){return function(n,i){var a;return null===i||isNaN(+i)||(C(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=i,i=a),ji(this,Ci(n,i),e),this}}function ji(e,t,n,a){var s=t._milliseconds,o=ci(t._days),r=ci(t._months);e.isValid()&&(a=null==a||a,r&&lt(e,de(e,"Month")+r*n),o&&he(e,"Date",de(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),a&&i.updateOffset(e,o||r))}Ci.fn=oi.prototype,Ci.invalid=si;var Yi=Pi(1,"add"),Ai=Pi(-1,"subtract");function Li(e){return"string"==typeof e||e instanceof String}function Ri(e){return k(e)||p(e)||Li(e)||u(e)||Fi(e)||Ii(e)||null==e}function Ii(e){var t,n,i=o(e)&&!c(e),a=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=s.length;for(t=0;t<l;t+=1)n=s[t],a=a||r(e,n);return i&&a}function Fi(e){var t=s(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Li(e)})).length),t&&n}function $i(e){var t,n,i=o(e)&&!c(e),a=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<s.length;t+=1)n=s[t],a=a||r(e,n);return i&&a}function Ui(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Hi(e,t){1===arguments.length&&(arguments[0]?Ri(arguments[0])?(e=arguments[0],t=void 0):$i(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Zn(),a=hi(n,this).startOf("day"),s=i.calendarFormat(this,a)||"sameElse",o=t&&(E(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,Zn(n)))}function Wi(){return new w(this)}function Bi(e,t){var n=k(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ie(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Gi(e,t){var n=k(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ie(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Vi(e,t,n,i){var a=k(e)?e:Zn(e),s=k(t)?t:Zn(t);return!!(this.isValid()&&a.isValid()&&s.isValid())&&("("===(i=i||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===i[1]?this.isBefore(s,n):!this.isAfter(s,n))}function zi(e,t){var n,i=k(e)?e:Zn(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=ie(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function qi(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Zi(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qi(e,t,n){var i,a,s;if(!this.isValid())return NaN;if(!(i=hi(e,this)).isValid())return NaN;switch(a=6e4*(i.utcOffset()-this.utcOffset()),t=ie(t)){case"year":s=Ji(this,i)/12;break;case"month":s=Ji(this,i);break;case"quarter":s=Ji(this,i)/3;break;case"second":s=(this-i)/1e3;break;case"minute":s=(this-i)/6e4;break;case"hour":s=(this-i)/36e5;break;case"day":s=(this-i-a)/864e5;break;case"week":s=(this-i-a)/6048e5;break;default:s=this-i}return n?s:le(s)}function Ji(e,t){if(e.date()<t.date())return-Ji(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,"months");return-(n+(t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i)))||0}function Ki(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Xi(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?W(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ea(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i,a="moment",s="";return this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+a+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",i=s+'[")]',this.format(e+t+n+i)}function ta(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)}function na(e,t){return this.isValid()&&(k(e)&&e.isValid()||Zn(e).isValid())?Ci({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ia(e){return this.from(Zn(),e)}function aa(e,t){return this.isValid()&&(k(e)&&e.isValid()||Zn(e).isValid())?Ci({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function sa(e){return this.to(Zn(),e)}function oa(e){var t;return void 0===e?this._locale._abbr:(null!=(t=xn(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ra=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ca(){return this._locale}var la=1e3,ua=60*la,pa=60*ua,da=3506328*pa;function ha(e,t){return(e%t+t)%t}function ma(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-da:new Date(e,t,n).valueOf()}function fa(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-da:Date.UTC(e,t,n)}function ga(e){var t,n;if(void 0===(e=ie(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fa:ma,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ha(t+(this._isUTC?0:this.utcOffset()*ua),pa);break;case"minute":t=this._d.valueOf(),t-=ha(t,ua);break;case"second":t=this._d.valueOf(),t-=ha(t,la)}return this._d.setTime(t),i.updateOffset(this,!0),this}function va(e){var t,n;if(void 0===(e=ie(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fa:ma,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=pa-ha(t+(this._isUTC?0:this.utcOffset()*ua),pa)-1;break;case"minute":t=this._d.valueOf(),t+=ua-ha(t,ua)-1;break;case"second":t=this._d.valueOf(),t+=la-ha(t,la)-1}return this._d.setTime(t),i.updateOffset(this,!0),this}function xa(){return this._d.valueOf()-6e4*(this._offset||0)}function ya(){return Math.floor(this.valueOf()/1e3)}function ba(){return new Date(this.valueOf())}function _a(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wa(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ka(){return this.isValid()?this.toISOString():null}function Sa(){return v(this)}function Ma(){return h({},g(this))}function Oa(){return g(this).overflow}function Da(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ca(e,t){var n,a,s,o=this._eras||xn("en")._eras;for(n=0,a=o.length;n<a;++n)switch("string"==typeof o[n].since&&(s=i(o[n].since).startOf("day"),o[n].since=s.valueOf()),typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=i(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf()}return o}function Ea(e,t,n){var i,a,s,o,r,c=this.eras();for(e=e.toUpperCase(),i=0,a=c.length;i<a;++i)if(s=c[i].name.toUpperCase(),o=c[i].abbr.toUpperCase(),r=c[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return c[i];break;case"NNNN":if(s===e)return c[i];break;case"NNNNN":if(r===e)return c[i]}else if([s,o,r].indexOf(e)>=0)return c[i]}function Ta(e,t){var n=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*n}function Na(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].name;if(i[e].until<=n&&n<=i[e].since)return i[e].name}return""}function Pa(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].narrow;if(i[e].until<=n&&n<=i[e].since)return i[e].narrow}return""}function ja(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].abbr;if(i[e].until<=n&&n<=i[e].since)return i[e].abbr}return""}function Ya(){var e,t,n,a,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,a=this.clone().startOf("day").valueOf(),s[e].since<=a&&a<=s[e].until||s[e].until<=a&&a<=s[e].since)return(this.year()-i(s[e].since).year())*n+s[e].offset;return this.year()}function Aa(e){return r(this,"_erasNameRegex")||Ha.call(this),e?this._erasNameRegex:this._erasRegex}function La(e){return r(this,"_erasAbbrRegex")||Ha.call(this),e?this._erasAbbrRegex:this._erasRegex}function Ra(e){return r(this,"_erasNarrowRegex")||Ha.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ia(e,t){return t.erasAbbrRegex(e)}function Fa(e,t){return t.erasNameRegex(e)}function $a(e,t){return t.erasNarrowRegex(e)}function Ua(e,t){return t._eraYearOrdinalRegex||Ce}function Ha(){var e,t,n=[],i=[],a=[],s=[],o=this.eras();for(e=0,t=o.length;e<t;++e)i.push(Re(o[e].name)),n.push(Re(o[e].abbr)),a.push(Re(o[e].narrow)),s.push(Re(o[e].name)),s.push(Re(o[e].abbr)),s.push(Re(o[e].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function Wa(e,t){$(0,[e,e.length],0,t)}function Ba(e){return Qa.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ga(e){return Qa.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Va(){return kt(this.year(),1,4)}function za(){return kt(this.isoWeekYear(),1,4)}function qa(){var e=this.localeData()._week;return kt(this.year(),e.dow,e.doy)}function Za(){var e=this.localeData()._week;return kt(this.weekYear(),e.dow,e.doy)}function Qa(e,t,n,i,a){var s;return null==e?wt(this,i,a).year:(t>(s=kt(e,i,a))&&(t=s),Ja.call(this,e,t,n,i,a))}function Ja(e,t,n,i,a){var s=_t(e,t,n,i,a),o=yt(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Ka(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}$("N",0,0,"eraAbbr"),$("NN",0,0,"eraAbbr"),$("NNN",0,0,"eraAbbr"),$("NNNN",0,0,"eraName"),$("NNNNN",0,0,"eraNarrow"),$("y",["y",1],"yo","eraYear"),$("y",["yy",2],0,"eraYear"),$("y",["yyy",3],0,"eraYear"),$("y",["yyyy",4],0,"eraYear"),Ye("N",Ia),Ye("NN",Ia),Ye("NNN",Ia),Ye("NNNN",Fa),Ye("NNNNN",$a),Fe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var a=n._locale.erasParse(e,i,n._strict);a?g(n).era=a:g(n).invalidEra=e})),Ye("y",Ce),Ye("yy",Ce),Ye("yyy",Ce),Ye("yyyy",Ce),Ye("yo",Ua),Fe(["y","yy","yyy","yyyy"],We),Fe(["yo"],(function(e,t,n,i){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[We]=n._locale.eraYearOrdinalParse(e,a):t[We]=parseInt(e,10)})),$(0,["gg",2],0,(function(){return this.weekYear()%100})),$(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Wa("gggg","weekYear"),Wa("ggggg","weekYear"),Wa("GGGG","isoWeekYear"),Wa("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),oe("weekYear",1),oe("isoWeekYear",1),Ye("G",Ee),Ye("g",Ee),Ye("GG",we,xe),Ye("gg",we,xe),Ye("GGGG",Oe,be),Ye("gggg",Oe,be),Ye("GGGGG",De,_e),Ye("ggggg",De,_e),$e(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=ue(e)})),$e(["gg","GG"],(function(e,t,n,a){t[a]=i.parseTwoDigitYear(e)})),$("Q",0,"Qo","quarter"),ne("quarter","Q"),oe("quarter",7),Ye("Q",ve),Fe("Q",(function(e,t){t[Be]=3*(ue(e)-1)})),$("D",["DD",2],"Do","date"),ne("date","D"),oe("date",9),Ye("D",we),Ye("DD",we,xe),Ye("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Fe(["D","DD"],Ge),Fe("Do",(function(e,t){t[Ge]=ue(e.match(we)[0])}));var Xa=pe("Date",!0);function es(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}$("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),oe("dayOfYear",4),Ye("DDD",Me),Ye("DDDD",ye),Fe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ue(e)})),$("m",["mm",2],0,"minute"),ne("minute","m"),oe("minute",14),Ye("m",we),Ye("mm",we,xe),Fe(["m","mm"],ze);var ts=pe("Minutes",!1);$("s",["ss",2],0,"second"),ne("second","s"),oe("second",15),Ye("s",we),Ye("ss",we,xe),Fe(["s","ss"],qe);var ns,is,as=pe("Seconds",!1);for($("S",0,0,(function(){return~~(this.millisecond()/100)})),$(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),$(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),$(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),$(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),$(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),$(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),oe("millisecond",16),Ye("S",Me,ve),Ye("SS",Me,xe),Ye("SSS",Me,ye),ns="SSSS";ns.length<=9;ns+="S")Ye(ns,Ce);function ss(e,t){t[Ze]=ue(1e3*("0."+e))}for(ns="S";ns.length<=9;ns+="S")Fe(ns,ss);function os(){return this._isUTC?"UTC":""}function rs(){return this._isUTC?"Coordinated Universal Time":""}is=pe("Milliseconds",!1),$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var cs=w.prototype;function ls(e){return Zn(1e3*e)}function us(){return Zn.apply(null,arguments).parseZone()}function ps(e){return e}cs.add=Yi,cs.calendar=Hi,cs.clone=Wi,cs.diff=Qi,cs.endOf=va,cs.format=ta,cs.from=na,cs.fromNow=ia,cs.to=aa,cs.toNow=sa,cs.get=me,cs.invalidAt=Oa,cs.isAfter=Bi,cs.isBefore=Gi,cs.isBetween=Vi,cs.isSame=zi,cs.isSameOrAfter=qi,cs.isSameOrBefore=Zi,cs.isValid=Sa,cs.lang=ra,cs.locale=oa,cs.localeData=ca,cs.max=Jn,cs.min=Qn,cs.parsingFlags=Ma,cs.set=fe,cs.startOf=ga,cs.subtract=Ai,cs.toArray=_a,cs.toObject=wa,cs.toDate=ba,cs.toISOString=Xi,cs.inspect=ea,"undefined"!=typeof Symbol&&null!=Symbol.for&&(cs[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),cs.toJSON=ka,cs.toString=Ki,cs.unix=ya,cs.valueOf=xa,cs.creationData=Da,cs.eraName=Na,cs.eraNarrow=Pa,cs.eraAbbr=ja,cs.eraYear=Ya,cs.year=gt,cs.isLeapYear=vt,cs.weekYear=Ba,cs.isoWeekYear=Ga,cs.quarter=cs.quarters=Ka,cs.month=ut,cs.daysInMonth=pt,cs.week=cs.weeks=Ct,cs.isoWeek=cs.isoWeeks=Et,cs.weeksInYear=qa,cs.weeksInWeekYear=Za,cs.isoWeeksInYear=Va,cs.isoWeeksInISOWeekYear=za,cs.date=Xa,cs.day=cs.days=Bt,cs.weekday=Gt,cs.isoWeekday=Vt,cs.dayOfYear=es,cs.hour=cs.hours=an,cs.minute=cs.minutes=ts,cs.second=cs.seconds=as,cs.millisecond=cs.milliseconds=is,cs.utcOffset=fi,cs.utc=vi,cs.local=xi,cs.parseZone=yi,cs.hasAlignedHourOffset=bi,cs.isDST=_i,cs.isLocal=ki,cs.isUtcOffset=Si,cs.isUtc=Mi,cs.isUTC=Mi,cs.zoneAbbr=os,cs.zoneName=rs,cs.dates=M("dates accessor is deprecated. Use date instead.",Xa),cs.months=M("months accessor is deprecated. Use month instead",ut),cs.years=M("years accessor is deprecated. Use year instead",gt),cs.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gi),cs.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wi);var ds=P.prototype;function hs(e,t,n,i){var a=xn(),s=m().set(i,t);return a[n](s,e)}function ms(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return hs(e,t,n,"month");var i,a=[];for(i=0;i<12;i++)a[i]=hs(e,i,n,"month");return a}function fs(e,t,n,i){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var a,s=xn(),o=e?s._week.dow:0,r=[];if(null!=n)return hs(t,(n+o)%7,i,"day");for(a=0;a<7;a++)r[a]=hs(t,(a+o)%7,i,"day");return r}function gs(e,t){return ms(e,t,"months")}function vs(e,t){return ms(e,t,"monthsShort")}function xs(e,t,n){return fs(e,t,n,"weekdays")}function ys(e,t,n){return fs(e,t,n,"weekdaysShort")}function bs(e,t,n){return fs(e,t,n,"weekdaysMin")}ds.calendar=Y,ds.longDateFormat=V,ds.invalidDate=q,ds.ordinal=J,ds.preparse=ps,ds.postformat=ps,ds.relativeTime=X,ds.pastFuture=ee,ds.set=T,ds.eras=Ca,ds.erasParse=Ea,ds.erasConvertYear=Ta,ds.erasAbbrRegex=La,ds.erasNameRegex=Aa,ds.erasNarrowRegex=Ra,ds.months=st,ds.monthsShort=ot,ds.monthsParse=ct,ds.monthsRegex=ht,ds.monthsShortRegex=dt,ds.week=St,ds.firstDayOfYear=Dt,ds.firstDayOfWeek=Ot,ds.weekdays=Ft,ds.weekdaysMin=Ut,ds.weekdaysShort=$t,ds.weekdaysParse=Wt,ds.weekdaysRegex=zt,ds.weekdaysShortRegex=qt,ds.weekdaysMinRegex=Zt,ds.isPM=tn,ds.meridiem=sn,fn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ue(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=M("moment.lang is deprecated. Use moment.locale instead.",fn),i.langData=M("moment.langData is deprecated. Use moment.localeData instead.",xn);var _s=Math.abs;function ws(){var e=this._data;return this._milliseconds=_s(this._milliseconds),this._days=_s(this._days),this._months=_s(this._months),e.milliseconds=_s(e.milliseconds),e.seconds=_s(e.seconds),e.minutes=_s(e.minutes),e.hours=_s(e.hours),e.months=_s(e.months),e.years=_s(e.years),this}function ks(e,t,n,i){var a=Ci(t,n);return e._milliseconds+=i*a._milliseconds,e._days+=i*a._days,e._months+=i*a._months,e._bubble()}function Ss(e,t){return ks(this,e,t,1)}function Ms(e,t){return ks(this,e,t,-1)}function Os(e){return e<0?Math.floor(e):Math.ceil(e)}function Ds(){var e,t,n,i,a,s=this._milliseconds,o=this._days,r=this._months,c=this._data;return s>=0&&o>=0&&r>=0||s<=0&&o<=0&&r<=0||(s+=864e5*Os(Es(r)+o),o=0,r=0),c.milliseconds=s%1e3,e=le(s/1e3),c.seconds=e%60,t=le(e/60),c.minutes=t%60,n=le(t/60),c.hours=n%24,o+=le(n/24),r+=a=le(Cs(o)),o-=Os(Es(a)),i=le(r/12),r%=12,c.days=o,c.months=r,c.years=i,this}function Cs(e){return 4800*e/146097}function Es(e){return 146097*e/4800}function Ts(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=ie(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+Cs(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Es(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function Ns(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ue(this._months/12):NaN}function Ps(e){return function(){return this.as(e)}}var js=Ps("ms"),Ys=Ps("s"),As=Ps("m"),Ls=Ps("h"),Rs=Ps("d"),Is=Ps("w"),Fs=Ps("M"),$s=Ps("Q"),Us=Ps("y");function Hs(){return Ci(this)}function Ws(e){return e=ie(e),this.isValid()?this[e+"s"]():NaN}function Bs(e){return function(){return this.isValid()?this._data[e]:NaN}}var Gs=Bs("milliseconds"),Vs=Bs("seconds"),zs=Bs("minutes"),qs=Bs("hours"),Zs=Bs("days"),Qs=Bs("months"),Js=Bs("years");function Ks(){return le(this.days()/7)}var Xs=Math.round,eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function to(e,t,n,i,a){return a.relativeTime(t||1,!!n,e,i)}function no(e,t,n,i){var a=Ci(e).abs(),s=Xs(a.as("s")),o=Xs(a.as("m")),r=Xs(a.as("h")),c=Xs(a.as("d")),l=Xs(a.as("M")),u=Xs(a.as("w")),p=Xs(a.as("y")),d=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||r<=1&&["h"]||r<n.h&&["hh",r]||c<=1&&["d"]||c<n.d&&["dd",c];return null!=n.w&&(d=d||u<=1&&["w"]||u<n.w&&["ww",u]),(d=d||l<=1&&["M"]||l<n.M&&["MM",l]||p<=1&&["y"]||["yy",p])[2]=t,d[3]=+e>0,d[4]=i,to.apply(null,d)}function io(e){return void 0===e?Xs:"function"==typeof e&&(Xs=e,!0)}function ao(e,t){return void 0!==eo[e]&&(void 0===t?eo[e]:(eo[e]=t,"s"===e&&(eo.ss=t-1),!0))}function so(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,a=!1,s=eo;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(a=e),"object"==typeof t&&(s=Object.assign({},eo,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),i=no(this,!a,s,n=this.localeData()),a&&(i=n.pastFuture(+this,i)),n.postformat(i)}var oo=Math.abs;function ro(e){return(e>0)-(e<0)||+e}function co(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,a,s,o,r,c=oo(this._milliseconds)/1e3,l=oo(this._days),u=oo(this._months),p=this.asSeconds();return p?(e=le(c/60),t=le(e/60),c%=60,e%=60,n=le(u/12),u%=12,i=c?c.toFixed(3).replace(/\.?0+$/,""):"",a=p<0?"-":"",s=ro(this._months)!==ro(p)?"-":"",o=ro(this._days)!==ro(p)?"-":"",r=ro(this._milliseconds)!==ro(p)?"-":"",a+"P"+(n?s+n+"Y":"")+(u?s+u+"M":"")+(l?o+l+"D":"")+(t||e||c?"T":"")+(t?r+t+"H":"")+(e?r+e+"M":"")+(c?r+i+"S":"")):"P0D"}var lo=oi.prototype;return lo.isValid=ai,lo.abs=ws,lo.add=Ss,lo.subtract=Ms,lo.as=Ts,lo.asMilliseconds=js,lo.asSeconds=Ys,lo.asMinutes=As,lo.asHours=Ls,lo.asDays=Rs,lo.asWeeks=Is,lo.asMonths=Fs,lo.asQuarters=$s,lo.asYears=Us,lo.valueOf=Ns,lo._bubble=Ds,lo.clone=Hs,lo.get=Ws,lo.milliseconds=Gs,lo.seconds=Vs,lo.minutes=zs,lo.hours=qs,lo.days=Zs,lo.weeks=Ks,lo.months=Qs,lo.years=Js,lo.humanize=so,lo.toISOString=co,lo.toString=co,lo.toJSON=co,lo.locale=oa,lo.localeData=ca,lo.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",co),lo.lang=ra,$("X",0,0,"unix"),$("x",0,0,"valueOf"),Ye("x",Ee),Ye("X",Pe),Fe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Fe("x",(function(e,t,n){n._d=new Date(ue(e))})),
2
2
  //! moment.js
3
- i.version="2.29.4",a(Zn),i.fn=cs,i.min=Xn,i.max=ei,i.now=ti,i.utc=m,i.unix=ls,i.months=gs,i.isDate=p,i.locale=fn,i.invalid=x,i.duration=Ci,i.isMoment=k,i.weekdays=xs,i.parseZone=us,i.localeData=xn,i.isDuration=ri,i.monthsShort=vs,i.weekdaysMin=bs,i.defineLocale=gn,i.updateLocale=vn,i.locales=yn,i.weekdaysShort=ys,i.normalizeUnits=ie,i.relativeTimeRounding=io,i.relativeTimeThreshold=ao,i.calendarFormat=Ui,i.prototype=cs,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}));function formatDate(e,t,n){if(e=utils.isString(e)?e:"",utils.isString(n)||utils.isArray(n)){const i=moment(t||new Date);return i.locale(n),i.format(e)}return moment(t||new Date).format(e)}var date=Object.freeze({__proto__:null,formatDate:formatDate});function number2locale(e,t){return utils.isString(e)&&(e=Number(e)),e.toLocaleString(t)}var number=Object.freeze({__proto__:null,number2locale:number2locale}),helpers=Object.freeze({__proto__:null,html:html,object:object,string:string,comparison:comparison,date:date,number:number});class View{static mount(e){const t=utils.loadViewConfig(),n=require("express-hbs");for(let[e,t]of Object.entries(helpers))for(let[e,i]of Object.entries(t))n.registerHelper(e,i);e.engine("hbs",n.express4({partialsDir:t.partials_dir,layoutsDir:t.layouts_dir,defaultLayout:t.default_layout,extname:t.extension})),e.set("view engine","hbs"),e.set("views",t.views_dir),e.use(((e,n,i)=>{t.beforeRender&&t.beforeRender(e,n),i()}))}}
3
+ i.version="2.29.4",a(Zn),i.fn=cs,i.min=Xn,i.max=ei,i.now=ti,i.utc=m,i.unix=ls,i.months=gs,i.isDate=p,i.locale=fn,i.invalid=x,i.duration=Ci,i.isMoment=k,i.weekdays=xs,i.parseZone=us,i.localeData=xn,i.isDuration=ri,i.monthsShort=vs,i.weekdaysMin=bs,i.defineLocale=gn,i.updateLocale=vn,i.locales=yn,i.weekdaysShort=ys,i.normalizeUnits=ie,i.relativeTimeRounding=io,i.relativeTimeThreshold=ao,i.calendarFormat=Ui,i.prototype=cs,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}));function formatDate(e,t,n){if(e=utils.isString(e)?e:"",utils.isString(n)||utils.isArray(n)){const i=moment(t||new Date);return i.locale(n),i.format(e)}return moment(t||new Date).format(e)}var date=Object.freeze({__proto__:null,formatDate:formatDate});function number2locale(e,t){return utils.isString(e)&&(e=Number(e)),e.toLocaleString(t)}var number=Object.freeze({__proto__:null,number2locale:number2locale});function add(e,t){return Number(e)+Number(t)}function sub(e,t){return Number(e)-Number(t)}function multiply(e,t){return Number(e)*Number(t)}function divide(e,t){return Number(e)/Number(t)}function ceil(e){return Math.ceil(Number(e))}function floor(e){return Math.floor(Number(e))}function abs(e){return Math.abs(Number(e))}var math=Object.freeze({__proto__:null,add:add,sub:sub,multiply:multiply,divide:divide,ceil:ceil,floor:floor,abs:abs}),helpers=Object.freeze({__proto__:null,html:html,object:object,string:string,comparison:comparison,date:date,number:number,math:math});class View{static mount(e){const t=utils.loadViewConfig(),n=require("express-hbs");for(let[e,t]of Object.entries(helpers))for(let[e,i]of Object.entries(t))n.registerHelper(e,i);e.engine("hbs",n.express4({partialsDir:t.partials_dir,layoutsDir:t.layouts_dir,defaultLayout:t.default_layout,extname:t.extension})),e.set("view engine","hbs"),e.set("views",t.views_dir),e.use((async(e,n,i)=>{t.beforeRender&&(utils.isAsyncFunction(t.beforeRender)?await t.beforeRender(e,n):t.beforeRender(e,n)),i()}))}}
4
4
  /*!
5
5
  * cookie
6
6
  * Copyright(c) 2012-2014 Roman Shtylman
package/docs/index.html CHANGED
@@ -481,6 +481,18 @@
481
481
  <!--end:Menu link-->
482
482
  </div>
483
483
  <!--end:Menu item-->
484
+ <!--begin:Menu item-->
485
+ <div class="menu-item">
486
+ <!--begin:Menu link-->
487
+ <a class="menu-link" href="#view-math-helper">
488
+ <span class="menu-bullet">
489
+ <span class="bullet bullet-dot"></span>
490
+ </span>
491
+ <span class="menu-title">Math Helper</span>
492
+ </a>
493
+ <!--end:Menu link-->
494
+ </div>
495
+ <!--end:Menu item-->
484
496
  </div>
485
497
  <!--end:Menu sub-->
486
498
  </div>
@@ -1855,7 +1867,7 @@ module.exports = router;</code></pre>
1855
1867
  <td>Extension for templates and partials files.<br>The default is <code>.hbs</code>.</td>
1856
1868
  </tr>
1857
1869
  <tr>
1858
- <td class="w-250px"><code>beforeRender: (req: express.Request, res: express.Response) =&gt; void</code></td>
1870
+ <td class="w-250px"><code>beforeRender: (req: express.Request, res: express.Response) =&gt; Promise&lt;void&gt;|void</code></td>
1859
1871
  <td>
1860
1872
  Hook function just before the view is rendered.<br>
1861
1873
  For example, you can set your own local variables that can be used within the view.<br>
@@ -1875,7 +1887,7 @@ module.exports = router;</code></pre>
1875
1887
  * res.locals.message = &#039;Hello World&#039;;
1876
1888
  * }
1877
1889
  *
1878
- * @type {(res: express.Response) =&gt; void}
1890
+ * @type {(res: express.Response) =&gt; Promise&lt;void&gt;|void}
1879
1891
  */
1880
1892
  beforeRender: (req, res) =&gt; {
1881
1893
  res.locals.message = &#039;Hello World&#039;;
@@ -3293,6 +3305,272 @@ Else
3293
3305
  <!--end::Table wrapper-->
3294
3306
  </div>
3295
3307
  <!--end::Table-->
3308
+
3309
+
3310
+
3311
+
3312
+ <!--begin::Block-->
3313
+ <h2 id="view-math-helper" class="text-gray-700 py-5 fw-normal">Math Helper</h2>
3314
+ <!--end::Block-->
3315
+ <!--begin::Table-->
3316
+ <div class="py-2">
3317
+ <!--begin::Table wrapper-->
3318
+ <div class="table-responsive border rounded">
3319
+ <!--begin::Table-->
3320
+ <table class="table table-striped mb-0 g-6">
3321
+ <!--begin::Head-->
3322
+ <thead>
3323
+ <tr class="fs-4 fw-bold p-6">
3324
+ <th class="min-w-200px">Function</th>
3325
+ <th>Description</th>
3326
+ </tr>
3327
+ </thead>
3328
+ <!--end::Head-->
3329
+ <!--begin::Body-->
3330
+ <tbody>
3331
+ <tr>
3332
+ <td class="w-250px"><code>add()</code></td>
3333
+ <td>
3334
+ Calculates the sum of two numbers.
3335
+ <!--begin::Parameters-->
3336
+ <div class="py-5">
3337
+ <p>Parameters:</p>
3338
+ <ul>
3339
+ <li><code>val1: number|string</code> The first number.</li>
3340
+ <li><code>val2: number|string</code> The second number.</li>
3341
+ </ul>
3342
+ </div>
3343
+ <!--end::Parameters-->
3344
+ <!--begin::Return value-->
3345
+ <div class="py-5">
3346
+ <p>Return value:</p>
3347
+ <code>number</code>
3348
+ </div>
3349
+ <!--end::Return value-->
3350
+ <!--begin::Code-->
3351
+ <div class="py-5">
3352
+ <!--begin::Highlight-->
3353
+ <div class="highlight">
3354
+ <button class="highlight-copy btn" data-bs-toggle="tooltip" title="Copy code">copy</button>
3355
+ <div class="highlight-code">
3356
+ <pre class="language-javascript"><code class="language-javascript">{{!-- results in: 3 --}}
3357
+ {{add 1 2}}</code></pre>
3358
+ </div>
3359
+ </div>
3360
+ <!--end::Highlight-->
3361
+ </div>
3362
+ <!--end::Code-->
3363
+ </td>
3364
+ </tr>
3365
+ <tr>
3366
+ <td class="w-250px"><code>sub()</code></td>
3367
+ <td>
3368
+ Calculates the difference of the given values.
3369
+ <!--begin::Parameters-->
3370
+ <div class="py-5">
3371
+ <p>Parameters:</p>
3372
+ <ul>
3373
+ <li><code>val1: number|string</code> The first number.</li>
3374
+ <li><code>val2: number|string</code> The second number.</li>
3375
+ </ul>
3376
+ </div>
3377
+ <!--end::Parameters-->
3378
+ <!--begin::Return value-->
3379
+ <div class="py-5">
3380
+ <p>Return value:</p>
3381
+ <code>number</code>
3382
+ </div>
3383
+ <!--end::Return value-->
3384
+ <!--begin::Code-->
3385
+ <div class="py-5">
3386
+ <!--begin::Highlight-->
3387
+ <div class="highlight">
3388
+ <button class="highlight-copy btn" data-bs-toggle="tooltip" title="Copy code">copy</button>
3389
+ <div class="highlight-code">
3390
+ <pre class="language-javascript"><code class="language-javascript">{{!-- results in: 3 --}}
3391
+ {{sub 5 2}}</code></pre>
3392
+ </div>
3393
+ </div>
3394
+ <!--end::Highlight-->
3395
+ </div>
3396
+ <!--end::Code-->
3397
+ </td>
3398
+ </tr>
3399
+ <tr>
3400
+ <td class="w-250px"><code>multiply()</code></td>
3401
+ <td>
3402
+ Calculate the multiplication of the given values.
3403
+ <!--begin::Parameters-->
3404
+ <div class="py-5">
3405
+ <p>Parameters:</p>
3406
+ <ul>
3407
+ <li><code>val1: number|string</code> The first number.</li>
3408
+ <li><code>val2: number|string</code> The second number.</li>
3409
+ </ul>
3410
+ </div>
3411
+ <!--end::Parameters-->
3412
+ <!--begin::Return value-->
3413
+ <div class="py-5">
3414
+ <p>Return value:</p>
3415
+ <code>number</code>
3416
+ </div>
3417
+ <!--end::Return value-->
3418
+ <!--begin::Code-->
3419
+ <div class="py-5">
3420
+ <!--begin::Highlight-->
3421
+ <div class="highlight">
3422
+ <button class="highlight-copy btn" data-bs-toggle="tooltip" title="Copy code">copy</button>
3423
+ <div class="highlight-code">
3424
+ <pre class="language-javascript"><code class="language-javascript">{{!-- results in: 10 --}}
3425
+ {{multiply 5 2}}</code></pre>
3426
+ </div>
3427
+ </div>
3428
+ <!--end::Highlight-->
3429
+ </div>
3430
+ <!--end::Code-->
3431
+ </td>
3432
+ </tr>
3433
+ <tr>
3434
+ <td class="w-250px"><code>divide()</code></td>
3435
+ <td>
3436
+ Compute the division of the given values.
3437
+ <!--begin::Parameters-->
3438
+ <div class="py-5">
3439
+ <p>Parameters:</p>
3440
+ <ul>
3441
+ <li><code>val1: number|string</code> The first number.</li>
3442
+ <li><code>val2: number|string</code> The second number.</li>
3443
+ </ul>
3444
+ </div>
3445
+ <!--end::Parameters-->
3446
+ <!--begin::Return value-->
3447
+ <div class="py-5">
3448
+ <p>Return value:</p>
3449
+ <code>number</code>
3450
+ </div>
3451
+ <!--end::Return value-->
3452
+ <!--begin::Code-->
3453
+ <div class="py-5">
3454
+ <!--begin::Highlight-->
3455
+ <div class="highlight">
3456
+ <button class="highlight-copy btn" data-bs-toggle="tooltip" title="Copy code">copy</button>
3457
+ <div class="highlight-code">
3458
+ <pre class="language-javascript"><code class="language-javascript">{{!-- results in: 5 --}}
3459
+ {{divide 10 2}}</code></pre>
3460
+ </div>
3461
+ </div>
3462
+ <!--end::Highlight-->
3463
+ </div>
3464
+ <!--end::Code-->
3465
+ </td>
3466
+ </tr>
3467
+ <tr>
3468
+ <td class="w-250px"><code>ceil()</code></td>
3469
+ <td>
3470
+ Round up the value.
3471
+ <!--begin::Parameters-->
3472
+ <div class="py-5">
3473
+ <p>Parameters:</p>
3474
+ <ul>
3475
+ <li><code>val: number|string</code> Number to be rounded to nearest greater integer.</li>
3476
+ </ul>
3477
+ </div>
3478
+ <!--end::Parameters-->
3479
+ <!--begin::Return value-->
3480
+ <div class="py-5">
3481
+ <p>Return value:</p>
3482
+ <code>number</code>
3483
+ </div>
3484
+ <!--end::Return value-->
3485
+ <!--begin::Code-->
3486
+ <div class="py-5">
3487
+ <!--begin::Highlight-->
3488
+ <div class="highlight">
3489
+ <button class="highlight-copy btn" data-bs-toggle="tooltip" title="Copy code">copy</button>
3490
+ <div class="highlight-code">
3491
+ <pre class="language-javascript"><code class="language-javascript">{{!-- results in: 6 --}}
3492
+ {{ceil 5.6}}</code></pre>
3493
+ </div>
3494
+ </div>
3495
+ <!--end::Highlight-->
3496
+ </div>
3497
+ <!--end::Code-->
3498
+ </td>
3499
+ </tr>
3500
+ <tr>
3501
+ <td class="w-250px"><code>floor()</code></td>
3502
+ <td>
3503
+ Rounds down a number.
3504
+ <!--begin::Parameters-->
3505
+ <div class="py-5">
3506
+ <p>Parameters:</p>
3507
+ <ul>
3508
+ <li><code>val: number|string</code> Number to be rounded to nearest lower integer.</li>
3509
+ </ul>
3510
+ </div>
3511
+ <!--end::Parameters-->
3512
+ <!--begin::Return value-->
3513
+ <div class="py-5">
3514
+ <p>Return value:</p>
3515
+ <code>number</code>
3516
+ </div>
3517
+ <!--end::Return value-->
3518
+ <!--begin::Code-->
3519
+ <div class="py-5">
3520
+ <!--begin::Highlight-->
3521
+ <div class="highlight">
3522
+ <button class="highlight-copy btn" data-bs-toggle="tooltip" title="Copy code">copy</button>
3523
+ <div class="highlight-code">
3524
+ <pre class="language-javascript"><code class="language-javascript">{{!-- results in: 5 --}}
3525
+ {{floor 5.6}}</code></pre>
3526
+ </div>
3527
+ </div>
3528
+ <!--end::Highlight-->
3529
+ </div>
3530
+ <!--end::Code-->
3531
+ </td>
3532
+ </tr>
3533
+ <tr>
3534
+ <td class="w-250px"><code>abs()</code></td>
3535
+ <td>
3536
+ Returns an absolute value.
3537
+ <!--begin::Parameters-->
3538
+ <div class="py-5">
3539
+ <p>Parameters:</p>
3540
+ <ul>
3541
+ <li><code>val: number|string</code> Number to perform absolute value operation on.</li>
3542
+ </ul>
3543
+ </div>
3544
+ <!--end::Parameters-->
3545
+ <!--begin::Return value-->
3546
+ <div class="py-5">
3547
+ <p>Return value:</p>
3548
+ <code>number</code>
3549
+ </div>
3550
+ <!--end::Return value-->
3551
+ <!--begin::Code-->
3552
+ <div class="py-5">
3553
+ <!--begin::Highlight-->
3554
+ <div class="highlight">
3555
+ <button class="highlight-copy btn" data-bs-toggle="tooltip" title="Copy code">copy</button>
3556
+ <div class="highlight-code">
3557
+ <pre class="language-javascript"><code class="language-javascript">{{!-- results in: 5.6 --}}
3558
+ {{abs -5.6}}</code></pre>
3559
+ </div>
3560
+ </div>
3561
+ <!--end::Highlight-->
3562
+ </div>
3563
+ <!--end::Code-->
3564
+ </td>
3565
+ </tr>
3566
+ </tbody>
3567
+ <!--end::Body-->
3568
+ </table>
3569
+ <!--end::Table-->
3570
+ </div>
3571
+ <!--end::Table wrapper-->
3572
+ </div>
3573
+ <!--end::Table-->
3296
3574
  </div>
3297
3575
  <!--end::Section-->
3298
3576
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-sweet",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "Express framework extension.",
5
5
  "main": "dist/build.common.js",
6
6
  "module": "dist/build.esm.js",
@@ -4,4 +4,5 @@ import * as string from '~/handlebars_helpers/string';
4
4
  import * as comparison from '~/handlebars_helpers/comparison';
5
5
  import * as date from '~/handlebars_helpers/date';
6
6
  import * as number from '~/handlebars_helpers/number';
7
- export { html, object, string, comparison, date, number, };
7
+ import * as math from '~/handlebars_helpers/math';
8
+ export { html, object, string, comparison, date, number, math, };
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Calculates the sum of two numbers.
3
+ *
4
+ * @example
5
+ * {{!-- results in: 3 --}}
6
+ * {{add 1 2}}
7
+ *
8
+ * @param {number|string} val1 The first number.
9
+ * @param {number|string} val2 The second number.
10
+ * @returns {number}
11
+ */
12
+ export declare function add(val1: number | string, val2: number | string): number;
13
+ /**
14
+ * Calculates the difference of the given values.
15
+ *
16
+ * @example
17
+ * {{!-- results in: 3 --}}
18
+ * {{sub 5 2}}
19
+ *
20
+ * @param {number|string} val1 The first number.
21
+ * @param {number|string} val2 The second number.
22
+ * @returns {number}
23
+ */
24
+ export declare function sub(val1: number | string, val2: number | string): number;
25
+ /**
26
+ * Calculate the multiplication of the given values.
27
+ *
28
+ * @example
29
+ * {{!-- results in: 10 --}}
30
+ * {{multiply 5 2}}
31
+ *
32
+ * @param {number|string} val1 The first number.
33
+ * @param {number|string} val2 The second number.
34
+ * @returns {number}
35
+ */
36
+ export declare function multiply(val1: number | string, val2: number | string): number;
37
+ /**
38
+ * Compute the division of the given values.
39
+ *
40
+ * @example
41
+ * {{!-- results in: 5 --}}
42
+ * {{divide 10 2}}
43
+ *
44
+ * @param {number|string} val1 The first number.
45
+ * @param {number|string} val2 The second number.
46
+ * @returns {number}
47
+ */
48
+ export declare function divide(val1: number | string, val2: number | string): number;
49
+ /**
50
+ * Round up the value.
51
+ *
52
+ * @example
53
+ * {{!-- results in: 6 --}}
54
+ * {{ceil 5.6}}
55
+ *
56
+ * @param {number|string} val Number to be rounded to nearest greater integer.
57
+ * @returns {number}
58
+ */
59
+ export declare function ceil(val: number | string): number;
60
+ /**
61
+ * Rounds down a number.
62
+ *
63
+ * @example
64
+ * {{!-- results in: 5 --}}
65
+ * {{floor 5.6}}
66
+ *
67
+ * @param {number|string} val Number to be rounded to nearest lower integer.
68
+ * @returns {number}
69
+ */
70
+ export declare function floor(val: number | string): number;
71
+ /**
72
+ * Returns an absolute value.
73
+ *
74
+ * @example
75
+ * {{!-- results in: 5.6 --}}
76
+ * {{abs -5.6}}
77
+ *
78
+ * @param {number} val Number to perform absolute value operation on.
79
+ * @returns {number}
80
+ */
81
+ export declare function abs(val: number | string): number;
@@ -38,7 +38,7 @@ export default interface {
38
38
  * res.locals.message = 'Hello World';
39
39
  * }
40
40
  *
41
- * @type {(res: express.Response) => void}
41
+ * @type {(res: express.Response) => Promise<void>|void}
42
42
  */
43
- beforeRender?: (req: express.Request, res: express.Response) => void;
43
+ beforeRender?: (req: express.Request, res: express.Response) => Promise<void> | void;
44
44
  }