andoncloud-workplaces-state-timelines-widget 1.2.1 → 1.2.2
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.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=require("react"),t=require("andoncloud-dashboard-toolkit"),n=require("andoncloud-widget-base"),r=require("react-i18next"),i=require("@mui/lab"),s=require("@mui/material"),a=require("@mui/material/styles");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=/*#__PURE__*/o(e);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}var c="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function d(e){var t=e.prototype.toJSON;"function"==typeof t||function(){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,c&&(e.prototype[c]=t)}function h(e){return null!=e&&"string"==typeof e.kind}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function m(e,t){switch(f(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(c)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:m(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],s=0;s<n;++s)i.push(m(e[s],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map(function(n){return n+": "+m(e[n],t)}).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}d(/*#__PURE__*/function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}()),d(/*#__PURE__*/function(){function e(e,t,n,r,i,s,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=s,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}());var p={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},y=Object.freeze({});function g(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var s=n?e.leave:e.enter;if(s){if("function"==typeof s)return s;var a=s[t];if("function"==typeof a)return a}}}var v={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return w(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=x("(",w(e.variableDefinitions,", "),")"),i=w(e.directives," "),s=e.selectionSet;return n||i||r||"query"!==t?w([t,w([n,r]),i,s]," "):s},VariableDefinition:function(e){var t=e.directives;return e.variable+": "+e.type+x(" = ",e.defaultValue)+x(" ",w(t," "))},SelectionSet:function(e){return b(e.selections)},Field:function(e){var t=e.name,n=e.arguments,r=e.directives,i=e.selectionSet,s=x("",e.alias,": ")+t,a=s+x("(",w(n,", "),")");return a.length>80&&(a=s+x("(\n",k(w(n,"\n")),"\n)")),w([a,w(r," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+x(" ",w(e.directives," "))},InlineFragment:function(e){var t=e.directives,n=e.selectionSet;return w(["...",x("on ",e.typeCondition),w(t," "),n]," ")},FragmentDefinition:function(e){var t=e.typeCondition,n=e.variableDefinitions,r=e.directives,i=e.selectionSet;return"fragment ".concat(e.name).concat(x("(",w(n,", "),")")," ")+"on ".concat(t," ").concat(x("",w(r," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=!r||'"'===e[e.length-1]||"\\"===e[e.length-1]||n,s="";return!i||r&&(" "===e[0]||"\t"===e[0])||(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,i&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+w(e.values,", ")+"]"},ObjectValue:function(e){return"{"+w(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+x("(",w(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:_(function(e){var t=e.operationTypes;return w(["schema",w(e.directives," "),b(t)]," ")}),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:_(function(e){return w(["scalar",e.name,w(e.directives," ")]," ")}),ObjectTypeDefinition:_(function(e){var t=e.directives,n=e.fields;return w(["type",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")}),FieldDefinition:_(function(e){var t=e.arguments,n=e.type,r=e.directives;return e.name+(D(t)?x("(\n",k(w(t,"\n")),"\n)"):x("(",w(t,", "),")"))+": "+n+x(" ",w(r," "))}),InputValueDefinition:_(function(e){var t=e.directives;return w([e.name+": "+e.type,x("= ",e.defaultValue),w(t," ")]," ")}),InterfaceTypeDefinition:_(function(e){var t=e.directives,n=e.fields;return w(["interface",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")}),UnionTypeDefinition:_(function(e){var t=e.types;return w(["union",e.name,w(e.directives," "),t&&0!==t.length?"= "+w(t," | "):""]," ")}),EnumTypeDefinition:_(function(e){var t=e.values;return w(["enum",e.name,w(e.directives," "),b(t)]," ")}),EnumValueDefinition:_(function(e){return w([e.name,w(e.directives," ")]," ")}),InputObjectTypeDefinition:_(function(e){var t=e.fields;return w(["input",e.name,w(e.directives," "),b(t)]," ")}),DirectiveDefinition:_(function(e){var t=e.arguments,n=e.repeatable,r=e.locations;return"directive @"+e.name+(D(t)?x("(\n",k(w(t,"\n")),"\n)"):x("(",w(t,", "),")"))+(n?" repeatable":"")+" on "+w(r," | ")}),SchemaExtension:function(e){var t=e.operationTypes;return w(["extend schema",w(e.directives," "),b(t)]," ")},ScalarTypeExtension:function(e){return w(["extend scalar",e.name,w(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.directives,n=e.fields;return w(["extend type",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")},InterfaceTypeExtension:function(e){var t=e.directives,n=e.fields;return w(["extend interface",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")},UnionTypeExtension:function(e){var t=e.types;return w(["extend union",e.name,w(e.directives," "),t&&0!==t.length?"= "+w(t," | "):""]," ")},EnumTypeExtension:function(e){var t=e.values;return w(["extend enum",e.name,w(e.directives," "),b(t)]," ")},InputObjectTypeExtension:function(e){var t=e.fields;return w(["extend input",e.name,w(e.directives," "),b(t)]," ")}};function _(e){return function(t){return w([t.description,e(t)],"\n")}}function w(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(n))&&void 0!==t?t:""}function b(e){return x("{\n",k(w(e,"\n")),"\n}")}function x(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function k(e){return x(" ",e.replace(/\n/g,"\n "))}function S(e){return-1!==e.indexOf("\n")}function D(e){return null!=e&&e.some(S)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var O,T,M=(O=function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function u(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function h(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Ct(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={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}),e._pf}function p(e){var t=null,r=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=m(e),r=n.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&&r),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 y(e){var t=f(NaN);return null!=e?h(m(t),e):m(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var g=r.momentProperties=[],v=!1;function _(e,t){var n,r,i,s=g.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=m(t)),u(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)u(i=t[r=g[n]])||(e[r]=i);return e}function w(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,r.updateOffset(this),v=!1)}function b(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function x(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var n=!0;return h(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,s,o,u=[],l=arguments.length;for(s=0;s<l;s++){if(i="","object"==typeof arguments[s]){for(o in i+="\n["+s+"] ",arguments[0])a(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];u.push(i)}x(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var S,D={};function O(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),D[e]||(x(t),D[e]=!0)}function T(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function M(e,t){var n,r=h({},e);for(n in t)a(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)a(e,n)&&!a(t,n)&&s(e[n])&&(r[n]=h({},r[n]));return r}function Y(e){null!=e&&this.set(e)}function E(e,t,n){var r=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-r.length)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var F=/(\[[^\[]*\])|(\\)?([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,N={},A={};function j(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(A[e]=i),t&&(A[t[0]]=function(){return E(i.apply(this,arguments),t[1],t[2])}),n&&(A[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function P(e,t){return e.isValid()?(t=$(t,e.localeData()),N[t]=N[t]||function(e){var t,n,r,i=e.match(F);for(t=0,n=i.length;t<n;t++)i[t]=A[i[t]]?A[i[t]]:(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,s="";for(r=0;r<n;r++)s+=T(i[r])?i[r].call(t,e):i[r];return s}}(t),N[t](e)):e.localeData().invalidDate()}function $(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(C.lastIndex=0;n>=0&&C.test(e);)e=e.replace(C,r),C.lastIndex=0,n-=1;return e}var R={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 V(e){return"string"==typeof e?R[e]||R[e.toLowerCase()]:void 0}function W(e){var t,n,r={};for(n in e)a(e,n)&&(t=V(n))&&(r[t]=e[n]);return r}var U,I={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},L=/\d/,H=/\d\d/,z=/\d{3}/,G=/\d{4}/,Z=/[+-]?\d{6}/,q=/\d\d?/,B=/\d\d\d\d?/,J=/\d\d\d\d\d\d?/,Q=/\d{1,3}/,K=/\d{1,4}/,X=/[+-]?\d{1,6}/,ee=/\d+/,te=/[+-]?\d+/,ne=/Z|[+-]\d\d:?\d\d/gi,re=/Z|[+-]\d\d(?::?\d\d)?/gi,ie=/[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,se=/^[1-9]\d?/,ae=/^([1-9]\d|\d)/;function oe(e,t,n){U[e]=T(t)?t:function(e,r){return e&&n?n:t}}function ue(e,t){return a(U,e)?U[e](t._strict,t._locale):new RegExp(le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function de(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}U={};var he={};function fe(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,n){n[t]=de(e)}),r=e.length,n=0;n<r;n++)he[e[n]]=i}function me(e,t){fe(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function pe(e,t,n){null!=t&&a(he,e)&&he[e](t,n._a,n,e)}function ye(e){return e%4==0&&e%100!=0||e%400==0}var ge=0,ve=1,_e=2,we=3,be=4,xe=5,ke=6,Se=7,De=8;function Oe(e){return ye(e)?366:365}j("Y",0,0,function(){var e=this.year();return e<=9999?E(e,4):"+"+e}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),oe("Y",te),oe("YY",q,H),oe("YYYY",K,G),oe("YYYYY",X,Z),oe("YYYYYY",X,Z),fe(["YYYYY","YYYYYY"],ge),fe("YYYY",function(e,t){t[ge]=2===e.length?r.parseTwoDigitYear(e):de(e)}),fe("YY",function(e,t){t[ge]=r.parseTwoDigitYear(e)}),fe("Y",function(e,t){t[ge]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return de(e)+(de(e)>68?1900:2e3)};var Te,Me=Ye("FullYear",!0);function Ye(e,t){return function(n){return null!=n?(Fe(this,e,n),r.updateOffset(this,t),this):Ee(this,e)}}function Ee(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Fe(e,t,n){var r,i,s,a,o;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,a=e.month(),o=29!==(o=e.date())||1!==a||ye(s)?o:28,i?r.setUTCFullYear(s,a,o):r.setFullYear(s,a,o)}}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?ye(e)?29:28:31-n%7%2}Te=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},j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),j("MMMM",0,0,function(e){return this.localeData().months(this,e)}),oe("M",q,se),oe("MM",q,H),oe("MMM",function(e,t){return t.monthsShortRegex(e)}),oe("MMMM",function(e,t){return t.monthsRegex(e)}),fe(["M","MM"],function(e,t){t[ve]=de(e)-1}),fe(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[ve]=i:m(n).invalidMonth=e});var Ne="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),je=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Pe=ie,$e=ie;function Re(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Te.call(this._shortMonthsParse,a))?i:null:-1!==(i=Te.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Te.call(this._shortMonthsParse,a))||-1!==(i=Te.call(this._longMonthsParse,a))?i:null:-1!==(i=Te.call(this._longMonthsParse,a))||-1!==(i=Te.call(this._shortMonthsParse,a))?i:null}function Ve(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=de(t);else if(!l(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,Ce(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function We(e){return null!=e?(Ve(this,e),r.updateOffset(this,!0),this):Ee(this,"Month")}function Ue(){function e(e,t){return t.length-e.length}var t,n,r,i,s=[],a=[],o=[];for(t=0;t<12;t++)n=f([2e3,t]),r=le(this.monthsShort(n,"")),i=le(this.months(n,"")),s.push(r),a.push(i),o.push(i),o.push(r);s.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ie(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Le(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function He(e,t,n){var r=7+t-n;return-(7+Le(e,0,r).getUTCDay()-t)%7+r-1}function ze(e,t,n,r,i){var s,a,o=1+7*(t-1)+(7+n-r)%7+He(e,r,i);return o<=0?a=Oe(s=e-1)+o:o>Oe(e)?(s=e+1,a=o-Oe(e)):(s=e,a=o),{year:s,dayOfYear:a}}function Ge(e,t,n){var r,i,s=He(e.year(),t,n),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?r=a+Ze(i=e.year()-1,t,n):a>Ze(e.year(),t,n)?(r=a-Ze(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ze(e,t,n){var r=He(e,t,n),i=He(e+1,t,n);return(Oe(e)-r+i)/7}function qe(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),oe("w",q,se),oe("ww",q,H),oe("W",q,se),oe("WW",q,H),me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=de(e)}),j("d",0,"do","day"),j("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),j("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),j("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),oe("d",q),oe("e",q),oe("E",q),oe("dd",function(e,t){return t.weekdaysMinRegex(e)}),oe("ddd",function(e,t){return t.weekdaysShortRegex(e)}),oe("dddd",function(e,t){return t.weekdaysRegex(e)}),me(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:m(n).invalidWeekday=e}),me(["d","e","E"],function(e,t,n,r){t[r]=de(e)});var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=ie,Xe=ie,et=ie;function tt(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Te.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Te.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Te.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Te.call(this._weekdaysParse,a))||-1!==(i=Te.call(this._shortWeekdaysParse,a))||-1!==(i=Te.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Te.call(this._shortWeekdaysParse,a))||-1!==(i=Te.call(this._weekdaysParse,a))||-1!==(i=Te.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Te.call(this._minWeekdaysParse,a))||-1!==(i=Te.call(this._weekdaysParse,a))||-1!==(i=Te.call(this._shortWeekdaysParse,a))?i:null}function nt(){function e(e,t){return t.length-e.length}var t,n,r,i,s,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=le(this.weekdaysMin(n,"")),i=le(this.weekdaysShort(n,"")),s=le(this.weekdays(n,"")),a.push(r),o.push(i),u.push(s),l.push(r),l.push(i),l.push(s);a.sort(e),o.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function rt(){return this.hours()%12||12}function it(e,t){j(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function st(e,t){return t._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,rt),j("k",["kk",2],0,function(){return this.hours()||24}),j("hmm",0,0,function(){return""+rt.apply(this)+E(this.minutes(),2)}),j("hmmss",0,0,function(){return""+rt.apply(this)+E(this.minutes(),2)+E(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+E(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+E(this.minutes(),2)+E(this.seconds(),2)}),it("a",!0),it("A",!1),oe("a",st),oe("A",st),oe("H",q,ae),oe("h",q,se),oe("k",q,se),oe("HH",q,H),oe("hh",q,H),oe("kk",q,H),oe("hmm",B),oe("hmmss",J),oe("Hmm",B),oe("Hmmss",J),fe(["H","HH"],we),fe(["k","kk"],function(e,t,n){var r=de(e);t[we]=24===r?0:r}),fe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),fe(["h","hh"],function(e,t,n){t[we]=de(e),m(n).bigHour=!0}),fe("hmm",function(e,t,n){var r=e.length-2;t[we]=de(e.substr(0,r)),t[be]=de(e.substr(r)),m(n).bigHour=!0}),fe("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[we]=de(e.substr(0,r)),t[be]=de(e.substr(r,2)),t[xe]=de(e.substr(i)),m(n).bigHour=!0}),fe("Hmm",function(e,t,n){var r=e.length-2;t[we]=de(e.substr(0,r)),t[be]=de(e.substr(r))}),fe("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[we]=de(e.substr(0,r)),t[be]=de(e.substr(r,2)),t[xe]=de(e.substr(i))});var at,ot=Ye("Hours",!0),ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ne,monthsShort:Ae,week:{dow:0,doy:6},weekdays:Be,weekdaysMin:Qe,weekdaysShort:Je,meridiemParse:/[ap]\.?m?\.?/i},lt={},ct={};function dt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ht(e){return e?e.toLowerCase().replace("_","-"):e}function ft(t){var n=null;if(void 0===lt[t]&&e&&e.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(t))try{n=at._abbr,function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}("./locale/"+t),mt(n)}catch(e){lt[t]=null}return lt[t]}function mt(e,t){var n;return e&&((n=u(t)?yt(e):pt(e,t))?at=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function pt(e,t){if(null!==t){var n,r=ut;if(t.abbr=e,null!=lt[e])O("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."),r=lt[e]._config;else if(null!=t.parentLocale)if(null!=lt[t.parentLocale])r=lt[t.parentLocale]._config;else{if(null==(n=ft(t.parentLocale)))return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;r=n._config}return lt[e]=new Y(M(r,t)),ct[e]&&ct[e].forEach(function(e){pt(e.name,e.config)}),mt(e),lt[e]}return delete lt[e],null}function yt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return at;if(!i(e)){if(t=ft(e))return t;e=[e]}return function(e){for(var t,n,r,i,s=0;s<e.length;){for(t=(i=ht(e[s]).split("-")).length,n=(n=ht(e[s+1]))?n.split("-"):null;t>0;){if(r=ft(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dt(i,n)>=t-1)break;t--}s++}return at}(e)}function gt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[ve]<0||n[ve]>11?ve:n[_e]<1||n[_e]>Ce(n[ge],n[ve])?_e:n[we]<0||n[we]>24||24===n[we]&&(0!==n[be]||0!==n[xe]||0!==n[ke])?we:n[be]<0||n[be]>59?be:n[xe]<0||n[xe]>59?xe:n[ke]<0||n[ke]>999?ke:-1,m(e)._overflowDayOfYear&&(t<ge||t>_e)&&(t=_e),m(e)._overflowWeeks&&-1===t&&(t=Se),m(e)._overflowWeekday&&-1===t&&(t=De),m(e).overflow=t),e}var vt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["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]],xt=[["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/]],kt=/^\/?Date\((-?\d+)/i,St=/^(?:(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}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ot(e){var t,n,r,i,s,a,o=e._i,u=vt.exec(o)||_t.exec(o),l=bt.length,c=xt.length;if(u){for(m(e).iso=!0,t=0,n=l;t<n;t++)if(bt[t][1].exec(u[1])){i=bt[t][0],r=!1!==bt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=c;t<n;t++)if(xt[t][1].exec(u[3])){s=(u[2]||" ")+xt[t][0];break}if(null==s)return void(e._isValid=!1)}if(!r&&null!=s)return void(e._isValid=!1);if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(s||"")+(a||""),Et(e)}else e._isValid=!1}function Tt(e){var t,n,r,i,s,a,o,u,l,c=St.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(n=c[3],r=c[2],i=c[5],s=c[6],a=c[7],o=[(u=c[4],l=parseInt(u,10),l<=49?2e3+l:l<=999?1900+l:l),Ae.indexOf(n),parseInt(r,10),parseInt(i,10),parseInt(s,10)],a&&o.push(parseInt(a,10)),!function(e,t,n){return!e||Je.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],t=o,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return Dt[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(c[8],c[9],c[10]),e._d=Le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Mt(e,t,n){return null!=e?e:null!=t?t:n}function Yt(e){var t,n,i,s,a,o=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[_e]&&null==e._a[ve]&&function(e){var t,n,r,i,s,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,a=4,n=Mt(t.GG,e._a[ge],Ge(Nt(),1,4).year),r=Mt(t.W,1),((i=Mt(t.E,1))<1||i>7)&&(u=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,l=Ge(Nt(),s,a),n=Mt(t.gg,e._a[ge],l.year),r=Mt(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(u=!0)):i=s),r<1||r>Ze(n,s,a)?m(e)._overflowWeeks=!0:null!=u?m(e)._overflowWeekday=!0:(o=ze(n,r,i,s,a),e._a[ge]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=Mt(e._a[ge],i[ge]),(e._dayOfYear>Oe(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Le(a,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[_e]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[we]&&0===e._a[be]&&0===e._a[xe]&&0===e._a[ke]&&(e._nextDay=!0,e._a[we]=0),e._d=(e._useUTC?Le:Ie).apply(null,o),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[we]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(m(e).weekdayMismatch=!0)}}function Et(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],m(e).empty=!0;var t,n,i,s,a,o,u,l=""+e._i,c=l.length,d=0;for(u=(i=$(e._f,e._locale).match(F)||[]).length,t=0;t<u;t++)(n=(l.match(ue(s=i[t],e))||[])[0])&&((a=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),d+=n.length),A[s]?(n?m(e).empty=!1:m(e).unusedTokens.push(s),pe(s,n,e)):e._strict&&!n&&m(e).unusedTokens.push(s);m(e).charsLeftOver=c-d,l.length>0&&m(e).unusedInput.push(l),e._a[we]<=12&&!0===m(e).bigHour&&e._a[we]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[we]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[we],e._meridiem),null!==(o=m(e).era)&&(e._a[ge]=e._locale.erasConvertYear(o,e._a[ge])),Yt(e),gt(e)}else Tt(e);else Ot(e)}function Ft(e){var t=e._i,n=e._f;return e._locale=e._locale||yt(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new w(gt(t)):(c(t)?e._d=t:i(n)?function(e){var t,n,r,i,s,a,o=!1,u=e._f.length;if(0===u)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<u;i++)s=0,a=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Et(t),p(t)&&(a=!0),s+=m(t).charsLeftOver,s+=10*m(t).unusedTokens.length,m(t).score=s,o?s<r&&(r=s,n=t):(null==r||s<r||a)&&(r=s,n=t,a&&(o=!0));h(e,n||t)}(e):n?Et(e):function(e){var t=e._i;u(t)?e._d=new Date(r.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=kt.exec(e._i);null===t?(Ot(e),!1===e._isValid&&(delete e._isValid,Tt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),Yt(e)):s(t)?function(e){if(!e._d){var t=W(e._i);e._a=d([t.year,t.month,void 0===t.day?t.date:t.day,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Yt(e)}}(e):l(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),p(e)||(e._d=null),e))}function Ct(e,t,n,r,a){var u,l={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&o(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=r,(u=new w(gt(Ft(l))))._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function Nt(e,t,n,r){return Ct(e,t,n,r,!1)}r.createFromInputFallback=k("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":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var At=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Nt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()}),jt=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Nt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()});function Pt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Nt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var $t=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rt(e){var t=W(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,u=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,i=$t.length;for(t in e)if(a(e,t)&&(-1===Te.call($t,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[$t[n]]){if(r)return!1;parseFloat(e[$t[n]])!==de(e[$t[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*u*60*60,this._days=+o+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=yt(),this._bubble()}function Vt(e){return e instanceof Rt}function Wt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ut(e,t){j(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+E(~~(e/60),2)+t+E(~~e%60,2)})}Ut("Z",":"),Ut("ZZ",""),oe("Z",re),oe("ZZ",re),fe(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Lt(re,e)});var It=/([\+\-]|\d\d)/gi;function Lt(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(It)||["-",0,0])[1]+de(n[2]))?0:"+"===n[0]?r:-r}function Ht(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(b(e)||c(e)?e.valueOf():Nt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Nt(e).local()}function zt(e){return-Math.round(e._d.getTimezoneOffset())}function Gt(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Zt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,qt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Bt(e,t){var n,r,i,s,o,u,c=e,d=null;return Vt(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(c={},t?c[t]=+e:c.milliseconds=+e):(d=Zt.exec(e))?(n="-"===d[1]?-1:1,c={y:0,d:de(d[_e])*n,h:de(d[we])*n,m:de(d[be])*n,s:de(d[xe])*n,ms:de(Wt(1e3*d[ke]))*n}):(d=qt.exec(e))?c={y:Jt(d[2],n="-"===d[1]?-1:1),M:Jt(d[3],n),w:Jt(d[4],n),d:Jt(d[5],n),h:Jt(d[6],n),m:Jt(d[7],n),s:Jt(d[8],n)}:null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(s=Nt(c.from),o=Nt(c.to),i=s.isValid()&&o.isValid()?(o=Ht(o,s),s.isBefore(o)?u=Qt(s,o):((u=Qt(o,s)).milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0},(c={}).ms=i.milliseconds,c.M=i.months),r=new Rt(c),Vt(e)&&a(e,"_locale")&&(r._locale=e._locale),Vt(e)&&a(e,"_isValid")&&(r._isValid=e._isValid),r}function Jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Qt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Kt(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(O(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=n,n=r,r=i),Xt(this,Bt(n,r),e),this}}function Xt(e,t,n,i){var s=t._milliseconds,a=Wt(t._days),o=Wt(t._months);e.isValid()&&(i=null==i||i,o&&Ve(e,Ee(e,"Month")+o*n),a&&Fe(e,"Date",Ee(e,"Date")+a*n),s&&e._d.setTime(e._d.valueOf()+s*n),i&&r.updateOffset(e,a||o))}Bt.fn=Rt.prototype,Bt.invalid=function(){return Bt(NaN)};var en=Kt(1,"add"),tn=Kt(-1,"subtract");function nn(e){return"string"==typeof e||e instanceof String}function rn(e,t){if(e.date()<t.date())return-rn(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function sn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yt(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=k("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 on(){return this._locale}var un=1e3,ln=6e4,cn=36e5,dn=126227808e5;function hn(e,t){return(e%t+t)%t}function fn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-dn:new Date(e,t,n).valueOf()}function mn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-dn:Date.UTC(e,t,n)}function pn(e,t){return t.erasAbbrRegex(e)}function yn(){var e,t,n,r,i,s=[],a=[],o=[],u=[],l=this.eras();for(e=0,t=l.length;e<t;++e)n=le(l[e].name),r=le(l[e].abbr),i=le(l[e].narrow),a.push(n),s.push(r),o.push(i),u.push(n),u.push(r),u.push(i);this._erasRegex=new RegExp("^("+u.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function gn(e,t){j(0,[e,e.length],0,t)}function vn(e,t,n,r,i){var s;return null==e?Ge(this,r,i).year:(t>(s=Ze(e,r,i))&&(t=s),_n.call(this,e,t,n,r,i))}function _n(e,t,n,r,i){var s=ze(e,t,n,r,i),a=Le(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),oe("N",pn),oe("NN",pn),oe("NNN",pn),oe("NNNN",function(e,t){return t.erasNameRegex(e)}),oe("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),fe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?m(n).era=i:m(n).invalidEra=e}),oe("y",ee),oe("yy",ee),oe("yyy",ee),oe("yyyy",ee),oe("yo",function(e,t){return t._eraYearOrdinalRegex||ee}),fe(["y","yy","yyy","yyyy"],ge),fe(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),t[ge]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,i):parseInt(e,10)}),j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),gn("gggg","weekYear"),gn("ggggg","weekYear"),gn("GGGG","isoWeekYear"),gn("GGGGG","isoWeekYear"),oe("G",te),oe("g",te),oe("GG",q,H),oe("gg",q,H),oe("GGGG",K,G),oe("gggg",K,G),oe("GGGGG",X,Z),oe("ggggg",X,Z),me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=de(e)}),me(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),j("Q",0,"Qo","quarter"),oe("Q",L),fe("Q",function(e,t){t[ve]=3*(de(e)-1)}),j("D",["DD",2],"Do","date"),oe("D",q,se),oe("DD",q,H),oe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),fe(["D","DD"],_e),fe("Do",function(e,t){t[_e]=de(e.match(q)[0])});var wn=Ye("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),oe("DDD",Q),oe("DDDD",z),fe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=de(e)}),j("m",["mm",2],0,"minute"),oe("m",q,ae),oe("mm",q,H),fe(["m","mm"],be);var bn=Ye("Minutes",!1);j("s",["ss",2],0,"second"),oe("s",q,ae),oe("ss",q,H),fe(["s","ss"],xe);var xn,kn,Sn=Ye("Seconds",!1);for(j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),oe("S",Q,L),oe("SS",Q,H),oe("SSS",Q,z),xn="SSSS";xn.length<=9;xn+="S")oe(xn,ee);function Dn(e,t){t[ke]=de(1e3*("0."+e))}for(xn="S";xn.length<=9;xn+="S")fe(xn,Dn);kn=Ye("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var On=w.prototype;function Tn(e){return e}On.add=en,On.calendar=function(e,t){var n;1===arguments.length&&(arguments[0]?b(n=arguments[0])||c(n)||nn(n)||l(n)||function(e){var t=i(e),n=!1;return t&&(n=0===e.filter(function(t){return!l(t)&&nn(e)}).length),t&&n}(n)||function(e){var t,n=s(e)&&!o(e),r=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=i.length;for(t=0;t<u;t+=1)r=r||a(e,i[t]);return n&&r}(n)||null==n?(e=arguments[0],t=void 0):function(e){var t,n=s(e)&&!o(e),r=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)r=r||a(e,i[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var u=e||Nt(),d=Ht(u,this).startOf("day"),h=r.calendarFormat(this,d)||"sameElse",f=t&&(T(t[h])?t[h].call(this,u):t[h]);return this.format(f||this.localeData().calendar(h,this,Nt(u)))},On.clone=function(){return new w(this)},On.diff=function(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(!(r=Ht(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=V(t)){case"year":s=rn(this,r)/12;break;case"month":s=rn(this,r);break;case"quarter":s=rn(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:ce(s)},On.endOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mn:fn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=cn-hn(t+(this._isUTC?0:this.utcOffset()*ln),cn)-1;break;case"minute":t=this._d.valueOf(),t+=ln-hn(t,ln)-1;break;case"second":t=this._d.valueOf(),t+=un-hn(t,un)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},On.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=P(this,e);return this.localeData().postformat(t)},On.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Nt(e).isValid())?Bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},On.fromNow=function(e){return this.from(Nt(),e)},On.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Nt(e).isValid())?Bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},On.toNow=function(e){return this.to(Nt(),e)},On.get=function(e){return T(this[e=V(e)])?this[e]():this},On.invalidAt=function(){return m(this).overflow},On.isAfter=function(e,t){var n=b(e)?e:Nt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},On.isBefore=function(e,t){var n=b(e)?e:Nt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},On.isBetween=function(e,t,n,r){var i=b(e)?e:Nt(e),s=b(t)?t:Nt(t);return!!(this.isValid()&&i.isValid()&&s.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(s,n):!this.isAfter(s,n))},On.isSame=function(e,t){var n,r=b(e)?e:Nt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},On.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},On.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},On.isValid=function(){return p(this)},On.lang=an,On.locale=sn,On.localeData=on,On.max=jt,On.min=At,On.parsingFlags=function(){return h({},m(this))},On.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:I[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=W(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(T(this[e=V(e)]))return this[e](t);return this},On.startOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mn:fn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*ln),cn);break;case"minute":t=this._d.valueOf(),t-=hn(t,ln);break;case"second":t=this._d.valueOf(),t-=hn(t,un)}return this._d.setTime(t),r.updateOffset(this,!0),this},On.subtract=tn,On.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},On.toObject=function(){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()}},On.toDate=function(){return new Date(this.valueOf())},On.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?P(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",P(n,"Z")):P(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},On.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(On[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),On.toJSON=function(){return this.isValid()?this.toISOString():null},On.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},On.unix=function(){return Math.floor(this.valueOf()/1e3)},On.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},On.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},On.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},On.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},On.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},On.eraYear=function(){var e,t,n,i,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,i=this.clone().startOf("day").valueOf(),s[e].since<=i&&i<=s[e].until||s[e].until<=i&&i<=s[e].since)return(this.year()-r(s[e].since).year())*n+s[e].offset;return this.year()},On.year=Me,On.isLeapYear=function(){return ye(this.year())},On.weekYear=function(e){return vn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},On.isoWeekYear=function(e){return vn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},On.quarter=On.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},On.month=We,On.daysInMonth=function(){return Ce(this.year(),this.month())},On.week=On.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},On.isoWeek=On.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},On.weeksInYear=function(){var e=this.localeData()._week;return Ze(this.year(),e.dow,e.doy)},On.weeksInWeekYear=function(){var e=this.localeData()._week;return Ze(this.weekYear(),e.dow,e.doy)},On.isoWeeksInYear=function(){return Ze(this.year(),1,4)},On.isoWeeksInISOWeekYear=function(){return Ze(this.isoWeekYear(),1,4)},On.date=wn,On.day=On.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=Ee(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},On.weekday=function(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")},On.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},On.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},On.hour=On.hours=ot,On.minute=On.minutes=bn,On.second=On.seconds=Sn,On.millisecond=On.milliseconds=kn,On.utcOffset=function(e,t,n){var i,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Lt(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=zt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==e&&(!t||this._changeInProgress?Xt(this,Bt(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:zt(this)},On.utc=function(e){return this.utcOffset(0,e)},On.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},On.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Lt(ne,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},On.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Nt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},On.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},On.isLocal=function(){return!!this.isValid()&&!this._isUTC},On.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},On.isUtc=Gt,On.isUTC=Gt,On.zoneAbbr=function(){return this._isUTC?"UTC":""},On.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},On.dates=k("dates accessor is deprecated. Use date instead.",wn),On.months=k("months accessor is deprecated. Use month instead",We),On.years=k("years accessor is deprecated. Use year instead",Me),On.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),On.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Ft(t))._a?(e=t._isUTC?f(t._a):Nt(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var n,r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(n=0;n<r;n++)de(e[n])!==de(t[n])&&s++;return s+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var Mn=Y.prototype;function Yn(e,t,n,r){var i=yt(),s=f().set(r,t);return i[n](s,e)}function En(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return Yn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Yn(e,r,n,"month");return i}function Fn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,s=yt(),a=e?s._week.dow:0,o=[];if(null!=n)return Yn(t,(n+a)%7,r,"day");for(i=0;i<7;i++)o[i]=Yn(t,(i+a)%7,r,"day");return o}Mn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r},Mn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(F).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},Mn.invalidDate=function(){return this._invalidDate},Mn.ordinal=function(e){return this._ordinal.replace("%d",e)},Mn.preparse=Tn,Mn.postformat=Tn,Mn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return T(i)?i(e,t,n,r):i.replace(/%d/i,e)},Mn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)},Mn.set=function(e){var t,n;for(n in e)a(e,n)&&(T(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Mn.eras=function(e,t){var n,i,s,a=this._eras||yt("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"==typeof a[n].since&&(s=r(a[n].since).startOf("day"),a[n].since=s.valueOf()),typeof a[n].until){case"undefined":a[n].until=Infinity;break;case"string":s=r(a[n].until).startOf("day").valueOf(),a[n].until=s.valueOf()}return a},Mn.erasParse=function(e,t,n){var r,i,s,a,o,u=this.eras();for(e=e.toUpperCase(),r=0,i=u.length;r<i;++r)if(s=u[r].name.toUpperCase(),a=u[r].abbr.toUpperCase(),o=u[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[r];break;case"NNNN":if(s===e)return u[r];break;case"NNNNN":if(o===e)return u[r]}else if([s,a,o].indexOf(e)>=0)return u[r]},Mn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},Mn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||yn.call(this),e?this._erasAbbrRegex:this._erasRegex},Mn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||yn.call(this),e?this._erasNameRegex:this._erasRegex},Mn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||yn.call(this),e?this._erasNarrowRegex:this._erasRegex},Mn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||je).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Mn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[je.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Mn.monthsParse=function(e,t,n){var r,i,s;if(this._monthsParseExact)return Re.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Mn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ue.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=$e),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Mn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ue.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Pe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Mn.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},Mn.firstDayOfYear=function(){return this._week.doy},Mn.firstDayOfWeek=function(){return this._week.dow},Mn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?qe(n,this._week.dow):e?n[e.day()]:n},Mn.weekdaysMin=function(e){return!0===e?qe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Mn.weekdaysShort=function(e){return!0===e?qe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Mn.weekdaysParse=function(e,t,n){var r,i,s;if(this._weekdaysParseExact)return tt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Mn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Mn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Xe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Mn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=et),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Mn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Mn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},mt("en",{eras:[{since:"0001-01-01",until:Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,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===de(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",mt),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",yt);var Cn=Math.abs;function Nn(e,t,n,r){var i=Bt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function An(e){return e<0?Math.floor(e):Math.ceil(e)}function jn(e){return 4800*e/146097}function Pn(e){return 146097*e/4800}function $n(e){return function(){return this.as(e)}}var Rn=$n("ms"),Vn=$n("s"),Wn=$n("m"),Un=$n("h"),In=$n("d"),Ln=$n("w"),Hn=$n("M"),zn=$n("Q"),Gn=$n("y"),Zn=Rn;function qn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Bn=qn("milliseconds"),Jn=qn("seconds"),Qn=qn("minutes"),Kn=qn("hours"),Xn=qn("days"),er=qn("months"),tr=qn("years"),nr=Math.round,rr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ir(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var sr=Math.abs;function ar(e){return(e>0)-(e<0)||+e}function or(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,a,o,u=sr(this._milliseconds)/1e3,l=sr(this._days),c=sr(this._months),d=this.asSeconds();return d?(e=ce(u/60),t=ce(e/60),u%=60,e%=60,n=ce(c/12),c%=12,r=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",s=ar(this._months)!==ar(d)?"-":"",a=ar(this._days)!==ar(d)?"-":"",o=ar(this._milliseconds)!==ar(d)?"-":"",i+"P"+(n?s+n+"Y":"")+(c?s+c+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+r+"S":"")):"P0D"}var ur=Rt.prototype;return ur.isValid=function(){return this._isValid},ur.abs=function(){var e=this._data;return this._milliseconds=Cn(this._milliseconds),this._days=Cn(this._days),this._months=Cn(this._months),e.milliseconds=Cn(e.milliseconds),e.seconds=Cn(e.seconds),e.minutes=Cn(e.minutes),e.hours=Cn(e.hours),e.months=Cn(e.months),e.years=Cn(e.years),this},ur.add=function(e,t){return Nn(this,e,t,1)},ur.subtract=function(e,t){return Nn(this,e,t,-1)},ur.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(n=this._months+jn(t=this._days+r/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Pn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},ur.asMilliseconds=Rn,ur.asSeconds=Vn,ur.asMinutes=Wn,ur.asHours=Un,ur.asDays=In,ur.asWeeks=Ln,ur.asMonths=Hn,ur.asQuarters=zn,ur.asYears=Gn,ur.valueOf=Zn,ur._bubble=function(){var e,t,n,r,i,s=this._milliseconds,a=this._days,o=this._months,u=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*An(Pn(o)+a),a=0,o=0),u.milliseconds=s%1e3,e=ce(s/1e3),u.seconds=e%60,t=ce(e/60),u.minutes=t%60,n=ce(t/60),u.hours=n%24,a+=ce(n/24),o+=i=ce(jn(a)),a-=An(Pn(i)),r=ce(o/12),o%=12,u.days=a,u.months=o,u.years=r,this},ur.clone=function(){return Bt(this)},ur.get=function(e){return e=V(e),this.isValid()?this[e+"s"]():NaN},ur.milliseconds=Bn,ur.seconds=Jn,ur.minutes=Qn,ur.hours=Kn,ur.days=Xn,ur.weeks=function(){return ce(this.days()/7)},ur.months=er,ur.years=tr,ur.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=rr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(s=Object.assign({},rr,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),r=function(e,t,n,r){var i=Bt(e).abs(),s=nr(i.as("s")),a=nr(i.as("m")),o=nr(i.as("h")),u=nr(i.as("d")),l=nr(i.as("M")),c=nr(i.as("w")),d=nr(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),(h=h||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,ir.apply(null,h)}(this,!i,s,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},ur.toISOString=or,ur.toString=or,ur.toJSON=or,ur.locale=sn,ur.localeData=on,ur.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",or),ur.lang=an,j("X",0,0,"unix"),j("x",0,0,"valueOf"),oe("x",te),oe("X",/[+-]?\d+(\.\d{1,3})?/),fe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),fe("x",function(e,t,n){n._d=new Date(de(e))}),r.version="2.30.1",t=Nt,r.fn=On,r.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},r.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return Nt(1e3*e)},r.months=function(e,t){return En(e,t,"months")},r.isDate=c,r.locale=mt,r.invalid=y,r.duration=Bt,r.isMoment=b,r.weekdays=function(e,t,n){return Fn(e,t,n,"weekdays")},r.parseZone=function(){return Nt.apply(null,arguments).parseZone()},r.localeData=yt,r.isDuration=Vt,r.monthsShort=function(e,t){return En(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return Fn(e,t,n,"weekdaysMin")},r.defineLocale=pt,r.updateLocale=function(e,t){if(null!=t){var n,r,i=ut;null!=lt[e]&&null!=lt[e].parentLocale?lt[e].set(M(lt[e]._config,t)):(null!=(r=ft(e))&&(i=r._config),t=M(i,t),null==r&&(t.abbr=e),(n=new Y(t)).parentLocale=lt[e],lt[e]=n),mt(e)}else null!=lt[e]&&(null!=lt[e].parentLocale?(lt[e]=lt[e].parentLocale,e===mt()&&mt(e)):null!=lt[e]&&delete lt[e]);return lt[e]},r.locales=function(){return S(lt)},r.weekdaysShort=function(e,t,n){return Fn(e,t,n,"weekdaysShort")},r.normalizeUnits=V,r.relativeTimeRounding=function(e){return void 0===e?nr:"function"==typeof e&&(nr=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==rr[e]&&(void 0===t?rr[e]:(rr[e]=t,"s"===e&&(rr.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=On,r.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"},r}()},O(T={exports:{}}),T.exports),Y={en:{translation:{Loading:"Loading",Workplaces:"Workplaces","Select and arrange the order":"Select and arrange the order",Cancel:"Cancel",Save:"Save","History timeline time info now":"now",Settings:"Settings"}},pl:{translation:{Loading:"Wczytywanie",Workplaces:"Stanowiska","Select and arrange the order":"Wybierz i ustal kolejność",Cancel:"Anuluj",Save:"Zapisz","History timeline time info now":"teraz",Settings:"Ustawienia"}}},E="1.2.1",F=function(n){var a,o=n.data,l=n.formProps,c=e.useState("1"),d=c[0],h=c[1],f=r.useTranslation().t;return u.default.createElement(u.default.Fragment,null,u.default.createElement(i.TabContext,{value:d},u.default.createElement(s.Box,{sx:{borderBottom:1,borderColor:"divider"}},u.default.createElement(i.TabList,{onChange:function(e,t){h(t)}},u.default.createElement(s.Tab,{label:f("Workplaces"),value:"1"}))),u.default.createElement(i.TabPanel,{value:"1"},u.default.createElement(t.SortableSelect,{placeholder:f("Select and arrange the order")+"...",options:null==(a=o.workplaces)?void 0:a.map(function(e){return{label:e.name,value:e.id}}),selected:l.values.workplacesIds,onChange:function(e){return l.setFieldValue("workplacesIds",[].concat(e))}}))))},C=function(e,t,n){var r=e.startedAt.isAfter(t.startedAt)?e.startedAt:M(t.startedAt);return r&&t.finishedAt?Math.abs(r.diff(M(t.finishedAt),"seconds")):Math.abs(M(n).diff(r,"seconds"))},N=function(e){switch(e){case"green":return"#2ACB42";case"red":return"#FF453A";case"yellow":return"#FFC12F";default:return"grey"}},A=function(){return A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},A.apply(this,arguments)},j=function(t){var n=t.animate,r=void 0===n||n,i=t.backgroundColor,s=void 0===i?"#f5f6f7":i,a=t.backgroundOpacity,o=void 0===a?1:a,u=t.baseUrl,l=void 0===u?"":u,c=t.children,d=t.foregroundColor,h=void 0===d?"#eee":d,f=t.foregroundOpacity,m=void 0===f?1:f,p=t.gradientRatio,y=void 0===p?2:p,g=t.uniqueKey,v=t.rtl,_=void 0!==v&&v,w=t.speed,b=void 0===w?1.2:w,x=t.style,k=void 0===x?{}:x,S=t.title,D=void 0===S?"Loading...":S,O=t.beforeMask,T=void 0===O?null:O,M=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["animate","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","uniqueKey","rtl","speed","style","title","beforeMask"]),Y=g||Math.random().toString(36).substring(6),E="".concat(Y,"-diff"),F="".concat(Y,"-animated-diff"),C="".concat(Y,"-aria"),N=_?{transform:"scaleX(-1)"}:null,j="".concat(b,"s"),P="".concat(-1*y," 0"),$="".concat(y," 0");return e.createElement("svg",A({"aria-labelledby":C,role:"img",style:A(A({},k),N)},M),D?e.createElement("title",{id:C},D):null,T&&e.isValidElement(T)?T:null,e.createElement("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url(".concat(l,"#").concat(E,")"),style:{fill:"url(".concat(l,"#").concat(F,")")}}),e.createElement("defs",null,e.createElement("clipPath",{id:E},c),e.createElement("linearGradient",{id:F,gradientTransform:"translate(".concat(P,")")},e.createElement("stop",{offset:"0%",stopColor:s,stopOpacity:o}),e.createElement("stop",{offset:"50%",stopColor:h,stopOpacity:m}),e.createElement("stop",{offset:"100%",stopColor:s,stopOpacity:o}),r&&e.createElement("animateTransform",{attributeName:"gradientTransform",type:"translate",values:"".concat(P,"; 0 0; ").concat($),dur:j,repeatCount:"indefinite"}))))},P=function(t){return e.createElement(t.children?j:$,A({},t))},$=function(t){return e.createElement(P,A({viewBox:"0 0 476 124"},t),e.createElement("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),e.createElement("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),e.createElement("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),e.createElement("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),e.createElement("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),e.createElement("circle",{cx:"20",cy:"20",r:"20"}))},R=P,V=function(){return u.default.createElement(R,{"data-testid":"timeline-loading",height:"28",width:"100%",speed:1.5,backgroundColor:"#3d3d3d",foregroundColor:"#ffffff"},u.default.createElement("rect",{x:"4%",y:"10",ry:"6",width:"92%",height:"14"}))},W=a.styled("div")({display:"flex",flexGrow:1,alignItems:"center",padding:"10px 0",background:"#282828","&:nth-of-type(2n)":{background:"#313131"}}),U=a.styled("div")({display:"flex",margin:"6px 0",zIndex:3,flexDirection:"row",height:"20px",width:"100%",overflow:"hidden",borderRadius:"4px",backgroundColor:"#3F3F3F"});a.styled("div")({display:"flex",alignItems:"center",justifyContent:"space-between"});var I=a.styled("span")({margin:"0 1.5em",fontSize:"12px",fontWeight:500,lineHeight:"12px",color:"rgba(255, 255, 255, 0.5)"}),L=a.styled("div")(function(e){return{flexBasis:e.percentWidth+"%",flexShrink:0,backgroundColor:N(e.color),"&:first-of-type":{borderTopLeftRadius:"4px",borderBottomLeftRadius:"4px"}}}),H=function(t){var n=t.title,r=t.shift,i=t.statusChanges,a=t.loading,o=e.useState([]),l=o[0],c=o[1],d=e.useCallback(function(){return r?Math.abs(r.startedAt.diff(r.finishedAt,"seconds")):0},[r]),h=e.useCallback(function(e){var t=M(e.startedAt),n=e.finishedAt?M(e.finishedAt):null;return!!r&&(t.isBetween(r.startedAt,r.finishedAt)||(null==n?void 0:n.isBetween(r.startedAt,r.finishedAt))||t.isBefore(r.startedAt)&&!n)},[r]),f=e.useState(function(){return d()}),m=f[0],p=f[1];return e.useEffect(function(){p(d())},[r,d]),e.useEffect(function(){c(i.filter(function(e){return h(e)}))},[i,h]),a?u.default.createElement(V,null):u.default.createElement(W,null,u.default.createElement(s.Typography,{sx:{display:n?"block":"none",flexBasis:"25%",marginLeft:"20px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:"white"}},n),r&&u.default.createElement(u.default.Fragment,null,u.default.createElement(I,null,r.startedAt.format("HH:mm")),u.default.createElement(U,{"data-testid":"timeline"},null==l?void 0:l.map(function(e){return e.reason.statusColor&&u.default.createElement(L,{"data-testid":"timeline-element-"+e.id+"-color-"+e.reason.statusColor,key:""+e.id+e.author.id,color:e.reason.statusColor,percentWidth:Math.min(C(r,e,new Date)/m*100,100)})})),u.default.createElement(I,null,r.finishedAt.format("HH:mm"))))},z=function(n){var r=n.data,i=n.settings,a=e.useState(null),o=a[0],l=a[1],c=function(e){var t,n,s=r.workplaces;return 1===(null==i||null==(t=i.workplacesIds)?void 0:t.length)?"":(null==s||null==(n=s.find(function(t){return t.id===e}))?void 0:n.name)||""};return e.useEffect(function(){var e=function(){var e=M();l(t.getCurrentShift(e,t.normalizeShifts((null==r?void 0:r.shifts)||[],e)))},n=setInterval(function(){return e()},1e4);return e(),function(){clearInterval(n)}},[null==r?void 0:r.shifts]),u.default.createElement(s.Box,{display:"flex",flexDirection:"column",height:"100%"},null==i?void 0:i.workplacesIds.map(function(e){var t;return u.default.createElement(H,{key:e,title:c(e),shift:o,statusChanges:(null==(t=r.statusChanges)?void 0:t.filter(function(t){return t.workplaceId===e}))||[],loading:void 0===r})}))};function G(e){this._maxSize=e,this.clear()}G.prototype.clear=function(){this._size=0,this._values=Object.create(null)},G.prototype.get=function(e){return this._values[e]},G.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Z=/[^.^\]^[]+|(?=\[\]|\.\.)/g,q=/^\d+$/,B=/^\d/,J=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Q=/^\s*(['"]?)(.*?)(\1)\s*$/,K=new G(512),X=new G(512),ee=new G(512),te={Cache:G,split:re,normalizePath:ne,setter:function(e){var t=ne(e);return X.get(e)||X.set(e,function(e,n){for(var r=0,i=t.length,s=e;r<i-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;s=s[t[r++]]}s[t[r]]=n})},getter:function(e,t){var n=ne(e);return ee.get(e)||ee.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(ie(t)||q.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,s,a,o=e.length;for(i=0;i<o;i++)(r=e[i])&&(se(r)&&(r='"'+r+'"'),s=!(a=ie(r))&&/^\d+$/.test(r),t.call(n,r,a,s,i,e))}(Array.isArray(e)?e:re(e),t,n)}};function ne(e){return K.get(e)||K.set(e,re(e).map(function(e){return e.replace(Q,"$2")}))}function re(e){return e.match(Z)||[""]}function ie(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function se(e){return!ie(e)&&(function(e){return e.match(B)&&!e.match(q)}(e)||function(e){return J.test(e)}(e))}const ae=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,oe=e=>e.match(ae)||[];var ue=e=>oe(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,""),le=e=>(e=>oe(e).join("_").toLowerCase())(e),ce=function(e){return de(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)};function de(e,t){var n=e.length,r=new Array(n),i={},s=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!o.has(e[0])||!o.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||u(e[s],s,new Set);return r;function u(e,t,s){if(s.has(e)){var l;try{l=", node was:"+JSON.stringify(e)}catch(e){l=""}throw new Error("Cyclic dependency"+l)}if(!o.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=a.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var d=c[--t];u(d,o.get(d),s)}while(t);s.delete(e)}r[--n]=e}}}ce.array=de;const he=Object.prototype.toString,fe=Error.prototype.toString,me=RegExp.prototype.toString,pe="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",ye=/^Symbol\((.*)\)(.*)$/;function ge(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return pe.call(e).replace(ye,"Symbol($1)");const r=he.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+fe.call(e)+"]":"RegExp"===r?me.call(e):null}function ve(e,t){let n=ge(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=ge(this[e],t);return null!==r?r:n},2)}function _e(e){return null==e?[]:[].concat(e)}let we,be,xe,ke=/\$\{\s*(\w+)\s*\}/g;we=Symbol.toStringTag;class Se{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[we]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],_e(e).forEach(e=>{De.isError(e)?(this.errors.push(...e.errors),this.inner.push(...e.inner.length?e.inner:[e])):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}be=Symbol.hasInstance,xe=Symbol.toStringTag;class De extends Error{static formatError(e,t){return t=Object.assign({},t,{path:t.label||t.path||"this",originalPath:t.path}),"string"==typeof e?e.replace(ke,(e,n)=>ve(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,i){const s=new Se(e,t,n,r);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[xe]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,De)}static[be](e){return Se[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Oe={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=null!=r&&r!==n?` (cast from the value \`${ve(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${ve(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ve(n,!0)}\``+i}},Te={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Me={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ye={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ee={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Fe={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${ve(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${ve(n,!0)}\``}return De.formatError(Oe.notType,e)}};var Ce=Object.assign(Object.create(null),{mixed:Oe,string:Te,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:Me,object:Ye,array:Ee,boolean:{isValue:"${path} field must be ${value}"},tuple:Fe});const Ne=e=>e&&e.__isYupSchema__;class Ae{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new Ae(e,(e,t)=>{var n;let a=s(...e)?r:i;return null!=(n=null==a?void 0:a(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!Ne(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}class je{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue,this.path=this.key.slice((this.isContext?"$":this.isValue?".":"").length),this.getter=this.path&&te.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}je.prototype.__isYupRef=!0;const Pe=e=>null==e;function $e(e){function t({value:t,path:n="",options:r,originalValue:i,schema:s},a,o){const{name:u,test:l,params:c,message:d,skipAbsent:h}=e;let{parent:f,context:m,abortEarly:p=s.spec.abortEarly,disableStackTrace:y=s.spec.disableStackTrace}=r;function g(e){return je.isRef(e)?e.getValue(t,f,m):e}function v(e={}){const r=Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||y},c,e.params);for(const e of Object.keys(r))r[e]=g(r[e]);const a=new De(De.formatError(e.message||d,r),t,r.path,e.type||u,r.disableStackTrace);return a.params=r,a}const _=p?a:o;let w={path:n,parent:f,type:u,from:r.from,createError:v,resolve:g,options:r,originalValue:i,schema:s};const b=e=>{De.isError(e)?_(e):e?o(null):_(v())},x=e=>{De.isError(e)?_(e):a(e)};if(h&&Pe(t))return b(!0);let k;try{var S;if(k=l.call(w,t,w),"function"==typeof(null==(S=k)?void 0:S.then)){if(r.sync)throw new Error(`Validation test of type: "${w.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(k).then(b,x)}}catch(e){return void x(e)}b(k)}return t.OPTIONS=e,t}function Re(e,t,n,r=n){let i,s,a;return t?(te.forEach(t,(o,u,l)=>{let c=u?o.slice(1,o.length-1):o,d="tuple"===(e=e.resolve({context:r,parent:i,value:n})).type,h=l?parseInt(c,10):0;if(e.innerType||d){if(d&&!l)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&h>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[h],e=d?e.spec.types[h]:e.innerType}if(!l){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);i=n,n=n&&n[c],e=e.fields[c]}s=c,a=u?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Ve extends Set{describe(){const e=[];for(const t of this.values())e.push(je.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Ve(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function We(e,t=new Map){if(Ne(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=We(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,We(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(We(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=We(i,t)}return n}class Ue{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Ve,this._blacklist=new Ve,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Oe.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=We(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,i=n._cast(e,t);if(!1!==t.assert&&!n.isType(i)){if(r&&Pe(i))return i;let s=ve(e),a=ve(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(a!==s?`result of cast: ${a}`:""))}return i}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:i,originalValue:s=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let u=[];for(let e of Object.values(this.internalTests))e&&u.push(e);this.runTests({path:i,value:o,originalValue:s,options:t,tests:u},n,e=>{if(e.length)return r(e,o);this.runTests({path:i,value:o,originalValue:s,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:i,value:s,originalValue:a,path:o,options:u}=e,l=e=>{r||(r=!0,t(e,s))},c=e=>{r||(r=!0,n(e,s))},d=i.length,h=[];if(!d)return c([]);let f={value:s,originalValue:a,path:o,options:u,schema:this};for(let e=0;e<i.length;e++)(0,i[e])(f,l,function(e){e&&(Array.isArray(e)?h.push(...e):h.push(e)),--d<=0&&c(h)})}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:i,options:s}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let u=n[a];const l=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(l)._validate(u,l,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,s)=>r._validate(e,t,(e,t)=>{De.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new De(e,t,void 0,void 0,i)):n(t)}))}validateSync(e,t){var n;let r,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw De.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new De(t,e,void 0,void 0,s);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(De.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(De.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):We(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=$e({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=$e({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=Oe.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Oe.notNull){return this.nullability(!1,e)}required(e=Oe.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=Oe.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=$e(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=_e(e).map(e=>new je(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new Ae(r,t):Ae.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=$e({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Oe.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=$e({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=Oe.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=$e({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:i,nullable:s}=t.spec,a={meta:r,label:n,optional:i,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return a}}Ue.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ue.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:a}=Re(this,t,n,r.context);return a[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Ue.prototype[e]=Ue.prototype.oneOf;for(const e of["not","nope"])Ue.prototype[e]=Ue.prototype.notOneOf;const Ie=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Le(e){var t,n;const r=Ie.exec(e);return r?{year:He(r[1]),month:He(r[2],1)-1,day:He(r[3],1),hour:He(r[4]),minute:He(r[5]),second:He(r[6]),millisecond:r[7]?He(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:He(r[10]),minuteOffset:He(r[11])}:null}function He(e,t=0){return Number(e)||t}let ze=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ge=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Ze=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,qe=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),Be=e=>Pe(e)||e===e.trim(),Je={}.toString();function Qe(){return new Ke}class Ke extends Ue{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t,n)=>{if(!n.spec.coerce||n.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===Je?e:r})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Oe.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=Te.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=Te.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=Te.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||Te.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=Te.email){return this.matches(ze,{name:"email",message:e,excludeEmptyString:!0})}url(e=Te.url){return this.matches(Ge,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Te.uuid){return this.matches(Ze,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(qe,{name:"datetime",message:r||Te.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Te.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=Le(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||Te.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=Le(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Te.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:Be})}lowercase(e=Te.lowercase){return this.transform(e=>Pe(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Pe(e)||e===e.toLowerCase()})}uppercase(e=Te.uppercase){return this.transform(e=>Pe(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Pe(e)||e===e.toUpperCase()})}}Qe.prototype=Ke.prototype;let Xe=new Date("");class et extends Ue{constructor(){super({type:"date",check:e=>"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())}),this.withMutation(()=>{this.transform((e,t,n)=>!n.spec.coerce||n.isType(e)||null===e?e:(e=function(e){const t=Le(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?et.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(je.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=Me.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=Me.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function tt(e,t){let n=Infinity;return e.some((e,r)=>{var i;if(null!=(i=t.path)&&i.includes(e))return n=r,!0}),n}function nt(e){return(t,n)=>tt(e,t)-tt(e,n)}et.INVALID_DATE=Xe;const rt=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function it(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=it(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=it(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(it)}):"optional"in e?e.optional():e}let st=e=>"[object Object]"===Object.prototype.toString.call(e);function at(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const ot=nt([]);function ut(e){return new lt(e)}class lt extends Ue{constructor(e){super({type:"object",check:e=>st(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=ot,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let i=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),o={},u=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),l=!1;for(const e of a){let n=i[e],a=e in r;if(n){let i,s=r[e];u.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:s,context:t.context,parent:o});let a=n instanceof Ue?n.spec:void 0,c=null==a?void 0:a.strict;if(null!=a&&a.strip){l=l||e in r;continue}i=t.__validating&&c?r[e]:n.cast(r[e],u),void 0!==i&&(o[e]=i)}else a&&!s&&(o[e]=r[e]);a===e in o&&o[e]===r[e]||(l=!0)}return l?o:r}_validate(e,t={},n,r){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:s},...i],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,i)=>{if(!a||!st(i))return void r(e,i);s=s||i;let o=[];for(let e of this._nodes){let n=this.fields[e];n&&!je.isRef(n)&&o.push(n.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:o,value:i,originalValue:s,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),i)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const i=this.fields[n];let s=e;null!=(r=s)&&r.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=te.split(e)[0];r.add(s),i.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];r.add(t),je.isRef(n)&&n.isSibling?s(n.path,t):Ne(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return ce.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=nt(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return it(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=te.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const n=[...te.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),i=te.getter(te.join(n),!0)(e);return!(!i||!(r in i))})(i,e)&&(s=Object.assign({},i),n||delete s[e],s[t]=r(i)),s})}json(){return this.transform(rt)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Ye.exact,test(e){if(null==e)return!0;const t=at(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Ye.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=at(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Ye.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(ue)}snakeCase(){return this.transformKeys(le)}constantCase(){return this.transformKeys(e=>le(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[i,s]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),n.fields[i]=s.describe(t)}return n}}function ct(e){return new dt(e)}ut.prototype=lt.prototype;class dt extends Ue{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,n)=>{const i=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${n}]`}));return i!==e&&(r=!0),i});return r?i:n}_validate(e,t={},n,r){var i;let s=this.innerType,a=null!=(i=t.recursive)?i:this.spec.recursive;super._validate(e,t,n,(i,o)=>{var u;if(!a||!s||!this._typeCheck(o))return void r(i,o);let l=new Array(o.length);for(let n=0;n<o.length;n++){var c;l[n]=s.asNestedTest({options:t,index:n,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:l,originalValue:null!=(u=t.originalValue)?u:e,options:t},n,e=>r(e.concat(i),o))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(rt)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!Ne(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ve(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Ee.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return this.test({message:t=t||Ee.min,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return this.test({message:t=t||Ee.max,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=t.innerType.describe(i)}return n}}ct.prototype=dt.prototype;var ht=function(e){var t;return t={mixed:{required:e("This field is required")}},Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{Ce[e][n]=t[e][n]})}),{initialValues:{workplacesIds:[]},validationSchema:ut({workplacesIds:ct().of(Qe()).required()})}},ft=["url","wsUrl","lang","data","settings"];exports.Widget=function(r){var i=r.url,s=r.wsUrl,a=r.lang,o=r.data,c=r.settings,d=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(r,ft),f=t.useGqlClients({url:i,wsUrl:s,lang:a}),_=f.graphqlSdk,w=f.gqlWsClient,b=e.useState(o),x=b[0],k=b[1],S=e.useState(c),D=S[0],O=S[1];e.useEffect(function(){!o&&_&&(_.shifts().then(function(e){var t=e.shifts;return k(function(e){return l({},e||{},{shifts:t})})}).catch(function(){}),_.listWorkplaces().then(function(e){var t=e.workplaces;return k(function(e){return l({},e||{},{workplaces:t})})}).catch(function(){}),_.listStatusChanges().then(function(e){var t=e.statusChanges;return k(function(e){return l({},e||{},{statusChanges:(n=t,n.sort(function(e,t){return e.finishedAt&&t.finishedAt?M(e.finishedAt).diff(M(t.finishedAt)):0}))});var n})}).catch(function(){})),null!=D&&D.workplacesIds&&w&&D.workplacesIds.forEach(function(e){w.subscribe(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p,r=void 0,i=Array.isArray(e),s=[e],a=-1,o=[],u=void 0,l=void 0,c=void 0,d=[],f=[],v=e;do{var _=++a===s.length,w=_&&0!==o.length;if(_){if(l=0===f.length?void 0:d[d.length-1],u=c,c=f.pop(),w){if(i)u=u.slice();else{for(var b={},x=0,k=Object.keys(u);x<k.length;x++){var S=k[x];b[S]=u[S]}u=b}for(var D=0,O=0;O<o.length;O++){var T=o[O][0],M=o[O][1];i&&(T-=D),i&&null===M?(u.splice(T,1),D++):u[T]=M}}a=r.index,s=r.keys,o=r.edits,i=r.inArray,r=r.prev}else{if(l=c?i?a:s[a]:void 0,null==(u=c?c[l]:v))continue;c&&d.push(l)}var Y,E=void 0;if(!Array.isArray(u)){if(!h(u))throw new Error("Invalid AST Node: ".concat(m(u,[]),"."));var F=g(t,u.kind,_);if(F){if((E=F.call(t,u,l,c,d,f))===y)break;if(!1===E){if(!_){d.pop();continue}}else if(void 0!==E&&(o.push([l,E]),!_)){if(!h(E)){d.pop();continue}u=E}}}void 0===E&&w&&o.push([l,u]),_?d.pop():(r={inArray:i,index:a,keys:s,edits:o,prev:r},s=(i=Array.isArray(u))?u:null!==(Y=n[u.kind])&&void 0!==Y?Y:[],a=-1,o=[],c&&f.push(c),c=u)}while(void 0!==r);return 0!==o.length&&(v=o[o.length-1][1]),v}(t.WorkplaceEventDocument,{leave:v}),{id:e},function(n){var r=n.event,i=n.subject;if(r===t.WorkplaceEvent.StatusChangeCreated){var s=i;k(function(t){var n,r=null==t||null==(n=t.statusChanges)?void 0:n.filter(function(t){return t.workplaceId===e}),i=r[r.length-1];return i&&(i.finishedAt=s.startedAt),l({},t||{},{statusChanges:[].concat(t.statusChanges,[s])})})}else if(r===t.WorkplaceEvent.StatusChangeUpdated){var a=i;k(function(e){var t=e.statusChanges.map(function(e){return e.id===a.id?a:e});return l({},e||{},{statusChanges:t})})}})})},[o,_,w,D]);var T=e.useCallback(function(e){O(l({},e))},[O]);return u.default.createElement(n.BaseWidget,l({url:i,lang:a,locales:Y,data:x,settings:c,onSettingsChange:T,WidgetView:z,getSettingsFormProps:ht,SettingsFormContent:F,version:E,"data-testid":"workplaces-state-timelines-widget"},d))},exports.getDisplayName=function(e){switch(e){case"en":return"Status changes history for current shift";case"pl":return"Historia zmian statusów dla obecnej zmiany";default:return"workplaces-state-timelines-widget"}},exports.permissions=[],exports.version=E;
|
|
1
|
+
var e=require("react"),t=require("andoncloud-dashboard-toolkit"),n=require("andoncloud-widget-base"),r=require("react-i18next"),i=require("@mui/lab"),s=require("@mui/material"),a=require("@mui/material/styles");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=/*#__PURE__*/o(e);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}var c="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function d(e){var t=e.prototype.toJSON;"function"==typeof t||function(){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,c&&(e.prototype[c]=t)}function h(e){return null!=e&&"string"==typeof e.kind}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function m(e,t){switch(f(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(c)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:m(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],s=0;s<n;++s)i.push(m(e[s],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map(function(n){return n+": "+m(e[n],t)}).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}d(/*#__PURE__*/function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}()),d(/*#__PURE__*/function(){function e(e,t,n,r,i,s,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=s,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}());var p={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},y=Object.freeze({});function g(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var s=n?e.leave:e.enter;if(s){if("function"==typeof s)return s;var a=s[t];if("function"==typeof a)return a}}}var v={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return w(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=x("(",w(e.variableDefinitions,", "),")"),i=w(e.directives," "),s=e.selectionSet;return n||i||r||"query"!==t?w([t,w([n,r]),i,s]," "):s},VariableDefinition:function(e){var t=e.directives;return e.variable+": "+e.type+x(" = ",e.defaultValue)+x(" ",w(t," "))},SelectionSet:function(e){return b(e.selections)},Field:function(e){var t=e.name,n=e.arguments,r=e.directives,i=e.selectionSet,s=x("",e.alias,": ")+t,a=s+x("(",w(n,", "),")");return a.length>80&&(a=s+x("(\n",k(w(n,"\n")),"\n)")),w([a,w(r," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+x(" ",w(e.directives," "))},InlineFragment:function(e){var t=e.directives,n=e.selectionSet;return w(["...",x("on ",e.typeCondition),w(t," "),n]," ")},FragmentDefinition:function(e){var t=e.typeCondition,n=e.variableDefinitions,r=e.directives,i=e.selectionSet;return"fragment ".concat(e.name).concat(x("(",w(n,", "),")")," ")+"on ".concat(t," ").concat(x("",w(r," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=!r||'"'===e[e.length-1]||"\\"===e[e.length-1]||n,s="";return!i||r&&(" "===e[0]||"\t"===e[0])||(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,i&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+w(e.values,", ")+"]"},ObjectValue:function(e){return"{"+w(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+x("(",w(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:_(function(e){var t=e.operationTypes;return w(["schema",w(e.directives," "),b(t)]," ")}),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:_(function(e){return w(["scalar",e.name,w(e.directives," ")]," ")}),ObjectTypeDefinition:_(function(e){var t=e.directives,n=e.fields;return w(["type",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")}),FieldDefinition:_(function(e){var t=e.arguments,n=e.type,r=e.directives;return e.name+(D(t)?x("(\n",k(w(t,"\n")),"\n)"):x("(",w(t,", "),")"))+": "+n+x(" ",w(r," "))}),InputValueDefinition:_(function(e){var t=e.directives;return w([e.name+": "+e.type,x("= ",e.defaultValue),w(t," ")]," ")}),InterfaceTypeDefinition:_(function(e){var t=e.directives,n=e.fields;return w(["interface",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")}),UnionTypeDefinition:_(function(e){var t=e.types;return w(["union",e.name,w(e.directives," "),t&&0!==t.length?"= "+w(t," | "):""]," ")}),EnumTypeDefinition:_(function(e){var t=e.values;return w(["enum",e.name,w(e.directives," "),b(t)]," ")}),EnumValueDefinition:_(function(e){return w([e.name,w(e.directives," ")]," ")}),InputObjectTypeDefinition:_(function(e){var t=e.fields;return w(["input",e.name,w(e.directives," "),b(t)]," ")}),DirectiveDefinition:_(function(e){var t=e.arguments,n=e.repeatable,r=e.locations;return"directive @"+e.name+(D(t)?x("(\n",k(w(t,"\n")),"\n)"):x("(",w(t,", "),")"))+(n?" repeatable":"")+" on "+w(r," | ")}),SchemaExtension:function(e){var t=e.operationTypes;return w(["extend schema",w(e.directives," "),b(t)]," ")},ScalarTypeExtension:function(e){return w(["extend scalar",e.name,w(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.directives,n=e.fields;return w(["extend type",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")},InterfaceTypeExtension:function(e){var t=e.directives,n=e.fields;return w(["extend interface",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")},UnionTypeExtension:function(e){var t=e.types;return w(["extend union",e.name,w(e.directives," "),t&&0!==t.length?"= "+w(t," | "):""]," ")},EnumTypeExtension:function(e){var t=e.values;return w(["extend enum",e.name,w(e.directives," "),b(t)]," ")},InputObjectTypeExtension:function(e){var t=e.fields;return w(["extend input",e.name,w(e.directives," "),b(t)]," ")}};function _(e){return function(t){return w([t.description,e(t)],"\n")}}function w(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(n))&&void 0!==t?t:""}function b(e){return x("{\n",k(w(e,"\n")),"\n}")}function x(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function k(e){return x(" ",e.replace(/\n/g,"\n "))}function S(e){return-1!==e.indexOf("\n")}function D(e){return null!=e&&e.some(S)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var O,T,M=(O=function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function u(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function h(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Ct(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={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}),e._pf}function p(e){var t=null,r=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=m(e),r=n.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&&r),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 y(e){var t=f(NaN);return null!=e?h(m(t),e):m(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var g=r.momentProperties=[],v=!1;function _(e,t){var n,r,i,s=g.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=m(t)),u(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)u(i=t[r=g[n]])||(e[r]=i);return e}function w(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,r.updateOffset(this),v=!1)}function b(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function x(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var n=!0;return h(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,s,o,u=[],l=arguments.length;for(s=0;s<l;s++){if(i="","object"==typeof arguments[s]){for(o in i+="\n["+s+"] ",arguments[0])a(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];u.push(i)}x(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var S,D={};function O(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),D[e]||(x(t),D[e]=!0)}function T(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function M(e,t){var n,r=h({},e);for(n in t)a(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)a(e,n)&&!a(t,n)&&s(e[n])&&(r[n]=h({},r[n]));return r}function Y(e){null!=e&&this.set(e)}function E(e,t,n){var r=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-r.length)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var F=/(\[[^\[]*\])|(\\)?([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,N={},A={};function j(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(A[e]=i),t&&(A[t[0]]=function(){return E(i.apply(this,arguments),t[1],t[2])}),n&&(A[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function P(e,t){return e.isValid()?(t=$(t,e.localeData()),N[t]=N[t]||function(e){var t,n,r,i=e.match(F);for(t=0,n=i.length;t<n;t++)i[t]=A[i[t]]?A[i[t]]:(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,s="";for(r=0;r<n;r++)s+=T(i[r])?i[r].call(t,e):i[r];return s}}(t),N[t](e)):e.localeData().invalidDate()}function $(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(C.lastIndex=0;n>=0&&C.test(e);)e=e.replace(C,r),C.lastIndex=0,n-=1;return e}var R={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 V(e){return"string"==typeof e?R[e]||R[e.toLowerCase()]:void 0}function W(e){var t,n,r={};for(n in e)a(e,n)&&(t=V(n))&&(r[t]=e[n]);return r}var U,I={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},L=/\d/,H=/\d\d/,z=/\d{3}/,G=/\d{4}/,Z=/[+-]?\d{6}/,q=/\d\d?/,B=/\d\d\d\d?/,J=/\d\d\d\d\d\d?/,Q=/\d{1,3}/,K=/\d{1,4}/,X=/[+-]?\d{1,6}/,ee=/\d+/,te=/[+-]?\d+/,ne=/Z|[+-]\d\d:?\d\d/gi,re=/Z|[+-]\d\d(?::?\d\d)?/gi,ie=/[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,se=/^[1-9]\d?/,ae=/^([1-9]\d|\d)/;function oe(e,t,n){U[e]=T(t)?t:function(e,r){return e&&n?n:t}}function ue(e,t){return a(U,e)?U[e](t._strict,t._locale):new RegExp(le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function de(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}U={};var he={};function fe(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,n){n[t]=de(e)}),r=e.length,n=0;n<r;n++)he[e[n]]=i}function me(e,t){fe(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function pe(e,t,n){null!=t&&a(he,e)&&he[e](t,n._a,n,e)}function ye(e){return e%4==0&&e%100!=0||e%400==0}var ge=0,ve=1,_e=2,we=3,be=4,xe=5,ke=6,Se=7,De=8;function Oe(e){return ye(e)?366:365}j("Y",0,0,function(){var e=this.year();return e<=9999?E(e,4):"+"+e}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),oe("Y",te),oe("YY",q,H),oe("YYYY",K,G),oe("YYYYY",X,Z),oe("YYYYYY",X,Z),fe(["YYYYY","YYYYYY"],ge),fe("YYYY",function(e,t){t[ge]=2===e.length?r.parseTwoDigitYear(e):de(e)}),fe("YY",function(e,t){t[ge]=r.parseTwoDigitYear(e)}),fe("Y",function(e,t){t[ge]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return de(e)+(de(e)>68?1900:2e3)};var Te,Me=Ye("FullYear",!0);function Ye(e,t){return function(n){return null!=n?(Fe(this,e,n),r.updateOffset(this,t),this):Ee(this,e)}}function Ee(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Fe(e,t,n){var r,i,s,a,o;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,a=e.month(),o=29!==(o=e.date())||1!==a||ye(s)?o:28,i?r.setUTCFullYear(s,a,o):r.setFullYear(s,a,o)}}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?ye(e)?29:28:31-n%7%2}Te=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},j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),j("MMMM",0,0,function(e){return this.localeData().months(this,e)}),oe("M",q,se),oe("MM",q,H),oe("MMM",function(e,t){return t.monthsShortRegex(e)}),oe("MMMM",function(e,t){return t.monthsRegex(e)}),fe(["M","MM"],function(e,t){t[ve]=de(e)-1}),fe(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[ve]=i:m(n).invalidMonth=e});var Ne="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),je=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Pe=ie,$e=ie;function Re(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Te.call(this._shortMonthsParse,a))?i:null:-1!==(i=Te.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Te.call(this._shortMonthsParse,a))||-1!==(i=Te.call(this._longMonthsParse,a))?i:null:-1!==(i=Te.call(this._longMonthsParse,a))||-1!==(i=Te.call(this._shortMonthsParse,a))?i:null}function Ve(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=de(t);else if(!l(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,Ce(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function We(e){return null!=e?(Ve(this,e),r.updateOffset(this,!0),this):Ee(this,"Month")}function Ue(){function e(e,t){return t.length-e.length}var t,n,r,i,s=[],a=[],o=[];for(t=0;t<12;t++)n=f([2e3,t]),r=le(this.monthsShort(n,"")),i=le(this.months(n,"")),s.push(r),a.push(i),o.push(i),o.push(r);s.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ie(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function Le(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function He(e,t,n){var r=7+t-n;return-(7+Le(e,0,r).getUTCDay()-t)%7+r-1}function ze(e,t,n,r,i){var s,a,o=1+7*(t-1)+(7+n-r)%7+He(e,r,i);return o<=0?a=Oe(s=e-1)+o:o>Oe(e)?(s=e+1,a=o-Oe(e)):(s=e,a=o),{year:s,dayOfYear:a}}function Ge(e,t,n){var r,i,s=He(e.year(),t,n),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?r=a+Ze(i=e.year()-1,t,n):a>Ze(e.year(),t,n)?(r=a-Ze(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ze(e,t,n){var r=He(e,t,n),i=He(e+1,t,n);return(Oe(e)-r+i)/7}function qe(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),oe("w",q,se),oe("ww",q,H),oe("W",q,se),oe("WW",q,H),me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=de(e)}),j("d",0,"do","day"),j("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),j("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),j("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),oe("d",q),oe("e",q),oe("E",q),oe("dd",function(e,t){return t.weekdaysMinRegex(e)}),oe("ddd",function(e,t){return t.weekdaysShortRegex(e)}),oe("dddd",function(e,t){return t.weekdaysRegex(e)}),me(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:m(n).invalidWeekday=e}),me(["d","e","E"],function(e,t,n,r){t[r]=de(e)});var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=ie,Xe=ie,et=ie;function tt(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Te.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Te.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Te.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Te.call(this._weekdaysParse,a))||-1!==(i=Te.call(this._shortWeekdaysParse,a))||-1!==(i=Te.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Te.call(this._shortWeekdaysParse,a))||-1!==(i=Te.call(this._weekdaysParse,a))||-1!==(i=Te.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Te.call(this._minWeekdaysParse,a))||-1!==(i=Te.call(this._weekdaysParse,a))||-1!==(i=Te.call(this._shortWeekdaysParse,a))?i:null}function nt(){function e(e,t){return t.length-e.length}var t,n,r,i,s,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=le(this.weekdaysMin(n,"")),i=le(this.weekdaysShort(n,"")),s=le(this.weekdays(n,"")),a.push(r),o.push(i),u.push(s),l.push(r),l.push(i),l.push(s);a.sort(e),o.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function rt(){return this.hours()%12||12}function it(e,t){j(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function st(e,t){return t._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,rt),j("k",["kk",2],0,function(){return this.hours()||24}),j("hmm",0,0,function(){return""+rt.apply(this)+E(this.minutes(),2)}),j("hmmss",0,0,function(){return""+rt.apply(this)+E(this.minutes(),2)+E(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+E(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+E(this.minutes(),2)+E(this.seconds(),2)}),it("a",!0),it("A",!1),oe("a",st),oe("A",st),oe("H",q,ae),oe("h",q,se),oe("k",q,se),oe("HH",q,H),oe("hh",q,H),oe("kk",q,H),oe("hmm",B),oe("hmmss",J),oe("Hmm",B),oe("Hmmss",J),fe(["H","HH"],we),fe(["k","kk"],function(e,t,n){var r=de(e);t[we]=24===r?0:r}),fe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),fe(["h","hh"],function(e,t,n){t[we]=de(e),m(n).bigHour=!0}),fe("hmm",function(e,t,n){var r=e.length-2;t[we]=de(e.substr(0,r)),t[be]=de(e.substr(r)),m(n).bigHour=!0}),fe("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[we]=de(e.substr(0,r)),t[be]=de(e.substr(r,2)),t[xe]=de(e.substr(i)),m(n).bigHour=!0}),fe("Hmm",function(e,t,n){var r=e.length-2;t[we]=de(e.substr(0,r)),t[be]=de(e.substr(r))}),fe("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[we]=de(e.substr(0,r)),t[be]=de(e.substr(r,2)),t[xe]=de(e.substr(i))});var at,ot=Ye("Hours",!0),ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ne,monthsShort:Ae,week:{dow:0,doy:6},weekdays:Be,weekdaysMin:Qe,weekdaysShort:Je,meridiemParse:/[ap]\.?m?\.?/i},lt={},ct={};function dt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ht(e){return e?e.toLowerCase().replace("_","-"):e}function ft(t){var n=null;if(void 0===lt[t]&&e&&e.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(t))try{n=at._abbr,function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}("./locale/"+t),mt(n)}catch(e){lt[t]=null}return lt[t]}function mt(e,t){var n;return e&&((n=u(t)?yt(e):pt(e,t))?at=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function pt(e,t){if(null!==t){var n,r=ut;if(t.abbr=e,null!=lt[e])O("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."),r=lt[e]._config;else if(null!=t.parentLocale)if(null!=lt[t.parentLocale])r=lt[t.parentLocale]._config;else{if(null==(n=ft(t.parentLocale)))return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;r=n._config}return lt[e]=new Y(M(r,t)),ct[e]&&ct[e].forEach(function(e){pt(e.name,e.config)}),mt(e),lt[e]}return delete lt[e],null}function yt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return at;if(!i(e)){if(t=ft(e))return t;e=[e]}return function(e){for(var t,n,r,i,s=0;s<e.length;){for(t=(i=ht(e[s]).split("-")).length,n=(n=ht(e[s+1]))?n.split("-"):null;t>0;){if(r=ft(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dt(i,n)>=t-1)break;t--}s++}return at}(e)}function gt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[ve]<0||n[ve]>11?ve:n[_e]<1||n[_e]>Ce(n[ge],n[ve])?_e:n[we]<0||n[we]>24||24===n[we]&&(0!==n[be]||0!==n[xe]||0!==n[ke])?we:n[be]<0||n[be]>59?be:n[xe]<0||n[xe]>59?xe:n[ke]<0||n[ke]>999?ke:-1,m(e)._overflowDayOfYear&&(t<ge||t>_e)&&(t=_e),m(e)._overflowWeeks&&-1===t&&(t=Se),m(e)._overflowWeekday&&-1===t&&(t=De),m(e).overflow=t),e}var vt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["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]],xt=[["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/]],kt=/^\/?Date\((-?\d+)/i,St=/^(?:(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}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ot(e){var t,n,r,i,s,a,o=e._i,u=vt.exec(o)||_t.exec(o),l=bt.length,c=xt.length;if(u){for(m(e).iso=!0,t=0,n=l;t<n;t++)if(bt[t][1].exec(u[1])){i=bt[t][0],r=!1!==bt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=c;t<n;t++)if(xt[t][1].exec(u[3])){s=(u[2]||" ")+xt[t][0];break}if(null==s)return void(e._isValid=!1)}if(!r&&null!=s)return void(e._isValid=!1);if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(s||"")+(a||""),Et(e)}else e._isValid=!1}function Tt(e){var t,n,r,i,s,a,o,u,l,c=St.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(n=c[3],r=c[2],i=c[5],s=c[6],a=c[7],o=[(u=c[4],l=parseInt(u,10),l<=49?2e3+l:l<=999?1900+l:l),Ae.indexOf(n),parseInt(r,10),parseInt(i,10),parseInt(s,10)],a&&o.push(parseInt(a,10)),!function(e,t,n){return!e||Je.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],t=o,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return Dt[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(c[8],c[9],c[10]),e._d=Le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Mt(e,t,n){return null!=e?e:null!=t?t:n}function Yt(e){var t,n,i,s,a,o=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[_e]&&null==e._a[ve]&&function(e){var t,n,r,i,s,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,a=4,n=Mt(t.GG,e._a[ge],Ge(Nt(),1,4).year),r=Mt(t.W,1),((i=Mt(t.E,1))<1||i>7)&&(u=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,l=Ge(Nt(),s,a),n=Mt(t.gg,e._a[ge],l.year),r=Mt(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(u=!0)):i=s),r<1||r>Ze(n,s,a)?m(e)._overflowWeeks=!0:null!=u?m(e)._overflowWeekday=!0:(o=ze(n,r,i,s,a),e._a[ge]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=Mt(e._a[ge],i[ge]),(e._dayOfYear>Oe(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Le(a,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[_e]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[we]&&0===e._a[be]&&0===e._a[xe]&&0===e._a[ke]&&(e._nextDay=!0,e._a[we]=0),e._d=(e._useUTC?Le:Ie).apply(null,o),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[we]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(m(e).weekdayMismatch=!0)}}function Et(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],m(e).empty=!0;var t,n,i,s,a,o,u,l=""+e._i,c=l.length,d=0;for(u=(i=$(e._f,e._locale).match(F)||[]).length,t=0;t<u;t++)(n=(l.match(ue(s=i[t],e))||[])[0])&&((a=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),d+=n.length),A[s]?(n?m(e).empty=!1:m(e).unusedTokens.push(s),pe(s,n,e)):e._strict&&!n&&m(e).unusedTokens.push(s);m(e).charsLeftOver=c-d,l.length>0&&m(e).unusedInput.push(l),e._a[we]<=12&&!0===m(e).bigHour&&e._a[we]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[we]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[we],e._meridiem),null!==(o=m(e).era)&&(e._a[ge]=e._locale.erasConvertYear(o,e._a[ge])),Yt(e),gt(e)}else Tt(e);else Ot(e)}function Ft(e){var t=e._i,n=e._f;return e._locale=e._locale||yt(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new w(gt(t)):(c(t)?e._d=t:i(n)?function(e){var t,n,r,i,s,a,o=!1,u=e._f.length;if(0===u)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<u;i++)s=0,a=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Et(t),p(t)&&(a=!0),s+=m(t).charsLeftOver,s+=10*m(t).unusedTokens.length,m(t).score=s,o?s<r&&(r=s,n=t):(null==r||s<r||a)&&(r=s,n=t,a&&(o=!0));h(e,n||t)}(e):n?Et(e):function(e){var t=e._i;u(t)?e._d=new Date(r.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=kt.exec(e._i);null===t?(Ot(e),!1===e._isValid&&(delete e._isValid,Tt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),Yt(e)):s(t)?function(e){if(!e._d){var t=W(e._i);e._a=d([t.year,t.month,void 0===t.day?t.date:t.day,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Yt(e)}}(e):l(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),p(e)||(e._d=null),e))}function Ct(e,t,n,r,a){var u,l={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&o(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=r,(u=new w(gt(Ft(l))))._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function Nt(e,t,n,r){return Ct(e,t,n,r,!1)}r.createFromInputFallback=k("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":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var At=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Nt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()}),jt=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Nt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()});function Pt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Nt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var $t=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rt(e){var t=W(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,u=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,i=$t.length;for(t in e)if(a(e,t)&&(-1===Te.call($t,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[$t[n]]){if(r)return!1;parseFloat(e[$t[n]])!==de(e[$t[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*u*60*60,this._days=+o+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=yt(),this._bubble()}function Vt(e){return e instanceof Rt}function Wt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ut(e,t){j(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+E(~~(e/60),2)+t+E(~~e%60,2)})}Ut("Z",":"),Ut("ZZ",""),oe("Z",re),oe("ZZ",re),fe(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Lt(re,e)});var It=/([\+\-]|\d\d)/gi;function Lt(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(It)||["-",0,0])[1]+de(n[2]))?0:"+"===n[0]?r:-r}function Ht(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(b(e)||c(e)?e.valueOf():Nt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Nt(e).local()}function zt(e){return-Math.round(e._d.getTimezoneOffset())}function Gt(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Zt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,qt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Bt(e,t){var n,r,i,s,o,u,c=e,d=null;return Vt(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(c={},t?c[t]=+e:c.milliseconds=+e):(d=Zt.exec(e))?(n="-"===d[1]?-1:1,c={y:0,d:de(d[_e])*n,h:de(d[we])*n,m:de(d[be])*n,s:de(d[xe])*n,ms:de(Wt(1e3*d[ke]))*n}):(d=qt.exec(e))?c={y:Jt(d[2],n="-"===d[1]?-1:1),M:Jt(d[3],n),w:Jt(d[4],n),d:Jt(d[5],n),h:Jt(d[6],n),m:Jt(d[7],n),s:Jt(d[8],n)}:null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(s=Nt(c.from),o=Nt(c.to),i=s.isValid()&&o.isValid()?(o=Ht(o,s),s.isBefore(o)?u=Qt(s,o):((u=Qt(o,s)).milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0},(c={}).ms=i.milliseconds,c.M=i.months),r=new Rt(c),Vt(e)&&a(e,"_locale")&&(r._locale=e._locale),Vt(e)&&a(e,"_isValid")&&(r._isValid=e._isValid),r}function Jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Qt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Kt(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(O(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=n,n=r,r=i),Xt(this,Bt(n,r),e),this}}function Xt(e,t,n,i){var s=t._milliseconds,a=Wt(t._days),o=Wt(t._months);e.isValid()&&(i=null==i||i,o&&Ve(e,Ee(e,"Month")+o*n),a&&Fe(e,"Date",Ee(e,"Date")+a*n),s&&e._d.setTime(e._d.valueOf()+s*n),i&&r.updateOffset(e,a||o))}Bt.fn=Rt.prototype,Bt.invalid=function(){return Bt(NaN)};var en=Kt(1,"add"),tn=Kt(-1,"subtract");function nn(e){return"string"==typeof e||e instanceof String}function rn(e,t){if(e.date()<t.date())return-rn(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function sn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yt(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=k("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 on(){return this._locale}var un=1e3,ln=6e4,cn=36e5,dn=126227808e5;function hn(e,t){return(e%t+t)%t}function fn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-dn:new Date(e,t,n).valueOf()}function mn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-dn:Date.UTC(e,t,n)}function pn(e,t){return t.erasAbbrRegex(e)}function yn(){var e,t,n,r,i,s=[],a=[],o=[],u=[],l=this.eras();for(e=0,t=l.length;e<t;++e)n=le(l[e].name),r=le(l[e].abbr),i=le(l[e].narrow),a.push(n),s.push(r),o.push(i),u.push(n),u.push(r),u.push(i);this._erasRegex=new RegExp("^("+u.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function gn(e,t){j(0,[e,e.length],0,t)}function vn(e,t,n,r,i){var s;return null==e?Ge(this,r,i).year:(t>(s=Ze(e,r,i))&&(t=s),_n.call(this,e,t,n,r,i))}function _n(e,t,n,r,i){var s=ze(e,t,n,r,i),a=Le(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),oe("N",pn),oe("NN",pn),oe("NNN",pn),oe("NNNN",function(e,t){return t.erasNameRegex(e)}),oe("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),fe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?m(n).era=i:m(n).invalidEra=e}),oe("y",ee),oe("yy",ee),oe("yyy",ee),oe("yyyy",ee),oe("yo",function(e,t){return t._eraYearOrdinalRegex||ee}),fe(["y","yy","yyy","yyyy"],ge),fe(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),t[ge]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,i):parseInt(e,10)}),j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),gn("gggg","weekYear"),gn("ggggg","weekYear"),gn("GGGG","isoWeekYear"),gn("GGGGG","isoWeekYear"),oe("G",te),oe("g",te),oe("GG",q,H),oe("gg",q,H),oe("GGGG",K,G),oe("gggg",K,G),oe("GGGGG",X,Z),oe("ggggg",X,Z),me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=de(e)}),me(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),j("Q",0,"Qo","quarter"),oe("Q",L),fe("Q",function(e,t){t[ve]=3*(de(e)-1)}),j("D",["DD",2],"Do","date"),oe("D",q,se),oe("DD",q,H),oe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),fe(["D","DD"],_e),fe("Do",function(e,t){t[_e]=de(e.match(q)[0])});var wn=Ye("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),oe("DDD",Q),oe("DDDD",z),fe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=de(e)}),j("m",["mm",2],0,"minute"),oe("m",q,ae),oe("mm",q,H),fe(["m","mm"],be);var bn=Ye("Minutes",!1);j("s",["ss",2],0,"second"),oe("s",q,ae),oe("ss",q,H),fe(["s","ss"],xe);var xn,kn,Sn=Ye("Seconds",!1);for(j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),oe("S",Q,L),oe("SS",Q,H),oe("SSS",Q,z),xn="SSSS";xn.length<=9;xn+="S")oe(xn,ee);function Dn(e,t){t[ke]=de(1e3*("0."+e))}for(xn="S";xn.length<=9;xn+="S")fe(xn,Dn);kn=Ye("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var On=w.prototype;function Tn(e){return e}On.add=en,On.calendar=function(e,t){var n;1===arguments.length&&(arguments[0]?b(n=arguments[0])||c(n)||nn(n)||l(n)||function(e){var t=i(e),n=!1;return t&&(n=0===e.filter(function(t){return!l(t)&&nn(e)}).length),t&&n}(n)||function(e){var t,n=s(e)&&!o(e),r=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=i.length;for(t=0;t<u;t+=1)r=r||a(e,i[t]);return n&&r}(n)||null==n?(e=arguments[0],t=void 0):function(e){var t,n=s(e)&&!o(e),r=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)r=r||a(e,i[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var u=e||Nt(),d=Ht(u,this).startOf("day"),h=r.calendarFormat(this,d)||"sameElse",f=t&&(T(t[h])?t[h].call(this,u):t[h]);return this.format(f||this.localeData().calendar(h,this,Nt(u)))},On.clone=function(){return new w(this)},On.diff=function(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(!(r=Ht(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=V(t)){case"year":s=rn(this,r)/12;break;case"month":s=rn(this,r);break;case"quarter":s=rn(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:ce(s)},On.endOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mn:fn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=cn-hn(t+(this._isUTC?0:this.utcOffset()*ln),cn)-1;break;case"minute":t=this._d.valueOf(),t+=ln-hn(t,ln)-1;break;case"second":t=this._d.valueOf(),t+=un-hn(t,un)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},On.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=P(this,e);return this.localeData().postformat(t)},On.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Nt(e).isValid())?Bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},On.fromNow=function(e){return this.from(Nt(),e)},On.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Nt(e).isValid())?Bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},On.toNow=function(e){return this.to(Nt(),e)},On.get=function(e){return T(this[e=V(e)])?this[e]():this},On.invalidAt=function(){return m(this).overflow},On.isAfter=function(e,t){var n=b(e)?e:Nt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},On.isBefore=function(e,t){var n=b(e)?e:Nt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},On.isBetween=function(e,t,n,r){var i=b(e)?e:Nt(e),s=b(t)?t:Nt(t);return!!(this.isValid()&&i.isValid()&&s.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(s,n):!this.isAfter(s,n))},On.isSame=function(e,t){var n,r=b(e)?e:Nt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},On.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},On.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},On.isValid=function(){return p(this)},On.lang=an,On.locale=sn,On.localeData=on,On.max=jt,On.min=At,On.parsingFlags=function(){return h({},m(this))},On.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:I[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=W(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(T(this[e=V(e)]))return this[e](t);return this},On.startOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mn:fn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*ln),cn);break;case"minute":t=this._d.valueOf(),t-=hn(t,ln);break;case"second":t=this._d.valueOf(),t-=hn(t,un)}return this._d.setTime(t),r.updateOffset(this,!0),this},On.subtract=tn,On.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},On.toObject=function(){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()}},On.toDate=function(){return new Date(this.valueOf())},On.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?P(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",P(n,"Z")):P(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},On.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(On[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),On.toJSON=function(){return this.isValid()?this.toISOString():null},On.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},On.unix=function(){return Math.floor(this.valueOf()/1e3)},On.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},On.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},On.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},On.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},On.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},On.eraYear=function(){var e,t,n,i,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,i=this.clone().startOf("day").valueOf(),s[e].since<=i&&i<=s[e].until||s[e].until<=i&&i<=s[e].since)return(this.year()-r(s[e].since).year())*n+s[e].offset;return this.year()},On.year=Me,On.isLeapYear=function(){return ye(this.year())},On.weekYear=function(e){return vn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},On.isoWeekYear=function(e){return vn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},On.quarter=On.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},On.month=We,On.daysInMonth=function(){return Ce(this.year(),this.month())},On.week=On.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},On.isoWeek=On.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},On.weeksInYear=function(){var e=this.localeData()._week;return Ze(this.year(),e.dow,e.doy)},On.weeksInWeekYear=function(){var e=this.localeData()._week;return Ze(this.weekYear(),e.dow,e.doy)},On.isoWeeksInYear=function(){return Ze(this.year(),1,4)},On.isoWeeksInISOWeekYear=function(){return Ze(this.isoWeekYear(),1,4)},On.date=wn,On.day=On.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=Ee(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},On.weekday=function(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")},On.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},On.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},On.hour=On.hours=ot,On.minute=On.minutes=bn,On.second=On.seconds=Sn,On.millisecond=On.milliseconds=kn,On.utcOffset=function(e,t,n){var i,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Lt(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=zt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==e&&(!t||this._changeInProgress?Xt(this,Bt(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:zt(this)},On.utc=function(e){return this.utcOffset(0,e)},On.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},On.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Lt(ne,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},On.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Nt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},On.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},On.isLocal=function(){return!!this.isValid()&&!this._isUTC},On.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},On.isUtc=Gt,On.isUTC=Gt,On.zoneAbbr=function(){return this._isUTC?"UTC":""},On.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},On.dates=k("dates accessor is deprecated. Use date instead.",wn),On.months=k("months accessor is deprecated. Use month instead",We),On.years=k("years accessor is deprecated. Use year instead",Me),On.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),On.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Ft(t))._a?(e=t._isUTC?f(t._a):Nt(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var n,r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(n=0;n<r;n++)de(e[n])!==de(t[n])&&s++;return s+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var Mn=Y.prototype;function Yn(e,t,n,r){var i=yt(),s=f().set(r,t);return i[n](s,e)}function En(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return Yn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Yn(e,r,n,"month");return i}function Fn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,s=yt(),a=e?s._week.dow:0,o=[];if(null!=n)return Yn(t,(n+a)%7,r,"day");for(i=0;i<7;i++)o[i]=Yn(t,(i+a)%7,r,"day");return o}Mn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r},Mn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(F).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},Mn.invalidDate=function(){return this._invalidDate},Mn.ordinal=function(e){return this._ordinal.replace("%d",e)},Mn.preparse=Tn,Mn.postformat=Tn,Mn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return T(i)?i(e,t,n,r):i.replace(/%d/i,e)},Mn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)},Mn.set=function(e){var t,n;for(n in e)a(e,n)&&(T(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Mn.eras=function(e,t){var n,i,s,a=this._eras||yt("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"==typeof a[n].since&&(s=r(a[n].since).startOf("day"),a[n].since=s.valueOf()),typeof a[n].until){case"undefined":a[n].until=Infinity;break;case"string":s=r(a[n].until).startOf("day").valueOf(),a[n].until=s.valueOf()}return a},Mn.erasParse=function(e,t,n){var r,i,s,a,o,u=this.eras();for(e=e.toUpperCase(),r=0,i=u.length;r<i;++r)if(s=u[r].name.toUpperCase(),a=u[r].abbr.toUpperCase(),o=u[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[r];break;case"NNNN":if(s===e)return u[r];break;case"NNNNN":if(o===e)return u[r]}else if([s,a,o].indexOf(e)>=0)return u[r]},Mn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},Mn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||yn.call(this),e?this._erasAbbrRegex:this._erasRegex},Mn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||yn.call(this),e?this._erasNameRegex:this._erasRegex},Mn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||yn.call(this),e?this._erasNarrowRegex:this._erasRegex},Mn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||je).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Mn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[je.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Mn.monthsParse=function(e,t,n){var r,i,s;if(this._monthsParseExact)return Re.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Mn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ue.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=$e),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Mn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ue.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Pe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Mn.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},Mn.firstDayOfYear=function(){return this._week.doy},Mn.firstDayOfWeek=function(){return this._week.dow},Mn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?qe(n,this._week.dow):e?n[e.day()]:n},Mn.weekdaysMin=function(e){return!0===e?qe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Mn.weekdaysShort=function(e){return!0===e?qe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Mn.weekdaysParse=function(e,t,n){var r,i,s;if(this._weekdaysParseExact)return tt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Mn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Mn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Xe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Mn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=et),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Mn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Mn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},mt("en",{eras:[{since:"0001-01-01",until:Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,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===de(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",mt),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",yt);var Cn=Math.abs;function Nn(e,t,n,r){var i=Bt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function An(e){return e<0?Math.floor(e):Math.ceil(e)}function jn(e){return 4800*e/146097}function Pn(e){return 146097*e/4800}function $n(e){return function(){return this.as(e)}}var Rn=$n("ms"),Vn=$n("s"),Wn=$n("m"),Un=$n("h"),In=$n("d"),Ln=$n("w"),Hn=$n("M"),zn=$n("Q"),Gn=$n("y"),Zn=Rn;function qn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Bn=qn("milliseconds"),Jn=qn("seconds"),Qn=qn("minutes"),Kn=qn("hours"),Xn=qn("days"),er=qn("months"),tr=qn("years"),nr=Math.round,rr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ir(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var sr=Math.abs;function ar(e){return(e>0)-(e<0)||+e}function or(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,a,o,u=sr(this._milliseconds)/1e3,l=sr(this._days),c=sr(this._months),d=this.asSeconds();return d?(e=ce(u/60),t=ce(e/60),u%=60,e%=60,n=ce(c/12),c%=12,r=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",s=ar(this._months)!==ar(d)?"-":"",a=ar(this._days)!==ar(d)?"-":"",o=ar(this._milliseconds)!==ar(d)?"-":"",i+"P"+(n?s+n+"Y":"")+(c?s+c+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+r+"S":"")):"P0D"}var ur=Rt.prototype;return ur.isValid=function(){return this._isValid},ur.abs=function(){var e=this._data;return this._milliseconds=Cn(this._milliseconds),this._days=Cn(this._days),this._months=Cn(this._months),e.milliseconds=Cn(e.milliseconds),e.seconds=Cn(e.seconds),e.minutes=Cn(e.minutes),e.hours=Cn(e.hours),e.months=Cn(e.months),e.years=Cn(e.years),this},ur.add=function(e,t){return Nn(this,e,t,1)},ur.subtract=function(e,t){return Nn(this,e,t,-1)},ur.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(n=this._months+jn(t=this._days+r/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Pn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},ur.asMilliseconds=Rn,ur.asSeconds=Vn,ur.asMinutes=Wn,ur.asHours=Un,ur.asDays=In,ur.asWeeks=Ln,ur.asMonths=Hn,ur.asQuarters=zn,ur.asYears=Gn,ur.valueOf=Zn,ur._bubble=function(){var e,t,n,r,i,s=this._milliseconds,a=this._days,o=this._months,u=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*An(Pn(o)+a),a=0,o=0),u.milliseconds=s%1e3,e=ce(s/1e3),u.seconds=e%60,t=ce(e/60),u.minutes=t%60,n=ce(t/60),u.hours=n%24,a+=ce(n/24),o+=i=ce(jn(a)),a-=An(Pn(i)),r=ce(o/12),o%=12,u.days=a,u.months=o,u.years=r,this},ur.clone=function(){return Bt(this)},ur.get=function(e){return e=V(e),this.isValid()?this[e+"s"]():NaN},ur.milliseconds=Bn,ur.seconds=Jn,ur.minutes=Qn,ur.hours=Kn,ur.days=Xn,ur.weeks=function(){return ce(this.days()/7)},ur.months=er,ur.years=tr,ur.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=rr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(s=Object.assign({},rr,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),r=function(e,t,n,r){var i=Bt(e).abs(),s=nr(i.as("s")),a=nr(i.as("m")),o=nr(i.as("h")),u=nr(i.as("d")),l=nr(i.as("M")),c=nr(i.as("w")),d=nr(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),(h=h||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,ir.apply(null,h)}(this,!i,s,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},ur.toISOString=or,ur.toString=or,ur.toJSON=or,ur.locale=sn,ur.localeData=on,ur.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",or),ur.lang=an,j("X",0,0,"unix"),j("x",0,0,"valueOf"),oe("x",te),oe("X",/[+-]?\d+(\.\d{1,3})?/),fe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),fe("x",function(e,t,n){n._d=new Date(de(e))}),r.version="2.30.1",t=Nt,r.fn=On,r.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},r.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return Nt(1e3*e)},r.months=function(e,t){return En(e,t,"months")},r.isDate=c,r.locale=mt,r.invalid=y,r.duration=Bt,r.isMoment=b,r.weekdays=function(e,t,n){return Fn(e,t,n,"weekdays")},r.parseZone=function(){return Nt.apply(null,arguments).parseZone()},r.localeData=yt,r.isDuration=Vt,r.monthsShort=function(e,t){return En(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return Fn(e,t,n,"weekdaysMin")},r.defineLocale=pt,r.updateLocale=function(e,t){if(null!=t){var n,r,i=ut;null!=lt[e]&&null!=lt[e].parentLocale?lt[e].set(M(lt[e]._config,t)):(null!=(r=ft(e))&&(i=r._config),t=M(i,t),null==r&&(t.abbr=e),(n=new Y(t)).parentLocale=lt[e],lt[e]=n),mt(e)}else null!=lt[e]&&(null!=lt[e].parentLocale?(lt[e]=lt[e].parentLocale,e===mt()&&mt(e)):null!=lt[e]&&delete lt[e]);return lt[e]},r.locales=function(){return S(lt)},r.weekdaysShort=function(e,t,n){return Fn(e,t,n,"weekdaysShort")},r.normalizeUnits=V,r.relativeTimeRounding=function(e){return void 0===e?nr:"function"==typeof e&&(nr=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==rr[e]&&(void 0===t?rr[e]:(rr[e]=t,"s"===e&&(rr.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=On,r.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"},r}()},O(T={exports:{}}),T.exports),Y={en:{translation:{Loading:"Loading",Workplaces:"Workplaces","Select and arrange the order":"Select and arrange the order",Cancel:"Cancel",Save:"Save","History timeline time info now":"now",Settings:"Settings"}},pl:{translation:{Loading:"Wczytywanie",Workplaces:"Stanowiska","Select and arrange the order":"Wybierz i ustal kolejność",Cancel:"Anuluj",Save:"Zapisz","History timeline time info now":"teraz",Settings:"Ustawienia"}}},E="1.2.2",F=function(n){var a,o=n.data,l=n.formProps,c=e.useState("1"),d=c[0],h=c[1],f=r.useTranslation().t;return u.default.createElement(u.default.Fragment,null,u.default.createElement(i.TabContext,{value:d},u.default.createElement(s.Box,{sx:{borderBottom:1,borderColor:"divider"}},u.default.createElement(i.TabList,{onChange:function(e,t){h(t)}},u.default.createElement(s.Tab,{label:f("Workplaces"),value:"1"}))),u.default.createElement(i.TabPanel,{value:"1"},u.default.createElement(t.SortableSelect,{placeholder:f("Select and arrange the order")+"...",options:null==(a=o.workplaces)?void 0:a.map(function(e){return{label:e.name,value:e.id}}),selected:l.values.workplacesIds,onChange:function(e){return l.setFieldValue("workplacesIds",[].concat(e))}}))))},C=function(e,t,n){var r=e.startedAt.isAfter(t.startedAt)?e.startedAt:M(t.startedAt);return r&&t.finishedAt?Math.abs(r.diff(M(t.finishedAt),"seconds")):Math.abs(M(n).diff(r,"seconds"))},N=function(e){switch(e){case"green":return"#2ACB42";case"red":return"#FF453A";case"yellow":return"#FFC12F";default:return"grey"}},A=function(){return A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},A.apply(this,arguments)},j=function(t){var n=t.animate,r=void 0===n||n,i=t.backgroundColor,s=void 0===i?"#f5f6f7":i,a=t.backgroundOpacity,o=void 0===a?1:a,u=t.baseUrl,l=void 0===u?"":u,c=t.children,d=t.foregroundColor,h=void 0===d?"#eee":d,f=t.foregroundOpacity,m=void 0===f?1:f,p=t.gradientRatio,y=void 0===p?2:p,g=t.uniqueKey,v=t.rtl,_=void 0!==v&&v,w=t.speed,b=void 0===w?1.2:w,x=t.style,k=void 0===x?{}:x,S=t.title,D=void 0===S?"Loading...":S,O=t.beforeMask,T=void 0===O?null:O,M=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["animate","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","uniqueKey","rtl","speed","style","title","beforeMask"]),Y=g||Math.random().toString(36).substring(6),E="".concat(Y,"-diff"),F="".concat(Y,"-animated-diff"),C="".concat(Y,"-aria"),N=_?{transform:"scaleX(-1)"}:null,j="".concat(b,"s"),P="".concat(-1*y," 0"),$="".concat(y," 0");return e.createElement("svg",A({"aria-labelledby":C,role:"img",style:A(A({},k),N)},M),D?e.createElement("title",{id:C},D):null,T&&e.isValidElement(T)?T:null,e.createElement("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url(".concat(l,"#").concat(E,")"),style:{fill:"url(".concat(l,"#").concat(F,")")}}),e.createElement("defs",null,e.createElement("clipPath",{id:E},c),e.createElement("linearGradient",{id:F,gradientTransform:"translate(".concat(P,")")},e.createElement("stop",{offset:"0%",stopColor:s,stopOpacity:o}),e.createElement("stop",{offset:"50%",stopColor:h,stopOpacity:m}),e.createElement("stop",{offset:"100%",stopColor:s,stopOpacity:o}),r&&e.createElement("animateTransform",{attributeName:"gradientTransform",type:"translate",values:"".concat(P,"; 0 0; ").concat($),dur:j,repeatCount:"indefinite"}))))},P=function(t){return e.createElement(t.children?j:$,A({},t))},$=function(t){return e.createElement(P,A({viewBox:"0 0 476 124"},t),e.createElement("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),e.createElement("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),e.createElement("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),e.createElement("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),e.createElement("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),e.createElement("circle",{cx:"20",cy:"20",r:"20"}))},R=P,V=function(){return u.default.createElement(R,{"data-testid":"timeline-loading",height:"28",width:"100%",speed:1.5,backgroundColor:"#3d3d3d",foregroundColor:"#ffffff"},u.default.createElement("rect",{x:"4%",y:"10",ry:"6",width:"92%",height:"14"}))},W=a.styled("div")({display:"flex",flexGrow:1,alignItems:"center",padding:"10px 0",background:"#282828","&:nth-of-type(2n)":{background:"#313131"}}),U=a.styled("div")({display:"flex",margin:"6px 0",zIndex:3,flexDirection:"row",height:"20px",width:"100%",overflow:"hidden",borderRadius:"4px",backgroundColor:"#3F3F3F"});a.styled("div")({display:"flex",alignItems:"center",justifyContent:"space-between"});var I=a.styled("span")({margin:"0 1.5em",fontSize:"12px",fontWeight:500,lineHeight:"12px",color:"rgba(255, 255, 255, 0.5)"}),L=a.styled("div")(function(e){return{flexBasis:e.percentWidth+"%",flexShrink:0,backgroundColor:N(e.color),"&:first-of-type":{borderTopLeftRadius:"4px",borderBottomLeftRadius:"4px"}}}),H=function(t){var n=t.title,r=t.shift,i=t.statusChanges,a=t.loading,o=e.useState([]),l=o[0],c=o[1],d=e.useCallback(function(){return r?Math.abs(r.startedAt.diff(r.finishedAt,"seconds")):0},[r]),h=e.useCallback(function(e){var t=M(e.startedAt),n=e.finishedAt?M(e.finishedAt):null;return!!r&&(t.isBetween(r.startedAt,r.finishedAt)||(null==n?void 0:n.isBetween(r.startedAt,r.finishedAt))||t.isBefore(r.startedAt)&&!n)},[r]),f=e.useState(function(){return d()}),m=f[0],p=f[1];return e.useEffect(function(){p(d())},[r,d]),e.useEffect(function(){c(i.filter(function(e){return h(e)}))},[i,h]),a?u.default.createElement(V,null):u.default.createElement(W,null,u.default.createElement(s.Typography,{sx:{display:n?"block":"none",flexBasis:"25%",marginLeft:"20px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:"white"}},n),r&&u.default.createElement(u.default.Fragment,null,u.default.createElement(I,null,r.startedAt.format("HH:mm")),u.default.createElement(U,{"data-testid":"timeline"},null==l?void 0:l.map(function(e){return e.reason.statusColor&&u.default.createElement(L,{"data-testid":"timeline-element-"+e.id+"-color-"+e.reason.statusColor,key:""+e.id+e.author.id,color:e.reason.statusColor,percentWidth:Math.min(C(r,e,new Date)/m*100,100)})})),u.default.createElement(I,null,r.finishedAt.format("HH:mm"))))},z=function(n){var r=n.data,i=n.settings,a=e.useState(null),o=a[0],l=a[1],c=function(e){var t,n,s=r.workplaces;return 1===(null==i||null==(t=i.workplacesIds)?void 0:t.length)?"":(null==s||null==(n=s.find(function(t){return t.id===e}))?void 0:n.name)||""};return e.useEffect(function(){var e=function(){var e=M();l(t.getCurrentShift(e,t.normalizeShifts((null==r?void 0:r.shifts)||[],e)))},n=setInterval(function(){return e()},1e4);return e(),function(){clearInterval(n)}},[null==r?void 0:r.shifts]),u.default.createElement(s.Box,{display:"flex",flexDirection:"column",height:"100%"},null==i?void 0:i.workplacesIds.map(function(e){var t;return u.default.createElement(H,{key:e,title:c(e),shift:o,statusChanges:(null==(t=r.statusChanges)?void 0:t.filter(function(t){return t.workplaceId===e}))||[],loading:void 0===r})}))};function G(e){this._maxSize=e,this.clear()}G.prototype.clear=function(){this._size=0,this._values=Object.create(null)},G.prototype.get=function(e){return this._values[e]},G.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Z=/[^.^\]^[]+|(?=\[\]|\.\.)/g,q=/^\d+$/,B=/^\d/,J=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Q=/^\s*(['"]?)(.*?)(\1)\s*$/,K=new G(512),X=new G(512),ee=new G(512),te={Cache:G,split:re,normalizePath:ne,setter:function(e){var t=ne(e);return X.get(e)||X.set(e,function(e,n){for(var r=0,i=t.length,s=e;r<i-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;s=s[t[r++]]}s[t[r]]=n})},getter:function(e,t){var n=ne(e);return ee.get(e)||ee.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(ie(t)||q.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,s,a,o=e.length;for(i=0;i<o;i++)(r=e[i])&&(se(r)&&(r='"'+r+'"'),s=!(a=ie(r))&&/^\d+$/.test(r),t.call(n,r,a,s,i,e))}(Array.isArray(e)?e:re(e),t,n)}};function ne(e){return K.get(e)||K.set(e,re(e).map(function(e){return e.replace(Q,"$2")}))}function re(e){return e.match(Z)||[""]}function ie(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function se(e){return!ie(e)&&(function(e){return e.match(B)&&!e.match(q)}(e)||function(e){return J.test(e)}(e))}const ae=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,oe=e=>e.match(ae)||[];var ue=e=>oe(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,""),le=e=>(e=>oe(e).join("_").toLowerCase())(e),ce=function(e){return de(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)};function de(e,t){var n=e.length,r=new Array(n),i={},s=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!o.has(e[0])||!o.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||u(e[s],s,new Set);return r;function u(e,t,s){if(s.has(e)){var l;try{l=", node was:"+JSON.stringify(e)}catch(e){l=""}throw new Error("Cyclic dependency"+l)}if(!o.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=a.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var d=c[--t];u(d,o.get(d),s)}while(t);s.delete(e)}r[--n]=e}}}ce.array=de;const he=Object.prototype.toString,fe=Error.prototype.toString,me=RegExp.prototype.toString,pe="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",ye=/^Symbol\((.*)\)(.*)$/;function ge(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return pe.call(e).replace(ye,"Symbol($1)");const r=he.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+fe.call(e)+"]":"RegExp"===r?me.call(e):null}function ve(e,t){let n=ge(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=ge(this[e],t);return null!==r?r:n},2)}function _e(e){return null==e?[]:[].concat(e)}let we,be,xe,ke=/\$\{\s*(\w+)\s*\}/g;we=Symbol.toStringTag;class Se{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[we]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],_e(e).forEach(e=>{De.isError(e)?(this.errors.push(...e.errors),this.inner.push(...e.inner.length?e.inner:[e])):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}be=Symbol.hasInstance,xe=Symbol.toStringTag;class De extends Error{static formatError(e,t){return t=Object.assign({},t,{path:t.label||t.path||"this",originalPath:t.path}),"string"==typeof e?e.replace(ke,(e,n)=>ve(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,i){const s=new Se(e,t,n,r);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[xe]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,De)}static[be](e){return Se[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Oe={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=null!=r&&r!==n?` (cast from the value \`${ve(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${ve(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ve(n,!0)}\``+i}},Te={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Me={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ye={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ee={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Fe={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${ve(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${ve(n,!0)}\``}return De.formatError(Oe.notType,e)}};var Ce=Object.assign(Object.create(null),{mixed:Oe,string:Te,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:Me,object:Ye,array:Ee,boolean:{isValue:"${path} field must be ${value}"},tuple:Fe});const Ne=e=>e&&e.__isYupSchema__;class Ae{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new Ae(e,(e,t)=>{var n;let a=s(...e)?r:i;return null!=(n=null==a?void 0:a(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!Ne(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}class je{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue,this.path=this.key.slice((this.isContext?"$":this.isValue?".":"").length),this.getter=this.path&&te.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}je.prototype.__isYupRef=!0;const Pe=e=>null==e;function $e(e){function t({value:t,path:n="",options:r,originalValue:i,schema:s},a,o){const{name:u,test:l,params:c,message:d,skipAbsent:h}=e;let{parent:f,context:m,abortEarly:p=s.spec.abortEarly,disableStackTrace:y=s.spec.disableStackTrace}=r;function g(e){return je.isRef(e)?e.getValue(t,f,m):e}function v(e={}){const r=Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||y},c,e.params);for(const e of Object.keys(r))r[e]=g(r[e]);const a=new De(De.formatError(e.message||d,r),t,r.path,e.type||u,r.disableStackTrace);return a.params=r,a}const _=p?a:o;let w={path:n,parent:f,type:u,from:r.from,createError:v,resolve:g,options:r,originalValue:i,schema:s};const b=e=>{De.isError(e)?_(e):e?o(null):_(v())},x=e=>{De.isError(e)?_(e):a(e)};if(h&&Pe(t))return b(!0);let k;try{var S;if(k=l.call(w,t,w),"function"==typeof(null==(S=k)?void 0:S.then)){if(r.sync)throw new Error(`Validation test of type: "${w.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(k).then(b,x)}}catch(e){return void x(e)}b(k)}return t.OPTIONS=e,t}function Re(e,t,n,r=n){let i,s,a;return t?(te.forEach(t,(o,u,l)=>{let c=u?o.slice(1,o.length-1):o,d="tuple"===(e=e.resolve({context:r,parent:i,value:n})).type,h=l?parseInt(c,10):0;if(e.innerType||d){if(d&&!l)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&h>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[h],e=d?e.spec.types[h]:e.innerType}if(!l){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);i=n,n=n&&n[c],e=e.fields[c]}s=c,a=u?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Ve extends Set{describe(){const e=[];for(const t of this.values())e.push(je.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Ve(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function We(e,t=new Map){if(Ne(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=We(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,We(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(We(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=We(i,t)}return n}class Ue{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Ve,this._blacklist=new Ve,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Oe.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=We(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,i=n._cast(e,t);if(!1!==t.assert&&!n.isType(i)){if(r&&Pe(i))return i;let s=ve(e),a=ve(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(a!==s?`result of cast: ${a}`:""))}return i}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:i,originalValue:s=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let u=[];for(let e of Object.values(this.internalTests))e&&u.push(e);this.runTests({path:i,value:o,originalValue:s,options:t,tests:u},n,e=>{if(e.length)return r(e,o);this.runTests({path:i,value:o,originalValue:s,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:i,value:s,originalValue:a,path:o,options:u}=e,l=e=>{r||(r=!0,t(e,s))},c=e=>{r||(r=!0,n(e,s))},d=i.length,h=[];if(!d)return c([]);let f={value:s,originalValue:a,path:o,options:u,schema:this};for(let e=0;e<i.length;e++)(0,i[e])(f,l,function(e){e&&(Array.isArray(e)?h.push(...e):h.push(e)),--d<=0&&c(h)})}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:i,options:s}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let u=n[a];const l=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(l)._validate(u,l,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,s)=>r._validate(e,t,(e,t)=>{De.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new De(e,t,void 0,void 0,i)):n(t)}))}validateSync(e,t){var n;let r,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw De.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new De(t,e,void 0,void 0,s);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(De.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(De.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):We(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=$e({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=$e({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=Oe.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Oe.notNull){return this.nullability(!1,e)}required(e=Oe.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=Oe.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=$e(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=_e(e).map(e=>new je(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new Ae(r,t):Ae.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=$e({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Oe.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=$e({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=Oe.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=$e({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:i,nullable:s}=t.spec,a={meta:r,label:n,optional:i,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return a}}Ue.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ue.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:a}=Re(this,t,n,r.context);return a[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Ue.prototype[e]=Ue.prototype.oneOf;for(const e of["not","nope"])Ue.prototype[e]=Ue.prototype.notOneOf;const Ie=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Le(e){var t,n;const r=Ie.exec(e);return r?{year:He(r[1]),month:He(r[2],1)-1,day:He(r[3],1),hour:He(r[4]),minute:He(r[5]),second:He(r[6]),millisecond:r[7]?He(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:He(r[10]),minuteOffset:He(r[11])}:null}function He(e,t=0){return Number(e)||t}let ze=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ge=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Ze=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,qe=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),Be=e=>Pe(e)||e===e.trim(),Je={}.toString();function Qe(){return new Ke}class Ke extends Ue{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t,n)=>{if(!n.spec.coerce||n.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===Je?e:r})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Oe.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=Te.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=Te.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=Te.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||Te.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=Te.email){return this.matches(ze,{name:"email",message:e,excludeEmptyString:!0})}url(e=Te.url){return this.matches(Ge,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Te.uuid){return this.matches(Ze,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(qe,{name:"datetime",message:r||Te.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Te.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=Le(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||Te.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=Le(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Te.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:Be})}lowercase(e=Te.lowercase){return this.transform(e=>Pe(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Pe(e)||e===e.toLowerCase()})}uppercase(e=Te.uppercase){return this.transform(e=>Pe(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Pe(e)||e===e.toUpperCase()})}}Qe.prototype=Ke.prototype;let Xe=new Date("");class et extends Ue{constructor(){super({type:"date",check:e=>"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())}),this.withMutation(()=>{this.transform((e,t,n)=>!n.spec.coerce||n.isType(e)||null===e?e:(e=function(e){const t=Le(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?et.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(je.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=Me.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=Me.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function tt(e,t){let n=Infinity;return e.some((e,r)=>{var i;if(null!=(i=t.path)&&i.includes(e))return n=r,!0}),n}function nt(e){return(t,n)=>tt(e,t)-tt(e,n)}et.INVALID_DATE=Xe;const rt=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function it(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=it(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=it(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(it)}):"optional"in e?e.optional():e}let st=e=>"[object Object]"===Object.prototype.toString.call(e);function at(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const ot=nt([]);function ut(e){return new lt(e)}class lt extends Ue{constructor(e){super({type:"object",check:e=>st(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=ot,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let i=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),o={},u=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),l=!1;for(const e of a){let n=i[e],a=e in r;if(n){let i,s=r[e];u.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:s,context:t.context,parent:o});let a=n instanceof Ue?n.spec:void 0,c=null==a?void 0:a.strict;if(null!=a&&a.strip){l=l||e in r;continue}i=t.__validating&&c?r[e]:n.cast(r[e],u),void 0!==i&&(o[e]=i)}else a&&!s&&(o[e]=r[e]);a===e in o&&o[e]===r[e]||(l=!0)}return l?o:r}_validate(e,t={},n,r){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:s},...i],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,i)=>{if(!a||!st(i))return void r(e,i);s=s||i;let o=[];for(let e of this._nodes){let n=this.fields[e];n&&!je.isRef(n)&&o.push(n.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:o,value:i,originalValue:s,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),i)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const i=this.fields[n];let s=e;null!=(r=s)&&r.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=te.split(e)[0];r.add(s),i.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];r.add(t),je.isRef(n)&&n.isSibling?s(n.path,t):Ne(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return ce.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=nt(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return it(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=te.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const n=[...te.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),i=te.getter(te.join(n),!0)(e);return!(!i||!(r in i))})(i,e)&&(s=Object.assign({},i),n||delete s[e],s[t]=r(i)),s})}json(){return this.transform(rt)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Ye.exact,test(e){if(null==e)return!0;const t=at(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Ye.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=at(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Ye.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(ue)}snakeCase(){return this.transformKeys(le)}constantCase(){return this.transformKeys(e=>le(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[i,s]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),n.fields[i]=s.describe(t)}return n}}function ct(e){return new dt(e)}ut.prototype=lt.prototype;class dt extends Ue{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,n)=>{const i=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${n}]`}));return i!==e&&(r=!0),i});return r?i:n}_validate(e,t={},n,r){var i;let s=this.innerType,a=null!=(i=t.recursive)?i:this.spec.recursive;super._validate(e,t,n,(i,o)=>{var u;if(!a||!s||!this._typeCheck(o))return void r(i,o);let l=new Array(o.length);for(let n=0;n<o.length;n++){var c;l[n]=s.asNestedTest({options:t,index:n,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:l,originalValue:null!=(u=t.originalValue)?u:e,options:t},n,e=>r(e.concat(i),o))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(rt)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!Ne(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ve(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=Ee.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return this.test({message:t=t||Ee.min,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return this.test({message:t=t||Ee.max,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=t.innerType.describe(i)}return n}}ct.prototype=dt.prototype;var ht=function(e){var t;return t={mixed:{required:e("This field is required")}},Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{Ce[e][n]=t[e][n]})}),{initialValues:{workplacesIds:[]},validationSchema:ut({workplacesIds:ct().of(Qe()).required()})}},ft=["url","wsUrl","lang","data","settings"];exports.Widget=function(r){var i=r.url,s=r.wsUrl,a=r.lang,o=r.data,c=r.settings,d=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(r,ft),f=t.useGqlClients({url:i,wsUrl:s,lang:a}),_=f.graphqlSdk,w=f.gqlWsClient,b=e.useState(o),x=b[0],k=b[1],S=e.useState(c),D=S[0],O=S[1];e.useEffect(function(){!o&&_&&(_.shifts().then(function(e){var t=e.shifts;return k(function(e){return l({},e||{},{shifts:t})})}).catch(function(){}),_.listWorkplaces().then(function(e){var t=e.workplaces;return k(function(e){return l({},e||{},{workplaces:t})})}).catch(function(){}),_.listStatusChanges().then(function(e){var t=e.statusChanges;return k(function(e){return l({},e||{},{statusChanges:(n=t,n.sort(function(e,t){return e.finishedAt&&t.finishedAt?M(e.finishedAt).diff(M(t.finishedAt)):e.finishedAt?-1:1}))});var n})}).catch(function(){})),null!=D&&D.workplacesIds&&w&&D.workplacesIds.forEach(function(e){w.subscribe(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p,r=void 0,i=Array.isArray(e),s=[e],a=-1,o=[],u=void 0,l=void 0,c=void 0,d=[],f=[],v=e;do{var _=++a===s.length,w=_&&0!==o.length;if(_){if(l=0===f.length?void 0:d[d.length-1],u=c,c=f.pop(),w){if(i)u=u.slice();else{for(var b={},x=0,k=Object.keys(u);x<k.length;x++){var S=k[x];b[S]=u[S]}u=b}for(var D=0,O=0;O<o.length;O++){var T=o[O][0],M=o[O][1];i&&(T-=D),i&&null===M?(u.splice(T,1),D++):u[T]=M}}a=r.index,s=r.keys,o=r.edits,i=r.inArray,r=r.prev}else{if(l=c?i?a:s[a]:void 0,null==(u=c?c[l]:v))continue;c&&d.push(l)}var Y,E=void 0;if(!Array.isArray(u)){if(!h(u))throw new Error("Invalid AST Node: ".concat(m(u,[]),"."));var F=g(t,u.kind,_);if(F){if((E=F.call(t,u,l,c,d,f))===y)break;if(!1===E){if(!_){d.pop();continue}}else if(void 0!==E&&(o.push([l,E]),!_)){if(!h(E)){d.pop();continue}u=E}}}void 0===E&&w&&o.push([l,u]),_?d.pop():(r={inArray:i,index:a,keys:s,edits:o,prev:r},s=(i=Array.isArray(u))?u:null!==(Y=n[u.kind])&&void 0!==Y?Y:[],a=-1,o=[],c&&f.push(c),c=u)}while(void 0!==r);return 0!==o.length&&(v=o[o.length-1][1]),v}(t.WorkplaceEventDocument,{leave:v}),{id:e},function(n){var r=n.event,i=n.subject;if(r===t.WorkplaceEvent.StatusChangeCreated){var s=i;k(function(t){var n,r=null==t||null==(n=t.statusChanges)?void 0:n.filter(function(t){return t.workplaceId===e}),i=r[r.length-1];return i&&(i.finishedAt=s.startedAt),l({},t||{},{statusChanges:[].concat(t.statusChanges,[s])})})}else if(r===t.WorkplaceEvent.StatusChangeUpdated){var a=i;k(function(e){var t=e.statusChanges.map(function(e){return e.id===a.id?a:e});return l({},e||{},{statusChanges:t})})}})})},[o,_,w,D]);var T=e.useCallback(function(e){O(l({},e))},[O]);return u.default.createElement(n.BaseWidget,l({url:i,lang:a,locales:Y,data:x,settings:c,onSettingsChange:T,WidgetView:z,getSettingsFormProps:ht,SettingsFormContent:F,version:E,"data-testid":"workplaces-state-timelines-widget"},d))},exports.getDisplayName=function(e){switch(e){case"en":return"Status changes history for current shift";case"pl":return"Historia zmian statusów dla obecnej zmiany";default:return"workplaces-state-timelines-widget"}},exports.permissions=[],exports.version=E;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|