@digitransit-component/digitransit-component-autosuggest 1.8.2 → 1.8.5
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/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,c){"object"==typeof exports&&"undefined"!=typeof module?c(exports,require("prop-types"),require("react"),require("i18next"),require("classnames"),require("react-autosuggest"),require("lodash/debounce"),require("lodash/flatten"),require("lodash/take"),require("lodash/isString"),require("lodash/orderBy"),require("lodash/uniqWith"),require("lodash/isEqual"),require("lodash/memoize"),require("lodash/escapeRegExp"),require("lodash/cloneDeep"),require("lodash/get"),require("@digitransit-component/digitransit-component-suggestion-item"),require("@digitransit-component/digitransit-component-icon"),require("lodash/isEmpty"),require("@digitransit-component/digitransit-component-dialog-modal")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","i18next","classnames","react-autosuggest","lodash/debounce","lodash/flatten","lodash/take","lodash/isString","lodash/orderBy","lodash/uniqWith","lodash/isEqual","lodash/memoize","lodash/escapeRegExp","lodash/cloneDeep","lodash/get","@digitransit-component/digitransit-component-suggestion-item","@digitransit-component/digitransit-component-icon","lodash/isEmpty","@digitransit-component/digitransit-component-dialog-modal"],c):c((e="undefined"!=typeof globalThis?globalThis:e||self).DTAutosuggest={},e.PropTypes,e.React,e.i18next,e.cx,e.Autosuggest,e.debounce,e.flatten,e.take,e.isString,e.orderBy,e.uniqWith,e.isEqual,e.memoize,e.escapeRegExp,e.cloneDeep,e.get,e.SuggestionItem,e.Icon,e.isEmpty,e.DialogModal)}(this,(function(e,c,n,o,t,a,i,r,M,s,l,u,p,d,b,A,f,z,h,O,L){"use strict";function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var q=m(c),N=m(n),g=m(o),W=m(t),_=m(a),T=m(i),X=m(r),B=m(M),y=m(s),S=m(l),v=m(u),k=m(p),C=m(d),R=m(b),E=m(A),w=m(f),D=m(z),P=m(h),x=m(O),I=m(L);function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function Y(){return Y=Object.assign||function(e){for(var c=1;c<arguments.length;c++){var n=arguments[c];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Y.apply(this,arguments)}function F(e,c){(null==c||c>e.length)&&(c=e.length);for(var n=0,o=new Array(c);n<c;n++)o[n]=e[n];return o}function j(e,c){if(e){if("string"==typeof e)return F(e,c);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,c):void 0}}function U(e){return function(e){if(Array.isArray(e))return F(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||j(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,c){if(!(e instanceof c))throw new TypeError("Cannot call a class as a function")}function V(e,c){for(var n=0;n<c.length;n++){var o=c[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function K(e,c,n){return c&&V(e.prototype,c),n&&V(e,n),e}function Q(e,c){return Q=Object.setPrototypeOf||function(e,c){return e.__proto__=c,e},Q(e,c)}function J(e,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(c&&c.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),c&&Q(e,c)}function Z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e,c){return!c||"object"!==H(c)&&"function"!=typeof c?Z(e):c}function ee(e){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ee(e)}function ce(e,c){return function(e){if(Array.isArray(e))return e}(e)||function(e,c){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,t=!1,a=void 0;try{for(var i,r=e[Symbol.iterator]();!(o=(i=r.next()).done)&&(n.push(i.value),!c||n.length!==c);o=!0);}catch(e){t=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(t)throw a}}return n}}(e,c)||j(e,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e,c){return e&&c&&e===c}function oe(e,c){var n=e.properties,o=c.properties;if("FutureRoute"===e.type&&"FutureRoute"===c.type){var t=n.origin,a=n.destination,i=o.origin,r=o.destination;return"".concat(t.name,"//").concat(t.locality,"//").concat(a.name,"//").concat(a.locality)==="".concat(i.name,"//").concat(i.locality,"//").concat(r.name,"//").concat(r.locality)}if("FutureRoute"===e.type||"FutureRoute"===c.type)return!1;if(("bikeRentalStation"===n.layer||"favouriteBikeRentalStation"===n.layer)&&("bikeRentalStation"===o.layer||"favouriteBikeRentalStation"===o.layer)||"bikestation"===n.layer&&"bikestation"===o.layer)return n.labelId===o.labelId;if(n.gtfsId&&o.gtfsId)return n.gtfsId===o.gtfsId;if(n.gtfsId&&o.gid&&o.gid.includes(n.gtfsId))return!0;if(o.gtfsId&&n.gid&&n.gid.includes(o.gtfsId))return!0;if(("stop"===n.layer||"station"===n.layer)&&("stop"===o.layer||"station"===o.layer)&&n.gid&&o.gid)return n.gid===o.gid;var M=e&&e.geometry?e.geometry.coordinates:void 0,s=c&&c.geometry?c.geometry.coordinates:void 0;return!!(M&&s&&Math.abs(M[0]-s[0])<1e-6&&Math.abs(M[1]-s[1])<1e-6&&(ne(n.name,o.name)||ne(n.label,o.label)||ne(n.address,o.address)||ne(n.address,o.label)||ne(n.label,o.address)))}var te=function(e){return y.default(e)?e.toLowerCase():""},ae={Address:"address",Back:"back",CurrentPosition:"currentPosition",FavouriteStop:"favouriteStop",FavouriteStation:"favouriteStation",FavouritePlace:"favouritePlace",FavouriteRoute:"favouriteRoute",FutureRoute:"futureRoute",Station:"station",SelectFromMap:"selectFromMap",SelectFromOwnLocations:"ownLocations",Stop:"stop",Street:"street",Venue:"venue",BikeRentalStation:"bikeRentalStation"},ie=function(e,c){if(!y.default(e)||0===e.length)return 0;return["name","label","address","shortName"].map((function(e){return c[e]})).filter((function(e){return y.default(e)&&e.length>0})).map((function(c){var n=te(c);return 0===n.indexOf(e)?.5+e.length/n.length:.5*e.length/(e.length+1)})).reduce((function(e,c){return c>e?c:e}),0)},re=function(e,c){switch(e){case ae.CurrentPosition:return 1;case ae.Back:return.9;case ae.SelectFromMap:return.8;case ae.SelectFromOwnLocations:return.79;case ae.FavouriteStation:case ae.FavouritePlace:case ae.FavouriteStop:case ae.FavouriteRoute:return.45;case ae.FutureRoute:return.44;case ae.Station:return y.default(c)&&0===c.indexOf("gtfs")?.43:.42;case ae.FavouriteBikeRentalStation:default:return.4;case ae.Stop:return.35;case ae.BikeRentalStation:return.1}},Me=function(e,c){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!Array.isArray(c))return c;var o=function(c){return y.default(c)&&e&&e.test(c)},t=te(n),a=o(t),i=S.default(c,[function(e){return a&&o(te(e.properties.shortName))&&0===te(e.properties.shortName).indexOf(t)?1:0},function(e){var c=e.properties,n=c.confidence,o=c.layer,a=c.source;if(0===t.length)return re(o,a);if(!n){var i=re(o,a)+ie(t,e.properties);return o===ae.BikeRentalStation?i-.8:i}switch(o){case ae.Station:return n+(0===a.indexOf("gtfs")?.05:.01);default:return n;case ae.Stop:return n-.1}}],["desc","desc"]);return v.default(i,oe)},se=function(e,c){return null!=c&&-1!==e.lastIndexOf(c)?e.substring(0,e.lastIndexOf(c)-1):e},le=function(e){return e.localadmin||e.locality||e.address&&e.address.lastIndexOf(",")<e.address.length-2&&e.address.substring(e.address.lastIndexOf(",")+2)||""},ue=function(e){var c=e.id,n=e.code;return n||(void 0!==c&&void 0!==c.indexOf&&-1!==c.indexOf("#")?c.substring(c.indexOf("#")+1):void 0)},pe=C.default((function(e){var c=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.layer){case"currentPosition":return[e.labelId,e.address];case"selectFromMap":case"ownLocations":case"back":return[e.labelId];case"favouritePlace":return[e.name||e.address&&e.address.split(",")[0],e.address.replace(new RegExp("".concat(R.default(e.name),"(,)?( )?")),"")];case"favouriteBikeRentalStation":case"bikeRentalStation":return[e.name];case"favouriteRoute":case"route-BUS":case"route-TRAM":case"route-RAIL":case"route-SUBWAY":case"route-FERRY":case"route-AIRPLANE":return!c&&e.shortName?[e.gtfsId,e.mode.toLowerCase(),e.longName]:[e.shortName,e.longName,e.agency?e.agency.name:void 0];case"venue":case"address":case"street":return[e.name,e.label.replace(new RegExp("".concat(R.default(e.name),"(,)?( )?")),"")];case"favouriteStop":case"stop":return c?[e.name||e.label||e.address&&e.address.split(",")[0],le(e)]:[e.name,e.id,ue(e),le(e)];default:return[e.name||e.label||e.address&&e.address.split(",")[0],le(e)]}}),(function(e,c){var n=E.default(e);return n.plain=c,n}));function de(e){return v.default(e,(function(e,c){var n=k.default(pe(e.properties),pe(c.properties))&&e.properties.layer===c.properties.layer;return(!n||"FutureRoute"!==e.type&&"FutureRoute"!==c.type)&&n}))}function be(e,c,n){if("string"==typeof c&&c.length>0){var o=c.toLowerCase().trim(),t=o.includes(" ")||o.includes(",");return e.filter((function(e){var c=[];n.forEach((function(n){var o=w.default(e,n);t||"properties.label"!==n&&"address"!==n||!o||((o=o.split(",")).length>2?o.splice(o.length-2,2):o.length>1&&o.splice(o.length-1,1),o=o.join(",")),o&&(c=t?c.concat(o.toLowerCase()):c.concat(o.toLowerCase().replace(/,/g," ").split(" ")))}));for(var a=0;a<c.length;a++)if(0===c[a].indexOf(o))return!0;return!1}))}return e}function Ae(e,c){return e?Object.keys(e).map((function(n){var o=c||n,t=e[n];return"object"===H(t)?Ae(t,o):"".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(t))})).join("&"):""}var fe=require("axios").default;function ze(e,c){return fe.get(encodeURI(e)+(c?(-1===e.search(/\?/)?"?":"&")+Ae(c):""),{timeout:1e4,method:"GET",headers:{Accept:"application/json"}}).then((function(e){return e.data}))}function he(e,c,n,o,t,a,i,r){var M=e?e.trim():null;if(null==M||M.length<1||i&&!i.test(M))return Promise.resolve([]);var s=a||"https://api.digitransit.fi/geocoding/v1/search",l=Y({text:M},c,o,{lang:n});(t&&(l=Y({},l,{sources:t})),r)&&(l=Y({},l,{layers:r.toString()}));return ze(s,l).then((function(e){return e.features}))}function Oe(e,c){if(!e||e.length<1)return Promise.resolve([]);var n="",o=e.map((function(e){var c="stop"===e.type?"stop":"station",o="gtfs".concat(e.gtfsId.split(":")[0].toLowerCase(),":").concat(c,":GTFS:").concat(e.gtfsId);return e.code&&(o+="#".concat(e.code)),n+="".concat(o,","),Y({},e,{gid:o})})).reduce((function(e,c){return e[c.gid]=c,e}),{});return ze(c,{ids:n.slice(0,-1)}).then((function(e){return e.features.map((function(e){var c,n,t;return{type:"FavouriteStop",properties:{addendum:e.properties.addendum,gid:o[e.properties.gid].gid,code:o[e.properties.gid].code,gtfsId:o[e.properties.gid].gtfsId,lastUpdated:o[e.properties.gid].lastUpdated,favouriteId:o[e.properties.gid].favouriteId,address:e.properties.label,layer:(c=e.properties,n=c.layer,t=c.type,"stop"===n||"favouriteStop"===n||"stop"===t||"favouriteStop"===t?"favouriteStop":"favouriteStation")},geometry:e.geometry}}))}))}function Le(e,c,n){var o=be(e,c,["properties.name","properties.label","properties.address","properties.shortName","properties.longName"]);return n&&(o=o.filter((function(e){return!n.includes(e.properties.layer)}))),Promise.resolve(B.default(o,10).map((function(e){var c=Y({},e,{type:"OldSearch",timetableClicked:!1,arrowClicked:!1});return delete c.properties.confidence,c})))}var me=["route-TRAM","route-BUS","route-RAIL","route-FERRY","route-SUBWAY","route-AIRPLANE"],qe=["favouritePlace","venue","address","street"];var Ne=T.default((function(e,c,n,o,t,a,i,r,M,s){var l=i.input,u=o.getPositions,p=o.getFavouriteLocations,d=o.getOldSearches,b=o.getFavouriteStops,A=o.getLanguage,f=o.getStopAndStationsQuery,z=o.getFavouriteBikeRentalStationsQuery,h=o.getFavouriteBikeRentalStations,O=o.getFavouriteRoutesQuery,L=o.getFavouriteRoutes,m=o.getRoutesQuery,q=o.context,N=o.isPeliasLocationAware,g=o.minimalRegexp,W=o.lineRegexp,_=o.URL_PELIAS,T=o.URL_PELIAS_PLACE,y=o.feedIDs,S=o.geocodingSearchParams,v=o.geocodingSources,k=o.getFutureRoutes,C=o.cityBikeNetworks,R=!e||0===e.length,E=!c||0===c.length,w=u(q),D=[],P={type:"all",term:l,results:[]},x=A(q),I=N&&null!=s&&s.lat&&null!=s&&s.lon?{"focus.point.lat":s.lat.toFixed(3),"focus.point.lon":s.lon.toFixed(3)}:{},H=n?n.split("-")[1]:void 0;if(e.includes("CurrentPosition")&&"geolocation-not-supported"!==w.status&&D.push(function(e,c){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"CurrentLocation",address:c.address,lat:c.lat,lon:c.lon,properties:{labelId:"use-own-position",layer:"currentPosition",address:c.address,lat:c.lat,lon:c.lon},geometry:{type:"Point",coordinates:[c.lon,c.lat]}}]):Promise.resolve([])}(l,w)),(R||e.includes("MapPosition"))&&D.push(function(e){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"SelectFromMap",address:"SelectFromMap",lat:null,lon:null,properties:{labelId:"select-from-map",layer:"selectFromMap",address:"SelectFromMap",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]):Promise.resolve([])}(l)),e.includes("FutureRoutes")){var F=k(q);D.push(B.default(F,3))}if(e.includes("SelectFromOwnLocations")&&function(e,c,n){var o=c(e);if(o&&o.length>0)return!0;var t=n(e);return t&&t.length>0}(q,p,b)&&D.push(function(e){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"SelectFromOwnLocations",address:"SelectFromOwnLocations",lat:null,lon:null,properties:{labelId:"select-from-own-locations",layer:"ownLocations",address:"selectFromOwnLocations",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]):Promise.resolve([])}(l)),R||e.includes("Locations")){var j=S;if(c.includes("Favourite")){var G=p(q);D.push(function(e,c){return Promise.resolve(be(e,c,["address","name"]).map((function(e){return{type:"FavouritePlace",properties:Y({},e,{label:e.name,layer:"favouritePlace"}),geometry:{type:"Point",coordinates:[e.lon,e.lat]}}})))}(G,l)),c.includes("Back")&&D.push(Promise.resolve([{type:"back",address:"back",lat:null,lon:null,properties:{labelId:"back",layer:"back",address:"back",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]))}if(E||c.includes("Datasource")){var V=y.map((function(e){return"gtfs".concat(e)})),K=v.concat(V).join(",");D.push(he(l,j,x,I,K,_,g,["station","venue","address","street"]))}if(E||c.includes("History")){var Q=d(q,"endpoint"),J=["currentPosition","selectFromMap","futureRoute","ownLocations","bikeRentalStation","stop","back"];J.push.apply(J,me),D.push(Le(Q,l,J))}}if(R||e.includes("Stops")){if(c.includes("Favourite")){var Z,$=b(q);Z=$.every((function(e){return"station"===e.type}))?Oe($,T).then((function(e){return t?t(e,H):e})):f($).then((function(e){return Oe(e,T)})).then((function(e){return t?t(e,H):e})),D.push(function(e,c){return e.then((function(e){return be(e,c,["properties.name","properties.name","properties.address"])}))}(Z,l))}if(E||c.includes("Datasource")){var ee=a&&10!==a?{size:a}:{};(R||e.includes("Locations"))&&(ee.dedupestops=1);var ce=y.map((function(e){return"gtfs".concat(e)})).join(",");D.push(he(l,ee,x,I,ce,_,g,["stop","station"]).then((function(e){return t?t(e,H):e})))}if(E||c.includes("History")){var ne=d(q).filter((function(e){return!e.properties.gid||e.properties.gid.includes("GTFS:")})),oe=["currentPosition","selectFromMap","futureRoute","ownLocations","favouritePlace","bikeRentalStation","back"];oe.push.apply(oe,me),oe.push.apply(oe,qe),n?("route-CITYBIKE"!==n&&(oe.push("bikeRentalStation"),oe.push("bikestation")),D.push(Le(ne,l,oe).then((function(e){return t?t(e,H):e})))):D.push(Le(ne,l,oe))}}if(R||e.includes("Routes")){if(c.includes("Favourite")){var te=L(q);D.push(O(te,l,H,M).then((function(e){return t?t(e,H,"Routes"):e})))}if(D.push(m(l,y,n,M).then((function(e){return t?t(e,H,"Routes"):e}))),E||c.includes("History")){var ae=d(q),ie=["currentPosition","selectFromMap","futureRoute","favouritePlace","stop","station","ownLocations","back"];n&&("route-CITYBIKE"!==n&&(ie.push("bikeRentalStation"),ie.push("bikestation")),ie.push.apply(ie,U(me.filter((function(e){return!(e===n)}))))),ie.push.apply(ie,qe),D.push(Le(ae,l,ie).then((function(e){return t?t(e,H,"Routes"):e})))}}if(R||e.includes("BikeRentalStations")){if(c.includes("Favourite")){var re=h(q);D.push(z(re,l))}if(E||c.includes("Datasource")){var se={size:a};D.push(he(l,se,x,I,C.join(","),_,g,["bikestation"]).then((function(e){return t?t(e,H,"BikeRentalStations"):e})))}}Promise.all(D).then(X.default).then(de).then((function(e){P.results=e})).catch((function(e){P.error=e})).then((function(){r(Y({},P,{results:Me(W,P.results,l)}))}))}),300,{leading:!0});function ge(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function We(e,c){return e(c={exports:{}},c.exports),c.exports}var _e,Te=We((function(e,c){e.exports=function(){var c,n;function o(){return c.apply(null,arguments)}function t(e){c=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e,c){return Object.prototype.hasOwnProperty.call(e,c)}function M(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var c;for(c in e)if(r(e,c))return!1;return!0}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,c){var n,o=[];for(n=0;n<e.length;++n)o.push(c(e[n],n));return o}function d(e,c){for(var n in c)r(c,n)&&(e[n]=c[n]);return r(c,"toString")&&(e.toString=c.toString),r(c,"valueOf")&&(e.valueOf=c.valueOf),e}function b(e,c,n,o){return Vn(e,c,n,o,!0).utc()}function A(){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 f(e){return null==e._pf&&(e._pf=A()),e._pf}function z(e){if(null==e._isValid){var c=f(e),o=n.call(c.parsedDateParts,(function(e){return null!=e})),t=!isNaN(e._d.getTime())&&c.overflow<0&&!c.empty&&!c.invalidEra&&!c.invalidMonth&&!c.invalidWeekday&&!c.weekdayMismatch&&!c.nullInput&&!c.invalidFormat&&!c.userInvalidated&&(!c.meridiem||c.meridiem&&o);if(e._strict&&(t=t&&0===c.charsLeftOver&&0===c.unusedTokens.length&&void 0===c.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return t;e._isValid=t}return e._isValid}function h(e){var c=b(NaN);return null!=e?d(f(c),e):f(c).userInvalidated=!0,c}n=Array.prototype.some?Array.prototype.some:function(e){var c,n=Object(this),o=n.length>>>0;for(c=0;c<o;c++)if(c in n&&e.call(this,n[c],c,n))return!0;return!1};var O=o.momentProperties=[],L=!1;function m(e,c){var n,o,t;if(s(c._isAMomentObject)||(e._isAMomentObject=c._isAMomentObject),s(c._i)||(e._i=c._i),s(c._f)||(e._f=c._f),s(c._l)||(e._l=c._l),s(c._strict)||(e._strict=c._strict),s(c._tzm)||(e._tzm=c._tzm),s(c._isUTC)||(e._isUTC=c._isUTC),s(c._offset)||(e._offset=c._offset),s(c._pf)||(e._pf=f(c)),s(c._locale)||(e._locale=c._locale),O.length>0)for(n=0;n<O.length;n++)s(t=c[o=O[n]])||(e[o]=t);return e}function q(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===L&&(L=!0,o.updateOffset(this),L=!1)}function N(e){return e instanceof q||null!=e&&null!=e._isAMomentObject}function g(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function W(e,c){var n=!0;return d((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){var t,a,i,M=[];for(a=0;a<arguments.length;a++){if(t="","object"==typeof arguments[a]){for(i in t+="\n["+a+"] ",arguments[0])r(arguments[0],i)&&(t+=i+": "+arguments[0][i]+", ");t=t.slice(0,-2)}else t=arguments[a];M.push(t)}g(e+"\nArguments: "+Array.prototype.slice.call(M).join("")+"\n"+(new Error).stack),n=!1}return c.apply(this,arguments)}),c)}var _,T={};function X(e,c){null!=o.deprecationHandler&&o.deprecationHandler(e,c),T[e]||(g(c),T[e]=!0)}function B(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function y(e){var c,n;for(n in e)r(e,n)&&(B(c=e[n])?this[n]=c:this["_"+n]=c);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function S(e,c){var n,o=d({},e);for(n in c)r(c,n)&&(i(e[n])&&i(c[n])?(o[n]={},d(o[n],e[n]),d(o[n],c[n])):null!=c[n]?o[n]=c[n]:delete o[n]);for(n in e)r(e,n)&&!r(c,n)&&i(e[n])&&(o[n]=d({},o[n]));return o}function v(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,_=Object.keys?Object.keys:function(e){var c,n=[];for(c in e)r(e,c)&&n.push(c);return n};var k={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function C(e,c,n){var o=this._calendar[e]||this._calendar.sameElse;return B(o)?o.call(c,n):o}function R(e,c,n){var o=""+Math.abs(e),t=c-o.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t)).toString().substr(1)+o}var E=/(\[[^\[]*\])|(\\)?([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,w=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,D={},P={};function x(e,c,n,o){var t=o;"string"==typeof o&&(t=function(){return this[o]()}),e&&(P[e]=t),c&&(P[c[0]]=function(){return R(t.apply(this,arguments),c[1],c[2])}),n&&(P[n]=function(){return this.localeData().ordinal(t.apply(this,arguments),e)})}function I(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function H(e){var c,n,o=e.match(E);for(c=0,n=o.length;c<n;c++)P[o[c]]?o[c]=P[o[c]]:o[c]=I(o[c]);return function(c){var t,a="";for(t=0;t<n;t++)a+=B(o[t])?o[t].call(c,e):o[t];return a}}function Y(e,c){return e.isValid()?(c=F(c,e.localeData()),D[c]=D[c]||H(c),D[c](e)):e.localeData().invalidDate()}function F(e,c){var n=5;function o(e){return c.longDateFormat(e)||e}for(w.lastIndex=0;n>=0&&w.test(e);)e=e.replace(w,o),w.lastIndex=0,n-=1;return e}var j={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 U(e){var c=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return c||!n?c:(this._longDateFormat[e]=n.match(E).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var G="Invalid date";function V(){return this._invalidDate}var K="%d",Q=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var Z={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 $(e,c,n,o){var t=this._relativeTime[n];return B(t)?t(e,c,n,o):t.replace(/%d/i,e)}function ee(e,c){var n=this._relativeTime[e>0?"future":"past"];return B(n)?n(c):n.replace(/%s/i,c)}var ce={};function ne(e,c){var n=e.toLowerCase();ce[n]=ce[n+"s"]=ce[c]=e}function oe(e){return"string"==typeof e?ce[e]||ce[e.toLowerCase()]:void 0}function te(e){var c,n,o={};for(n in e)r(e,n)&&(c=oe(n))&&(o[c]=e[n]);return o}var ae={};function ie(e,c){ae[e]=c}function re(e){var c,n=[];for(c in e)r(e,c)&&n.push({unit:c,priority:ae[c]});return n.sort((function(e,c){return e.priority-c.priority})),n}function Me(e){return e%4==0&&e%100!=0||e%400==0}function se(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function le(e){var c=+e,n=0;return 0!==c&&isFinite(c)&&(n=se(c)),n}function ue(e,c){return function(n){return null!=n?(de(this,e,n),o.updateOffset(this,c),this):pe(this,e)}}function pe(e,c){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+c]():NaN}function de(e,c,n){e.isValid()&&!isNaN(n)&&("FullYear"===c&&Me(e.year())&&1===e.month()&&29===e.date()?(n=le(n),e._d["set"+(e._isUTC?"UTC":"")+c](n,e.month(),ec(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+c](n))}function be(e){return B(this[e=oe(e)])?this[e]():this}function Ae(e,c){if("object"==typeof e){var n,o=re(e=te(e));for(n=0;n<o.length;n++)this[o[n].unit](e[o[n].unit])}else if(B(this[e=oe(e)]))return this[e](c);return this}var fe,ze=/\d/,he=/\d\d/,Oe=/\d{3}/,Le=/\d{4}/,me=/[+-]?\d{6}/,qe=/\d\d?/,Ne=/\d\d\d\d?/,We=/\d\d\d\d\d\d?/,_e=/\d{1,3}/,Te=/\d{1,4}/,Xe=/[+-]?\d{1,6}/,Be=/\d+/,ye=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,ve=/Z|[+-]\d\d(?::?\d\d)?/gi,ke=/[+-]?\d+(\.\d{1,3})?/,Ce=/[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 Re(e,c,n){fe[e]=B(c)?c:function(e,o){return e&&n?n:c}}function Ee(e,c){return r(fe,e)?fe[e](c._strict,c._locale):new RegExp(we(e))}function we(e){return De(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,c,n,o,t){return c||n||o||t})))}function De(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}fe={};var Pe={};function xe(e,c){var n,o=c;for("string"==typeof e&&(e=[e]),l(c)&&(o=function(e,n){n[c]=le(e)}),n=0;n<e.length;n++)Pe[e[n]]=o}function Ie(e,c){xe(e,(function(e,n,o,t){o._w=o._w||{},c(e,o._w,o,t)}))}function He(e,c,n){null!=c&&r(Pe,e)&&Pe[e](c,n._a,n,e)}var Ye,Fe=0,je=1,Ue=2,Ge=3,Ve=4,Ke=5,Qe=6,Je=7,Ze=8;function $e(e,c){return(e%c+c)%c}function ec(e,c){if(isNaN(e)||isNaN(c))return NaN;var n=$e(c,12);return e+=(c-n)/12,1===n?Me(e)?29:28:31-n%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var c;for(c=0;c<this.length;++c)if(this[c]===e)return c;return-1},x("M",["MM",2],"Mo",(function(){return this.month()+1})),x("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),x("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),ie("month",8),Re("M",qe),Re("MM",qe,he),Re("MMM",(function(e,c){return c.monthsShortRegex(e)})),Re("MMMM",(function(e,c){return c.monthsRegex(e)})),xe(["M","MM"],(function(e,c){c[je]=le(e)-1})),xe(["MMM","MMMM"],(function(e,c,n,o){var t=n._locale.monthsParse(e,o,n._strict);null!=t?c[je]=t:f(n).invalidMonth=e}));var cc="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nc="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),oc=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,tc=Ce,ac=Ce;function ic(e,c){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||oc).test(c)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function rc(e,c){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[oc.test(c)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Mc(e,c,n){var o,t,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)a=b([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===c?-1!==(t=Ye.call(this._shortMonthsParse,i))?t:null:-1!==(t=Ye.call(this._longMonthsParse,i))?t:null:"MMM"===c?-1!==(t=Ye.call(this._shortMonthsParse,i))||-1!==(t=Ye.call(this._longMonthsParse,i))?t:null:-1!==(t=Ye.call(this._longMonthsParse,i))||-1!==(t=Ye.call(this._shortMonthsParse,i))?t:null}function sc(e,c,n){var o,t,a;if(this._monthsParseExact)return Mc.call(this,e,c,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(t=b([2e3,o]),n&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(t,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(t,"").replace(".","")+"$","i")),n||this._monthsParse[o]||(a="^"+this.months(t,"")+"|^"+this.monthsShort(t,""),this._monthsParse[o]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===c&&this._longMonthsParse[o].test(e))return o;if(n&&"MMM"===c&&this._shortMonthsParse[o].test(e))return o;if(!n&&this._monthsParse[o].test(e))return o}}function lc(e,c){var n;if(!e.isValid())return e;if("string"==typeof c)if(/^\d+$/.test(c))c=le(c);else if(!l(c=e.localeData().monthsParse(c)))return e;return n=Math.min(e.date(),ec(e.year(),c)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](c,n),e}function uc(e){return null!=e?(lc(this,e),o.updateOffset(this,!0),this):pe(this,"Month")}function pc(){return ec(this.year(),this.month())}function dc(e){return this._monthsParseExact?(r(this,"_monthsRegex")||Ac.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(r(this,"_monthsShortRegex")||(this._monthsShortRegex=tc),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function bc(e){return this._monthsParseExact?(r(this,"_monthsRegex")||Ac.call(this),e?this._monthsStrictRegex:this._monthsRegex):(r(this,"_monthsRegex")||(this._monthsRegex=ac),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Ac(){function e(e,c){return c.length-e.length}var c,n,o=[],t=[],a=[];for(c=0;c<12;c++)n=b([2e3,c]),o.push(this.monthsShort(n,"")),t.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(o.sort(e),t.sort(e),a.sort(e),c=0;c<12;c++)o[c]=De(o[c]),t[c]=De(t[c]);for(c=0;c<24;c++)a[c]=De(a[c]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function fc(e){return Me(e)?366:365}x("Y",0,0,(function(){var e=this.year();return e<=9999?R(e,4):"+"+e})),x(0,["YY",2],0,(function(){return this.year()%100})),x(0,["YYYY",4],0,"year"),x(0,["YYYYY",5],0,"year"),x(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),ie("year",1),Re("Y",ye),Re("YY",qe,he),Re("YYYY",Te,Le),Re("YYYYY",Xe,me),Re("YYYYYY",Xe,me),xe(["YYYYY","YYYYYY"],Fe),xe("YYYY",(function(e,c){c[Fe]=2===e.length?o.parseTwoDigitYear(e):le(e)})),xe("YY",(function(e,c){c[Fe]=o.parseTwoDigitYear(e)})),xe("Y",(function(e,c){c[Fe]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return le(e)+(le(e)>68?1900:2e3)};var zc=ue("FullYear",!0);function hc(){return Me(this.year())}function Oc(e,c,n,o,t,a,i){var r;return e<100&&e>=0?(r=new Date(e+400,c,n,o,t,a,i),isFinite(r.getFullYear())&&r.setFullYear(e)):r=new Date(e,c,n,o,t,a,i),r}function Lc(e){var c,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,c=new Date(Date.UTC.apply(null,n)),isFinite(c.getUTCFullYear())&&c.setUTCFullYear(e)):c=new Date(Date.UTC.apply(null,arguments)),c}function mc(e,c,n){var o=7+c-n;return-(7+Lc(e,0,o).getUTCDay()-c)%7+o-1}function qc(e,c,n,o,t){var a,i,r=1+7*(c-1)+(7+n-o)%7+mc(e,o,t);return r<=0?i=fc(a=e-1)+r:r>fc(e)?(a=e+1,i=r-fc(e)):(a=e,i=r),{year:a,dayOfYear:i}}function Nc(e,c,n){var o,t,a=mc(e.year(),c,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?o=i+gc(t=e.year()-1,c,n):i>gc(e.year(),c,n)?(o=i-gc(e.year(),c,n),t=e.year()+1):(t=e.year(),o=i),{week:o,year:t}}function gc(e,c,n){var o=mc(e,c,n),t=mc(e+1,c,n);return(fc(e)-o+t)/7}function Wc(e){return Nc(e,this._week.dow,this._week.doy).week}x("w",["ww",2],"wo","week"),x("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ie("week",5),ie("isoWeek",5),Re("w",qe),Re("ww",qe,he),Re("W",qe),Re("WW",qe,he),Ie(["w","ww","W","WW"],(function(e,c,n,o){c[o.substr(0,1)]=le(e)}));var _c={dow:0,doy:6};function Tc(){return this._week.dow}function Xc(){return this._week.doy}function Bc(e){var c=this.localeData().week(this);return null==e?c:this.add(7*(e-c),"d")}function yc(e){var c=Nc(this,1,4).week;return null==e?c:this.add(7*(e-c),"d")}function Sc(e,c){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=c.weekdaysParse(e))?e:null:parseInt(e,10)}function vc(e,c){return"string"==typeof e?c.weekdaysParse(e)%7||7:isNaN(e)?null:e}function kc(e,c){return e.slice(c,7).concat(e.slice(0,c))}x("d",0,"do","day"),x("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),x("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),x("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),x("e",0,0,"weekday"),x("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ie("day",11),ie("weekday",11),ie("isoWeekday",11),Re("d",qe),Re("e",qe),Re("E",qe),Re("dd",(function(e,c){return c.weekdaysMinRegex(e)})),Re("ddd",(function(e,c){return c.weekdaysShortRegex(e)})),Re("dddd",(function(e,c){return c.weekdaysRegex(e)})),Ie(["dd","ddd","dddd"],(function(e,c,n,o){var t=n._locale.weekdaysParse(e,o,n._strict);null!=t?c.d=t:f(n).invalidWeekday=e})),Ie(["d","e","E"],(function(e,c,n,o){c[o]=le(e)}));var Cc="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rc="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ec="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),wc=Ce,Dc=Ce,Pc=Ce;function xc(e,c){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(c)?"format":"standalone"];return!0===e?kc(n,this._week.dow):e?n[e.day()]:n}function Ic(e){return!0===e?kc(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Hc(e){return!0===e?kc(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Yc(e,c,n){var o,t,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)a=b([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===c?-1!==(t=Ye.call(this._weekdaysParse,i))?t:null:"ddd"===c?-1!==(t=Ye.call(this._shortWeekdaysParse,i))?t:null:-1!==(t=Ye.call(this._minWeekdaysParse,i))?t:null:"dddd"===c?-1!==(t=Ye.call(this._weekdaysParse,i))||-1!==(t=Ye.call(this._shortWeekdaysParse,i))||-1!==(t=Ye.call(this._minWeekdaysParse,i))?t:null:"ddd"===c?-1!==(t=Ye.call(this._shortWeekdaysParse,i))||-1!==(t=Ye.call(this._weekdaysParse,i))||-1!==(t=Ye.call(this._minWeekdaysParse,i))?t:null:-1!==(t=Ye.call(this._minWeekdaysParse,i))||-1!==(t=Ye.call(this._weekdaysParse,i))||-1!==(t=Ye.call(this._shortWeekdaysParse,i))?t:null}function Fc(e,c,n){var o,t,a;if(this._weekdaysParseExact)return Yc.call(this,e,c,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(t=b([2e3,1]).day(o),n&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(t,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(t,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(t,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(a="^"+this.weekdays(t,"")+"|^"+this.weekdaysShort(t,"")+"|^"+this.weekdaysMin(t,""),this._weekdaysParse[o]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===c&&this._fullWeekdaysParse[o].test(e))return o;if(n&&"ddd"===c&&this._shortWeekdaysParse[o].test(e))return o;if(n&&"dd"===c&&this._minWeekdaysParse[o].test(e))return o;if(!n&&this._weekdaysParse[o].test(e))return o}}function jc(e){if(!this.isValid())return null!=e?this:NaN;var c=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Sc(e,this.localeData()),this.add(e-c,"d")):c}function Uc(e){if(!this.isValid())return null!=e?this:NaN;var c=(this.day()+7-this.localeData()._week.dow)%7;return null==e?c:this.add(e-c,"d")}function Gc(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var c=vc(e,this.localeData());return this.day(this.day()%7?c:c-7)}return this.day()||7}function Vc(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Jc.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(r(this,"_weekdaysRegex")||(this._weekdaysRegex=wc),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Kc(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Jc.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(r(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Dc),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Qc(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Jc.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(r(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Pc),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Jc(){function e(e,c){return c.length-e.length}var c,n,o,t,a,i=[],r=[],M=[],s=[];for(c=0;c<7;c++)n=b([2e3,1]).day(c),o=De(this.weekdaysMin(n,"")),t=De(this.weekdaysShort(n,"")),a=De(this.weekdays(n,"")),i.push(o),r.push(t),M.push(a),s.push(o),s.push(t),s.push(a);i.sort(e),r.sort(e),M.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+M.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Zc(){return this.hours()%12||12}function $c(){return this.hours()||24}function en(e,c){x(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),c)}))}function cn(e,c){return c._meridiemParse}function nn(e){return"p"===(e+"").toLowerCase().charAt(0)}x("H",["HH",2],0,"hour"),x("h",["hh",2],0,Zc),x("k",["kk",2],0,$c),x("hmm",0,0,(function(){return""+Zc.apply(this)+R(this.minutes(),2)})),x("hmmss",0,0,(function(){return""+Zc.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),x("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),x("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),en("a",!0),en("A",!1),ne("hour","h"),ie("hour",13),Re("a",cn),Re("A",cn),Re("H",qe),Re("h",qe),Re("k",qe),Re("HH",qe,he),Re("hh",qe,he),Re("kk",qe,he),Re("hmm",Ne),Re("hmmss",We),Re("Hmm",Ne),Re("Hmmss",We),xe(["H","HH"],Ge),xe(["k","kk"],(function(e,c,n){var o=le(e);c[Ge]=24===o?0:o})),xe(["a","A"],(function(e,c,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),xe(["h","hh"],(function(e,c,n){c[Ge]=le(e),f(n).bigHour=!0})),xe("hmm",(function(e,c,n){var o=e.length-2;c[Ge]=le(e.substr(0,o)),c[Ve]=le(e.substr(o)),f(n).bigHour=!0})),xe("hmmss",(function(e,c,n){var o=e.length-4,t=e.length-2;c[Ge]=le(e.substr(0,o)),c[Ve]=le(e.substr(o,2)),c[Ke]=le(e.substr(t)),f(n).bigHour=!0})),xe("Hmm",(function(e,c,n){var o=e.length-2;c[Ge]=le(e.substr(0,o)),c[Ve]=le(e.substr(o))})),xe("Hmmss",(function(e,c,n){var o=e.length-4,t=e.length-2;c[Ge]=le(e.substr(0,o)),c[Ve]=le(e.substr(o,2)),c[Ke]=le(e.substr(t))}));var on=/[ap]\.?m?\.?/i,tn=ue("Hours",!0);function an(e,c,n){return e>11?n?"pm":"PM":n?"am":"AM"}var rn,Mn={calendar:k,longDateFormat:j,invalidDate:G,ordinal:K,dayOfMonthOrdinalParse:Q,relativeTime:Z,months:cc,monthsShort:nc,week:_c,weekdays:Cc,weekdaysMin:Ec,weekdaysShort:Rc,meridiemParse:on},sn={},ln={};function un(e,c){var n,o=Math.min(e.length,c.length);for(n=0;n<o;n+=1)if(e[n]!==c[n])return n;return o}function pn(e){return e?e.toLowerCase().replace("_","-"):e}function dn(e){for(var c,n,o,t,a=0;a<e.length;){for(c=(t=pn(e[a]).split("-")).length,n=(n=pn(e[a+1]))?n.split("-"):null;c>0;){if(o=bn(t.slice(0,c).join("-")))return o;if(n&&n.length>=c&&un(t,n)>=c-1)break;c--}a++}return rn}function bn(c){var n=null;if(void 0===sn[c]&&e&&e.exports)try{n=rn._abbr,ge(),An(n)}catch(e){sn[c]=null}return sn[c]}function An(e,c){var n;return e&&((n=s(c)?hn(e):fn(e,c))?rn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rn._abbr}function fn(e,c){if(null!==c){var n,o=Mn;if(c.abbr=e,null!=sn[e])X("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."),o=sn[e]._config;else if(null!=c.parentLocale)if(null!=sn[c.parentLocale])o=sn[c.parentLocale]._config;else{if(null==(n=bn(c.parentLocale)))return ln[c.parentLocale]||(ln[c.parentLocale]=[]),ln[c.parentLocale].push({name:e,config:c}),null;o=n._config}return sn[e]=new v(S(o,c)),ln[e]&&ln[e].forEach((function(e){fn(e.name,e.config)})),An(e),sn[e]}return delete sn[e],null}function zn(e,c){if(null!=c){var n,o,t=Mn;null!=sn[e]&&null!=sn[e].parentLocale?sn[e].set(S(sn[e]._config,c)):(null!=(o=bn(e))&&(t=o._config),c=S(t,c),null==o&&(c.abbr=e),(n=new v(c)).parentLocale=sn[e],sn[e]=n),An(e)}else null!=sn[e]&&(null!=sn[e].parentLocale?(sn[e]=sn[e].parentLocale,e===An()&&An(e)):null!=sn[e]&&delete sn[e]);return sn[e]}function hn(e){var c;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rn;if(!a(e)){if(c=bn(e))return c;e=[e]}return dn(e)}function On(){return _(sn)}function Ln(e){var c,n=e._a;return n&&-2===f(e).overflow&&(c=n[je]<0||n[je]>11?je:n[Ue]<1||n[Ue]>ec(n[Fe],n[je])?Ue:n[Ge]<0||n[Ge]>24||24===n[Ge]&&(0!==n[Ve]||0!==n[Ke]||0!==n[Qe])?Ge:n[Ve]<0||n[Ve]>59?Ve:n[Ke]<0||n[Ke]>59?Ke:n[Qe]<0||n[Qe]>999?Qe:-1,f(e)._overflowDayOfYear&&(c<Fe||c>Ue)&&(c=Ue),f(e)._overflowWeeks&&-1===c&&(c=Je),f(e)._overflowWeekday&&-1===c&&(c=Ze),f(e).overflow=c),e}var mn=/^\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)?)?$/,qn=/^\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)?)?$/,Nn=/Z|[+-]\d\d(?::?\d\d)?/,gn=[["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]],Wn=[["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/]],_n=/^\/?Date\((-?\d+)/i,Tn=/^(?:(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}))$/,Xn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Bn(e){var c,n,o,t,a,i,r=e._i,M=mn.exec(r)||qn.exec(r);if(M){for(f(e).iso=!0,c=0,n=gn.length;c<n;c++)if(gn[c][1].exec(M[1])){t=gn[c][0],o=!1!==gn[c][2];break}if(null==t)return void(e._isValid=!1);if(M[3]){for(c=0,n=Wn.length;c<n;c++)if(Wn[c][1].exec(M[3])){a=(M[2]||" ")+Wn[c][0];break}if(null==a)return void(e._isValid=!1)}if(!o&&null!=a)return void(e._isValid=!1);if(M[4]){if(!Nn.exec(M[4]))return void(e._isValid=!1);i="Z"}e._f=t+(a||"")+(i||""),In(e)}else e._isValid=!1}function yn(e,c,n,o,t,a){var i=[Sn(e),nc.indexOf(c),parseInt(n,10),parseInt(o,10),parseInt(t,10)];return a&&i.push(parseInt(a,10)),i}function Sn(e){var c=parseInt(e,10);return c<=49?2e3+c:c<=999?1900+c:c}function vn(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kn(e,c,n){return!e||Rc.indexOf(e)===new Date(c[0],c[1],c[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Cn(e,c,n){if(e)return Xn[e];if(c)return 0;var o=parseInt(n,10),t=o%100;return(o-t)/100*60+t}function Rn(e){var c,n=Tn.exec(vn(e._i));if(n){if(c=yn(n[4],n[3],n[2],n[5],n[6],n[7]),!kn(n[1],c,e))return;e._a=c,e._tzm=Cn(n[8],n[9],n[10]),e._d=Lc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function En(e){var c=_n.exec(e._i);null===c?(Bn(e),!1===e._isValid&&(delete e._isValid,Rn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:o.createFromInputFallback(e)))):e._d=new Date(+c[1])}function wn(e,c,n){return null!=e?e:null!=c?c:n}function Dn(e){var c=new Date(o.now());return e._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function Pn(e){var c,n,o,t,a,i=[];if(!e._d){for(o=Dn(e),e._w&&null==e._a[Ue]&&null==e._a[je]&&xn(e),null!=e._dayOfYear&&(a=wn(e._a[Fe],o[Fe]),(e._dayOfYear>fc(a)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),n=Lc(a,0,e._dayOfYear),e._a[je]=n.getUTCMonth(),e._a[Ue]=n.getUTCDate()),c=0;c<3&&null==e._a[c];++c)e._a[c]=i[c]=o[c];for(;c<7;c++)e._a[c]=i[c]=null==e._a[c]?2===c?1:0:e._a[c];24===e._a[Ge]&&0===e._a[Ve]&&0===e._a[Ke]&&0===e._a[Qe]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?Lc:Oc).apply(null,i),t=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!==t&&(f(e).weekdayMismatch=!0)}}function xn(e){var c,n,o,t,a,i,r,M,s;null!=(c=e._w).GG||null!=c.W||null!=c.E?(a=1,i=4,n=wn(c.GG,e._a[Fe],Nc(Kn(),1,4).year),o=wn(c.W,1),((t=wn(c.E,1))<1||t>7)&&(M=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,s=Nc(Kn(),a,i),n=wn(c.gg,e._a[Fe],s.year),o=wn(c.w,s.week),null!=c.d?((t=c.d)<0||t>6)&&(M=!0):null!=c.e?(t=c.e+a,(c.e<0||c.e>6)&&(M=!0)):t=a),o<1||o>gc(n,a,i)?f(e)._overflowWeeks=!0:null!=M?f(e)._overflowWeekday=!0:(r=qc(n,o,t,a,i),e._a[Fe]=r.year,e._dayOfYear=r.dayOfYear)}function In(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],f(e).empty=!0;var c,n,t,a,i,r,M=""+e._i,s=M.length,l=0;for(t=F(e._f,e._locale).match(E)||[],c=0;c<t.length;c++)a=t[c],(n=(M.match(Ee(a,e))||[])[0])&&((i=M.substr(0,M.indexOf(n))).length>0&&f(e).unusedInput.push(i),M=M.slice(M.indexOf(n)+n.length),l+=n.length),P[a]?(n?f(e).empty=!1:f(e).unusedTokens.push(a),He(a,n,e)):e._strict&&!n&&f(e).unusedTokens.push(a);f(e).charsLeftOver=s-l,M.length>0&&f(e).unusedInput.push(M),e._a[Ge]<=12&&!0===f(e).bigHour&&e._a[Ge]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[Ge]=Hn(e._locale,e._a[Ge],e._meridiem),null!==(r=f(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(r,e._a[Fe])),Pn(e),Ln(e)}else Rn(e);else Bn(e)}function Hn(e,c,n){var o;return null==n?c:null!=e.meridiemHour?e.meridiemHour(c,n):null!=e.isPM?((o=e.isPM(n))&&c<12&&(c+=12),o||12!==c||(c=0),c):c}function Yn(e){var c,n,o,t,a,i,r=!1;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(t=0;t<e._f.length;t++)a=0,i=!1,c=m({},e),null!=e._useUTC&&(c._useUTC=e._useUTC),c._f=e._f[t],In(c),z(c)&&(i=!0),a+=f(c).charsLeftOver,a+=10*f(c).unusedTokens.length,f(c).score=a,r?a<o&&(o=a,n=c):(null==o||a<o||i)&&(o=a,n=c,i&&(r=!0));d(e,n||c)}function Fn(e){if(!e._d){var c=te(e._i),n=void 0===c.day?c.date:c.day;e._a=p([c.year,c.month,n,c.hour,c.minute,c.second,c.millisecond],(function(e){return e&&parseInt(e,10)})),Pn(e)}}function jn(e){var c=new q(Ln(Un(e)));return c._nextDay&&(c.add(1,"d"),c._nextDay=void 0),c}function Un(e){var c=e._i,n=e._f;return e._locale=e._locale||hn(e._l),null===c||void 0===n&&""===c?h({nullInput:!0}):("string"==typeof c&&(e._i=c=e._locale.preparse(c)),N(c)?new q(Ln(c)):(u(c)?e._d=c:a(n)?Yn(e):n?In(e):Gn(e),z(e)||(e._d=null),e))}function Gn(e){var c=e._i;s(c)?e._d=new Date(o.now()):u(c)?e._d=new Date(c.valueOf()):"string"==typeof c?En(e):a(c)?(e._a=p(c.slice(0),(function(e){return parseInt(e,10)})),Pn(e)):i(c)?Fn(e):l(c)?e._d=new Date(c):o.createFromInputFallback(e)}function Vn(e,c,n,o,t){var r={};return!0!==c&&!1!==c||(o=c,c=void 0),!0!==n&&!1!==n||(o=n,n=void 0),(i(e)&&M(e)||a(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=t,r._l=n,r._i=e,r._f=c,r._strict=o,jn(r)}function Kn(e,c,n,o){return Vn(e,c,n,o,!1)}o.createFromInputFallback=W("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":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var Qn=W("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:h()})),Jn=W("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:h()}));function Zn(e,c){var n,o;if(1===c.length&&a(c[0])&&(c=c[0]),!c.length)return Kn();for(n=c[0],o=1;o<c.length;++o)c[o].isValid()&&!c[o][e](n)||(n=c[o]);return n}function $n(){return Zn("isBefore",[].slice.call(arguments,0))}function eo(){return Zn("isAfter",[].slice.call(arguments,0))}var co=function(){return Date.now?Date.now():+new Date},no=["year","quarter","month","week","day","hour","minute","second","millisecond"];function oo(e){var c,n,o=!1;for(c in e)if(r(e,c)&&(-1===Ye.call(no,c)||null!=e[c]&&isNaN(e[c])))return!1;for(n=0;n<no.length;++n)if(e[no[n]]){if(o)return!1;parseFloat(e[no[n]])!==le(e[no[n]])&&(o=!0)}return!0}function to(){return this._isValid}function ao(){return Bo(NaN)}function io(e){var c=te(e),n=c.year||0,o=c.quarter||0,t=c.month||0,a=c.week||c.isoWeek||0,i=c.day||0,r=c.hour||0,M=c.minute||0,s=c.second||0,l=c.millisecond||0;this._isValid=oo(c),this._milliseconds=+l+1e3*s+6e4*M+1e3*r*60*60,this._days=+i+7*a,this._months=+t+3*o+12*n,this._data={},this._locale=hn(),this._bubble()}function ro(e){return e instanceof io}function Mo(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function so(e,c,n){var o,t=Math.min(e.length,c.length),a=Math.abs(e.length-c.length),i=0;for(o=0;o<t;o++)(n&&e[o]!==c[o]||!n&&le(e[o])!==le(c[o]))&&i++;return i+a}function lo(e,c){x(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+R(~~(e/60),2)+c+R(~~e%60,2)}))}lo("Z",":"),lo("ZZ",""),Re("Z",ve),Re("ZZ",ve),xe(["Z","ZZ"],(function(e,c,n){n._useUTC=!0,n._tzm=po(ve,e)}));var uo=/([\+\-]|\d\d)/gi;function po(e,c){var n,o,t=(c||"").match(e);return null===t?null:0===(o=60*(n=((t[t.length-1]||[])+"").match(uo)||["-",0,0])[1]+le(n[2]))?0:"+"===n[0]?o:-o}function bo(e,c){var n,t;return c._isUTC?(n=c.clone(),t=(N(e)||u(e)?e.valueOf():Kn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+t),o.updateOffset(n,!1),n):Kn(e).local()}function Ao(e){return-Math.round(e._d.getTimezoneOffset())}function fo(e,c,n){var t,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=po(ve,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&c&&(t=Ao(this)),this._offset=e,this._isUTC=!0,null!=t&&this.add(t,"m"),a!==e&&(!c||this._changeInProgress?Co(this,Bo(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Ao(this)}function zo(e,c){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,c),this):-this.utcOffset()}function ho(e){return this.utcOffset(0,e)}function Oo(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ao(this),"m")),this}function Lo(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=po(Se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function mo(e){return!!this.isValid()&&(e=e?Kn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function qo(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function No(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e,c={};return m(c,this),(c=Un(c))._a?(e=c._isUTC?b(c._a):Kn(c._a),this._isDSTShifted=this.isValid()&&so(c._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function go(){return!!this.isValid()&&!this._isUTC}function Wo(){return!!this.isValid()&&this._isUTC}function _o(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var To=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Xo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Bo(e,c){var n,o,t,a=e,i=null;return ro(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(a={},c?a[c]=+e:a.milliseconds=+e):(i=To.exec(e))?(n="-"===i[1]?-1:1,a={y:0,d:le(i[Ue])*n,h:le(i[Ge])*n,m:le(i[Ve])*n,s:le(i[Ke])*n,ms:le(Mo(1e3*i[Qe]))*n}):(i=Xo.exec(e))?(n="-"===i[1]?-1:1,a={y:yo(i[2],n),M:yo(i[3],n),w:yo(i[4],n),d:yo(i[5],n),h:yo(i[6],n),m:yo(i[7],n),s:yo(i[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(t=vo(Kn(a.from),Kn(a.to)),(a={}).ms=t.milliseconds,a.M=t.months),o=new io(a),ro(e)&&r(e,"_locale")&&(o._locale=e._locale),ro(e)&&r(e,"_isValid")&&(o._isValid=e._isValid),o}function yo(e,c){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*c}function So(e,c){var n={};return n.months=c.month()-e.month()+12*(c.year()-e.year()),e.clone().add(n.months,"M").isAfter(c)&&--n.months,n.milliseconds=+c-+e.clone().add(n.months,"M"),n}function vo(e,c){var n;return e.isValid()&&c.isValid()?(c=bo(c,e),e.isBefore(c)?n=So(e,c):((n=So(c,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function ko(e,c){return function(n,o){var t;return null===o||isNaN(+o)||(X(c,"moment()."+c+"(period, number) is deprecated. Please use moment()."+c+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),t=n,n=o,o=t),Co(this,Bo(n,o),e),this}}function Co(e,c,n,t){var a=c._milliseconds,i=Mo(c._days),r=Mo(c._months);e.isValid()&&(t=null==t||t,r&&lc(e,pe(e,"Month")+r*n),i&&de(e,"Date",pe(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),t&&o.updateOffset(e,i||r))}Bo.fn=io.prototype,Bo.invalid=ao;var Ro=ko(1,"add"),Eo=ko(-1,"subtract");function wo(e){return"string"==typeof e||e instanceof String}function Do(e){return N(e)||u(e)||wo(e)||l(e)||xo(e)||Po(e)||null==e}function Po(e){var c,n,o=i(e)&&!M(e),t=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(c=0;c<a.length;c+=1)n=a[c],t=t||r(e,n);return o&&t}function xo(e){var c=a(e),n=!1;return c&&(n=0===e.filter((function(c){return!l(c)&&wo(e)})).length),c&&n}function Io(e){var c,n,o=i(e)&&!M(e),t=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(c=0;c<a.length;c+=1)n=a[c],t=t||r(e,n);return o&&t}function Ho(e,c){var n=e.diff(c,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Yo(e,c){1===arguments.length&&(arguments[0]?Do(arguments[0])?(e=arguments[0],c=void 0):Io(arguments[0])&&(c=arguments[0],e=void 0):(e=void 0,c=void 0));var n=e||Kn(),t=bo(n,this).startOf("day"),a=o.calendarFormat(this,t)||"sameElse",i=c&&(B(c[a])?c[a].call(this,n):c[a]);return this.format(i||this.localeData().calendar(a,this,Kn(n)))}function Fo(){return new q(this)}function jo(e,c){var n=N(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(c=oe(c)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(c).valueOf())}function Uo(e,c){var n=N(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(c=oe(c)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(c).valueOf()<n.valueOf())}function Go(e,c,n,o){var t=N(e)?e:Kn(e),a=N(c)?c:Kn(c);return!!(this.isValid()&&t.isValid()&&a.isValid())&&("("===(o=o||"()")[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===o[1]?this.isBefore(a,n):!this.isAfter(a,n))}function Vo(e,c){var n,o=N(e)?e:Kn(e);return!(!this.isValid()||!o.isValid())&&("millisecond"===(c=oe(c)||"millisecond")?this.valueOf()===o.valueOf():(n=o.valueOf(),this.clone().startOf(c).valueOf()<=n&&n<=this.clone().endOf(c).valueOf()))}function Ko(e,c){return this.isSame(e,c)||this.isAfter(e,c)}function Qo(e,c){return this.isSame(e,c)||this.isBefore(e,c)}function Jo(e,c,n){var o,t,a;if(!this.isValid())return NaN;if(!(o=bo(e,this)).isValid())return NaN;switch(t=6e4*(o.utcOffset()-this.utcOffset()),c=oe(c)){case"year":a=Zo(this,o)/12;break;case"month":a=Zo(this,o);break;case"quarter":a=Zo(this,o)/3;break;case"second":a=(this-o)/1e3;break;case"minute":a=(this-o)/6e4;break;case"hour":a=(this-o)/36e5;break;case"day":a=(this-o-t)/864e5;break;case"week":a=(this-o-t)/6048e5;break;default:a=this-o}return n?a:se(a)}function Zo(e,c){if(e.date()<c.date())return-Zo(c,e);var n=12*(c.year()-e.year())+(c.month()-e.month()),o=e.clone().add(n,"months");return-(n+(c-o<0?(c-o)/(o-e.clone().add(n-1,"months")):(c-o)/(e.clone().add(n+1,"months")-o)))||0}function $o(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function et(e){if(!this.isValid())return null;var c=!0!==e,n=c?this.clone().utc():this;return n.year()<0||n.year()>9999?Y(n,c?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):B(Date.prototype.toISOString)?c?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Y(n,"Z")):Y(n,c?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ct(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,c,n,o,t="moment",a="";return this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+t+'("]',c=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",o=a+'[")]',this.format(e+c+n+o)}function nt(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var c=Y(this,e);return this.localeData().postformat(c)}function ot(e,c){return this.isValid()&&(N(e)&&e.isValid()||Kn(e).isValid())?Bo({to:this,from:e}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()}function tt(e){return this.from(Kn(),e)}function at(e,c){return this.isValid()&&(N(e)&&e.isValid()||Kn(e).isValid())?Bo({from:this,to:e}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()}function it(e){return this.to(Kn(),e)}function rt(e){var c;return void 0===e?this._locale._abbr:(null!=(c=hn(e))&&(this._locale=c),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Mt=W("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 st(){return this._locale}var lt=1e3,ut=60*lt,pt=60*ut,dt=3506328*pt;function bt(e,c){return(e%c+c)%c}function At(e,c,n){return e<100&&e>=0?new Date(e+400,c,n)-dt:new Date(e,c,n).valueOf()}function ft(e,c,n){return e<100&&e>=0?Date.UTC(e+400,c,n)-dt:Date.UTC(e,c,n)}function zt(e){var c,n;if(void 0===(e=oe(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?ft:At,e){case"year":c=n(this.year(),0,1);break;case"quarter":c=n(this.year(),this.month()-this.month()%3,1);break;case"month":c=n(this.year(),this.month(),1);break;case"week":c=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":c=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":c=n(this.year(),this.month(),this.date());break;case"hour":c=this._d.valueOf(),c-=bt(c+(this._isUTC?0:this.utcOffset()*ut),pt);break;case"minute":c=this._d.valueOf(),c-=bt(c,ut);break;case"second":c=this._d.valueOf(),c-=bt(c,lt)}return this._d.setTime(c),o.updateOffset(this,!0),this}function ht(e){var c,n;if(void 0===(e=oe(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?ft:At,e){case"year":c=n(this.year()+1,0,1)-1;break;case"quarter":c=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":c=n(this.year(),this.month()+1,1)-1;break;case"week":c=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":c=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":c=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":c=this._d.valueOf(),c+=pt-bt(c+(this._isUTC?0:this.utcOffset()*ut),pt)-1;break;case"minute":c=this._d.valueOf(),c+=ut-bt(c,ut)-1;break;case"second":c=this._d.valueOf(),c+=lt-bt(c,lt)-1}return this._d.setTime(c),o.updateOffset(this,!0),this}function Ot(){return this._d.valueOf()-6e4*(this._offset||0)}function Lt(){return Math.floor(this.valueOf()/1e3)}function mt(){return new Date(this.valueOf())}function qt(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Nt(){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 gt(){return this.isValid()?this.toISOString():null}function Wt(){return z(this)}function _t(){return d({},f(this))}function Tt(){return f(this).overflow}function Xt(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Bt(e,c){var n,t,a,i=this._eras||hn("en")._eras;for(n=0,t=i.length;n<t;++n)switch("string"==typeof i[n].since&&(a=o(i[n].since).startOf("day"),i[n].since=a.valueOf()),typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=o(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}return i}function yt(e,c,n){var o,t,a,i,r,M=this.eras();for(e=e.toUpperCase(),o=0,t=M.length;o<t;++o)if(a=M[o].name.toUpperCase(),i=M[o].abbr.toUpperCase(),r=M[o].narrow.toUpperCase(),n)switch(c){case"N":case"NN":case"NNN":if(i===e)return M[o];break;case"NNNN":if(a===e)return M[o];break;case"NNNNN":if(r===e)return M[o]}else if([a,i,r].indexOf(e)>=0)return M[o]}function St(e,c){var n=e.since<=e.until?1:-1;return void 0===c?o(e.since).year():o(e.since).year()+(c-e.offset)*n}function vt(){var e,c,n,o=this.localeData().eras();for(e=0,c=o.length;e<c;++e){if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until)return o[e].name;if(o[e].until<=n&&n<=o[e].since)return o[e].name}return""}function kt(){var e,c,n,o=this.localeData().eras();for(e=0,c=o.length;e<c;++e){if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until)return o[e].narrow;if(o[e].until<=n&&n<=o[e].since)return o[e].narrow}return""}function Ct(){var e,c,n,o=this.localeData().eras();for(e=0,c=o.length;e<c;++e){if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until)return o[e].abbr;if(o[e].until<=n&&n<=o[e].since)return o[e].abbr}return""}function Rt(){var e,c,n,t,a=this.localeData().eras();for(e=0,c=a.length;e<c;++e)if(n=a[e].since<=a[e].until?1:-1,t=this.clone().startOf("day").valueOf(),a[e].since<=t&&t<=a[e].until||a[e].until<=t&&t<=a[e].since)return(this.year()-o(a[e].since).year())*n+a[e].offset;return this.year()}function Et(e){return r(this,"_erasNameRegex")||Yt.call(this),e?this._erasNameRegex:this._erasRegex}function wt(e){return r(this,"_erasAbbrRegex")||Yt.call(this),e?this._erasAbbrRegex:this._erasRegex}function Dt(e){return r(this,"_erasNarrowRegex")||Yt.call(this),e?this._erasNarrowRegex:this._erasRegex}function Pt(e,c){return c.erasAbbrRegex(e)}function xt(e,c){return c.erasNameRegex(e)}function It(e,c){return c.erasNarrowRegex(e)}function Ht(e,c){return c._eraYearOrdinalRegex||Be}function Yt(){var e,c,n=[],o=[],t=[],a=[],i=this.eras();for(e=0,c=i.length;e<c;++e)o.push(De(i[e].name)),n.push(De(i[e].abbr)),t.push(De(i[e].narrow)),a.push(De(i[e].name)),a.push(De(i[e].abbr)),a.push(De(i[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}function Ft(e,c){x(0,[e,e.length],0,c)}function jt(e){return Jt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ut(e){return Jt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Gt(){return gc(this.year(),1,4)}function Vt(){return gc(this.isoWeekYear(),1,4)}function Kt(){var e=this.localeData()._week;return gc(this.year(),e.dow,e.doy)}function Qt(){var e=this.localeData()._week;return gc(this.weekYear(),e.dow,e.doy)}function Jt(e,c,n,o,t){var a;return null==e?Nc(this,o,t).year:(c>(a=gc(e,o,t))&&(c=a),Zt.call(this,e,c,n,o,t))}function Zt(e,c,n,o,t){var a=qc(e,c,n,o,t),i=Lc(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function $t(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}x("N",0,0,"eraAbbr"),x("NN",0,0,"eraAbbr"),x("NNN",0,0,"eraAbbr"),x("NNNN",0,0,"eraName"),x("NNNNN",0,0,"eraNarrow"),x("y",["y",1],"yo","eraYear"),x("y",["yy",2],0,"eraYear"),x("y",["yyy",3],0,"eraYear"),x("y",["yyyy",4],0,"eraYear"),Re("N",Pt),Re("NN",Pt),Re("NNN",Pt),Re("NNNN",xt),Re("NNNNN",It),xe(["N","NN","NNN","NNNN","NNNNN"],(function(e,c,n,o){var t=n._locale.erasParse(e,o,n._strict);t?f(n).era=t:f(n).invalidEra=e})),Re("y",Be),Re("yy",Be),Re("yyy",Be),Re("yyyy",Be),Re("yo",Ht),xe(["y","yy","yyy","yyyy"],Fe),xe(["yo"],(function(e,c,n,o){var t;n._locale._eraYearOrdinalRegex&&(t=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?c[Fe]=n._locale.eraYearOrdinalParse(e,t):c[Fe]=parseInt(e,10)})),x(0,["gg",2],0,(function(){return this.weekYear()%100})),x(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Ft("gggg","weekYear"),Ft("ggggg","weekYear"),Ft("GGGG","isoWeekYear"),Ft("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ie("weekYear",1),ie("isoWeekYear",1),Re("G",ye),Re("g",ye),Re("GG",qe,he),Re("gg",qe,he),Re("GGGG",Te,Le),Re("gggg",Te,Le),Re("GGGGG",Xe,me),Re("ggggg",Xe,me),Ie(["gggg","ggggg","GGGG","GGGGG"],(function(e,c,n,o){c[o.substr(0,2)]=le(e)})),Ie(["gg","GG"],(function(e,c,n,t){c[t]=o.parseTwoDigitYear(e)})),x("Q",0,"Qo","quarter"),ne("quarter","Q"),ie("quarter",7),Re("Q",ze),xe("Q",(function(e,c){c[je]=3*(le(e)-1)})),x("D",["DD",2],"Do","date"),ne("date","D"),ie("date",9),Re("D",qe),Re("DD",qe,he),Re("Do",(function(e,c){return e?c._dayOfMonthOrdinalParse||c._ordinalParse:c._dayOfMonthOrdinalParseLenient})),xe(["D","DD"],Ue),xe("Do",(function(e,c){c[Ue]=le(e.match(qe)[0])}));var ea=ue("Date",!0);function ca(e){var c=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?c:this.add(e-c,"d")}x("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ie("dayOfYear",4),Re("DDD",_e),Re("DDDD",Oe),xe(["DDD","DDDD"],(function(e,c,n){n._dayOfYear=le(e)})),x("m",["mm",2],0,"minute"),ne("minute","m"),ie("minute",14),Re("m",qe),Re("mm",qe,he),xe(["m","mm"],Ve);var na=ue("Minutes",!1);x("s",["ss",2],0,"second"),ne("second","s"),ie("second",15),Re("s",qe),Re("ss",qe,he),xe(["s","ss"],Ke);var oa,ta,aa=ue("Seconds",!1);for(x("S",0,0,(function(){return~~(this.millisecond()/100)})),x(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),x(0,["SSS",3],0,"millisecond"),x(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),x(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),x(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),x(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),x(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),x(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ie("millisecond",16),Re("S",_e,ze),Re("SS",_e,he),Re("SSS",_e,Oe),oa="SSSS";oa.length<=9;oa+="S")Re(oa,Be);function ia(e,c){c[Qe]=le(1e3*("0."+e))}for(oa="S";oa.length<=9;oa+="S")xe(oa,ia);function ra(){return this._isUTC?"UTC":""}function Ma(){return this._isUTC?"Coordinated Universal Time":""}ta=ue("Milliseconds",!1),x("z",0,0,"zoneAbbr"),x("zz",0,0,"zoneName");var sa=q.prototype;function la(e){return Kn(1e3*e)}function ua(){return Kn.apply(null,arguments).parseZone()}function pa(e){return e}sa.add=Ro,sa.calendar=Yo,sa.clone=Fo,sa.diff=Jo,sa.endOf=ht,sa.format=nt,sa.from=ot,sa.fromNow=tt,sa.to=at,sa.toNow=it,sa.get=be,sa.invalidAt=Tt,sa.isAfter=jo,sa.isBefore=Uo,sa.isBetween=Go,sa.isSame=Vo,sa.isSameOrAfter=Ko,sa.isSameOrBefore=Qo,sa.isValid=Wt,sa.lang=Mt,sa.locale=rt,sa.localeData=st,sa.max=Jn,sa.min=Qn,sa.parsingFlags=_t,sa.set=Ae,sa.startOf=zt,sa.subtract=Eo,sa.toArray=qt,sa.toObject=Nt,sa.toDate=mt,sa.toISOString=et,sa.inspect=ct,"undefined"!=typeof Symbol&&null!=Symbol.for&&(sa[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),sa.toJSON=gt,sa.toString=$o,sa.unix=Lt,sa.valueOf=Ot,sa.creationData=Xt,sa.eraName=vt,sa.eraNarrow=kt,sa.eraAbbr=Ct,sa.eraYear=Rt,sa.year=zc,sa.isLeapYear=hc,sa.weekYear=jt,sa.isoWeekYear=Ut,sa.quarter=sa.quarters=$t,sa.month=uc,sa.daysInMonth=pc,sa.week=sa.weeks=Bc,sa.isoWeek=sa.isoWeeks=yc,sa.weeksInYear=Kt,sa.weeksInWeekYear=Qt,sa.isoWeeksInYear=Gt,sa.isoWeeksInISOWeekYear=Vt,sa.date=ea,sa.day=sa.days=jc,sa.weekday=Uc,sa.isoWeekday=Gc,sa.dayOfYear=ca,sa.hour=sa.hours=tn,sa.minute=sa.minutes=na,sa.second=sa.seconds=aa,sa.millisecond=sa.milliseconds=ta,sa.utcOffset=fo,sa.utc=ho,sa.local=Oo,sa.parseZone=Lo,sa.hasAlignedHourOffset=mo,sa.isDST=qo,sa.isLocal=go,sa.isUtcOffset=Wo,sa.isUtc=_o,sa.isUTC=_o,sa.zoneAbbr=ra,sa.zoneName=Ma,sa.dates=W("dates accessor is deprecated. Use date instead.",ea),sa.months=W("months accessor is deprecated. Use month instead",uc),sa.years=W("years accessor is deprecated. Use year instead",zc),sa.zone=W("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zo),sa.isDSTShifted=W("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",No);var da=v.prototype;function ba(e,c,n,o){var t=hn(),a=b().set(o,c);return t[n](a,e)}function Aa(e,c,n){if(l(e)&&(c=e,e=void 0),e=e||"",null!=c)return ba(e,c,n,"month");var o,t=[];for(o=0;o<12;o++)t[o]=ba(e,o,n,"month");return t}function fa(e,c,n,o){"boolean"==typeof e?(l(c)&&(n=c,c=void 0),c=c||""):(n=c=e,e=!1,l(c)&&(n=c,c=void 0),c=c||"");var t,a=hn(),i=e?a._week.dow:0,r=[];if(null!=n)return ba(c,(n+i)%7,o,"day");for(t=0;t<7;t++)r[t]=ba(c,(t+i)%7,o,"day");return r}function za(e,c){return Aa(e,c,"months")}function ha(e,c){return Aa(e,c,"monthsShort")}function Oa(e,c,n){return fa(e,c,n,"weekdays")}function La(e,c,n){return fa(e,c,n,"weekdaysShort")}function ma(e,c,n){return fa(e,c,n,"weekdaysMin")}da.calendar=C,da.longDateFormat=U,da.invalidDate=V,da.ordinal=J,da.preparse=pa,da.postformat=pa,da.relativeTime=$,da.pastFuture=ee,da.set=y,da.eras=Bt,da.erasParse=yt,da.erasConvertYear=St,da.erasAbbrRegex=wt,da.erasNameRegex=Et,da.erasNarrowRegex=Dt,da.months=ic,da.monthsShort=rc,da.monthsParse=sc,da.monthsRegex=bc,da.monthsShortRegex=dc,da.week=Wc,da.firstDayOfYear=Xc,da.firstDayOfWeek=Tc,da.weekdays=xc,da.weekdaysMin=Hc,da.weekdaysShort=Ic,da.weekdaysParse=Fc,da.weekdaysRegex=Vc,da.weekdaysShortRegex=Kc,da.weekdaysMinRegex=Qc,da.isPM=nn,da.meridiem=an,An("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 c=e%10;return e+(1===le(e%100/10)?"th":1===c?"st":2===c?"nd":3===c?"rd":"th")}}),o.lang=W("moment.lang is deprecated. Use moment.locale instead.",An),o.langData=W("moment.langData is deprecated. Use moment.localeData instead.",hn);var qa=Math.abs;function Na(){var e=this._data;return this._milliseconds=qa(this._milliseconds),this._days=qa(this._days),this._months=qa(this._months),e.milliseconds=qa(e.milliseconds),e.seconds=qa(e.seconds),e.minutes=qa(e.minutes),e.hours=qa(e.hours),e.months=qa(e.months),e.years=qa(e.years),this}function ga(e,c,n,o){var t=Bo(c,n);return e._milliseconds+=o*t._milliseconds,e._days+=o*t._days,e._months+=o*t._months,e._bubble()}function Wa(e,c){return ga(this,e,c,1)}function _a(e,c){return ga(this,e,c,-1)}function Ta(e){return e<0?Math.floor(e):Math.ceil(e)}function Xa(){var e,c,n,o,t,a=this._milliseconds,i=this._days,r=this._months,M=this._data;return a>=0&&i>=0&&r>=0||a<=0&&i<=0&&r<=0||(a+=864e5*Ta(ya(r)+i),i=0,r=0),M.milliseconds=a%1e3,e=se(a/1e3),M.seconds=e%60,c=se(e/60),M.minutes=c%60,n=se(c/60),M.hours=n%24,i+=se(n/24),r+=t=se(Ba(i)),i-=Ta(ya(t)),o=se(r/12),r%=12,M.days=i,M.months=r,M.years=o,this}function Ba(e){return 4800*e/146097}function ya(e){return 146097*e/4800}function Sa(e){if(!this.isValid())return NaN;var c,n,o=this._milliseconds;if("month"===(e=oe(e))||"quarter"===e||"year"===e)switch(c=this._days+o/864e5,n=this._months+Ba(c),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(c=this._days+Math.round(ya(this._months)),e){case"week":return c/7+o/6048e5;case"day":return c+o/864e5;case"hour":return 24*c+o/36e5;case"minute":return 1440*c+o/6e4;case"second":return 86400*c+o/1e3;case"millisecond":return Math.floor(864e5*c)+o;default:throw new Error("Unknown unit "+e)}}function va(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*le(this._months/12):NaN}function ka(e){return function(){return this.as(e)}}var Ca=ka("ms"),Ra=ka("s"),Ea=ka("m"),wa=ka("h"),Da=ka("d"),Pa=ka("w"),xa=ka("M"),Ia=ka("Q"),Ha=ka("y");function Ya(){return Bo(this)}function Fa(e){return e=oe(e),this.isValid()?this[e+"s"]():NaN}function ja(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ua=ja("milliseconds"),Ga=ja("seconds"),Va=ja("minutes"),Ka=ja("hours"),Qa=ja("days"),Ja=ja("months"),Za=ja("years");function $a(){return se(this.days()/7)}var ei=Math.round,ci={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,c,n,o,t){return t.relativeTime(c||1,!!n,e,o)}function oi(e,c,n,o){var t=Bo(e).abs(),a=ei(t.as("s")),i=ei(t.as("m")),r=ei(t.as("h")),M=ei(t.as("d")),s=ei(t.as("M")),l=ei(t.as("w")),u=ei(t.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||r<=1&&["h"]||r<n.h&&["hh",r]||M<=1&&["d"]||M<n.d&&["dd",M];return null!=n.w&&(p=p||l<=1&&["w"]||l<n.w&&["ww",l]),(p=p||s<=1&&["M"]||s<n.M&&["MM",s]||u<=1&&["y"]||["yy",u])[2]=c,p[3]=+e>0,p[4]=o,ni.apply(null,p)}function ti(e){return void 0===e?ei:"function"==typeof e&&(ei=e,!0)}function ai(e,c){return void 0!==ci[e]&&(void 0===c?ci[e]:(ci[e]=c,"s"===e&&(ci.ss=c-1),!0))}function ii(e,c){if(!this.isValid())return this.localeData().invalidDate();var n,o,t=!1,a=ci;return"object"==typeof e&&(c=e,e=!1),"boolean"==typeof e&&(t=e),"object"==typeof c&&(a=Object.assign({},ci,c),null!=c.s&&null==c.ss&&(a.ss=c.s-1)),o=oi(this,!t,a,n=this.localeData()),t&&(o=n.pastFuture(+this,o)),n.postformat(o)}var ri=Math.abs;function Mi(e){return(e>0)-(e<0)||+e}function si(){if(!this.isValid())return this.localeData().invalidDate();var e,c,n,o,t,a,i,r,M=ri(this._milliseconds)/1e3,s=ri(this._days),l=ri(this._months),u=this.asSeconds();return u?(e=se(M/60),c=se(e/60),M%=60,e%=60,n=se(l/12),l%=12,o=M?M.toFixed(3).replace(/\.?0+$/,""):"",t=u<0?"-":"",a=Mi(this._months)!==Mi(u)?"-":"",i=Mi(this._days)!==Mi(u)?"-":"",r=Mi(this._milliseconds)!==Mi(u)?"-":"",t+"P"+(n?a+n+"Y":"")+(l?a+l+"M":"")+(s?i+s+"D":"")+(c||e||M?"T":"")+(c?r+c+"H":"")+(e?r+e+"M":"")+(M?r+o+"S":"")):"P0D"}var li=io.prototype;return li.isValid=to,li.abs=Na,li.add=Wa,li.subtract=_a,li.as=Sa,li.asMilliseconds=Ca,li.asSeconds=Ra,li.asMinutes=Ea,li.asHours=wa,li.asDays=Da,li.asWeeks=Pa,li.asMonths=xa,li.asQuarters=Ia,li.asYears=Ha,li.valueOf=va,li._bubble=Xa,li.clone=Ya,li.get=Fa,li.milliseconds=Ua,li.seconds=Ga,li.minutes=Va,li.hours=Ka,li.days=Qa,li.weeks=$a,li.months=Ja,li.years=Za,li.humanize=ii,li.toISOString=si,li.toString=si,li.toJSON=si,li.locale=rt,li.localeData=st,li.toIsoString=W("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",si),li.lang=Mt,x("X",0,0,"unix"),x("x",0,0,"valueOf"),Re("x",ye),Re("X",ke),xe("X",(function(e,c,n){n._d=new Date(1e3*parseFloat(e))})),xe("x",(function(e,c,n){n._d=new Date(le(e))})),
|
|
1
|
+
!function(e,c){"object"==typeof exports&&"undefined"!=typeof module?c(exports,require("prop-types"),require("react"),require("i18next"),require("classnames"),require("react-autosuggest"),require("lodash/debounce"),require("lodash/flatten"),require("lodash/take"),require("lodash/isString"),require("lodash/orderBy"),require("lodash/uniqWith"),require("lodash/isEqual"),require("lodash/memoize"),require("lodash/escapeRegExp"),require("lodash/cloneDeep"),require("lodash/get"),require("@digitransit-component/digitransit-component-suggestion-item"),require("@digitransit-component/digitransit-component-icon"),require("lodash/isEmpty"),require("@digitransit-component/digitransit-component-dialog-modal")):"function"==typeof define&&define.amd?define(["exports","prop-types","react","i18next","classnames","react-autosuggest","lodash/debounce","lodash/flatten","lodash/take","lodash/isString","lodash/orderBy","lodash/uniqWith","lodash/isEqual","lodash/memoize","lodash/escapeRegExp","lodash/cloneDeep","lodash/get","@digitransit-component/digitransit-component-suggestion-item","@digitransit-component/digitransit-component-icon","lodash/isEmpty","@digitransit-component/digitransit-component-dialog-modal"],c):c((e="undefined"!=typeof globalThis?globalThis:e||self).DTAutosuggest={},e.PropTypes,e.React,e.i18next,e.cx,e.Autosuggest,e.debounce,e.flatten,e.take,e.isString,e.orderBy,e.uniqWith,e.isEqual,e.memoize,e.escapeRegExp,e.cloneDeep,e.get,e.SuggestionItem,e.Icon,e.isEmpty,e.DialogModal)}(this,(function(e,c,n,o,t,a,i,r,M,s,l,u,p,d,b,A,f,z,h,O,L){"use strict";function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var q=m(c),N=m(n),g=m(o),W=m(t),_=m(a),T=m(i),X=m(r),B=m(M),y=m(s),S=m(l),v=m(u),k=m(p),C=m(d),R=m(b),E=m(A),w=m(f),D=m(z),P=m(h),x=m(O),I=m(L);function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function Y(){return Y=Object.assign||function(e){for(var c=1;c<arguments.length;c++){var n=arguments[c];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Y.apply(this,arguments)}function F(e,c){(null==c||c>e.length)&&(c=e.length);for(var n=0,o=new Array(c);n<c;n++)o[n]=e[n];return o}function j(e,c){if(e){if("string"==typeof e)return F(e,c);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,c):void 0}}function U(e){return function(e){if(Array.isArray(e))return F(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||j(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,c){if(!(e instanceof c))throw new TypeError("Cannot call a class as a function")}function V(e,c){for(var n=0;n<c.length;n++){var o=c[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function K(e,c,n){return c&&V(e.prototype,c),n&&V(e,n),e}function Q(e,c){return Q=Object.setPrototypeOf||function(e,c){return e.__proto__=c,e},Q(e,c)}function J(e,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(c&&c.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),c&&Q(e,c)}function Z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e,c){return!c||"object"!==H(c)&&"function"!=typeof c?Z(e):c}function ee(e){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ee(e)}function ce(e,c){return function(e){if(Array.isArray(e))return e}(e)||function(e,c){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,t=!1,a=void 0;try{for(var i,r=e[Symbol.iterator]();!(o=(i=r.next()).done)&&(n.push(i.value),!c||n.length!==c);o=!0);}catch(e){t=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(t)throw a}}return n}}(e,c)||j(e,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e,c){return e&&c&&e===c}function oe(e,c){var n=e.properties,o=c.properties;if("FutureRoute"===e.type&&"FutureRoute"===c.type){var t=n.origin,a=n.destination,i=o.origin,r=o.destination;return"".concat(t.name,"//").concat(t.locality,"//").concat(a.name,"//").concat(a.locality)==="".concat(i.name,"//").concat(i.locality,"//").concat(r.name,"//").concat(r.locality)}if("FutureRoute"===e.type||"FutureRoute"===c.type)return!1;if(("bikeRentalStation"===n.layer||"favouriteBikeRentalStation"===n.layer)&&("bikeRentalStation"===o.layer||"favouriteBikeRentalStation"===o.layer)||"bikestation"===n.layer&&"bikestation"===o.layer)return n.labelId===o.labelId;if(n.gtfsId&&o.gtfsId)return n.gtfsId===o.gtfsId;if(n.gtfsId&&o.gid&&o.gid.includes(n.gtfsId))return!0;if(o.gtfsId&&n.gid&&n.gid.includes(o.gtfsId))return!0;if(("stop"===n.layer||"station"===n.layer)&&("stop"===o.layer||"station"===o.layer)&&n.gid&&o.gid)return n.gid===o.gid;var M=e&&e.geometry?e.geometry.coordinates:void 0,s=c&&c.geometry?c.geometry.coordinates:void 0;return!!(M&&s&&Math.abs(M[0]-s[0])<1e-6&&Math.abs(M[1]-s[1])<1e-6&&(ne(n.name,o.name)||ne(n.label,o.label)||ne(n.address,o.address)||ne(n.address,o.label)||ne(n.label,o.address)))}var te=function(e){return y.default(e)?e.toLowerCase():""},ae={Address:"address",Back:"back",CurrentPosition:"currentPosition",FavouriteStop:"favouriteStop",FavouriteStation:"favouriteStation",FavouritePlace:"favouritePlace",FavouriteRoute:"favouriteRoute",FutureRoute:"futureRoute",Station:"station",SelectFromMap:"selectFromMap",SelectFromOwnLocations:"ownLocations",Stop:"stop",Street:"street",Venue:"venue",BikeRentalStation:"bikeRentalStation"},ie=function(e,c){if(!y.default(e)||0===e.length)return 0;return["name","label","address","shortName"].map((function(e){return c[e]})).filter((function(e){return y.default(e)&&e.length>0})).map((function(c){var n=te(c);return 0===n.indexOf(e)?.5+e.length/n.length:.5*e.length/(e.length+1)})).reduce((function(e,c){return c>e?c:e}),0)},re=function(e,c){switch(e){case ae.CurrentPosition:return 1;case ae.Back:return.9;case ae.SelectFromMap:return.8;case ae.SelectFromOwnLocations:return.79;case ae.FavouriteStation:case ae.FavouritePlace:case ae.FavouriteStop:case ae.FavouriteRoute:return.45;case ae.FutureRoute:return.44;case ae.Station:return y.default(c)&&0===c.indexOf("gtfs")?.43:.42;case ae.FavouriteBikeRentalStation:default:return.41;case ae.Stop:return.38;case ae.BikeRentalStation:return.36}},Me=function(e,c){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!Array.isArray(c))return c;var o=function(c){return y.default(c)&&e&&e.test(c)},t=te(n),a=o(t),i=S.default(c,[function(e){return a&&o(te(e.properties.shortName))&&0===te(e.properties.shortName).indexOf(t)?1:0},function(e){var c=e.properties,n=c.confidence,o=c.layer,a=c.source;if(0===t.length)return re(o,a);if(!n){var i=re(o,a)+ie(t,e.properties);return o===ae.BikeRentalStation?i-.8:i}switch(o){case ae.Station:return n+(0===a.indexOf("gtfs")?.02:.01);default:return n;case ae.Stop:return n-.05}}],["desc","desc"]);return v.default(i,oe)},se=function(e,c){return null!=c&&-1!==e.lastIndexOf(c)?e.substring(0,e.lastIndexOf(c)-1):e},le=function(e){return e.localadmin||e.locality||e.address&&e.address.lastIndexOf(",")<e.address.length-2&&e.address.substring(e.address.lastIndexOf(",")+2)||""},ue=function(e){var c=e.id,n=e.code;return n||(void 0!==c&&void 0!==c.indexOf&&-1!==c.indexOf("#")?c.substring(c.indexOf("#")+1):void 0)},pe=C.default((function(e){var c=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.layer){case"currentPosition":return[e.labelId,e.address];case"selectFromMap":case"ownLocations":case"back":return[e.labelId];case"favouritePlace":return[e.name||e.address&&e.address.split(",")[0],e.address.replace(new RegExp("".concat(R.default(e.name),"(,)?( )?")),"")];case"favouriteBikeRentalStation":case"bikeRentalStation":return[e.name];case"favouriteRoute":case"route-BUS":case"route-TRAM":case"route-RAIL":case"route-SUBWAY":case"route-FERRY":case"route-AIRPLANE":return!c&&e.shortName?[e.gtfsId,e.mode.toLowerCase(),e.longName]:[e.shortName,e.longName,e.agency?e.agency.name:void 0];case"venue":case"address":case"street":return[e.name,e.label.replace(new RegExp("".concat(R.default(e.name),"(,)?( )?")),"")];case"favouriteStop":case"stop":return c?[e.name||e.label||e.address&&e.address.split(",")[0],le(e)]:[e.name,e.id,ue(e),le(e)];default:return[e.name||e.label||e.address&&e.address.split(",")[0],le(e)]}}),(function(e,c){var n=E.default(e);return n.plain=c,n}));function de(e){return v.default(e,(function(e,c){var n=k.default(pe(e.properties),pe(c.properties))&&e.properties.layer===c.properties.layer;return(!n||"FutureRoute"!==e.type&&"FutureRoute"!==c.type)&&n}))}function be(e,c,n){if("string"==typeof c&&c.length>0){var o=c.toLowerCase().trim(),t=o.includes(" ")||o.includes(",");return e.filter((function(e){var c=[];n.forEach((function(n){var o=w.default(e,n);t||"properties.label"!==n&&"address"!==n||!o||((o=o.split(",")).length>2?o.splice(o.length-2,2):o.length>1&&o.splice(o.length-1,1),o=o.join(",")),o&&(c=t?c.concat(o.toLowerCase()):c.concat(o.toLowerCase().replace(/,/g," ").split(" ")))}));for(var a=0;a<c.length;a++)if(0===c[a].indexOf(o))return!0;return!1}))}return e}function Ae(e,c){return e?Object.keys(e).map((function(n){var o=c||n,t=e[n];return"object"===H(t)?Ae(t,o):"".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(t))})).join("&"):""}var fe=require("axios").default;function ze(e,c){return fe.get(encodeURI(e)+(c?(-1===e.search(/\?/)?"?":"&")+Ae(c):""),{timeout:1e4,method:"GET",headers:{Accept:"application/json"}}).then((function(e){return e.data}))}function he(e,c,n,o,t,a,i,r){var M=e?e.trim():null;if(null==M||M.length<1||i&&!i.test(M))return Promise.resolve([]);var s=a||"https://api.digitransit.fi/geocoding/v1/search",l=Y({text:M},c,o,{lang:n});(t&&(l=Y({},l,{sources:t})),r)&&(l=Y({},l,{layers:r.toString()}));return ze(s,l).then((function(e){return e.features}))}function Oe(e,c){if(!e||e.length<1)return Promise.resolve([]);var n="",o=e.map((function(e){var c="stop"===e.type?"stop":"station",o="gtfs".concat(e.gtfsId.split(":")[0].toLowerCase(),":").concat(c,":GTFS:").concat(e.gtfsId);return e.code&&(o+="#".concat(e.code)),n+="".concat(o,","),Y({},e,{gid:o})})).reduce((function(e,c){return e[c.gid]=c,e}),{});return ze(c,{ids:n.slice(0,-1)}).then((function(e){return e.features.map((function(e){var c,n,t;return{type:"FavouriteStop",properties:{addendum:e.properties.addendum,gid:o[e.properties.gid].gid,code:o[e.properties.gid].code,gtfsId:o[e.properties.gid].gtfsId,lastUpdated:o[e.properties.gid].lastUpdated,favouriteId:o[e.properties.gid].favouriteId,address:e.properties.label,layer:(c=e.properties,n=c.layer,t=c.type,"stop"===n||"favouriteStop"===n||"stop"===t||"favouriteStop"===t?"favouriteStop":"favouriteStation")},geometry:e.geometry}}))}))}function Le(e,c,n){var o=be(e,c,["properties.name","properties.label","properties.address","properties.shortName","properties.longName"]);return n&&(o=o.filter((function(e){return!n.includes(e.properties.layer)}))),Promise.resolve(B.default(o,10).map((function(e){var c=Y({},e,{type:"OldSearch",timetableClicked:!1,arrowClicked:!1});return delete c.properties.confidence,c})))}var me=["route-TRAM","route-BUS","route-RAIL","route-FERRY","route-SUBWAY","route-AIRPLANE"],qe=["favouritePlace","venue","address","street"];var Ne=T.default((function(e,c,n,o,t,a,i,r,M,s){var l=i.input,u=o.getPositions,p=o.getFavouriteLocations,d=o.getOldSearches,b=o.getFavouriteStops,A=o.getLanguage,f=o.getStopAndStationsQuery,z=o.getFavouriteBikeRentalStationsQuery,h=o.getFavouriteBikeRentalStations,O=o.getFavouriteRoutesQuery,L=o.getFavouriteRoutes,m=o.getRoutesQuery,q=o.context,N=o.isPeliasLocationAware,g=o.minimalRegexp,W=o.lineRegexp,_=o.URL_PELIAS,T=o.URL_PELIAS_PLACE,y=o.feedIDs,S=o.geocodingSearchParams,v=o.geocodingSources,k=o.getFutureRoutes,C=o.cityBikeNetworks,R=!e||0===e.length,E=!c||0===c.length,w=u(q),D=[],P={type:"all",term:l,results:[]},x=A(q),I=N&&null!=s&&s.lat&&null!=s&&s.lon?{"focus.point.lat":s.lat.toFixed(3),"focus.point.lon":s.lon.toFixed(3)}:{},H=n?n.split("-")[1]:void 0;if(e.includes("CurrentPosition")&&"geolocation-not-supported"!==w.status&&D.push(function(e,c){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"CurrentLocation",address:c.address,lat:c.lat,lon:c.lon,properties:{labelId:"use-own-position",layer:"currentPosition",address:c.address,lat:c.lat,lon:c.lon},geometry:{type:"Point",coordinates:[c.lon,c.lat]}}]):Promise.resolve([])}(l,w)),(R||e.includes("MapPosition"))&&D.push(function(e){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"SelectFromMap",address:"SelectFromMap",lat:null,lon:null,properties:{labelId:"select-from-map",layer:"selectFromMap",address:"SelectFromMap",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]):Promise.resolve([])}(l)),e.includes("FutureRoutes")){var F=k(q);D.push(B.default(F,3))}if(e.includes("SelectFromOwnLocations")&&function(e,c,n){var o=c(e);if(o&&o.length>0)return!0;var t=n(e);return t&&t.length>0}(q,p,b)&&D.push(function(e){return"string"!=typeof e||0===e.length?Promise.resolve([{type:"SelectFromOwnLocations",address:"SelectFromOwnLocations",lat:null,lon:null,properties:{labelId:"select-from-own-locations",layer:"ownLocations",address:"selectFromOwnLocations",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]):Promise.resolve([])}(l)),R||e.includes("Locations")){var j=S;if(c.includes("Favourite")){var G=p(q);D.push(function(e,c){return Promise.resolve(be(e,c,["address","name"]).map((function(e){return{type:"FavouritePlace",properties:Y({},e,{label:e.name,layer:"favouritePlace"}),geometry:{type:"Point",coordinates:[e.lon,e.lat]}}})))}(G,l)),c.includes("Back")&&D.push(Promise.resolve([{type:"back",address:"back",lat:null,lon:null,properties:{labelId:"back",layer:"back",address:"back",lat:null,lon:null},geometry:{type:"Point",coordinates:[]}}]))}if(E||c.includes("Datasource")){var V=y.map((function(e){return"gtfs".concat(e)})),K=v.concat(V).join(",");D.push(he(l,j,x,I,K,_,g,["station","venue","address","street"]))}if(E||c.includes("History")){var Q=d(q,"endpoint"),J=["currentPosition","selectFromMap","futureRoute","ownLocations","bikeRentalStation","stop","back"];J.push.apply(J,me),D.push(Le(Q,l,J))}}if(R||e.includes("Stops")){if(c.includes("Favourite")){var Z,$=b(q);Z=$.every((function(e){return"station"===e.type}))?Oe($,T).then((function(e){return t?t(e,H):e})):f($).then((function(e){return Oe(e,T)})).then((function(e){return t?t(e,H):e})),D.push(function(e,c){return e.then((function(e){return be(e,c,["properties.name","properties.name","properties.address"])}))}(Z,l))}if(E||c.includes("Datasource")){var ee=a&&10!==a?{size:a}:{};(R||e.includes("Locations"))&&(ee.dedupestops=1);var ce=y.map((function(e){return"gtfs".concat(e)})).join(",");D.push(he(l,ee,x,I,ce,_,g,["stop","station"]).then((function(e){return t?t(e,H):e})))}if(E||c.includes("History")){var ne=d(q).filter((function(e){return!e.properties.gid||e.properties.gid.includes("GTFS:")})),oe=["currentPosition","selectFromMap","futureRoute","ownLocations","favouritePlace","bikeRentalStation","back"];oe.push.apply(oe,me),oe.push.apply(oe,qe),n?("route-CITYBIKE"!==n&&(oe.push("bikeRentalStation"),oe.push("bikestation")),D.push(Le(ne,l,oe).then((function(e){return t?t(e,H):e})))):D.push(Le(ne,l,oe))}}if(R||e.includes("Routes")){if(c.includes("Favourite")){var te=L(q);D.push(O(te,l,H,M).then((function(e){return t?t(e,H,"Routes"):e})))}if(D.push(m(l,y,n,M).then((function(e){return t?t(e,H,"Routes"):e}))),E||c.includes("History")){var ae=d(q),ie=["currentPosition","selectFromMap","futureRoute","favouritePlace","stop","station","ownLocations","back"];n&&("route-CITYBIKE"!==n&&(ie.push("bikeRentalStation"),ie.push("bikestation")),ie.push.apply(ie,U(me.filter((function(e){return!(e===n)}))))),ie.push.apply(ie,qe),D.push(Le(ae,l,ie).then((function(e){return t?t(e,H,"Routes"):e})))}}if(R||e.includes("BikeRentalStations")){if(c.includes("Favourite")){var re=h(q);D.push(z(re,l))}if(E||c.includes("Datasource")){var se={size:a};D.push(he(l,se,x,I,C.join(","),_,g,["bikestation"]).then((function(e){return t?t(e,H,"BikeRentalStations"):e})))}}Promise.all(D).then(X.default).then(de).then((function(e){P.results=e})).catch((function(e){P.error=e})).then((function(){r(Y({},P,{results:Me(W,P.results,l)}))}))}),300,{leading:!0});function ge(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function We(e,c){return e(c={exports:{}},c.exports),c.exports}var _e,Te=We((function(e,c){e.exports=function(){var c,n;function o(){return c.apply(null,arguments)}function t(e){c=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e,c){return Object.prototype.hasOwnProperty.call(e,c)}function M(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var c;for(c in e)if(r(e,c))return!1;return!0}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,c){var n,o=[];for(n=0;n<e.length;++n)o.push(c(e[n],n));return o}function d(e,c){for(var n in c)r(c,n)&&(e[n]=c[n]);return r(c,"toString")&&(e.toString=c.toString),r(c,"valueOf")&&(e.valueOf=c.valueOf),e}function b(e,c,n,o){return Vn(e,c,n,o,!0).utc()}function A(){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 f(e){return null==e._pf&&(e._pf=A()),e._pf}function z(e){if(null==e._isValid){var c=f(e),o=n.call(c.parsedDateParts,(function(e){return null!=e})),t=!isNaN(e._d.getTime())&&c.overflow<0&&!c.empty&&!c.invalidEra&&!c.invalidMonth&&!c.invalidWeekday&&!c.weekdayMismatch&&!c.nullInput&&!c.invalidFormat&&!c.userInvalidated&&(!c.meridiem||c.meridiem&&o);if(e._strict&&(t=t&&0===c.charsLeftOver&&0===c.unusedTokens.length&&void 0===c.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return t;e._isValid=t}return e._isValid}function h(e){var c=b(NaN);return null!=e?d(f(c),e):f(c).userInvalidated=!0,c}n=Array.prototype.some?Array.prototype.some:function(e){var c,n=Object(this),o=n.length>>>0;for(c=0;c<o;c++)if(c in n&&e.call(this,n[c],c,n))return!0;return!1};var O=o.momentProperties=[],L=!1;function m(e,c){var n,o,t;if(s(c._isAMomentObject)||(e._isAMomentObject=c._isAMomentObject),s(c._i)||(e._i=c._i),s(c._f)||(e._f=c._f),s(c._l)||(e._l=c._l),s(c._strict)||(e._strict=c._strict),s(c._tzm)||(e._tzm=c._tzm),s(c._isUTC)||(e._isUTC=c._isUTC),s(c._offset)||(e._offset=c._offset),s(c._pf)||(e._pf=f(c)),s(c._locale)||(e._locale=c._locale),O.length>0)for(n=0;n<O.length;n++)s(t=c[o=O[n]])||(e[o]=t);return e}function q(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===L&&(L=!0,o.updateOffset(this),L=!1)}function N(e){return e instanceof q||null!=e&&null!=e._isAMomentObject}function g(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function W(e,c){var n=!0;return d((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){var t,a,i,M=[];for(a=0;a<arguments.length;a++){if(t="","object"==typeof arguments[a]){for(i in t+="\n["+a+"] ",arguments[0])r(arguments[0],i)&&(t+=i+": "+arguments[0][i]+", ");t=t.slice(0,-2)}else t=arguments[a];M.push(t)}g(e+"\nArguments: "+Array.prototype.slice.call(M).join("")+"\n"+(new Error).stack),n=!1}return c.apply(this,arguments)}),c)}var _,T={};function X(e,c){null!=o.deprecationHandler&&o.deprecationHandler(e,c),T[e]||(g(c),T[e]=!0)}function B(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function y(e){var c,n;for(n in e)r(e,n)&&(B(c=e[n])?this[n]=c:this["_"+n]=c);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function S(e,c){var n,o=d({},e);for(n in c)r(c,n)&&(i(e[n])&&i(c[n])?(o[n]={},d(o[n],e[n]),d(o[n],c[n])):null!=c[n]?o[n]=c[n]:delete o[n]);for(n in e)r(e,n)&&!r(c,n)&&i(e[n])&&(o[n]=d({},o[n]));return o}function v(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,_=Object.keys?Object.keys:function(e){var c,n=[];for(c in e)r(e,c)&&n.push(c);return n};var k={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function C(e,c,n){var o=this._calendar[e]||this._calendar.sameElse;return B(o)?o.call(c,n):o}function R(e,c,n){var o=""+Math.abs(e),t=c-o.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t)).toString().substr(1)+o}var E=/(\[[^\[]*\])|(\\)?([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,w=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,D={},P={};function x(e,c,n,o){var t=o;"string"==typeof o&&(t=function(){return this[o]()}),e&&(P[e]=t),c&&(P[c[0]]=function(){return R(t.apply(this,arguments),c[1],c[2])}),n&&(P[n]=function(){return this.localeData().ordinal(t.apply(this,arguments),e)})}function I(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function H(e){var c,n,o=e.match(E);for(c=0,n=o.length;c<n;c++)P[o[c]]?o[c]=P[o[c]]:o[c]=I(o[c]);return function(c){var t,a="";for(t=0;t<n;t++)a+=B(o[t])?o[t].call(c,e):o[t];return a}}function Y(e,c){return e.isValid()?(c=F(c,e.localeData()),D[c]=D[c]||H(c),D[c](e)):e.localeData().invalidDate()}function F(e,c){var n=5;function o(e){return c.longDateFormat(e)||e}for(w.lastIndex=0;n>=0&&w.test(e);)e=e.replace(w,o),w.lastIndex=0,n-=1;return e}var j={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 U(e){var c=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return c||!n?c:(this._longDateFormat[e]=n.match(E).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var G="Invalid date";function V(){return this._invalidDate}var K="%d",Q=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var Z={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 $(e,c,n,o){var t=this._relativeTime[n];return B(t)?t(e,c,n,o):t.replace(/%d/i,e)}function ee(e,c){var n=this._relativeTime[e>0?"future":"past"];return B(n)?n(c):n.replace(/%s/i,c)}var ce={};function ne(e,c){var n=e.toLowerCase();ce[n]=ce[n+"s"]=ce[c]=e}function oe(e){return"string"==typeof e?ce[e]||ce[e.toLowerCase()]:void 0}function te(e){var c,n,o={};for(n in e)r(e,n)&&(c=oe(n))&&(o[c]=e[n]);return o}var ae={};function ie(e,c){ae[e]=c}function re(e){var c,n=[];for(c in e)r(e,c)&&n.push({unit:c,priority:ae[c]});return n.sort((function(e,c){return e.priority-c.priority})),n}function Me(e){return e%4==0&&e%100!=0||e%400==0}function se(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function le(e){var c=+e,n=0;return 0!==c&&isFinite(c)&&(n=se(c)),n}function ue(e,c){return function(n){return null!=n?(de(this,e,n),o.updateOffset(this,c),this):pe(this,e)}}function pe(e,c){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+c]():NaN}function de(e,c,n){e.isValid()&&!isNaN(n)&&("FullYear"===c&&Me(e.year())&&1===e.month()&&29===e.date()?(n=le(n),e._d["set"+(e._isUTC?"UTC":"")+c](n,e.month(),ec(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+c](n))}function be(e){return B(this[e=oe(e)])?this[e]():this}function Ae(e,c){if("object"==typeof e){var n,o=re(e=te(e));for(n=0;n<o.length;n++)this[o[n].unit](e[o[n].unit])}else if(B(this[e=oe(e)]))return this[e](c);return this}var fe,ze=/\d/,he=/\d\d/,Oe=/\d{3}/,Le=/\d{4}/,me=/[+-]?\d{6}/,qe=/\d\d?/,Ne=/\d\d\d\d?/,We=/\d\d\d\d\d\d?/,_e=/\d{1,3}/,Te=/\d{1,4}/,Xe=/[+-]?\d{1,6}/,Be=/\d+/,ye=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,ve=/Z|[+-]\d\d(?::?\d\d)?/gi,ke=/[+-]?\d+(\.\d{1,3})?/,Ce=/[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 Re(e,c,n){fe[e]=B(c)?c:function(e,o){return e&&n?n:c}}function Ee(e,c){return r(fe,e)?fe[e](c._strict,c._locale):new RegExp(we(e))}function we(e){return De(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,c,n,o,t){return c||n||o||t})))}function De(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}fe={};var Pe={};function xe(e,c){var n,o=c;for("string"==typeof e&&(e=[e]),l(c)&&(o=function(e,n){n[c]=le(e)}),n=0;n<e.length;n++)Pe[e[n]]=o}function Ie(e,c){xe(e,(function(e,n,o,t){o._w=o._w||{},c(e,o._w,o,t)}))}function He(e,c,n){null!=c&&r(Pe,e)&&Pe[e](c,n._a,n,e)}var Ye,Fe=0,je=1,Ue=2,Ge=3,Ve=4,Ke=5,Qe=6,Je=7,Ze=8;function $e(e,c){return(e%c+c)%c}function ec(e,c){if(isNaN(e)||isNaN(c))return NaN;var n=$e(c,12);return e+=(c-n)/12,1===n?Me(e)?29:28:31-n%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var c;for(c=0;c<this.length;++c)if(this[c]===e)return c;return-1},x("M",["MM",2],"Mo",(function(){return this.month()+1})),x("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),x("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),ie("month",8),Re("M",qe),Re("MM",qe,he),Re("MMM",(function(e,c){return c.monthsShortRegex(e)})),Re("MMMM",(function(e,c){return c.monthsRegex(e)})),xe(["M","MM"],(function(e,c){c[je]=le(e)-1})),xe(["MMM","MMMM"],(function(e,c,n,o){var t=n._locale.monthsParse(e,o,n._strict);null!=t?c[je]=t:f(n).invalidMonth=e}));var cc="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nc="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),oc=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,tc=Ce,ac=Ce;function ic(e,c){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||oc).test(c)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function rc(e,c){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[oc.test(c)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Mc(e,c,n){var o,t,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)a=b([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===c?-1!==(t=Ye.call(this._shortMonthsParse,i))?t:null:-1!==(t=Ye.call(this._longMonthsParse,i))?t:null:"MMM"===c?-1!==(t=Ye.call(this._shortMonthsParse,i))||-1!==(t=Ye.call(this._longMonthsParse,i))?t:null:-1!==(t=Ye.call(this._longMonthsParse,i))||-1!==(t=Ye.call(this._shortMonthsParse,i))?t:null}function sc(e,c,n){var o,t,a;if(this._monthsParseExact)return Mc.call(this,e,c,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(t=b([2e3,o]),n&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(t,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(t,"").replace(".","")+"$","i")),n||this._monthsParse[o]||(a="^"+this.months(t,"")+"|^"+this.monthsShort(t,""),this._monthsParse[o]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===c&&this._longMonthsParse[o].test(e))return o;if(n&&"MMM"===c&&this._shortMonthsParse[o].test(e))return o;if(!n&&this._monthsParse[o].test(e))return o}}function lc(e,c){var n;if(!e.isValid())return e;if("string"==typeof c)if(/^\d+$/.test(c))c=le(c);else if(!l(c=e.localeData().monthsParse(c)))return e;return n=Math.min(e.date(),ec(e.year(),c)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](c,n),e}function uc(e){return null!=e?(lc(this,e),o.updateOffset(this,!0),this):pe(this,"Month")}function pc(){return ec(this.year(),this.month())}function dc(e){return this._monthsParseExact?(r(this,"_monthsRegex")||Ac.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(r(this,"_monthsShortRegex")||(this._monthsShortRegex=tc),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function bc(e){return this._monthsParseExact?(r(this,"_monthsRegex")||Ac.call(this),e?this._monthsStrictRegex:this._monthsRegex):(r(this,"_monthsRegex")||(this._monthsRegex=ac),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Ac(){function e(e,c){return c.length-e.length}var c,n,o=[],t=[],a=[];for(c=0;c<12;c++)n=b([2e3,c]),o.push(this.monthsShort(n,"")),t.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(o.sort(e),t.sort(e),a.sort(e),c=0;c<12;c++)o[c]=De(o[c]),t[c]=De(t[c]);for(c=0;c<24;c++)a[c]=De(a[c]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function fc(e){return Me(e)?366:365}x("Y",0,0,(function(){var e=this.year();return e<=9999?R(e,4):"+"+e})),x(0,["YY",2],0,(function(){return this.year()%100})),x(0,["YYYY",4],0,"year"),x(0,["YYYYY",5],0,"year"),x(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),ie("year",1),Re("Y",ye),Re("YY",qe,he),Re("YYYY",Te,Le),Re("YYYYY",Xe,me),Re("YYYYYY",Xe,me),xe(["YYYYY","YYYYYY"],Fe),xe("YYYY",(function(e,c){c[Fe]=2===e.length?o.parseTwoDigitYear(e):le(e)})),xe("YY",(function(e,c){c[Fe]=o.parseTwoDigitYear(e)})),xe("Y",(function(e,c){c[Fe]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return le(e)+(le(e)>68?1900:2e3)};var zc=ue("FullYear",!0);function hc(){return Me(this.year())}function Oc(e,c,n,o,t,a,i){var r;return e<100&&e>=0?(r=new Date(e+400,c,n,o,t,a,i),isFinite(r.getFullYear())&&r.setFullYear(e)):r=new Date(e,c,n,o,t,a,i),r}function Lc(e){var c,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,c=new Date(Date.UTC.apply(null,n)),isFinite(c.getUTCFullYear())&&c.setUTCFullYear(e)):c=new Date(Date.UTC.apply(null,arguments)),c}function mc(e,c,n){var o=7+c-n;return-(7+Lc(e,0,o).getUTCDay()-c)%7+o-1}function qc(e,c,n,o,t){var a,i,r=1+7*(c-1)+(7+n-o)%7+mc(e,o,t);return r<=0?i=fc(a=e-1)+r:r>fc(e)?(a=e+1,i=r-fc(e)):(a=e,i=r),{year:a,dayOfYear:i}}function Nc(e,c,n){var o,t,a=mc(e.year(),c,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?o=i+gc(t=e.year()-1,c,n):i>gc(e.year(),c,n)?(o=i-gc(e.year(),c,n),t=e.year()+1):(t=e.year(),o=i),{week:o,year:t}}function gc(e,c,n){var o=mc(e,c,n),t=mc(e+1,c,n);return(fc(e)-o+t)/7}function Wc(e){return Nc(e,this._week.dow,this._week.doy).week}x("w",["ww",2],"wo","week"),x("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ie("week",5),ie("isoWeek",5),Re("w",qe),Re("ww",qe,he),Re("W",qe),Re("WW",qe,he),Ie(["w","ww","W","WW"],(function(e,c,n,o){c[o.substr(0,1)]=le(e)}));var _c={dow:0,doy:6};function Tc(){return this._week.dow}function Xc(){return this._week.doy}function Bc(e){var c=this.localeData().week(this);return null==e?c:this.add(7*(e-c),"d")}function yc(e){var c=Nc(this,1,4).week;return null==e?c:this.add(7*(e-c),"d")}function Sc(e,c){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=c.weekdaysParse(e))?e:null:parseInt(e,10)}function vc(e,c){return"string"==typeof e?c.weekdaysParse(e)%7||7:isNaN(e)?null:e}function kc(e,c){return e.slice(c,7).concat(e.slice(0,c))}x("d",0,"do","day"),x("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),x("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),x("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),x("e",0,0,"weekday"),x("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ie("day",11),ie("weekday",11),ie("isoWeekday",11),Re("d",qe),Re("e",qe),Re("E",qe),Re("dd",(function(e,c){return c.weekdaysMinRegex(e)})),Re("ddd",(function(e,c){return c.weekdaysShortRegex(e)})),Re("dddd",(function(e,c){return c.weekdaysRegex(e)})),Ie(["dd","ddd","dddd"],(function(e,c,n,o){var t=n._locale.weekdaysParse(e,o,n._strict);null!=t?c.d=t:f(n).invalidWeekday=e})),Ie(["d","e","E"],(function(e,c,n,o){c[o]=le(e)}));var Cc="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rc="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ec="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),wc=Ce,Dc=Ce,Pc=Ce;function xc(e,c){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(c)?"format":"standalone"];return!0===e?kc(n,this._week.dow):e?n[e.day()]:n}function Ic(e){return!0===e?kc(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Hc(e){return!0===e?kc(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Yc(e,c,n){var o,t,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)a=b([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===c?-1!==(t=Ye.call(this._weekdaysParse,i))?t:null:"ddd"===c?-1!==(t=Ye.call(this._shortWeekdaysParse,i))?t:null:-1!==(t=Ye.call(this._minWeekdaysParse,i))?t:null:"dddd"===c?-1!==(t=Ye.call(this._weekdaysParse,i))||-1!==(t=Ye.call(this._shortWeekdaysParse,i))||-1!==(t=Ye.call(this._minWeekdaysParse,i))?t:null:"ddd"===c?-1!==(t=Ye.call(this._shortWeekdaysParse,i))||-1!==(t=Ye.call(this._weekdaysParse,i))||-1!==(t=Ye.call(this._minWeekdaysParse,i))?t:null:-1!==(t=Ye.call(this._minWeekdaysParse,i))||-1!==(t=Ye.call(this._weekdaysParse,i))||-1!==(t=Ye.call(this._shortWeekdaysParse,i))?t:null}function Fc(e,c,n){var o,t,a;if(this._weekdaysParseExact)return Yc.call(this,e,c,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(t=b([2e3,1]).day(o),n&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(t,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(t,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(t,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(a="^"+this.weekdays(t,"")+"|^"+this.weekdaysShort(t,"")+"|^"+this.weekdaysMin(t,""),this._weekdaysParse[o]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===c&&this._fullWeekdaysParse[o].test(e))return o;if(n&&"ddd"===c&&this._shortWeekdaysParse[o].test(e))return o;if(n&&"dd"===c&&this._minWeekdaysParse[o].test(e))return o;if(!n&&this._weekdaysParse[o].test(e))return o}}function jc(e){if(!this.isValid())return null!=e?this:NaN;var c=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Sc(e,this.localeData()),this.add(e-c,"d")):c}function Uc(e){if(!this.isValid())return null!=e?this:NaN;var c=(this.day()+7-this.localeData()._week.dow)%7;return null==e?c:this.add(e-c,"d")}function Gc(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var c=vc(e,this.localeData());return this.day(this.day()%7?c:c-7)}return this.day()||7}function Vc(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Jc.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(r(this,"_weekdaysRegex")||(this._weekdaysRegex=wc),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Kc(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Jc.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(r(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Dc),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Qc(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Jc.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(r(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Pc),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Jc(){function e(e,c){return c.length-e.length}var c,n,o,t,a,i=[],r=[],M=[],s=[];for(c=0;c<7;c++)n=b([2e3,1]).day(c),o=De(this.weekdaysMin(n,"")),t=De(this.weekdaysShort(n,"")),a=De(this.weekdays(n,"")),i.push(o),r.push(t),M.push(a),s.push(o),s.push(t),s.push(a);i.sort(e),r.sort(e),M.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+M.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Zc(){return this.hours()%12||12}function $c(){return this.hours()||24}function en(e,c){x(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),c)}))}function cn(e,c){return c._meridiemParse}function nn(e){return"p"===(e+"").toLowerCase().charAt(0)}x("H",["HH",2],0,"hour"),x("h",["hh",2],0,Zc),x("k",["kk",2],0,$c),x("hmm",0,0,(function(){return""+Zc.apply(this)+R(this.minutes(),2)})),x("hmmss",0,0,(function(){return""+Zc.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),x("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),x("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),en("a",!0),en("A",!1),ne("hour","h"),ie("hour",13),Re("a",cn),Re("A",cn),Re("H",qe),Re("h",qe),Re("k",qe),Re("HH",qe,he),Re("hh",qe,he),Re("kk",qe,he),Re("hmm",Ne),Re("hmmss",We),Re("Hmm",Ne),Re("Hmmss",We),xe(["H","HH"],Ge),xe(["k","kk"],(function(e,c,n){var o=le(e);c[Ge]=24===o?0:o})),xe(["a","A"],(function(e,c,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),xe(["h","hh"],(function(e,c,n){c[Ge]=le(e),f(n).bigHour=!0})),xe("hmm",(function(e,c,n){var o=e.length-2;c[Ge]=le(e.substr(0,o)),c[Ve]=le(e.substr(o)),f(n).bigHour=!0})),xe("hmmss",(function(e,c,n){var o=e.length-4,t=e.length-2;c[Ge]=le(e.substr(0,o)),c[Ve]=le(e.substr(o,2)),c[Ke]=le(e.substr(t)),f(n).bigHour=!0})),xe("Hmm",(function(e,c,n){var o=e.length-2;c[Ge]=le(e.substr(0,o)),c[Ve]=le(e.substr(o))})),xe("Hmmss",(function(e,c,n){var o=e.length-4,t=e.length-2;c[Ge]=le(e.substr(0,o)),c[Ve]=le(e.substr(o,2)),c[Ke]=le(e.substr(t))}));var on=/[ap]\.?m?\.?/i,tn=ue("Hours",!0);function an(e,c,n){return e>11?n?"pm":"PM":n?"am":"AM"}var rn,Mn={calendar:k,longDateFormat:j,invalidDate:G,ordinal:K,dayOfMonthOrdinalParse:Q,relativeTime:Z,months:cc,monthsShort:nc,week:_c,weekdays:Cc,weekdaysMin:Ec,weekdaysShort:Rc,meridiemParse:on},sn={},ln={};function un(e,c){var n,o=Math.min(e.length,c.length);for(n=0;n<o;n+=1)if(e[n]!==c[n])return n;return o}function pn(e){return e?e.toLowerCase().replace("_","-"):e}function dn(e){for(var c,n,o,t,a=0;a<e.length;){for(c=(t=pn(e[a]).split("-")).length,n=(n=pn(e[a+1]))?n.split("-"):null;c>0;){if(o=bn(t.slice(0,c).join("-")))return o;if(n&&n.length>=c&&un(t,n)>=c-1)break;c--}a++}return rn}function bn(c){var n=null;if(void 0===sn[c]&&e&&e.exports)try{n=rn._abbr,ge(),An(n)}catch(e){sn[c]=null}return sn[c]}function An(e,c){var n;return e&&((n=s(c)?hn(e):fn(e,c))?rn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rn._abbr}function fn(e,c){if(null!==c){var n,o=Mn;if(c.abbr=e,null!=sn[e])X("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."),o=sn[e]._config;else if(null!=c.parentLocale)if(null!=sn[c.parentLocale])o=sn[c.parentLocale]._config;else{if(null==(n=bn(c.parentLocale)))return ln[c.parentLocale]||(ln[c.parentLocale]=[]),ln[c.parentLocale].push({name:e,config:c}),null;o=n._config}return sn[e]=new v(S(o,c)),ln[e]&&ln[e].forEach((function(e){fn(e.name,e.config)})),An(e),sn[e]}return delete sn[e],null}function zn(e,c){if(null!=c){var n,o,t=Mn;null!=sn[e]&&null!=sn[e].parentLocale?sn[e].set(S(sn[e]._config,c)):(null!=(o=bn(e))&&(t=o._config),c=S(t,c),null==o&&(c.abbr=e),(n=new v(c)).parentLocale=sn[e],sn[e]=n),An(e)}else null!=sn[e]&&(null!=sn[e].parentLocale?(sn[e]=sn[e].parentLocale,e===An()&&An(e)):null!=sn[e]&&delete sn[e]);return sn[e]}function hn(e){var c;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rn;if(!a(e)){if(c=bn(e))return c;e=[e]}return dn(e)}function On(){return _(sn)}function Ln(e){var c,n=e._a;return n&&-2===f(e).overflow&&(c=n[je]<0||n[je]>11?je:n[Ue]<1||n[Ue]>ec(n[Fe],n[je])?Ue:n[Ge]<0||n[Ge]>24||24===n[Ge]&&(0!==n[Ve]||0!==n[Ke]||0!==n[Qe])?Ge:n[Ve]<0||n[Ve]>59?Ve:n[Ke]<0||n[Ke]>59?Ke:n[Qe]<0||n[Qe]>999?Qe:-1,f(e)._overflowDayOfYear&&(c<Fe||c>Ue)&&(c=Ue),f(e)._overflowWeeks&&-1===c&&(c=Je),f(e)._overflowWeekday&&-1===c&&(c=Ze),f(e).overflow=c),e}var mn=/^\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)?)?$/,qn=/^\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)?)?$/,Nn=/Z|[+-]\d\d(?::?\d\d)?/,gn=[["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]],Wn=[["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/]],_n=/^\/?Date\((-?\d+)/i,Tn=/^(?:(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}))$/,Xn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Bn(e){var c,n,o,t,a,i,r=e._i,M=mn.exec(r)||qn.exec(r);if(M){for(f(e).iso=!0,c=0,n=gn.length;c<n;c++)if(gn[c][1].exec(M[1])){t=gn[c][0],o=!1!==gn[c][2];break}if(null==t)return void(e._isValid=!1);if(M[3]){for(c=0,n=Wn.length;c<n;c++)if(Wn[c][1].exec(M[3])){a=(M[2]||" ")+Wn[c][0];break}if(null==a)return void(e._isValid=!1)}if(!o&&null!=a)return void(e._isValid=!1);if(M[4]){if(!Nn.exec(M[4]))return void(e._isValid=!1);i="Z"}e._f=t+(a||"")+(i||""),In(e)}else e._isValid=!1}function yn(e,c,n,o,t,a){var i=[Sn(e),nc.indexOf(c),parseInt(n,10),parseInt(o,10),parseInt(t,10)];return a&&i.push(parseInt(a,10)),i}function Sn(e){var c=parseInt(e,10);return c<=49?2e3+c:c<=999?1900+c:c}function vn(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kn(e,c,n){return!e||Rc.indexOf(e)===new Date(c[0],c[1],c[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Cn(e,c,n){if(e)return Xn[e];if(c)return 0;var o=parseInt(n,10),t=o%100;return(o-t)/100*60+t}function Rn(e){var c,n=Tn.exec(vn(e._i));if(n){if(c=yn(n[4],n[3],n[2],n[5],n[6],n[7]),!kn(n[1],c,e))return;e._a=c,e._tzm=Cn(n[8],n[9],n[10]),e._d=Lc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function En(e){var c=_n.exec(e._i);null===c?(Bn(e),!1===e._isValid&&(delete e._isValid,Rn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:o.createFromInputFallback(e)))):e._d=new Date(+c[1])}function wn(e,c,n){return null!=e?e:null!=c?c:n}function Dn(e){var c=new Date(o.now());return e._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function Pn(e){var c,n,o,t,a,i=[];if(!e._d){for(o=Dn(e),e._w&&null==e._a[Ue]&&null==e._a[je]&&xn(e),null!=e._dayOfYear&&(a=wn(e._a[Fe],o[Fe]),(e._dayOfYear>fc(a)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),n=Lc(a,0,e._dayOfYear),e._a[je]=n.getUTCMonth(),e._a[Ue]=n.getUTCDate()),c=0;c<3&&null==e._a[c];++c)e._a[c]=i[c]=o[c];for(;c<7;c++)e._a[c]=i[c]=null==e._a[c]?2===c?1:0:e._a[c];24===e._a[Ge]&&0===e._a[Ve]&&0===e._a[Ke]&&0===e._a[Qe]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?Lc:Oc).apply(null,i),t=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!==t&&(f(e).weekdayMismatch=!0)}}function xn(e){var c,n,o,t,a,i,r,M,s;null!=(c=e._w).GG||null!=c.W||null!=c.E?(a=1,i=4,n=wn(c.GG,e._a[Fe],Nc(Kn(),1,4).year),o=wn(c.W,1),((t=wn(c.E,1))<1||t>7)&&(M=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,s=Nc(Kn(),a,i),n=wn(c.gg,e._a[Fe],s.year),o=wn(c.w,s.week),null!=c.d?((t=c.d)<0||t>6)&&(M=!0):null!=c.e?(t=c.e+a,(c.e<0||c.e>6)&&(M=!0)):t=a),o<1||o>gc(n,a,i)?f(e)._overflowWeeks=!0:null!=M?f(e)._overflowWeekday=!0:(r=qc(n,o,t,a,i),e._a[Fe]=r.year,e._dayOfYear=r.dayOfYear)}function In(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],f(e).empty=!0;var c,n,t,a,i,r,M=""+e._i,s=M.length,l=0;for(t=F(e._f,e._locale).match(E)||[],c=0;c<t.length;c++)a=t[c],(n=(M.match(Ee(a,e))||[])[0])&&((i=M.substr(0,M.indexOf(n))).length>0&&f(e).unusedInput.push(i),M=M.slice(M.indexOf(n)+n.length),l+=n.length),P[a]?(n?f(e).empty=!1:f(e).unusedTokens.push(a),He(a,n,e)):e._strict&&!n&&f(e).unusedTokens.push(a);f(e).charsLeftOver=s-l,M.length>0&&f(e).unusedInput.push(M),e._a[Ge]<=12&&!0===f(e).bigHour&&e._a[Ge]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[Ge]=Hn(e._locale,e._a[Ge],e._meridiem),null!==(r=f(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(r,e._a[Fe])),Pn(e),Ln(e)}else Rn(e);else Bn(e)}function Hn(e,c,n){var o;return null==n?c:null!=e.meridiemHour?e.meridiemHour(c,n):null!=e.isPM?((o=e.isPM(n))&&c<12&&(c+=12),o||12!==c||(c=0),c):c}function Yn(e){var c,n,o,t,a,i,r=!1;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(t=0;t<e._f.length;t++)a=0,i=!1,c=m({},e),null!=e._useUTC&&(c._useUTC=e._useUTC),c._f=e._f[t],In(c),z(c)&&(i=!0),a+=f(c).charsLeftOver,a+=10*f(c).unusedTokens.length,f(c).score=a,r?a<o&&(o=a,n=c):(null==o||a<o||i)&&(o=a,n=c,i&&(r=!0));d(e,n||c)}function Fn(e){if(!e._d){var c=te(e._i),n=void 0===c.day?c.date:c.day;e._a=p([c.year,c.month,n,c.hour,c.minute,c.second,c.millisecond],(function(e){return e&&parseInt(e,10)})),Pn(e)}}function jn(e){var c=new q(Ln(Un(e)));return c._nextDay&&(c.add(1,"d"),c._nextDay=void 0),c}function Un(e){var c=e._i,n=e._f;return e._locale=e._locale||hn(e._l),null===c||void 0===n&&""===c?h({nullInput:!0}):("string"==typeof c&&(e._i=c=e._locale.preparse(c)),N(c)?new q(Ln(c)):(u(c)?e._d=c:a(n)?Yn(e):n?In(e):Gn(e),z(e)||(e._d=null),e))}function Gn(e){var c=e._i;s(c)?e._d=new Date(o.now()):u(c)?e._d=new Date(c.valueOf()):"string"==typeof c?En(e):a(c)?(e._a=p(c.slice(0),(function(e){return parseInt(e,10)})),Pn(e)):i(c)?Fn(e):l(c)?e._d=new Date(c):o.createFromInputFallback(e)}function Vn(e,c,n,o,t){var r={};return!0!==c&&!1!==c||(o=c,c=void 0),!0!==n&&!1!==n||(o=n,n=void 0),(i(e)&&M(e)||a(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=t,r._l=n,r._i=e,r._f=c,r._strict=o,jn(r)}function Kn(e,c,n,o){return Vn(e,c,n,o,!1)}o.createFromInputFallback=W("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":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var Qn=W("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:h()})),Jn=W("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:h()}));function Zn(e,c){var n,o;if(1===c.length&&a(c[0])&&(c=c[0]),!c.length)return Kn();for(n=c[0],o=1;o<c.length;++o)c[o].isValid()&&!c[o][e](n)||(n=c[o]);return n}function $n(){return Zn("isBefore",[].slice.call(arguments,0))}function eo(){return Zn("isAfter",[].slice.call(arguments,0))}var co=function(){return Date.now?Date.now():+new Date},no=["year","quarter","month","week","day","hour","minute","second","millisecond"];function oo(e){var c,n,o=!1;for(c in e)if(r(e,c)&&(-1===Ye.call(no,c)||null!=e[c]&&isNaN(e[c])))return!1;for(n=0;n<no.length;++n)if(e[no[n]]){if(o)return!1;parseFloat(e[no[n]])!==le(e[no[n]])&&(o=!0)}return!0}function to(){return this._isValid}function ao(){return Bo(NaN)}function io(e){var c=te(e),n=c.year||0,o=c.quarter||0,t=c.month||0,a=c.week||c.isoWeek||0,i=c.day||0,r=c.hour||0,M=c.minute||0,s=c.second||0,l=c.millisecond||0;this._isValid=oo(c),this._milliseconds=+l+1e3*s+6e4*M+1e3*r*60*60,this._days=+i+7*a,this._months=+t+3*o+12*n,this._data={},this._locale=hn(),this._bubble()}function ro(e){return e instanceof io}function Mo(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function so(e,c,n){var o,t=Math.min(e.length,c.length),a=Math.abs(e.length-c.length),i=0;for(o=0;o<t;o++)(n&&e[o]!==c[o]||!n&&le(e[o])!==le(c[o]))&&i++;return i+a}function lo(e,c){x(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+R(~~(e/60),2)+c+R(~~e%60,2)}))}lo("Z",":"),lo("ZZ",""),Re("Z",ve),Re("ZZ",ve),xe(["Z","ZZ"],(function(e,c,n){n._useUTC=!0,n._tzm=po(ve,e)}));var uo=/([\+\-]|\d\d)/gi;function po(e,c){var n,o,t=(c||"").match(e);return null===t?null:0===(o=60*(n=((t[t.length-1]||[])+"").match(uo)||["-",0,0])[1]+le(n[2]))?0:"+"===n[0]?o:-o}function bo(e,c){var n,t;return c._isUTC?(n=c.clone(),t=(N(e)||u(e)?e.valueOf():Kn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+t),o.updateOffset(n,!1),n):Kn(e).local()}function Ao(e){return-Math.round(e._d.getTimezoneOffset())}function fo(e,c,n){var t,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=po(ve,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&c&&(t=Ao(this)),this._offset=e,this._isUTC=!0,null!=t&&this.add(t,"m"),a!==e&&(!c||this._changeInProgress?Co(this,Bo(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Ao(this)}function zo(e,c){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,c),this):-this.utcOffset()}function ho(e){return this.utcOffset(0,e)}function Oo(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ao(this),"m")),this}function Lo(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=po(Se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function mo(e){return!!this.isValid()&&(e=e?Kn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function qo(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function No(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e,c={};return m(c,this),(c=Un(c))._a?(e=c._isUTC?b(c._a):Kn(c._a),this._isDSTShifted=this.isValid()&&so(c._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function go(){return!!this.isValid()&&!this._isUTC}function Wo(){return!!this.isValid()&&this._isUTC}function _o(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var To=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Xo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Bo(e,c){var n,o,t,a=e,i=null;return ro(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(a={},c?a[c]=+e:a.milliseconds=+e):(i=To.exec(e))?(n="-"===i[1]?-1:1,a={y:0,d:le(i[Ue])*n,h:le(i[Ge])*n,m:le(i[Ve])*n,s:le(i[Ke])*n,ms:le(Mo(1e3*i[Qe]))*n}):(i=Xo.exec(e))?(n="-"===i[1]?-1:1,a={y:yo(i[2],n),M:yo(i[3],n),w:yo(i[4],n),d:yo(i[5],n),h:yo(i[6],n),m:yo(i[7],n),s:yo(i[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(t=vo(Kn(a.from),Kn(a.to)),(a={}).ms=t.milliseconds,a.M=t.months),o=new io(a),ro(e)&&r(e,"_locale")&&(o._locale=e._locale),ro(e)&&r(e,"_isValid")&&(o._isValid=e._isValid),o}function yo(e,c){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*c}function So(e,c){var n={};return n.months=c.month()-e.month()+12*(c.year()-e.year()),e.clone().add(n.months,"M").isAfter(c)&&--n.months,n.milliseconds=+c-+e.clone().add(n.months,"M"),n}function vo(e,c){var n;return e.isValid()&&c.isValid()?(c=bo(c,e),e.isBefore(c)?n=So(e,c):((n=So(c,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function ko(e,c){return function(n,o){var t;return null===o||isNaN(+o)||(X(c,"moment()."+c+"(period, number) is deprecated. Please use moment()."+c+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),t=n,n=o,o=t),Co(this,Bo(n,o),e),this}}function Co(e,c,n,t){var a=c._milliseconds,i=Mo(c._days),r=Mo(c._months);e.isValid()&&(t=null==t||t,r&&lc(e,pe(e,"Month")+r*n),i&&de(e,"Date",pe(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),t&&o.updateOffset(e,i||r))}Bo.fn=io.prototype,Bo.invalid=ao;var Ro=ko(1,"add"),Eo=ko(-1,"subtract");function wo(e){return"string"==typeof e||e instanceof String}function Do(e){return N(e)||u(e)||wo(e)||l(e)||xo(e)||Po(e)||null==e}function Po(e){var c,n,o=i(e)&&!M(e),t=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(c=0;c<a.length;c+=1)n=a[c],t=t||r(e,n);return o&&t}function xo(e){var c=a(e),n=!1;return c&&(n=0===e.filter((function(c){return!l(c)&&wo(e)})).length),c&&n}function Io(e){var c,n,o=i(e)&&!M(e),t=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(c=0;c<a.length;c+=1)n=a[c],t=t||r(e,n);return o&&t}function Ho(e,c){var n=e.diff(c,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Yo(e,c){1===arguments.length&&(arguments[0]?Do(arguments[0])?(e=arguments[0],c=void 0):Io(arguments[0])&&(c=arguments[0],e=void 0):(e=void 0,c=void 0));var n=e||Kn(),t=bo(n,this).startOf("day"),a=o.calendarFormat(this,t)||"sameElse",i=c&&(B(c[a])?c[a].call(this,n):c[a]);return this.format(i||this.localeData().calendar(a,this,Kn(n)))}function Fo(){return new q(this)}function jo(e,c){var n=N(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(c=oe(c)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(c).valueOf())}function Uo(e,c){var n=N(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(c=oe(c)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(c).valueOf()<n.valueOf())}function Go(e,c,n,o){var t=N(e)?e:Kn(e),a=N(c)?c:Kn(c);return!!(this.isValid()&&t.isValid()&&a.isValid())&&("("===(o=o||"()")[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===o[1]?this.isBefore(a,n):!this.isAfter(a,n))}function Vo(e,c){var n,o=N(e)?e:Kn(e);return!(!this.isValid()||!o.isValid())&&("millisecond"===(c=oe(c)||"millisecond")?this.valueOf()===o.valueOf():(n=o.valueOf(),this.clone().startOf(c).valueOf()<=n&&n<=this.clone().endOf(c).valueOf()))}function Ko(e,c){return this.isSame(e,c)||this.isAfter(e,c)}function Qo(e,c){return this.isSame(e,c)||this.isBefore(e,c)}function Jo(e,c,n){var o,t,a;if(!this.isValid())return NaN;if(!(o=bo(e,this)).isValid())return NaN;switch(t=6e4*(o.utcOffset()-this.utcOffset()),c=oe(c)){case"year":a=Zo(this,o)/12;break;case"month":a=Zo(this,o);break;case"quarter":a=Zo(this,o)/3;break;case"second":a=(this-o)/1e3;break;case"minute":a=(this-o)/6e4;break;case"hour":a=(this-o)/36e5;break;case"day":a=(this-o-t)/864e5;break;case"week":a=(this-o-t)/6048e5;break;default:a=this-o}return n?a:se(a)}function Zo(e,c){if(e.date()<c.date())return-Zo(c,e);var n=12*(c.year()-e.year())+(c.month()-e.month()),o=e.clone().add(n,"months");return-(n+(c-o<0?(c-o)/(o-e.clone().add(n-1,"months")):(c-o)/(e.clone().add(n+1,"months")-o)))||0}function $o(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function et(e){if(!this.isValid())return null;var c=!0!==e,n=c?this.clone().utc():this;return n.year()<0||n.year()>9999?Y(n,c?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):B(Date.prototype.toISOString)?c?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Y(n,"Z")):Y(n,c?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ct(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,c,n,o,t="moment",a="";return this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+t+'("]',c=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",o=a+'[")]',this.format(e+c+n+o)}function nt(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var c=Y(this,e);return this.localeData().postformat(c)}function ot(e,c){return this.isValid()&&(N(e)&&e.isValid()||Kn(e).isValid())?Bo({to:this,from:e}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()}function tt(e){return this.from(Kn(),e)}function at(e,c){return this.isValid()&&(N(e)&&e.isValid()||Kn(e).isValid())?Bo({from:this,to:e}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()}function it(e){return this.to(Kn(),e)}function rt(e){var c;return void 0===e?this._locale._abbr:(null!=(c=hn(e))&&(this._locale=c),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Mt=W("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 st(){return this._locale}var lt=1e3,ut=60*lt,pt=60*ut,dt=3506328*pt;function bt(e,c){return(e%c+c)%c}function At(e,c,n){return e<100&&e>=0?new Date(e+400,c,n)-dt:new Date(e,c,n).valueOf()}function ft(e,c,n){return e<100&&e>=0?Date.UTC(e+400,c,n)-dt:Date.UTC(e,c,n)}function zt(e){var c,n;if(void 0===(e=oe(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?ft:At,e){case"year":c=n(this.year(),0,1);break;case"quarter":c=n(this.year(),this.month()-this.month()%3,1);break;case"month":c=n(this.year(),this.month(),1);break;case"week":c=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":c=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":c=n(this.year(),this.month(),this.date());break;case"hour":c=this._d.valueOf(),c-=bt(c+(this._isUTC?0:this.utcOffset()*ut),pt);break;case"minute":c=this._d.valueOf(),c-=bt(c,ut);break;case"second":c=this._d.valueOf(),c-=bt(c,lt)}return this._d.setTime(c),o.updateOffset(this,!0),this}function ht(e){var c,n;if(void 0===(e=oe(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?ft:At,e){case"year":c=n(this.year()+1,0,1)-1;break;case"quarter":c=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":c=n(this.year(),this.month()+1,1)-1;break;case"week":c=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":c=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":c=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":c=this._d.valueOf(),c+=pt-bt(c+(this._isUTC?0:this.utcOffset()*ut),pt)-1;break;case"minute":c=this._d.valueOf(),c+=ut-bt(c,ut)-1;break;case"second":c=this._d.valueOf(),c+=lt-bt(c,lt)-1}return this._d.setTime(c),o.updateOffset(this,!0),this}function Ot(){return this._d.valueOf()-6e4*(this._offset||0)}function Lt(){return Math.floor(this.valueOf()/1e3)}function mt(){return new Date(this.valueOf())}function qt(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Nt(){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 gt(){return this.isValid()?this.toISOString():null}function Wt(){return z(this)}function _t(){return d({},f(this))}function Tt(){return f(this).overflow}function Xt(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Bt(e,c){var n,t,a,i=this._eras||hn("en")._eras;for(n=0,t=i.length;n<t;++n)switch("string"==typeof i[n].since&&(a=o(i[n].since).startOf("day"),i[n].since=a.valueOf()),typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=o(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}return i}function yt(e,c,n){var o,t,a,i,r,M=this.eras();for(e=e.toUpperCase(),o=0,t=M.length;o<t;++o)if(a=M[o].name.toUpperCase(),i=M[o].abbr.toUpperCase(),r=M[o].narrow.toUpperCase(),n)switch(c){case"N":case"NN":case"NNN":if(i===e)return M[o];break;case"NNNN":if(a===e)return M[o];break;case"NNNNN":if(r===e)return M[o]}else if([a,i,r].indexOf(e)>=0)return M[o]}function St(e,c){var n=e.since<=e.until?1:-1;return void 0===c?o(e.since).year():o(e.since).year()+(c-e.offset)*n}function vt(){var e,c,n,o=this.localeData().eras();for(e=0,c=o.length;e<c;++e){if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until)return o[e].name;if(o[e].until<=n&&n<=o[e].since)return o[e].name}return""}function kt(){var e,c,n,o=this.localeData().eras();for(e=0,c=o.length;e<c;++e){if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until)return o[e].narrow;if(o[e].until<=n&&n<=o[e].since)return o[e].narrow}return""}function Ct(){var e,c,n,o=this.localeData().eras();for(e=0,c=o.length;e<c;++e){if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until)return o[e].abbr;if(o[e].until<=n&&n<=o[e].since)return o[e].abbr}return""}function Rt(){var e,c,n,t,a=this.localeData().eras();for(e=0,c=a.length;e<c;++e)if(n=a[e].since<=a[e].until?1:-1,t=this.clone().startOf("day").valueOf(),a[e].since<=t&&t<=a[e].until||a[e].until<=t&&t<=a[e].since)return(this.year()-o(a[e].since).year())*n+a[e].offset;return this.year()}function Et(e){return r(this,"_erasNameRegex")||Yt.call(this),e?this._erasNameRegex:this._erasRegex}function wt(e){return r(this,"_erasAbbrRegex")||Yt.call(this),e?this._erasAbbrRegex:this._erasRegex}function Dt(e){return r(this,"_erasNarrowRegex")||Yt.call(this),e?this._erasNarrowRegex:this._erasRegex}function Pt(e,c){return c.erasAbbrRegex(e)}function xt(e,c){return c.erasNameRegex(e)}function It(e,c){return c.erasNarrowRegex(e)}function Ht(e,c){return c._eraYearOrdinalRegex||Be}function Yt(){var e,c,n=[],o=[],t=[],a=[],i=this.eras();for(e=0,c=i.length;e<c;++e)o.push(De(i[e].name)),n.push(De(i[e].abbr)),t.push(De(i[e].narrow)),a.push(De(i[e].name)),a.push(De(i[e].abbr)),a.push(De(i[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}function Ft(e,c){x(0,[e,e.length],0,c)}function jt(e){return Jt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ut(e){return Jt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Gt(){return gc(this.year(),1,4)}function Vt(){return gc(this.isoWeekYear(),1,4)}function Kt(){var e=this.localeData()._week;return gc(this.year(),e.dow,e.doy)}function Qt(){var e=this.localeData()._week;return gc(this.weekYear(),e.dow,e.doy)}function Jt(e,c,n,o,t){var a;return null==e?Nc(this,o,t).year:(c>(a=gc(e,o,t))&&(c=a),Zt.call(this,e,c,n,o,t))}function Zt(e,c,n,o,t){var a=qc(e,c,n,o,t),i=Lc(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function $t(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}x("N",0,0,"eraAbbr"),x("NN",0,0,"eraAbbr"),x("NNN",0,0,"eraAbbr"),x("NNNN",0,0,"eraName"),x("NNNNN",0,0,"eraNarrow"),x("y",["y",1],"yo","eraYear"),x("y",["yy",2],0,"eraYear"),x("y",["yyy",3],0,"eraYear"),x("y",["yyyy",4],0,"eraYear"),Re("N",Pt),Re("NN",Pt),Re("NNN",Pt),Re("NNNN",xt),Re("NNNNN",It),xe(["N","NN","NNN","NNNN","NNNNN"],(function(e,c,n,o){var t=n._locale.erasParse(e,o,n._strict);t?f(n).era=t:f(n).invalidEra=e})),Re("y",Be),Re("yy",Be),Re("yyy",Be),Re("yyyy",Be),Re("yo",Ht),xe(["y","yy","yyy","yyyy"],Fe),xe(["yo"],(function(e,c,n,o){var t;n._locale._eraYearOrdinalRegex&&(t=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?c[Fe]=n._locale.eraYearOrdinalParse(e,t):c[Fe]=parseInt(e,10)})),x(0,["gg",2],0,(function(){return this.weekYear()%100})),x(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Ft("gggg","weekYear"),Ft("ggggg","weekYear"),Ft("GGGG","isoWeekYear"),Ft("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ie("weekYear",1),ie("isoWeekYear",1),Re("G",ye),Re("g",ye),Re("GG",qe,he),Re("gg",qe,he),Re("GGGG",Te,Le),Re("gggg",Te,Le),Re("GGGGG",Xe,me),Re("ggggg",Xe,me),Ie(["gggg","ggggg","GGGG","GGGGG"],(function(e,c,n,o){c[o.substr(0,2)]=le(e)})),Ie(["gg","GG"],(function(e,c,n,t){c[t]=o.parseTwoDigitYear(e)})),x("Q",0,"Qo","quarter"),ne("quarter","Q"),ie("quarter",7),Re("Q",ze),xe("Q",(function(e,c){c[je]=3*(le(e)-1)})),x("D",["DD",2],"Do","date"),ne("date","D"),ie("date",9),Re("D",qe),Re("DD",qe,he),Re("Do",(function(e,c){return e?c._dayOfMonthOrdinalParse||c._ordinalParse:c._dayOfMonthOrdinalParseLenient})),xe(["D","DD"],Ue),xe("Do",(function(e,c){c[Ue]=le(e.match(qe)[0])}));var ea=ue("Date",!0);function ca(e){var c=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?c:this.add(e-c,"d")}x("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ie("dayOfYear",4),Re("DDD",_e),Re("DDDD",Oe),xe(["DDD","DDDD"],(function(e,c,n){n._dayOfYear=le(e)})),x("m",["mm",2],0,"minute"),ne("minute","m"),ie("minute",14),Re("m",qe),Re("mm",qe,he),xe(["m","mm"],Ve);var na=ue("Minutes",!1);x("s",["ss",2],0,"second"),ne("second","s"),ie("second",15),Re("s",qe),Re("ss",qe,he),xe(["s","ss"],Ke);var oa,ta,aa=ue("Seconds",!1);for(x("S",0,0,(function(){return~~(this.millisecond()/100)})),x(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),x(0,["SSS",3],0,"millisecond"),x(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),x(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),x(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),x(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),x(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),x(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ie("millisecond",16),Re("S",_e,ze),Re("SS",_e,he),Re("SSS",_e,Oe),oa="SSSS";oa.length<=9;oa+="S")Re(oa,Be);function ia(e,c){c[Qe]=le(1e3*("0."+e))}for(oa="S";oa.length<=9;oa+="S")xe(oa,ia);function ra(){return this._isUTC?"UTC":""}function Ma(){return this._isUTC?"Coordinated Universal Time":""}ta=ue("Milliseconds",!1),x("z",0,0,"zoneAbbr"),x("zz",0,0,"zoneName");var sa=q.prototype;function la(e){return Kn(1e3*e)}function ua(){return Kn.apply(null,arguments).parseZone()}function pa(e){return e}sa.add=Ro,sa.calendar=Yo,sa.clone=Fo,sa.diff=Jo,sa.endOf=ht,sa.format=nt,sa.from=ot,sa.fromNow=tt,sa.to=at,sa.toNow=it,sa.get=be,sa.invalidAt=Tt,sa.isAfter=jo,sa.isBefore=Uo,sa.isBetween=Go,sa.isSame=Vo,sa.isSameOrAfter=Ko,sa.isSameOrBefore=Qo,sa.isValid=Wt,sa.lang=Mt,sa.locale=rt,sa.localeData=st,sa.max=Jn,sa.min=Qn,sa.parsingFlags=_t,sa.set=Ae,sa.startOf=zt,sa.subtract=Eo,sa.toArray=qt,sa.toObject=Nt,sa.toDate=mt,sa.toISOString=et,sa.inspect=ct,"undefined"!=typeof Symbol&&null!=Symbol.for&&(sa[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),sa.toJSON=gt,sa.toString=$o,sa.unix=Lt,sa.valueOf=Ot,sa.creationData=Xt,sa.eraName=vt,sa.eraNarrow=kt,sa.eraAbbr=Ct,sa.eraYear=Rt,sa.year=zc,sa.isLeapYear=hc,sa.weekYear=jt,sa.isoWeekYear=Ut,sa.quarter=sa.quarters=$t,sa.month=uc,sa.daysInMonth=pc,sa.week=sa.weeks=Bc,sa.isoWeek=sa.isoWeeks=yc,sa.weeksInYear=Kt,sa.weeksInWeekYear=Qt,sa.isoWeeksInYear=Gt,sa.isoWeeksInISOWeekYear=Vt,sa.date=ea,sa.day=sa.days=jc,sa.weekday=Uc,sa.isoWeekday=Gc,sa.dayOfYear=ca,sa.hour=sa.hours=tn,sa.minute=sa.minutes=na,sa.second=sa.seconds=aa,sa.millisecond=sa.milliseconds=ta,sa.utcOffset=fo,sa.utc=ho,sa.local=Oo,sa.parseZone=Lo,sa.hasAlignedHourOffset=mo,sa.isDST=qo,sa.isLocal=go,sa.isUtcOffset=Wo,sa.isUtc=_o,sa.isUTC=_o,sa.zoneAbbr=ra,sa.zoneName=Ma,sa.dates=W("dates accessor is deprecated. Use date instead.",ea),sa.months=W("months accessor is deprecated. Use month instead",uc),sa.years=W("years accessor is deprecated. Use year instead",zc),sa.zone=W("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zo),sa.isDSTShifted=W("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",No);var da=v.prototype;function ba(e,c,n,o){var t=hn(),a=b().set(o,c);return t[n](a,e)}function Aa(e,c,n){if(l(e)&&(c=e,e=void 0),e=e||"",null!=c)return ba(e,c,n,"month");var o,t=[];for(o=0;o<12;o++)t[o]=ba(e,o,n,"month");return t}function fa(e,c,n,o){"boolean"==typeof e?(l(c)&&(n=c,c=void 0),c=c||""):(n=c=e,e=!1,l(c)&&(n=c,c=void 0),c=c||"");var t,a=hn(),i=e?a._week.dow:0,r=[];if(null!=n)return ba(c,(n+i)%7,o,"day");for(t=0;t<7;t++)r[t]=ba(c,(t+i)%7,o,"day");return r}function za(e,c){return Aa(e,c,"months")}function ha(e,c){return Aa(e,c,"monthsShort")}function Oa(e,c,n){return fa(e,c,n,"weekdays")}function La(e,c,n){return fa(e,c,n,"weekdaysShort")}function ma(e,c,n){return fa(e,c,n,"weekdaysMin")}da.calendar=C,da.longDateFormat=U,da.invalidDate=V,da.ordinal=J,da.preparse=pa,da.postformat=pa,da.relativeTime=$,da.pastFuture=ee,da.set=y,da.eras=Bt,da.erasParse=yt,da.erasConvertYear=St,da.erasAbbrRegex=wt,da.erasNameRegex=Et,da.erasNarrowRegex=Dt,da.months=ic,da.monthsShort=rc,da.monthsParse=sc,da.monthsRegex=bc,da.monthsShortRegex=dc,da.week=Wc,da.firstDayOfYear=Xc,da.firstDayOfWeek=Tc,da.weekdays=xc,da.weekdaysMin=Hc,da.weekdaysShort=Ic,da.weekdaysParse=Fc,da.weekdaysRegex=Vc,da.weekdaysShortRegex=Kc,da.weekdaysMinRegex=Qc,da.isPM=nn,da.meridiem=an,An("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 c=e%10;return e+(1===le(e%100/10)?"th":1===c?"st":2===c?"nd":3===c?"rd":"th")}}),o.lang=W("moment.lang is deprecated. Use moment.locale instead.",An),o.langData=W("moment.langData is deprecated. Use moment.localeData instead.",hn);var qa=Math.abs;function Na(){var e=this._data;return this._milliseconds=qa(this._milliseconds),this._days=qa(this._days),this._months=qa(this._months),e.milliseconds=qa(e.milliseconds),e.seconds=qa(e.seconds),e.minutes=qa(e.minutes),e.hours=qa(e.hours),e.months=qa(e.months),e.years=qa(e.years),this}function ga(e,c,n,o){var t=Bo(c,n);return e._milliseconds+=o*t._milliseconds,e._days+=o*t._days,e._months+=o*t._months,e._bubble()}function Wa(e,c){return ga(this,e,c,1)}function _a(e,c){return ga(this,e,c,-1)}function Ta(e){return e<0?Math.floor(e):Math.ceil(e)}function Xa(){var e,c,n,o,t,a=this._milliseconds,i=this._days,r=this._months,M=this._data;return a>=0&&i>=0&&r>=0||a<=0&&i<=0&&r<=0||(a+=864e5*Ta(ya(r)+i),i=0,r=0),M.milliseconds=a%1e3,e=se(a/1e3),M.seconds=e%60,c=se(e/60),M.minutes=c%60,n=se(c/60),M.hours=n%24,i+=se(n/24),r+=t=se(Ba(i)),i-=Ta(ya(t)),o=se(r/12),r%=12,M.days=i,M.months=r,M.years=o,this}function Ba(e){return 4800*e/146097}function ya(e){return 146097*e/4800}function Sa(e){if(!this.isValid())return NaN;var c,n,o=this._milliseconds;if("month"===(e=oe(e))||"quarter"===e||"year"===e)switch(c=this._days+o/864e5,n=this._months+Ba(c),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(c=this._days+Math.round(ya(this._months)),e){case"week":return c/7+o/6048e5;case"day":return c+o/864e5;case"hour":return 24*c+o/36e5;case"minute":return 1440*c+o/6e4;case"second":return 86400*c+o/1e3;case"millisecond":return Math.floor(864e5*c)+o;default:throw new Error("Unknown unit "+e)}}function va(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*le(this._months/12):NaN}function ka(e){return function(){return this.as(e)}}var Ca=ka("ms"),Ra=ka("s"),Ea=ka("m"),wa=ka("h"),Da=ka("d"),Pa=ka("w"),xa=ka("M"),Ia=ka("Q"),Ha=ka("y");function Ya(){return Bo(this)}function Fa(e){return e=oe(e),this.isValid()?this[e+"s"]():NaN}function ja(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ua=ja("milliseconds"),Ga=ja("seconds"),Va=ja("minutes"),Ka=ja("hours"),Qa=ja("days"),Ja=ja("months"),Za=ja("years");function $a(){return se(this.days()/7)}var ei=Math.round,ci={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,c,n,o,t){return t.relativeTime(c||1,!!n,e,o)}function oi(e,c,n,o){var t=Bo(e).abs(),a=ei(t.as("s")),i=ei(t.as("m")),r=ei(t.as("h")),M=ei(t.as("d")),s=ei(t.as("M")),l=ei(t.as("w")),u=ei(t.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||r<=1&&["h"]||r<n.h&&["hh",r]||M<=1&&["d"]||M<n.d&&["dd",M];return null!=n.w&&(p=p||l<=1&&["w"]||l<n.w&&["ww",l]),(p=p||s<=1&&["M"]||s<n.M&&["MM",s]||u<=1&&["y"]||["yy",u])[2]=c,p[3]=+e>0,p[4]=o,ni.apply(null,p)}function ti(e){return void 0===e?ei:"function"==typeof e&&(ei=e,!0)}function ai(e,c){return void 0!==ci[e]&&(void 0===c?ci[e]:(ci[e]=c,"s"===e&&(ci.ss=c-1),!0))}function ii(e,c){if(!this.isValid())return this.localeData().invalidDate();var n,o,t=!1,a=ci;return"object"==typeof e&&(c=e,e=!1),"boolean"==typeof e&&(t=e),"object"==typeof c&&(a=Object.assign({},ci,c),null!=c.s&&null==c.ss&&(a.ss=c.s-1)),o=oi(this,!t,a,n=this.localeData()),t&&(o=n.pastFuture(+this,o)),n.postformat(o)}var ri=Math.abs;function Mi(e){return(e>0)-(e<0)||+e}function si(){if(!this.isValid())return this.localeData().invalidDate();var e,c,n,o,t,a,i,r,M=ri(this._milliseconds)/1e3,s=ri(this._days),l=ri(this._months),u=this.asSeconds();return u?(e=se(M/60),c=se(e/60),M%=60,e%=60,n=se(l/12),l%=12,o=M?M.toFixed(3).replace(/\.?0+$/,""):"",t=u<0?"-":"",a=Mi(this._months)!==Mi(u)?"-":"",i=Mi(this._days)!==Mi(u)?"-":"",r=Mi(this._milliseconds)!==Mi(u)?"-":"",t+"P"+(n?a+n+"Y":"")+(l?a+l+"M":"")+(s?i+s+"D":"")+(c||e||M?"T":"")+(c?r+c+"H":"")+(e?r+e+"M":"")+(M?r+o+"S":"")):"P0D"}var li=io.prototype;return li.isValid=to,li.abs=Na,li.add=Wa,li.subtract=_a,li.as=Sa,li.asMilliseconds=Ca,li.asSeconds=Ra,li.asMinutes=Ea,li.asHours=wa,li.asDays=Da,li.asWeeks=Pa,li.asMonths=xa,li.asQuarters=Ia,li.asYears=Ha,li.valueOf=va,li._bubble=Xa,li.clone=Ya,li.get=Fa,li.milliseconds=Ua,li.seconds=Ga,li.minutes=Va,li.hours=Ka,li.days=Qa,li.weeks=$a,li.months=Ja,li.years=Za,li.humanize=ii,li.toISOString=si,li.toString=si,li.toJSON=si,li.locale=rt,li.localeData=st,li.toIsoString=W("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",si),li.lang=Mt,x("X",0,0,"unix"),x("x",0,0,"valueOf"),Re("x",ye),Re("X",ke),xe("X",(function(e,c,n){n._d=new Date(1e3*parseFloat(e))})),xe("x",(function(e,c,n){n._d=new Date(le(e))})),
|
|
2
2
|
//! moment.js
|
|
3
3
|
o.version="2.29.1",t(Kn),o.fn=sa,o.min=$n,o.max=eo,o.now=co,o.utc=b,o.unix=la,o.months=za,o.isDate=u,o.locale=An,o.invalid=h,o.duration=Bo,o.isMoment=N,o.weekdays=Oa,o.parseZone=ua,o.localeData=hn,o.isDuration=ro,o.monthsShort=ha,o.weekdaysMin=ma,o.defineLocale=fn,o.updateLocale=zn,o.locales=On,o.weekdaysShort=La,o.normalizeUnits=oe,o.relativeTimeRounding=ti,o.relativeTimeThreshold=ai,o.calendarFormat=Ho,o.prototype=sa,o.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"},o}()})),Xe=We((function(e){
|
|
4
4
|
//! moment-timezone.js
|
|
@@ -42,5 +42,5 @@ function c(e,c,n,o){var t={m:["eine Minute","einer Minute"],h:["eine Stunde","ei
|
|
|
42
42
|
/*!************************!*\
|
|
43
43
|
!*** external "react" ***!
|
|
44
44
|
\************************/
|
|
45
|
-
/*! no static exports found */function(c,n){c.exports=e}})},e.exports=n(N.default)})),Ue=(Fe=je)&&Fe.__esModule&&Object.prototype.hasOwnProperty.call(Fe,"default")?Fe.default:Fe;function Ge(e){var c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=ee(e);if(c){var t=ee(this).constructor;n=Reflect.construct(o,arguments,t)}else n=o.apply(this,arguments);return $(this,n)}}Re.locale("en"),g.default.init({fallbackLng:"fi",defaultNS:"translation",interpolation:{escapeValue:!1}});"production"!==process.env.NODE_ENV&&q.default.node;var Ve=function(e){if(e&&e.GTFS.platform){var c=e.GTFS,n=c.modes,o=c.platform;return[n&&"RAIL"===n[0]?g.default.t("track"):g.default.t("platform"),o]}};function Ke(e){if("FutureRoute"!==e.type){if("SelectFromMap"===e.type)return["",g.default.t("select-from-map")];if("CurrentLocation"===e.type)return["",g.default.t("use-own-position")];if("SelectFromOwnLocations"===e.type)return["",g.default.t("select-from-own-locations")];var c,n=ce(pe(e.properties,!0),2),o=n[0],t=n[1];if(e.properties.layer.toLowerCase().includes("bikerental")||e.properties.layer.toLowerCase().includes("bikestation"))return[c=g.default.t("bikerentalstation"),o,void 0,e.properties.labelId];if(e.properties.mode)c=g.default.t(e.properties.mode.toLowerCase().replace("favourite",""));else{var a=e.properties.layer.replace("route-","").toLowerCase().replace("favourite","");c=g.default.t(a)}if(e.properties.id&&("stop"===e.properties.layer||"station"===e.properties.layer)){var i,r=ue(e.properties),M=null===(i=e.properties.addendum)||void 0===i?void 0:i.GTFS.modes,s=Ve(e.properties.addendum);return[c,se(o,r),t,r,M,s]}if("favouriteStop"===e.properties.layer||"favouriteStation"===e.properties.layer){var l=e.properties,u=l.address,p=l.code;return[c,u?se(u.split(",")[0],p):o,t,p,void 0,Ve(e.properties.addendum)]}return[c,o,t]}var d=e.properties,b=d.origin,A=d.destination,f=b.locality?", ".concat(b.locality," foobar"):"",z=A.locality?", ".concat(A.locality):"",h=b.name,O=A.name;return[g.default.t("future-route"),"".concat(g.default.t("origin")," ").concat(h).concat(f," ").concat(g.default.t("destination")," ").concat(O).concat(z),e.translatedText]}function Qe(e){var c=Re.unix(e.properties.time),n=e.properties.arriveBy?g.default.t("arrival"):g.default.t("departure");return n=c.isSame(Re(),"day")?"".concat(n," ").concat(g.default.t("today-at")):c.isSame(Re().add(1,"day"),"day")?"".concat(n," ").concat(g.default.t("tomorrow-at")):"".concat(n," ").concat(c.format("dd D.M.")),n="".concat(n," ").concat(Re(c).format("HH:mm"))}var Je=function(e){J(n,e);var c=Ge(n);function n(e){var o;return G(this,n),(o=c.call(this,e)).componentDidUpdate=function(){g.default.language!==o.props.lang&&g.default.changeLanguage(o.props.lang)},o.UNSAFE_componentWillReceiveProps=function(e){e.value===o.state.value||o.state.editing||o.setState({value:e.value})},o.onChange=function(e,c){var n=c.newValue,t=c.method,a={value:o.fInput||n||"",renderMobileSearch:o.props.isMobile};if(o.fInput=null,o.state.editing){if("enter"!==t||o.state.valid){if(o.state.typingTimer&&clearTimeout(o.state.typingTimer),"type"===t){var i=setTimeout((function(){o.setState({typing:!1})}),1e3);a.typingTimer=i,a.typing=!0}o.setState(a)}}else a.editing=!0,o.setState(a,(function(){return o.fetchFunction({value:n||""})}))},o.onBlur=function(){o.state.renderMobileSearch||(o.state.editing&&o.input.focus(),o.setState({editing:!1,renderMobileSearch:!1,value:o.props.value}))},o.onSelected=function(e,c){if(o.state.valid){if("SelectFromOwnLocations"===c.suggestion.type)return void o.setState({sources:["Favourite","Back"],ownPlaces:!0,pendingSelection:c.suggestion.type,value:""},(function(){o.fetchFunction({value:""})}));if("back"===c.suggestion.type||"FutureRoute"===c.suggestion.type)return void o.setState({sources:o.props.sources,ownPlaces:!1,pendingSelection:c.suggestion.type,suggestionIndex:c.suggestionIndex},(function(){o.fetchFunction({value:""})}));o.selectionDone=!0,o.setState({editing:!1,value:c.suggestionValue},(function(){o.input.blur(),o.props.handleViaPoints?o.props.handleViaPoints(c.suggestion,c.suggestionIndex):o.props.onSelect(c.suggestion,o.props.id),o.setState({renderMobileSearch:!1,sources:o.props.sources,ownPlaces:!1,suggestions:[]},(function(){o.selectionDone=!1})),!o.props.focusChange||o.props.isMobile&&!o.props.isEmbedded||o.props.focusChange(),o.props.isMobile&&o.closeMobileSearch()}))}else o.setState((function(e){return{pendingSelection:e.value}}),(function(){return o.checkPendingSelection()}))},o.onSuggestionsClearRequested=function(){o.setState({suggestions:[],sources:o.props.sources,ownPlaces:!1,editing:!1})},o.getSuggestionValue=function(e){return"SelectFromOwnLocations"===e.type||"back"===e.type?"":function(e){var c=pe(e,!0);switch(e.layer){case"selectFromMap":case"currentPosition":case"ownLocations":case"back":return c[1]||c[0];case"favouriteBikeRentalStation":case"favouritePlace":return c[0];default:return c.length>1&&""!==c[1]?c.join(", "):c[1]||c[0]}}(e.properties)},o.checkPendingSelection=function(){"SelectFromOwnLocations"!==o.state.pendingSelection&&"back"!==o.state.pendingSelection||!o.state.valid?o.state.pendingSelection&&o.state.valid&&o.setState({pendingSelection:null,editing:!1},(function(){o.state.suggestions.length&&(o.input.blur(),o.props.onSelect(o.state.suggestions[o.state.suggestionIndex],o.props.id),o.props.isMobile&&o.closeMobileSearch(),!o.props.focusChange||o.props.isMobile&&!o.props.isEmbedded||o.props.focusChange())})):o.setState({pendingSelection:null,editing:!0},(function(){o.input.focus()}))},o.clearButton=function(){return N.default.createElement("button",{type:"button",className:De["clear-input"],onClick:o.clearInput,"aria-label":g.default.t("clear-button-label")},N.default.createElement(P.default,{img:"close",color:o.props.color}))},o.fetchFunction=function(e){var c=e.value,n=e.cleanExecuted;return o.setState({valid:!1,cleanExecuted:n||!1},(function(){if(!o.selectionDone){var e,n=x.default(o.props.targets)||o.props.targets.includes("Locations");o.state.ownPlaces?(e=["Locations"],(x.default(o.props.targets)||o.props.targets.includes("Stops"))&&e.push("Stops")):x.default(o.props.targets)||(e=U(o.props.targets),n&&!o.props.isMobile&&(x.default(o.props.sources)||o.props.sources.includes("Favourite"))&&e.push("SelectFromOwnLocations")),function(e,c,n,o,t,a,i,r,M,s){r(null),Ne(e,c,n,o,t,a,i,r,M,s)}(e,o.state.sources&&o.state.sources.filter((function(e){return!(n&&"Favourite"===e&&!o.state.ownPlaces&&!o.props.isMobile)})),o.props.transportMode,o.props.searchContext,o.props.filterResults,o.props.geocodingSize,{input:c||""},(function(e){if(null!=e){var n=(e.results||[]).filter((function(e){return"FutureRoute"!==e.type||"FutureRoute"===e.type&&e.properties.time>Re().unix()})).map((function(e){if("CurrentLocation"===e.type||"SelectFromMap"===e.type||"SelectFromOwnLocations"===e.type||"back"===e.type){var c=Y({},e);return c.properties.labelId=g.default.t(e.properties.labelId),c}return e}));c!==o.state.value&&c!==o.state.pendingSelection&&"SelectFromOwnLocations"!==o.state.pendingSelection&&"back"!==o.state.pendingSelection&&"FutureRoute"!==o.state.pendingSelection||o.setState({valid:!0,suggestions:n},(function(){return o.checkPendingSelection()}))}}),o.props.pathOpts,o.props.refPoint)}}))},o.clearInput=function(){var e={editing:!0,value:"",sources:o.props.sources,ownPlaces:!1};o.setState(e,(function(){return o.fetchFunction({value:"",cleanExecuted:!0})})),o.props.onClear&&o.props.onClear(o.props.id),o.input.focus()},o.inputClicked=function(e){if(o.input.focus(),o.props.isMobile&&o.props.lock(),!o.state.editing){var c={editing:!0,pendingSelection:null,renderMobileSearch:o.props.isMobile},n={editing:!0,pendingSelection:null,value:e};o.state.suggestions.length?(o.fetchFunction({value:o.state.value}),o.setState(c)):"object"!==H(e)&&e?o.setState(n,(function(){return o.fetchFunction({value:e})})):o.setState(c,(function(){return o.fetchFunction({value:o.state.value})}))}},o.storeInputReference=function(e){null!==e&&(o.input=e.input,o.props.storeRef&&o.props.storeRef(e.input))},o.fillInput=function(e){o.fInput=e.properties.name;var c={editing:!0,value:e.properties.name,checkPendingSelection:e,valid:!0};o.setState(c),o.fetchFunction({value:e.properties.name}),o.input.focus()},o.renderItem=function(e){var c="FutureRoute"===e.type?Y({},e,{translatedText:Qe(e)}):e,n=Ke(e);return N.default.createElement(D.default,{item:c,content:n,loading:!o.state.valid,isMobile:o.props.isMobile,ariaFavouriteString:g.default.t("favourite"),color:o.props.color,accessiblePrimaryColor:o.props.accessiblePrimaryColor,fillInput:o.fillInput,fontWeights:o.props.fontWeights,modeIconColors:o.props.modeIconColors,modeSet:o.props.modeSet})},o.closeMobileSearch=function(){o.props.unlock(),o.setState({renderMobileSearch:!1,value:o.props.value},(function(){window.scrollTo(0,o.state.scrollY),o.onSuggestionsClearRequested()}))},o.keyDown=function(e){if(!o.selectionDone){var c=e.key;if("Escape"===c&&o.setState({editing:!1}),o.state.editing)return"Enter"===c&&""!==o.state.value&&o.setState({pendingSelection:!0},(function(){o.fetchFunction({value:o.state.value})})),void o.inputClicked();if("Enter"!==c&&"ArrowDown"!==c||""!==o.state.value){if("ArrowDown"===c&&""!==o.state.value){var n={editing:!0,value:o.state.value};o.setState(n,(function(){return o.fetchFunction({value:o.state.value})}))}o.state.editing||o.setState({editing:!0}),"Tab"===c&&o.onBlur()}else o.clearInput()}},o.suggestionAsAriaContent=function(){var e=[],c=o.state.suggestions[0];return c&&(c.type&&c.type.includes("Favourite")&&e.push(g.default.t("favourite")),e=e.concat(Ke(o.state.suggestions[0]))),U(new Set(e)).join(" - ")},o.clearOldSearches=function(){var e=o.props.searchContext,c=e.context,n=e.clearOldSearches,t=e.clearFutureRoutes;c&&n&&(n(c),t&&t(c),o.fetchFunction({value:o.state.value}))},o.isOriginDestinationOrViapoint=function(){return"origin"===o.props.id||"destination"===o.props.id||"via-point"===o.props.id||"origin-stop-near-you"===o.props.id},o.onFocus=function(){["Valittu sijainti","Nykyinen sijaintisi","Current position","Selected location","Vald position","Använd min position","Min position","Käytä nykyistä sijaintia","Use current location","Your current location"].includes(o.state.value)&&o.clearInput();var e=window.pageYOffset;return o.setState({scrollY:e})},Re.tz.setDefault(e.timeZone),Re.locale(e.lang),o.state={value:e.value,suggestions:[],editing:!1,valid:!0,renderMobileSearch:!1,sources:e.sources,ownPlaces:!1,typingTimer:null,typing:!1,pendingSelection:null,suggestionIndex:0,cleanExecuted:!1,scrollY:0},Object.keys(Ee).forEach((function(e){g.default.addResourceBundle(e,"translation",Ee[e])})),o}return K(n,[{key:"shouldComponentUpdate",value:function(e,c){return!k.default(c,this.state)||!k.default(e,this.props)}},{key:"render",value:function(){var e=this;g.default.language!==this.props.lang&&g.default.changeLanguage(this.props.lang);var c=this.state,n=c.value,o=c.suggestions,t=c.renderMobileSearch,a=c.cleanExecuted,i={placeholder:this.props.translatedPlaceholder?this.props.translatedPlaceholder:g.default.t(this.props.placeholder),value:n,onChange:this.onChange,onBlur:this.onBlur,className:"".concat(De.input," ").concat(this.props.isMobile&&this.props.transportMode?De.thin:""," ").concat(De[this.props.id]||""," ").concat(this.state.value?De.hasValue:""," ").concat(this.props.inputClassName),onKeyDown:this.keyDown,required:this.props.required},r=this.props.id.replace("searchfield-",""),M=this.props.ariaLabel||g.default.t(r);M=M.replace("searchfield-","");var s=this.props.required?"".concat(g.default.t("required"),"."):"",l=this.props.isMobile?g.default.t("search-autosuggest-label-mobile"):g.default.t("search-autosuggest-label-desktop"),u=g.default.t("search-autosuggest-len",{count:o.length}),p=function(){return e.suggestionAsAriaContent()||e.props.value?g.default.t("search-current-suggestion",{selection:e.suggestionAsAriaContent()||e.props.value}):""};return N.default.createElement(N.default.Fragment,null,N.default.createElement("span",{className:De["sr-only"],role:"alert"},!this.state.typing&&this.state.editing&&"".concat(u," ").concat(p())),this.props.isMobile&&N.default.createElement(Ye,{searchOpen:t,appElement:this.props.appElement,clearOldSearches:this.clearOldSearches,id:this.props.id,clearInput:this.clearInput,value:this.state.value,suggestions:[].concat(U(o),[{type:"clear-search-history",labelId:g.default.t("clear-search-history")}]),inputProps:Y({},i,{placeholder:this.isOriginDestinationOrViapoint()?g.default.t("address-place-or-business"):i.placeholder}),fetchFunction:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:this.getSuggestionValue,renderSuggestion:this.renderItem,closeHandle:this.closeMobileSearch,ariaLabel:s.concat(" ").concat(M).concat(" ").concat(p()),label:this.props.mobileLabel?this.props.mobileLabel:g.default.t(this.props.id),onSuggestionSelected:this.onSelected,dialogHeaderText:g.default.t("delete-old-searches-header"),dialogPrimaryButtonText:g.default.t("delete"),dialogSecondaryButtonText:g.default.t("cancel"),clearInputButtonText:g.default.t("clear-button-label"),focusInput:a,color:this.props.color,hoverColor:this.props.hoverColor,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fontWeights:this.props.fontWeights,showScroll:this.props.showScroll}),!t&&N.default.createElement("div",{className:W.default(De["autosuggest-input-container"],De[this.props.id]),style:{"--color":"".concat(this.props.color),"--hover-color":"".concat(this.props.hoverColor)}},this.props.icon&&N.default.createElement("div",{className:W.default(De["autosuggest-input-icon"],De[this.props.id],this.props.inputClassName&&"".concat(this.props.inputClassName,"-input-icon"))},N.default.createElement(P.default,{img:"".concat(this.props.icon)})),N.default.createElement(_.default,{alwaysRenderSuggestions:this.state.editing,id:this.props.id,suggestions:o,onSuggestionsFetchRequested:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:this.getSuggestionValue,renderSuggestion:this.renderItem,inputProps:Y({},i,{onFocus:this.onFocus}),focusInputOnSuggestionClick:!0,shouldRenderSuggestions:function(){return e.state.editing},highlightFirstSuggestion:!this.state.ownPlaces,theme:De,renderInputComponent:function(c){return N.default.createElement(N.default.Fragment,null,N.default.createElement("label",{className:De["sr-only"],htmlFor:e.props.id},p().concat(" ").concat(s).concat(" ").concat(M).concat(" ").concat(l)),N.default.createElement("input",Object.assign({"aria-label":p().concat(" ").concat(s).concat(" ").concat(M).concat(" ").concat(l),id:e.props.id,onClick:e.inputClicked,onKeyDown:e.keyDown},c)),e.state.value&&e.clearButton())},onSuggestionSelected:this.onSelected,ref:this.storeInputReference})))}}]),n}(N.default.Component);Je.defaultProps={autoFocus:!1,className:"",icon:void 0,value:"",transportMode:void 0,lang:"fi",sources:[],isMobile:!1,color:"#007ac9",hoverColor:"#0062a1",accessiblePrimaryColor:"#0074be",timeZone:"Europe/Helsinki",pathOpts:{routesPrefix:"linjat",stopsPrefix:"pysakit"},mobileLabel:void 0,inputClassName:"",translatedPlaceholder:void 0,fontWeights:{medium:500},modeIconColors:{"mode-bus":"#007ac9","mode-rail":"#8c4799","mode-tram":"#008151","mode-metro":"#ed8c00","mode-ferry":"#007A97","mode-citybike":"#f2b62d"},required:!1,modeSet:void 0,showScroll:!1},"production"!==process.env.NODE_ENV&&(Je.propTypes={appElement:q.default.string.isRequired,autoFocus:q.default.bool,className:q.default.string,icon:q.default.string,id:q.default.string.isRequired,placeholder:q.default.string.isRequired,translatedPlaceholder:q.default.string,value:q.default.string,searchContext:q.default.any.isRequired,ariaLabel:q.default.string,onSelect:q.default.func,transportMode:q.default.string,filterResults:q.default.func,geocodingSize:q.default.number,onClear:q.default.func,storeRef:q.default.func,handleViaPoints:q.default.func,focusChange:q.default.func,lang:q.default.string,sources:q.default.arrayOf(q.default.string),targets:q.default.arrayOf(q.default.string),isMobile:q.default.bool,color:q.default.string,hoverColor:q.default.string,accessiblePrimaryColor:q.default.string,timeZone:q.default.string,pathOpts:q.default.shape({routesPrefix:q.default.string,stopsPrefix:q.default.string}),mobileLabel:q.default.string,lock:q.default.func.isRequired,unlock:q.default.func.isRequired,refPoint:q.default.object,inputClassName:q.default.string,fontWeights:q.default.shape({medium:q.default.number}),modeIconColors:q.default.object,required:q.default.bool,modeSet:q.default.string,showScroll:q.default.bool,isEmbedded:q.default.bool});var Ze,$e=(Ze=Je,function(e){var c=Ue.useScrollLock(),n=c.lock,o=c.unlock;return N.default.createElement(Ze,Object.assign({lock:n,unlock:o},e))});e.default=$e,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
45
|
+
/*! no static exports found */function(c,n){c.exports=e}})},e.exports=n(N.default)})),Ue=(Fe=je)&&Fe.__esModule&&Object.prototype.hasOwnProperty.call(Fe,"default")?Fe.default:Fe;function Ge(e){var c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=ee(e);if(c){var t=ee(this).constructor;n=Reflect.construct(o,arguments,t)}else n=o.apply(this,arguments);return $(this,n)}}Re.locale("en"),g.default.init({fallbackLng:"fi",defaultNS:"translation",interpolation:{escapeValue:!1}});"production"!==process.env.NODE_ENV&&q.default.node;var Ve=function(e){if(e&&e.GTFS.platform){var c=e.GTFS,n=c.modes,o=c.platform;return[n&&"RAIL"===n[0]?g.default.t("track"):g.default.t("platform"),o]}};function Ke(e){if("FutureRoute"!==e.type){if("SelectFromMap"===e.type)return["",g.default.t("select-from-map")];if("CurrentLocation"===e.type)return["",g.default.t("use-own-position")];if("SelectFromOwnLocations"===e.type)return["",g.default.t("select-from-own-locations")];var c,n=ce(pe(e.properties,!0),2),o=n[0],t=n[1];if(e.properties.layer.toLowerCase().includes("bikerental")||e.properties.layer.toLowerCase().includes("bikestation"))return[c=g.default.t("bikerentalstation"),o,void 0,e.properties.labelId];if(e.properties.mode)c=g.default.t(e.properties.mode.toLowerCase().replace("favourite",""));else{var a=e.properties.layer.replace("route-","").toLowerCase().replace("favourite","");c=g.default.t(a)}if(e.properties.id&&("stop"===e.properties.layer||"station"===e.properties.layer)){var i,r=ue(e.properties),M=null===(i=e.properties.addendum)||void 0===i?void 0:i.GTFS.modes,s=Ve(e.properties.addendum);return[c,se(o,r),t,r,M,s]}if("favouriteStop"===e.properties.layer||"favouriteStation"===e.properties.layer){var l=e.properties,u=l.address,p=l.code;return[c,u?se(u.split(",")[0],p):o,t,p,void 0,Ve(e.properties.addendum)]}return[c,o,t]}var d=e.properties,b=d.origin,A=d.destination,f=b.locality?", ".concat(b.locality," foobar"):"",z=A.locality?", ".concat(A.locality):"",h=b.name,O=A.name;return[g.default.t("future-route"),"".concat(g.default.t("origin")," ").concat(h).concat(f," ").concat(g.default.t("destination")," ").concat(O).concat(z),e.translatedText]}function Qe(e){var c=Re.unix(e.properties.time),n=e.properties.arriveBy?g.default.t("arrival"):g.default.t("departure");return n=c.isSame(Re(),"day")?"".concat(n," ").concat(g.default.t("today-at")):c.isSame(Re().add(1,"day"),"day")?"".concat(n," ").concat(g.default.t("tomorrow-at")):"".concat(n," ").concat(c.format("dd D.M.")),n="".concat(n," ").concat(Re(c).format("HH:mm"))}var Je=function(e){J(n,e);var c=Ge(n);function n(e){var o;return G(this,n),(o=c.call(this,e)).componentDidUpdate=function(){g.default.language!==o.props.lang&&g.default.changeLanguage(o.props.lang)},o.UNSAFE_componentWillReceiveProps=function(e){e.value===o.state.value||o.state.editing||o.setState({value:e.value})},o.onChange=function(e,c){var n=c.newValue,t=c.method,a={value:o.fInput||n||"",renderMobileSearch:o.props.isMobile};if(o.fInput=null,o.state.editing){if("enter"!==t||o.state.valid){if(o.state.typingTimer&&clearTimeout(o.state.typingTimer),"type"===t){var i=setTimeout((function(){o.setState({typing:!1})}),1e3);a.typingTimer=i,a.typing=!0}o.setState(a)}}else a.editing=!0,o.setState(a,(function(){return o.fetchFunction({value:n||""})}))},o.onBlur=function(){o.state.renderMobileSearch||(o.state.editing&&o.input.focus(),o.setState({editing:!1,renderMobileSearch:!1,value:o.props.value}))},o.onSelected=function(e,c){if(o.state.valid){if("SelectFromOwnLocations"===c.suggestion.type)return void o.setState({sources:["Favourite","Back"],ownPlaces:!0,pendingSelection:c.suggestion.type,value:""},(function(){o.fetchFunction({value:""})}));if("back"===c.suggestion.type||"FutureRoute"===c.suggestion.type)return void o.setState({sources:o.props.sources,ownPlaces:!1,pendingSelection:c.suggestion.type,suggestionIndex:c.suggestionIndex},(function(){o.fetchFunction({value:""})}));o.selectionDone=!0,o.setState({editing:!1,value:c.suggestionValue},(function(){o.input.blur(),o.props.handleViaPoints?o.props.handleViaPoints(c.suggestion,c.suggestionIndex):o.props.onSelect(c.suggestion,o.props.id),o.setState({renderMobileSearch:!1,sources:o.props.sources,ownPlaces:!1,suggestions:[]},(function(){o.selectionDone=!1})),!o.props.focusChange||o.props.isMobile&&!o.props.isEmbedded||o.props.focusChange(),o.props.isMobile&&o.closeMobileSearch()}))}else o.setState((function(e){return{pendingSelection:e.value}}),(function(){return o.checkPendingSelection()}))},o.onSuggestionsClearRequested=function(){o.setState({suggestions:[],sources:o.props.sources,ownPlaces:!1,editing:!1})},o.getSuggestionValue=function(e){return"SelectFromOwnLocations"===e.type||"back"===e.type?"":function(e){var c=pe(e,!0);switch(e.layer){case"selectFromMap":case"currentPosition":case"ownLocations":case"back":return c[1]||c[0];case"favouriteBikeRentalStation":case"favouritePlace":return c[0];default:return c.length>1&&""!==c[1]?c.join(", "):c[1]||c[0]}}(e.properties)},o.checkPendingSelection=function(){"SelectFromOwnLocations"!==o.state.pendingSelection&&"back"!==o.state.pendingSelection||!o.state.valid?o.state.pendingSelection&&o.state.valid&&o.setState({pendingSelection:null,editing:!1},(function(){o.state.suggestions.length&&(o.input.blur(),o.props.onSelect(o.state.suggestions[o.state.suggestionIndex],o.props.id),o.props.isMobile&&o.closeMobileSearch(),!o.props.focusChange||o.props.isMobile&&!o.props.isEmbedded||o.props.focusChange())})):o.setState({pendingSelection:null,editing:!0},(function(){o.input.focus()}))},o.clearButton=function(){return N.default.createElement("button",{type:"button",className:De["clear-input"],onClick:o.clearInput,"aria-label":g.default.t("clear-button-label")},N.default.createElement(P.default,{img:"close",color:o.props.color}))},o.fetchFunction=function(e){var c=e.value,n=e.cleanExecuted;return o.setState({valid:!1,cleanExecuted:n||!1},(function(){if(!o.selectionDone){var e,n=x.default(o.props.targets)||o.props.targets.includes("Locations");o.state.ownPlaces?(e=["Locations"],(x.default(o.props.targets)||o.props.targets.includes("Stops"))&&e.push("Stops"),(x.default(o.props.targets)||o.props.targets.includes("BikeRentalStations"))&&e.push("BikeRentalStations")):x.default(o.props.targets)||(e=U(o.props.targets),n&&!o.props.isMobile&&(x.default(o.props.sources)||o.props.sources.includes("Favourite"))&&e.push("SelectFromOwnLocations")),function(e,c,n,o,t,a,i,r,M,s){r(null),Ne(e,c,n,o,t,a,i,r,M,s)}(e,o.state.sources&&o.state.sources.filter((function(e){return!(n&&"Favourite"===e&&!o.state.ownPlaces&&!o.props.isMobile)})),o.props.transportMode,o.props.searchContext,o.props.filterResults,o.props.geocodingSize,{input:c||""},(function(e){if(null!=e){var n=(e.results||[]).filter((function(e){return"FutureRoute"!==e.type||"FutureRoute"===e.type&&e.properties.time>Re().unix()})).map((function(e){if("CurrentLocation"===e.type||"SelectFromMap"===e.type||"SelectFromOwnLocations"===e.type||"back"===e.type){var c=Y({},e);return c.properties.labelId=g.default.t(e.properties.labelId),c}return e}));c!==o.state.value&&c!==o.state.pendingSelection&&"SelectFromOwnLocations"!==o.state.pendingSelection&&"back"!==o.state.pendingSelection&&"FutureRoute"!==o.state.pendingSelection||o.setState({valid:!0,suggestions:n},(function(){return o.checkPendingSelection()}))}}),o.props.pathOpts,o.props.refPoint)}}))},o.clearInput=function(){var e={editing:!0,value:"",sources:o.props.sources,ownPlaces:!1};o.setState(e,(function(){return o.fetchFunction({value:"",cleanExecuted:!0})})),o.props.onClear&&o.props.onClear(o.props.id),o.input.focus()},o.inputClicked=function(e){if(o.input.focus(),o.props.isMobile&&o.props.lock(),!o.state.editing){var c={editing:!0,pendingSelection:null,renderMobileSearch:o.props.isMobile},n={editing:!0,pendingSelection:null,value:e};o.state.suggestions.length?(o.fetchFunction({value:o.state.value}),o.setState(c)):"object"!==H(e)&&e?o.setState(n,(function(){return o.fetchFunction({value:e})})):o.setState(c,(function(){return o.fetchFunction({value:o.state.value})}))}},o.storeInputReference=function(e){null!==e&&(o.input=e.input,o.props.storeRef&&o.props.storeRef(e.input))},o.fillInput=function(e){o.fInput=e.properties.name;var c={editing:!0,value:e.properties.name,checkPendingSelection:e,valid:!0};o.setState(c),o.fetchFunction({value:e.properties.name}),o.input.focus()},o.renderItem=function(e){var c="FutureRoute"===e.type?Y({},e,{translatedText:Qe(e)}):e,n=Ke(e);return N.default.createElement(D.default,{item:c,content:n,loading:!o.state.valid,isMobile:o.props.isMobile,ariaFavouriteString:g.default.t("favourite"),color:o.props.color,accessiblePrimaryColor:o.props.accessiblePrimaryColor,fillInput:o.fillInput,fontWeights:o.props.fontWeights,modeIconColors:o.props.modeIconColors,modeSet:o.props.modeSet})},o.closeMobileSearch=function(){o.props.unlock(),o.setState({renderMobileSearch:!1,value:o.props.value},(function(){window.scrollTo(0,o.state.scrollY),o.onSuggestionsClearRequested()}))},o.keyDown=function(e){if(!o.selectionDone){var c=e.key;if("Escape"===c&&o.setState({editing:!1}),o.state.editing)return"Enter"===c&&""!==o.state.value&&o.setState({pendingSelection:!0},(function(){o.fetchFunction({value:o.state.value})})),void o.inputClicked();if("Enter"!==c&&"ArrowDown"!==c||""!==o.state.value){if("ArrowDown"===c&&""!==o.state.value){var n={editing:!0,value:o.state.value};o.setState(n,(function(){return o.fetchFunction({value:o.state.value})}))}o.state.editing||o.setState({editing:!0}),"Tab"===c&&o.onBlur()}else o.clearInput()}},o.suggestionAsAriaContent=function(){var e=[],c=o.state.suggestions[0];return c&&(c.type&&c.type.includes("Favourite")&&e.push(g.default.t("favourite")),e=e.concat(Ke(o.state.suggestions[0]))),U(new Set(e)).join(" - ")},o.clearOldSearches=function(){var e=o.props.searchContext,c=e.context,n=e.clearOldSearches,t=e.clearFutureRoutes;c&&n&&(n(c),t&&t(c),o.fetchFunction({value:o.state.value}))},o.isOriginDestinationOrViapoint=function(){return"origin"===o.props.id||"destination"===o.props.id||"via-point"===o.props.id||"origin-stop-near-you"===o.props.id},o.onFocus=function(){["Valittu sijainti","Nykyinen sijaintisi","Current position","Selected location","Vald position","Använd min position","Min position","Käytä nykyistä sijaintia","Use current location","Your current location"].includes(o.state.value)&&o.clearInput();var e=window.pageYOffset;return o.setState({scrollY:e})},Re.tz.setDefault(e.timeZone),Re.locale(e.lang),o.state={value:e.value,suggestions:[],editing:!1,valid:!0,renderMobileSearch:!1,sources:e.sources,ownPlaces:!1,typingTimer:null,typing:!1,pendingSelection:null,suggestionIndex:0,cleanExecuted:!1,scrollY:0},Object.keys(Ee).forEach((function(e){g.default.addResourceBundle(e,"translation",Ee[e])})),o}return K(n,[{key:"shouldComponentUpdate",value:function(e,c){return!k.default(c,this.state)||!k.default(e,this.props)}},{key:"render",value:function(){var e=this;g.default.language!==this.props.lang&&g.default.changeLanguage(this.props.lang);var c=this.state,n=c.value,o=c.suggestions,t=c.renderMobileSearch,a=c.cleanExecuted,i={placeholder:this.props.translatedPlaceholder?this.props.translatedPlaceholder:g.default.t(this.props.placeholder),value:n,onChange:this.onChange,onBlur:this.onBlur,className:"".concat(De.input," ").concat(this.props.isMobile&&this.props.transportMode?De.thin:""," ").concat(De[this.props.id]||""," ").concat(this.state.value?De.hasValue:""," ").concat(this.props.inputClassName),onKeyDown:this.keyDown,required:this.props.required},r=this.props.id.replace("searchfield-",""),M=this.props.ariaLabel||g.default.t(r);M=M.replace("searchfield-","");var s=this.props.required?"".concat(g.default.t("required"),"."):"",l=this.props.isMobile?g.default.t("search-autosuggest-label-mobile"):g.default.t("search-autosuggest-label-desktop"),u=g.default.t("search-autosuggest-len",{count:o.length}),p=function(){return e.suggestionAsAriaContent()||e.props.value?g.default.t("search-current-suggestion",{selection:e.suggestionAsAriaContent()||e.props.value}):""};return N.default.createElement(N.default.Fragment,null,N.default.createElement("span",{className:De["sr-only"],role:"alert"},!this.state.typing&&this.state.editing&&"".concat(u," ").concat(p())),this.props.isMobile&&N.default.createElement(Ye,{searchOpen:t,appElement:this.props.appElement,clearOldSearches:this.clearOldSearches,id:this.props.id,clearInput:this.clearInput,value:this.state.value,suggestions:[].concat(U(o),[{type:"clear-search-history",labelId:g.default.t("clear-search-history")}]),inputProps:Y({},i,{placeholder:this.isOriginDestinationOrViapoint()?g.default.t("address-place-or-business"):i.placeholder}),fetchFunction:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:this.getSuggestionValue,renderSuggestion:this.renderItem,closeHandle:this.closeMobileSearch,ariaLabel:s.concat(" ").concat(M).concat(" ").concat(p()),label:this.props.mobileLabel?this.props.mobileLabel:g.default.t(this.props.id),onSuggestionSelected:this.onSelected,dialogHeaderText:g.default.t("delete-old-searches-header"),dialogPrimaryButtonText:g.default.t("delete"),dialogSecondaryButtonText:g.default.t("cancel"),clearInputButtonText:g.default.t("clear-button-label"),focusInput:a,color:this.props.color,hoverColor:this.props.hoverColor,accessiblePrimaryColor:this.props.accessiblePrimaryColor,fontWeights:this.props.fontWeights,showScroll:this.props.showScroll}),!t&&N.default.createElement("div",{className:W.default(De["autosuggest-input-container"],De[this.props.id]),style:{"--color":"".concat(this.props.color),"--hover-color":"".concat(this.props.hoverColor)}},this.props.icon&&N.default.createElement("div",{className:W.default(De["autosuggest-input-icon"],De[this.props.id],this.props.inputClassName&&"".concat(this.props.inputClassName,"-input-icon"))},N.default.createElement(P.default,{img:"".concat(this.props.icon)})),N.default.createElement(_.default,{alwaysRenderSuggestions:this.state.editing,id:this.props.id,suggestions:o,onSuggestionsFetchRequested:this.fetchFunction,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:this.getSuggestionValue,renderSuggestion:this.renderItem,inputProps:Y({},i,{onFocus:this.onFocus}),focusInputOnSuggestionClick:!0,shouldRenderSuggestions:function(){return e.state.editing},highlightFirstSuggestion:!this.state.ownPlaces,theme:De,renderInputComponent:function(c){return N.default.createElement(N.default.Fragment,null,N.default.createElement("label",{className:De["sr-only"],htmlFor:e.props.id},p().concat(" ").concat(s).concat(" ").concat(M).concat(" ").concat(l)),N.default.createElement("input",Object.assign({"aria-label":p().concat(" ").concat(s).concat(" ").concat(M).concat(" ").concat(l),id:e.props.id,onClick:e.inputClicked,onKeyDown:e.keyDown},c)),e.state.value&&e.clearButton())},onSuggestionSelected:this.onSelected,ref:this.storeInputReference})))}}]),n}(N.default.Component);Je.defaultProps={autoFocus:!1,className:"",icon:void 0,value:"",transportMode:void 0,lang:"fi",sources:[],isMobile:!1,color:"#007ac9",hoverColor:"#0062a1",accessiblePrimaryColor:"#0074be",timeZone:"Europe/Helsinki",pathOpts:{routesPrefix:"linjat",stopsPrefix:"pysakit"},mobileLabel:void 0,inputClassName:"",translatedPlaceholder:void 0,fontWeights:{medium:500},modeIconColors:{"mode-bus":"#007ac9","mode-rail":"#8c4799","mode-tram":"#008151","mode-metro":"#ed8c00","mode-ferry":"#007A97","mode-citybike":"#f2b62d"},required:!1,modeSet:void 0,showScroll:!1},"production"!==process.env.NODE_ENV&&(Je.propTypes={appElement:q.default.string.isRequired,autoFocus:q.default.bool,className:q.default.string,icon:q.default.string,id:q.default.string.isRequired,placeholder:q.default.string.isRequired,translatedPlaceholder:q.default.string,value:q.default.string,searchContext:q.default.any.isRequired,ariaLabel:q.default.string,onSelect:q.default.func,transportMode:q.default.string,filterResults:q.default.func,geocodingSize:q.default.number,onClear:q.default.func,storeRef:q.default.func,handleViaPoints:q.default.func,focusChange:q.default.func,lang:q.default.string,sources:q.default.arrayOf(q.default.string),targets:q.default.arrayOf(q.default.string),isMobile:q.default.bool,color:q.default.string,hoverColor:q.default.string,accessiblePrimaryColor:q.default.string,timeZone:q.default.string,pathOpts:q.default.shape({routesPrefix:q.default.string,stopsPrefix:q.default.string}),mobileLabel:q.default.string,lock:q.default.func.isRequired,unlock:q.default.func.isRequired,refPoint:q.default.object,inputClassName:q.default.string,fontWeights:q.default.shape({medium:q.default.number}),modeIconColors:q.default.object,required:q.default.bool,modeSet:q.default.string,showScroll:q.default.bool,isEmbedded:q.default.bool});var Ze,$e=(Ze=Je,function(e){var c=Ue.useScrollLock(),n=c.lock,o=c.unlock;return N.default.createElement(Ze,Object.assign({lock:n,unlock:o},e))});e.default=$e,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
46
46
|
//# sourceMappingURL=index.js.map
|