diff --git a/_layouts/default.haml b/_layouts/default.haml index 97fcb65..f2ec181 100644 --- a/_layouts/default.haml +++ b/_layouts/default.haml @@ -16,7 +16,8 @@ %script{ :src=>'/assets/js/jquery.backstretch.min.js' } %script{ :src=>'/assets/js/sass-bootstrap.js' } %script{ :src=>'/assets/js/jquery.tidy.table.min.js' } - %script{ :src=>'/assets/js/FeedEk.js' } + %script{ :src=>'/assets/js/jquery.rss.js' } + %script{ :src=>'/assets/js/moment.min.js' } %script{ :src=>'/assets/js/google.js' } %link(rel='stylesheet' type='text/css' href='/styles/site.css' ) %link(rel='stylesheet' type='text/css' href='/assets/stylesheet.css' ) diff --git a/assets/js/FeedEk.js b/assets/js/FeedEk.js deleted file mode 100644 index 2694dd1..0000000 --- a/assets/js/FeedEk.js +++ /dev/null @@ -1,72 +0,0 @@ -/* -* FeedEk jQuery RSS/ATOM Feed Plugin v3.0 with YQL API -* http://jquery-plugins.net/FeedEk/FeedEk.html https://github.com/enginkizil/FeedEk -* Author : Engin KIZIL http://www.enginkizil.com -*/ - -(function ($) { - $.fn.FeedEk = function (opt) { - var def = $.extend({ - MaxCount: 5, - ShowDesc: true, - ShowPubDate: true, - DescCharacterLimit: 0, - TitleLinkTarget: "_blank", - DateFormat: "", - DateFormatLang:"en" - }, opt); - - var id = $(this).attr("id"), i, s = "", dt; - $("#" + id).empty(); - if (def.FeedUrl == undefined) return; - $("#" + id).append(''); - - var YQLstr = 'SELECT channel.item FROM feednormalizer WHERE output="rss_2.0" AND url ="' + def.FeedUrl + '" LIMIT ' + def.MaxCount; - - $.ajax({ - url: "https://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(YQLstr) + "&format=json&diagnostics=false&callback=?", - dataType: "json", - success: function (data) { - $("#" + id).empty(); - if (!(data.query.results.rss instanceof Array)) { - data.query.results.rss = [data.query.results.rss]; - } - $.each(data.query.results.rss, function (e, itm) { - s += '
  • ' + itm.channel.item.title + '
    '; - - if (def.ShowPubDate){ - dt = new Date(itm.channel.item.pubDate); - s += '
    '; - if ($.trim(def.DateFormat).length > 0) { - try { - moment.lang(def.DateFormatLang); - s += moment(dt).format(def.DateFormat); - } - catch (e){s += dt.toLocaleDateString();} - } - else { - s += dt.toLocaleDateString(); - } - s += '
    '; - } - if (def.ShowDesc) { - s += '
    '; - if (def.DescCharacterLimit > 0 && itm.channel.item.description.length > def.DescCharacterLimit) { - // Patches upstream FeedEK to correctly - // handle HTML tags embedded in the - // description text. - var d = $(itm.channel.item.description).text(); - s += d.substring(0, def.DescCharacterLimit) + '...'; - } - else { - s += itm.channel.item.description; - } - s += '
    '; - } - }); - $("#" + id).append(''); - } - }); - }; -})(jQuery); - diff --git a/assets/js/jquery.rss.js b/assets/js/jquery.rss.js new file mode 100644 index 0000000..d25ed45 --- /dev/null +++ b/assets/js/jquery.rss.js @@ -0,0 +1,333 @@ +(function ($) { + 'use strict'; + + var RSS = function (target, url, options, callback) { + this.target = target; + + this.url = url; + this.html = []; + this.effectQueue = []; + + this.options = $.extend({ + ssl: false, + host: 'www.feedrapp.info', + limit: null, + key: null, + layoutTemplate: '', + entryTemplate: '
  • [{author}@{date}] {title}
    {shortBodyPlain}
  • ', + tokens: {}, + outputMode: 'json', + dateFormat: 'dddd MMM Do', + dateLocale: 'en', + effect: 'show', + offsetStart: false, + offsetEnd: false, + error: function () { + console.log('jQuery RSS: url doesn\'t link to RSS-Feed'); + }, + onData: function () {}, + success: function () {} + }, options || {}); + + this.callback = callback || this.options.success; + }; + + RSS.htmlTags = [ + 'doctype', 'html', 'head', 'title', 'base', 'link', 'meta', 'style', 'script', 'noscript', + 'body', 'article', 'nav', 'aside', 'section', 'header', 'footer', 'h1-h6', 'hgroup', 'address', + 'p', 'hr', 'pre', 'blockquote', 'ol', 'ul', 'li', 'dl', 'dt', 'dd', 'figure', 'figcaption', + 'div', 'table', 'caption', 'thead', 'tbody', 'tfoot', 'tr', 'th', 'td', 'col', 'colgroup', + 'form', 'fieldset', 'legend', 'label', 'input', 'button', 'select', 'datalist', 'optgroup', + 'option', 'textarea', 'keygen', 'output', 'progress', 'meter', 'details', 'summary', 'command', + 'menu', 'del', 'ins', 'img', 'iframe', 'embed', 'object', 'param', 'video', 'audio', 'source', + 'canvas', 'track', 'map', 'area', 'a', 'em', 'strong', 'i', 'b', 'u', 's', 'small', 'abbr', 'q', + 'cite', 'dfn', 'sub', 'sup', 'time', 'code', 'kbd', 'samp', 'var', 'mark', 'bdi', 'bdo', 'ruby', + 'rt', 'rp', 'span', 'br', 'wbr' + ]; + + RSS.prototype.load = function (callback) { + var apiProtocol = 'http' + (this.options.ssl ? 's' : ''); + var apiHost = apiProtocol + '://' + this.options.host; + var apiUrl = apiHost + '?callback=?&q=' + encodeURIComponent(this.url); + + // set limit to offsetEnd if offset has been set + if (this.options.offsetStart && this.options.offsetEnd) { + this.options.limit = this.options.offsetEnd; + } + + if (this.options.limit !== null) { + apiUrl += '&num=' + this.options.limit; + } + + if (this.options.key !== null) { + apiUrl += '&key=' + this.options.key; + } + + $.getJSON(apiUrl, callback); + }; + + RSS.prototype.render = function () { + var self = this; + + this.load(function (data) { + try { + self.feed = data.responseData.feed; + self.entries = data.responseData.feed.entries; + } catch (e) { + self.entries = []; + self.feed = null; + return self.options.error.call(self); + } + + var html = self.generateHTMLForEntries(); + + self.target.append(html.layout); + + if (html.entries.length !== 0) { + if ($.isFunction(self.options.onData)) { + self.options.onData.call(self); + } + + var container = $(html.layout).is('entries') ? html.layout : $('entries', html.layout); + + self.appendEntriesAndApplyEffects(container, html.entries); + } + + if (self.effectQueue.length > 0) { + self.executeEffectQueue(self.callback); + } else if ($.isFunction(self.callback)) { + self.callback.call(self); + } + }); + }; + + RSS.prototype.appendEntriesAndApplyEffects = function (target, entries) { + var self = this; + + $.each(entries, function (idx, entry) { + var $html = self.wrapContent(entry); + + if (self.options.effect === 'show') { + target.before($html); + } else { + $html.css({ display: 'none' }); + target.before($html); + self.applyEffect($html, self.options.effect); + } + }); + + target.remove(); + }; + + RSS.prototype.generateHTMLForEntries = function () { + var self = this; + var result = { entries: [], layout: null }; + + $(this.entries).each(function () { + var entry = this; + var offsetStart = self.options.offsetStart; + var offsetEnd = self.options.offsetEnd; + var evaluatedString; + + // offset required + if (offsetStart && offsetEnd) { + if (index >= offsetStart && index <= offsetEnd) { + if (self.isRelevant(entry, result.entries)) { + evaluatedString = self.evaluateStringForEntry( + self.options.entryTemplate, entry + ); + + result.entries.push(evaluatedString); + } + } + } else { + // no offset + if (self.isRelevant(entry, result.entries)) { + evaluatedString = self.evaluateStringForEntry( + self.options.entryTemplate, entry + ); + + result.entries.push(evaluatedString); + } + } + }); + + if (!!this.options.entryTemplate) { + // we have an entryTemplate + result.layout = this.wrapContent( + this.options.layoutTemplate.replace('{entries}', '') + ); + } else { + // no entryTemplate available + result.layout = this.wrapContent('
    '); + } + + return result; + }; + + RSS.prototype.wrapContent = function (content) { + if (($.trim(content).indexOf('<') !== 0)) { + // the content has no html => create a surrounding div + return $('
    ' + content + '
    '); + } else { + // the content has html => don't touch it + return $(content); + } + }; + + RSS.prototype.applyEffect = function ($element, effect, callback) { + var self = this; + + switch (effect) { + case 'slide': + $element.slideDown('slow', callback); + break; + case 'slideFast': + $element.slideDown(callback); + break; + case 'slideSynced': + self.effectQueue.push({ element: $element, effect: 'slide' }); + break; + case 'slideFastSynced': + self.effectQueue.push({ element: $element, effect: 'slideFast' }); + break; + } + }; + + RSS.prototype.executeEffectQueue = function (callback) { + var self = this; + + this.effectQueue.reverse(); + + var executeEffectQueueItem = function () { + var item = self.effectQueue.pop(); + + if (item) { + self.applyEffect(item.element, item.effect, executeEffectQueueItem); + } else if (callback) { + callback(); + } + }; + + executeEffectQueueItem(); + }; + + RSS.prototype.evaluateStringForEntry = function (string, entry) { + var result = string; + var self = this; + + $(string.match(/(\{.*?\})/g)).each(function () { + var token = this.toString(); + + result = result.replace(token, self.getValueForToken(token, entry)); + }); + + return result; + }; + + RSS.prototype.isRelevant = function (entry, entries) { + var tokenMap = this.getTokenMap(entry); + + if (this.options.filter) { + if (this.options.filterLimit && (this.options.filterLimit === entries.length)) { + return false; + } else { + return this.options.filter(entry, tokenMap); + } + } else { + return true; + } + }; + + RSS.prototype.getFormattedDate = function (dateString) { + // If a custom formatting function is provided, use that. + if (this.options.dateFormatFunction) { + return this.options.dateFormatFunction(dateString); + } else if (typeof moment !== 'undefined') { + // If moment.js is available and dateFormatFunction is not overriding it, + // use it to format the date. + var date = moment(new Date(dateString)); + + if (date.locale) { + date = date.locale(this.options.dateLocale); + } else { + date = date.lang(this.options.dateLocale); + } + + return date.format(this.options.dateFormat); + } else { + // If all else fails, just use the date as-is. + return dateString; + } + }; + + RSS.prototype.getTokenMap = function (entry) { + if (!this.feedTokens) { + var feed = JSON.parse(JSON.stringify(this.feed)); + + delete feed.entries; + this.feedTokens = feed; + } + + return $.extend({ + feed: this.feedTokens, + url: entry.link, + author: entry.author, + date: this.getFormattedDate(entry.publishedDate), + title: entry.title, + body: entry.content, + shortBody: entry.contentSnippet, + + bodyPlain: (function (entry) { + var result = entry.content + .replace(//mgi, '') + .replace(/<\/?[^>]+>/gi, ''); + + for (var i = 0; i < RSS.htmlTags.length; i++) { + result = result.replace(new RegExp('<' + RSS.htmlTags[i], 'gi'), ''); + } + + return result; + })(entry), + + shortBodyPlain: entry.contentSnippet.replace(/<\/?[^>]+>/gi, ''), + index: $.inArray(entry, this.entries), + totalEntries: this.entries.length, + + teaserImage: (function (entry) { + try { + return entry.content.match(/()/gi)[0]; + } + catch (e) { + return ''; + } + })(entry), + + teaserImageUrl: (function (entry) { + try { + return entry.content.match(/()/gi)[0].match(/src="(.*?)"/)[1]; + } + catch (e) { + return ''; + } + })(entry) + }, this.options.tokens); + }; + + RSS.prototype.getValueForToken = function (_token, entry) { + var tokenMap = this.getTokenMap(entry); + var token = _token.replace(/[\{\}]/g, ''); + var result = tokenMap[token]; + + if (typeof result !== 'undefined') { + return ((typeof result === 'function') ? result(entry, tokenMap) : result); + } else { + throw new Error('Unknown token: ' + _token + ', url:' + this.url); + } + }; + + $.fn.rss = function (url, options, callback) { + new RSS(this, url, options, callback).render(); + return this; // Implement chaining + }; +})(jQuery); diff --git a/assets/js/moment.min.js b/assets/js/moment.min.js new file mode 100644 index 0000000..c659ab9 --- /dev/null +++ b/assets/js/moment.min.js @@ -0,0 +1,5 @@ +//! moment.js +//! version : 2.24.0 +//! license : MIT +//! momentjs.com +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n>>0,s=0;sSe(e)?(r=e+1,o-Se(e)):(r=e,o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(Se(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),F("week",5),F("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=D(e)});function je(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=D(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var qe=ae;var Je=ae;var Be=ae;function Qe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=he(o[t]),u[t]=he(u[t]),l[t]=he(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Xe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),C("hour","h"),F("hour",13),ue("a",et),ue("A",et),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=D(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=D(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i))});var tt,nt=Te("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:He,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=tt._abbr,require("./locale/"+e),ut(t)}catch(e){}return it[e]}function ut(e,t){var n;return e&&((n=l(t)?ht(e):lt(e,t))?tt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])T("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."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new P(x(s,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),ut(e),it[e]}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return tt}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ct(e._a[me],s[me]),(e._dayOfYear>Se(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[pe]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var mt=/^\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)?)?$/,_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+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["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}/]],vt=[["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/]],pt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,s,i,r,a,o=e._i,u=mt.exec(o)||_t.exec(o);if(u){for(g(e).iso=!0,t=0,n=gt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mn.isUtc=Et,mn.isUTC=Et,mn.zoneAbbr=function(){return this._isUTC?"UTC":""},mn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},mn.dates=n("dates accessor is deprecated. Use date instead.",un),mn.months=n("months accessor is deprecated. Use month instead",Ue),mn.years=n("years accessor is deprecated. Use year instead",Oe),mn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),mn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Ot(e))._a){var t=e._isUTC?y(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&0 -