(function(xe,ae){typeof exports=="object"&&typeof module<"u"?ae(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],ae):(xe=typeof globalThis<"u"?globalThis:xe||self,ae(xe["reactjs-datetime-range-picker"]={},xe.React))})(this,function(xe,ae){"use strict";var Va={exports:{}},Et={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Jr;function hn(){if(Jr)return Et;Jr=1;var e=ae,t=Symbol.for("react.element"),a=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n={key:!0,ref:!0,__self:!0,__source:!0};function l(u,d,h){var y,v={},w=null,D=null;h!==void 0&&(w=""+h),d.key!==void 0&&(w=""+d.key),d.ref!==void 0&&(D=d.ref);for(y in d)r.call(d,y)&&!n.hasOwnProperty(y)&&(v[y]=d[y]);if(u&&u.defaultProps)for(y in d=u.defaultProps,d)v[y]===void 0&&(v[y]=d[y]);return{$$typeof:t,type:u,key:w,ref:D,props:v,_owner:s.current}}return Et.Fragment=a,Et.jsx=l,Et.jsxs=l,Et}var Ct={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Qr;function mn(){return Qr||(Qr=1,process.env.NODE_ENV!=="production"&&function(){var e=ae,t=Symbol.for("react.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),O=Symbol.iterator,G="@@iterator";function X(i){if(i===null||typeof i!="object")return null;var f=O&&i[O]||i[G];return typeof f=="function"?f:null}var ee=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function U(i){{for(var f=arguments.length,p=new Array(f>1?f-1:0),b=1;b=1&&Q>=0&&C[B]!==ne[Q];)Q--;for(;B>=1&&Q>=0;B--,Q--)if(C[B]!==ne[Q]){if(B!==1||Q!==1)do if(B--,Q--,Q<0||C[B]!==ne[Q]){var fe=` `+C[B].replace(" at new "," at ");return i.displayName&&fe.includes("")&&(fe=fe.replace("",i.displayName)),typeof i=="function"&&bt.set(i,fe),fe}while(B>=1&&Q>=0);break}}}finally{Xt=!1,se.current=H,Nr(),Error.prepareStackTrace=I}var st=i?i.displayName||i.name:"",Ha=st?Mt(st):"";return typeof i=="function"&&bt.set(i,Ha),Ha}function Yt(i,f,p){return $(i,!1)}function ft(i){var f=i.prototype;return!!(f&&f.isReactComponent)}function ht(i,f,p){if(i==null)return"";if(typeof i=="function")return $(i,ft(i));if(typeof i=="string")return Mt(i);switch(i){case h:return Mt("Suspense");case y:return Mt("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case d:return Yt(i.render);case v:return ht(i.type,f,p);case w:{var b=i,I=b._payload,H=b._init;try{return ht(H(I),f,p)}catch{}}}return""}var xt=Object.prototype.hasOwnProperty,Wa={},rt=ee.ReactDebugCurrentFrame;function We(i){if(i){var f=i._owner,p=ht(i.type,i._source,f?f.type:null);rt.setExtraStackFrame(p)}else rt.setExtraStackFrame(null)}function ea(i,f,p,b,I){{var H=Function.call.bind(xt);for(var F in i)if(H(i,F)){var C=void 0;try{if(typeof i[F]!="function"){var ne=Error((b||"React class")+": "+p+" type `"+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[F]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ne.name="Invariant Violation",ne}C=i[F](f,F,b,p,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(B){C=B}C&&!(C instanceof Error)&&(We(I),U("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",b||"React class",p,F,typeof C),We(null)),C instanceof Error&&!(C.message in Wa)&&(Wa[C.message]=!0,We(I),U("Failed %s type: %s",p,C.message),We(null))}}}var Cr=Array.isArray;function Rt(i){return Cr(i)}function Pr(i){{var f=typeof Symbol=="function"&&Symbol.toStringTag,p=f&&i[Symbol.toStringTag]||i.constructor.name||"Object";return p}}function Fr(i){try{return Aa(i),!1}catch{return!0}}function Aa(i){return""+i}function Ia(i){if(Fr(i))return U("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pr(i)),Aa(i)}var Ae=ee.ReactCurrentOwner,Wr={key:!0,ref:!0,__self:!0,__source:!0},ta,aa,Qe;Qe={};function ja(i){if(xt.call(i,"ref")){var f=Object.getOwnPropertyDescriptor(i,"ref").get;if(f&&f.isReactWarning)return!1}return i.ref!==void 0}function La(i){if(xt.call(i,"key")){var f=Object.getOwnPropertyDescriptor(i,"key").get;if(f&&f.isReactWarning)return!1}return i.key!==void 0}function Ar(i,f){if(typeof i.ref=="string"&&Ae.current&&f&&Ae.current.stateNode!==f){var p=_e(Ae.current.type);Qe[p]||(U('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',_e(Ae.current.type),i.ref),Qe[p]=!0)}}function Ir(i,f){{var p=function(){ta||(ta=!0,U("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};p.isReactWarning=!0,Object.defineProperty(i,"key",{get:p,configurable:!0})}}function $a(i,f){{var p=function(){aa||(aa=!0,U("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};p.isReactWarning=!0,Object.defineProperty(i,"ref",{get:p,configurable:!0})}}var N=function(i,f,p,b,I,H,F){var C={$$typeof:t,type:i,key:f,ref:p,props:F,_owner:H};return C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(C,"_self",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.defineProperty(C,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C};function g(i,f,p,b,I){{var H,F={},C=null,ne=null;p!==void 0&&(Ia(p),C=""+p),La(f)&&(Ia(f.key),C=""+f.key),ja(f)&&(ne=f.ref,Ar(f,I));for(H in f)xt.call(f,H)&&!Wr.hasOwnProperty(H)&&(F[H]=f[H]);if(i&&i.defaultProps){var B=i.defaultProps;for(H in B)F[H]===void 0&&(F[H]=B[H])}if(C||ne){var Q=typeof i=="function"?i.displayName||i.name||"Unknown":i;C&&Ir(F,Q),ne&&$a(F,Q)}return N(i,C,ne,I,b,Ae.current,F)}}var k=ee.ReactCurrentOwner,S=ee.ReactDebugCurrentFrame;function Y(i){if(i){var f=i._owner,p=ht(i.type,i._source,f?f.type:null);S.setExtraStackFrame(p)}else S.setExtraStackFrame(null)}var R;R=!1;function x(i){return typeof i=="object"&&i!==null&&i.$$typeof===t}function J(){{if(k.current){var i=_e(k.current.type);if(i)return` Check the render method of \``+i+"`."}return""}}function Ie(i){{if(i!==void 0){var f=i.fileName.replace(/^.*[\\\/]/,""),p=i.lineNumber;return` Check your code at `+f+":"+p+"."}return""}}var Ye={};function ra(i){{var f=J();if(!f){var p=typeof i=="string"?i:i.displayName||i.name;p&&(f=` Check the top-level render call using <`+p+">.")}return f}}function Nt(i,f){{if(!i._store||i._store.validated||i.key!=null)return;i._store.validated=!0;var p=ra(f);if(Ye[p])return;Ye[p]=!0;var b="";i&&i._owner&&i._owner!==k.current&&(b=" It was passed a child from "+_e(i._owner.type)+"."),Y(i),U('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',p,b),Y(null)}}function mt(i,f){{if(typeof i!="object")return;if(Rt(i))for(var p=0;p",C=" Did you accidentally export a JSX literal instead of a component?"):B=typeof i,U("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",B,C)}var Q=g(i,f,p,I,H);if(Q==null)return Q;if(F){var fe=f.children;if(fe!==void 0)if(b)if(Rt(fe)){for(var st=0;st>>0,r;for(r=0;r0)for(a=0;a=0;return(n?a?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var Xa=/(\[[^\[]*\])|(\\)?([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,na=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,er={},yt={};function M(e,t,a,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(yt[e]=s),t&&(yt[t[0]]=function(){return Ee(s.apply(this,arguments),t[1],t[2])}),a&&(yt[a]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function _n(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Tn(e){var t=e.match(Xa),a,r;for(a=0,r=t.length;a=0&&na.test(e);)e=e.replace(na,r),na.lastIndex=0,a-=1;return e}var Sn={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function gn(e){var t=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return t||!a?t:(this._longDateFormat[e]=a.match(Xa).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var kn="Invalid date";function On(){return this._invalidDate}var Mn="%d",bn=/\d{1,2}/;function Yn(e){return this._ordinal.replace("%d",e)}var xn={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Rn(e,t,a,r){var s=this._relativeTime[a];return Ne(s)?s(e,t,a,r):s.replace(/%d/i,e)}function Nn(e,t){var a=this._relativeTime[e>0?"future":"past"];return Ne(a)?a(t):a.replace(/%s/i,t)}var ns={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 ve(e){return typeof e=="string"?ns[e]||ns[e.toLowerCase()]:void 0}function tr(e){var t={},a,r;for(r in e)j(e,r)&&(a=ve(r),a&&(t[a]=e[r]));return t}var En={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Cn(e){var t=[],a;for(a in e)j(e,a)&&t.push({unit:a,priority:En[a]});return t.sort(function(r,s){return r.priority-s.priority}),t}var is=/\d/,he=/\d\d/,ls=/\d{3}/,ar=/\d{4}/,la=/[+-]?\d{6}/,z=/\d\d?/,os=/\d\d\d\d?/,us=/\d\d\d\d\d\d?/,oa=/\d{1,3}/,rr=/\d{1,4}/,ua=/[+-]?\d{1,6}/,Dt=/\d+/,da=/[+-]?\d+/,Pn=/Z|[+-]\d\d:?\d\d/gi,ca=/Z|[+-]\d\d(?::?\d\d)?/gi,Fn=/[+-]?\d+(\.\d{1,3})?/,Wt=/[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,vt=/^[1-9]\d?/,sr=/^([1-9]\d|\d)/,fa;fa={};function _(e,t,a){fa[e]=Ne(t)?t:function(r,s){return r&&a?a:t}}function Wn(e,t){return j(fa,e)?fa[e](t._strict,t._locale):new RegExp(An(e))}function An(e){return Le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,a,r,s,n){return a||r||s||n}))}function Le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function pe(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function P(e){var t=+e,a=0;return t!==0&&isFinite(t)&&(a=pe(t)),a}var nr={};function V(e,t){var a,r=t,s;for(typeof e=="string"&&(e=[e]),je(t)&&(r=function(n,l){l[t]=P(n)}),s=e.length,a=0;a68?1900:2e3)};var ds=pt("FullYear",!0);function $n(){return ha(this.year())}function pt(e,t){return function(a){return a!=null?(cs(this,e,a),o.updateOffset(this,t),this):jt(this,e)}}function jt(e,t){if(!e.isValid())return NaN;var a=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?a.getUTCMilliseconds():a.getMilliseconds();case"Seconds":return r?a.getUTCSeconds():a.getSeconds();case"Minutes":return r?a.getUTCMinutes():a.getMinutes();case"Hours":return r?a.getUTCHours():a.getHours();case"Date":return r?a.getUTCDate():a.getDate();case"Day":return r?a.getUTCDay():a.getDay();case"Month":return r?a.getUTCMonth():a.getMonth();case"FullYear":return r?a.getUTCFullYear():a.getFullYear();default:return NaN}}function cs(e,t,a){var r,s,n,l,u;if(!(!e.isValid()||isNaN(a))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(a):r.setMilliseconds(a));case"Seconds":return void(s?r.setUTCSeconds(a):r.setSeconds(a));case"Minutes":return void(s?r.setUTCMinutes(a):r.setMinutes(a));case"Hours":return void(s?r.setUTCHours(a):r.setHours(a));case"Date":return void(s?r.setUTCDate(a):r.setDate(a));case"FullYear":break;default:return}n=a,l=e.month(),u=e.date(),u=u===29&&l===1&&!ha(n)?28:u,s?r.setUTCFullYear(n,l,u):r.setFullYear(n,l,u)}}function Un(e){return e=ve(e),Ne(this[e])?this[e]():this}function Hn(e,t){if(typeof e=="object"){e=tr(e);var a=Cn(e),r,s=a.length;for(r=0;r=0?(u=new Date(e+400,t,a,r,s,n,l),isFinite(u.getFullYear())&&u.setFullYear(e)):u=new Date(e,t,a,r,s,n,l),u}function Lt(e){var t,a;return e<100&&e>=0?(a=Array.prototype.slice.call(arguments),a[0]=e+400,t=new Date(Date.UTC.apply(null,a)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ma(e,t,a){var r=7+t-a,s=(7+Lt(e,0,r).getUTCDay()-t)%7;return-s+r-1}function vs(e,t,a,r,s){var n=(7+a-r)%7,l=ma(e,r,s),u=1+7*(t-1)+n+l,d,h;return u<=0?(d=e-1,h=It(d)+u):u>It(e)?(d=e+1,h=u-It(e)):(d=e,h=u),{year:d,dayOfYear:h}}function $t(e,t,a){var r=ma(e.year(),t,a),s=Math.floor((e.dayOfYear()-r-1)/7)+1,n,l;return s<1?(l=e.year()-1,n=s+He(l,t,a)):s>He(e.year(),t,a)?(n=s-He(e.year(),t,a),l=e.year()+1):(l=e.year(),n=s),{week:n,year:l}}function He(e,t,a){var r=ma(e,t,a),s=ma(e+1,t,a);return(It(e)-r+s)/7}M("w",["ww",2],"wo","week"),M("W",["WW",2],"Wo","isoWeek"),_("w",z,vt),_("ww",z,he),_("W",z,vt),_("WW",z,he),At(["w","ww","W","WW"],function(e,t,a,r){t[r.substr(0,1)]=P(e)});function ai(e){return $t(e,this._week.dow,this._week.doy).week}var ri={dow:0,doy:6};function si(){return this._week.dow}function ni(){return this._week.doy}function ii(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function li(e){var t=$t(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}M("d",0,"do","day"),M("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),M("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),M("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),M("e",0,0,"weekday"),M("E",0,0,"isoWeekday"),_("d",z),_("e",z),_("E",z),_("dd",function(e,t){return t.weekdaysMinRegex(e)}),_("ddd",function(e,t){return t.weekdaysShortRegex(e)}),_("dddd",function(e,t){return t.weekdaysRegex(e)}),At(["dd","ddd","dddd"],function(e,t,a,r){var s=a._locale.weekdaysParse(e,r,a._strict);s!=null?t.d=s:E(a).invalidWeekday=e}),At(["d","e","E"],function(e,t,a,r){t[r]=P(e)});function oi(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function ui(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function lr(e,t){return e.slice(t,7).concat(e.slice(0,t))}var di="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ps="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ci="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),fi=Wt,hi=Wt,mi=Wt;function yi(e,t){var a=Se(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?lr(a,this._week.dow):e?a[e.day()]:a}function Di(e){return e===!0?lr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function vi(e){return e===!0?lr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function pi(e,t,a){var r,s,n,l=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)n=Re([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(n,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(n,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(n,"").toLocaleLowerCase();return a?t==="dddd"?(s=K.call(this._weekdaysParse,l),s!==-1?s:null):t==="ddd"?(s=K.call(this._shortWeekdaysParse,l),s!==-1?s:null):(s=K.call(this._minWeekdaysParse,l),s!==-1?s:null):t==="dddd"?(s=K.call(this._weekdaysParse,l),s!==-1||(s=K.call(this._shortWeekdaysParse,l),s!==-1)?s:(s=K.call(this._minWeekdaysParse,l),s!==-1?s:null)):t==="ddd"?(s=K.call(this._shortWeekdaysParse,l),s!==-1||(s=K.call(this._weekdaysParse,l),s!==-1)?s:(s=K.call(this._minWeekdaysParse,l),s!==-1?s:null)):(s=K.call(this._minWeekdaysParse,l),s!==-1||(s=K.call(this._weekdaysParse,l),s!==-1)?s:(s=K.call(this._shortWeekdaysParse,l),s!==-1?s:null))}function wi(e,t,a){var r,s,n;if(this._weekdaysParseExact)return pi.call(this,e,t,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=Re([2e3,1]).day(r),a&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(n="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(n.replace(".",""),"i")),a&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(a&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(a&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!a&&this._weekdaysParse[r].test(e))return r}}function _i(e){if(!this.isValid())return e!=null?this:NaN;var t=jt(this,"Day");return e!=null?(e=oi(e,this.localeData()),this.add(e-t,"d")):t}function Ti(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Si(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=ui(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function gi(e){return this._weekdaysParseExact?(j(this,"_weekdaysRegex")||or.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(j(this,"_weekdaysRegex")||(this._weekdaysRegex=fi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ki(e){return this._weekdaysParseExact?(j(this,"_weekdaysRegex")||or.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(j(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=hi),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Oi(e){return this._weekdaysParseExact?(j(this,"_weekdaysRegex")||or.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(j(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=mi),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function or(){function e(y,v){return v.length-y.length}var t=[],a=[],r=[],s=[],n,l,u,d,h;for(n=0;n<7;n++)l=Re([2e3,1]).day(n),u=Le(this.weekdaysMin(l,"")),d=Le(this.weekdaysShort(l,"")),h=Le(this.weekdays(l,"")),t.push(u),a.push(d),r.push(h),s.push(u),s.push(d),s.push(h);t.sort(e),a.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ur(){return this.hours()%12||12}function Mi(){return this.hours()||24}M("H",["HH",2],0,"hour"),M("h",["hh",2],0,ur),M("k",["kk",2],0,Mi),M("hmm",0,0,function(){return""+ur.apply(this)+Ee(this.minutes(),2)}),M("hmmss",0,0,function(){return""+ur.apply(this)+Ee(this.minutes(),2)+Ee(this.seconds(),2)}),M("Hmm",0,0,function(){return""+this.hours()+Ee(this.minutes(),2)}),M("Hmmss",0,0,function(){return""+this.hours()+Ee(this.minutes(),2)+Ee(this.seconds(),2)});function ws(e,t){M(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}ws("a",!0),ws("A",!1);function _s(e,t){return t._meridiemParse}_("a",_s),_("A",_s),_("H",z,sr),_("h",z,vt),_("k",z,vt),_("HH",z,he),_("hh",z,he),_("kk",z,he),_("hmm",os),_("hmmss",us),_("Hmm",os),_("Hmmss",us),V(["H","HH"],te),V(["k","kk"],function(e,t,a){var r=P(e);t[te]=r===24?0:r}),V(["a","A"],function(e,t,a){a._isPm=a._locale.isPM(e),a._meridiem=e}),V(["h","hh"],function(e,t,a){t[te]=P(e),E(a).bigHour=!0}),V("hmm",function(e,t,a){var r=e.length-2;t[te]=P(e.substr(0,r)),t[ke]=P(e.substr(r)),E(a).bigHour=!0}),V("hmmss",function(e,t,a){var r=e.length-4,s=e.length-2;t[te]=P(e.substr(0,r)),t[ke]=P(e.substr(r,2)),t[Ue]=P(e.substr(s)),E(a).bigHour=!0}),V("Hmm",function(e,t,a){var r=e.length-2;t[te]=P(e.substr(0,r)),t[ke]=P(e.substr(r))}),V("Hmmss",function(e,t,a){var r=e.length-4,s=e.length-2;t[te]=P(e.substr(0,r)),t[ke]=P(e.substr(r,2)),t[Ue]=P(e.substr(s))});function bi(e){return(e+"").toLowerCase().charAt(0)==="p"}var Yi=/[ap]\.?m?\.?/i,xi=pt("Hours",!0);function Ri(e,t,a){return e>11?a?"pm":"PM":a?"am":"AM"}var Ts={calendar:pn,longDateFormat:Sn,invalidDate:kn,ordinal:Mn,dayOfMonthOrdinalParse:bn,relativeTime:xn,months:Gn,monthsShort:fs,week:ri,weekdays:di,weekdaysMin:ci,weekdaysShort:ps,meridiemParse:Yi},q={},Ut={},Ht;function Ni(e,t){var a,r=Math.min(e.length,t.length);for(a=0;a0;){if(s=ya(n.slice(0,a).join("-")),s)return s;if(r&&r.length>=a&&Ni(n,r)>=a-1)break;a--}t++}return Ht}function Ci(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ya(e){var t=null,a;if(q[e]===void 0&&typeof module<"u"&&module&&module.exports&&Ci(e))try{t=Ht._abbr,a=require,a("./locale/"+e),Xe(t)}catch{q[e]=null}return q[e]}function Xe(e,t){var a;return e&&(de(t)?a=Ve(e):a=dr(e,t),a?Ht=a:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ht._abbr}function dr(e,t){if(t!==null){var a,r=Ts;if(t.abbr=e,q[e]!=null)rs("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=q[e]._config;else if(t.parentLocale!=null)if(q[t.parentLocale]!=null)r=q[t.parentLocale]._config;else if(a=ya(t.parentLocale),a!=null)r=a._config;else return Ut[t.parentLocale]||(Ut[t.parentLocale]=[]),Ut[t.parentLocale].push({name:e,config:t}),null;return q[e]=new Qa(Ja(r,t)),Ut[e]&&Ut[e].forEach(function(s){dr(s.name,s.config)}),Xe(e),q[e]}else return delete q[e],null}function Pi(e,t){if(t!=null){var a,r,s=Ts;q[e]!=null&&q[e].parentLocale!=null?q[e].set(Ja(q[e]._config,t)):(r=ya(e),r!=null&&(s=r._config),t=Ja(s,t),r==null&&(t.abbr=e),a=new Qa(t),a.parentLocale=q[e],q[e]=a),Xe(e)}else q[e]!=null&&(q[e].parentLocale!=null?(q[e]=q[e].parentLocale,e===Xe()&&Xe(e)):q[e]!=null&&delete q[e]);return q[e]}function Ve(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ht;if(!Se(e)){if(t=ya(e),t)return t;e=[e]}return Ei(e)}function Fi(){return Ka(q)}function cr(e){var t,a=e._a;return a&&E(e).overflow===-2&&(t=a[$e]<0||a[$e]>11?$e:a[Ce]<1||a[Ce]>ir(a[ie],a[$e])?Ce:a[te]<0||a[te]>24||a[te]===24&&(a[ke]!==0||a[Ue]!==0||a[it]!==0)?te:a[ke]<0||a[ke]>59?ke:a[Ue]<0||a[Ue]>59?Ue:a[it]<0||a[it]>999?it:-1,E(e)._overflowDayOfYear&&(tCe)&&(t=Ce),E(e)._overflowWeeks&&t===-1&&(t=jn),E(e)._overflowWeekday&&t===-1&&(t=Ln),E(e).overflow=t),e}var Wi=/^\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)?)?$/,Ai=/^\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)?)?$/,Ii=/Z|[+-]\d\d(?::?\d\d)?/,Da=[["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]],fr=[["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/]],ji=/^\/?Date\((-?\d+)/i,Li=/^(?:(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}))$/,$i={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function gs(e){var t,a,r=e._i,s=Wi.exec(r)||Ai.exec(r),n,l,u,d,h=Da.length,y=fr.length;if(s){for(E(e).iso=!0,t=0,a=h;tIt(l)||e._dayOfYear===0)&&(E(e)._overflowDayOfYear=!0),a=Lt(l,0,e._dayOfYear),e._a[$e]=a.getUTCMonth(),e._a[Ce]=a.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[te]===24&&e._a[ke]===0&&e._a[Ue]===0&&e._a[it]===0&&(e._nextDay=!0,e._a[te]=0),e._d=(e._useUTC?Lt:ti).apply(null,r),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[te]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==n&&(E(e).weekdayMismatch=!0)}}function Bi(e){var t,a,r,s,n,l,u,d,h;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(n=1,l=4,a=wt(t.GG,e._a[ie],$t(Z(),1,4).year),r=wt(t.W,1),s=wt(t.E,1),(s<1||s>7)&&(d=!0)):(n=e._locale._week.dow,l=e._locale._week.doy,h=$t(Z(),n,l),a=wt(t.gg,e._a[ie],h.year),r=wt(t.w,h.week),t.d!=null?(s=t.d,(s<0||s>6)&&(d=!0)):t.e!=null?(s=t.e+n,(t.e<0||t.e>6)&&(d=!0)):s=n),r<1||r>He(a,n,l)?E(e)._overflowWeeks=!0:d!=null?E(e)._overflowWeekday=!0:(u=vs(a,r,s,n,l),e._a[ie]=u.year,e._dayOfYear=u.dayOfYear)}o.ISO_8601=function(){},o.RFC_2822=function(){};function mr(e){if(e._f===o.ISO_8601){gs(e);return}if(e._f===o.RFC_2822){ks(e);return}e._a=[],E(e).empty=!0;var t=""+e._i,a,r,s,n,l,u=t.length,d=0,h,y;for(s=ss(e._f,e._locale).match(Xa)||[],y=s.length,a=0;a0&&E(e).unusedInput.push(l),t=t.slice(t.indexOf(r)+r.length),d+=r.length),yt[n]?(r?E(e).empty=!1:E(e).unusedTokens.push(n),In(n,r,e)):e._strict&&!r&&E(e).unusedTokens.push(n);E(e).charsLeftOver=u-d,t.length>0&&E(e).unusedInput.push(t),e._a[te]<=12&&E(e).bigHour===!0&&e._a[te]>0&&(E(e).bigHour=void 0),E(e).parsedDateParts=e._a.slice(0),E(e).meridiem=e._meridiem,e._a[te]=Ji(e._locale,e._a[te],e._meridiem),h=E(e).era,h!==null&&(e._a[ie]=e._locale.erasConvertYear(h,e._a[ie])),hr(e),cr(e)}function Ji(e,t,a){var r;return a==null?t:e.meridiemHour!=null?e.meridiemHour(t,a):(e.isPM!=null&&(r=e.isPM(a),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Qi(e){var t,a,r,s,n,l,u=!1,d=e._f.length;if(d===0){E(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:sa()});function bs(e,t){var a,r;if(t.length===1&&Se(t[0])&&(t=t[0]),!t.length)return Z();for(a=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function pl(){if(!de(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Ba(e,this),e=Os(e),e._a?(t=e._isUTC?Re(e._a):Z(e._a),this._isDSTShifted=this.isValid()&&ul(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function wl(){return this.isValid()?!this._isUTC:!1}function _l(){return this.isValid()?this._isUTC:!1}function xs(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Tl=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Sl=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Oe(e,t){var a=e,r=null,s,n,l;return pa(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:je(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(r=Tl.exec(e))?(s=r[1]==="-"?-1:1,a={y:0,d:P(r[Ce])*s,h:P(r[te])*s,m:P(r[ke])*s,s:P(r[Ue])*s,ms:P(yr(r[it]*1e3))*s}):(r=Sl.exec(e))?(s=r[1]==="-"?-1:1,a={y:lt(r[2],s),M:lt(r[3],s),w:lt(r[4],s),d:lt(r[5],s),h:lt(r[6],s),m:lt(r[7],s),s:lt(r[8],s)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(l=gl(Z(a.from),Z(a.to)),a={},a.ms=l.milliseconds,a.M=l.months),n=new va(a),pa(e)&&j(e,"_locale")&&(n._locale=e._locale),pa(e)&&j(e,"_isValid")&&(n._isValid=e._isValid),n}Oe.fn=va.prototype,Oe.invalid=ol;function lt(e,t){var a=e&&parseFloat(e.replace(",","."));return(isNaN(a)?0:a)*t}function Rs(e,t){var a={};return a.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(a.months,"M").isAfter(t)&&--a.months,a.milliseconds=+t-+e.clone().add(a.months,"M"),a}function gl(e,t){var a;return e.isValid()&&t.isValid()?(t=vr(t,e),e.isBefore(t)?a=Rs(e,t):(a=Rs(t,e),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function Ns(e,t){return function(a,r){var s,n;return r!==null&&!isNaN(+r)&&(rs(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."),n=a,a=r,r=n),s=Oe(a,r),Es(this,s,e),this}}function Es(e,t,a,r){var s=t._milliseconds,n=yr(t._days),l=yr(t._months);e.isValid()&&(r=r??!0,l&&ms(e,jt(e,"Month")+l*a),n&&cs(e,"Date",jt(e,"Date")+n*a),s&&e._d.setTime(e._d.valueOf()+s*a),r&&o.updateOffset(e,n||l))}var kl=Ns(1,"add"),Ol=Ns(-1,"subtract");function Cs(e){return typeof e=="string"||e instanceof String}function Ml(e){return ge(e)||Pt(e)||Cs(e)||je(e)||Yl(e)||bl(e)||e===null||e===void 0}function bl(e){var t=nt(e)&&!Ga(e),a=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,n,l=r.length;for(s=0;sa.valueOf():a.valueOf()9999?ia(a,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ne(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ia(a,"Z")):ia(a,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ul(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",a,r,s,n;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),a="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",n=t+'[")]',this.format(a+r+s+n)}function Hl(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=ia(this,e);return this.localeData().postformat(t)}function Vl(e,t){return this.isValid()&&(ge(e)&&e.isValid()||Z(e).isValid())?Oe({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Gl(e){return this.from(Z(),e)}function zl(e,t){return this.isValid()&&(ge(e)&&e.isValid()||Z(e).isValid())?Oe({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Zl(e){return this.to(Z(),e)}function Ps(e){var t;return e===void 0?this._locale._abbr:(t=Ve(e),t!=null&&(this._locale=t),this)}var Fs=De("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Ws(){return this._locale}var _a=1e3,_t=60*_a,Ta=60*_t,As=(365*400+97)*24*Ta;function Tt(e,t){return(e%t+t)%t}function Is(e,t,a){return e<100&&e>=0?new Date(e+400,t,a)-As:new Date(e,t,a).valueOf()}function js(e,t,a){return e<100&&e>=0?Date.UTC(e+400,t,a)-As:Date.UTC(e,t,a)}function ql(e){var t,a;if(e=ve(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?js:Is,e){case"year":t=a(this.year(),0,1);break;case"quarter":t=a(this.year(),this.month()-this.month()%3,1);break;case"month":t=a(this.year(),this.month(),1);break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=a(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Tt(t+(this._isUTC?0:this.utcOffset()*_t),Ta);break;case"minute":t=this._d.valueOf(),t-=Tt(t,_t);break;case"second":t=this._d.valueOf(),t-=Tt(t,_a);break}return this._d.setTime(t),o.updateOffset(this,!0),this}function Bl(e){var t,a;if(e=ve(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?js:Is,e){case"year":t=a(this.year()+1,0,1)-1;break;case"quarter":t=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=a(this.year(),this.month()+1,1)-1;break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=a(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ta-Tt(t+(this._isUTC?0:this.utcOffset()*_t),Ta)-1;break;case"minute":t=this._d.valueOf(),t+=_t-Tt(t,_t)-1;break;case"second":t=this._d.valueOf(),t+=_a-Tt(t,_a)-1;break}return this._d.setTime(t),o.updateOffset(this,!0),this}function Jl(){return this._d.valueOf()-(this._offset||0)*6e4}function Ql(){return Math.floor(this.valueOf()/1e3)}function Kl(){return new Date(this.valueOf())}function Xl(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function eo(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function to(){return this.isValid()?this.toISOString():null}function ao(){return Za(this)}function ro(){return Ke({},E(this))}function so(){return E(this).overflow}function no(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}M("N",0,0,"eraAbbr"),M("NN",0,0,"eraAbbr"),M("NNN",0,0,"eraAbbr"),M("NNNN",0,0,"eraName"),M("NNNNN",0,0,"eraNarrow"),M("y",["y",1],"yo","eraYear"),M("y",["yy",2],0,"eraYear"),M("y",["yyy",3],0,"eraYear"),M("y",["yyyy",4],0,"eraYear"),_("N",wr),_("NN",wr),_("NNN",wr),_("NNNN",vo),_("NNNNN",po),V(["N","NN","NNN","NNNN","NNNNN"],function(e,t,a,r){var s=a._locale.erasParse(e,r,a._strict);s?E(a).era=s:E(a).invalidEra=e}),_("y",Dt),_("yy",Dt),_("yyy",Dt),_("yyyy",Dt),_("yo",wo),V(["y","yy","yyy","yyyy"],ie),V(["yo"],function(e,t,a,r){var s;a._locale._eraYearOrdinalRegex&&(s=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?t[ie]=a._locale.eraYearOrdinalParse(e,s):t[ie]=parseInt(e,10)});function io(e,t){var a,r,s,n=this._eras||Ve("en")._eras;for(a=0,r=n.length;a=0)return n[r]}function oo(e,t){var a=e.since<=e.until?1:-1;return t===void 0?o(e.since).year():o(e.since).year()+(t-e.offset)*a}function uo(){var e,t,a,r=this.localeData().eras();for(e=0,t=r.length;en&&(t=n),Mo.call(this,e,t,a,r,s))}function Mo(e,t,a,r,s){var n=vs(e,t,a,r,s),l=Lt(n.year,0,n.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}M("Q",0,"Qo","quarter"),_("Q",is),V("Q",function(e,t){t[$e]=(P(e)-1)*3});function bo(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}M("D",["DD",2],"Do","date"),_("D",z,vt),_("DD",z,he),_("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),V(["D","DD"],Ce),V("Do",function(e,t){t[Ce]=P(e.match(z)[0])});var $s=pt("Date",!0);M("DDD",["DDDD",3],"DDDo","dayOfYear"),_("DDD",oa),_("DDDD",ls),V(["DDD","DDDD"],function(e,t,a){a._dayOfYear=P(e)});function Yo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}M("m",["mm",2],0,"minute"),_("m",z,sr),_("mm",z,he),V(["m","mm"],ke);var xo=pt("Minutes",!1);M("s",["ss",2],0,"second"),_("s",z,sr),_("ss",z,he),V(["s","ss"],Ue);var Ro=pt("Seconds",!1);M("S",0,0,function(){return~~(this.millisecond()/100)}),M(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),M(0,["SSS",3],0,"millisecond"),M(0,["SSSS",4],0,function(){return this.millisecond()*10}),M(0,["SSSSS",5],0,function(){return this.millisecond()*100}),M(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),M(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),M(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),M(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),_("S",oa,is),_("SS",oa,he),_("SSS",oa,ls);var et,Us;for(et="SSSS";et.length<=9;et+="S")_(et,Dt);function No(e,t){t[it]=P(("0."+e)*1e3)}for(et="S";et.length<=9;et+="S")V(et,No);Us=pt("Milliseconds",!1),M("z",0,0,"zoneAbbr"),M("zz",0,0,"zoneName");function Eo(){return this._isUTC?"UTC":""}function Co(){return this._isUTC?"Coordinated Universal Time":""}var m=Ft.prototype;m.add=kl,m.calendar=Nl,m.clone=El,m.diff=jl,m.endOf=Bl,m.format=Hl,m.from=Vl,m.fromNow=Gl,m.to=zl,m.toNow=Zl,m.get=Un,m.invalidAt=so,m.isAfter=Cl,m.isBefore=Pl,m.isBetween=Fl,m.isSame=Wl,m.isSameOrAfter=Al,m.isSameOrBefore=Il,m.isValid=ao,m.lang=Fs,m.locale=Ps,m.localeData=Ws,m.max=al,m.min=tl,m.parsingFlags=ro,m.set=Hn,m.startOf=ql,m.subtract=Ol,m.toArray=Xl,m.toObject=eo,m.toDate=Kl,m.toISOString=$l,m.inspect=Ul,typeof Symbol<"u"&&Symbol.for!=null&&(m[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),m.toJSON=to,m.toString=Ll,m.unix=Ql,m.valueOf=Jl,m.creationData=no,m.eraName=uo,m.eraNarrow=co,m.eraAbbr=fo,m.eraYear=ho,m.year=ds,m.isLeapYear=$n,m.weekYear=_o,m.isoWeekYear=To,m.quarter=m.quarters=bo,m.month=ys,m.daysInMonth=Kn,m.week=m.weeks=ii,m.isoWeek=m.isoWeeks=li,m.weeksInYear=ko,m.weeksInWeekYear=Oo,m.isoWeeksInYear=So,m.isoWeeksInISOWeekYear=go,m.date=$s,m.day=m.days=_i,m.weekday=Ti,m.isoWeekday=Si,m.dayOfYear=Yo,m.hour=m.hours=xi,m.minute=m.minutes=xo,m.second=m.seconds=Ro,m.millisecond=m.milliseconds=Us,m.utcOffset=cl,m.utc=hl,m.local=ml,m.parseZone=yl,m.hasAlignedHourOffset=Dl,m.isDST=vl,m.isLocal=wl,m.isUtcOffset=_l,m.isUtc=xs,m.isUTC=xs,m.zoneAbbr=Eo,m.zoneName=Co,m.dates=De("dates accessor is deprecated. Use date instead.",$s),m.months=De("months accessor is deprecated. Use month instead",ys),m.years=De("years accessor is deprecated. Use year instead",ds),m.zone=De("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",fl),m.isDSTShifted=De("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",pl);function Po(e){return Z(e*1e3)}function Fo(){return Z.apply(null,arguments).parseZone()}function Hs(e){return e}var L=Qa.prototype;L.calendar=wn,L.longDateFormat=gn,L.invalidDate=On,L.ordinal=Yn,L.preparse=Hs,L.postformat=Hs,L.relativeTime=Rn,L.pastFuture=Nn,L.set=vn,L.eras=io,L.erasParse=lo,L.erasConvertYear=oo,L.erasAbbrRegex=yo,L.erasNameRegex=mo,L.erasNarrowRegex=Do,L.months=qn,L.monthsShort=Bn,L.monthsParse=Qn,L.monthsRegex=ei,L.monthsShortRegex=Xn,L.week=ai,L.firstDayOfYear=ni,L.firstDayOfWeek=si,L.weekdays=yi,L.weekdaysMin=vi,L.weekdaysShort=Di,L.weekdaysParse=wi,L.weekdaysRegex=gi,L.weekdaysShortRegex=ki,L.weekdaysMinRegex=Oi,L.isPM=bi,L.meridiem=Ri;function ga(e,t,a,r){var s=Ve(),n=Re().set(r,t);return s[a](n,e)}function Vs(e,t,a){if(je(e)&&(t=e,e=void 0),e=e||"",t!=null)return ga(e,t,a,"month");var r,s=[];for(r=0;r<12;r++)s[r]=ga(e,r,a,"month");return s}function Tr(e,t,a,r){typeof e=="boolean"?(je(t)&&(a=t,t=void 0),t=t||""):(t=e,a=t,e=!1,je(t)&&(a=t,t=void 0),t=t||"");var s=Ve(),n=e?s._week.dow:0,l,u=[];if(a!=null)return ga(t,(a+n)%7,r,"day");for(l=0;l<7;l++)u[l]=ga(t,(l+n)%7,r,"day");return u}function Wo(e,t){return Vs(e,t,"months")}function Ao(e,t){return Vs(e,t,"monthsShort")}function Io(e,t,a){return Tr(e,t,a,"weekdays")}function jo(e,t,a){return Tr(e,t,a,"weekdaysShort")}function Lo(e,t,a){return Tr(e,t,a,"weekdaysMin")}Xe("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,a=P(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+a}}),o.lang=De("moment.lang is deprecated. Use moment.locale instead.",Xe),o.langData=De("moment.langData is deprecated. Use moment.localeData instead.",Ve);var Ge=Math.abs;function $o(){var e=this._data;return this._milliseconds=Ge(this._milliseconds),this._days=Ge(this._days),this._months=Ge(this._months),e.milliseconds=Ge(e.milliseconds),e.seconds=Ge(e.seconds),e.minutes=Ge(e.minutes),e.hours=Ge(e.hours),e.months=Ge(e.months),e.years=Ge(e.years),this}function Gs(e,t,a,r){var s=Oe(t,a);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function Uo(e,t){return Gs(this,e,t,1)}function Ho(e,t){return Gs(this,e,t,-1)}function zs(e){return e<0?Math.floor(e):Math.ceil(e)}function Vo(){var e=this._milliseconds,t=this._days,a=this._months,r=this._data,s,n,l,u,d;return e>=0&&t>=0&&a>=0||e<=0&&t<=0&&a<=0||(e+=zs(Sr(a)+t)*864e5,t=0,a=0),r.milliseconds=e%1e3,s=pe(e/1e3),r.seconds=s%60,n=pe(s/60),r.minutes=n%60,l=pe(n/60),r.hours=l%24,t+=pe(l/24),d=pe(Zs(t)),a+=d,t-=zs(Sr(d)),u=pe(a/12),a%=12,r.days=t,r.months=a,r.years=u,this}function Zs(e){return e*4800/146097}function Sr(e){return e*146097/4800}function Go(e){if(!this.isValid())return NaN;var t,a,r=this._milliseconds;if(e=ve(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,a=this._months+Zs(t),e){case"month":return a;case"quarter":return a/3;case"year":return a/12}else switch(t=this._days+Math.round(Sr(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function ze(e){return function(){return this.as(e)}}var qs=ze("ms"),zo=ze("s"),Zo=ze("m"),qo=ze("h"),Bo=ze("d"),Jo=ze("w"),Qo=ze("M"),Ko=ze("Q"),Xo=ze("y"),eu=qs;function tu(){return Oe(this)}function au(e){return e=ve(e),this.isValid()?this[e+"s"]():NaN}function ot(e){return function(){return this.isValid()?this._data[e]:NaN}}var ru=ot("milliseconds"),su=ot("seconds"),nu=ot("minutes"),iu=ot("hours"),lu=ot("days"),ou=ot("months"),uu=ot("years");function du(){return pe(this.days()/7)}var Ze=Math.round,St={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cu(e,t,a,r,s){return s.relativeTime(t||1,!!a,e,r)}function fu(e,t,a,r){var s=Oe(e).abs(),n=Ze(s.as("s")),l=Ze(s.as("m")),u=Ze(s.as("h")),d=Ze(s.as("d")),h=Ze(s.as("M")),y=Ze(s.as("w")),v=Ze(s.as("y")),w=n<=a.ss&&["s",n]||n0,w[4]=r,cu.apply(null,w)}function hu(e){return e===void 0?Ze:typeof e=="function"?(Ze=e,!0):!1}function mu(e,t){return St[e]===void 0?!1:t===void 0?St[e]:(St[e]=t,e==="s"&&(St.ss=t-1),!0)}function yu(e,t){if(!this.isValid())return this.localeData().invalidDate();var a=!1,r=St,s,n;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(a=e),typeof t=="object"&&(r=Object.assign({},St,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),n=fu(this,!a,r,s),a&&(n=s.pastFuture(+this,n)),s.postformat(n)}var gr=Math.abs;function gt(e){return(e>0)-(e<0)||+e}function ka(){if(!this.isValid())return this.localeData().invalidDate();var e=gr(this._milliseconds)/1e3,t=gr(this._days),a=gr(this._months),r,s,n,l,u=this.asSeconds(),d,h,y,v;return u?(r=pe(e/60),s=pe(r/60),e%=60,r%=60,n=pe(a/12),a%=12,l=e?e.toFixed(3).replace(/\.?0+$/,""):"",d=u<0?"-":"",h=gt(this._months)!==gt(u)?"-":"",y=gt(this._days)!==gt(u)?"-":"",v=gt(this._milliseconds)!==gt(u)?"-":"",d+"P"+(n?h+n+"Y":"")+(a?h+a+"M":"")+(t?y+t+"D":"")+(s||r||e?"T":"")+(s?v+s+"H":"")+(r?v+r+"M":"")+(e?v+l+"S":"")):"P0D"}var W=va.prototype;W.isValid=ll,W.abs=$o,W.add=Uo,W.subtract=Ho,W.as=Go,W.asMilliseconds=qs,W.asSeconds=zo,W.asMinutes=Zo,W.asHours=qo,W.asDays=Bo,W.asWeeks=Jo,W.asMonths=Qo,W.asQuarters=Ko,W.asYears=Xo,W.valueOf=eu,W._bubble=Vo,W.clone=tu,W.get=au,W.milliseconds=ru,W.seconds=su,W.minutes=nu,W.hours=iu,W.days=lu,W.weeks=du,W.months=ou,W.years=uu,W.humanize=yu,W.toISOString=ka,W.toString=ka,W.toJSON=ka,W.locale=Ps,W.localeData=Ws,W.toIsoString=De("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ka),W.lang=Fs,M("X",0,0,"unix"),M("x",0,0,"valueOf"),_("x",da),_("X",Fn),V("X",function(e,t,a){a._d=new Date(parseFloat(e)*1e3)}),V("x",function(e,t,a){a._d=new Date(P(e))});//! moment.js o.version="2.30.1",yn(Z),o.fn=m,o.min=rl,o.max=sl,o.now=nl,o.utc=Re,o.unix=Po,o.months=Wo,o.isDate=Pt,o.locale=Xe,o.invalid=sa,o.duration=Oe,o.isMoment=ge,o.weekdays=Io,o.parseZone=Fo,o.localeData=Ve,o.isDuration=pa,o.monthsShort=Ao,o.weekdaysMin=Lo,o.defineLocale=dr,o.updateLocale=Pi,o.locales=Fi,o.weekdaysShort=jo,o.normalizeUnits=ve,o.relativeTimeRounding=hu,o.relativeTimeThreshold=mu,o.calendarFormat=Rl,o.prototype=m,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var me=(e=>(e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(me||{}),Oa=(e=>(e[e.focus=1]="focus",e[e.blur=2]="blur",e))(Oa||{});const kr=((...e)=>e)("daily","weekly","monthly","quarterly","yearly"),Bs="EST",Ma="MST",ba="PST",Gt="CET";function Du(){return(/\((.*)\)/.exec(new Date().toString())??[])[1]==="Central Europe Standard Time"?Gt:Ma}const c="YYYY-MM-DD",Js="00:00",Qs="23:59",qe={DEFAULT:{OPTIONS:{dateArray:[],startDate:o().format("YYYY-MM-DD"),endDate:o().format("YYYY-MM-DD"),minDate:o().subtract(2,"year").startOf("year").format("YYYY-MM-DD"),maxDate:o().format("YYYY-MM-DD"),startTime:Js,endTime:Qs,minTime:Js,maxTime:Qs},SETTINGS:{type:"daily",modelKeys:["daily","weekly","monthly","quarterly","yearly"],showTimezoneSelect:!1,useLocalTimezone:!1,timePicker:!1,inputClass:"m1drp",inputDateFormat:"",viewDateFormat:c,outputDateFormat:c,singleDatePicker:!1,componentDisabled:!1,placeholder:"Select Date",showRowNumber:!1,availableRanges:{},showRanges:!0,disableWeekends:!1,disableWeekdays:!1,displayBeginDate:!1,displayEndDate:!1,ariaLabels:{inputField:"Date Range Input Field"}},STATE:{activeEndDate:"",activeItem:{left:{},right:{}},activeRange:"",activeStartDate:"",calendarAvailable:{left:!1,right:!1},customRange:!1,dates:{left:{},right:{}},dateTitleText:{left:"",right:""},frequencyColumnHeader:"",isCalendarVisible:!1,isValidFilter:!1,isUserModelChange:!0,localTimezone:Du(),selectedDateText:"",selectedHour:{left:o().format("hh"),right:o().format("hh")},selectedMeridian:{left:"",right:""},selectedMinute:{left:o().format("mm"),right:o().format("mm")},selectedMonth:{left:o().format("MMM"),right:o().format("MMM")},selectedTimezone:"PST",selectedYear:{left:o().format("YYYY"),right:o().format("YYYY")},sides:[],timeItems:["hour","minute"],times:{left:"",right:""},timeZones:[Bs,Ma,ba,Gt],todayTime:"",weekDayOptions:["su","mo","tu","we","th","fr","sa"]},TIME_FORMAT:"HH:mm",RANGES:{daily:[{label:"Last 7 Days",count:6},{label:"Last 30 Days",count:29},{label:"Last 90 Days",count:89}],weekly:[{label:"Last 4 Weeks",count:3},{label:"Last 13 Weeks",count:12},{label:"Last 26 Weeks",count:25}],monthly:[{label:"Last 3 Months",count:2},{label:"Last 6 Months",count:5},{label:"Last 9 Months",count:8}],quarterly:[{label:"Last 2 Quarters",count:1},{label:"Last 4 Quarters",count:3}],yearly:[{label:"Last Year",count:1}]}},CONSTANT:{MONTHS_AVAILABLE:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],TIMES_AVAILABLE:["hour","minute"],MOMENT_CONVERSION_MAP:{daily:"day",weekly:"week",monthly:"month",quarterly:"quarter",yearly:"year"},USA_EST_TZ_CODE:Bs,USA_MST_TZ_CODE:Ma,USA_TZ_CODE:ba,EU_TZ_CODE:Gt,OFFSETS:{[ba]:{SO:-7,WO:-8},[Gt]:{SO:1,WO:0}},TZ_NAMES:{[Ma]:"America/Phoenix",[ba]:"America/Los_Angeles",[Gt]:"Europe/Berlin"}}},Or=qe.DEFAULT.TIME_FORMAT,Be=qe.CONSTANT.USA_TZ_CODE,kt=qe.CONSTANT.MONTHS_AVAILABLE,vu=qe.CONSTANT.TZ_NAMES,pu=qe.DEFAULT.RANGES,Mr=qe.CONSTANT.MOMENT_CONVERSION_MAP,Ks=()=>A(qe.DEFAULT.OPTIONS),wu=()=>A(qe.DEFAULT.SETTINGS),Xs=()=>A(qe.DEFAULT.STATE),_u=e=>{if(e.type&&!kr.includes(e.type)){const t=`${e.type} is an invalid calendar type. It should one of ${[...kr].join(",")}`;throw new Error(t)}},we=(e,t)=>{let a=null;if(e)return isNaN(Number(e))?a=o(e,t).format(c):a=o(e).format(c),a},tt=(e,t)=>{let a=null;return e?(e.includes(":")?e.includes("AM")||e.includes("PM")?a=o(tn(o().valueOf(),t),"h:mm A").format(Or):a=e:console.warn(`WARN_NGX_DATETIME_RANGE_PICKER: The provided time is not in correct format. Format: HH:mm or hh:mm A `),a):null},Tu=(e,t)=>(()=>{switch(e){case"daily":return`W${t}`;case"weekly":return"";case"monthly":return`Q${t}`;case"quarterly":return`${t}`;case"yearly":return""}})(),Su=e=>{const t={},a=e.type,r=A(e.maxDate);return pu[a].forEach(s=>{t[s.label]={startDate:o(r,c).subtract(s.count,Mr[a]).format(c),endDate:r}}),t["Custom Range"]={startDate:null,endDate:null},t},gu=e=>{const t=[],a=e.type,r=e.dateArray,s=e.inputDateFormat;return r.forEach(n=>{if(!n)return;let l="";isNaN(Number(n))&&(s?l=s:l=o(n)._f),s!==o(n)._f&&console.warn(`ERR_NGX_DATETIME_RANGE_PICKER: inputDateFormat !== dateFormat in dateArray. Converted dates might not be as expected `);const u=l?o(n,l):o(n);if(u){const d=u.endOf(Mr[a]).format(c);t.push(d)}else console.warn(`ERR_NGX_DATETIME_RANGE_PICKER: dateArray values are in unknown format. Pass the format or pass the dates in known format `)}),[...new Set(t)]},ku=e=>{if(!e)return;const t=o(e,c).startOf("month").day(),a=Number(o(e,c).endOf("month").format("D"));return Math.ceil((t+a)/7)},Ou=e=>{if(!e)return;const t=o(e,"YYYY").startOf("year").format(c),a=o(e,"YYYY").endOf("year").format(c),r=o(a,c).startOf("week").format(c),s=o(t,c).endOf("week").format(c),n=Ra(s);return Ra(r)-n+1},Mu=(e,t,a)=>{const r=[];if(!e||!t||!a)return[];const s=o(e,c).startOf("month"),n=o(t,c).startOf("month");let l=o(s,c).valueOf(),u=o(n,c).valueOf();const d=o().year(a).startOf("year").valueOf(),h=o().year(a).endOf("year").valueOf();lh&&(u=h);let y=o(l).month();const v=o(u).diff(o(l),"months"),w=v=kt.length?r.push(kt[y-kt.length]):r.push(kt[y]),y++;return r},bu=e=>{const t=e?e.minDate:"",a=e?e.maxDate:"",r=[];if(t&&a){const s=Number(br(t)),l=Number(br(a))-s;for(let u=0;u<=l;u++)r.push(`${s+u}`)}return r.reverse()},Yu=(e,t,a,r,s,n,l,u)=>{var w;let d=!1;const h=u.type,y=u.disableWeekends,v=u.disableWeekdays;return h==="daily"&&(t=t>n?t:n,a=a=t&&e<=a&&(d=!0,d&&(y&&(d=!en(e)),v&&(d=!Eu(e)),(w=u.dateArray)!=null&&w.length&&(d=Cu(e,u.dateArray,c)))),d},xu=(e,t,a,r,s,n,l,u,d)=>{let h=!1;const y=d.type;return d.singleDatePicker||(y==="daily"&&(t=n,a=l),e>=r&&e<=s&&e>=t&&e<=a&&u&&(h=!0)),h},Ru=(e,t,a,r)=>e===t&&r==="left"||e===a&&r==="right",Nu=(e,t)=>{const a=o().format(c),r=t.type,{firstDay:s,lastDay:n}=xa(a,r),l=o(s,c).valueOf(),u=o(n,c).valueOf();return e>=l&&e<=u},Eu=(e,t)=>!en(e,t),en=(e,t)=>{t||(t="");const a=o(e,t).day();return a===0||a===6},Cu=(e,t,a)=>(a||(a=""),t.find(r=>o(r,a).valueOf()===e)!==void 0),Pu=e=>{const t={rowNumber:"",columns:0},a=e.type,r=e.monthStartWeekNumber,s=e.dateRows,n=`${e.year}`;return a==="daily"?(t.rowNumber=`${r+s}`,t.columns=6):a==="weekly"?(t.rowNumber="",t.columns=6):a==="monthly"?(t.rowNumber=`${s+1}`,t.columns=2):a==="quarterly"?(t.rowNumber=n.charAt(s),t.columns=0):a==="yearly"&&(t.rowNumber="",t.columns=0),t},Fu=e=>{const{type:t,monthStartWeekNumber:a,yearStartDate:r,year:s,rowItem:n,dateRows:l,columns:u}=e,d=n+l*u+l;let h="",y="";if(t==="daily"){if(!Me(a)&&!Me(l)&&!Me(s)){const D=o().year(s).startOf("year").format(c);h=o(D,c).add(a+l-1,"week").startOf("week").add(n,"day").format(c),y=o(h,c).format("D")}}else t==="weekly"?!Me(r)&&!Me(d)&&(h=o(r,c).add(d,"week").endOf("week").format(c),y=`W${d+1}`):t==="monthly"?!Me(d)&&!Me(s)&&(h=o().year(s).month(d).endOf("month").format(c),y=o(h,c).format("MMM")):t==="quarterly"&&!Me(d)&&!Me(s)&&(h=o().year(s).quarter(d+1).endOf("quarter").format(c),y=`Quarter ${d+1}`);const{firstDay:v,lastDay:w}=xa(h,t);return{itemCount:d,currentItemDate:h,rowItemText:y,firstDay:v,lastDay:w}},Wu=e=>{let t=!1;const a=e.type,r=e.year,s=e.itemCount,n=Ou(r);return a==="daily"?t=!0:a==="weekly"?s{const a=e.startDate,r=e.type;let s="";return a&&(s=o(a,c).startOf(Mr[r]).format(t)),s},br=e=>Number(o(e,c).format("YYYY")),xa=(e,t)=>{let a="",r="";return t==="daily"?a=r=e:t==="weekly"?(a=o(e,c).startOf("week").format(c),r=o(e,c).endOf("week").format(c)):t==="monthly"?(a=o(e,c).startOf("month").format(c),r=o(e,c).endOf("month").format(c)):t==="quarterly"?(a=o(e,c).startOf("quarter").format(c),r=o(e,c).endOf("quarter").format(c)):t==="yearly"&&(a=o(e,c).startOf("year").format(c),r=o(e,c).endOf("year").format(c)),{firstDay:a,lastDay:r}},tn=(e,t)=>new Date(e).toLocaleString("en-US",{timeZone:vu[t]}),an=(e,t,a)=>{let r=o().valueOf();a&&(r=o(a,t).startOf("day").valueOf());const s=tn(r,e);return o(s,"MM/DD/YYYY, hh:mm:ss A")},rn=(e,t)=>{const a=an(e,t);return o(a).format(`${t} hh:mm A`)},sn=(e,t,a)=>{const r=an(e,t,a);return o(r).format(`${t}`)},Ot=e=>{let t=e+"";return t.length===1&&(t=`0${t}`),t},Ra=e=>{if(e){const t=o(e,"YYYY-MM-DD").year(),a=o(e,"YYYY-MM-DD").month(),r=Number(o(e,"YYYY-MM-DD").format("D")),s=new Date(t,0,1),n=new Date(t,a,r);return Math.ceil(((n.getTime()-s.getTime())/864e5+s.getDay()+1)/7)}else return console.warn(` WARN_NGX_DATETIME_RANGE_PICKER | getWeekNumber: Invalid date `),Iu()},nn=(e,t)=>{for(const a in e)a&&e[a].itemRows.forEach(s=>{s.items.forEach(n=>{t(n)})})},Au=(e,t,a,r,s)=>{const n=o(a,c).startOf("day").valueOf();let l=we(e.minDate,c);const u=o(l,c).startOf("day").valueOf();l=we(e.maxDate,c);const d=o(l,c).startOf("day").valueOf();l=we(e.startDate,c);const h=o(l,c).startOf("day").valueOf();l=we(e.endDate,c);const y=o(l,c).startOf("day").valueOf(),v=o(r,"MMM YYYY").startOf("month").startOf("day").valueOf(),w=o(r,"MMM YYYY").endOf("month").startOf("day").valueOf(),D=Yu(n,u,d,h,y,v,w,e),O=xu(n,u,d,h,y,v,w,D,e),G=Ru(n,h,y,s),X=Nu(n,e);return n===h&&s==="left"?t.activeStartDate=a:n===y&&s==="right"&&(t.activeEndDate=a),{available:D,inRange:O,active:G,today:X}},Na=(e,t,a)=>{let r,s,n;return t==="daily"?(r=`${e.selectedMonth[a]} ${e.selectedYear[a]}`,s="MMM YYYY",n="month"):(r=`${e.selectedYear[a]}`,s="YYYY",n="year"),{label:r,labelFormat:s,type:n}},Iu=()=>"N/A",A=e=>e?JSON.parse(JSON.stringify(e)):{},ln=e=>e?Object.keys(e).length<=0:!1,Ea=(...e)=>{const t=a=>a&&typeof a=="object";return e.reduce((a,r)=>(Object.keys(r).forEach(s=>{const n=a[s],l=r[s];Array.isArray(n)&&Array.isArray(l)?a[s]=n.concat(...l):t(n)&&t(l)?a[s]=Ea(n,l):l&&(a[s]=l)}),a),{})},Me=e=>e==null||e===void 0,ju=(e,t)=>t==="array"?[`${e}`]:t==="string"?`${e}`:t==="number"?Number(e):e,Lu=(e,t,a)=>{let r=A(e),s=A(t);return r!==void 0&&Object.keys(r).forEach(n=>{Me(r[n])?console.warn(`WARN_NGX_DATETIME_RANGE_PICKER: 'options.${n}' is undefined or null. Setting default value. `):r={...r,[n]:r[n]}}),s!==void 0&&Object.keys(s).forEach(n=>{Me(s[n])?console.warn(`WARN_NGX_DATETIME_RANGE_PICKER: 'settings.${n}' is undefined or null. Setting default value. `):s={...s,[n]:s[n]}}),{...r,...s,...a}},$u=(e,t,a)=>{t.inputDateFormat||(console.warn(`WARN_NGX_DATETIME_RANGE_PICKER: 'inputDateFormat' is required to convert dates. 'inputDateFormat' not provided. Setting it to YYYY-MM-DD. `),t.inputDateFormat=c),(t.type==="weekly"||t.type==="yearly")&&(t.showRowNumber=!1),t.singleDatePicker&&t.endDate&&(t.startDate=A(t.endDate));const r=Uu(e,t);e=r.state;const s=r.config;e=Hu(e,s),s.startTime=`${e.selectedHour.left||""}:${e.selectedMinute.left||""}`,s.endTime=`${e.selectedHour.right||""}:${e.selectedMinute.right||""}`;const n=Bu(s),l=Gu(n,a),u=(l==null?void 0:l.config)??n;a=(l==null?void 0:l.dateRangeModel)??a;const d=Vu(u);return e=Zu(d,e),a=un(t,e,a,d.inputDateFormat),e=on(e,d),d.startTime=`${e.selectedHour.left||""}:${e.selectedMinute.left||""}`,d.endTime=`${e.selectedHour.right||""}:${e.selectedMinute.right||""}`,{config:d,state:e,dateRangeModel:a}},Uu=(e,t)=>(t.timezoneSupport&&(t.defaultTimezone||(t.defaultTimezone=Be),e.selectedTimezone=t.defaultTimezone),t.useLocalTimezone&&(e.selectedTimezone=e.localTimezone),e.todayTime=rn(e.selectedTimezone,t.viewDateFormat??""),{config:t,state:e}),Hu=(e,t)=>(e.sides.forEach(a=>{let r=t.startDate,s=t.startTime;if(a==="right"&&(r=t.endDate,s=t.endTime),e=ut(e,t,r??"",a),t.timePicker){const l=zt(e,t,s??"",a);e=l.state,e.times[a]=l.timeObject}}),e),Vu=e=>{const t=A(e),a=0,r=s=>{t.minDate=o(t.minDate,c).endOf(s).format(c),t.maxDate=s==="week"?o(t.maxDate,c).subtract(a,"week").endOf(s).format(c):o(t.maxDate,c).endOf(s).format(c),t.startDate=o(t.startDate,c).endOf(s).format(c),t.endDate=s==="week"?o(t.endDate,c).subtract(a,"week").endOf(s).format(c):o(t.endDate,c).endOf(s).format(c)};return t.type===me.weekly?r.bind(void 0)("week"):t.type===me.monthly?r.bind(void 0)("month"):t.type===me.quarterly?r.bind(void 0)("quarter"):t.type===me.yearly&&r.bind(void 0)("year"),o(t.startDate,c).valueOf()o(t.maxDate,c).valueOf()&&(t.maxDate=t.endDate),t},Gu=(e,t)=>{var d,h,y,v,w,D,O,G,X,ee,U,le,ue,ye;if(t===void 0||ln(t))return;if(e.type&&!t[e.type]){const re=Object.keys(Ks());let oe={};if(Object.keys(t).forEach(ce=>{re.includes(ce)&&(oe={...oe,[ce]:t[ce]},delete t[ce])}),t[e.type]=oe,!t[e.type])return}e.dateArray=(e.type&&((d=t[e.type])==null?void 0:d.dateArray))??e.dateArray;const a=zu(e),r=a.type;(h=a.dateArray)!=null&&h.length&&r&&t[r]&&((y=t[r])!=null&&y.minDate||(t[r].minDate=a.dateArray[0]||a.minDate),(v=t[r])!=null&&v.maxDate||(t[r].maxDate=a.dateArray[a.dateArray.length-1]||a.maxDate),(w=t[r])!=null&&w.startDate||(t[r].startDate=a.dateArray[0]||a.startDate),(D=t[r])!=null&&D.endDate||(t[r].endDate=a.dateArray[a.dateArray.length-1]||a.endDate));const s=a.type?((O=t[a.type])==null?void 0:O.minDate)??a.minDate??"":"",n=a.type?((G=t[a.type])==null?void 0:G.maxDate)??a.maxDate??"":"",l=a.type?((X=t[a.type])==null?void 0:X.startDate)??a.startDate??"":"",u=a.type?((ee=t[a.type])==null?void 0:ee.endDate)??a.endDate??"":"";if(a.minDate=we(s,a.inputDateFormat??""),a.maxDate=we(n,a.inputDateFormat??""),a.startDate=we(l,a.inputDateFormat??""),a.endDate=we(u,a.inputDateFormat??""),a.timePicker){const re=a.type?((U=t[a.type])==null?void 0:U.minTime)??a.minTime??"":"",oe=a.type?((le=t[a.type])==null?void 0:le.maxTime)??a.maxTime??"":"",ce=a.type?((ue=t[a.type])==null?void 0:ue.startTime)??a.startTime??"":"",Je=a.type?((ye=t[a.type])==null?void 0:ye.endTime)??a.endTime??"":"";a.minTime=tt(re,a.defaultTimezone??Be)??void 0,a.maxTime=tt(oe,a.defaultTimezone??Be)??void 0,a.startTime=tt(ce,a.defaultTimezone??Be)??void 0,a.endTime=tt(Je,a.defaultTimezone??Be)??void 0}return{config:a,dateRangeModel:t}},zu=e=>{var t;return(t=e.dateArray)!=null&&t.length&&(e.dateArray=gu(e),e.dateArray=e.dateArray.sort((a,r)=>{const s=o(a,c).valueOf(),n=o(r,c).valueOf();return s-n})),e},Zu=(e,t)=>{let a=A(t);return e.showRanges&&!e.singleDatePicker?(e.availableRanges=Su(e),a=qu(a,e)):(a.activeRange="Custom Range",a=Yr(e,a,a.activeRange,null),a=Ca(e,a)),a},Yr=(e,t,a,r)=>(t.activeRange=a,a==="Custom Range"?t.customRange=!0:(t.customRange=!1,r&&(e.startDate=r.startDate,e.endDate=r.endDate),e.timePicker&&(t.times={})),t),Ca=(e,t)=>{const a=xa(e.startDate,e.type),r=xa(e.endDate,e.type);return e.type===me.weekly?(a.rowItemText=`W${Ra(a.firstDay)}`,r.rowItemText=`W${Ra(r.firstDay)}`):e.type===me.monthly?(a.rowItemText=`${o(a.firstDay,c).format("MMM")}`,r.rowItemText=`${o(r.firstDay,c).format("MMM")}`):e.type===me.quarterly&&(a.rowItemText=`Quarter ${o(a.firstDay,c).quarter()}`,r.rowItemText=`Quarter ${o(r.firstDay,c).quarter()}`),Object.assign(t.activeItem.left,a),Object.assign(t.activeItem.right,r),t},qu=(e,t)=>{let a=A(e);for(const r in t.availableRanges)if(r){const s=t.availableRanges[r];t.startDate===s.startDate&&t.endDate===s.endDate&&(a.activeRange=r,a=Ca(t,a))}return a.activeRange||(a.activeRange="Custom Range",a=Yr(t,a,a.activeRange,null),a=Ca(t,a)),a},on=(e,t)=>{if(e.sides.length=0,e.dates={},!t.singleDatePicker&&(e.sides.push("left"),e=ut(e,t,t.startDate,"left"),t.timePicker)){const s=zt(e,t,t.startTime,"left");e=s.state,e.times.left=s.timeObject}if(e.sides.push("right"),e=ut(e,t,t.endDate,"right"),t.timePicker){const r=zt(e,t,t.endTime,"right");e=r.state,e.times.right=r.timeObject}return e},Bu=e=>(e.minDate=we(e.minDate,e.inputDateFormat),e.maxDate=we(e.maxDate,e.inputDateFormat),e.startDate=we(e.startDate,e.inputDateFormat),e.endDate=we(e.endDate,e.inputDateFormat),e.timePicker&&(e.minTime=tt(e.minTime??"",e.defaultTimezone??Be)??void 0,e.maxTime=tt(e.maxTime??"",e.defaultTimezone??Be)??void 0,e.startTime=tt(e.startTime??"",e.defaultTimezone??Be)??void 0,e.endTime=tt(e.endTime??"",e.defaultTimezone??Be)??void 0),e),ut=(e,t,a,r)=>{const s=A(e);s.selectedMonth[r]=o(a,c).format("MMM"),s.selectedYear[r]=br(a);const n=`${s.selectedMonth[r]} ${s.selectedYear[r]}`,l={label:n,months:Mu(t.minDate,t.maxDate,s.selectedYear[r]),years:bu(t),itemRows:[]};if(s.weekDayOptions=[""],t.type!=="yearly"){const u=o(a,c).year(s.selectedYear[r]).startOf("month").week(),d=o(s.selectedYear[r],"YYYY").startOf("year").format(c);let h=1;t.type==="daily"?(h=ku(a),s.weekDayOptions=["su","mo","tu","we","th","fr","sa"]):t.type==="weekly"?(h=8,s.weekDayOptions=["","","","","","",""]):t.type==="monthly"?(h=4,s.weekDayOptions=["","",""]):t.type==="quarterly"&&(h=4,s.weekDayOptions=[""]);for(let y=0;y{const s={hour:[],minute:[],meridian:[]};let n=0;const l=23;let u=0;const d=59;let h=r==="left"?n:l,y=r==="left"?u:d;const v=o(t.startDate,c).valueOf(),w=o(t.endDate,c).valueOf();a&&(h=Number(o(a,Or).format("H")),y=Number(o(a,Or).format("m")),r==="right"&&v===w&&(n=h,u=y));for(let D=n;D<=23;D++){const O=Ot(D);s.hour.push(O)}for(let D=u;D<=59;D++){const O=Ot(D);s.minute.push(O)}return e.selectedHour[r]=Ot(h),e.selectedMinute[r]=Ot(y),{state:e,timeObject:s}},un=(e,t,a,r)=>{let s={};return a!==void 0&&!ln(a)&&(s=A(a)),e.type&&(s[e.type]=dn(e,t,r)),s},dn=(e,t,a)=>{let r,s=e.outputDateFormat;a!==void 0&&(s=a);let n=Ya(e,s),l=o(e.endDate,c).format(s);if(e.selectedTimezone&&(n=sn(e.selectedTimezone,s,n),l=sn(e.selectedTimezone,s,l)),r={activeRange:t.activeRange,startDate:n,endDate:l},e.timePicker){const u=e.startTime,d=e.endTime;r={activeRange:t.activeRange,startDate:n,endDate:l,startTime:u,endTime:d}}return r},Ju=({state:e,config:t,setState:a})=>{const r=s=>{a({...e,selectedTimezone:s,todayTime:rn(s,t.viewDateFormat??c)})};return T.jsxs("div",{className:"list-inline timezone-select",children:[T.jsx("div",{className:"timeZones",children:e.timeZones.map((s,n)=>T.jsxs(T.Fragment,{children:[T.jsx("div",{className:`timezone ${e.selectedTimezone===s?"active-timezone":""}`,onClick:()=>{r(s)},children:s},`tz-${n}`),n!==e.timeZones.length-1&&T.jsx("div",{className:"vertical-divider"},`divider-${n}`)]}))}),T.jsxs("div",{className:"currentTime",children:[T.jsx("span",{className:"today-text",children:"Today"}),":"," ",T.jsx("span",{className:"active-timezone",children:e.todayTime})]})]})},Qu=({state:e,side:t})=>T.jsx("div",{className:"dateTitleInput",children:T.jsx("div",{className:"dateSelect",children:e.dateTitleText[t]})}),xr=({selectAs:e,options:t,selectedValue:a,classes:r="",onChange:s})=>{const n=(e==null?void 0:e.tag)??"select",l=(e==null?void 0:e.optionTag)??"option",u=(e==null?void 0:e.selectedAttributeName)??"value",d=(e==null?void 0:e.selectedAttributeValueType)??"string";return T.jsx(n,{className:`${r} ngx-datetime-range-picker-select-panel ${e!=null&&e.classNames?e.classNames:"default-select-class"}`,[u]:ju(a,d),onChange:s,children:t.map(h=>T.jsx(l,{className:"dropdown-item",value:h,children:h},h))})},Ku=({state:e,config:t,side:a,selectAs:r,setState:s,onCalendarLabelChange:n})=>{const l=y=>{const{label:v,labelFormat:w,type:D}=Na(e,t.type,y),O=o(v,w).add(1,D).endOf(D).format(c),X=ut(e,t,O,y);s(X)},u=y=>{const{label:v,labelFormat:w,type:D}=Na(e,t.type,y);return o(v,w).startOf(D).valueOf()>o(t.minDate,c).startOf(D).valueOf()},d=y=>{const{label:v,labelFormat:w,type:D}=Na(e,t.type,y),O=o(v,w).subtract(1,D).startOf(D).format(c);e=ut(e,t,O,y),s(e)},h=y=>{const{label:v,labelFormat:w,type:D}=Na(e,t.type,y);return o(v,w).endOf(D).valueOf(){d(a)},children:T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24",fill:`${u(a)?null:"#e6e6e6"}`,children:T.jsx("path",{d:"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"})})})}),T.jsx("div",{className:"calendar-label",children:T.jsxs("div",{className:"date-dropdown-container",style:{position:"relative"},children:[t.type===me.daily&&T.jsx("div",{className:"date-dropdown ngx-datetime-range-picker-select-panel month-select-panel",children:T.jsx(xr,{classes:"month-select",selectAs:r,options:e.dates[a].months,selectedValue:`${e.selectedMonth[a]}`,onChange:y=>{n(y.target.value,a,"month")}})}),T.jsx("div",{className:"date-dropdown ngx-datetime-range-picker-select-panel year-select-panel",children:T.jsx(xr,{classes:"year-select",selectAs:r,options:e.dates[a].years,selectedValue:`${e.selectedYear[a]}`,onChange:y=>{n(y.target.value,a,"year")}})})]})}),T.jsx("div",{className:"next",children:T.jsx("div",{className:`${h(a)?"available":"disabled"}`,onClick:()=>{l(a)},children:T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24",fill:`${h(a)?null:"#e6e6e6"}`,children:T.jsx("path",{d:"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"})})})})]})},Xu=({state:e,config:t,side:a,setState:r,setConfig:s,handleDateChange:n,updateActiveItemInputField:l})=>{const u=ae.useRef({}),d=(v,w)=>{let D=A(e),O=A(t);const G=o(v.date,c).valueOf(),X=o(O.startDate,c).valueOf(),ee=o(O.endDate,c).valueOf(),U=o(O.minDate,c).valueOf(),le=o(O.maxDate,c).valueOf();if(!v.available){if(Gle)return;D=ut(D,O,v.date,w)}ee||G{if(!v.available)return;const D=A(e),O=o(v.date,c).valueOf(),G=o(t.startDate,c).valueOf(),X=o(t.endDate,c).valueOf(),ee=w?w.innerText:"";let U=w?(w==null?void 0:w.getAttribute("data-firstday"))??"":"",le=w?(w==null?void 0:w.getAttribute("data-lastday"))??"":"";U=o(U,c).format(t.viewDateFormat),le=o(le,c).format(t.viewDateFormat);let ue=`${ee} (${U} - ${le})`;if(t.type===me.daily&&(ue=`${le}`),X)D.dateTitleText[a]=ue;else{const ye=re=>{if(re.available){const oe=(re.date,o(re.date,c).valueOf());(oe>G&&oe{if(t.endDate)l(e,t);else{const v=w=>{w.inRange=!1};nn(e.dates,v.bind(void 0))}};return T.jsxs("table",{children:[T.jsx("thead",{children:T.jsxs("tr",{children:[t.showRowNumber&&T.jsx("th",{className:"rowNumber"}),e.weekDayOptions.map((v,w)=>T.jsx("th",{className:"calendar-week-day capitalize",children:v},`day-${w}`))]})}),T.jsx("tbody",{children:e.dates[a].itemRows.map((v,w)=>T.jsxs("tr",{children:[t.showRowNumber&&v.rowNumberText&&T.jsx("td",{className:"rowNumber",children:v.rowNumberText}),v.items.map((D,O)=>T.jsx("td",{ref:G=>{u.current&&(u.current[`td-${w}-${O}`]=G)},"data-firstday":D.firstDay,"data-lastday":D.lastDay,className:`${D.available?"available":""} ${D.inRange?"in-range":""} ${e.activeStartDate===D.date&&a==="left"||e.activeEndDate===D.date&&a==="right"?"active":""} ${D.today?"today":""}`,onClick:()=>{d(D,a)},onMouseOver:()=>{h(D,u.current[`td-${w}-${O}`])},onMouseLeave:()=>{y()},children:T.jsx("div",{children:D.rowItemText})},`td-${w}-${O}`))]},`tr-${w}`))})]})},ed=({state:e,config:t,selectAs:a,side:r,onTimeLabelChange:s})=>{const n=(l,u)=>l==="hour"?e.selectedHour[u]:l==="minute"?e.selectedMinute[u]:"";return T.jsxs("div",{className:`time-select ${r}`,children:[T.jsx("div",{className:"clock-icon-container",children:T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 -960 960 960",width:"20",children:T.jsx("path",{d:"m614-310 51-51-149-149v-210h-72v240l170 170ZM480-96q-79.376 0-149.188-30Q261-156 208.5-208.5T126-330.958q-30-69.959-30-149.5Q96-560 126-630t82.5-122q52.5-52 122.458-82 69.959-30 149.5-30 79.542 0 149.548 30.24 70.007 30.24 121.792 82.08 51.786 51.84 81.994 121.92T864-480q0 79.376-30 149.188Q804-261 752-208.5T629.869-126Q559.738-96 480-96Zm0-384Zm.477 312q129.477 0 220.5-91.5T792-480.477q0-129.477-91.023-220.5T480.477-792Q351-792 259.5-700.977t-91.5 220.5Q168-351 259.5-259.5T480.477-168Z"})})}),e.timeItems.map((l,u)=>T.jsx("div",{className:"d-inline-block time-item-container",children:T.jsx(xr,{classes:"timeItem-select",selectAs:a,options:e.times[r][l],selectedValue:n(l,r),onChange:d=>{s(e,t,l,r,d.target.value)}})},`time-item-${u}`))]})},td=({state:e,config:t,buttonAs:a,dateRangeSelected:r,setState:s,setConfig:n,updateInputField:l,doApply:u})=>{const d=(a==null?void 0:a.tag)??"button",h=(y,v,w,D)=>{let O=Yr(y,v,w,D);O=Ca(y,O),O=on(O,y);const{state:G,config:X}=u(O,y);s(G),n(X)};return T.jsx("div",{className:"ranges",children:Object.keys(t.availableRanges).map((y,v)=>T.jsx(d,{className:`calendar-range ${y===e.activeRange?"active-range":""} ${a!=null&&a.classNames?a.classNames:"default-button-class"}`,onClick:()=>{h(t,e,y,t.availableRanges[y])},children:y},`button-${v}`))})},ad=({config:e,state:t,selectAs:a,buttonAs:r,dateRangeSelected:s,setState:n,setConfig:l,updateInputField:u,doApply:d,handleDateChange:h,updateActiveItemInputField:y,onCalendarLabelChange:v,onTimeLabelChange:w})=>T.jsx("div",{className:"calendar-view",children:T.jsxs("div",{className:"date-select",children:[T.jsxs("div",{style:{position:"relative"},children:[!!e.timezoneSupport&&T.jsx(Ju,{state:t,config:e,setState:n}),T.jsx("ul",{className:"list-inline calendar-container",children:t.sides.map((D,O)=>T.jsxs("li",{className:`calendar ${D}`,children:[T.jsx(Qu,{state:t,side:D},`calendar-${O}`),T.jsx("div",{className:"divider"}),T.jsx("div",{className:"calendar-table",children:t.calendarAvailable[D]&&T.jsxs("div",{className:"calendar-side-container",style:{minWidth:"250px",position:"relative"},children:[T.jsx(Ku,{config:e,state:t,side:D,selectAs:a,onCalendarLabelChange:v,setState:n},`month-year-select-${O}`),T.jsx(Xu,{config:e,state:t,side:D,setState:n,setConfig:l,handleDateChange:h,updateActiveItemInputField:y},`date-select-${O}`)]})}),e.timePicker&&T.jsxs("div",{className:"time-picker-container",children:[T.jsx("div",{className:"divider"}),T.jsx(ed,{state:t,side:D,config:e,selectAs:a,onTimeLabelChange:w},`time-select-${O}`)]})]},`calendar-${O}`))})]}),((!e.singleDatePicker&&e.showRanges)??e.timePicker)&&T.jsx(td,{config:e,state:t,buttonAs:r,setState:n,setConfig:l,updateInputField:u,dateRangeSelected:s,doApply:d})]})}),rd=({dateArray:e,startDate:t,endDate:a,minDate:r,maxDate:s,startTime:n,endTime:l,minTime:u,maxTime:d,type:h=me.daily,modelKeys:y,useLocalTimezone:v,showTimezoneSelect:w,timePicker:D,timezoneSupport:O,defaultTimezone:G,inputClass:X,inputDateFormat:ee,viewDateFormat:U,outputDateFormat:le,singleDatePicker:ue,componentDisabled:ye,label:re,placeholder:oe,showRowNumber:ce,availableRanges:Je,showRanges:dt,disableWeekends:Pa,disableWeekdays:Zt,displayBeginDate:_e,displayEndDate:Pe,ariaLabels:at,dateRangeModel:qt,canBeEmpty:Bt,onDateRangeModelChange:Jt,onDateRangeChange:Qt,onInputBlur:ct,onDateSelect:Kt,inputAs:Fe,selectAs:Fa,buttonAs:Rr})=>{var $a;const Nr=(Fe==null?void 0:Fe.tag)??"input",[se,be]=ae.useState({}),[Mt,Xt]=ae.useState({}),[bt,Er]=ae.useState({}),[$,Yt]=ae.useState({}),[ft,ht]=ae.useState({}),[xt,Wa]=ae.useState(!1),rt=ae.useRef(null),We=ae.useRef(null),ea=()=>{var N;if($.startDate&&$.endDate){rt&&((N=rt.current)==null||N.classList.remove("empty-filter"));let g=A(se);g=Qe(g,$),Ae(g,$),Qe(g,$)}},Cr=(N,g,k,S,Y,R,x,J,Ie,Ye,ra,Nt,mt,jr,Lr,Ua,$r,Ur,Hr,Vr,i,f,p,b,I,H,F,C,ne,B,Q,fe,st,Ha)=>{Wa(N);const Te={type:Nt??me.daily,modelKeys:mt,useLocalTimezone:jr,showTimezoneSelect:Lr,timePicker:Ua,timezoneSupport:$r,defaultTimezone:Ur,inputClass:Hr,inputDateFormat:Vr,viewDateFormat:i,outputDateFormat:f,singleDatePicker:p,componentDisabled:b,label:I,placeholder:H,showRowNumber:F,availableRanges:C,showRanges:ne,disableWeekends:B,disableWeekdays:Q,displayBeginDate:fe,displayEndDate:st,ariaLabels:Ha},Gr=Ea(wu(),bt,Te);_u(Te);const sd={dateArray:k,startDate:S,endDate:Y,minDate:R,maxDate:x,startTime:J,endTime:Ie,minTime:Ye,maxTime:ra},zr=Ea(Ks(),Mt,sd),cn=A(g);if($.type){const qr=ft[$.type],Br=cn[$.type];if(qr&&Br&&qr.startDate===Br.startDate&&qr.endDate===Br.endDate)return}let Zr=Object.keys($).length>0?A($):Object.assign(zr,Gr);const fn=Object.assign(Xs(),se);fn.isValidFilter=!1,Zr=Lu(zr,Gr,Zr),Er(Gr),Xt(zr),Rt(fn,Zr,cn)},Rt=(N,g,k)=>{let S=A(N),Y=A(g),R=A(k);const x=$u(S,Y,R);S=x.state,Y=x.config,R=x.dateRangeModel,S=Qe(S,Y),ht(Object.assign(ft,R)),Yt(Object.assign($,Y)),be(Object.assign(Xs(),S))},Pr=()=>{const N=A(se);N.isCalendarVisible=!se.isCalendarVisible,N.isCalendarVisible?(be(N),Rt(N,$,ft)):ea()},Fr=N=>{ct&&ct({reason:Oa.focus,value:N.target.value})},Aa=N=>{const g=N.target.value;be({...se,selectedDateText:g}),ct&&ct({reason:Oa.blur,value:g})},Ia=N=>{Ae(se,$)},Ae=(N,g)=>{var S;const k=dn(g,N);rt&&((S=rt.current)==null||S.classList.remove("empty-filter")),Wr(),Qt&&Qt(k),be({...N,isCalendarVisible:!1}),ht(Ea(ft,{[$.type]:{startDate:k.startDate,endDate:k.endDate,startTime:k.startTime,endTime:k.endTime}}))},Wr=()=>{const N=un($,se,ft,$.inputDateFormat);Jt&&Jt(N)},ta=(N,g)=>{const{_state:k,_config:S}=aa(N,g);return{state:Qe(k,S),config:S}},aa=(N,g)=>{let k=A(N);const S=A(g),Y=S.startDate,R=S.endDate;k.activeStartDate=Y,k.activeEndDate=R,S.startDate&&S.endDate&&(S.timePicker?S.timePicker&&k.sides.forEach(Ie=>{const Ye=zt(k,S,null,Ie);k=Ye.state,k.times[Ie]=Ye.timeObject}):Ae(N,g));let x=Y?o(Y,c).valueOf():null,J=R?o(R,c).valueOf():null;return S.outputDateFormat&&(x=Y?o(Y,c).format(S.outputDateFormat):null,J=R?o(R,c).format(S.outputDateFormat):null),Kt&&Kt({startDate:x,endDate:J}),S.startTime=`${k.selectedHour.left}:${k.selectedMinute.left}`,S.endTime=`${k.selectedHour.right}:${k.selectedMinute.right}`,{_state:k,_config:S}},Qe=(N,g)=>{let k=A(N);const S=Ya(g,g.viewDateFormat),Y=g.endDate?o(g.endDate,c).format(g.viewDateFormat):"";if(g.singleDatePicker){let R=S,x=Y,J="";g.timePicker&&(R=`${S} ${g.startTime}`,x=`${Y} ${g.endTime}`),g.displayBeginDate?J=`${R}`:g.displayEndDate?J=`${x}`:J=`${R} - ${x}`,k.selectedDateText=J}else{let R=S,x=Y;g.timePicker&&(R=`${S} ${g.startTime}`,x=`${Y} ${g.endTime}`),k.selectedDateText=`${R} - ${x}`}return(xt||!k.selectedDateText.includes("nvalid"))&&(k.isValidFilter=!0),g.type==="yearly"?(k.dateTitleText.left=S,k.dateTitleText.right=Y):k=ja(k,g),k},ja=(N,g)=>{let k=A(N);return g.singleDatePicker||(k=La(k,g,"left")),k=La(k,g,"right"),k},La=(N,g,k)=>{const S=A(N);let Y=S.activeItem[k].firstDay,R=S.activeItem[k].lastDay;const x=S.activeItem[k].rowItemText;return Y=o(Y,c).format(g.viewDateFormat),R=o(R,c).format(g.viewDateFormat),g.type!=="daily"?S.dateTitleText[k]=`${x} (${Y} - ${R})`:S.dateTitleText[k]=`${Y}`,S},Ar=(N,g,k)=>{let S=A(se),Y=A($);if(S.isCalendarVisible=!0,k==="month"?S.selectedMonth[g]=N:k==="year"&&(S.selectedYear[g]=Number(N)),Y.type!=="daily"&&(S.selectedMonth[g]="Jun"),Y.type!=="yearly"){const R=`${S.selectedMonth[g]} ${S.selectedYear[g]}`,x=o(R,"MMM YYYY").startOf("month").format(c);S=ut(S,Y,x,g)}else{if(S.selectedYear.left<=S.selectedYear.right&&g==="right"){Y.startDate=o(S.selectedYear.left,"YYYY").startOf("year").format(c),Y.endDate=o(S.selectedYear.right,"YYYY").endOf("year").format(c);const{state:Ie,config:Ye}=ta(S,Y);S=Ie,Y=Ye}const R={startDate:o(S.selectedYear.left,"YYYY").startOf("year").format(c),type:"yearly"},x=Ya(R,$.viewDateFormat),J=$.endDate?o($.endDate,c).format($.viewDateFormat):"";S.dateTitleText.left=x,S.dateTitleText.right=J}be(S),Yt(Y)},Ir=(N,g,k,S,Y)=>{let R=A(N);const x=A(g);let J=null;if(S==="left"){J=x.startTime.split(":"),k==="hour"?x.startTime=`${Y}:${J[1]}`:x.startTime=`${J[0]}:${Y}`;const ra=o(x.startDate,c).valueOf(),Nt=o(x.endDate,c).valueOf();if(ra===Nt){const mt=zt(R,x,x.startTime,"right");R=mt.state,R.times.right=mt.timeObject}}else J=x.endTime.split(":"),k==="hour"?x.endTime=`${Y}:${J[1]}`:x.endTime=`${J[0]}:${Y}`;k==="hour"?R.selectedHour[S]=Ot(Y):R.selectedMinute[S]=Ot(Y),x.startTime=`${R.selectedHour.left}:${R.selectedMinute.left}`,x.endTime=`${R.selectedHour.right}:${R.selectedMinute.right}`;const Ie=Ya(x,x.viewDateFormat),Ye=x.endDate?o(x.endDate,c).format(x.viewDateFormat):"";R.dateTitleText.left=Ie,R.dateTitleText.right=Ye,x.singleDatePicker&&(x.startTime=A(x.endTime)),be(R),Yt(x)};return ae.useEffect(()=>{Cr(Bt,qt,e,t,a,r,s,n,l,u,d,h,y,v,w,D,O,G,X,ee,U,le,ue,ye,re,oe,ce,Je,dt,Pa,Zt,_e,Pe,at)},[Bt,qt,e,t,a,r,s,n,l,u,d,h,y,v,w,D,O,G,X,ee,U,le,ue,ye,re,oe,ce,Je,dt,Pa,Zt,_e,Pe,at]),ae.useEffect(()=>{const N=g=>{var k;se.isCalendarVisible&&g.target&&!((k=g.target.parentElement)!=null&&k.getElementsByClassName("ngx-datetime-range-picker-select-panel").length)&&!g.target.closest(".dropdown-item")&&We.current&&We.current!==g.target&&!We.current.contains(g.target)&&ea()};return document.addEventListener("click",N),()=>{document.removeEventListener("click",N)}},[We,se]),T.jsxs("div",{ref:We,className:"ngx-datetime-range-picker",children:[T.jsx("div",{className:"date-input",children:T.jsx(Nr,{ref:rt,className:`dateSelect full-width ${$.inputClass??""} ${Fe!=null&&Fe.classNames?Fe.classNames:"default-input-class"}`,label:$.label,"aria-label":($a=$.ariaLabels)==null?void 0:$a.inputField,onClick:Pr,placeholder:$.placeholder,value:se.selectedDateText,onChange:Ia,onKeyUp:ea,onFocus:Fr,onBlur:Aa,disabled:$.componentDisabled,autoComplete:"off",autoCorrect:"off",readOnly:!0})}),!!se.isCalendarVisible&&T.jsx(ad,{config:$,state:se,selectAs:Fa,buttonAs:Rr,dateRangeSelected:Ae,setState:be,setConfig:Yt,updateInputField:Qe,doApply:ta,handleDateChange:aa,updateActiveItemInputField:ja,onCalendarLabelChange:Ar,onTimeLabelChange:Ir})]})};xe.CalendarTypes=kr,xe.DatetimeRangeType=me,xe.InputFocusBlur=Oa,xe.ReactJSDatetimeRangePicker=rd,Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"})});