@linn-it/linn-form-components-library 32.3.3 → 32.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useState as t,useRef as a,useEffect as n,useMemo as i,useReducer as r,useCallback as o,forwardRef as s,useImperativeHandle as l,Fragment as c}from"react";import d from"@mui/material/Button";import{jsx as p,jsxs as u,Fragment as m}from"react/jsx-runtime";import f from"@mui/material/Tooltip";import h from"@mui/material/SvgIcon";import g from"@mui/material/Box";import v from"@mui/material/CircularProgress";import x from"@mui/material/Typography";import y from"@mui/material/Link";import k from"@mui/material/TextField";import b from"@mui/material/InputLabel";import w from"@mui/material/Card";import _ from"@mui/icons-material/Error";import S from"@mui/material/FormControlLabel";import T from"@mui/material/Checkbox";import D from"@mui/material/InputAdornment";import{useSnackbar as O}from"notistack";import{Paper as P,IconButton as F,Typography as j}from"@mui/material";import C from"@mui/material/Grid";import{Link as M,useLocation as E,useParams as Y,useNavigate as R}from"react-router-dom";import I from"@mui/material/List";import A from"@mui/material/ListItem";import L from"@mui/material/Switch";import W from"@mui/material/IconButton";import z from"@mui/material/Snackbar";import N from"@mui/icons-material/Close";import{DatePicker as U}from"@mui/x-date-pickers/DatePicker";import{DateTimePicker as H}from"@mui/x-date-pickers/DateTimePicker";import G from"@mui/material/Tabs";import q from"@mui/material/Tab";import V from"@mui/material/AppBar";import $ from"@mui/material/ClickAwayListener";import B from"@mui/material/Menu";import Z from"@mui/material/MenuItem";import K from"@mui/material/Toolbar";import J from"@mui/material/Badge";import Q from"@mui/icons-material/AccountCircle";import X from"@mui/icons-material/Search";import ee from"@mui/icons-material/Notifications";import te from"@mui/material/Paper";import{createTheme as ae,styled as ne}from"@mui/material/styles";import ie from"@mui/material/ListItemText";import re from"@mui/icons-material/Delete";import oe from"@mui/material/Divider";import{PickersDay as se}from"@mui/x-date-pickers/PickersDay";import le from"react-is";import ce from"@mui/material/Chip";import de from"@mui/material/Accordion";import pe from"@mui/material/AccordionSummary";import ue from"@mui/material/AccordionDetails";import me from"@mui/icons-material/ExpandMore";import fe from"@mui/material/Dialog";import he from"@mui/material/Stack";import ge from"@mui/icons-material/ArrowRight";import ve from"@mui/icons-material/ArrowLeft";import xe from"@mui/material/DialogTitle";import ye from"@mui/material/DialogContent";import ke from"@mui/material/DialogActions";import be from"@mui/icons-material/EditOff";import we from"@mui/icons-material/ModeEdit";import{DataGrid as _e,gridClasses as Se}from"@mui/x-data-grid";import{useAuth as Te,hasAuthParams as De}from"react-oidc-context";function BackButton(e){let{backClick:t,text:a=null}=e;return p("div",{style:{float:"left"},children:p(d,{id:"back-button",onClick:t,children:a||"Back"})})}function _defineProperty$2(e,t,a){return(t=function _toPropertyKey(e){var t=function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ownKeys$2(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)}return a}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$2(Object(a),!0).forEach(function(t){_defineProperty$2(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ownKeys$2(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function Loading(){return p(g,{sx:{textAlign:"center",margin:e=>e.spacing(4),height:"40px"},children:p(v,{})})}function ExportButton(e){let{href:a,accept:n="text/csv",fileName:i="export.csv",buttonText:r="EXPORT",tooltipText:o="Download report as CSV file",disabled:s=!1,accessToken:l=null}=e;const[c,m]=t(!1),[g,v]=t(!1);let x={Accept:n};l&&(x=_objectSpread2(_objectSpread2({},x),{},{Authorization:"Bearer ".concat(l)}));return p("div",{style:{float:"right"},children:p(f,{title:o,placement:"top-end",children:c?p(Loading,{}):u(d,{variant:"outlined",disabled:s,color:g?"secondary":"primary",onClick:()=>{m(!0),v(!1),fetch(a,{headers:new Headers(x)}).then(e=>{if(!e.ok)throw new Error("Network response was not OK");return e.blob()}).then(e=>{const t=window.URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.download=i,document.body.appendChild(a),a.click(),a.remove()}).then(()=>m(!1)).catch(()=>{v(!0),m(!1),alert("Download failed")})},children:[g?"Retry":r,p(h,{children:p("path",{xmlns:"http://www.w3.org/2000/svg",d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"})})]})})})}function Breadcrumbs(e){let{navigate:t,rootPathLength:a=2,homeUrl:n="https://app.linn.co.uk",location:i}=e,r=i.pathname;r.endsWith("/")&&(r=r.substring(0,r.length-1));const o=r.split("/").filter(e=>"report"!==e).reduce((e,n,i,r)=>{const o=r.slice(0,i+1).join("/")||"/";return n?[...e,{key:i,caption:n,href:o,onClick:e=>{r.length>a&&(e.preventDefault(),t(o))}}]:e},[]);return u("span",{style:{marginLeft:"20px"},children:[p(y,{href:n,variant:"button",sx:{"&:hover":{cursor:"pointer"}},children:"HOME"},"home"),u(m,{children:[" "," / "," "]}),o.map((e,t)=>t<o.length-1?u("span",{children:[p(y,{href:e.href,variant:"button",sx:{"&:hover":{cursor:"pointer"}},onClick:e.onClick,children:e.caption},e.href),u(m,{children:[" "," / "," "]})]},t):p(x,{display:"inline",variant:"button",children:e.caption},t))]})}function SaveBackCancelButtons(e){let{saveClick:t,cancelClick:a,saveDisabled:n=!1,backClick:i,showBackButton:r=!0}=e;return u(g,{sx:{float:"right"},children:[(!n||r)&&p(d,{id:"cancel-button",onClick:()=>{n?i():a()},variant:"outlined",sx:{marginRight:e=>e.spacing(1)},children:n?"Back":"Cancel"}),p(d,{id:"save-button",variant:"contained",color:"primary",onClick:()=>t(),disabled:n,children:"Save"})]})}const hasValue$1=e=>e||0===e,hasDisplayText=e=>e.some(e=>e.displayText||""===e.displayText),getOptions=function(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])return["loading..."];const a=e?[...e]:[];return t&&(hasDisplayText(e)?a.push({id:"",displayText:""}):a.push("")),a};function Dropdown(e){let{onChange:t,optionsLoading:a=!1,propertyName:n,required:i=!1,disabled:r=!1,label:o="",items:s=[],allowNoValue:l=!0,value:c="",helperText:d="",fullWidth:f=!1,adornment:h="",type:g="text",error:v=!1,margin:x="dense",autoFocus:y=!1}=e;return u(m,{children:[p(b,{sx:{fontSize:e=>e.typography.fontSize,color:v?e=>e.palette.error.main:"inherit","& .MuiInputLabel-asterisk":{color:e=>e.palette.error.main}},required:i,error:v,htmlFor:n,children:o}),p(k,{sx:{paddingTop:0,marginTop:e=>e.spacing(1)},autoFocus:y,error:v,id:n,type:g,select:!0,adornment:h,disabled:r,fullWidth:f,value:(w=c,hasValue$1(w)?w:""),onChange:e=>(e=>{const a=e.target.value;let i;i="number"===g?hasValue$1(a)?parseFloat(a):null:hasValue$1(a)?a:"",t(n,i)})(e),SelectProps:{native:!0},size:"small",helperText:d,margin:x,variant:"outlined",required:i,FormHelperTextProps:{sx:{color:v?e=>e.palette.error.main:"inherit","&.Mui-required":{color:e=>e.palette.error.main}}},children:hasDisplayText(s)?getOptions(s,l,a).map(e=>p("option",{value:e.id,children:e.displayText},e.id)):getOptions(s,l,a).map(e=>p("option",{value:e,children:e},e))})]});var w}function ErrorCard(e){let{errorMessage:t,detailLines:a=[]}=e;return u(w,{sx:{width:"50%",margin:"0 auto",padding:e=>e.spacing(2),backgroundColor:e=>e.palette.error.light},children:[p(_,{sx:{color:e=>e.palette.error.dark,float:"right"}}),p(x,{align:"center",children:t}),p("div",{children:null==a?void 0:a.map(e=>p(x,{align:"center",children:"".concat(e.descriptor," - ").concat(e.message)},e.descriptor))})]})}const CheckboxWithLabel=e=>{let{checked:t=!1,color:a="primary",label:n="",onChange:i,sx:r={}}=e;return p(S,{label:n,sx:_objectSpread2({width:"100%",fontSize:14},r),control:p(T,{checked:t,onChange:i,color:a})})},hasValue=e=>e||0===e;function InputField(e){let{onChange:i=null,propertyName:r,type:o="text",adornment:s="",disabled:l=!1,error:c=!1,fullWidth:d=!1,helperText:f="",label:h="",margin:g="dense",maxLength:v=null,rows:x=null,name:y="",placeholder:w="",required:_=!1,value:S="",decimalPlaces:T=null,textFieldProps:O=null,autoFocus:P=!1,onErrorStateChange:F=null,visible:j=!0,autoComplete:C="off"}=e;const M=a(null),[E,Y]=t(!1),[R,I]=t("");n(()=>{setTimeout(()=>{P&&M.current&&j&&M.current.focus()},100)},[P,j]),n(()=>{Y(c)},[c]);return u(m,{children:[p(b,{sx:{fontSize:e=>e.typography.fontSize,color:E?e=>e.palette.error.main:"inherit","& .MuiInputLabel-asterisk":{color:e=>e.palette.error.main}},required:_,error:E,htmlFor:r,children:h}),p(k,_objectSpread2({sx:{paddingTop:0,marginTop:e=>e.spacing(1)},disabled:l,error:E,fullWidth:d,helperText:E?R:f,margin:g,multiline:x>0,name:y,id:r,placeholder:w,required:_,size:"small",rows:x,inputRef:M,onWheel:()=>{"number"===o&&M.current.blur()},type:o,autoComplete:C,value:(A=S,hasValue(A)?A:""),onChange:e=>(e=>{const t=e.target.value;let a=t;"number"===o?(a=hasValue(t)?parseFloat(t):null,a&&T&&t.indexOf(".")<t.length-T&&-1!==t.indexOf(".")&&(a=parseFloat(t.slice(0,t.indexOf(".")+T+1)))):v&&(null==t?void 0:t.length)>v?(Y(!0),I("MAX LENGTH (".concat(v,") EXCEEDED")),F&&F(!0)):v&&(null==t?void 0:t.length)<=v&&(Y(!1),F&&F(!1),I("")),i(r,a)})(e),InputProps:{startAdornment:s?p(D,{position:"start",children:s}):null},FormHelperTextProps:{sx:{color:E?e=>e.palette.error.main:e=>e.palette.text.primary}},onInput:e=>{"number"===o&&v&&(e.target.value=e.target.value.slice(0,v))},variant:"outlined"},O))]});var A}function LinkButton(e){let{to:t,external:a=!1,newTab:n=!1,tooltip:i=null,text:r,disabled:o=!1}=e;const s=p(d,{color:"primary","aria-label":"Search",variant:"outlined",sx:{marginLeft:1,marginTop:3},disabled:o,children:r}),l=i?p(f,{title:i,children:p("div",{children:s})}):s;return o?l:p("div",{children:a?p("a",{href:t,target:n?"_blank":"_self",rel:"noreferrer",style:{textDecoration:"none"},children:l}):p(y,{to:t,style:{textDecoration:"none"},children:l})})}const Oe={xs:4,s:6,m:8,l:10,xl:12},Pe={xs:4,s:3,m:2,l:1,xl:0};function Page(e){let{children:t,navigate:a=null,location:i=null,width:r="l",requestErrors:o=[],showRequestErrors:s=!1,homeUrl:l=null,showBreadcrumbs:c=!0,title:d=null,defaultAppTitle:m=null}=e;const{enqueueSnackbar:f}=O();return n(()=>{o&&s&&o.forEach(e=>{f("".concat(e.message," - ").concat(e.type),{variant:"error",preventDuplicate:!0})})},[o,f,s]),n(()=>(d&&(document.title=d),()=>{m&&(document.title=m)}),[d,m]),u(C,{container:!0,spacing:3,children:[p(C,{size:12,children:c&&p(Breadcrumbs,{navigate:a,homeUrl:l,location:i})}),p(C,{size:Pe[r]}),p(C,{size:Oe[r],children:p(P,{sx:{padding:4},square:!0,children:t})}),p(C,{size:Pe[r]})]})}const getListItemText=(e,t,a)=>a?"".concat(e[t]," - ").concat(e[a]):e[t];function EntityList(e){let{title:t="",entityList:a,entityId:n,descriptionFieldName:i=null,hasExternalLinks:r=!1}=e;const o=r?"a":M;return u(m,{children:[p(x,{variant:"h4",children:t}),p(I,{children:a.map(e=>p(A,{button:!0,component:o,to:e.href,href:e.href,children:p(x,{color:"primary",variant:"subtitle2",children:getListItemText(e,n,i)})},e[n]))})]})}function CreateButton(e){let{createUrl:t,disabled:a=!1}=e;return p(M,{to:t,style:{textDecoration:"none"},children:p(d,{color:"primary",variant:"outlined",sx:{float:"right"},disabled:a,children:"Create"})})}function OnOffSwitch(e){let{onChange:t,propertyName:a,value:n=!1,label:i,disabled:r}=e;return p(S,{control:p(L,{checked:n,onChange:()=>{t(a,!n)},value:n,color:"primary",disabled:r}),label:i})}function SnackbarMessage(e){let{message:t,visible:a=!1,onClose:n,timeOut:i=3e3}=e;return p(z,{anchorOrigin:{vertical:"bottom",horizontal:"left"},ContentProps:{sx:{backgroundColor:e=>e.palette.primary.main}},open:a,autoHideDuration:i,onClose:()=>n(!1),message:t,action:p(W,{"aria-label":"Close",color:"inherit",onClick:()=>n(!1),size:"large",children:p(N,{})})})}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Fe,je={exports:{}};var Ce=function requireMoment(){return Fe||(Fe=1,(e=je).exports=function(){var t,a;function hooks(){return t.apply(null,arguments)}function setHookCallback(e){t=e}function isArray(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function isObject(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function hasOwnProp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function isObjectEmpty(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(hasOwnProp(e,t))return!1;return!0}function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function isDate(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function map(e,t){var a,n=[],i=e.length;for(a=0;a<i;++a)n.push(t(e[a],a));return n}function extend(e,t){for(var a in t)hasOwnProp(t,a)&&(e[a]=t[a]);return hasOwnProp(t,"toString")&&(e.toString=t.toString),hasOwnProp(t,"valueOf")&&(e.valueOf=t.valueOf),e}function createUTC(e,t,a,n){return createLocalOrUTC(e,t,a,n,!0).utc()}function defaultParsingFlags(){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 getParsingFlags(e){return null==e._pf&&(e._pf=defaultParsingFlags()),e._pf}function isValid(e){var t=null,n=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=getParsingFlags(e),n=a.call(t.parsedDateParts,function(e){return null!=e}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function createInvalid(e){var t=createUTC(NaN);return null!=e?extend(getParsingFlags(t),e):getParsingFlags(t).userInvalidated=!0,t}a=Array.prototype.some?Array.prototype.some:function(e){var t,a=Object(this),n=a.length>>>0;for(t=0;t<n;t++)if(t in a&&e.call(this,a[t],t,a))return!0;return!1};var n=hooks.momentProperties=[],i=!1;function copyConfig(e,t){var a,i,r,o=n.length;if(isUndefined(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),isUndefined(t._i)||(e._i=t._i),isUndefined(t._f)||(e._f=t._f),isUndefined(t._l)||(e._l=t._l),isUndefined(t._strict)||(e._strict=t._strict),isUndefined(t._tzm)||(e._tzm=t._tzm),isUndefined(t._isUTC)||(e._isUTC=t._isUTC),isUndefined(t._offset)||(e._offset=t._offset),isUndefined(t._pf)||(e._pf=getParsingFlags(t)),isUndefined(t._locale)||(e._locale=t._locale),o>0)for(a=0;a<o;a++)isUndefined(r=t[i=n[a]])||(e[i]=r);return e}function Moment(e){copyConfig(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===i&&(i=!0,hooks.updateOffset(this),i=!1)}function isMoment(e){return e instanceof Moment||null!=e&&null!=e._isAMomentObject}function warn(e){!1===hooks.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function deprecate(e,t){var a=!0;return extend(function(){if(null!=hooks.deprecationHandler&&hooks.deprecationHandler(null,e),a){var n,i,r,o=[],s=arguments.length;for(i=0;i<s;i++){if(n="","object"==typeof arguments[i]){for(r in n+="\n["+i+"] ",arguments[0])hasOwnProp(arguments[0],r)&&(n+=r+": "+arguments[0][r]+", ");n=n.slice(0,-2)}else n=arguments[i];o.push(n)}warn(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),a=!1}return t.apply(this,arguments)},t)}var r,o={};function deprecateSimple(e,t){null!=hooks.deprecationHandler&&hooks.deprecationHandler(e,t),o[e]||(warn(t),o[e]=!0)}function isFunction(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function set(e){var t,a;for(a in e)hasOwnProp(e,a)&&(isFunction(t=e[a])?this[a]=t:this["_"+a]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(e,t){var a,n=extend({},e);for(a in t)hasOwnProp(t,a)&&(isObject(e[a])&&isObject(t[a])?(n[a]={},extend(n[a],e[a]),extend(n[a],t[a])):null!=t[a]?n[a]=t[a]:delete n[a]);for(a in e)hasOwnProp(e,a)&&!hasOwnProp(t,a)&&isObject(e[a])&&(n[a]=extend({},n[a]));return n}function Locale(e){null!=e&&this.set(e)}hooks.suppressDeprecationWarnings=!1,hooks.deprecationHandler=null,r=Object.keys?Object.keys:function(e){var t,a=[];for(t in e)hasOwnProp(e,t)&&a.push(t);return a};var s={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar(e,t,a){var n=this._calendar[e]||this._calendar.sameElse;return isFunction(n)?n.call(t,a):n}function zeroFill(e,t,a){var n=""+Math.abs(e),i=t-n.length;return(e>=0?a?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var l=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,c=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,d={},p={};function addFormatToken(e,t,a,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(p[e]=i),t&&(p[t[0]]=function(){return zeroFill(i.apply(this,arguments),t[1],t[2])}),a&&(p[a]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function removeFormattingTokens(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function makeFormatFunction(e){var t,a,n=e.match(l);for(t=0,a=n.length;t<a;t++)p[n[t]]?n[t]=p[n[t]]:n[t]=removeFormattingTokens(n[t]);return function(t){var i,r="";for(i=0;i<a;i++)r+=isFunction(n[i])?n[i].call(t,e):n[i];return r}}function formatMoment(e,t){return e.isValid()?(t=expandFormat(t,e.localeData()),d[t]=d[t]||makeFormatFunction(t),d[t](e)):e.localeData().invalidDate()}function expandFormat(e,t){var a=5;function replaceLongDateFormatTokens(e){return t.longDateFormat(e)||e}for(c.lastIndex=0;a>=0&&c.test(e);)e=e.replace(c,replaceLongDateFormatTokens),c.lastIndex=0,a-=1;return e}var u={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 longDateFormat(e){var t=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return t||!a?t:(this._longDateFormat[e]=a.match(l).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}var m="Invalid date";function invalidDate(){return this._invalidDate}var f="%d",h=/\d{1,2}/;function ordinal(e){return this._ordinal.replace("%d",e)}var g={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 relativeTime(e,t,a,n){var i=this._relativeTime[a];return isFunction(i)?i(e,t,a,n):i.replace(/%d/i,e)}function pastFuture(e,t){var a=this._relativeTime[e>0?"future":"past"];return isFunction(a)?a(t):a.replace(/%s/i,t)}var v={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function normalizeUnits(e){return"string"==typeof e?v[e]||v[e.toLowerCase()]:void 0}function normalizeObjectUnits(e){var t,a,n={};for(a in e)hasOwnProp(e,a)&&(t=normalizeUnits(a))&&(n[t]=e[a]);return n}var x={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function getPrioritizedUnits(e){var t,a=[];for(t in e)hasOwnProp(e,t)&&a.push({unit:t,priority:x[t]});return a.sort(function(e,t){return e.priority-t.priority}),a}var y,k=/\d/,b=/\d\d/,w=/\d{3}/,_=/\d{4}/,S=/[+-]?\d{6}/,T=/\d\d?/,D=/\d\d\d\d?/,O=/\d\d\d\d\d\d?/,P=/\d{1,3}/,F=/\d{1,4}/,j=/[+-]?\d{1,6}/,C=/\d+/,M=/[+-]?\d+/,E=/Z|[+-]\d\d:?\d\d/gi,Y=/Z|[+-]\d\d(?::?\d\d)?/gi,R=/[+-]?\d+(\.\d{1,3})?/,I=/[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,A=/^[1-9]\d?/,L=/^([1-9]\d|\d)/;function addRegexToken(e,t,a){y[e]=isFunction(t)?t:function(e,n){return e&&a?a:t}}function getParseRegexForToken(e,t){return hasOwnProp(y,e)?y[e](t._strict,t._locale):new RegExp(unescapeFormat(e))}function unescapeFormat(e){return regexEscape(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,a,n,i){return t||a||n||i}))}function regexEscape(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function absFloor(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function toInt(e){var t=+e,a=0;return 0!==t&&isFinite(t)&&(a=absFloor(t)),a}y={};var W={};function addParseToken(e,t){var a,n,i=t;for("string"==typeof e&&(e=[e]),isNumber(t)&&(i=function(e,a){a[t]=toInt(e)}),n=e.length,a=0;a<n;a++)W[e[a]]=i}function addWeekParseToken(e,t){addParseToken(e,function(e,a,n,i){n._w=n._w||{},t(e,n._w,n,i)})}function addTimeToArrayFromToken(e,t,a){null!=t&&hasOwnProp(W,e)&&W[e](t,a._a,a,e)}function isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}var z=0,N=1,U=2,H=3,G=4,q=5,V=6,$=7,B=8;function daysInYear(e){return isLeapYear(e)?366:365}addFormatToken("Y",0,0,function(){var e=this.year();return e<=9999?zeroFill(e,4):"+"+e}),addFormatToken(0,["YY",2],0,function(){return this.year()%100}),addFormatToken(0,["YYYY",4],0,"year"),addFormatToken(0,["YYYYY",5],0,"year"),addFormatToken(0,["YYYYYY",6,!0],0,"year"),addRegexToken("Y",M),addRegexToken("YY",T,b),addRegexToken("YYYY",F,_),addRegexToken("YYYYY",j,S),addRegexToken("YYYYYY",j,S),addParseToken(["YYYYY","YYYYYY"],z),addParseToken("YYYY",function(e,t){t[z]=2===e.length?hooks.parseTwoDigitYear(e):toInt(e)}),addParseToken("YY",function(e,t){t[z]=hooks.parseTwoDigitYear(e)}),addParseToken("Y",function(e,t){t[z]=parseInt(e,10)}),hooks.parseTwoDigitYear=function(e){return toInt(e)+(toInt(e)>68?1900:2e3)};var Z,K=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(e,t){return function(a){return null!=a?(set$1(this,e,a),hooks.updateOffset(this,t),this):get(this,e)}}function get(e,t){if(!e.isValid())return NaN;var a=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?a.getUTCMilliseconds():a.getMilliseconds();case"Seconds":return n?a.getUTCSeconds():a.getSeconds();case"Minutes":return n?a.getUTCMinutes():a.getMinutes();case"Hours":return n?a.getUTCHours():a.getHours();case"Date":return n?a.getUTCDate():a.getDate();case"Day":return n?a.getUTCDay():a.getDay();case"Month":return n?a.getUTCMonth():a.getMonth();case"FullYear":return n?a.getUTCFullYear():a.getFullYear();default:return NaN}}function set$1(e,t,a){var n,i,r,o,s;if(e.isValid()&&!isNaN(a)){switch(n=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(a):n.setMilliseconds(a));case"Seconds":return void(i?n.setUTCSeconds(a):n.setSeconds(a));case"Minutes":return void(i?n.setUTCMinutes(a):n.setMinutes(a));case"Hours":return void(i?n.setUTCHours(a):n.setHours(a));case"Date":return void(i?n.setUTCDate(a):n.setDate(a));case"FullYear":break;default:return}r=a,o=e.month(),s=29!==(s=e.date())||1!==o||isLeapYear(r)?s:28,i?n.setUTCFullYear(r,o,s):n.setFullYear(r,o,s)}}function stringGet(e){return isFunction(this[e=normalizeUnits(e)])?this[e]():this}function stringSet(e,t){if("object"==typeof e){var a,n=getPrioritizedUnits(e=normalizeObjectUnits(e)),i=n.length;for(a=0;a<i;a++)this[n[a].unit](e[n[a].unit])}else if(isFunction(this[e=normalizeUnits(e)]))return this[e](t);return this}function mod(e,t){return(e%t+t)%t}function daysInMonth(e,t){if(isNaN(e)||isNaN(t))return NaN;var a=mod(t,12);return e+=(t-a)/12,1===a?isLeapYear(e)?29:28:31-a%7%2}Z=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1}),addFormatToken("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),addFormatToken("MMMM",0,0,function(e){return this.localeData().months(this,e)}),addRegexToken("M",T,A),addRegexToken("MM",T,b),addRegexToken("MMM",function(e,t){return t.monthsShortRegex(e)}),addRegexToken("MMMM",function(e,t){return t.monthsRegex(e)}),addParseToken(["M","MM"],function(e,t){t[N]=toInt(e)-1}),addParseToken(["MMM","MMMM"],function(e,t,a,n){var i=a._locale.monthsParse(e,n,a._strict);null!=i?t[N]=i:getParsingFlags(a).invalidMonth=e});var J="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Q="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),X=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ee=I,te=I;function localeMonths(e,t){return e?isArray(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||X).test(t)?"format":"standalone"][e.month()]:isArray(this._months)?this._months:this._months.standalone}function localeMonthsShort(e,t){return e?isArray(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[X.test(t)?"format":"standalone"][e.month()]:isArray(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(e,t,a){var n,i,r,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)r=createUTC([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(r,"").toLocaleLowerCase();return a?"MMM"===t?-1!==(i=Z.call(this._shortMonthsParse,o))?i:null:-1!==(i=Z.call(this._longMonthsParse,o))?i:null:"MMM"===t?-1!==(i=Z.call(this._shortMonthsParse,o))||-1!==(i=Z.call(this._longMonthsParse,o))?i:null:-1!==(i=Z.call(this._longMonthsParse,o))||-1!==(i=Z.call(this._shortMonthsParse,o))?i:null}function localeMonthsParse(e,t,a){var n,i,r;if(this._monthsParseExact)return handleStrictParse.call(this,e,t,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=createUTC([2e3,n]),a&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),a||this._monthsParse[n]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),a&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(a&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!a&&this._monthsParse[n].test(e))return n}}function setMonth(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=toInt(t);else if(!isNumber(t=e.localeData().monthsParse(t)))return e;var a=t,n=e.date();return n=n<29?n:Math.min(n,daysInMonth(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,n):e._d.setMonth(a,n),e}function getSetMonth(e){return null!=e?(setMonth(this,e),hooks.updateOffset(this,!0),this):get(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(e){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=ee),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(e){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),e?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=te),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function cmpLenRev(e,t){return t.length-e.length}var e,t,a,n,i=[],r=[],o=[];for(e=0;e<12;e++)t=createUTC([2e3,e]),a=regexEscape(this.monthsShort(t,"")),n=regexEscape(this.months(t,"")),i.push(a),r.push(n),o.push(n),o.push(a);i.sort(cmpLenRev),r.sort(cmpLenRev),o.sort(cmpLenRev),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function createDate(e,t,a,n,i,r,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,a,n,i,r,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,a,n,i,r,o),s}function createUTCDate(e){var t,a;return e<100&&e>=0?((a=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,a)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function firstWeekOffset(e,t,a){var n=7+t-a;return-(7+createUTCDate(e,0,n).getUTCDay()-t)%7+n-1}function dayOfYearFromWeeks(e,t,a,n,i){var r,o,s=1+7*(t-1)+(7+a-n)%7+firstWeekOffset(e,n,i);return s<=0?o=daysInYear(r=e-1)+s:s>daysInYear(e)?(r=e+1,o=s-daysInYear(e)):(r=e,o=s),{year:r,dayOfYear:o}}function weekOfYear(e,t,a){var n,i,r=firstWeekOffset(e.year(),t,a),o=Math.floor((e.dayOfYear()-r-1)/7)+1;return o<1?n=o+weeksInYear(i=e.year()-1,t,a):o>weeksInYear(e.year(),t,a)?(n=o-weeksInYear(e.year(),t,a),i=e.year()+1):(i=e.year(),n=o),{week:n,year:i}}function weeksInYear(e,t,a){var n=firstWeekOffset(e,t,a),i=firstWeekOffset(e+1,t,a);return(daysInYear(e)-n+i)/7}function localeWeek(e){return weekOfYear(e,this._week.dow,this._week.doy).week}addFormatToken("w",["ww",2],"wo","week"),addFormatToken("W",["WW",2],"Wo","isoWeek"),addRegexToken("w",T,A),addRegexToken("ww",T,b),addRegexToken("W",T,A),addRegexToken("WW",T,b),addWeekParseToken(["w","ww","W","WW"],function(e,t,a,n){t[n.substr(0,1)]=toInt(e)});var ae={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function getSetISOWeek(e){var t=weekOfYear(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function parseWeekday(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function parseIsoWeekday(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function shiftWeekdays(e,t){return e.slice(t,7).concat(e.slice(0,t))}addFormatToken("d",0,"do","day"),addFormatToken("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),addFormatToken("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),addFormatToken("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),addFormatToken("e",0,0,"weekday"),addFormatToken("E",0,0,"isoWeekday"),addRegexToken("d",T),addRegexToken("e",T),addRegexToken("E",T),addRegexToken("dd",function(e,t){return t.weekdaysMinRegex(e)}),addRegexToken("ddd",function(e,t){return t.weekdaysShortRegex(e)}),addRegexToken("dddd",function(e,t){return t.weekdaysRegex(e)}),addWeekParseToken(["dd","ddd","dddd"],function(e,t,a,n){var i=a._locale.weekdaysParse(e,n,a._strict);null!=i?t.d=i:getParsingFlags(a).invalidWeekday=e}),addWeekParseToken(["d","e","E"],function(e,t,a,n){t[n]=toInt(e)});var ne="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ie="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),re="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),oe=I,se=I,le=I;function localeWeekdays(e,t){var a=isArray(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?shiftWeekdays(a,this._week.dow):e?a[e.day()]:a}function localeWeekdaysShort(e){return!0===e?shiftWeekdays(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function localeWeekdaysMin(e){return!0===e?shiftWeekdays(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function handleStrictParse$1(e,t,a){var n,i,r,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=createUTC([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return a?"dddd"===t?-1!==(i=Z.call(this._weekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Z.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Z.call(this._minWeekdaysParse,o))?i:null:"dddd"===t?-1!==(i=Z.call(this._weekdaysParse,o))||-1!==(i=Z.call(this._shortWeekdaysParse,o))||-1!==(i=Z.call(this._minWeekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Z.call(this._shortWeekdaysParse,o))||-1!==(i=Z.call(this._weekdaysParse,o))||-1!==(i=Z.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Z.call(this._minWeekdaysParse,o))||-1!==(i=Z.call(this._weekdaysParse,o))||-1!==(i=Z.call(this._shortWeekdaysParse,o))?i:null}function localeWeekdaysParse(e,t,a){var n,i,r;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,e,t,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=createUTC([2e3,1]).day(n),a&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),a&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(a&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(a&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!a&&this._weekdaysParse[n].test(e))return n}}function getSetDayOfWeek(e){if(!this.isValid())return null!=e?this:NaN;var t=get(this,"Day");return null!=e?(e=parseWeekday(e,this.localeData()),this.add(e-t,"d")):t}function getSetLocaleDayOfWeek(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function getSetISODayOfWeek(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=parseIsoWeekday(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function weekdaysRegex(e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=oe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=se),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=le),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function cmpLenRev(e,t){return t.length-e.length}var e,t,a,n,i,r=[],o=[],s=[],l=[];for(e=0;e<7;e++)t=createUTC([2e3,1]).day(e),a=regexEscape(this.weekdaysMin(t,"")),n=regexEscape(this.weekdaysShort(t,"")),i=regexEscape(this.weekdays(t,"")),r.push(a),o.push(n),s.push(i),l.push(a),l.push(n),l.push(i);r.sort(cmpLenRev),o.sort(cmpLenRev),s.sort(cmpLenRev),l.sort(cmpLenRev),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}function meridiem(e,t){addFormatToken(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function matchMeridiem(e,t){return t._meridiemParse}function localeIsPM(e){return"p"===(e+"").toLowerCase().charAt(0)}addFormatToken("H",["HH",2],0,"hour"),addFormatToken("h",["hh",2],0,hFormat),addFormatToken("k",["kk",2],0,kFormat),addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)}),addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)}),addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),meridiem("a",!0),meridiem("A",!1),addRegexToken("a",matchMeridiem),addRegexToken("A",matchMeridiem),addRegexToken("H",T,L),addRegexToken("h",T,A),addRegexToken("k",T,A),addRegexToken("HH",T,b),addRegexToken("hh",T,b),addRegexToken("kk",T,b),addRegexToken("hmm",D),addRegexToken("hmmss",O),addRegexToken("Hmm",D),addRegexToken("Hmmss",O),addParseToken(["H","HH"],H),addParseToken(["k","kk"],function(e,t,a){var n=toInt(e);t[H]=24===n?0:n}),addParseToken(["a","A"],function(e,t,a){a._isPm=a._locale.isPM(e),a._meridiem=e}),addParseToken(["h","hh"],function(e,t,a){t[H]=toInt(e),getParsingFlags(a).bigHour=!0}),addParseToken("hmm",function(e,t,a){var n=e.length-2;t[H]=toInt(e.substr(0,n)),t[G]=toInt(e.substr(n)),getParsingFlags(a).bigHour=!0}),addParseToken("hmmss",function(e,t,a){var n=e.length-4,i=e.length-2;t[H]=toInt(e.substr(0,n)),t[G]=toInt(e.substr(n,2)),t[q]=toInt(e.substr(i)),getParsingFlags(a).bigHour=!0}),addParseToken("Hmm",function(e,t,a){var n=e.length-2;t[H]=toInt(e.substr(0,n)),t[G]=toInt(e.substr(n))}),addParseToken("Hmmss",function(e,t,a){var n=e.length-4,i=e.length-2;t[H]=toInt(e.substr(0,n)),t[G]=toInt(e.substr(n,2)),t[q]=toInt(e.substr(i))});var ce=/[ap]\.?m?\.?/i,de=makeGetSet("Hours",!0);function localeMeridiem(e,t,a){return e>11?a?"pm":"PM":a?"am":"AM"}var pe,ue={calendar:s,longDateFormat:u,invalidDate:m,ordinal:f,dayOfMonthOrdinalParse:h,relativeTime:g,months:J,monthsShort:Q,week:ae,weekdays:ne,weekdaysMin:re,weekdaysShort:ie,meridiemParse:ce},me={},fe={};function commonPrefix(e,t){var a,n=Math.min(e.length,t.length);for(a=0;a<n;a+=1)if(e[a]!==t[a])return a;return n}function normalizeLocale(e){return e?e.toLowerCase().replace("_","-"):e}function chooseLocale(e){for(var t,a,n,i,r=0;r<e.length;){for(t=(i=normalizeLocale(e[r]).split("-")).length,a=(a=normalizeLocale(e[r+1]))?a.split("-"):null;t>0;){if(n=loadLocale(i.slice(0,t).join("-")))return n;if(a&&a.length>=t&&commonPrefix(i,a)>=t-1)break;t--}r++}return pe}function isLocaleNameSane(e){return!(!e||!e.match("^[^/\\\\]*$"))}function loadLocale(t){var a=null;if(void 0===me[t]&&e&&e.exports&&isLocaleNameSane(t))try{a=pe._abbr,commonjsRequire("./locale/"+t),getSetGlobalLocale(a)}catch(e){me[t]=null}return me[t]}function getSetGlobalLocale(e,t){var a;return e&&((a=isUndefined(t)?getLocale(e):defineLocale(e,t))?pe=a:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),pe._abbr}function defineLocale(e,t){if(null!==t){var a,n=ue;if(t.abbr=e,null!=me[e])deprecateSimple("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."),n=me[e]._config;else if(null!=t.parentLocale)if(null!=me[t.parentLocale])n=me[t.parentLocale]._config;else{if(null==(a=loadLocale(t.parentLocale)))return fe[t.parentLocale]||(fe[t.parentLocale]=[]),fe[t.parentLocale].push({name:e,config:t}),null;n=a._config}return me[e]=new Locale(mergeConfigs(n,t)),fe[e]&&fe[e].forEach(function(e){defineLocale(e.name,e.config)}),getSetGlobalLocale(e),me[e]}return delete me[e],null}function updateLocale(e,t){if(null!=t){var a,n,i=ue;null!=me[e]&&null!=me[e].parentLocale?me[e].set(mergeConfigs(me[e]._config,t)):(null!=(n=loadLocale(e))&&(i=n._config),t=mergeConfigs(i,t),null==n&&(t.abbr=e),(a=new Locale(t)).parentLocale=me[e],me[e]=a),getSetGlobalLocale(e)}else null!=me[e]&&(null!=me[e].parentLocale?(me[e]=me[e].parentLocale,e===getSetGlobalLocale()&&getSetGlobalLocale(e)):null!=me[e]&&delete me[e]);return me[e]}function getLocale(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return pe;if(!isArray(e)){if(t=loadLocale(e))return t;e=[e]}return chooseLocale(e)}function listLocales(){return r(me)}function checkOverflow(e){var t,a=e._a;return a&&-2===getParsingFlags(e).overflow&&(t=a[N]<0||a[N]>11?N:a[U]<1||a[U]>daysInMonth(a[z],a[N])?U:a[H]<0||a[H]>24||24===a[H]&&(0!==a[G]||0!==a[q]||0!==a[V])?H:a[G]<0||a[G]>59?G:a[q]<0||a[q]>59?q:a[V]<0||a[V]>999?V:-1,getParsingFlags(e)._overflowDayOfYear&&(t<z||t>U)&&(t=U),getParsingFlags(e)._overflowWeeks&&-1===t&&(t=$),getParsingFlags(e)._overflowWeekday&&-1===t&&(t=B),getParsingFlags(e).overflow=t),e}var he=/^\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)?)?$/,ge=/^\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)?)?$/,ve=/Z|[+-]\d\d(?::?\d\d)?/,xe=[["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]],ye=[["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/]],ke=/^\/?Date\((-?\d+)/i,be=/^(?:(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}))$/,we={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function configFromISO(e){var t,a,n,i,r,o,s=e._i,l=he.exec(s)||ge.exec(s),c=xe.length,d=ye.length;if(l){for(getParsingFlags(e).iso=!0,t=0,a=c;t<a;t++)if(xe[t][1].exec(l[1])){i=xe[t][0],n=!1!==xe[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,a=d;t<a;t++)if(ye[t][1].exec(l[3])){r=(l[2]||" ")+ye[t][0];break}if(null==r)return void(e._isValid=!1)}if(!n&&null!=r)return void(e._isValid=!1);if(l[4]){if(!ve.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=i+(r||"")+(o||""),configFromStringAndFormat(e)}else e._isValid=!1}function extractFromRFC2822Strings(e,t,a,n,i,r){var o=[untruncateYear(e),Q.indexOf(t),parseInt(a,10),parseInt(n,10),parseInt(i,10)];return r&&o.push(parseInt(r,10)),o}function untruncateYear(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function preprocessRFC2822(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday(e,t,a){return!e||ie.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(getParsingFlags(a).weekdayMismatch=!0,a._isValid=!1,!1)}function calculateOffset(e,t,a){if(e)return we[e];if(t)return 0;var n=parseInt(a,10),i=n%100;return(n-i)/100*60+i}function configFromRFC2822(e){var t,a=be.exec(preprocessRFC2822(e._i));if(a){if(t=extractFromRFC2822Strings(a[4],a[3],a[2],a[5],a[6],a[7]),!checkWeekday(a[1],t,e))return;e._a=t,e._tzm=calculateOffset(a[8],a[9],a[10]),e._d=createUTCDate.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),getParsingFlags(e).rfc2822=!0}else e._isValid=!1}function configFromString(e){var t=ke.exec(e._i);null===t?(configFromISO(e),!1===e._isValid&&(delete e._isValid,configFromRFC2822(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:hooks.createFromInputFallback(e)))):e._d=new Date(+t[1])}function defaults(e,t,a){return null!=e?e:null!=t?t:a}function currentDateArray(e){var t=new Date(hooks.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function configFromArray(e){var t,a,n,i,r,o=[];if(!e._d){for(n=currentDateArray(e),e._w&&null==e._a[U]&&null==e._a[N]&&dayOfYearFromWeekInfo(e),null!=e._dayOfYear&&(r=defaults(e._a[z],n[z]),(e._dayOfYear>daysInYear(r)||0===e._dayOfYear)&&(getParsingFlags(e)._overflowDayOfYear=!0),a=createUTCDate(r,0,e._dayOfYear),e._a[N]=a.getUTCMonth(),e._a[U]=a.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=n[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[H]&&0===e._a[G]&&0===e._a[q]&&0===e._a[V]&&(e._nextDay=!0,e._a[H]=0),e._d=(e._useUTC?createUTCDate:createDate).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[H]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(getParsingFlags(e).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(e){var t,a,n,i,r,o,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,o=4,a=defaults(t.GG,e._a[z],weekOfYear(createLocal(),1,4).year),n=defaults(t.W,1),((i=defaults(t.E,1))<1||i>7)&&(l=!0)):(r=e._locale._week.dow,o=e._locale._week.doy,c=weekOfYear(createLocal(),r,o),a=defaults(t.gg,e._a[z],c.year),n=defaults(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(l=!0)):i=r),n<1||n>weeksInYear(a,r,o)?getParsingFlags(e)._overflowWeeks=!0:null!=l?getParsingFlags(e)._overflowWeekday=!0:(s=dayOfYearFromWeeks(a,n,i,r,o),e._a[z]=s.year,e._dayOfYear=s.dayOfYear)}function configFromStringAndFormat(e){if(e._f!==hooks.ISO_8601)if(e._f!==hooks.RFC_2822){e._a=[],getParsingFlags(e).empty=!0;var t,a,n,i,r,o,s,c=""+e._i,d=c.length,u=0;for(s=(n=expandFormat(e._f,e._locale).match(l)||[]).length,t=0;t<s;t++)i=n[t],(a=(c.match(getParseRegexForToken(i,e))||[])[0])&&((r=c.substr(0,c.indexOf(a))).length>0&&getParsingFlags(e).unusedInput.push(r),c=c.slice(c.indexOf(a)+a.length),u+=a.length),p[i]?(a?getParsingFlags(e).empty=!1:getParsingFlags(e).unusedTokens.push(i),addTimeToArrayFromToken(i,a,e)):e._strict&&!a&&getParsingFlags(e).unusedTokens.push(i);getParsingFlags(e).charsLeftOver=d-u,c.length>0&&getParsingFlags(e).unusedInput.push(c),e._a[H]<=12&&!0===getParsingFlags(e).bigHour&&e._a[H]>0&&(getParsingFlags(e).bigHour=void 0),getParsingFlags(e).parsedDateParts=e._a.slice(0),getParsingFlags(e).meridiem=e._meridiem,e._a[H]=meridiemFixWrap(e._locale,e._a[H],e._meridiem),null!==(o=getParsingFlags(e).era)&&(e._a[z]=e._locale.erasConvertYear(o,e._a[z])),configFromArray(e),checkOverflow(e)}else configFromRFC2822(e);else configFromISO(e)}function meridiemFixWrap(e,t,a){var n;return null==a?t:null!=e.meridiemHour?e.meridiemHour(t,a):null!=e.isPM?((n=e.isPM(a))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function configFromStringAndArray(e){var t,a,n,i,r,o,s=!1,l=e._f.length;if(0===l)return getParsingFlags(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)r=0,o=!1,t=copyConfig({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],configFromStringAndFormat(t),isValid(t)&&(o=!0),r+=getParsingFlags(t).charsLeftOver,r+=10*getParsingFlags(t).unusedTokens.length,getParsingFlags(t).score=r,s?r<n&&(n=r,a=t):(null==n||r<n||o)&&(n=r,a=t,o&&(s=!0));extend(e,a||t)}function configFromObject(e){if(!e._d){var t=normalizeObjectUnits(e._i),a=void 0===t.day?t.date:t.day;e._a=map([t.year,t.month,a,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),configFromArray(e)}}function createFromConfig(e){var t=new Moment(checkOverflow(prepareConfig(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function prepareConfig(e){var t=e._i,a=e._f;return e._locale=e._locale||getLocale(e._l),null===t||void 0===a&&""===t?createInvalid({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),isMoment(t)?new Moment(checkOverflow(t)):(isDate(t)?e._d=t:isArray(a)?configFromStringAndArray(e):a?configFromStringAndFormat(e):configFromInput(e),isValid(e)||(e._d=null),e))}function configFromInput(e){var t=e._i;isUndefined(t)?e._d=new Date(hooks.now()):isDate(t)?e._d=new Date(t.valueOf()):"string"==typeof t?configFromString(e):isArray(t)?(e._a=map(t.slice(0),function(e){return parseInt(e,10)}),configFromArray(e)):isObject(t)?configFromObject(e):isNumber(t)?e._d=new Date(t):hooks.createFromInputFallback(e)}function createLocalOrUTC(e,t,a,n,i){var r={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==a&&!1!==a||(n=a,a=void 0),(isObject(e)&&isObjectEmpty(e)||isArray(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=a,r._i=e,r._f=t,r._strict=n,createFromConfig(r)}function createLocal(e,t,a,n){return createLocalOrUTC(e,t,a,n,!1)}hooks.createFromInputFallback=deprecate("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":""))}),hooks.ISO_8601=function(){},hooks.RFC_2822=function(){};var _e=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=createLocal.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:createInvalid()}),Se=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=createLocal.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:createInvalid()});function pickBy(e,t){var a,n;if(1===t.length&&isArray(t[0])&&(t=t[0]),!t.length)return createLocal();for(a=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](a)||(a=t[n]);return a}function min(){return pickBy("isBefore",[].slice.call(arguments,0))}function max(){return pickBy("isAfter",[].slice.call(arguments,0))}var now=function(){return Date.now?Date.now():+new Date},Te=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid(e){var t,a,n=!1,i=Te.length;for(t in e)if(hasOwnProp(e,t)&&(-1===Z.call(Te,t)||null!=e[t]&&isNaN(e[t])))return!1;for(a=0;a<i;++a)if(e[Te[a]]){if(n)return!1;parseFloat(e[Te[a]])!==toInt(e[Te[a]])&&(n=!0)}return!0}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(e){var t=normalizeObjectUnits(e),a=t.year||0,n=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=isDurationValid(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*s*60*60,this._days=+o+7*r,this._months=+i+3*n+12*a,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(e){return e instanceof Duration}function absRound(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function compareArrays(e,t,a){var n,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),o=0;for(n=0;n<i;n++)toInt(e[n])!==toInt(t[n])&&o++;return o+r}function offset(e,t){addFormatToken(e,0,0,function(){var e=this.utcOffset(),a="+";return e<0&&(e=-e,a="-"),a+zeroFill(~~(e/60),2)+t+zeroFill(~~e%60,2)})}offset("Z",":"),offset("ZZ",""),addRegexToken("Z",Y),addRegexToken("ZZ",Y),addParseToken(["Z","ZZ"],function(e,t,a){a._useUTC=!0,a._tzm=offsetFromString(Y,e)});var De=/([\+\-]|\d\d)/gi;function offsetFromString(e,t){var a,n,i=(t||"").match(e);return null===i?null:0===(n=60*(a=((i[i.length-1]||[])+"").match(De)||["-",0,0])[1]+toInt(a[2]))?0:"+"===a[0]?n:-n}function cloneWithOffset(e,t){var a,n;return t._isUTC?(a=t.clone(),n=(isMoment(e)||isDate(e)?e.valueOf():createLocal(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+n),hooks.updateOffset(a,!1),a):createLocal(e).local()}function getDateOffset(e){return-Math.round(e._d.getTimezoneOffset())}function getSetOffset(e,t,a){var n,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=offsetFromString(Y,e)))return this}else Math.abs(e)<16&&!a&&(e*=60);return!this._isUTC&&t&&(n=getDateOffset(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),i!==e&&(!t||this._changeInProgress?addSubtract(this,createDuration(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:getDateOffset(this)}function getSetZone(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function setOffsetToUTC(e){return this.utcOffset(0,e)}function setOffsetToLocal(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=offsetFromString(E,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(e){return!!this.isValid()&&(e=e?createLocal(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var e,t={};return copyConfig(t,this),(t=prepareConfig(t))._a?(e=t._isUTC?createUTC(t._a):createLocal(t._a),this._isDSTShifted=this.isValid()&&compareArrays(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return!!this.isValid()&&!this._isUTC}function isUtcOffset(){return!!this.isValid()&&this._isUTC}function isUtc(){return!!this.isValid()&&this._isUTC&&0===this._offset}hooks.updateOffset=function(){};var Oe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Pe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(e,t){var a,n,i,r=e,o=null;return isDuration(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:isNumber(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(o=Oe.exec(e))?(a="-"===o[1]?-1:1,r={y:0,d:toInt(o[U])*a,h:toInt(o[H])*a,m:toInt(o[G])*a,s:toInt(o[q])*a,ms:toInt(absRound(1e3*o[V]))*a}):(o=Pe.exec(e))?(a="-"===o[1]?-1:1,r={y:parseIso(o[2],a),M:parseIso(o[3],a),w:parseIso(o[4],a),d:parseIso(o[5],a),h:parseIso(o[6],a),m:parseIso(o[7],a),s:parseIso(o[8],a)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=momentsDifference(createLocal(r.from),createLocal(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),n=new Duration(r),isDuration(e)&&hasOwnProp(e,"_locale")&&(n._locale=e._locale),isDuration(e)&&hasOwnProp(e,"_isValid")&&(n._isValid=e._isValid),n}function parseIso(e,t){var a=e&&parseFloat(e.replace(",","."));return(isNaN(a)?0:a)*t}function positiveMomentsDifference(e,t){var a={};return a.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(a.months,"M").isAfter(t)&&--a.months,a.milliseconds=+t-+e.clone().add(a.months,"M"),a}function momentsDifference(e,t){var a;return e.isValid()&&t.isValid()?(t=cloneWithOffset(t,e),e.isBefore(t)?a=positiveMomentsDifference(e,t):((a=positiveMomentsDifference(t,e)).milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function createAdder(e,t){return function(a,n){var i;return null===n||isNaN(+n)||(deprecateSimple(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=a,a=n,n=i),addSubtract(this,createDuration(a,n),e),this}}function addSubtract(e,t,a,n){var i=t._milliseconds,r=absRound(t._days),o=absRound(t._months);e.isValid()&&(n=null==n||n,o&&setMonth(e,get(e,"Month")+o*a),r&&set$1(e,"Date",get(e,"Date")+r*a),i&&e._d.setTime(e._d.valueOf()+i*a),n&&hooks.updateOffset(e,r||o))}createDuration.fn=Duration.prototype,createDuration.invalid=createInvalid$1;var Fe=createAdder(1,"add"),je=createAdder(-1,"subtract");function isString(e){return"string"==typeof e||e instanceof String}function isMomentInput(e){return isMoment(e)||isDate(e)||isString(e)||isNumber(e)||isNumberOrStringArray(e)||isMomentInputObject(e)||null==e}function isMomentInputObject(e){var t,a,n=isObject(e)&&!isObjectEmpty(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o=r.length;for(t=0;t<o;t+=1)a=r[t],i=i||hasOwnProp(e,a);return n&&i}function isNumberOrStringArray(e){var t=isArray(e),a=!1;return t&&(a=0===e.filter(function(t){return!isNumber(t)&&isString(e)}).length),t&&a}function isCalendarSpec(e){var t,a,n=isObject(e)&&!isObjectEmpty(e),i=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)a=r[t],i=i||hasOwnProp(e,a);return n&&i}function getCalendarFormat(e,t){var a=e.diff(t,"days",!0);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function calendar$1(e,t){1===arguments.length&&(arguments[0]?isMomentInput(arguments[0])?(e=arguments[0],t=void 0):isCalendarSpec(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var a=e||createLocal(),n=cloneWithOffset(a,this).startOf("day"),i=hooks.calendarFormat(this,n)||"sameElse",r=t&&(isFunction(t[i])?t[i].call(this,a):t[i]);return this.format(r||this.localeData().calendar(i,this,createLocal(a)))}function clone(){return new Moment(this)}function isAfter(e,t){var a=isMoment(e)?e:createLocal(e);return!(!this.isValid()||!a.isValid())&&("millisecond"===(t=normalizeUnits(t)||"millisecond")?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(t).valueOf())}function isBefore(e,t){var a=isMoment(e)?e:createLocal(e);return!(!this.isValid()||!a.isValid())&&("millisecond"===(t=normalizeUnits(t)||"millisecond")?this.valueOf()<a.valueOf():this.clone().endOf(t).valueOf()<a.valueOf())}function isBetween(e,t,a,n){var i=isMoment(e)?e:createLocal(e),r=isMoment(t)?t:createLocal(t);return!!(this.isValid()&&i.isValid()&&r.isValid())&&("("===(n=n||"()")[0]?this.isAfter(i,a):!this.isBefore(i,a))&&(")"===n[1]?this.isBefore(r,a):!this.isAfter(r,a))}function isSame(e,t){var a,n=isMoment(e)?e:createLocal(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=normalizeUnits(t)||"millisecond")?this.valueOf()===n.valueOf():(a=n.valueOf(),this.clone().startOf(t).valueOf()<=a&&a<=this.clone().endOf(t).valueOf()))}function isSameOrAfter(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function isSameOrBefore(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function diff(e,t,a){var n,i,r;if(!this.isValid())return NaN;if(!(n=cloneWithOffset(e,this)).isValid())return NaN;switch(i=6e4*(n.utcOffset()-this.utcOffset()),t=normalizeUnits(t)){case"year":r=monthDiff(this,n)/12;break;case"month":r=monthDiff(this,n);break;case"quarter":r=monthDiff(this,n)/3;break;case"second":r=(this-n)/1e3;break;case"minute":r=(this-n)/6e4;break;case"hour":r=(this-n)/36e5;break;case"day":r=(this-n-i)/864e5;break;case"week":r=(this-n-i)/6048e5;break;default:r=this-n}return a?r:absFloor(r)}function monthDiff(e,t){if(e.date()<t.date())return-monthDiff(t,e);var a=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(a,"months");return-(a+(t-n<0?(t-n)/(n-e.clone().add(a-1,"months")):(t-n)/(e.clone().add(a+1,"months")-n)))||0}function toString(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(e){if(!this.isValid())return null;var t=!0!==e,a=t?this.clone().utc():this;return a.year()<0||a.year()>9999?formatMoment(a,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",formatMoment(a,"Z")):formatMoment(a,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,a,n,i="moment",r="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",n=r+'[")]',this.format(e+t+a+n)}function format(e){e||(e=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var t=formatMoment(this,e);return this.localeData().postformat(t)}function from(e,t){return this.isValid()&&(isMoment(e)&&e.isValid()||createLocal(e).isValid())?createDuration({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function fromNow(e){return this.from(createLocal(),e)}function to(e,t){return this.isValid()&&(isMoment(e)&&e.isValid()||createLocal(e).isValid())?createDuration({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function toNow(e){return this.to(createLocal(),e)}function locale(e){var t;return void 0===e?this._locale._abbr:(null!=(t=getLocale(e))&&(this._locale=t),this)}hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ce=deprecate("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 localeData(){return this._locale}var Me=1e3,Ee=60*Me,Ye=60*Ee,Re=3506328*Ye;function mod$1(e,t){return(e%t+t)%t}function localStartOfDate(e,t,a){return e<100&&e>=0?new Date(e+400,t,a)-Re:new Date(e,t,a).valueOf()}function utcStartOfDate(e,t,a){return e<100&&e>=0?Date.UTC(e+400,t,a)-Re:Date.UTC(e,t,a)}function startOf(e){var t,a;if(void 0===(e=normalizeUnits(e))||"millisecond"===e||!this.isValid())return this;switch(a=this._isUTC?utcStartOfDate:localStartOfDate,e){case"year":t=a(this.year(),0,1);break;case"quarter":t=a(this.year(),this.month()-this.month()%3,1);break;case"month":t=a(this.year(),this.month(),1);break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=a(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mod$1(t+(this._isUTC?0:this.utcOffset()*Ee),Ye);break;case"minute":t=this._d.valueOf(),t-=mod$1(t,Ee);break;case"second":t=this._d.valueOf(),t-=mod$1(t,Me)}return this._d.setTime(t),hooks.updateOffset(this,!0),this}function endOf(e){var t,a;if(void 0===(e=normalizeUnits(e))||"millisecond"===e||!this.isValid())return this;switch(a=this._isUTC?utcStartOfDate:localStartOfDate,e){case"year":t=a(this.year()+1,0,1)-1;break;case"quarter":t=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=a(this.year(),this.month()+1,1)-1;break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=a(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ye-mod$1(t+(this._isUTC?0:this.utcOffset()*Ee),Ye)-1;break;case"minute":t=this._d.valueOf(),t+=Ee-mod$1(t,Ee)-1;break;case"second":t=this._d.valueOf(),t+=Me-mod$1(t,Me)-1}return this._d.setTime(t),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-6e4*(this._offset||0)}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function toObject(){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 toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function localeEras(e,t){var a,n,i,r=this._eras||getLocale("en")._eras;for(a=0,n=r.length;a<n;++a)switch("string"==typeof r[a].since&&(i=hooks(r[a].since).startOf("day"),r[a].since=i.valueOf()),typeof r[a].until){case"undefined":r[a].until=1/0;break;case"string":i=hooks(r[a].until).startOf("day").valueOf(),r[a].until=i.valueOf()}return r}function localeErasParse(e,t,a){var n,i,r,o,s,l=this.eras();for(e=e.toUpperCase(),n=0,i=l.length;n<i;++n)if(r=l[n].name.toUpperCase(),o=l[n].abbr.toUpperCase(),s=l[n].narrow.toUpperCase(),a)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[n];break;case"NNNN":if(r===e)return l[n];break;case"NNNNN":if(s===e)return l[n]}else if([r,o,s].indexOf(e)>=0)return l[n]}function localeErasConvertYear(e,t){var a=e.since<=e.until?1:-1;return void 0===t?hooks(e.since).year():hooks(e.since).year()+(t-e.offset)*a}function getEraName(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until)return n[e].name;if(n[e].until<=a&&a<=n[e].since)return n[e].name}return""}function getEraNarrow(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until)return n[e].narrow;if(n[e].until<=a&&a<=n[e].since)return n[e].narrow}return""}function getEraAbbr(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until)return n[e].abbr;if(n[e].until<=a&&a<=n[e].since)return n[e].abbr}return""}function getEraYear(){var e,t,a,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(a=i[e].since<=i[e].until?1:-1,n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until||i[e].until<=n&&n<=i[e].since)return(this.year()-hooks(i[e].since).year())*a+i[e].offset;return this.year()}function erasNameRegex(e){return hasOwnProp(this,"_erasNameRegex")||computeErasParse.call(this),e?this._erasNameRegex:this._erasRegex}function erasAbbrRegex(e){return hasOwnProp(this,"_erasAbbrRegex")||computeErasParse.call(this),e?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex(e){return hasOwnProp(this,"_erasNarrowRegex")||computeErasParse.call(this),e?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr(e,t){return t.erasAbbrRegex(e)}function matchEraName(e,t){return t.erasNameRegex(e)}function matchEraNarrow(e,t){return t.erasNarrowRegex(e)}function matchEraYearOrdinal(e,t){return t._eraYearOrdinalRegex||C}function computeErasParse(){var e,t,a,n,i,r=[],o=[],s=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)a=regexEscape(c[e].name),n=regexEscape(c[e].abbr),i=regexEscape(c[e].narrow),o.push(a),r.push(n),s.push(i),l.push(a),l.push(n),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function addWeekYearFormatToken(e,t){addFormatToken(0,[e,e.length],0,t)}function getSetWeekYear(e){return getSetWeekYearHelper.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(e){return getSetWeekYearHelper.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getISOWeeksInISOWeekYear(){return weeksInYear(this.isoWeekYear(),1,4)}function getWeeksInYear(){var e=this.localeData()._week;return weeksInYear(this.year(),e.dow,e.doy)}function getWeeksInWeekYear(){var e=this.localeData()._week;return weeksInYear(this.weekYear(),e.dow,e.doy)}function getSetWeekYearHelper(e,t,a,n,i){var r;return null==e?weekOfYear(this,n,i).year:(t>(r=weeksInYear(e,n,i))&&(t=r),setWeekAll.call(this,e,t,a,n,i))}function setWeekAll(e,t,a,n,i){var r=dayOfYearFromWeeks(e,t,a,n,i),o=createUTCDate(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function getSetQuarter(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}addFormatToken("N",0,0,"eraAbbr"),addFormatToken("NN",0,0,"eraAbbr"),addFormatToken("NNN",0,0,"eraAbbr"),addFormatToken("NNNN",0,0,"eraName"),addFormatToken("NNNNN",0,0,"eraNarrow"),addFormatToken("y",["y",1],"yo","eraYear"),addFormatToken("y",["yy",2],0,"eraYear"),addFormatToken("y",["yyy",3],0,"eraYear"),addFormatToken("y",["yyyy",4],0,"eraYear"),addRegexToken("N",matchEraAbbr),addRegexToken("NN",matchEraAbbr),addRegexToken("NNN",matchEraAbbr),addRegexToken("NNNN",matchEraName),addRegexToken("NNNNN",matchEraNarrow),addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(e,t,a,n){var i=a._locale.erasParse(e,n,a._strict);i?getParsingFlags(a).era=i:getParsingFlags(a).invalidEra=e}),addRegexToken("y",C),addRegexToken("yy",C),addRegexToken("yyy",C),addRegexToken("yyyy",C),addRegexToken("yo",matchEraYearOrdinal),addParseToken(["y","yy","yyy","yyyy"],z),addParseToken(["yo"],function(e,t,a,n){var i;a._locale._eraYearOrdinalRegex&&(i=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?t[z]=a._locale.eraYearOrdinalParse(e,i):t[z]=parseInt(e,10)}),addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100}),addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100}),addWeekYearFormatToken("gggg","weekYear"),addWeekYearFormatToken("ggggg","weekYear"),addWeekYearFormatToken("GGGG","isoWeekYear"),addWeekYearFormatToken("GGGGG","isoWeekYear"),addRegexToken("G",M),addRegexToken("g",M),addRegexToken("GG",T,b),addRegexToken("gg",T,b),addRegexToken("GGGG",F,_),addRegexToken("gggg",F,_),addRegexToken("GGGGG",j,S),addRegexToken("ggggg",j,S),addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(e,t,a,n){t[n.substr(0,2)]=toInt(e)}),addWeekParseToken(["gg","GG"],function(e,t,a,n){t[n]=hooks.parseTwoDigitYear(e)}),addFormatToken("Q",0,"Qo","quarter"),addRegexToken("Q",k),addParseToken("Q",function(e,t){t[N]=3*(toInt(e)-1)}),addFormatToken("D",["DD",2],"Do","date"),addRegexToken("D",T,A),addRegexToken("DD",T,b),addRegexToken("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),addParseToken(["D","DD"],U),addParseToken("Do",function(e,t){t[U]=toInt(e.match(T)[0])});var Ie=makeGetSet("Date",!0);function getSetDayOfYear(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear"),addRegexToken("DDD",P),addRegexToken("DDDD",w),addParseToken(["DDD","DDDD"],function(e,t,a){a._dayOfYear=toInt(e)}),addFormatToken("m",["mm",2],0,"minute"),addRegexToken("m",T,L),addRegexToken("mm",T,b),addParseToken(["m","mm"],G);var Ae=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second"),addRegexToken("s",T,L),addRegexToken("ss",T,b),addParseToken(["s","ss"],q);var Le,We,ze=makeGetSet("Seconds",!1);for(addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)}),addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),addFormatToken(0,["SSS",3],0,"millisecond"),addFormatToken(0,["SSSS",4],0,function(){return 10*this.millisecond()}),addFormatToken(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),addFormatToken(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),addFormatToken(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),addFormatToken(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),addFormatToken(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),addRegexToken("S",P,k),addRegexToken("SS",P,b),addRegexToken("SSS",P,w),Le="SSSS";Le.length<=9;Le+="S")addRegexToken(Le,C);function parseMs(e,t){t[V]=toInt(1e3*("0."+e))}for(Le="S";Le.length<=9;Le+="S")addParseToken(Le,parseMs);function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}We=makeGetSet("Milliseconds",!1),addFormatToken("z",0,0,"zoneAbbr"),addFormatToken("zz",0,0,"zoneName");var Ne=Moment.prototype;function createUnix(e){return createLocal(1e3*e)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(e){return e}Ne.add=Fe,Ne.calendar=calendar$1,Ne.clone=clone,Ne.diff=diff,Ne.endOf=endOf,Ne.format=format,Ne.from=from,Ne.fromNow=fromNow,Ne.to=to,Ne.toNow=toNow,Ne.get=stringGet,Ne.invalidAt=invalidAt,Ne.isAfter=isAfter,Ne.isBefore=isBefore,Ne.isBetween=isBetween,Ne.isSame=isSame,Ne.isSameOrAfter=isSameOrAfter,Ne.isSameOrBefore=isSameOrBefore,Ne.isValid=isValid$2,Ne.lang=Ce,Ne.locale=locale,Ne.localeData=localeData,Ne.max=Se,Ne.min=_e,Ne.parsingFlags=parsingFlags,Ne.set=stringSet,Ne.startOf=startOf,Ne.subtract=je,Ne.toArray=toArray,Ne.toObject=toObject,Ne.toDate=toDate,Ne.toISOString=toISOString,Ne.inspect=inspect,"undefined"!=typeof Symbol&&null!=Symbol.for&&(Ne[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ne.toJSON=toJSON,Ne.toString=toString,Ne.unix=unix,Ne.valueOf=valueOf,Ne.creationData=creationData,Ne.eraName=getEraName,Ne.eraNarrow=getEraNarrow,Ne.eraAbbr=getEraAbbr,Ne.eraYear=getEraYear,Ne.year=K,Ne.isLeapYear=getIsLeapYear,Ne.weekYear=getSetWeekYear,Ne.isoWeekYear=getSetISOWeekYear,Ne.quarter=Ne.quarters=getSetQuarter,Ne.month=getSetMonth,Ne.daysInMonth=getDaysInMonth,Ne.week=Ne.weeks=getSetWeek,Ne.isoWeek=Ne.isoWeeks=getSetISOWeek,Ne.weeksInYear=getWeeksInYear,Ne.weeksInWeekYear=getWeeksInWeekYear,Ne.isoWeeksInYear=getISOWeeksInYear,Ne.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear,Ne.date=Ie,Ne.day=Ne.days=getSetDayOfWeek,Ne.weekday=getSetLocaleDayOfWeek,Ne.isoWeekday=getSetISODayOfWeek,Ne.dayOfYear=getSetDayOfYear,Ne.hour=Ne.hours=de,Ne.minute=Ne.minutes=Ae,Ne.second=Ne.seconds=ze,Ne.millisecond=Ne.milliseconds=We,Ne.utcOffset=getSetOffset,Ne.utc=setOffsetToUTC,Ne.local=setOffsetToLocal,Ne.parseZone=setOffsetToParsedOffset,Ne.hasAlignedHourOffset=hasAlignedHourOffset,Ne.isDST=isDaylightSavingTime,Ne.isLocal=isLocal,Ne.isUtcOffset=isUtcOffset,Ne.isUtc=isUtc,Ne.isUTC=isUtc,Ne.zoneAbbr=getZoneAbbr,Ne.zoneName=getZoneName,Ne.dates=deprecate("dates accessor is deprecated. Use date instead.",Ie),Ne.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth),Ne.years=deprecate("years accessor is deprecated. Use year instead",K),Ne.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone),Ne.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);var Ue=Locale.prototype;function get$1(e,t,a,n){var i=getLocale(),r=createUTC().set(n,t);return i[a](r,e)}function listMonthsImpl(e,t,a){if(isNumber(e)&&(t=e,e=void 0),e=e||"",null!=t)return get$1(e,t,a,"month");var n,i=[];for(n=0;n<12;n++)i[n]=get$1(e,n,a,"month");return i}function listWeekdaysImpl(e,t,a,n){"boolean"==typeof e?(isNumber(t)&&(a=t,t=void 0),t=t||""):(a=t=e,e=!1,isNumber(t)&&(a=t,t=void 0),t=t||"");var i,r=getLocale(),o=e?r._week.dow:0,s=[];if(null!=a)return get$1(t,(a+o)%7,n,"day");for(i=0;i<7;i++)s[i]=get$1(t,(i+o)%7,n,"day");return s}function listMonths(e,t){return listMonthsImpl(e,t,"months")}function listMonthsShort(e,t){return listMonthsImpl(e,t,"monthsShort")}function listWeekdays(e,t,a){return listWeekdaysImpl(e,t,a,"weekdays")}function listWeekdaysShort(e,t,a){return listWeekdaysImpl(e,t,a,"weekdaysShort")}function listWeekdaysMin(e,t,a){return listWeekdaysImpl(e,t,a,"weekdaysMin")}Ue.calendar=calendar,Ue.longDateFormat=longDateFormat,Ue.invalidDate=invalidDate,Ue.ordinal=ordinal,Ue.preparse=preParsePostFormat,Ue.postformat=preParsePostFormat,Ue.relativeTime=relativeTime,Ue.pastFuture=pastFuture,Ue.set=set,Ue.eras=localeEras,Ue.erasParse=localeErasParse,Ue.erasConvertYear=localeErasConvertYear,Ue.erasAbbrRegex=erasAbbrRegex,Ue.erasNameRegex=erasNameRegex,Ue.erasNarrowRegex=erasNarrowRegex,Ue.months=localeMonths,Ue.monthsShort=localeMonthsShort,Ue.monthsParse=localeMonthsParse,Ue.monthsRegex=monthsRegex,Ue.monthsShortRegex=monthsShortRegex,Ue.week=localeWeek,Ue.firstDayOfYear=localeFirstDayOfYear,Ue.firstDayOfWeek=localeFirstDayOfWeek,Ue.weekdays=localeWeekdays,Ue.weekdaysMin=localeWeekdaysMin,Ue.weekdaysShort=localeWeekdaysShort,Ue.weekdaysParse=localeWeekdaysParse,Ue.weekdaysRegex=weekdaysRegex,Ue.weekdaysShortRegex=weekdaysShortRegex,Ue.weekdaysMinRegex=weekdaysMinRegex,Ue.isPM=localeIsPM,Ue.meridiem=localeMeridiem,getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===toInt(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale),hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var He=Math.abs;function abs(){var e=this._data;return this._milliseconds=He(this._milliseconds),this._days=He(this._days),this._months=He(this._months),e.milliseconds=He(e.milliseconds),e.seconds=He(e.seconds),e.minutes=He(e.minutes),e.hours=He(e.hours),e.months=He(e.months),e.years=He(e.years),this}function addSubtract$1(e,t,a,n){var i=createDuration(t,a);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function add$1(e,t){return addSubtract$1(this,e,t,1)}function subtract$1(e,t){return addSubtract$1(this,e,t,-1)}function absCeil(e){return e<0?Math.floor(e):Math.ceil(e)}function bubble(){var e,t,a,n,i,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*absCeil(monthsToDays(s)+o),o=0,s=0),l.milliseconds=r%1e3,e=absFloor(r/1e3),l.seconds=e%60,t=absFloor(e/60),l.minutes=t%60,a=absFloor(t/60),l.hours=a%24,o+=absFloor(a/24),s+=i=absFloor(daysToMonths(o)),o-=absCeil(monthsToDays(i)),n=absFloor(s/12),s%=12,l.days=o,l.months=s,l.years=n,this}function daysToMonths(e){return 4800*e/146097}function monthsToDays(e){return 146097*e/4800}function as(e){if(!this.isValid())return NaN;var t,a,n=this._milliseconds;if("month"===(e=normalizeUnits(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,a=this._months+daysToMonths(t),e){case"month":return a;case"quarter":return a/3;case"year":return a/12}else switch(t=this._days+Math.round(monthsToDays(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function makeAs(e){return function(){return this.as(e)}}var Ge=makeAs("ms"),qe=makeAs("s"),Ve=makeAs("m"),$e=makeAs("h"),Be=makeAs("d"),Ze=makeAs("w"),Ke=makeAs("M"),Je=makeAs("Q"),Qe=makeAs("y"),Xe=Ge;function clone$1(){return createDuration(this)}function get$2(e){return e=normalizeUnits(e),this.isValid()?this[e+"s"]():NaN}function makeGetter(e){return function(){return this.isValid()?this._data[e]:NaN}}var et=makeGetter("milliseconds"),tt=makeGetter("seconds"),at=makeGetter("minutes"),nt=makeGetter("hours"),it=makeGetter("days"),rt=makeGetter("months"),ot=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var st=Math.round,lt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(e,t,a,n,i){return i.relativeTime(t||1,!!a,e,n)}function relativeTime$1(e,t,a,n){var i=createDuration(e).abs(),r=st(i.as("s")),o=st(i.as("m")),s=st(i.as("h")),l=st(i.as("d")),c=st(i.as("M")),d=st(i.as("w")),p=st(i.as("y")),u=r<=a.ss&&["s",r]||r<a.s&&["ss",r]||o<=1&&["m"]||o<a.m&&["mm",o]||s<=1&&["h"]||s<a.h&&["hh",s]||l<=1&&["d"]||l<a.d&&["dd",l];return null!=a.w&&(u=u||d<=1&&["w"]||d<a.w&&["ww",d]),(u=u||c<=1&&["M"]||c<a.M&&["MM",c]||p<=1&&["y"]||["yy",p])[2]=t,u[3]=+e>0,u[4]=n,substituteTimeAgo.apply(null,u)}function getSetRelativeTimeRounding(e){return void 0===e?st:"function"==typeof e&&(st=e,!0)}function getSetRelativeTimeThreshold(e,t){return void 0!==lt[e]&&(void 0===t?lt[e]:(lt[e]=t,"s"===e&&(lt.ss=t-1),!0))}function humanize(e,t){if(!this.isValid())return this.localeData().invalidDate();var a,n,i=!1,r=lt;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(r=Object.assign({},lt,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),n=relativeTime$1(this,!i,r,a=this.localeData()),i&&(n=a.pastFuture(+this,n)),a.postformat(n)}var ct=Math.abs;function sign(e){return(e>0)-(e<0)||+e}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var e,t,a,n,i,r,o,s,l=ct(this._milliseconds)/1e3,c=ct(this._days),d=ct(this._months),p=this.asSeconds();return p?(e=absFloor(l/60),t=absFloor(e/60),l%=60,e%=60,a=absFloor(d/12),d%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=p<0?"-":"",r=sign(this._months)!==sign(p)?"-":"",o=sign(this._days)!==sign(p)?"-":"",s=sign(this._milliseconds)!==sign(p)?"-":"",i+"P"+(a?r+a+"Y":"")+(d?r+d+"M":"")+(c?o+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+n+"S":"")):"P0D"}var dt=Duration.prototype;return dt.isValid=isValid$1,dt.abs=abs,dt.add=add$1,dt.subtract=subtract$1,dt.as=as,dt.asMilliseconds=Ge,dt.asSeconds=qe,dt.asMinutes=Ve,dt.asHours=$e,dt.asDays=Be,dt.asWeeks=Ze,dt.asMonths=Ke,dt.asQuarters=Je,dt.asYears=Qe,dt.valueOf=Xe,dt._bubble=bubble,dt.clone=clone$1,dt.get=get$2,dt.milliseconds=et,dt.seconds=tt,dt.minutes=at,dt.hours=nt,dt.days=it,dt.weeks=weeks,dt.months=rt,dt.years=ot,dt.humanize=humanize,dt.toISOString=toISOString$1,dt.toString=toISOString$1,dt.toJSON=toISOString$1,dt.locale=locale,dt.localeData=localeData,dt.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1),dt.lang=Ce,addFormatToken("X",0,0,"unix"),addFormatToken("x",0,0,"valueOf"),addRegexToken("x",M),addRegexToken("X",R),addParseToken("X",function(e,t,a){a._d=new Date(1e3*parseFloat(e))}),addParseToken("x",function(e,t,a){a._d=new Date(toInt(e))}),
1
+ import e,{useState as t,useRef as a,useEffect as n,useMemo as i,useReducer as r,useCallback as o,forwardRef as s,useImperativeHandle as l,Fragment as c}from"react";import d from"@mui/material/Button";import{jsx as p,jsxs as u,Fragment as m}from"react/jsx-runtime";import f from"@mui/material/Tooltip";import h from"@mui/material/SvgIcon";import g from"@mui/material/Box";import v from"@mui/material/CircularProgress";import x from"@mui/material/Typography";import y from"@mui/material/Link";import k from"@mui/material/TextField";import b from"@mui/material/InputLabel";import w from"@mui/material/Card";import _ from"@mui/icons-material/Error";import S from"@mui/material/FormControlLabel";import T from"@mui/material/Checkbox";import D from"@mui/material/InputAdornment";import{useSnackbar as O}from"notistack";import{Paper as P,IconButton as F,Typography as j}from"@mui/material";import C from"@mui/material/Grid";import{Link as M,useLocation as E,useParams as Y,useNavigate as R}from"react-router-dom";import I from"@mui/material/List";import A from"@mui/material/ListItem";import L from"@mui/material/Switch";import W from"@mui/material/IconButton";import z from"@mui/material/Snackbar";import N from"@mui/icons-material/Close";import{DatePicker as U}from"@mui/x-date-pickers/DatePicker";import{DateTimePicker as H}from"@mui/x-date-pickers/DateTimePicker";import G from"@mui/material/Tabs";import q from"@mui/material/Tab";import V from"@mui/material/AppBar";import $ from"@mui/material/ClickAwayListener";import B from"@mui/material/Menu";import Z from"@mui/material/MenuItem";import K from"@mui/material/Toolbar";import J from"@mui/material/Badge";import Q from"@mui/icons-material/AccountCircle";import X from"@mui/icons-material/Search";import ee from"@mui/icons-material/Notifications";import te from"@mui/material/Paper";import{createTheme as ae,styled as ne}from"@mui/material/styles";import ie from"@mui/material/ListItemText";import re from"@mui/icons-material/Delete";import oe from"@mui/material/Divider";import{PickersDay as se}from"@mui/x-date-pickers/PickersDay";import le from"react-is";import ce from"@mui/material/Chip";import de from"@mui/material/Accordion";import pe from"@mui/material/AccordionSummary";import ue from"@mui/material/AccordionDetails";import me from"@mui/icons-material/ExpandMore";import fe from"@mui/material/Dialog";import he from"@mui/material/Stack";import ge from"@mui/icons-material/ArrowRight";import ve from"@mui/icons-material/ArrowLeft";import xe from"@mui/material/DialogTitle";import ye from"@mui/material/DialogContent";import ke from"@mui/material/DialogActions";import be from"@mui/icons-material/EditOff";import we from"@mui/icons-material/ModeEdit";import{DataGrid as _e,gridClasses as Se}from"@mui/x-data-grid";import{useAuth as Te,hasAuthParams as De}from"react-oidc-context";function BackButton(e){let{backClick:t,text:a=null}=e;return p("div",{style:{float:"left"},children:p(d,{id:"back-button",onClick:t,children:a||"Back"})})}function _defineProperty$2(e,t,a){return(t=function _toPropertyKey(e){var t=function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ownKeys$2(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)}return a}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$2(Object(a),!0).forEach(function(t){_defineProperty$2(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ownKeys$2(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function Loading(){return p(g,{sx:{textAlign:"center",margin:e=>e.spacing(4),height:"40px"},children:p(v,{})})}function ExportButton(e){let{href:a,accept:n="text/csv",fileName:i="export.csv",buttonText:r="EXPORT",tooltipText:o="Download report as CSV file",disabled:s=!1,accessToken:l=null}=e;const[c,m]=t(!1),[g,v]=t(!1);let x={Accept:n};l&&(x=_objectSpread2(_objectSpread2({},x),{},{Authorization:"Bearer ".concat(l)}));return p("div",{style:{float:"right"},children:p(f,{title:o,placement:"top-end",children:c?p(Loading,{}):u(d,{variant:"outlined",disabled:s,color:g?"secondary":"primary",onClick:()=>{m(!0),v(!1),fetch(a,{headers:new Headers(x)}).then(e=>{if(!e.ok)throw new Error("Network response was not OK");return e.blob()}).then(e=>{const t=window.URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.download=i,document.body.appendChild(a),a.click(),a.remove()}).then(()=>m(!1)).catch(()=>{v(!0),m(!1),alert("Download failed")})},children:[g?"Retry":r,p(h,{children:p("path",{xmlns:"http://www.w3.org/2000/svg",d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"})})]})})})}function Breadcrumbs(e){let{navigate:t,rootPathLength:a=2,homeUrl:n="https://app.linn.co.uk",location:i}=e,r=i.pathname;r.endsWith("/")&&(r=r.substring(0,r.length-1));const o=r.split("/").filter(e=>"report"!==e).reduce((e,n,i,r)=>{const o=r.slice(0,i+1).join("/")||"/";return n?[...e,{key:i,caption:n,href:o,onClick:e=>{r.length>a&&(e.preventDefault(),t(o))}}]:e},[]);return u("span",{style:{marginLeft:"20px"},children:[p(y,{href:n,variant:"button",sx:{"&:hover":{cursor:"pointer"}},children:"HOME"},"home"),u(m,{children:[" "," / "," "]}),o.map((e,t)=>t<o.length-1?u("span",{children:[p(y,{href:e.href,variant:"button",sx:{"&:hover":{cursor:"pointer"}},onClick:e.onClick,children:e.caption},e.href),u(m,{children:[" "," / "," "]})]},t):p(x,{display:"inline",variant:"button",children:e.caption},t))]})}function SaveBackCancelButtons(e){let{saveClick:t,cancelClick:a,saveDisabled:n=!1,backClick:i,showBackButton:r=!0}=e;return u(g,{sx:{float:"right"},children:[(!n||r)&&p(d,{id:"cancel-button",onClick:()=>{n?i():a()},variant:"outlined",sx:{marginRight:e=>e.spacing(1)},children:n?"Back":"Cancel"}),p(d,{id:"save-button",variant:"contained",color:"primary",onClick:()=>t(),disabled:n,children:"Save"})]})}const hasValue$1=e=>e||0===e,hasDisplayText=e=>e.some(e=>e.displayText||""===e.displayText),getOptions=function(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])return["loading..."];const a=e?[...e]:[];return t&&(hasDisplayText(e)?a.push({id:"",displayText:""}):a.push("")),a};function Dropdown(e){let{onChange:t,optionsLoading:a=!1,propertyName:n,required:i=!1,disabled:r=!1,label:o="",items:s=[],allowNoValue:l=!0,value:c="",helperText:d="",fullWidth:f=!1,adornment:h="",type:g="text",error:v=!1,margin:x="dense",autoFocus:y=!1}=e;const w=((e,t)=>{if(!e)return e;const a=e.filter(e=>"Y"!==e.hideFromEdit),n=e.find(e=>(void 0!==e.id?e.id:e)===t);return n&&"Y"===n.hideFromEdit?[n,...a]:a})(s,c);return u(m,{children:[p(b,{sx:{fontSize:e=>e.typography.fontSize,color:v?e=>e.palette.error.main:"inherit","& .MuiInputLabel-asterisk":{color:e=>e.palette.error.main}},required:i,error:v,htmlFor:n,children:o}),p(k,{sx:{paddingTop:0,marginTop:e=>e.spacing(1)},autoFocus:y,error:v,id:n,type:g,select:!0,adornment:h,disabled:r,fullWidth:f,value:(_=c,hasValue$1(_)?_:""),onChange:e=>(e=>{const a=e.target.value;let i;i="number"===g?hasValue$1(a)?parseFloat(a):null:hasValue$1(a)?a:"",t(n,i)})(e),SelectProps:{native:!0},size:"small",helperText:d,margin:x,variant:"outlined",required:i,FormHelperTextProps:{sx:{color:v?e=>e.palette.error.main:"inherit","&.Mui-required":{color:e=>e.palette.error.main}}},children:hasDisplayText(w)?getOptions(w,l,a).map(e=>p("option",{value:e.id,children:e.displayText},e.id)):getOptions(w,l,a).map(e=>p("option",{value:e,children:e},e))})]});var _}function ErrorCard(e){let{errorMessage:t,detailLines:a=[]}=e;return u(w,{sx:{width:"50%",margin:"0 auto",padding:e=>e.spacing(2),backgroundColor:e=>e.palette.error.light},children:[p(_,{sx:{color:e=>e.palette.error.dark,float:"right"}}),p(x,{align:"center",children:t}),p("div",{children:null==a?void 0:a.map(e=>p(x,{align:"center",children:"".concat(e.descriptor," - ").concat(e.message)},e.descriptor))})]})}const CheckboxWithLabel=e=>{let{checked:t=!1,color:a="primary",label:n="",onChange:i,sx:r={}}=e;return p(S,{label:n,sx:_objectSpread2({width:"100%",fontSize:14},r),control:p(T,{checked:t,onChange:i,color:a})})},hasValue=e=>e||0===e;function InputField(e){let{onChange:i=null,propertyName:r,type:o="text",adornment:s="",disabled:l=!1,error:c=!1,fullWidth:d=!1,helperText:f="",label:h="",margin:g="dense",maxLength:v=null,rows:x=null,name:y="",placeholder:w="",required:_=!1,value:S="",decimalPlaces:T=null,textFieldProps:O=null,autoFocus:P=!1,onErrorStateChange:F=null,visible:j=!0,autoComplete:C="off"}=e;const M=a(null),[E,Y]=t(!1),[R,I]=t("");n(()=>{setTimeout(()=>{P&&M.current&&j&&M.current.focus()},100)},[P,j]),n(()=>{Y(c)},[c]);return u(m,{children:[p(b,{sx:{fontSize:e=>e.typography.fontSize,color:E?e=>e.palette.error.main:"inherit","& .MuiInputLabel-asterisk":{color:e=>e.palette.error.main}},required:_,error:E,htmlFor:r,children:h}),p(k,_objectSpread2({sx:{paddingTop:0,marginTop:e=>e.spacing(1)},disabled:l,error:E,fullWidth:d,helperText:E?R:f,margin:g,multiline:x>0,name:y,id:r,placeholder:w,required:_,size:"small",rows:x,inputRef:M,onWheel:()=>{"number"===o&&M.current.blur()},type:o,autoComplete:C,value:(A=S,hasValue(A)?A:""),onChange:e=>(e=>{const t=e.target.value;let a=t;"number"===o?(a=hasValue(t)?parseFloat(t):null,a&&T&&t.indexOf(".")<t.length-T&&-1!==t.indexOf(".")&&(a=parseFloat(t.slice(0,t.indexOf(".")+T+1)))):v&&(null==t?void 0:t.length)>v?(Y(!0),I("MAX LENGTH (".concat(v,") EXCEEDED")),F&&F(!0)):v&&(null==t?void 0:t.length)<=v&&(Y(!1),F&&F(!1),I("")),i(r,a)})(e),InputProps:{startAdornment:s?p(D,{position:"start",children:s}):null},FormHelperTextProps:{sx:{color:E?e=>e.palette.error.main:e=>e.palette.text.primary}},onInput:e=>{"number"===o&&v&&(e.target.value=e.target.value.slice(0,v))},variant:"outlined"},O))]});var A}function LinkButton(e){let{to:t,external:a=!1,newTab:n=!1,tooltip:i=null,text:r,disabled:o=!1}=e;const s=p(d,{color:"primary","aria-label":"Search",variant:"outlined",sx:{marginLeft:1,marginTop:3},disabled:o,children:r}),l=i?p(f,{title:i,children:p("div",{children:s})}):s;return o?l:p("div",{children:a?p("a",{href:t,target:n?"_blank":"_self",rel:"noreferrer",style:{textDecoration:"none"},children:l}):p(y,{to:t,style:{textDecoration:"none"},children:l})})}const Oe={xs:4,s:6,m:8,l:10,xl:12},Pe={xs:4,s:3,m:2,l:1,xl:0};function Page(e){let{children:t,navigate:a=null,location:i=null,width:r="l",requestErrors:o=[],showRequestErrors:s=!1,homeUrl:l=null,showBreadcrumbs:c=!0,title:d=null,defaultAppTitle:m=null}=e;const{enqueueSnackbar:f}=O();return n(()=>{o&&s&&o.forEach(e=>{f("".concat(e.message," - ").concat(e.type),{variant:"error",preventDuplicate:!0})})},[o,f,s]),n(()=>(d&&(document.title=d),()=>{m&&(document.title=m)}),[d,m]),u(C,{container:!0,spacing:3,children:[p(C,{size:12,children:c&&p(Breadcrumbs,{navigate:a,homeUrl:l,location:i})}),p(C,{size:Pe[r]}),p(C,{size:Oe[r],children:p(P,{sx:{padding:4},square:!0,children:t})}),p(C,{size:Pe[r]})]})}const getListItemText=(e,t,a)=>a?"".concat(e[t]," - ").concat(e[a]):e[t];function EntityList(e){let{title:t="",entityList:a,entityId:n,descriptionFieldName:i=null,hasExternalLinks:r=!1}=e;const o=r?"a":M;return u(m,{children:[p(x,{variant:"h4",children:t}),p(I,{children:a.map(e=>p(A,{button:!0,component:o,to:e.href,href:e.href,children:p(x,{color:"primary",variant:"subtitle2",children:getListItemText(e,n,i)})},e[n]))})]})}function CreateButton(e){let{createUrl:t,disabled:a=!1}=e;return p(M,{to:t,style:{textDecoration:"none"},children:p(d,{color:"primary",variant:"outlined",sx:{float:"right"},disabled:a,children:"Create"})})}function OnOffSwitch(e){let{onChange:t,propertyName:a,value:n=!1,label:i,disabled:r}=e;return p(S,{control:p(L,{checked:n,onChange:()=>{t(a,!n)},value:n,color:"primary",disabled:r}),label:i})}function SnackbarMessage(e){let{message:t,visible:a=!1,onClose:n,timeOut:i=3e3}=e;return p(z,{anchorOrigin:{vertical:"bottom",horizontal:"left"},ContentProps:{sx:{backgroundColor:e=>e.palette.primary.main}},open:a,autoHideDuration:i,onClose:()=>n(!1),message:t,action:p(W,{"aria-label":"Close",color:"inherit",onClick:()=>n(!1),size:"large",children:p(N,{})})})}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Fe,je={exports:{}};var Ce=function requireMoment(){return Fe||(Fe=1,(e=je).exports=function(){var t,a;function hooks(){return t.apply(null,arguments)}function setHookCallback(e){t=e}function isArray(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function isObject(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function hasOwnProp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function isObjectEmpty(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(hasOwnProp(e,t))return!1;return!0}function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function isDate(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function map(e,t){var a,n=[],i=e.length;for(a=0;a<i;++a)n.push(t(e[a],a));return n}function extend(e,t){for(var a in t)hasOwnProp(t,a)&&(e[a]=t[a]);return hasOwnProp(t,"toString")&&(e.toString=t.toString),hasOwnProp(t,"valueOf")&&(e.valueOf=t.valueOf),e}function createUTC(e,t,a,n){return createLocalOrUTC(e,t,a,n,!0).utc()}function defaultParsingFlags(){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 getParsingFlags(e){return null==e._pf&&(e._pf=defaultParsingFlags()),e._pf}function isValid(e){var t=null,n=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=getParsingFlags(e),n=a.call(t.parsedDateParts,function(e){return null!=e}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function createInvalid(e){var t=createUTC(NaN);return null!=e?extend(getParsingFlags(t),e):getParsingFlags(t).userInvalidated=!0,t}a=Array.prototype.some?Array.prototype.some:function(e){var t,a=Object(this),n=a.length>>>0;for(t=0;t<n;t++)if(t in a&&e.call(this,a[t],t,a))return!0;return!1};var n=hooks.momentProperties=[],i=!1;function copyConfig(e,t){var a,i,r,o=n.length;if(isUndefined(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),isUndefined(t._i)||(e._i=t._i),isUndefined(t._f)||(e._f=t._f),isUndefined(t._l)||(e._l=t._l),isUndefined(t._strict)||(e._strict=t._strict),isUndefined(t._tzm)||(e._tzm=t._tzm),isUndefined(t._isUTC)||(e._isUTC=t._isUTC),isUndefined(t._offset)||(e._offset=t._offset),isUndefined(t._pf)||(e._pf=getParsingFlags(t)),isUndefined(t._locale)||(e._locale=t._locale),o>0)for(a=0;a<o;a++)isUndefined(r=t[i=n[a]])||(e[i]=r);return e}function Moment(e){copyConfig(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===i&&(i=!0,hooks.updateOffset(this),i=!1)}function isMoment(e){return e instanceof Moment||null!=e&&null!=e._isAMomentObject}function warn(e){!1===hooks.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function deprecate(e,t){var a=!0;return extend(function(){if(null!=hooks.deprecationHandler&&hooks.deprecationHandler(null,e),a){var n,i,r,o=[],s=arguments.length;for(i=0;i<s;i++){if(n="","object"==typeof arguments[i]){for(r in n+="\n["+i+"] ",arguments[0])hasOwnProp(arguments[0],r)&&(n+=r+": "+arguments[0][r]+", ");n=n.slice(0,-2)}else n=arguments[i];o.push(n)}warn(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),a=!1}return t.apply(this,arguments)},t)}var r,o={};function deprecateSimple(e,t){null!=hooks.deprecationHandler&&hooks.deprecationHandler(e,t),o[e]||(warn(t),o[e]=!0)}function isFunction(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function set(e){var t,a;for(a in e)hasOwnProp(e,a)&&(isFunction(t=e[a])?this[a]=t:this["_"+a]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(e,t){var a,n=extend({},e);for(a in t)hasOwnProp(t,a)&&(isObject(e[a])&&isObject(t[a])?(n[a]={},extend(n[a],e[a]),extend(n[a],t[a])):null!=t[a]?n[a]=t[a]:delete n[a]);for(a in e)hasOwnProp(e,a)&&!hasOwnProp(t,a)&&isObject(e[a])&&(n[a]=extend({},n[a]));return n}function Locale(e){null!=e&&this.set(e)}hooks.suppressDeprecationWarnings=!1,hooks.deprecationHandler=null,r=Object.keys?Object.keys:function(e){var t,a=[];for(t in e)hasOwnProp(e,t)&&a.push(t);return a};var s={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar(e,t,a){var n=this._calendar[e]||this._calendar.sameElse;return isFunction(n)?n.call(t,a):n}function zeroFill(e,t,a){var n=""+Math.abs(e),i=t-n.length;return(e>=0?a?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var l=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,c=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,d={},p={};function addFormatToken(e,t,a,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(p[e]=i),t&&(p[t[0]]=function(){return zeroFill(i.apply(this,arguments),t[1],t[2])}),a&&(p[a]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function removeFormattingTokens(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function makeFormatFunction(e){var t,a,n=e.match(l);for(t=0,a=n.length;t<a;t++)p[n[t]]?n[t]=p[n[t]]:n[t]=removeFormattingTokens(n[t]);return function(t){var i,r="";for(i=0;i<a;i++)r+=isFunction(n[i])?n[i].call(t,e):n[i];return r}}function formatMoment(e,t){return e.isValid()?(t=expandFormat(t,e.localeData()),d[t]=d[t]||makeFormatFunction(t),d[t](e)):e.localeData().invalidDate()}function expandFormat(e,t){var a=5;function replaceLongDateFormatTokens(e){return t.longDateFormat(e)||e}for(c.lastIndex=0;a>=0&&c.test(e);)e=e.replace(c,replaceLongDateFormatTokens),c.lastIndex=0,a-=1;return e}var u={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 longDateFormat(e){var t=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return t||!a?t:(this._longDateFormat[e]=a.match(l).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}var m="Invalid date";function invalidDate(){return this._invalidDate}var f="%d",h=/\d{1,2}/;function ordinal(e){return this._ordinal.replace("%d",e)}var g={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 relativeTime(e,t,a,n){var i=this._relativeTime[a];return isFunction(i)?i(e,t,a,n):i.replace(/%d/i,e)}function pastFuture(e,t){var a=this._relativeTime[e>0?"future":"past"];return isFunction(a)?a(t):a.replace(/%s/i,t)}var v={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function normalizeUnits(e){return"string"==typeof e?v[e]||v[e.toLowerCase()]:void 0}function normalizeObjectUnits(e){var t,a,n={};for(a in e)hasOwnProp(e,a)&&(t=normalizeUnits(a))&&(n[t]=e[a]);return n}var x={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function getPrioritizedUnits(e){var t,a=[];for(t in e)hasOwnProp(e,t)&&a.push({unit:t,priority:x[t]});return a.sort(function(e,t){return e.priority-t.priority}),a}var y,k=/\d/,b=/\d\d/,w=/\d{3}/,_=/\d{4}/,S=/[+-]?\d{6}/,T=/\d\d?/,D=/\d\d\d\d?/,O=/\d\d\d\d\d\d?/,P=/\d{1,3}/,F=/\d{1,4}/,j=/[+-]?\d{1,6}/,C=/\d+/,M=/[+-]?\d+/,E=/Z|[+-]\d\d:?\d\d/gi,Y=/Z|[+-]\d\d(?::?\d\d)?/gi,R=/[+-]?\d+(\.\d{1,3})?/,I=/[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,A=/^[1-9]\d?/,L=/^([1-9]\d|\d)/;function addRegexToken(e,t,a){y[e]=isFunction(t)?t:function(e,n){return e&&a?a:t}}function getParseRegexForToken(e,t){return hasOwnProp(y,e)?y[e](t._strict,t._locale):new RegExp(unescapeFormat(e))}function unescapeFormat(e){return regexEscape(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,a,n,i){return t||a||n||i}))}function regexEscape(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function absFloor(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function toInt(e){var t=+e,a=0;return 0!==t&&isFinite(t)&&(a=absFloor(t)),a}y={};var W={};function addParseToken(e,t){var a,n,i=t;for("string"==typeof e&&(e=[e]),isNumber(t)&&(i=function(e,a){a[t]=toInt(e)}),n=e.length,a=0;a<n;a++)W[e[a]]=i}function addWeekParseToken(e,t){addParseToken(e,function(e,a,n,i){n._w=n._w||{},t(e,n._w,n,i)})}function addTimeToArrayFromToken(e,t,a){null!=t&&hasOwnProp(W,e)&&W[e](t,a._a,a,e)}function isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}var z=0,N=1,U=2,H=3,G=4,q=5,V=6,$=7,B=8;function daysInYear(e){return isLeapYear(e)?366:365}addFormatToken("Y",0,0,function(){var e=this.year();return e<=9999?zeroFill(e,4):"+"+e}),addFormatToken(0,["YY",2],0,function(){return this.year()%100}),addFormatToken(0,["YYYY",4],0,"year"),addFormatToken(0,["YYYYY",5],0,"year"),addFormatToken(0,["YYYYYY",6,!0],0,"year"),addRegexToken("Y",M),addRegexToken("YY",T,b),addRegexToken("YYYY",F,_),addRegexToken("YYYYY",j,S),addRegexToken("YYYYYY",j,S),addParseToken(["YYYYY","YYYYYY"],z),addParseToken("YYYY",function(e,t){t[z]=2===e.length?hooks.parseTwoDigitYear(e):toInt(e)}),addParseToken("YY",function(e,t){t[z]=hooks.parseTwoDigitYear(e)}),addParseToken("Y",function(e,t){t[z]=parseInt(e,10)}),hooks.parseTwoDigitYear=function(e){return toInt(e)+(toInt(e)>68?1900:2e3)};var Z,K=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(e,t){return function(a){return null!=a?(set$1(this,e,a),hooks.updateOffset(this,t),this):get(this,e)}}function get(e,t){if(!e.isValid())return NaN;var a=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?a.getUTCMilliseconds():a.getMilliseconds();case"Seconds":return n?a.getUTCSeconds():a.getSeconds();case"Minutes":return n?a.getUTCMinutes():a.getMinutes();case"Hours":return n?a.getUTCHours():a.getHours();case"Date":return n?a.getUTCDate():a.getDate();case"Day":return n?a.getUTCDay():a.getDay();case"Month":return n?a.getUTCMonth():a.getMonth();case"FullYear":return n?a.getUTCFullYear():a.getFullYear();default:return NaN}}function set$1(e,t,a){var n,i,r,o,s;if(e.isValid()&&!isNaN(a)){switch(n=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(a):n.setMilliseconds(a));case"Seconds":return void(i?n.setUTCSeconds(a):n.setSeconds(a));case"Minutes":return void(i?n.setUTCMinutes(a):n.setMinutes(a));case"Hours":return void(i?n.setUTCHours(a):n.setHours(a));case"Date":return void(i?n.setUTCDate(a):n.setDate(a));case"FullYear":break;default:return}r=a,o=e.month(),s=29!==(s=e.date())||1!==o||isLeapYear(r)?s:28,i?n.setUTCFullYear(r,o,s):n.setFullYear(r,o,s)}}function stringGet(e){return isFunction(this[e=normalizeUnits(e)])?this[e]():this}function stringSet(e,t){if("object"==typeof e){var a,n=getPrioritizedUnits(e=normalizeObjectUnits(e)),i=n.length;for(a=0;a<i;a++)this[n[a].unit](e[n[a].unit])}else if(isFunction(this[e=normalizeUnits(e)]))return this[e](t);return this}function mod(e,t){return(e%t+t)%t}function daysInMonth(e,t){if(isNaN(e)||isNaN(t))return NaN;var a=mod(t,12);return e+=(t-a)/12,1===a?isLeapYear(e)?29:28:31-a%7%2}Z=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1}),addFormatToken("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),addFormatToken("MMMM",0,0,function(e){return this.localeData().months(this,e)}),addRegexToken("M",T,A),addRegexToken("MM",T,b),addRegexToken("MMM",function(e,t){return t.monthsShortRegex(e)}),addRegexToken("MMMM",function(e,t){return t.monthsRegex(e)}),addParseToken(["M","MM"],function(e,t){t[N]=toInt(e)-1}),addParseToken(["MMM","MMMM"],function(e,t,a,n){var i=a._locale.monthsParse(e,n,a._strict);null!=i?t[N]=i:getParsingFlags(a).invalidMonth=e});var J="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Q="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),X=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ee=I,te=I;function localeMonths(e,t){return e?isArray(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||X).test(t)?"format":"standalone"][e.month()]:isArray(this._months)?this._months:this._months.standalone}function localeMonthsShort(e,t){return e?isArray(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[X.test(t)?"format":"standalone"][e.month()]:isArray(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(e,t,a){var n,i,r,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)r=createUTC([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(r,"").toLocaleLowerCase();return a?"MMM"===t?-1!==(i=Z.call(this._shortMonthsParse,o))?i:null:-1!==(i=Z.call(this._longMonthsParse,o))?i:null:"MMM"===t?-1!==(i=Z.call(this._shortMonthsParse,o))||-1!==(i=Z.call(this._longMonthsParse,o))?i:null:-1!==(i=Z.call(this._longMonthsParse,o))||-1!==(i=Z.call(this._shortMonthsParse,o))?i:null}function localeMonthsParse(e,t,a){var n,i,r;if(this._monthsParseExact)return handleStrictParse.call(this,e,t,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=createUTC([2e3,n]),a&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),a||this._monthsParse[n]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),a&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(a&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!a&&this._monthsParse[n].test(e))return n}}function setMonth(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=toInt(t);else if(!isNumber(t=e.localeData().monthsParse(t)))return e;var a=t,n=e.date();return n=n<29?n:Math.min(n,daysInMonth(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,n):e._d.setMonth(a,n),e}function getSetMonth(e){return null!=e?(setMonth(this,e),hooks.updateOffset(this,!0),this):get(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(e){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=ee),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(e){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),e?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=te),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function cmpLenRev(e,t){return t.length-e.length}var e,t,a,n,i=[],r=[],o=[];for(e=0;e<12;e++)t=createUTC([2e3,e]),a=regexEscape(this.monthsShort(t,"")),n=regexEscape(this.months(t,"")),i.push(a),r.push(n),o.push(n),o.push(a);i.sort(cmpLenRev),r.sort(cmpLenRev),o.sort(cmpLenRev),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function createDate(e,t,a,n,i,r,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,a,n,i,r,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,a,n,i,r,o),s}function createUTCDate(e){var t,a;return e<100&&e>=0?((a=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,a)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function firstWeekOffset(e,t,a){var n=7+t-a;return-(7+createUTCDate(e,0,n).getUTCDay()-t)%7+n-1}function dayOfYearFromWeeks(e,t,a,n,i){var r,o,s=1+7*(t-1)+(7+a-n)%7+firstWeekOffset(e,n,i);return s<=0?o=daysInYear(r=e-1)+s:s>daysInYear(e)?(r=e+1,o=s-daysInYear(e)):(r=e,o=s),{year:r,dayOfYear:o}}function weekOfYear(e,t,a){var n,i,r=firstWeekOffset(e.year(),t,a),o=Math.floor((e.dayOfYear()-r-1)/7)+1;return o<1?n=o+weeksInYear(i=e.year()-1,t,a):o>weeksInYear(e.year(),t,a)?(n=o-weeksInYear(e.year(),t,a),i=e.year()+1):(i=e.year(),n=o),{week:n,year:i}}function weeksInYear(e,t,a){var n=firstWeekOffset(e,t,a),i=firstWeekOffset(e+1,t,a);return(daysInYear(e)-n+i)/7}function localeWeek(e){return weekOfYear(e,this._week.dow,this._week.doy).week}addFormatToken("w",["ww",2],"wo","week"),addFormatToken("W",["WW",2],"Wo","isoWeek"),addRegexToken("w",T,A),addRegexToken("ww",T,b),addRegexToken("W",T,A),addRegexToken("WW",T,b),addWeekParseToken(["w","ww","W","WW"],function(e,t,a,n){t[n.substr(0,1)]=toInt(e)});var ae={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function getSetISOWeek(e){var t=weekOfYear(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function parseWeekday(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function parseIsoWeekday(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function shiftWeekdays(e,t){return e.slice(t,7).concat(e.slice(0,t))}addFormatToken("d",0,"do","day"),addFormatToken("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),addFormatToken("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),addFormatToken("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),addFormatToken("e",0,0,"weekday"),addFormatToken("E",0,0,"isoWeekday"),addRegexToken("d",T),addRegexToken("e",T),addRegexToken("E",T),addRegexToken("dd",function(e,t){return t.weekdaysMinRegex(e)}),addRegexToken("ddd",function(e,t){return t.weekdaysShortRegex(e)}),addRegexToken("dddd",function(e,t){return t.weekdaysRegex(e)}),addWeekParseToken(["dd","ddd","dddd"],function(e,t,a,n){var i=a._locale.weekdaysParse(e,n,a._strict);null!=i?t.d=i:getParsingFlags(a).invalidWeekday=e}),addWeekParseToken(["d","e","E"],function(e,t,a,n){t[n]=toInt(e)});var ne="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ie="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),re="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),oe=I,se=I,le=I;function localeWeekdays(e,t){var a=isArray(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?shiftWeekdays(a,this._week.dow):e?a[e.day()]:a}function localeWeekdaysShort(e){return!0===e?shiftWeekdays(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function localeWeekdaysMin(e){return!0===e?shiftWeekdays(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function handleStrictParse$1(e,t,a){var n,i,r,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=createUTC([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return a?"dddd"===t?-1!==(i=Z.call(this._weekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Z.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Z.call(this._minWeekdaysParse,o))?i:null:"dddd"===t?-1!==(i=Z.call(this._weekdaysParse,o))||-1!==(i=Z.call(this._shortWeekdaysParse,o))||-1!==(i=Z.call(this._minWeekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Z.call(this._shortWeekdaysParse,o))||-1!==(i=Z.call(this._weekdaysParse,o))||-1!==(i=Z.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Z.call(this._minWeekdaysParse,o))||-1!==(i=Z.call(this._weekdaysParse,o))||-1!==(i=Z.call(this._shortWeekdaysParse,o))?i:null}function localeWeekdaysParse(e,t,a){var n,i,r;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,e,t,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=createUTC([2e3,1]).day(n),a&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),a&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(a&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(a&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!a&&this._weekdaysParse[n].test(e))return n}}function getSetDayOfWeek(e){if(!this.isValid())return null!=e?this:NaN;var t=get(this,"Day");return null!=e?(e=parseWeekday(e,this.localeData()),this.add(e-t,"d")):t}function getSetLocaleDayOfWeek(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function getSetISODayOfWeek(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=parseIsoWeekday(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function weekdaysRegex(e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=oe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=se),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=le),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function cmpLenRev(e,t){return t.length-e.length}var e,t,a,n,i,r=[],o=[],s=[],l=[];for(e=0;e<7;e++)t=createUTC([2e3,1]).day(e),a=regexEscape(this.weekdaysMin(t,"")),n=regexEscape(this.weekdaysShort(t,"")),i=regexEscape(this.weekdays(t,"")),r.push(a),o.push(n),s.push(i),l.push(a),l.push(n),l.push(i);r.sort(cmpLenRev),o.sort(cmpLenRev),s.sort(cmpLenRev),l.sort(cmpLenRev),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}function meridiem(e,t){addFormatToken(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function matchMeridiem(e,t){return t._meridiemParse}function localeIsPM(e){return"p"===(e+"").toLowerCase().charAt(0)}addFormatToken("H",["HH",2],0,"hour"),addFormatToken("h",["hh",2],0,hFormat),addFormatToken("k",["kk",2],0,kFormat),addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)}),addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)}),addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),meridiem("a",!0),meridiem("A",!1),addRegexToken("a",matchMeridiem),addRegexToken("A",matchMeridiem),addRegexToken("H",T,L),addRegexToken("h",T,A),addRegexToken("k",T,A),addRegexToken("HH",T,b),addRegexToken("hh",T,b),addRegexToken("kk",T,b),addRegexToken("hmm",D),addRegexToken("hmmss",O),addRegexToken("Hmm",D),addRegexToken("Hmmss",O),addParseToken(["H","HH"],H),addParseToken(["k","kk"],function(e,t,a){var n=toInt(e);t[H]=24===n?0:n}),addParseToken(["a","A"],function(e,t,a){a._isPm=a._locale.isPM(e),a._meridiem=e}),addParseToken(["h","hh"],function(e,t,a){t[H]=toInt(e),getParsingFlags(a).bigHour=!0}),addParseToken("hmm",function(e,t,a){var n=e.length-2;t[H]=toInt(e.substr(0,n)),t[G]=toInt(e.substr(n)),getParsingFlags(a).bigHour=!0}),addParseToken("hmmss",function(e,t,a){var n=e.length-4,i=e.length-2;t[H]=toInt(e.substr(0,n)),t[G]=toInt(e.substr(n,2)),t[q]=toInt(e.substr(i)),getParsingFlags(a).bigHour=!0}),addParseToken("Hmm",function(e,t,a){var n=e.length-2;t[H]=toInt(e.substr(0,n)),t[G]=toInt(e.substr(n))}),addParseToken("Hmmss",function(e,t,a){var n=e.length-4,i=e.length-2;t[H]=toInt(e.substr(0,n)),t[G]=toInt(e.substr(n,2)),t[q]=toInt(e.substr(i))});var ce=/[ap]\.?m?\.?/i,de=makeGetSet("Hours",!0);function localeMeridiem(e,t,a){return e>11?a?"pm":"PM":a?"am":"AM"}var pe,ue={calendar:s,longDateFormat:u,invalidDate:m,ordinal:f,dayOfMonthOrdinalParse:h,relativeTime:g,months:J,monthsShort:Q,week:ae,weekdays:ne,weekdaysMin:re,weekdaysShort:ie,meridiemParse:ce},me={},fe={};function commonPrefix(e,t){var a,n=Math.min(e.length,t.length);for(a=0;a<n;a+=1)if(e[a]!==t[a])return a;return n}function normalizeLocale(e){return e?e.toLowerCase().replace("_","-"):e}function chooseLocale(e){for(var t,a,n,i,r=0;r<e.length;){for(t=(i=normalizeLocale(e[r]).split("-")).length,a=(a=normalizeLocale(e[r+1]))?a.split("-"):null;t>0;){if(n=loadLocale(i.slice(0,t).join("-")))return n;if(a&&a.length>=t&&commonPrefix(i,a)>=t-1)break;t--}r++}return pe}function isLocaleNameSane(e){return!(!e||!e.match("^[^/\\\\]*$"))}function loadLocale(t){var a=null;if(void 0===me[t]&&e&&e.exports&&isLocaleNameSane(t))try{a=pe._abbr,commonjsRequire("./locale/"+t),getSetGlobalLocale(a)}catch(e){me[t]=null}return me[t]}function getSetGlobalLocale(e,t){var a;return e&&((a=isUndefined(t)?getLocale(e):defineLocale(e,t))?pe=a:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),pe._abbr}function defineLocale(e,t){if(null!==t){var a,n=ue;if(t.abbr=e,null!=me[e])deprecateSimple("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."),n=me[e]._config;else if(null!=t.parentLocale)if(null!=me[t.parentLocale])n=me[t.parentLocale]._config;else{if(null==(a=loadLocale(t.parentLocale)))return fe[t.parentLocale]||(fe[t.parentLocale]=[]),fe[t.parentLocale].push({name:e,config:t}),null;n=a._config}return me[e]=new Locale(mergeConfigs(n,t)),fe[e]&&fe[e].forEach(function(e){defineLocale(e.name,e.config)}),getSetGlobalLocale(e),me[e]}return delete me[e],null}function updateLocale(e,t){if(null!=t){var a,n,i=ue;null!=me[e]&&null!=me[e].parentLocale?me[e].set(mergeConfigs(me[e]._config,t)):(null!=(n=loadLocale(e))&&(i=n._config),t=mergeConfigs(i,t),null==n&&(t.abbr=e),(a=new Locale(t)).parentLocale=me[e],me[e]=a),getSetGlobalLocale(e)}else null!=me[e]&&(null!=me[e].parentLocale?(me[e]=me[e].parentLocale,e===getSetGlobalLocale()&&getSetGlobalLocale(e)):null!=me[e]&&delete me[e]);return me[e]}function getLocale(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return pe;if(!isArray(e)){if(t=loadLocale(e))return t;e=[e]}return chooseLocale(e)}function listLocales(){return r(me)}function checkOverflow(e){var t,a=e._a;return a&&-2===getParsingFlags(e).overflow&&(t=a[N]<0||a[N]>11?N:a[U]<1||a[U]>daysInMonth(a[z],a[N])?U:a[H]<0||a[H]>24||24===a[H]&&(0!==a[G]||0!==a[q]||0!==a[V])?H:a[G]<0||a[G]>59?G:a[q]<0||a[q]>59?q:a[V]<0||a[V]>999?V:-1,getParsingFlags(e)._overflowDayOfYear&&(t<z||t>U)&&(t=U),getParsingFlags(e)._overflowWeeks&&-1===t&&(t=$),getParsingFlags(e)._overflowWeekday&&-1===t&&(t=B),getParsingFlags(e).overflow=t),e}var he=/^\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)?)?$/,ge=/^\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)?)?$/,ve=/Z|[+-]\d\d(?::?\d\d)?/,xe=[["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]],ye=[["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/]],ke=/^\/?Date\((-?\d+)/i,be=/^(?:(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}))$/,we={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function configFromISO(e){var t,a,n,i,r,o,s=e._i,l=he.exec(s)||ge.exec(s),c=xe.length,d=ye.length;if(l){for(getParsingFlags(e).iso=!0,t=0,a=c;t<a;t++)if(xe[t][1].exec(l[1])){i=xe[t][0],n=!1!==xe[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,a=d;t<a;t++)if(ye[t][1].exec(l[3])){r=(l[2]||" ")+ye[t][0];break}if(null==r)return void(e._isValid=!1)}if(!n&&null!=r)return void(e._isValid=!1);if(l[4]){if(!ve.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=i+(r||"")+(o||""),configFromStringAndFormat(e)}else e._isValid=!1}function extractFromRFC2822Strings(e,t,a,n,i,r){var o=[untruncateYear(e),Q.indexOf(t),parseInt(a,10),parseInt(n,10),parseInt(i,10)];return r&&o.push(parseInt(r,10)),o}function untruncateYear(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function preprocessRFC2822(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday(e,t,a){return!e||ie.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(getParsingFlags(a).weekdayMismatch=!0,a._isValid=!1,!1)}function calculateOffset(e,t,a){if(e)return we[e];if(t)return 0;var n=parseInt(a,10),i=n%100;return(n-i)/100*60+i}function configFromRFC2822(e){var t,a=be.exec(preprocessRFC2822(e._i));if(a){if(t=extractFromRFC2822Strings(a[4],a[3],a[2],a[5],a[6],a[7]),!checkWeekday(a[1],t,e))return;e._a=t,e._tzm=calculateOffset(a[8],a[9],a[10]),e._d=createUTCDate.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),getParsingFlags(e).rfc2822=!0}else e._isValid=!1}function configFromString(e){var t=ke.exec(e._i);null===t?(configFromISO(e),!1===e._isValid&&(delete e._isValid,configFromRFC2822(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:hooks.createFromInputFallback(e)))):e._d=new Date(+t[1])}function defaults(e,t,a){return null!=e?e:null!=t?t:a}function currentDateArray(e){var t=new Date(hooks.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function configFromArray(e){var t,a,n,i,r,o=[];if(!e._d){for(n=currentDateArray(e),e._w&&null==e._a[U]&&null==e._a[N]&&dayOfYearFromWeekInfo(e),null!=e._dayOfYear&&(r=defaults(e._a[z],n[z]),(e._dayOfYear>daysInYear(r)||0===e._dayOfYear)&&(getParsingFlags(e)._overflowDayOfYear=!0),a=createUTCDate(r,0,e._dayOfYear),e._a[N]=a.getUTCMonth(),e._a[U]=a.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=n[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[H]&&0===e._a[G]&&0===e._a[q]&&0===e._a[V]&&(e._nextDay=!0,e._a[H]=0),e._d=(e._useUTC?createUTCDate:createDate).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[H]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(getParsingFlags(e).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(e){var t,a,n,i,r,o,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,o=4,a=defaults(t.GG,e._a[z],weekOfYear(createLocal(),1,4).year),n=defaults(t.W,1),((i=defaults(t.E,1))<1||i>7)&&(l=!0)):(r=e._locale._week.dow,o=e._locale._week.doy,c=weekOfYear(createLocal(),r,o),a=defaults(t.gg,e._a[z],c.year),n=defaults(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(l=!0)):i=r),n<1||n>weeksInYear(a,r,o)?getParsingFlags(e)._overflowWeeks=!0:null!=l?getParsingFlags(e)._overflowWeekday=!0:(s=dayOfYearFromWeeks(a,n,i,r,o),e._a[z]=s.year,e._dayOfYear=s.dayOfYear)}function configFromStringAndFormat(e){if(e._f!==hooks.ISO_8601)if(e._f!==hooks.RFC_2822){e._a=[],getParsingFlags(e).empty=!0;var t,a,n,i,r,o,s,c=""+e._i,d=c.length,u=0;for(s=(n=expandFormat(e._f,e._locale).match(l)||[]).length,t=0;t<s;t++)i=n[t],(a=(c.match(getParseRegexForToken(i,e))||[])[0])&&((r=c.substr(0,c.indexOf(a))).length>0&&getParsingFlags(e).unusedInput.push(r),c=c.slice(c.indexOf(a)+a.length),u+=a.length),p[i]?(a?getParsingFlags(e).empty=!1:getParsingFlags(e).unusedTokens.push(i),addTimeToArrayFromToken(i,a,e)):e._strict&&!a&&getParsingFlags(e).unusedTokens.push(i);getParsingFlags(e).charsLeftOver=d-u,c.length>0&&getParsingFlags(e).unusedInput.push(c),e._a[H]<=12&&!0===getParsingFlags(e).bigHour&&e._a[H]>0&&(getParsingFlags(e).bigHour=void 0),getParsingFlags(e).parsedDateParts=e._a.slice(0),getParsingFlags(e).meridiem=e._meridiem,e._a[H]=meridiemFixWrap(e._locale,e._a[H],e._meridiem),null!==(o=getParsingFlags(e).era)&&(e._a[z]=e._locale.erasConvertYear(o,e._a[z])),configFromArray(e),checkOverflow(e)}else configFromRFC2822(e);else configFromISO(e)}function meridiemFixWrap(e,t,a){var n;return null==a?t:null!=e.meridiemHour?e.meridiemHour(t,a):null!=e.isPM?((n=e.isPM(a))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function configFromStringAndArray(e){var t,a,n,i,r,o,s=!1,l=e._f.length;if(0===l)return getParsingFlags(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)r=0,o=!1,t=copyConfig({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],configFromStringAndFormat(t),isValid(t)&&(o=!0),r+=getParsingFlags(t).charsLeftOver,r+=10*getParsingFlags(t).unusedTokens.length,getParsingFlags(t).score=r,s?r<n&&(n=r,a=t):(null==n||r<n||o)&&(n=r,a=t,o&&(s=!0));extend(e,a||t)}function configFromObject(e){if(!e._d){var t=normalizeObjectUnits(e._i),a=void 0===t.day?t.date:t.day;e._a=map([t.year,t.month,a,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),configFromArray(e)}}function createFromConfig(e){var t=new Moment(checkOverflow(prepareConfig(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function prepareConfig(e){var t=e._i,a=e._f;return e._locale=e._locale||getLocale(e._l),null===t||void 0===a&&""===t?createInvalid({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),isMoment(t)?new Moment(checkOverflow(t)):(isDate(t)?e._d=t:isArray(a)?configFromStringAndArray(e):a?configFromStringAndFormat(e):configFromInput(e),isValid(e)||(e._d=null),e))}function configFromInput(e){var t=e._i;isUndefined(t)?e._d=new Date(hooks.now()):isDate(t)?e._d=new Date(t.valueOf()):"string"==typeof t?configFromString(e):isArray(t)?(e._a=map(t.slice(0),function(e){return parseInt(e,10)}),configFromArray(e)):isObject(t)?configFromObject(e):isNumber(t)?e._d=new Date(t):hooks.createFromInputFallback(e)}function createLocalOrUTC(e,t,a,n,i){var r={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==a&&!1!==a||(n=a,a=void 0),(isObject(e)&&isObjectEmpty(e)||isArray(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=a,r._i=e,r._f=t,r._strict=n,createFromConfig(r)}function createLocal(e,t,a,n){return createLocalOrUTC(e,t,a,n,!1)}hooks.createFromInputFallback=deprecate("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":""))}),hooks.ISO_8601=function(){},hooks.RFC_2822=function(){};var _e=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=createLocal.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:createInvalid()}),Se=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=createLocal.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:createInvalid()});function pickBy(e,t){var a,n;if(1===t.length&&isArray(t[0])&&(t=t[0]),!t.length)return createLocal();for(a=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](a)||(a=t[n]);return a}function min(){return pickBy("isBefore",[].slice.call(arguments,0))}function max(){return pickBy("isAfter",[].slice.call(arguments,0))}var now=function(){return Date.now?Date.now():+new Date},Te=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid(e){var t,a,n=!1,i=Te.length;for(t in e)if(hasOwnProp(e,t)&&(-1===Z.call(Te,t)||null!=e[t]&&isNaN(e[t])))return!1;for(a=0;a<i;++a)if(e[Te[a]]){if(n)return!1;parseFloat(e[Te[a]])!==toInt(e[Te[a]])&&(n=!0)}return!0}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(e){var t=normalizeObjectUnits(e),a=t.year||0,n=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=isDurationValid(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*s*60*60,this._days=+o+7*r,this._months=+i+3*n+12*a,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(e){return e instanceof Duration}function absRound(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function compareArrays(e,t,a){var n,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),o=0;for(n=0;n<i;n++)toInt(e[n])!==toInt(t[n])&&o++;return o+r}function offset(e,t){addFormatToken(e,0,0,function(){var e=this.utcOffset(),a="+";return e<0&&(e=-e,a="-"),a+zeroFill(~~(e/60),2)+t+zeroFill(~~e%60,2)})}offset("Z",":"),offset("ZZ",""),addRegexToken("Z",Y),addRegexToken("ZZ",Y),addParseToken(["Z","ZZ"],function(e,t,a){a._useUTC=!0,a._tzm=offsetFromString(Y,e)});var De=/([\+\-]|\d\d)/gi;function offsetFromString(e,t){var a,n,i=(t||"").match(e);return null===i?null:0===(n=60*(a=((i[i.length-1]||[])+"").match(De)||["-",0,0])[1]+toInt(a[2]))?0:"+"===a[0]?n:-n}function cloneWithOffset(e,t){var a,n;return t._isUTC?(a=t.clone(),n=(isMoment(e)||isDate(e)?e.valueOf():createLocal(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+n),hooks.updateOffset(a,!1),a):createLocal(e).local()}function getDateOffset(e){return-Math.round(e._d.getTimezoneOffset())}function getSetOffset(e,t,a){var n,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=offsetFromString(Y,e)))return this}else Math.abs(e)<16&&!a&&(e*=60);return!this._isUTC&&t&&(n=getDateOffset(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),i!==e&&(!t||this._changeInProgress?addSubtract(this,createDuration(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:getDateOffset(this)}function getSetZone(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function setOffsetToUTC(e){return this.utcOffset(0,e)}function setOffsetToLocal(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=offsetFromString(E,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(e){return!!this.isValid()&&(e=e?createLocal(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var e,t={};return copyConfig(t,this),(t=prepareConfig(t))._a?(e=t._isUTC?createUTC(t._a):createLocal(t._a),this._isDSTShifted=this.isValid()&&compareArrays(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return!!this.isValid()&&!this._isUTC}function isUtcOffset(){return!!this.isValid()&&this._isUTC}function isUtc(){return!!this.isValid()&&this._isUTC&&0===this._offset}hooks.updateOffset=function(){};var Oe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Pe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(e,t){var a,n,i,r=e,o=null;return isDuration(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:isNumber(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(o=Oe.exec(e))?(a="-"===o[1]?-1:1,r={y:0,d:toInt(o[U])*a,h:toInt(o[H])*a,m:toInt(o[G])*a,s:toInt(o[q])*a,ms:toInt(absRound(1e3*o[V]))*a}):(o=Pe.exec(e))?(a="-"===o[1]?-1:1,r={y:parseIso(o[2],a),M:parseIso(o[3],a),w:parseIso(o[4],a),d:parseIso(o[5],a),h:parseIso(o[6],a),m:parseIso(o[7],a),s:parseIso(o[8],a)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=momentsDifference(createLocal(r.from),createLocal(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),n=new Duration(r),isDuration(e)&&hasOwnProp(e,"_locale")&&(n._locale=e._locale),isDuration(e)&&hasOwnProp(e,"_isValid")&&(n._isValid=e._isValid),n}function parseIso(e,t){var a=e&&parseFloat(e.replace(",","."));return(isNaN(a)?0:a)*t}function positiveMomentsDifference(e,t){var a={};return a.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(a.months,"M").isAfter(t)&&--a.months,a.milliseconds=+t-+e.clone().add(a.months,"M"),a}function momentsDifference(e,t){var a;return e.isValid()&&t.isValid()?(t=cloneWithOffset(t,e),e.isBefore(t)?a=positiveMomentsDifference(e,t):((a=positiveMomentsDifference(t,e)).milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function createAdder(e,t){return function(a,n){var i;return null===n||isNaN(+n)||(deprecateSimple(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=a,a=n,n=i),addSubtract(this,createDuration(a,n),e),this}}function addSubtract(e,t,a,n){var i=t._milliseconds,r=absRound(t._days),o=absRound(t._months);e.isValid()&&(n=null==n||n,o&&setMonth(e,get(e,"Month")+o*a),r&&set$1(e,"Date",get(e,"Date")+r*a),i&&e._d.setTime(e._d.valueOf()+i*a),n&&hooks.updateOffset(e,r||o))}createDuration.fn=Duration.prototype,createDuration.invalid=createInvalid$1;var Fe=createAdder(1,"add"),je=createAdder(-1,"subtract");function isString(e){return"string"==typeof e||e instanceof String}function isMomentInput(e){return isMoment(e)||isDate(e)||isString(e)||isNumber(e)||isNumberOrStringArray(e)||isMomentInputObject(e)||null==e}function isMomentInputObject(e){var t,a,n=isObject(e)&&!isObjectEmpty(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o=r.length;for(t=0;t<o;t+=1)a=r[t],i=i||hasOwnProp(e,a);return n&&i}function isNumberOrStringArray(e){var t=isArray(e),a=!1;return t&&(a=0===e.filter(function(t){return!isNumber(t)&&isString(e)}).length),t&&a}function isCalendarSpec(e){var t,a,n=isObject(e)&&!isObjectEmpty(e),i=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)a=r[t],i=i||hasOwnProp(e,a);return n&&i}function getCalendarFormat(e,t){var a=e.diff(t,"days",!0);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function calendar$1(e,t){1===arguments.length&&(arguments[0]?isMomentInput(arguments[0])?(e=arguments[0],t=void 0):isCalendarSpec(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var a=e||createLocal(),n=cloneWithOffset(a,this).startOf("day"),i=hooks.calendarFormat(this,n)||"sameElse",r=t&&(isFunction(t[i])?t[i].call(this,a):t[i]);return this.format(r||this.localeData().calendar(i,this,createLocal(a)))}function clone(){return new Moment(this)}function isAfter(e,t){var a=isMoment(e)?e:createLocal(e);return!(!this.isValid()||!a.isValid())&&("millisecond"===(t=normalizeUnits(t)||"millisecond")?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(t).valueOf())}function isBefore(e,t){var a=isMoment(e)?e:createLocal(e);return!(!this.isValid()||!a.isValid())&&("millisecond"===(t=normalizeUnits(t)||"millisecond")?this.valueOf()<a.valueOf():this.clone().endOf(t).valueOf()<a.valueOf())}function isBetween(e,t,a,n){var i=isMoment(e)?e:createLocal(e),r=isMoment(t)?t:createLocal(t);return!!(this.isValid()&&i.isValid()&&r.isValid())&&("("===(n=n||"()")[0]?this.isAfter(i,a):!this.isBefore(i,a))&&(")"===n[1]?this.isBefore(r,a):!this.isAfter(r,a))}function isSame(e,t){var a,n=isMoment(e)?e:createLocal(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=normalizeUnits(t)||"millisecond")?this.valueOf()===n.valueOf():(a=n.valueOf(),this.clone().startOf(t).valueOf()<=a&&a<=this.clone().endOf(t).valueOf()))}function isSameOrAfter(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function isSameOrBefore(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function diff(e,t,a){var n,i,r;if(!this.isValid())return NaN;if(!(n=cloneWithOffset(e,this)).isValid())return NaN;switch(i=6e4*(n.utcOffset()-this.utcOffset()),t=normalizeUnits(t)){case"year":r=monthDiff(this,n)/12;break;case"month":r=monthDiff(this,n);break;case"quarter":r=monthDiff(this,n)/3;break;case"second":r=(this-n)/1e3;break;case"minute":r=(this-n)/6e4;break;case"hour":r=(this-n)/36e5;break;case"day":r=(this-n-i)/864e5;break;case"week":r=(this-n-i)/6048e5;break;default:r=this-n}return a?r:absFloor(r)}function monthDiff(e,t){if(e.date()<t.date())return-monthDiff(t,e);var a=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(a,"months");return-(a+(t-n<0?(t-n)/(n-e.clone().add(a-1,"months")):(t-n)/(e.clone().add(a+1,"months")-n)))||0}function toString(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(e){if(!this.isValid())return null;var t=!0!==e,a=t?this.clone().utc():this;return a.year()<0||a.year()>9999?formatMoment(a,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",formatMoment(a,"Z")):formatMoment(a,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,a,n,i="moment",r="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",n=r+'[")]',this.format(e+t+a+n)}function format(e){e||(e=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var t=formatMoment(this,e);return this.localeData().postformat(t)}function from(e,t){return this.isValid()&&(isMoment(e)&&e.isValid()||createLocal(e).isValid())?createDuration({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function fromNow(e){return this.from(createLocal(),e)}function to(e,t){return this.isValid()&&(isMoment(e)&&e.isValid()||createLocal(e).isValid())?createDuration({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function toNow(e){return this.to(createLocal(),e)}function locale(e){var t;return void 0===e?this._locale._abbr:(null!=(t=getLocale(e))&&(this._locale=t),this)}hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ce=deprecate("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 localeData(){return this._locale}var Me=1e3,Ee=60*Me,Ye=60*Ee,Re=3506328*Ye;function mod$1(e,t){return(e%t+t)%t}function localStartOfDate(e,t,a){return e<100&&e>=0?new Date(e+400,t,a)-Re:new Date(e,t,a).valueOf()}function utcStartOfDate(e,t,a){return e<100&&e>=0?Date.UTC(e+400,t,a)-Re:Date.UTC(e,t,a)}function startOf(e){var t,a;if(void 0===(e=normalizeUnits(e))||"millisecond"===e||!this.isValid())return this;switch(a=this._isUTC?utcStartOfDate:localStartOfDate,e){case"year":t=a(this.year(),0,1);break;case"quarter":t=a(this.year(),this.month()-this.month()%3,1);break;case"month":t=a(this.year(),this.month(),1);break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=a(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mod$1(t+(this._isUTC?0:this.utcOffset()*Ee),Ye);break;case"minute":t=this._d.valueOf(),t-=mod$1(t,Ee);break;case"second":t=this._d.valueOf(),t-=mod$1(t,Me)}return this._d.setTime(t),hooks.updateOffset(this,!0),this}function endOf(e){var t,a;if(void 0===(e=normalizeUnits(e))||"millisecond"===e||!this.isValid())return this;switch(a=this._isUTC?utcStartOfDate:localStartOfDate,e){case"year":t=a(this.year()+1,0,1)-1;break;case"quarter":t=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=a(this.year(),this.month()+1,1)-1;break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=a(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ye-mod$1(t+(this._isUTC?0:this.utcOffset()*Ee),Ye)-1;break;case"minute":t=this._d.valueOf(),t+=Ee-mod$1(t,Ee)-1;break;case"second":t=this._d.valueOf(),t+=Me-mod$1(t,Me)-1}return this._d.setTime(t),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-6e4*(this._offset||0)}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function toObject(){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 toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function localeEras(e,t){var a,n,i,r=this._eras||getLocale("en")._eras;for(a=0,n=r.length;a<n;++a)switch("string"==typeof r[a].since&&(i=hooks(r[a].since).startOf("day"),r[a].since=i.valueOf()),typeof r[a].until){case"undefined":r[a].until=1/0;break;case"string":i=hooks(r[a].until).startOf("day").valueOf(),r[a].until=i.valueOf()}return r}function localeErasParse(e,t,a){var n,i,r,o,s,l=this.eras();for(e=e.toUpperCase(),n=0,i=l.length;n<i;++n)if(r=l[n].name.toUpperCase(),o=l[n].abbr.toUpperCase(),s=l[n].narrow.toUpperCase(),a)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[n];break;case"NNNN":if(r===e)return l[n];break;case"NNNNN":if(s===e)return l[n]}else if([r,o,s].indexOf(e)>=0)return l[n]}function localeErasConvertYear(e,t){var a=e.since<=e.until?1:-1;return void 0===t?hooks(e.since).year():hooks(e.since).year()+(t-e.offset)*a}function getEraName(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until)return n[e].name;if(n[e].until<=a&&a<=n[e].since)return n[e].name}return""}function getEraNarrow(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until)return n[e].narrow;if(n[e].until<=a&&a<=n[e].since)return n[e].narrow}return""}function getEraAbbr(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until)return n[e].abbr;if(n[e].until<=a&&a<=n[e].since)return n[e].abbr}return""}function getEraYear(){var e,t,a,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(a=i[e].since<=i[e].until?1:-1,n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until||i[e].until<=n&&n<=i[e].since)return(this.year()-hooks(i[e].since).year())*a+i[e].offset;return this.year()}function erasNameRegex(e){return hasOwnProp(this,"_erasNameRegex")||computeErasParse.call(this),e?this._erasNameRegex:this._erasRegex}function erasAbbrRegex(e){return hasOwnProp(this,"_erasAbbrRegex")||computeErasParse.call(this),e?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex(e){return hasOwnProp(this,"_erasNarrowRegex")||computeErasParse.call(this),e?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr(e,t){return t.erasAbbrRegex(e)}function matchEraName(e,t){return t.erasNameRegex(e)}function matchEraNarrow(e,t){return t.erasNarrowRegex(e)}function matchEraYearOrdinal(e,t){return t._eraYearOrdinalRegex||C}function computeErasParse(){var e,t,a,n,i,r=[],o=[],s=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)a=regexEscape(c[e].name),n=regexEscape(c[e].abbr),i=regexEscape(c[e].narrow),o.push(a),r.push(n),s.push(i),l.push(a),l.push(n),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function addWeekYearFormatToken(e,t){addFormatToken(0,[e,e.length],0,t)}function getSetWeekYear(e){return getSetWeekYearHelper.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(e){return getSetWeekYearHelper.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getISOWeeksInISOWeekYear(){return weeksInYear(this.isoWeekYear(),1,4)}function getWeeksInYear(){var e=this.localeData()._week;return weeksInYear(this.year(),e.dow,e.doy)}function getWeeksInWeekYear(){var e=this.localeData()._week;return weeksInYear(this.weekYear(),e.dow,e.doy)}function getSetWeekYearHelper(e,t,a,n,i){var r;return null==e?weekOfYear(this,n,i).year:(t>(r=weeksInYear(e,n,i))&&(t=r),setWeekAll.call(this,e,t,a,n,i))}function setWeekAll(e,t,a,n,i){var r=dayOfYearFromWeeks(e,t,a,n,i),o=createUTCDate(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function getSetQuarter(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}addFormatToken("N",0,0,"eraAbbr"),addFormatToken("NN",0,0,"eraAbbr"),addFormatToken("NNN",0,0,"eraAbbr"),addFormatToken("NNNN",0,0,"eraName"),addFormatToken("NNNNN",0,0,"eraNarrow"),addFormatToken("y",["y",1],"yo","eraYear"),addFormatToken("y",["yy",2],0,"eraYear"),addFormatToken("y",["yyy",3],0,"eraYear"),addFormatToken("y",["yyyy",4],0,"eraYear"),addRegexToken("N",matchEraAbbr),addRegexToken("NN",matchEraAbbr),addRegexToken("NNN",matchEraAbbr),addRegexToken("NNNN",matchEraName),addRegexToken("NNNNN",matchEraNarrow),addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(e,t,a,n){var i=a._locale.erasParse(e,n,a._strict);i?getParsingFlags(a).era=i:getParsingFlags(a).invalidEra=e}),addRegexToken("y",C),addRegexToken("yy",C),addRegexToken("yyy",C),addRegexToken("yyyy",C),addRegexToken("yo",matchEraYearOrdinal),addParseToken(["y","yy","yyy","yyyy"],z),addParseToken(["yo"],function(e,t,a,n){var i;a._locale._eraYearOrdinalRegex&&(i=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?t[z]=a._locale.eraYearOrdinalParse(e,i):t[z]=parseInt(e,10)}),addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100}),addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100}),addWeekYearFormatToken("gggg","weekYear"),addWeekYearFormatToken("ggggg","weekYear"),addWeekYearFormatToken("GGGG","isoWeekYear"),addWeekYearFormatToken("GGGGG","isoWeekYear"),addRegexToken("G",M),addRegexToken("g",M),addRegexToken("GG",T,b),addRegexToken("gg",T,b),addRegexToken("GGGG",F,_),addRegexToken("gggg",F,_),addRegexToken("GGGGG",j,S),addRegexToken("ggggg",j,S),addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(e,t,a,n){t[n.substr(0,2)]=toInt(e)}),addWeekParseToken(["gg","GG"],function(e,t,a,n){t[n]=hooks.parseTwoDigitYear(e)}),addFormatToken("Q",0,"Qo","quarter"),addRegexToken("Q",k),addParseToken("Q",function(e,t){t[N]=3*(toInt(e)-1)}),addFormatToken("D",["DD",2],"Do","date"),addRegexToken("D",T,A),addRegexToken("DD",T,b),addRegexToken("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),addParseToken(["D","DD"],U),addParseToken("Do",function(e,t){t[U]=toInt(e.match(T)[0])});var Ie=makeGetSet("Date",!0);function getSetDayOfYear(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear"),addRegexToken("DDD",P),addRegexToken("DDDD",w),addParseToken(["DDD","DDDD"],function(e,t,a){a._dayOfYear=toInt(e)}),addFormatToken("m",["mm",2],0,"minute"),addRegexToken("m",T,L),addRegexToken("mm",T,b),addParseToken(["m","mm"],G);var Ae=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second"),addRegexToken("s",T,L),addRegexToken("ss",T,b),addParseToken(["s","ss"],q);var Le,We,ze=makeGetSet("Seconds",!1);for(addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)}),addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),addFormatToken(0,["SSS",3],0,"millisecond"),addFormatToken(0,["SSSS",4],0,function(){return 10*this.millisecond()}),addFormatToken(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),addFormatToken(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),addFormatToken(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),addFormatToken(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),addFormatToken(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),addRegexToken("S",P,k),addRegexToken("SS",P,b),addRegexToken("SSS",P,w),Le="SSSS";Le.length<=9;Le+="S")addRegexToken(Le,C);function parseMs(e,t){t[V]=toInt(1e3*("0."+e))}for(Le="S";Le.length<=9;Le+="S")addParseToken(Le,parseMs);function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}We=makeGetSet("Milliseconds",!1),addFormatToken("z",0,0,"zoneAbbr"),addFormatToken("zz",0,0,"zoneName");var Ne=Moment.prototype;function createUnix(e){return createLocal(1e3*e)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(e){return e}Ne.add=Fe,Ne.calendar=calendar$1,Ne.clone=clone,Ne.diff=diff,Ne.endOf=endOf,Ne.format=format,Ne.from=from,Ne.fromNow=fromNow,Ne.to=to,Ne.toNow=toNow,Ne.get=stringGet,Ne.invalidAt=invalidAt,Ne.isAfter=isAfter,Ne.isBefore=isBefore,Ne.isBetween=isBetween,Ne.isSame=isSame,Ne.isSameOrAfter=isSameOrAfter,Ne.isSameOrBefore=isSameOrBefore,Ne.isValid=isValid$2,Ne.lang=Ce,Ne.locale=locale,Ne.localeData=localeData,Ne.max=Se,Ne.min=_e,Ne.parsingFlags=parsingFlags,Ne.set=stringSet,Ne.startOf=startOf,Ne.subtract=je,Ne.toArray=toArray,Ne.toObject=toObject,Ne.toDate=toDate,Ne.toISOString=toISOString,Ne.inspect=inspect,"undefined"!=typeof Symbol&&null!=Symbol.for&&(Ne[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Ne.toJSON=toJSON,Ne.toString=toString,Ne.unix=unix,Ne.valueOf=valueOf,Ne.creationData=creationData,Ne.eraName=getEraName,Ne.eraNarrow=getEraNarrow,Ne.eraAbbr=getEraAbbr,Ne.eraYear=getEraYear,Ne.year=K,Ne.isLeapYear=getIsLeapYear,Ne.weekYear=getSetWeekYear,Ne.isoWeekYear=getSetISOWeekYear,Ne.quarter=Ne.quarters=getSetQuarter,Ne.month=getSetMonth,Ne.daysInMonth=getDaysInMonth,Ne.week=Ne.weeks=getSetWeek,Ne.isoWeek=Ne.isoWeeks=getSetISOWeek,Ne.weeksInYear=getWeeksInYear,Ne.weeksInWeekYear=getWeeksInWeekYear,Ne.isoWeeksInYear=getISOWeeksInYear,Ne.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear,Ne.date=Ie,Ne.day=Ne.days=getSetDayOfWeek,Ne.weekday=getSetLocaleDayOfWeek,Ne.isoWeekday=getSetISODayOfWeek,Ne.dayOfYear=getSetDayOfYear,Ne.hour=Ne.hours=de,Ne.minute=Ne.minutes=Ae,Ne.second=Ne.seconds=ze,Ne.millisecond=Ne.milliseconds=We,Ne.utcOffset=getSetOffset,Ne.utc=setOffsetToUTC,Ne.local=setOffsetToLocal,Ne.parseZone=setOffsetToParsedOffset,Ne.hasAlignedHourOffset=hasAlignedHourOffset,Ne.isDST=isDaylightSavingTime,Ne.isLocal=isLocal,Ne.isUtcOffset=isUtcOffset,Ne.isUtc=isUtc,Ne.isUTC=isUtc,Ne.zoneAbbr=getZoneAbbr,Ne.zoneName=getZoneName,Ne.dates=deprecate("dates accessor is deprecated. Use date instead.",Ie),Ne.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth),Ne.years=deprecate("years accessor is deprecated. Use year instead",K),Ne.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone),Ne.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);var Ue=Locale.prototype;function get$1(e,t,a,n){var i=getLocale(),r=createUTC().set(n,t);return i[a](r,e)}function listMonthsImpl(e,t,a){if(isNumber(e)&&(t=e,e=void 0),e=e||"",null!=t)return get$1(e,t,a,"month");var n,i=[];for(n=0;n<12;n++)i[n]=get$1(e,n,a,"month");return i}function listWeekdaysImpl(e,t,a,n){"boolean"==typeof e?(isNumber(t)&&(a=t,t=void 0),t=t||""):(a=t=e,e=!1,isNumber(t)&&(a=t,t=void 0),t=t||"");var i,r=getLocale(),o=e?r._week.dow:0,s=[];if(null!=a)return get$1(t,(a+o)%7,n,"day");for(i=0;i<7;i++)s[i]=get$1(t,(i+o)%7,n,"day");return s}function listMonths(e,t){return listMonthsImpl(e,t,"months")}function listMonthsShort(e,t){return listMonthsImpl(e,t,"monthsShort")}function listWeekdays(e,t,a){return listWeekdaysImpl(e,t,a,"weekdays")}function listWeekdaysShort(e,t,a){return listWeekdaysImpl(e,t,a,"weekdaysShort")}function listWeekdaysMin(e,t,a){return listWeekdaysImpl(e,t,a,"weekdaysMin")}Ue.calendar=calendar,Ue.longDateFormat=longDateFormat,Ue.invalidDate=invalidDate,Ue.ordinal=ordinal,Ue.preparse=preParsePostFormat,Ue.postformat=preParsePostFormat,Ue.relativeTime=relativeTime,Ue.pastFuture=pastFuture,Ue.set=set,Ue.eras=localeEras,Ue.erasParse=localeErasParse,Ue.erasConvertYear=localeErasConvertYear,Ue.erasAbbrRegex=erasAbbrRegex,Ue.erasNameRegex=erasNameRegex,Ue.erasNarrowRegex=erasNarrowRegex,Ue.months=localeMonths,Ue.monthsShort=localeMonthsShort,Ue.monthsParse=localeMonthsParse,Ue.monthsRegex=monthsRegex,Ue.monthsShortRegex=monthsShortRegex,Ue.week=localeWeek,Ue.firstDayOfYear=localeFirstDayOfYear,Ue.firstDayOfWeek=localeFirstDayOfWeek,Ue.weekdays=localeWeekdays,Ue.weekdaysMin=localeWeekdaysMin,Ue.weekdaysShort=localeWeekdaysShort,Ue.weekdaysParse=localeWeekdaysParse,Ue.weekdaysRegex=weekdaysRegex,Ue.weekdaysShortRegex=weekdaysShortRegex,Ue.weekdaysMinRegex=weekdaysMinRegex,Ue.isPM=localeIsPM,Ue.meridiem=localeMeridiem,getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===toInt(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale),hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var He=Math.abs;function abs(){var e=this._data;return this._milliseconds=He(this._milliseconds),this._days=He(this._days),this._months=He(this._months),e.milliseconds=He(e.milliseconds),e.seconds=He(e.seconds),e.minutes=He(e.minutes),e.hours=He(e.hours),e.months=He(e.months),e.years=He(e.years),this}function addSubtract$1(e,t,a,n){var i=createDuration(t,a);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function add$1(e,t){return addSubtract$1(this,e,t,1)}function subtract$1(e,t){return addSubtract$1(this,e,t,-1)}function absCeil(e){return e<0?Math.floor(e):Math.ceil(e)}function bubble(){var e,t,a,n,i,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*absCeil(monthsToDays(s)+o),o=0,s=0),l.milliseconds=r%1e3,e=absFloor(r/1e3),l.seconds=e%60,t=absFloor(e/60),l.minutes=t%60,a=absFloor(t/60),l.hours=a%24,o+=absFloor(a/24),s+=i=absFloor(daysToMonths(o)),o-=absCeil(monthsToDays(i)),n=absFloor(s/12),s%=12,l.days=o,l.months=s,l.years=n,this}function daysToMonths(e){return 4800*e/146097}function monthsToDays(e){return 146097*e/4800}function as(e){if(!this.isValid())return NaN;var t,a,n=this._milliseconds;if("month"===(e=normalizeUnits(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,a=this._months+daysToMonths(t),e){case"month":return a;case"quarter":return a/3;case"year":return a/12}else switch(t=this._days+Math.round(monthsToDays(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function makeAs(e){return function(){return this.as(e)}}var Ge=makeAs("ms"),qe=makeAs("s"),Ve=makeAs("m"),$e=makeAs("h"),Be=makeAs("d"),Ze=makeAs("w"),Ke=makeAs("M"),Je=makeAs("Q"),Qe=makeAs("y"),Xe=Ge;function clone$1(){return createDuration(this)}function get$2(e){return e=normalizeUnits(e),this.isValid()?this[e+"s"]():NaN}function makeGetter(e){return function(){return this.isValid()?this._data[e]:NaN}}var et=makeGetter("milliseconds"),tt=makeGetter("seconds"),at=makeGetter("minutes"),nt=makeGetter("hours"),it=makeGetter("days"),rt=makeGetter("months"),ot=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var st=Math.round,lt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(e,t,a,n,i){return i.relativeTime(t||1,!!a,e,n)}function relativeTime$1(e,t,a,n){var i=createDuration(e).abs(),r=st(i.as("s")),o=st(i.as("m")),s=st(i.as("h")),l=st(i.as("d")),c=st(i.as("M")),d=st(i.as("w")),p=st(i.as("y")),u=r<=a.ss&&["s",r]||r<a.s&&["ss",r]||o<=1&&["m"]||o<a.m&&["mm",o]||s<=1&&["h"]||s<a.h&&["hh",s]||l<=1&&["d"]||l<a.d&&["dd",l];return null!=a.w&&(u=u||d<=1&&["w"]||d<a.w&&["ww",d]),(u=u||c<=1&&["M"]||c<a.M&&["MM",c]||p<=1&&["y"]||["yy",p])[2]=t,u[3]=+e>0,u[4]=n,substituteTimeAgo.apply(null,u)}function getSetRelativeTimeRounding(e){return void 0===e?st:"function"==typeof e&&(st=e,!0)}function getSetRelativeTimeThreshold(e,t){return void 0!==lt[e]&&(void 0===t?lt[e]:(lt[e]=t,"s"===e&&(lt.ss=t-1),!0))}function humanize(e,t){if(!this.isValid())return this.localeData().invalidDate();var a,n,i=!1,r=lt;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(r=Object.assign({},lt,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),n=relativeTime$1(this,!i,r,a=this.localeData()),i&&(n=a.pastFuture(+this,n)),a.postformat(n)}var ct=Math.abs;function sign(e){return(e>0)-(e<0)||+e}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var e,t,a,n,i,r,o,s,l=ct(this._milliseconds)/1e3,c=ct(this._days),d=ct(this._months),p=this.asSeconds();return p?(e=absFloor(l/60),t=absFloor(e/60),l%=60,e%=60,a=absFloor(d/12),d%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=p<0?"-":"",r=sign(this._months)!==sign(p)?"-":"",o=sign(this._days)!==sign(p)?"-":"",s=sign(this._milliseconds)!==sign(p)?"-":"",i+"P"+(a?r+a+"Y":"")+(d?r+d+"M":"")+(c?o+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+n+"S":"")):"P0D"}var dt=Duration.prototype;return dt.isValid=isValid$1,dt.abs=abs,dt.add=add$1,dt.subtract=subtract$1,dt.as=as,dt.asMilliseconds=Ge,dt.asSeconds=qe,dt.asMinutes=Ve,dt.asHours=$e,dt.asDays=Be,dt.asWeeks=Ze,dt.asMonths=Ke,dt.asQuarters=Je,dt.asYears=Qe,dt.valueOf=Xe,dt._bubble=bubble,dt.clone=clone$1,dt.get=get$2,dt.milliseconds=et,dt.seconds=tt,dt.minutes=at,dt.hours=nt,dt.days=it,dt.weeks=weeks,dt.months=rt,dt.years=ot,dt.humanize=humanize,dt.toISOString=toISOString$1,dt.toString=toISOString$1,dt.toJSON=toISOString$1,dt.locale=locale,dt.localeData=localeData,dt.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1),dt.lang=Ce,addFormatToken("X",0,0,"unix"),addFormatToken("x",0,0,"valueOf"),addRegexToken("x",M),addRegexToken("X",R),addParseToken("X",function(e,t,a){a._d=new Date(1e3*parseFloat(e))}),addParseToken("x",function(e,t,a){a._d=new Date(toInt(e))}),
2
2
  //! moment.js
3
3
  hooks.version="2.30.1",setHookCallback(createLocal),hooks.fn=Ne,hooks.min=min,hooks.max=max,hooks.now=now,hooks.utc=createUTC,hooks.unix=createUnix,hooks.months=listMonths,hooks.isDate=isDate,hooks.locale=getSetGlobalLocale,hooks.invalid=createInvalid,hooks.duration=createDuration,hooks.isMoment=isMoment,hooks.weekdays=listWeekdays,hooks.parseZone=createInZone,hooks.localeData=getLocale,hooks.isDuration=isDuration,hooks.monthsShort=listMonthsShort,hooks.weekdaysMin=listWeekdaysMin,hooks.defineLocale=defineLocale,hooks.updateLocale=updateLocale,hooks.locales=listLocales,hooks.weekdaysShort=listWeekdaysShort,hooks.normalizeUnits=normalizeUnits,hooks.relativeTimeRounding=getSetRelativeTimeRounding,hooks.relativeTimeThreshold=getSetRelativeTimeThreshold,hooks.calendarFormat=getCalendarFormat,hooks.prototype=Ne,hooks.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"},hooks}()),je.exports;var e}(),Me=getDefaultExportFromCjs(Ce);function Picker$1(e){let{value:t=(new Date).toISOString(),minDate:a=null,maxDate:n=null,label:i="",onChange:r=()=>{},required:o=!1,disabled:s=!1,datePickerProps:l=null}=e;return u(m,{children:[p(b,{sx:e=>e.typography.fontSize,required:o,children:i}),p(U,_objectSpread2({allowKeyboardControl:!0,margin:"dense",inputVariant:"outlined",autoOk:!0,format:"DD/MM/YYYY",slotProps:{textField:{variant:"outlined",fullWidth:!0,size:"small",sx:{mt:1}}},value:t?Me(t):null,minDate:a?Me(a):null,maxDate:n?Me(n):null,onChange:r,disabled:s},l))]})}function Picker(e){let{label:t="",value:a=(new Date).toISOString(),onChange:n=()=>{},minDate:i,maxDate:r,required:o=!1,disabled:s=!1}=e;return u(m,{children:[p(b,{sx:e=>e.typography.fontSize,required:o,children:t}),p(H,{allowKeyboardControl:!0,autoOk:!0,margin:"dense",inputVariant:"outlined",ampm:!1,renderInput:e=>p(k,_objectSpread2({},e)),value:Me(a),minDate:Me(i),maxDate:Me(r),onChange:n,disabled:s,format:"DD/MM/YYYY HH:mm",slotProps:{textField:{variant:"outlined",fullWidth:!0,size:"small",sx:{mt:1}}}})]})}const Ee=["autoFocus","propertyName"];function SearchInputField(e){let{autoFocus:t=!1,propertyName:a}=e,n=function _objectWithoutProperties$1(e,t){if(null==e)return{};var a,n,i=function _objectWithoutPropertiesLoose$1(e,t){if(null==e)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;a[n]=e[n]}return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)a=r[n],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}(e,Ee);return p(InputField,_objectSpread2({adornment:p(F,{onClick:()=>!1,size:"large",children:p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:p("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})})}),autoFocus:t,propertyName:a},n))}const Ye={getHref:(e,t)=>{if(e&&e.links&&e.links.length>0){const a=e.links.find(e=>e.rel===t);return a?a.href:null}return null},getSelfHref:e=>Ye.getHref(e,"self"),sortList:e=>e.slice().sort((e,t)=>e<t?-1:e>t?1:0),sortEntityList:(e,t)=>e.slice().sort((e,a)=>e[t]<a[t]?-1:e[t]>a[t]?1:0)},initialiseOnMount=e=>function HOC(t){const{initialise:a,itemId:i}=t;return n(()=>{a&&i?a({itemId:i}):a&&a(t)},[a,i]),p(e,_objectSpread2({},t))};function Panel(e){let{section:t,close:a}=e;const{columns:n}=t;return u(te,{sx:{backgroundColor:"#f5f5f5",position:"fixed",zIndex:1e3,paddingTop:"80px",width:"100%",overflow:"auto",height:"100vh"},children:[p(d,{onClick:a,color:"secondary",sx:{marginRight:"10px",marginTop:"10px",float:"right",top:0,right:0},children:p(N,{})}),u(C,{container:!0,children:[n.map((e,t)=>p(C,{size:{xs:12,md:6,lg:3,xl:3},children:e.categories.filter(e=>e.items.filter(e=>e.showInMenu).length>0).map(e=>u(I,{dense:!0,children:[p(A,{sx:{paddingTop:"0px !important",paddingBottom:"0px !important"},children:p(x,{variant:"button",gutterBottom:!0,children:e.title.replace("&amp;","&")})}),e.items.map(e=>e.showInMenu&&p("a",{href:e.href,style:{textDecoration:"none"},children:p(A,{sx:{paddingTop:0,paddingBottom:0,margin:0},children:p(x,{sx:{margin:0,lineHeight:1.8},variant:"overline",color:"primary",children:e.title})})},e.href))]},e.title))},t)),p(C,{size:12,children:p("a",{href:"/".concat(t.id),children:p(d,{onClick:a,color:"primary",sx:{marginRight:"10px",marginBottom:"10px",float:"right"},children:"SHOW ALL OPTIONS..."})})})]})]})}const Re={paper:{backgroundColor:"#f5f5f5",position:"fixed",zIndex:1e3,paddingTop:"80px",width:"100%",overflow:"auto",height:"100vh"}};function SearchPanel(e){let{menu:a,close:n}=e;const[i,r]=t(),o=a.map(e=>e.columns).flat().map(e=>e.categories).flat().map(e=>e.items).flat(),s=Object.values(o.reduce((e,t)=>e[t.href]?e:_objectSpread2(_objectSpread2({},e),{},{[t.href]:t}),{}));return u(te,{sx:Re.paper,children:[p(d,{onClick:n,color:"secondary",sx:{marginRight:"10px",marginTop:"10px",float:"right",top:0,right:0},children:p(N,{})}),p(C,{container:!0,children:u(C,{size:12,sm:6,md:4,lg:3,xl:3,"justify-content":"flex-end",children:[p(SearchInputField,{value:i,onChange:(e,t)=>{r(t)},textFieldProps:{autoFocus:!0},placeholder:"start typing..."}),p(I,{dense:!0,children:(null==i?void 0:i.length)>1&&s.filter(e=>e.title.toLowerCase().includes(i.toLowerCase())||e.href.toLowerCase().includes(i.toLowerCase())).map(e=>p(g,{children:p("a",{href:e.href,style:{textDecoration:"none"},children:p(A,{sx:{paddingTop:0,paddingBottom:0,margin:0},children:p(x,{variant:"overline",color:"primary",sx:{margin:0,lineHeight:1.8},children:e.title})})})},e.href))})]})})]})}function Navigation(e){let{sections:a=null,loading:i=!1,username:r="",myStuff:o=null,notifications:s=[],handleSignOut:l=null}=e;const[c,f]=t(!1),[h,g]=t(),{enqueueSnackbar:v,closeSnackbar:y}=O(),k={root:{position:"absolute",width:"100%",margin:0,top:0,zIndex:10},tabLabel:{fontSize:"1rem",color:"#B0B0B0"},snackbarNew:{background:"#1a73e8",width:"800px"},snackbarSeen:{width:"800px"},tab:{minWidth:"100px"},toolbar:{paddingLeft:0,paddingRight:0},tabs:{paddingLeft:0,flexGrow:1},container:{width:"100%",margin:0},appBar:{backgroundColor:"#424242",width:"100% !important",margin:0,position:"fixed",zIndex:1300},icons:{cursor:"pointer",color:"white"}},handleClose=()=>{g()};if(n(()=>{const handleKeyDown=e=>{"Escape"===e.key&&f(!1)};return document.addEventListener("keydown",handleKeyDown),()=>{document.removeEventListener("keydown",handleKeyDown)}},[]),a){const e=a.map(e=>e.id),handleClick=e=>{g(e.currentTarget)},actions=(e,t)=>u(m,{children:[p(d,{variant:"contained",onClick:()=>{window.location=Ye.getSelfHref(t)},children:"View"}),p(d,{onClick:()=>{y(e),localStorage.setItem(t.title,t.content),markNotificationSeen(t)},children:"Dismiss"})]}),noNotifications=()=>0===s.length,queueNotifications=()=>{noNotifications()?v("No notifications to show!",{anchorOrigin:{vertical:"bottom",horizontal:"right"},variant:"info",preventDuplicate:!0}):s.forEach((e,t)=>{setTimeout(()=>{v("".concat(e.title," ").concat(e.content),{anchorOrigin:{vertical:"bottom",horizontal:"right"},ContentProps:{sx:{root:localStorage.getItem(e.title)?k.snackbarSeen:k.snackbarNew}},action:t=>actions(t,e),preventDuplicate:!0})},200*t)})};return p($,{onClickAway:()=>f(!1),children:u("div",{className:"hide-when-printing",children:[p(C,{container:!0,spacing:3,children:a&&!i&&p(V,{position:"static",sx:k.appBar,children:p(K,{children:u(C,{container:!0,spacing:3,sx:k.container,children:[p(C,{size:9,children:p(G,{sx:k.tabs,value:c,onChange:(e,t)=>{f(c!==t&&t)},scrollButtons:"auto",variant:"scrollable",indicatorColor:"primary",textColor:"primary",children:a.map(e=>p(q,{id:e.id,sx:k.tab,label:p("span",{style:k.tabLabel,children:e.title}),selected:!1},e.id))})}),p(C,{size:1,children:p(x,{variant:"h4",children:p(Q,{sx:k.icons,"aria-owns":h?"simple-menu":void 0,onClick:handleClick,id:a.length},a.length)})}),p(C,{size:1,children:p(x,{variant:"h4",children:p(J,{badgeContent:s.length,color:"primary",variant:"dot",children:p(ee,{sx:k.icons,onClick:queueNotifications})})})}),p(C,{size:1,children:p(x,{variant:"h4",children:p(X,{sx:k.icons,onClick:()=>f(a.length)})})}),u(B,{id:"simple-menu",anchorEl:h,open:Boolean(h),onClose:handleClose,children:[p(Z,{onClick:handleClose,children:r}),r&&o.groups.map(e=>p("span",{children:p("a",{href:e.items[0].href,children:p(Z,{onClick:handleClose,children:e.items[0].title})})},e.items[0].href)),l&&p(Z,{style:{color:"blue",textDecoration:"underline",cursor:"pointer",background:"none"},onClick:l,children:"Sign Out (Newer apps pages)"})]})]})})})}),e.map((e,t)=>c===t&&p(Panel,{section:a.find(t=>t.id===e),id:e,style:{align:"right"},anchorEl:e.id,close:()=>f(!1)},e)),c===a.length&&p(SearchPanel,{menu:a,close:()=>f(!1)})]})})}return p("div",{style:k.root,children:p(V,{position:"static",color:"default",children:p(K,{sx:k.toolbar})})})}const Ie=ae();function SelectedItemsList(e){let{items:t,removeItem:a=null,title:n="Items Selected",maxHeight:i=null}=e;return u(m,{children:[p(x,{variant:"body1",sx:{marginBottom:"8px"},children:n}),p(I,{dense:!0,sx:_objectSpread2({width:"100%",position:"relative",overflow:"auto"},i&&{maxHeight:i}),children:t.map(e=>u(I,{children:[u(A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 16px"},children:[p(ie,{primary:e.displayText?e.displayText:e}),a&&p(W,{"aria-label":"delete",onClick:()=>a(e.id?e.id:e),size:"large",sx:{marginLeft:"auto"},children:p(re,{})})]}),p(oe,{})]},e.id?e.id:e))})]})}function NotFound(){return p(C,{container:!0,alignItems:"flex-start",styles:{alignItems:"flex-start"},children:p(j,{variant:"h4",children:"Page Not Found"})})}function cloneDate(e){return Me.isMoment(e)?e.clone():Me(e,"MM-DD-YYYY")}function getWeekStartDate(e){const t=cloneDate(e);return 6===t.day()?t.endOf("week"):t.startOf("week").subtract(1,"days")}function getWeekEndDate(e){const t=cloneDate(e);return 6===t.day()?t.endOf("week").add(6,"days"):t.endOf("week").subtract(1,"days")}const Ae=ne(se,{shouldForwardProp:e=>"dayIsBetween"!==e&&"isFirstDay"!==e&&"isLastDay"!==e})(e=>{let{theme:t,dayIsBetween:a,isFirstDay:n,isLastDay:i}=e;return _objectSpread2(_objectSpread2(_objectSpread2({},a&&{borderRadius:0,backgroundColor:t.palette.primary.main,color:t.palette.common.white,"&:hover, &:focus":{backgroundColor:t.palette.primary.dark}}),n&&{borderTopLeftRadius:"50%",borderBottomLeftRadius:"50%"}),i&&{borderTopRightRadius:"50%",borderBottomRightRadius:"50%"})});function LinnWeekPicker(e){let{selectedDate:t=new Date,setWeekStartDate:a,propertyName:n="",label:i="",disabled:r=!1,required:o=!1}=e;return u(m,{children:[i&&p(b,{required:o,sx:{fontSize:"1rem",marginBottom:"8px"},children:i}),p(U,{disabled:r,value:t?Me(t):null,onChange:e=>{a(n,getWeekStartDate(e))},renderInput:e=>p(k,_objectSpread2(_objectSpread2({},e),{},{variant:"outlined"})),renderDay:(e,a,n)=>{if(!t)return p(se,_objectSpread2({},n));const i=Me(getWeekStartDate(t)),r=Me(getWeekEndDate(t)),o=Me(e).isBetween(i,r,null,"[]"),s=Me(e).isSame(i,"day"),l=Me(e).isSame(r,"day");return p(Ae,_objectSpread2(_objectSpread2({},n),{},{dayIsBetween:o,isFirstDay:s,isLastDay:l}))},inputFormat:"DD/MM/YYYY",slotProps:{textField:{variant:"outlined",fullWidth:!0,size:"small",sx:{mt:1}}}})]})}!function styleInject(e,t){void 0===t&&(t={});var a=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===a&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("@media print {\n @page {\n size: portrait;\n margin: 0mm;\n margin-right: 0mm;\n }\n \n @page land {\n size: landscape !important;\n margin: 0mm;\n margin-right: 0mm;\n }\n .print-landscape {\n page: land;\n }\n .pageContainer {\n width: 1100px;\n height: 800px;\n }\n table {\n zoom: 0.85;\n }\n .zoomed-in-printing {\n zoom: 1.45;\n }\n .date-for-printing {\n display: block !important;\n }\n .hide-when-printing {\n display: none !important;\n }\n .show-only-when-printing {\n display: block !important;\n }\n .padding-top-when-not-printing {\n padding-top: 0 !important;\n margin-top: -50px;\n }\n}\n\n.date-for-printing {\n display: none;\n right: 40px;\n top: 40px;\n position: absolute;\n font-size: small;\n}\n\n.show-only-when-printing {\n display: none;\n}\n\n.padding-top-when-not-printing {\n padding-top: 40px;\n}\n");var Le,We,ze,Ne,Ue,He,Ge,qe,Ve,$e,Be,Ze,Ke,Je={exports:{}};
4
4
  /*