mig-schema-table 4.4.31 → 4.4.32
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.
|
@@ -57,7 +57,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
57
57
|
react-datepicker v8.1.0
|
|
58
58
|
https://github.com/Hacker0x01/react-datepicker
|
|
59
59
|
Released under the MIT License.
|
|
60
|
-
*/var rc=function(a,e){return rc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])},rc(a,e)};function Ar(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");rc(r,a);function e(){this.constructor=r}r.prototype=a===null?Object.create(a):(e.prototype=a.prototype,new e)}var tr=function(){return tr=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},tr.apply(this,arguments)};function ia(r,a,e){if(e||arguments.length===2)for(var t=0,n=a.length,s;t<n;t++)(s||!(t in a))&&(s||(s=Array.prototype.slice.call(a,0,t)),s[t]=a[t]);return r.concat(s||Array.prototype.slice.call(a))}typeof SuppressedError=="function"&&SuppressedError;var rde=function(r){var a=r.showTimeSelectOnly,e=a===void 0?!1:a,t=r.showTime,n=t===void 0?!1:t,s=r.className,o=r.children,l=e?"Choose Time":"Choose Date".concat(n?" and Time":"");return le.createElement("div",{className:s,role:"dialog","aria-label":l,"aria-modal":"true"},o)},nde=function(r,a){var e=le.useRef(null),t=le.useRef(r);t.current=r;var n=le.useCallback(function(s){var o,l=s.composed&&s.composedPath&&s.composedPath().find(function(u){return u instanceof Node})||s.target;e.current&&!e.current.contains(l)&&(a&&l instanceof HTMLElement&&l.classList.contains(a)||(o=t.current)===null||o===void 0||o.call(t,s))},[a]);return le.useEffect(function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[n]),e},ju=function(r){var a=r.children,e=r.onClickOutside,t=r.className,n=r.containerRef,s=r.style,o=r.ignoreClass,l=nde(e,o);return le.createElement("div",{className:t,style:s,ref:function(u){l.current=u,n&&(n.current=u)}},a)},dt;(function(r){r.ArrowUp="ArrowUp",r.ArrowDown="ArrowDown",r.ArrowLeft="ArrowLeft",r.ArrowRight="ArrowRight",r.PageUp="PageUp",r.PageDown="PageDown",r.Home="Home",r.End="End",r.Enter="Enter",r.Space=" ",r.Tab="Tab",r.Escape="Escape",r.Backspace="Backspace",r.X="x"})(dt||(dt={}));function Vp(){var r=typeof window<"u"?window:globalThis;return r}var us=12;function lr(r){if(r==null)return new Date;var a=typeof r=="string"?jh(r):Ce(r);return Ou(a)?a:new Date}function nc(r,a,e,t,n){n===void 0&&(n=lr());for(var s=fo(e)||fo(ic()),o=Array.isArray(a)?a:[a],l=0,u=o;l<u.length;l++){var i=u[l],d=Yl(r,i,n,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(Ou(d)&&(!t||r===vr(d,i,e)))return d}return null}function Ou(r,a){return Sn(r)&&!Xa(r,new Date("1/1/1800"))}function vr(r,a,e){if(e==="en")return Qi(r,a,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?fo(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||fo(ic()),Qi(r,a,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Cn(r,a){var e=a.dateFormat,t=a.locale,n=Array.isArray(e)&&e.length>0?e[0]:e;return r&&vr(r,n,t)||""}function ade(r,a,e){if(!r)return"";var t=Cn(r,e),n=a?Cn(a,e):"";return"".concat(t," - ").concat(n)}function ide(r,a){if(!(r!=null&&r.length))return"";var e=r[0]?Cn(r[0],a):"";if(r.length===1)return e;if(r.length===2&&r[1]){var t=Cn(r[1],a);return"".concat(e,", ").concat(t)}var n=r.length-1;return"".concat(e," (+").concat(n,")")}function ac(r,a){var e=a.hour,t=e===void 0?0:e,n=a.minute,s=n===void 0?0:n,o=a.second,l=o===void 0?0:o;return zo(Lo(Ho(r,l),s),t)}function ode(r){return Zs(r)}function sde(r,a){return vr(r,"ddd",a)}function Nu(r){return ma(r)}function ei(r,a,e){var t=fo(a||ic());return Nr(r,{locale:t,weekStartsOn:e})}function ka(r){return Ui(r)}function ls(r){return Gi(r)}function Yp(r){return Ha(r)}function Xp(){return ma(lr())}function qp(r){return qi(r)}function ude(r){return zl(r)}function lde(r){return Ao(r)}function oa(r,a){return r&&a?Ql(r,a):!r&&!a}function nn(r,a){return r&&a?Ul(r,a):!r&&!a}function Au(r,a){return r&&a?Gl(r,a):!r&&!a}function rr(r,a){return r&&a?Xi(r,a):!r&&!a}function Ti(r,a){return r&&a?vh(r,a):!r&&!a}function ds(r,a,e){var t,n=ma(a),s=qi(e);try{t=Zi(r,{start:n,end:s})}catch{t=!1}return t}function ic(){var r=Vp();return r.__localeId__}function fo(r){if(typeof r=="string"){var a=Vp();return a.__localeData__?a.__localeData__[r]:void 0}else return r}function dde(r,a,e){return a(vr(r,"EEEE",e))}function cde(r,a){return vr(r,"EEEEEE",a)}function fde(r,a){return vr(r,"EEE",a)}function oc(r,a){return vr(dn(lr(),r),"LLLL",a)}function Up(r,a){return vr(dn(lr(),r),"LLL",a)}function hde(r,a){return vr(wi(lr(),r),"QQQ",a)}function $n(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.excludeDateIntervals,l=e.includeDates,u=e.includeDateIntervals,i=e.filterDate;return cs(r,{minDate:t,maxDate:n})||s&&s.some(function(d){return d instanceof Date?rr(r,d):rr(r,d.date)})||o&&o.some(function(d){var h=d.start,c=d.end;return Zi(r,{start:h,end:c})})||l&&!l.some(function(d){return rr(r,d)})||u&&!u.some(function(d){var h=d.start,c=d.end;return Zi(r,{start:h,end:c})})||i&&!i(lr(r))||!1}function sc(r,a){var e=a===void 0?{}:a,t=e.excludeDates,n=e.excludeDateIntervals;return n&&n.length>0?n.some(function(s){var o=s.start,l=s.end;return Zi(r,{start:o,end:l})}):t&&t.some(function(s){var o;return s instanceof Date?rr(r,s):rr(r,(o=s.date)!==null&&o!==void 0?o:new Date)})||!1}function Gp(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.includeDates,l=e.filterDate;return cs(r,{minDate:t?Ui(t):void 0,maxDate:n?Ao(n):void 0})||(s==null?void 0:s.some(function(u){return nn(r,u instanceof Date?u:u.date)}))||o&&!o.some(function(u){return nn(r,u)})||l&&!l(lr(r))||!1}function Iu(r,a,e,t){var n=Gt(r),s=Vr(r),o=Gt(a),l=Vr(a),u=Gt(t);return n===o&&n===u?s<=e&&e<=l:n<o?u===n&&s<=e||u===o&&l>=e||u<o&&u>n:!1}function mde(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.includeDates;return cs(r,{minDate:t,maxDate:n})||s&&s.some(function(l){return nn(l instanceof Date?l:l.date,r)})||o&&!o.some(function(l){return nn(l,r)})||!1}function Ru(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.includeDates,l=e.filterDate;return cs(r,{minDate:t,maxDate:n})||(s==null?void 0:s.some(function(u){return Au(r,u instanceof Date?u:u.date)}))||o&&!o.some(function(u){return Au(r,u)})||l&&!l(lr(r))||!1}function Fu(r,a,e){if(!a||!e||!Sn(a)||!Sn(e))return!1;var t=Gt(a),n=Gt(e);return t<=r&&n>=r}function zu(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.includeDates,l=e.filterDate,u=new Date(r,0,1);return cs(u,{minDate:t?Gi(t):void 0,maxDate:n?Qs(n):void 0})||(s==null?void 0:s.some(function(i){return oa(u,i instanceof Date?i:i.date)}))||o&&!o.some(function(i){return oa(u,i)})||l&&!l(lr(u))||!1}function Lu(r,a,e,t){var n=Gt(r),s=Fa(r),o=Gt(a),l=Fa(a),u=Gt(t);return n===o&&n===u?s<=e&&e<=l:n<o?u===n&&s<=e||u===o&&l>=e||u<o&&u>n:!1}function cs(r,a){var e,t=a===void 0?{}:a,n=t.minDate,s=t.maxDate;return(e=n&&ln(r,n)<0||s&&ln(r,s)>0)!==null&&e!==void 0?e:!1}function Kp(r,a){return a.some(function(e){return Zn(e)===Zn(r)&&Jn(e)===Jn(r)&&ba(e)===ba(r)})}function Qp(r,a){var e=a===void 0?{}:a,t=e.excludeTimes,n=e.includeTimes,s=e.filterTime;return t&&Kp(r,t)||n&&!Kp(r,n)||s&&!s(r)||!1}function Zp(r,a){var e=a.minTime,t=a.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var n=lr();n=zo(n,Zn(r)),n=Lo(n,Jn(r)),n=Ho(n,ba(r));var s=lr();s=zo(s,Zn(e)),s=Lo(s,Jn(e)),s=Ho(s,ba(e));var o=lr();o=zo(o,Zn(t)),o=Lo(o,Jn(t)),o=Ho(o,ba(t));var l;try{l=!Zi(n,{start:s,end:o})}catch{l=!1}return l}function Jp(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.includeDates,s=ya(r,1);return t&&Ra(t,s)>0||n&&n.every(function(o){return Ra(o,s)>0})||!1}function eg(r,a){var e=a===void 0?{}:a,t=e.maxDate,n=e.includeDates,s=bn(r,1);return t&&Ra(s,t)>0||n&&n.every(function(o){return Ra(s,o)>0})||!1}function pde(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.includeDates,s=Gi(r),o=Jl(s,1);return t&&za(t,o)>0||n&&n.every(function(l){return za(l,o)>0})||!1}function gde(r,a){var e=a===void 0?{}:a,t=e.maxDate,n=e.includeDates,s=Qs(r),o=No(s,1);return t&&za(o,t)>0||n&&n.every(function(l){return za(o,l)>0})||!1}function tg(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.includeDates,s=_i(r,1);return t&&pa(t,s)>0||n&&n.every(function(o){return pa(o,s)>0})||!1}function bde(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.yearItemNumber,s=n===void 0?us:n,o=ls(_i(r,s)),l=ti(o,s).endPeriod,u=t&&Gt(t);return u&&u>l||!1}function rg(r,a){var e=a===void 0?{}:a,t=e.maxDate,n=e.includeDates,s=Un(r,1);return t&&pa(s,t)>0||n&&n.every(function(o){return pa(s,o)>0})||!1}function vde(r,a){var e=a===void 0?{}:a,t=e.maxDate,n=e.yearItemNumber,s=n===void 0?us:n,o=Un(r,s),l=ti(o,s).startPeriod,u=t&&Gt(t);return u&&u<l||!1}function ng(r){var a=r.minDate,e=r.includeDates;if(e&&a){var t=e.filter(function(n){return ln(n,a)>=0});return Ys(t)}else return e?Ys(e):a}function ag(r){var a=r.maxDate,e=r.includeDates;if(e&&a){var t=e.filter(function(n){return ln(n,a)<=0});return Vs(t)}else return e?Vs(e):a}function ig(r,a){var e;r===void 0&&(r=[]),a===void 0&&(a="react-datepicker__day--highlighted");for(var t=new Map,n=0,s=r.length;n<s;n++){var o=r[n];if(Kn(o)){var l=vr(o,"MM.dd.yyyy"),u=t.get(l)||[];u.includes(a)||(u.push(a),t.set(l,u))}else if(typeof o=="object"){var i=Object.keys(o),d=(e=i[0])!==null&&e!==void 0?e:"",h=o[d];if(typeof d=="string"&&Array.isArray(h))for(var c=0,f=h.length;c<f;c++){var g=h[c];if(g){var l=vr(g,"MM.dd.yyyy"),u=t.get(l)||[];u.includes(d)||(u.push(d),t.set(l,u))}}}}return t}function yde(r,a){return r.length!==a.length?!1:r.every(function(e,t){return e===a[t]})}function wde(r,a){r===void 0&&(r=[]),a===void 0&&(a="react-datepicker__day--holidays");var e=new Map;return r.forEach(function(t){var n=t.date,s=t.holidayName;if(Kn(n)){var o=vr(n,"MM.dd.yyyy"),l=e.get(o)||{className:"",holidayNames:[]};if(!("className"in l&&l.className===a&&yde(l.holidayNames,[s]))){l.className=a;var u=l.holidayNames;l.holidayNames=u?ia(ia([],u,!0),[s],!1):[s],e.set(o,l)}}}),e}function _de(r,a,e,t,n){for(var s=n.length,o=[],l=0;l<s;l++){var u=r,i=n[l];i&&(u=Al(u,Zn(i)),u=Yi(u,Jn(i)),u=Il(u,ba(i)));var d=Yi(r,(e+1)*t);va(u,a)&&Xa(u,d)&&i!=null&&o.push(i)}return o}function og(r){return r<10?"0".concat(r):"".concat(r)}function ti(r,a){a===void 0&&(a=us);var e=Math.ceil(Gt(r)/a)*a,t=e-(a-1);return{startPeriod:t,endPeriod:e}}function kde(r){var a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),e=new Date(r.getFullYear(),r.getMonth(),r.getDate(),24);return Math.round((+e-+a)/36e5)}function sg(r){var a=r.getSeconds(),e=r.getMilliseconds();return Ce(r.getTime()-a*1e3-e)}function xde(r,a){return sg(r).getTime()===sg(a).getTime()}function ug(r){if(!Kn(r))throw new Error("Invalid date");var a=new Date(r);return a.setHours(0,0,0,0),a}function lg(r,a){if(!Kn(r)||!Kn(a))throw new Error("Invalid date received");var e=ug(r),t=ug(a);return Xa(e,t)}function dg(r){return r.key===dt.Space}var Mde=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.inputRef=le.createRef(),t.onTimeChange=function(n){var s,o;t.setState({time:n});var l=t.props.date,u=l instanceof Date&&!isNaN(+l),i=u?l:new Date;if(n!=null&&n.includes(":")){var d=n.split(":"),h=d[0],c=d[1];i.setHours(Number(h)),i.setMinutes(Number(c))}(o=(s=t.props).onChange)===null||o===void 0||o.call(s,i)},t.renderTimeInput=function(){var n=t.state.time,s=t.props,o=s.date,l=s.timeString,u=s.customTimeInput;return u?le.cloneElement(u,{date:o,value:n,onChange:t.onTimeChange}):le.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:t.inputRef,onClick:function(){var i;(i=t.inputRef.current)===null||i===void 0||i.focus()},required:!0,value:n,onChange:function(i){t.onTimeChange(i.target.value||l)}})},t.state={time:t.props.timeString},t}return a.getDerivedStateFromProps=function(e,t){return e.timeString!==t.time?{time:e.timeString}:null},a.prototype.render=function(){return le.createElement("div",{className:"react-datepicker__input-time-container"},le.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),le.createElement("div",{className:"react-datepicker-time__input-container"},le.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},a}(le.Component),Pde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.dayEl=le.createRef(),e.handleClick=function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)},e.handleMouseEnter=function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)},e.handleOnKeyDown=function(t){var n,s,o=t.key;o===dt.Space&&(t.preventDefault(),t.key=dt.Enter),(s=(n=e.props).handleOnKeyDown)===null||s===void 0||s.call(n,t)},e.isSameDay=function(t){return rr(e.props.day,t)},e.isKeyboardSelected=function(){var t;if(e.props.disabledKeyboardNavigation)return!1;var n=e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(o){return e.isSameDayOrWeek(o)}):e.isSameDayOrWeek(e.props.selected),s=e.props.preSelection&&e.isDisabled(e.props.preSelection);return!n&&e.isSameDayOrWeek(e.props.preSelection)&&!s},e.isDisabled=function(t){return t===void 0&&(t=e.props.day),$n(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(){return sc(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return rr(e.props.day,ei(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&rr(t,ei(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameDayOrWeek=function(t){return e.isSameDay(t)||e.isSameWeek(t)},e.getHighLightedClass=function(){var t=e.props,n=t.day,s=t.highlightDates;if(!s)return!1;var o=vr(n,"MM.dd.yyyy");return s.get(o)},e.getHolidaysClass=function(){var t,n=e.props,s=n.day,o=n.holidays;if(!o)return[void 0];var l=vr(s,"MM.dd.yyyy");return o.has(l)?[(t=o.get(l))===null||t===void 0?void 0:t.className]:[void 0]},e.isInRange=function(){var t=e.props,n=t.day,s=t.startDate,o=t.endDate;return!s||!o?!1:ds(n,s,o)},e.isInSelectingRange=function(){var t,n=e.props,s=n.day,o=n.selectsStart,l=n.selectsEnd,u=n.selectsRange,i=n.selectsDisabledDaysInRange,d=n.startDate,h=n.endDate,c=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return!(o||l||u)||!c||!i&&e.isDisabled()?!1:o&&h&&(Xa(c,h)||Ti(c,h))?ds(s,c,h):l&&d&&(va(c,d)||Ti(c,d))||u&&d&&!h&&(va(c,d)||Ti(c,d))?ds(s,d,c):!1},e.isSelectingRangeStart=function(){var t;if(!e.isInSelectingRange())return!1;var n=e.props,s=n.day,o=n.startDate,l=n.selectsStart,u=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return l?rr(s,u):rr(s,o)},e.isSelectingRangeEnd=function(){var t;if(!e.isInSelectingRange())return!1;var n=e.props,s=n.day,o=n.endDate,l=n.selectsEnd,u=n.selectsRange,i=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return l||u?rr(s,i):rr(s,o)},e.isRangeStart=function(){var t=e.props,n=t.day,s=t.startDate,o=t.endDate;return!s||!o?!1:rr(s,n)},e.isRangeEnd=function(){var t=e.props,n=t.day,s=t.startDate,o=t.endDate;return!s||!o?!1:rr(o,n)},e.isWeekend=function(){var t=Io(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===Vr(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(Vr(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(lr())},e.isSelected=function(){var t;return e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(n){return e.isSameDayOrWeek(n)}):e.isSameDayOrWeek(e.props.selected)},e.getClassNames=function(t){var n=e.props.dayClassName?e.props.dayClassName(t):void 0;return Fr("react-datepicker__day",n,"react-datepicker__day--"+sde(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSelected(),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isCurrentDay(),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isAfterMonth()||e.isBeforeMonth()},e.getHighLightedClass(),e.getHolidaysClass())},e.getAriaLabel=function(){var t=e.props,n=t.day,s=t.ariaLabelPrefixWhenEnabled,o=s===void 0?"Choose":s,l=t.ariaLabelPrefixWhenDisabled,u=l===void 0?"Not available":l,i=e.isDisabled()||e.isExcluded()?u:o;return"".concat(i," ").concat(vr(n,"PPPP",e.props.locale))},e.getTitle=function(){var t=e.props,n=t.day,s=t.holidays,o=s===void 0?new Map:s,l=t.excludeDates,u=vr(n,"MM.dd.yyyy"),i=[];return o.has(u)&&i.push.apply(i,o.get(u).holidayNames),e.isExcluded()&&i.push(l==null?void 0:l.filter(function(d){return d instanceof Date?rr(d,n):rr(d==null?void 0:d.date,n)}).map(function(d){if(!(d instanceof Date))return d==null?void 0:d.message})),i.join(", ")},e.getTabIndex=function(){var t=e.props.selected,n=e.props.preSelection,s=!(e.props.showWeekPicker&&(e.props.showWeekNumber||!e.isStartOfWeek()))&&(e.isKeyboardSelected()||e.isSameDay(t)&&rr(n,t))?0:-1;return s},e.handleFocusDay=function(){var t;e.shouldFocusDay()&&((t=e.dayEl.current)===null||t===void 0||t.focus({preventScroll:!0}))},e.renderDayContents=function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(ru(e.props.day),e.props.day):ru(e.props.day)},e.render=function(){return le.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.props.usePointerEvent?void 0:e.handleMouseEnter,onPointerEnter:e.props.usePointerEvent?e.handleMouseEnter:void 0,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"option",title:e.getTitle(),"aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents(),e.getTitle()!==""&&le.createElement("span",{className:"overlay"},e.getTitle()))},e}return a.prototype.componentDidMount=function(){this.handleFocusDay()},a.prototype.componentDidUpdate=function(){this.handleFocusDay()},a.prototype.shouldFocusDay=function(){var e=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(e=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(e=!1),this.isDayActiveElement()&&(e=!0),this.isDuplicateDay()&&(e=!1)),e},a.prototype.isDayActiveElement=function(){var e,t,n;return((t=(e=this.props.containerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.contains(document.activeElement))&&((n=document.activeElement)===null||n===void 0?void 0:n.classList.contains("react-datepicker__day"))},a.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},a}(le.Component),Sde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.weekNumberEl=le.createRef(),e.handleClick=function(t){e.props.onClick&&e.props.onClick(t)},e.handleOnKeyDown=function(t){var n,s,o=t.key;o===dt.Space&&(t.preventDefault(),t.key=dt.Enter),(s=(n=e.props).handleOnKeyDown)===null||s===void 0||s.call(n,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!rr(e.props.date,e.props.selected)&&rr(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||rr(e.props.date,e.props.selected)&&rr(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var n=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&rr(e.props.date,e.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(n=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(n=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(n=!0)),n&&e.weekNumberEl.current&&e.weekNumberEl.current.focus({preventScroll:!0})},e}return Object.defineProperty(a,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},a.prototype.componentDidUpdate=function(e){this.handleFocusWeekNumber(e)},a.prototype.render=function(){var e=this.props,t=e.weekNumber,n=e.isWeekDisabled,s=e.ariaLabelPrefix,o=s===void 0?a.defaultProps.ariaLabelPrefix:s,l=e.onClick,u={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!l&&!n,"react-datepicker__week-number--selected":!!l&&rr(this.props.date,this.props.selected)};return le.createElement("div",{ref:this.weekNumberEl,className:Fr(u),"aria-label":"".concat(o," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},a}(le.Component),Dde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.isDisabled=function(t){return $n(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.handleDayClick=function(t,n){e.props.onDayClick&&e.props.onDayClick(t,n)},e.handleDayMouseEnter=function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)},e.handleWeekClick=function(t,n,s){for(var o,l,u,i=new Date(t),d=0;d<7;d++){var h=new Date(t);h.setDate(h.getDate()+d);var c=!e.isDisabled(h);if(c){i=h;break}}typeof e.props.onWeekSelect=="function"&&e.props.onWeekSelect(i,n,s),e.props.showWeekPicker&&e.handleDayClick(i,s),((o=e.props.shouldCloseOnSelect)!==null&&o!==void 0?o:a.defaultProps.shouldCloseOnSelect)&&((u=(l=e.props).setOpen)===null||u===void 0||u.call(l,!1))},e.formatWeekNumber=function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):ode(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),n=Rr(t,6),s=new Date(t);s<=n;){if(!e.isDisabled(s))return!1;s=Rr(s,1)}return!0},e.renderDays=function(){var t=e.startOfWeek(),n=[],s=e.formatWeekNumber(t);if(e.props.showWeekNumber){var o=e.props.onWeekSelect||e.props.showWeekPicker?e.handleWeekClick.bind(e,t,s):void 0;n.push(le.createElement(Sde,tr({key:"W"},a.defaultProps,e.props,{weekNumber:s,isWeekDisabled:e.isWeekDisabled(),date:t,onClick:o})))}return n.concat([0,1,2,3,4,5,6].map(function(l){var u=Rr(t,l);return le.createElement(Pde,tr({},a.defaultProps,e.props,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:u.valueOf(),day:u,onClick:e.handleDayClick.bind(e,u),onMouseEnter:e.handleDayMouseEnter.bind(e,u)}))}))},e.startOfWeek=function(){return ei(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!rr(e.startOfWeek(),e.props.selected)&&rr(e.startOfWeek(),e.props.preSelection)},e}return Object.defineProperty(a,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),a.prototype.render=function(){var e={"react-datepicker__week":!0,"react-datepicker__week--selected":rr(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return le.createElement("div",{className:Fr(e)},this.renderDays())},a}(le.Component),fs,Tde=6,ho={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},uc=(fs={},fs[ho.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},fs[ho.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},fs[ho.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},fs),Hu=1;function cg(r,a){return r?ho.FOUR_COLUMNS:a?ho.TWO_COLUMNS:ho.THREE_COLUMNS}var Cde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.MONTH_REFS=ia([],Array(12),!0).map(function(){return le.createRef()}),e.QUARTER_REFS=ia([],Array(4),!0).map(function(){return le.createRef()}),e.isDisabled=function(t){return $n(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(t){return sc(t,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.handleDayClick=function(t,n){var s,o;(o=(s=e.props).onDayClick)===null||o===void 0||o.call(s,t,n,e.props.orderInDisplay)},e.handleDayMouseEnter=function(t){var n,s;(s=(n=e.props).onDayMouseEnter)===null||s===void 0||s.call(n,t)},e.handleMouseLeave=function(){var t,n;(n=(t=e.props).onMouseLeave)===null||n===void 0||n.call(t)},e.isRangeStartMonth=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate;return!o||!l?!1:nn(dn(s,t),o)},e.isRangeStartQuarter=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate;return!o||!l?!1:Au(wi(s,t),o)},e.isRangeEndMonth=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate;return!o||!l?!1:nn(dn(s,t),l)},e.isRangeEndQuarter=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate;return!o||!l?!1:Au(wi(s,t),l)},e.isInSelectingRangeMonth=function(t){var n,s=e.props,o=s.day,l=s.selectsStart,u=s.selectsEnd,i=s.selectsRange,d=s.startDate,h=s.endDate,c=(n=e.props.selectingDate)!==null&&n!==void 0?n:e.props.preSelection;return!(l||u||i)||!c?!1:l&&h?Iu(c,h,t,o):u&&d||i&&d&&!h?Iu(d,c,t,o):!1},e.isSelectingMonthRangeStart=function(t){var n;if(!e.isInSelectingRangeMonth(t))return!1;var s=e.props,o=s.day,l=s.startDate,u=s.selectsStart,i=dn(o,t),d=(n=e.props.selectingDate)!==null&&n!==void 0?n:e.props.preSelection;return u?nn(i,d):nn(i,l)},e.isSelectingMonthRangeEnd=function(t){var n;if(!e.isInSelectingRangeMonth(t))return!1;var s=e.props,o=s.day,l=s.endDate,u=s.selectsEnd,i=s.selectsRange,d=dn(o,t),h=(n=e.props.selectingDate)!==null&&n!==void 0?n:e.props.preSelection;return u||i?nn(d,h):nn(d,l)},e.isInSelectingRangeQuarter=function(t){var n,s=e.props,o=s.day,l=s.selectsStart,u=s.selectsEnd,i=s.selectsRange,d=s.startDate,h=s.endDate,c=(n=e.props.selectingDate)!==null&&n!==void 0?n:e.props.preSelection;return!(l||u||i)||!c?!1:l&&h?Lu(c,h,t,o):u&&d||i&&d&&!h?Lu(d,c,t,o):!1},e.isWeekInMonth=function(t){var n=e.props.day,s=Rr(t,6);return nn(t,n)||nn(s,n)},e.isCurrentMonth=function(t,n){return Gt(t)===Gt(lr())&&n===Vr(lr())},e.isCurrentQuarter=function(t,n){return Gt(t)===Gt(lr())&&n===Fa(lr())},e.isSelectedMonth=function(t,n,s){return Vr(s)===n&&Gt(t)===Gt(s)},e.isSelectMonthInList=function(t,n,s){return s.some(function(o){return e.isSelectedMonth(t,n,o)})},e.isSelectedQuarter=function(t,n,s){return Fa(t)===n&&Gt(t)===Gt(s)},e.renderWeeks=function(){for(var t=[],n=e.props.fixedHeight,s=0,o=!1,l=ei(ka(e.props.day),e.props.locale,e.props.calendarStartDay),u=function(g){return e.props.showWeekPicker?ei(g,e.props.locale,e.props.calendarStartDay):e.props.preSelection},i=function(g){return e.props.showWeekPicker?ei(g,e.props.locale,e.props.calendarStartDay):e.props.selected},d=e.props.selected?i(e.props.selected):void 0,h=e.props.preSelection?u(e.props.preSelection):void 0;t.push(le.createElement(Dde,tr({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:s,day:l,month:Vr(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:d,preSelection:h,showWeekNumber:e.props.showWeekNumbers}))),!o;){s++,l=pi(l,1);var c=n&&s>=Tde,f=!n&&!e.isWeekInMonth(l);if(c||f)if(e.props.peekNextMonth)o=!0;else break}return t},e.onMonthClick=function(t,n){var s=e.isMonthDisabledForLabelDate(n),o=s.isDisabled,l=s.labelDate;o||e.handleDayClick(ka(l),t)},e.onMonthMouseEnter=function(t){var n=e.isMonthDisabledForLabelDate(t),s=n.isDisabled,o=n.labelDate;s||e.handleDayMouseEnter(ka(o))},e.handleMonthNavigation=function(t,n){var s,o,l,u;(o=(s=e.props).setPreSelection)===null||o===void 0||o.call(s,n),(u=(l=e.MONTH_REFS[t])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus()},e.handleKeyboardNavigation=function(t,n,s){var o,l=e.props,u=l.selected,i=l.preSelection,d=l.setPreSelection,h=l.minDate,c=l.maxDate,f=l.showFourColumnMonthYearPicker,g=l.showTwoColumnMonthYearPicker;if(i){var p=cg(f,g),m=e.getVerticalOffset(p),v=(o=uc[p])===null||o===void 0?void 0:o.grid,b=function(H,N,z){var L,Y,B=N,T=z;switch(H){case dt.ArrowRight:B=bn(N,Hu),T=z===11?0:z+Hu;break;case dt.ArrowLeft:B=ya(N,Hu),T=z===0?11:z-Hu;break;case dt.ArrowUp:B=ya(N,m),T=!((L=v==null?void 0:v[0])===null||L===void 0)&&L.includes(z)?z+12-m:z-m;break;case dt.ArrowDown:B=bn(N,m),T=!((Y=v==null?void 0:v[v.length-1])===null||Y===void 0)&&Y.includes(z)?z-12+m:z+m;break}return{newCalculatedDate:B,newCalculatedMonth:T}},M=function(H,N,z){for(var L=40,Y=H,B=!1,T=0,E=b(Y,N,z),P=E.newCalculatedDate,w=E.newCalculatedMonth;!B;){if(T>=L){P=N,w=z;break}if(h&&P<h){Y=dt.ArrowRight;var _=b(Y,P,w);P=_.newCalculatedDate,w=_.newCalculatedMonth}if(c&&P>c){Y=dt.ArrowLeft;var _=b(Y,P,w);P=_.newCalculatedDate,w=_.newCalculatedMonth}if(mde(P,e.props)){var _=b(Y,P,w);P=_.newCalculatedDate,w=_.newCalculatedMonth}else B=!0;T++}return{newCalculatedDate:P,newCalculatedMonth:w}};if(n===dt.Enter){e.isMonthDisabled(s)||(e.onMonthClick(t,s),d==null||d(u));return}var D=M(n,i,s),$=D.newCalculatedDate,A=D.newCalculatedMonth;switch(n){case dt.ArrowRight:case dt.ArrowLeft:case dt.ArrowUp:case dt.ArrowDown:e.handleMonthNavigation(A,$);break}}},e.getVerticalOffset=function(t){var n,s;return(s=(n=uc[t])===null||n===void 0?void 0:n.verticalNavigationOffset)!==null&&s!==void 0?s:0},e.onMonthKeyDown=function(t,n){var s=e.props,o=s.disabledKeyboardNavigation,l=s.handleOnMonthKeyDown,u=t.key;u!==dt.Tab&&t.preventDefault(),o||e.handleKeyboardNavigation(t,u,n),l&&l(t)},e.onQuarterClick=function(t,n){var s=wi(e.props.day,n);Ru(s,e.props)||e.handleDayClick(Yp(s),t)},e.onQuarterMouseEnter=function(t){var n=wi(e.props.day,t);Ru(n,e.props)||e.handleDayMouseEnter(Yp(n))},e.handleQuarterNavigation=function(t,n){var s,o,l,u;e.isDisabled(n)||e.isExcluded(n)||((o=(s=e.props).setPreSelection)===null||o===void 0||o.call(s,n),(u=(l=e.QUARTER_REFS[t-1])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus())},e.onQuarterKeyDown=function(t,n){var s,o,l=t.key;if(!e.props.disabledKeyboardNavigation)switch(l){case dt.Enter:e.onQuarterClick(t,n),(o=(s=e.props).setPreSelection)===null||o===void 0||o.call(s,e.props.selected);break;case dt.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(n===4?1:n+1,No(e.props.preSelection,1));break;case dt.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(n===1?4:n-1,Jl(e.props.preSelection,1));break}},e.isMonthDisabledForLabelDate=function(t){var n,s=e.props,o=s.day,l=s.minDate,u=s.maxDate,i=s.excludeDates,d=s.includeDates,h=dn(o,t);return{isDisabled:(n=(l||u||i||d)&&Gp(h,e.props))!==null&&n!==void 0?n:!1,labelDate:h}},e.isMonthDisabled=function(t){var n=e.isMonthDisabledForLabelDate(t).isDisabled;return n},e.getMonthClassNames=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate,u=n.preSelection,i=n.monthClassName,d=i?i(dn(s,t)):void 0,h=e.getSelection();return Fr("react-datepicker__month-text","react-datepicker__month-".concat(t),d,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":h?e.isSelectMonthInList(s,t,h):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&u&&e.isSelectedMonth(s,t,u)&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":o&&l?Iu(o,l,t,s):void 0,"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(s,t)})},e.getTabIndex=function(t){if(e.props.preSelection==null)return"-1";var n=Vr(e.props.preSelection),s=e.isMonthDisabledForLabelDate(n).isDisabled,o=t===n&&!(s||e.props.disabledKeyboardNavigation)?"0":"-1";return o},e.getQuarterTabIndex=function(t){if(e.props.preSelection==null)return"-1";var n=Fa(e.props.preSelection),s=Ru(e.props.day,e.props),o=t===n&&!(s||e.props.disabledKeyboardNavigation)?"0":"-1";return o},e.getAriaLabel=function(t){var n=e.props,s=n.chooseDayAriaLabelPrefix,o=s===void 0?"Choose":s,l=n.disabledDayAriaLabelPrefix,u=l===void 0?"Not available":l,i=n.day,d=n.locale,h=dn(i,t),c=e.isDisabled(h)||e.isExcluded(h)?u:o;return"".concat(c," ").concat(vr(h,"MMMM yyyy",d))},e.getQuarterClassNames=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate,u=n.selected,i=n.minDate,d=n.maxDate,h=n.excludeDates,c=n.includeDates,f=n.filterDate,g=n.preSelection,p=n.disabledKeyboardNavigation,m=(i||d||h||c||f)&&Ru(wi(s,t),e.props);return Fr("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":m,"react-datepicker__quarter-text--selected":u?e.isSelectedQuarter(s,t,u):void 0,"react-datepicker__quarter-text--keyboard-selected":!p&&g&&e.isSelectedQuarter(s,t,g)&&!m,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":o&&l?Lu(o,l,t,s):void 0,"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t)})},e.getMonthContent=function(t){var n=e.props,s=n.showFullMonthYearPicker,o=n.renderMonthContent,l=n.locale,u=n.day,i=Up(t,l),d=oc(t,l);return o?o(t,i,d,u):s?d:i},e.getQuarterContent=function(t){var n,s=e.props,o=s.renderQuarterContent,l=s.locale,u=hde(t,l);return(n=o==null?void 0:o(t,u))!==null&&n!==void 0?n:u},e.renderMonths=function(){var t,n=e.props,s=n.showTwoColumnMonthYearPicker,o=n.showFourColumnMonthYearPicker,l=n.day,u=n.selected,i=(t=uc[cg(o,s)])===null||t===void 0?void 0:t.grid;return i==null?void 0:i.map(function(d,h){return le.createElement("div",{className:"react-datepicker__month-wrapper",key:h},d.map(function(c,f){return le.createElement("div",{ref:e.MONTH_REFS[c],key:f,onClick:function(g){e.onMonthClick(g,c)},onKeyDown:function(g){dg(g)&&(g.preventDefault(),g.key=dt.Enter),e.onMonthKeyDown(g,c)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(c)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(c)}:void 0,tabIndex:Number(e.getTabIndex(c)),className:e.getMonthClassNames(c),"aria-disabled":e.isMonthDisabled(c),role:"option","aria-label":e.getAriaLabel(c),"aria-current":e.isCurrentMonth(l,c)?"date":void 0,"aria-selected":u?e.isSelectedMonth(l,c,u):void 0},e.getMonthContent(c))}))})},e.renderQuarters=function(){var t=e.props,n=t.day,s=t.selected,o=[1,2,3,4];return le.createElement("div",{className:"react-datepicker__quarter-wrapper"},o.map(function(l,u){return le.createElement("div",{key:u,ref:e.QUARTER_REFS[u],role:"option",onClick:function(i){e.onQuarterClick(i,l)},onKeyDown:function(i){e.onQuarterKeyDown(i,l)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onQuarterMouseEnter(l)},onPointerEnter:e.props.usePointerEvent?function(){return e.onQuarterMouseEnter(l)}:void 0,className:e.getQuarterClassNames(l),"aria-selected":s?e.isSelectedQuarter(n,l,s):void 0,tabIndex:Number(e.getQuarterTabIndex(l)),"aria-current":e.isCurrentQuarter(n,l)?"date":void 0},e.getQuarterContent(l))}))},e.getClassNames=function(){var t=e.props,n=t.selectingDate,s=t.selectsStart,o=t.selectsEnd,l=t.showMonthYearPicker,u=t.showQuarterYearPicker,i=t.showWeekPicker;return Fr("react-datepicker__month",{"react-datepicker__month--selecting-range":n&&(s||o)},{"react-datepicker__monthPicker":l},{"react-datepicker__quarterPicker":u},{"react-datepicker__weekPicker":i})},e}return a.prototype.getSelection=function(){var e=this.props,t=e.selected,n=e.selectedDates,s=e.selectsMultiple;if(s)return n;if(t)return[t]},a.prototype.render=function(){var e=this.props,t=e.showMonthYearPicker,n=e.showQuarterYearPicker,s=e.day,o=e.ariaLabelPrefix,l=o===void 0?"Month ":o,u=l?l.trim()+" ":"";return le.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(u).concat(vr(s,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():n?this.renderQuarters():this.renderWeeks())},a}(le.Component),$de=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.isSelectedMonth=function(t){return e.props.month===t},e.renderOptions=function(){return e.props.monthNames.map(function(t,n){return le.createElement("div",{className:e.isSelectedMonth(n)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(e,n),"aria-selected":e.isSelectedMonth(n)?"true":void 0},e.isSelectedMonth(n)?le.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)})},e.onChange=function(t){return e.props.onChange(t)},e.handleClickOutside=function(){return e.props.onCancel()},e}return a.prototype.render=function(){return le.createElement(ju,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},a}(le.Component),Ede=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(t){return t.map(function(n,s){return le.createElement("option",{key:n,value:s},n)})},e.renderSelectMode=function(t){return le.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(n){return e.onChange(parseInt(n.target.value))}},e.renderSelectOptions(t))},e.renderReadView=function(t,n){return le.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},le.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),le.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},n[e.props.month]))},e.renderDropdown=function(t){return le.createElement($de,tr({key:"dropdown"},e.props,{monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(t){var n=e.state.dropdownVisible,s=[e.renderReadView(!n,t)];return n&&s.unshift(e.renderDropdown(t)),s},e.onChange=function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return a.prototype.render=function(){var e=this,t=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(s){return Up(s,e.props.locale)}:function(s){return oc(s,e.props.locale)}),n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode(t);break;case"select":n=this.renderSelectMode(t);break}return le.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},n)},a}(le.Component);function Wde(r,a){for(var e=[],t=ka(r),n=ka(a);!va(t,n);)e.push(lr(t)),t=bn(t,1);return e}var jde=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.renderOptions=function(){return t.state.monthYearsList.map(function(n){var s=nu(n),o=oa(t.props.date,n)&&nn(t.props.date,n);return le.createElement("div",{className:o?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:s,onClick:t.onChange.bind(t,s),"aria-selected":o?"true":void 0},o?le.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",vr(n,t.props.dateFormat,t.props.locale))})},t.onChange=function(n){return t.props.onChange(n)},t.handleClickOutside=function(){t.props.onCancel()},t.state={monthYearsList:Wde(t.props.minDate,t.props.maxDate)},t}return a.prototype.render=function(){var e=Fr({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return le.createElement(ju,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},a}(le.Component),Ode=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=ka(e.props.minDate),n=ka(e.props.maxDate),s=[];!va(t,n);){var o=nu(t);s.push(le.createElement("option",{key:o,value:o},vr(t,e.props.dateFormat,e.props.locale))),t=bn(t,1)}return s},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return le.createElement("select",{value:nu(ka(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var n=vr(e.props.date,e.props.dateFormat,e.props.locale);return le.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:e.toggleDropdown},le.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),le.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},n))},e.renderDropdown=function(){return le.createElement(jde,tr({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n},e.onChange=function(t){e.toggleDropdown();var n=lr(t);oa(e.props.date,n)&&nn(e.props.date,n)||e.props.onChange(n)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return a.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return le.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)},a}(le.Component),Nde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={height:null},e.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var t,n,s;e.list&&(e.list.scrollTop=(s=e.centerLi&&a.calcCenterPosition(e.props.monthRef?e.props.monthRef.clientHeight-((n=(t=e.header)===null||t===void 0?void 0:t.clientHeight)!==null&&n!==void 0?n:0):e.list.clientHeight,e.centerLi))!==null&&s!==void 0?s:0)})},e.handleClick=function(t){var n,s;(e.props.minTime||e.props.maxTime)&&Zp(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Qp(t,e.props)||(s=(n=e.props).onChange)===null||s===void 0||s.call(n,t)},e.isSelectedTime=function(t){return e.props.selected&&xde(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&Zp(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Qp(t,e.props)},e.liClasses=function(t){var n,s=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t):void 0];return e.isSelectedTime(t)&&s.push("react-datepicker__time-list-item--selected"),e.isDisabledTime(t)&&s.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(Zn(t)*3600+Jn(t)*60+ba(t))%(((n=e.props.intervals)!==null&&n!==void 0?n:a.defaultProps.intervals)*60)!==0&&s.push("react-datepicker__time-list-item--injected"),s.join(" ")},e.handleOnKeyDown=function(t,n){var s,o;t.key===dt.Space&&(t.preventDefault(),t.key=dt.Enter),(t.key===dt.ArrowUp||t.key===dt.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===dt.ArrowDown||t.key===dt.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===dt.Enter&&e.handleClick(n),(o=(s=e.props).handleOnKeyDown)===null||o===void 0||o.call(s,t)},e.renderTimes=function(){for(var t,n=[],s=typeof e.props.format=="string"?e.props.format:"p",o=(t=e.props.intervals)!==null&&t!==void 0?t:a.defaultProps.intervals,l=e.props.selected||e.props.openToDate||lr(),u=Nu(l),i=e.props.injectTimes&&e.props.injectTimes.sort(function(m,v){return m.getTime()-v.getTime()}),d=60*kde(l),h=d/o,c=0;c<h;c++){var f=Yi(u,c*o);if(n.push(f),i){var g=_de(u,f,c,o,i);n=n.concat(g)}}var p=n.reduce(function(m,v){return v.getTime()<=l.getTime()?v:m},n[0]);return n.map(function(m){return le.createElement("li",{key:m.valueOf(),onClick:e.handleClick.bind(e,m),className:e.liClasses(m),ref:function(v){m===p&&(e.centerLi=v)},onKeyDown:function(v){e.handleOnKeyDown(v,m)},tabIndex:m===p?0:-1,role:"option","aria-selected":e.isSelectedTime(m)?"true":void 0,"aria-disabled":e.isDisabledTime(m)?"true":void 0},vr(m,s,e.props.locale))})},e.renderTimeCaption=function(){return e.props.showTimeCaption===!1?le.createElement(le.Fragment,null):le.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(e.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){e.header=t}},le.createElement("div",{className:"react-datepicker-time__header"},e.props.timeCaption))},e}return Object.defineProperty(a,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},a.prototype.render=function(){var e=this,t,n=this.state.height;return le.createElement("div",{className:"react-datepicker__time-container ".concat(((t=this.props.todayButton)!==null&&t!==void 0?t:a.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),le.createElement("div",{className:"react-datepicker__time"},le.createElement("div",{className:"react-datepicker__time-box"},le.createElement("ul",{className:"react-datepicker__time-list",ref:function(s){e.list=s},style:n?{height:n}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},a.calcCenterPosition=function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)},a}(le.Component),fg=3,Ade=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.YEAR_REFS=ia([],Array(t.props.yearItemNumber),!0).map(function(){return le.createRef()}),t.isDisabled=function(n){return $n(n,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(n){return sc(n,{excludeDates:t.props.excludeDates})},t.selectingDate=function(){var n;return(n=t.props.selectingDate)!==null&&n!==void 0?n:t.props.preSelection},t.updateFocusOnPaginate=function(n){var s=function(){var o,l;(l=(o=t.YEAR_REFS[n])===null||o===void 0?void 0:o.current)===null||l===void 0||l.focus()};window.requestAnimationFrame(s)},t.handleYearClick=function(n,s){t.props.onDayClick&&t.props.onDayClick(n,s)},t.handleYearNavigation=function(n,s){var o,l,u,i,d=t.props,h=d.date,c=d.yearItemNumber;if(!(h===void 0||c===void 0)){var f=ti(h,c).startPeriod;t.isDisabled(s)||t.isExcluded(s)||((l=(o=t.props).setPreSelection)===null||l===void 0||l.call(o,s),n-f<0?t.updateFocusOnPaginate(c-(f-n)):n-f>=c?t.updateFocusOnPaginate(Math.abs(c-(n-f))):(i=(u=t.YEAR_REFS[n-f])===null||u===void 0?void 0:u.current)===null||i===void 0||i.focus())}},t.isSameDay=function(n,s){return rr(n,s)},t.isCurrentYear=function(n){return n===Gt(lr())},t.isRangeStart=function(n){return t.props.startDate&&t.props.endDate&&oa(Ln(lr(),n),t.props.startDate)},t.isRangeEnd=function(n){return t.props.startDate&&t.props.endDate&&oa(Ln(lr(),n),t.props.endDate)},t.isInRange=function(n){return Fu(n,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(n){var s=t.props,o=s.selectsStart,l=s.selectsEnd,u=s.selectsRange,i=s.startDate,d=s.endDate;return!(o||l||u)||!t.selectingDate()?!1:o&&d?Fu(n,t.selectingDate(),d):l&&i||u&&i&&!d?Fu(n,i,t.selectingDate()):!1},t.isSelectingRangeStart=function(n){var s;if(!t.isInSelectingRange(n))return!1;var o=t.props,l=o.startDate,u=o.selectsStart,i=Ln(lr(),n);return u?oa(i,(s=t.selectingDate())!==null&&s!==void 0?s:null):oa(i,l??null)},t.isSelectingRangeEnd=function(n){var s;if(!t.isInSelectingRange(n))return!1;var o=t.props,l=o.endDate,u=o.selectsEnd,i=o.selectsRange,d=Ln(lr(),n);return u||i?oa(d,(s=t.selectingDate())!==null&&s!==void 0?s:null):oa(d,l??null)},t.isKeyboardSelected=function(n){if(!(t.props.date===void 0||t.props.selected==null||t.props.preSelection==null)){var s=t.props,o=s.minDate,l=s.maxDate,u=s.excludeDates,i=s.includeDates,d=s.filterDate,h=ls(Ln(t.props.date,n)),c=(o||l||u||i||d)&&zu(n,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!rr(h,ls(t.props.selected))&&rr(h,ls(t.props.preSelection))&&!c}},t.onYearClick=function(n,s){var o=t.props.date;o!==void 0&&t.handleYearClick(ls(Ln(o,s)),n)},t.onYearKeyDown=function(n,s){var o,l,u=n.key,i=t.props,d=i.date,h=i.yearItemNumber,c=i.handleOnKeyDown;if(u!==dt.Tab&&n.preventDefault(),!t.props.disabledKeyboardNavigation)switch(u){case dt.Enter:if(t.props.selected==null)break;t.onYearClick(n,s),(l=(o=t.props).setPreSelection)===null||l===void 0||l.call(o,t.props.selected);break;case dt.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(s+1,Un(t.props.preSelection,1));break;case dt.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(s-1,_i(t.props.preSelection,1));break;case dt.ArrowUp:{if(d===void 0||h===void 0||t.props.preSelection==null)break;var f=ti(d,h).startPeriod,g=fg,p=s-g;if(p<f){var m=h%g;s>=f&&s<f+m?g=m:g+=m,p=s-g}t.handleYearNavigation(p,_i(t.props.preSelection,g));break}case dt.ArrowDown:{if(d===void 0||h===void 0||t.props.preSelection==null)break;var v=ti(d,h).endPeriod,g=fg,p=s+g;if(p>v){var m=h%g;s<=v&&s>v-m?g=m:g+=m,p=s+g}t.handleYearNavigation(p,Un(t.props.preSelection,g));break}}c&&c(n)},t.getYearClassNames=function(n){var s=t.props,o=s.date,l=s.minDate,u=s.maxDate,i=s.selected,d=s.excludeDates,h=s.includeDates,c=s.filterDate,f=s.yearClassName;return Fr("react-datepicker__year-text","react-datepicker__year-".concat(n),o?f==null?void 0:f(Ln(o,n)):void 0,{"react-datepicker__year-text--selected":i?n===Gt(i):void 0,"react-datepicker__year-text--disabled":(l||u||d||h||c)&&zu(n,t.props),"react-datepicker__year-text--keyboard-selected":t.isKeyboardSelected(n),"react-datepicker__year-text--range-start":t.isRangeStart(n),"react-datepicker__year-text--range-end":t.isRangeEnd(n),"react-datepicker__year-text--in-range":t.isInRange(n),"react-datepicker__year-text--in-selecting-range":t.isInSelectingRange(n),"react-datepicker__year-text--selecting-range-start":t.isSelectingRangeStart(n),"react-datepicker__year-text--selecting-range-end":t.isSelectingRangeEnd(n),"react-datepicker__year-text--today":t.isCurrentYear(n)})},t.getYearTabIndex=function(n){if(t.props.disabledKeyboardNavigation||t.props.preSelection==null)return"-1";var s=Gt(t.props.preSelection),o=zu(n,t.props);return n===s&&!o?"0":"-1"},t.getYearContent=function(n){return t.props.renderYearContent?t.props.renderYearContent(n):n},t}return a.prototype.render=function(){var e=this,t=[],n=this.props,s=n.date,o=n.yearItemNumber,l=n.onYearMouseEnter,u=n.onYearMouseLeave;if(s===void 0)return null;for(var i=ti(s,o),d=i.startPeriod,h=i.endPeriod,c=function(p){t.push(le.createElement("div",{ref:f.YEAR_REFS[p-d],onClick:function(m){e.onYearClick(m,p)},onKeyDown:function(m){dg(m)&&(m.preventDefault(),m.key=dt.Enter),e.onYearKeyDown(m,p)},tabIndex:Number(f.getYearTabIndex(p)),className:f.getYearClassNames(p),onMouseEnter:f.props.usePointerEvent?void 0:function(m){return l(m,p)},onPointerEnter:f.props.usePointerEvent?function(m){return l(m,p)}:void 0,onMouseLeave:f.props.usePointerEvent?void 0:function(m){return u(m,p)},onPointerLeave:f.props.usePointerEvent?function(m){return u(m,p)}:void 0,key:p,"aria-current":f.isCurrentYear(p)?"date":void 0},f.getYearContent(p)))},f=this,g=d;g<=h;g++)c(g);return le.createElement("div",{className:"react-datepicker__year"},le.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},t))},a}(le.Component);function Ide(r,a,e,t){for(var n=[],s=0;s<2*a+1;s++){var o=r+a-s,l=!0;e&&(l=Gt(e)<=o),t&&l&&(l=Gt(t)>=o),l&&n.push(o)}return n}var Rde=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;t.renderOptions=function(){var l=t.props.year,u=t.state.yearsList.map(function(h){return le.createElement("div",{className:l===h?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:h,onClick:t.onChange.bind(t,h),"aria-selected":l===h?"true":void 0},l===h?le.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",h)}),i=t.props.minDate?Gt(t.props.minDate):null,d=t.props.maxDate?Gt(t.props.maxDate):null;return(!d||!t.state.yearsList.find(function(h){return h===d}))&&u.unshift(le.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},le.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!i||!t.state.yearsList.find(function(h){return h===i}))&&u.push(le.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},le.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),u},t.onChange=function(l){t.props.onChange(l)},t.handleClickOutside=function(){t.props.onCancel()},t.shiftYears=function(l){var u=t.state.yearsList.map(function(i){return i+l});t.setState({yearsList:u})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var n=e.yearDropdownItemNumber,s=e.scrollableYearDropdown,o=n||(s?10:5);return t.state={yearsList:Ide(t.props.year,o,t.props.minDate,t.props.maxDate)},t.dropdownRef=le.createRef(),t}return a.prototype.componentDidMount=function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,n=t?t.find(function(s){return s.ariaSelected}):null;e.scrollTop=n&&n instanceof HTMLElement?n.offsetTop+(n.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}},a.prototype.render=function(){var e=Fr({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return le.createElement(ju,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},a}(le.Component),Fde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=e.props.minDate?Gt(e.props.minDate):1900,n=e.props.maxDate?Gt(e.props.maxDate):2100,s=[],o=t;o<=n;o++)s.push(le.createElement("option",{key:o,value:o},o));return s},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return le.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){return le.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(n){return e.toggleDropdown(n)}},le.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),le.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))},e.renderDropdown=function(){return le.createElement(Rde,tr({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n},e.onChange=function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)},e.toggleDropdown=function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)})},e.handleYearChange=function(t,n){var s;(s=e.onSelect)===null||s===void 0||s.call(e,t,n),e.setOpen()},e.onSelect=function(t,n){var s,o;(o=(s=e.props).onSelect)===null||o===void 0||o.call(s,t,n)},e.setOpen=function(){var t,n;(n=(t=e.props).setOpen)===null||n===void 0||n.call(t,!0)},e}return a.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return le.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)},a}(le.Component),zde=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Lde=function(r){var a=(r.className||"").split(/\s+/);return zde.some(function(e){return a.indexOf(e)>=0})},Hde=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.monthContainer=void 0,t.handleClickOutside=function(n){t.props.onClickOutside(n)},t.setClickOutsideRef=function(){return t.containerRef.current},t.handleDropdownFocus=function(n){var s,o;Lde(n.target)&&((o=(s=t.props).onDropdownFocus)===null||o===void 0||o.call(s,n))},t.getDateInView=function(){var n=t.props,s=n.preSelection,o=n.selected,l=n.openToDate,u=ng(t.props),i=ag(t.props),d=lr(),h=l||o||s;return h||(u&&Xa(d,u)?u:i&&va(d,i)?i:d)},t.increaseMonth=function(){t.setState(function(n){var s=n.date;return{date:bn(s,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(n){var s=n.date;return{date:ya(s,1)}},function(){return t.handleMonthChange(t.state.date)})},t.handleDayClick=function(n,s,o){t.props.onSelect(n,s,o),t.props.setPreSelection&&t.props.setPreSelection(n)},t.handleDayMouseEnter=function(n){t.setState({selectingDate:n}),t.props.onDayMouseEnter&&t.props.onDayMouseEnter(n)},t.handleMonthMouseLeave=function(){t.setState({selectingDate:void 0}),t.props.onMonthMouseLeave&&t.props.onMonthMouseLeave()},t.handleYearMouseEnter=function(n,s){t.setState({selectingDate:Ln(lr(),s)}),t.props.onYearMouseEnter&&t.props.onYearMouseEnter(n,s)},t.handleYearMouseLeave=function(n,s){t.props.onYearMouseLeave&&t.props.onYearMouseLeave(n,s)},t.handleYearChange=function(n){var s,o,l,u;(o=(s=t.props).onYearChange)===null||o===void 0||o.call(s,n),t.setState({isRenderAriaLiveMessage:!0}),t.props.adjustDateOnChange&&(t.props.onSelect(n),(u=(l=t.props).setOpen)===null||u===void 0||u.call(l,!0)),t.props.setPreSelection&&t.props.setPreSelection(n)},t.getEnabledPreSelectionDateForMonth=function(n){if(!$n(n,t.props))return n;for(var s=ka(n),o=lde(n),l=qs(o,s),u=null,i=0;i<=l;i++){var d=Rr(s,i);if(!$n(d,t.props)){u=d;break}}return u},t.handleMonthChange=function(n){var s,o,l,u=(s=t.getEnabledPreSelectionDateForMonth(n))!==null&&s!==void 0?s:n;t.handleCustomMonthChange(u),t.props.adjustDateOnChange&&(t.props.onSelect(u),(l=(o=t.props).setOpen)===null||l===void 0||l.call(o,!0)),t.props.setPreSelection&&t.props.setPreSelection(u)},t.handleCustomMonthChange=function(n){var s,o;(o=(s=t.props).onMonthChange)===null||o===void 0||o.call(s,n),t.setState({isRenderAriaLiveMessage:!0})},t.handleMonthYearChange=function(n){t.handleYearChange(n),t.handleMonthChange(n)},t.changeYear=function(n){t.setState(function(s){var o=s.date;return{date:Ln(o,Number(n))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(n){t.setState(function(s){var o=s.date;return{date:dn(o,Number(n))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(n){t.setState(function(s){var o=s.date;return{date:Ln(dn(o,Vr(n)),Gt(n))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(n){n===void 0&&(n=t.state.date);var s=ei(n,t.props.locale,t.props.calendarStartDay),o=[];return t.props.showWeekNumbers&&o.push(le.createElement("div",{key:"W",className:"react-datepicker__day-name"},t.props.weekLabel||"#")),o.concat([0,1,2,3,4,5,6].map(function(l){var u=Rr(s,l),i=t.formatWeekday(u,t.props.locale),d=t.props.weekDayClassName?t.props.weekDayClassName(u):void 0;return le.createElement("div",{key:l,"aria-label":vr(u,"EEEE",t.props.locale),className:Fr("react-datepicker__day-name",d)},i)}))},t.formatWeekday=function(n,s){return t.props.formatWeekDay?dde(n,t.props.formatWeekDay,s):t.props.useWeekdaysShort?fde(n,s):cde(n,s)},t.decreaseYear=function(){t.setState(function(n){var s,o=n.date;return{date:_i(o,t.props.showYearPicker?(s=t.props.yearItemNumber)!==null&&s!==void 0?s:a.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.clearSelectingDate=function(){t.setState({selectingDate:void 0})},t.renderPreviousButton=function(){var n,s,o;if(!t.props.renderCustomHeader){var l=(n=t.props.monthsShown)!==null&&n!==void 0?n:a.defaultProps.monthsShown,u=t.props.showPreviousMonths?l-1:0,i=(s=t.props.monthSelectedIn)!==null&&s!==void 0?s:u,d=ya(t.state.date,i),h;switch(!0){case t.props.showMonthYearPicker:h=tg(t.state.date,t.props);break;case t.props.showYearPicker:h=bde(t.state.date,t.props);break;case t.props.showQuarterYearPicker:h=pde(t.state.date,t.props);break;default:h=Jp(d,t.props);break}if(!(!((o=t.props.forceShowMonthNavigation)!==null&&o!==void 0?o:a.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&h||t.props.showTimeSelectOnly)){var c=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],f=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(g=t.decreaseYear),h&&t.props.showDisabledMonthNavigation&&(f.push("react-datepicker__navigation--previous--disabled"),g=void 0);var p=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,m=t.props,v=m.previousMonthButtonLabel,b=v===void 0?a.defaultProps.previousMonthButtonLabel:v,M=m.previousYearButtonLabel,D=M===void 0?a.defaultProps.previousYearButtonLabel:M,$=t.props,A=$.previousMonthAriaLabel,H=A===void 0?typeof b=="string"?b:"Previous Month":A,N=$.previousYearAriaLabel,z=N===void 0?typeof D=="string"?D:"Previous Year":N;return le.createElement("button",{type:"button",className:f.join(" "),onClick:g,onKeyDown:t.props.handleOnKeyDown,"aria-label":p?z:H},le.createElement("span",{className:c.join(" ")},p?D:b))}}},t.increaseYear=function(){t.setState(function(n){var s,o=n.date;return{date:Un(o,t.props.showYearPicker?(s=t.props.yearItemNumber)!==null&&s!==void 0?s:a.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.renderNextButton=function(){var n;if(!t.props.renderCustomHeader){var s;switch(!0){case t.props.showMonthYearPicker:s=rg(t.state.date,t.props);break;case t.props.showYearPicker:s=vde(t.state.date,t.props);break;case t.props.showQuarterYearPicker:s=gde(t.state.date,t.props);break;default:s=eg(t.state.date,t.props);break}if(!(!((n=t.props.forceShowMonthNavigation)!==null&&n!==void 0?n:a.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&s||t.props.showTimeSelectOnly)){var o=["react-datepicker__navigation","react-datepicker__navigation--next"],l=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];t.props.showTimeSelect&&o.push("react-datepicker__navigation--next--with-time"),t.props.todayButton&&o.push("react-datepicker__navigation--next--with-today-button");var u=t.increaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(u=t.increaseYear),s&&t.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--next--disabled"),u=void 0);var i=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,d=t.props,h=d.nextMonthButtonLabel,c=h===void 0?a.defaultProps.nextMonthButtonLabel:h,f=d.nextYearButtonLabel,g=f===void 0?a.defaultProps.nextYearButtonLabel:f,p=t.props,m=p.nextMonthAriaLabel,v=m===void 0?typeof c=="string"?c:"Next Month":m,b=p.nextYearAriaLabel,M=b===void 0?typeof g=="string"?g:"Next Year":b;return le.createElement("button",{type:"button",className:o.join(" "),onClick:u,onKeyDown:t.props.handleOnKeyDown,"aria-label":i?M:v},le.createElement("span",{className:l.join(" ")},i?g:c))}}},t.renderCurrentMonth=function(n){n===void 0&&(n=t.state.date);var s=["react-datepicker__current-month"];return t.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),t.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),t.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),le.createElement("h2",{className:s.join(" ")},vr(n,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(n){if(n===void 0&&(n=!1),!(!t.props.showYearDropdown||n))return le.createElement(Fde,tr({},a.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:Gt(t.state.date)}))},t.renderMonthDropdown=function(n){if(n===void 0&&(n=!1),!(!t.props.showMonthDropdown||n))return le.createElement(Ede,tr({},a.defaultProps,t.props,{month:Vr(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(n){if(n===void 0&&(n=!1),!(!t.props.showMonthYearDropdown||n))return le.createElement(Ode,tr({},a.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(n){t.props.onSelect(Xp(),n),t.props.setPreSelection&&t.props.setPreSelection(Xp())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return le.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDefaultHeader=function(n){var s=n.monthDate,o=n.i;return le.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(s),le.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(t.props.dropdownMode),onFocus:t.handleDropdownFocus},t.renderMonthDropdown(o!==0),t.renderMonthYearDropdown(o!==0),t.renderYearDropdown(o!==0)),le.createElement("div",{className:"react-datepicker__day-names"},t.header(s)))},t.renderCustomHeader=function(n){var s,o,l=n.monthDate,u=n.i;if(t.props.showTimeSelect&&!t.state.monthContainer||t.props.showTimeSelectOnly)return null;var i=Jp(t.state.date,t.props),d=eg(t.state.date,t.props),h=tg(t.state.date,t.props),c=rg(t.state.date,t.props),f=!t.props.showMonthYearPicker&&!t.props.showQuarterYearPicker&&!t.props.showYearPicker;return le.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:t.props.onDropdownFocus},(o=(s=t.props).renderCustomHeader)===null||o===void 0?void 0:o.call(s,tr(tr({},t.state),{customHeaderCount:u,monthDate:l,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:i,nextMonthButtonDisabled:d,prevYearButtonDisabled:h,nextYearButtonDisabled:c})),f&&le.createElement("div",{className:"react-datepicker__day-names"},t.header(l)))},t.renderYearHeader=function(n){var s=n.monthDate,o=t.props,l=o.showYearPicker,u=o.yearItemNumber,i=u===void 0?a.defaultProps.yearItemNumber:u,d=ti(s,i),h=d.startPeriod,c=d.endPeriod;return le.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},l?"".concat(h," - ").concat(c):Gt(s))},t.renderHeader=function(n){var s=n.monthDate,o=n.i,l=o===void 0?0:o,u={monthDate:s,i:l};switch(!0){case t.props.renderCustomHeader!==void 0:return t.renderCustomHeader(u);case(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker):return t.renderYearHeader(u);default:return t.renderDefaultHeader(u)}},t.renderMonths=function(){var n,s;if(!(t.props.showTimeSelectOnly||t.props.showYearPicker)){for(var o=[],l=(n=t.props.monthsShown)!==null&&n!==void 0?n:a.defaultProps.monthsShown,u=t.props.showPreviousMonths?l-1:0,i=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Un(t.state.date,u):ya(t.state.date,u),d=(s=t.props.monthSelectedIn)!==null&&s!==void 0?s:u,h=0;h<l;++h){var c=h-d+u,f=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Un(i,c):bn(i,c),g="month-".concat(h),p=h<l-1,m=h>0;o.push(le.createElement("div",{key:g,ref:function(v){t.monthContainer=v??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:f,i:h}),le.createElement(Cde,tr({},a.defaultProps,t.props,{ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:f,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:h,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:m}))))}return o}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return le.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),le.createElement(Ade,tr({},a.defaultProps,t.props,{selectingDate:t.state.selectingDate,date:t.state.date,onDayClick:t.handleDayClick,clearSelectingDate:t.clearSelectingDate,onYearMouseEnter:t.handleYearMouseEnter,onYearMouseLeave:t.handleYearMouseLeave})))},t.renderTimeSection=function(){if(t.props.showTimeSelect&&(t.state.monthContainer||t.props.showTimeSelectOnly))return le.createElement(Nde,tr({},a.defaultProps,t.props,{onChange:t.props.onTimeChange,format:t.props.timeFormat,intervals:t.props.timeIntervals,monthRef:t.state.monthContainer}))},t.renderInputTimeSection=function(){var n=t.props.selected?new Date(t.props.selected):void 0,s=n&&Ou(n)&&!!t.props.selected,o=s?"".concat(og(n.getHours()),":").concat(og(n.getMinutes())):"";if(t.props.showTimeInput)return le.createElement(Mde,tr({},a.defaultProps,t.props,{date:n,timeString:o,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var n,s=ti(t.state.date,(n=t.props.yearItemNumber)!==null&&n!==void 0?n:a.defaultProps.yearItemNumber),o=s.startPeriod,l=s.endPeriod,u;return t.props.showYearPicker?u="".concat(o," - ").concat(l):t.props.showMonthYearPicker||t.props.showQuarterYearPicker?u=Gt(t.state.date):u="".concat(oc(Vr(t.state.date),t.props.locale)," ").concat(Gt(t.state.date)),le.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&u)},t.renderChildren=function(){if(t.props.children)return le.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=le.createRef(),t.state={date:t.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},t}return Object.defineProperty(a,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:us}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){e.setState({monthContainer:e.monthContainer})}())},a.prototype.componentDidUpdate=function(e){var t=this;if(this.props.preSelection&&(!rr(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var n=!nn(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return n&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!rr(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},a.prototype.render=function(){var e=this.props.container||rde;return le.createElement(ju,{onClickOutside:this.handleClickOutside,style:{display:"contents"},containerRef:this.containerRef,ignoreClass:this.props.outsideClickIgnoreClass},le.createElement(e,{className:Fr("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))},a}(le.Component),Bde=function(r){var a=r.icon,e=r.className,t=e===void 0?"":e,n=r.onClick,s="react-datepicker__calendar-icon";if(typeof a=="string")return le.createElement("i",{className:"".concat(s," ").concat(a," ").concat(t),"aria-hidden":"true",onClick:n});if(le.isValidElement(a)){var o=a;return le.cloneElement(o,{className:"".concat(o.props.className||""," ").concat(s," ").concat(t),onClick:function(l){typeof o.props.onClick=="function"&&o.props.onClick(l),typeof n=="function"&&n(l)}})}return le.createElement("svg",{className:"".concat(s," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:n},le.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},hg=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.portalRoot=null,t.el=document.createElement("div"),t}return a.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},a.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},a.prototype.render=function(){return Na.createPortal(this.props.children,this.el)},a}(le.Component),Vde="[tabindex], a, button, input, select, textarea",Yde=function(r){return(r instanceof HTMLAnchorElement||!r.disabled)&&r.tabIndex!==-1},mg=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.getTabChildren=function(){var n;return Array.prototype.slice.call((n=t.tabLoopRef.current)===null||n===void 0?void 0:n.querySelectorAll(Vde),1,-1).filter(Yde)},t.handleFocusStart=function(){var n=t.getTabChildren();n&&n.length>1&&n[n.length-1].focus()},t.handleFocusEnd=function(){var n=t.getTabChildren();n&&n.length>1&&n[0].focus()},t.tabLoopRef=le.createRef(),t}return a.prototype.render=function(){var e;return((e=this.props.enableTabLoop)!==null&&e!==void 0?e:a.defaultProps.enableTabLoop)?le.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},le.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,le.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},a.defaultProps={enableTabLoop:!0},a}(le.Component);function Xde(r){var a=function(e){var t,n=typeof e.hidePopper=="boolean"?e.hidePopper:!0,s=le.useRef(null),o=tde(tr({open:!n,whileElementsMounted:Nle,placement:e.popperPlacement,middleware:ia([tc({padding:15}),zle(10),Lle({element:s})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),l=tr(tr({},e),{hidePopper:n,popperProps:tr(tr({},o),{arrowRef:s})});return le.createElement(r,tr({},l))};return a}var qde=function(r){Ar(a,r);function a(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(a,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),a.prototype.render=function(){var e=this.props,t=e.className,n=e.wrapperClassName,s=e.hidePopper,o=s===void 0?a.defaultProps.hidePopper:s,l=e.popperComponent,u=e.targetComponent,i=e.enableTabLoop,d=e.popperOnKeyDown,h=e.portalId,c=e.portalHost,f=e.popperProps,g=e.showArrow,p=void 0;if(!o){var m=Fr("react-datepicker-popper",t);p=le.createElement(mg,{enableTabLoop:i},le.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:m,"data-placement":f.placement,onKeyDown:d},l,g&&le.createElement(Ule,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(p=le.createElement(this.props.popperContainer,{},p)),h&&!o&&(p=le.createElement(hg,{portalId:h,portalHost:c},p));var v=Fr("react-datepicker-wrapper",n);return le.createElement(le.Fragment,null,le.createElement("div",{ref:f.refs.setReference,className:v},u),p)},a}(le.Component),Ude=Xde(qde),pg="react-datepicker-ignore-onclickoutside";function Gde(r,a){return r&&a?Vr(r)!==Vr(a)||Gt(r)!==Gt(a):r!==a}var lc="Date input not valid.",gg=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.calendar=null,t.input=null,t.getPreSelection=function(){return t.props.openToDate?t.props.openToDate:t.props.selectsEnd&&t.props.startDate?t.props.startDate:t.props.selectsStart&&t.props.endDate?t.props.endDate:lr()},t.modifyHolidays=function(){var n;return(n=t.props.holidays)===null||n===void 0?void 0:n.reduce(function(s,o){var l=new Date(o.date);return Ou(l)?ia(ia([],s,!0),[tr(tr({},o),{date:l})],!1):s},[])},t.calcInitialState=function(){var n,s=t.getPreSelection(),o=ng(t.props),l=ag(t.props),u=o&&Xa(s,Nu(o))?o:l&&va(s,qp(l))?l:s;return{open:t.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(n=t.props.selectsRange?t.props.startDate:t.props.selected)!==null&&n!==void 0?n:u,highlightDates:ig(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.resetHiddenStatus=function(){t.setState(tr(tr({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(tr(tr({},t.state),{wasHidden:!0}))},t.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&t.setHiddenStatus()},t.clearPreventFocusTimeout=function(){t.preventFocusTimeout&&clearTimeout(t.preventFocusTimeout)},t.safeFocus=function(){setTimeout(function(){var n,s;(s=(n=t.input)===null||n===void 0?void 0:n.focus)===null||s===void 0||s.call(n,{preventScroll:!0})},0)},t.safeBlur=function(){setTimeout(function(){var n,s;(s=(n=t.input)===null||n===void 0?void 0:n.blur)===null||s===void 0||s.call(n)},0)},t.setFocus=function(){t.safeFocus()},t.setBlur=function(){t.safeBlur(),t.cancelFocusInput()},t.setOpen=function(n,s){s===void 0&&(s=!1),t.setState({open:n,preSelection:n&&t.state.open?t.state.preSelection:t.calcInitialState().preSelection,lastPreSelectChange:dc},function(){n||t.setState(function(o){return{focused:s?o.focused:!1}},function(){!s&&t.setBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return Kn(t.state.preSelection)},t.isCalendarOpen=function(){return t.props.open===void 0?t.state.open&&!t.props.disabled&&!t.props.readOnly:t.props.open},t.handleFocus=function(n){var s,o,l=t.state.wasHidden,u=l?t.state.open:!0;l&&t.resetHiddenStatus(),t.state.preventFocus||((o=(s=t.props).onFocus)===null||o===void 0||o.call(s,n),u&&!t.props.preventOpenOnFocus&&!t.props.readOnly&&t.setOpen(!0)),t.setState({focused:!0})},t.sendFocusBackToInput=function(){t.preventFocusTimeout&&t.clearPreventFocusTimeout(),t.setState({preventFocus:!0},function(){t.preventFocusTimeout=setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})})},t.cancelFocusInput=function(){clearTimeout(t.inputFocusTimeout),t.inputFocusTimeout=void 0},t.deferFocusInput=function(){t.cancelFocusInput(),t.inputFocusTimeout=setTimeout(function(){return t.setFocus()},1)},t.handleDropdownFocus=function(){t.cancelFocusInput()},t.handleBlur=function(n){var s,o;(!t.state.open||t.props.withPortal||t.props.showTimeInput)&&((o=(s=t.props).onBlur)===null||o===void 0||o.call(s,n)),t.state.open&&t.props.open===!1&&t.setOpen(!1),t.setState({focused:!1})},t.handleCalendarClickOutside=function(n){var s,o;t.props.inline||t.setOpen(!1),(o=(s=t.props).onClickOutside)===null||o===void 0||o.call(s,n),t.props.withPortal&&n.preventDefault()},t.handleChange=function(){for(var n,s,o,l,u,i=[],d=0;d<arguments.length;d++)i[d]=arguments[d];var h=i[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,i),!h||typeof h.isDefaultPrevented!="function"||h.isDefaultPrevented()))){t.setState({inputValue:(h==null?void 0:h.target)instanceof HTMLInputElement?h.target.value:null,lastPreSelectChange:Kde});var c=t.props,f=c.selectsRange,g=c.startDate,p=c.endDate,m=(n=t.props.dateFormat)!==null&&n!==void 0?n:a.defaultProps.dateFormat,v=(s=t.props.strictParsing)!==null&&s!==void 0?s:a.defaultProps.strictParsing,b=(h==null?void 0:h.target)instanceof HTMLInputElement?h.target.value:"";if(f){var M=b.split("-",2).map(function(Y){return Y.trim()}),D=M[0],$=M[1],A=nc(D??"",m,t.props.locale,v),H=nc($??"",m,t.props.locale,v),N=(g==null?void 0:g.getTime())!==(A==null?void 0:A.getTime()),z=(p==null?void 0:p.getTime())!==(H==null?void 0:H.getTime());if(!N&&!z||A&&$n(A,t.props)||H&&$n(H,t.props))return;(l=(o=t.props).onChange)===null||l===void 0||l.call(o,[A,H],h)}else{var L=nc(b,m,t.props.locale,v,(u=t.props.selected)!==null&&u!==void 0?u:void 0);(L||!b)&&t.setSelected(L,h,!0)}}},t.handleSelect=function(n,s,o){if(t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&t.sendFocusBackToInput(),t.props.onChangeRaw&&t.props.onChangeRaw(s),t.setSelected(n,s,!1,o),t.props.showDateSelect&&t.setState({isRenderAriaLiveMessage:!0}),!t.props.shouldCloseOnSelect||t.props.showTimeSelect)t.setPreSelection(n);else if(!t.props.inline){t.props.selectsRange||t.setOpen(!1);var l=t.props,u=l.startDate,i=l.endDate;u&&!i&&(t.props.swapRange||!lg(n,u))&&t.setOpen(!1)}},t.setSelected=function(n,s,o,l){var u,i,d=n;if(t.props.showYearPicker){if(d!==null&&zu(Gt(d),t.props))return}else if(t.props.showMonthYearPicker){if(d!==null&&Gp(d,t.props))return}else if(d!==null&&$n(d,t.props))return;var h=t.props,c=h.onChange,f=h.selectsRange,g=h.startDate,p=h.endDate,m=h.selectsMultiple,v=h.selectedDates,b=h.minTime,M=h.swapRange;if(!Ti(t.props.selected,d)||t.props.allowSameDay||f||m)if(d!==null&&(t.props.selected&&(!o||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(d=ac(d,{hour:Zn(t.props.selected),minute:Jn(t.props.selected),second:ba(t.props.selected)})),!o&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&b&&(d=ac(d,{hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})),t.props.inline||t.setState({preSelection:d}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:l})),f){var D=!g&&!p,$=g&&!p,A=g&&p;D?c==null||c([d,null],s):$&&(d===null?c==null||c([null,null],s):lg(d,g)?M?c==null||c([d,g],s):c==null||c([d,null],s):c==null||c([g,d],s)),A&&(c==null||c([d,null],s))}else if(m){if(d!==null)if(!(v!=null&&v.length))c==null||c([d],s);else{var H=v.some(function(z){return rr(z,d)});if(H){var N=v.filter(function(z){return!rr(z,d)});c==null||c(N,s)}else c==null||c(ia(ia([],v,!0),[d],!1),s)}}else c==null||c(d,s);o||((i=(u=t.props).onSelect)===null||i===void 0||i.call(u,d,s),t.setState({inputValue:null}))},t.setPreSelection=function(n){var s=Kn(t.props.minDate),o=Kn(t.props.maxDate),l=!0;if(n){var u=Nu(n);if(s&&o)l=ds(n,t.props.minDate,t.props.maxDate);else if(s){var i=Nu(t.props.minDate);l=va(n,i)||Ti(u,i)}else if(o){var d=qp(t.props.maxDate);l=Xa(n,d)||Ti(u,d)}}l&&t.setState({preSelection:n})},t.toggleCalendar=function(){t.setOpen(!t.state.open)},t.handleTimeChange=function(n){var s,o;if(!(t.props.selectsRange||t.props.selectsMultiple)){var l=t.props.selected?t.props.selected:t.getPreSelection(),u=t.props.selected?n:ac(l,{hour:Zn(n),minute:Jn(n)});t.setState({preSelection:u}),(o=(s=t.props).onChange)===null||o===void 0||o.call(s,u),t.props.shouldCloseOnSelect&&!t.props.showTimeInput&&(t.sendFocusBackToInput(),t.setOpen(!1)),t.props.showTimeInput&&t.setOpen(!0),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),t.setState({inputValue:null})}},t.onInputClick=function(){var n,s;!t.props.disabled&&!t.props.readOnly&&t.setOpen(!0),(s=(n=t.props).onInputClick)===null||s===void 0||s.call(n)},t.onInputKeyDown=function(n){var s,o,l,u,i,d;(o=(s=t.props).onKeyDown)===null||o===void 0||o.call(s,n);var h=n.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(h===dt.ArrowDown||h===dt.ArrowUp||h===dt.Enter)&&((l=t.onInputClick)===null||l===void 0||l.call(t));return}if(t.state.open){if(h===dt.ArrowDown||h===dt.ArrowUp){n.preventDefault();var c=t.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":t.props.showWeekPicker&&t.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':t.props.showFullMonthYearPicker||t.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',f=((u=t.calendar)===null||u===void 0?void 0:u.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(c);f instanceof HTMLElement&&f.focus({preventScroll:!0});return}var g=lr(t.state.preSelection);h===dt.Enter?(n.preventDefault(),n.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===dc?(t.handleSelect(g,n),!t.props.shouldCloseOnSelect&&t.setPreSelection(g)):t.setOpen(!1)):h===dt.Escape?(n.preventDefault(),n.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):h===dt.Tab&&t.setOpen(!1),t.inputOk()||(d=(i=t.props).onInputError)===null||d===void 0||d.call(i,{code:1,msg:lc})}},t.onPortalKeyDown=function(n){var s=n.key;s===dt.Escape&&(n.preventDefault(),t.setState({preventFocus:!0},function(){t.setOpen(!1),setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})}))},t.onDayKeyDown=function(n){var s,o,l,u,i,d,h=t.props,c=h.minDate,f=h.maxDate,g=h.disabledKeyboardNavigation,p=h.showWeekPicker,m=h.shouldCloseOnSelect,v=h.locale,b=h.calendarStartDay,M=h.adjustDateOnChange,D=h.inline;if((o=(s=t.props).onKeyDown)===null||o===void 0||o.call(s,n),!g){var $=n.key,A=n.shiftKey,H=lr(t.state.preSelection),N=function(P,w){var _=w;switch(P){case dt.ArrowRight:_=p?pi(w,1):Rr(w,1);break;case dt.ArrowLeft:_=p?ed(w,1):Ro(w,1);break;case dt.ArrowUp:_=ed(w,1);break;case dt.ArrowDown:_=pi(w,1);break;case dt.PageUp:_=A?_i(w,1):ya(w,1);break;case dt.PageDown:_=A?Un(w,1):bn(w,1);break;case dt.Home:_=ei(w,v,b);break;case dt.End:_=ude(w);break}return _},z=function(P,w){for(var _=40,k=P,x=!1,C=0,O=N(P,w);!x;){if(C>=_){O=w;break}c&&O<c&&(k=dt.ArrowRight,O=$n(c,t.props)?N(k,O):c),f&&O>f&&(k=dt.ArrowLeft,O=$n(f,t.props)?N(k,O):f),$n(O,t.props)?((k===dt.PageUp||k===dt.Home)&&(k=dt.ArrowRight),(k===dt.PageDown||k===dt.End)&&(k=dt.ArrowLeft),O=N(k,O)):x=!0,C++}return O};if($===dt.Enter){n.preventDefault(),t.handleSelect(H,n),!m&&t.setPreSelection(H);return}else if($===dt.Escape){n.preventDefault(),t.setOpen(!1),t.inputOk()||(u=(l=t.props).onInputError)===null||u===void 0||u.call(l,{code:1,msg:lc});return}var L=null;switch($){case dt.ArrowLeft:case dt.ArrowRight:case dt.ArrowUp:case dt.ArrowDown:case dt.PageUp:case dt.PageDown:case dt.Home:case dt.End:L=z($,H);break}if(!L){(d=(i=t.props).onInputError)===null||d===void 0||d.call(i,{code:1,msg:lc});return}if(n.preventDefault(),t.setState({lastPreSelectChange:dc}),M&&t.setSelected(L),t.setPreSelection(L),D){var Y=Vr(H),B=Vr(L),T=Gt(H),E=Gt(L);Y!==B||T!==E?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(n){var s=n.key;s===dt.Escape&&(n.preventDefault(),t.sendFocusBackToInput())},t.onClearClick=function(n){n&&n.preventDefault&&n.preventDefault(),t.sendFocusBackToInput();var s=t.props,o=s.selectsRange,l=s.onChange;o?l==null||l([null,null],n):l==null||l(null,n),t.setState({inputValue:null})},t.clear=function(){t.onClearClick()},t.onScroll=function(n){typeof t.props.closeOnScroll=="boolean"&&t.props.closeOnScroll?(n.target===document||n.target===document.documentElement||n.target===document.body)&&t.setOpen(!1):typeof t.props.closeOnScroll=="function"&&t.props.closeOnScroll(n)&&t.setOpen(!1)},t.renderCalendar=function(){var n,s;return!t.props.inline&&!t.isCalendarOpen()?null:le.createElement(Hde,tr({showMonthYearDropdown:void 0,ref:function(o){t.calendar=o}},t.props,t.state,{setOpen:t.setOpen,dateFormat:(n=t.props.dateFormatCalendar)!==null&&n!==void 0?n:a.defaultProps.dateFormatCalendar,onSelect:t.handleSelect,onClickOutside:t.handleCalendarClickOutside,holidays:wde(t.modifyHolidays()),outsideClickIgnoreClass:pg,onDropdownFocus:t.handleDropdownFocus,onTimeChange:t.handleTimeChange,className:t.props.calendarClassName,container:t.props.calendarContainer,handleOnKeyDown:t.props.onKeyDown,handleOnDayKeyDown:t.onDayKeyDown,setPreSelection:t.setPreSelection,dropdownMode:(s=t.props.dropdownMode)!==null&&s!==void 0?s:a.defaultProps.dropdownMode}),t.props.children)},t.renderAriaLiveRegion=function(){var n=t.props,s=n.dateFormat,o=s===void 0?a.defaultProps.dateFormat:s,l=n.locale,u=t.props.showTimeInput||t.props.showTimeSelect,i=u?"PPPPp":"PPPP",d;return t.props.selectsRange?d="Selected start date: ".concat(Cn(t.props.startDate,{dateFormat:i,locale:l}),". ").concat(t.props.endDate?"End date: "+Cn(t.props.endDate,{dateFormat:i,locale:l}):""):t.props.showTimeSelectOnly?d="Selected time: ".concat(Cn(t.props.selected,{dateFormat:o,locale:l})):t.props.showYearPicker?d="Selected year: ".concat(Cn(t.props.selected,{dateFormat:"yyyy",locale:l})):t.props.showMonthYearPicker?d="Selected month: ".concat(Cn(t.props.selected,{dateFormat:"MMMM yyyy",locale:l})):t.props.showQuarterYearPicker?d="Selected quarter: ".concat(Cn(t.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):d="Selected date: ".concat(Cn(t.props.selected,{dateFormat:i,locale:l})),le.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},d)},t.renderDateInput=function(){var n,s,o,l=Fr(t.props.className,(n={},n[pg]=t.state.open,n)),u=t.props.customInput||le.createElement("input",{type:"text"}),i=t.props.customInputRef||"ref",d=t.props,h=d.dateFormat,c=h===void 0?a.defaultProps.dateFormat:h,f=d.locale,g=typeof t.props.value=="string"?t.props.value:typeof t.state.inputValue=="string"?t.state.inputValue:t.props.selectsRange?ade(t.props.startDate,t.props.endDate,{dateFormat:c,locale:f}):t.props.selectsMultiple?ide((o=t.props.selectedDates)!==null&&o!==void 0?o:[],{dateFormat:c,locale:f}):Cn(t.props.selected,{dateFormat:c,locale:f});return le.cloneElement(u,(s={},s[i]=function(p){t.input=p},s.value=g,s.onBlur=t.handleBlur,s.onChange=t.handleChange,s.onClick=t.onInputClick,s.onFocus=t.handleFocus,s.onKeyDown=t.onInputKeyDown,s.id=t.props.id,s.name=t.props.name,s.form=t.props.form,s.autoFocus=t.props.autoFocus,s.placeholder=t.props.placeholderText,s.disabled=t.props.disabled,s.autoComplete=t.props.autoComplete,s.className=Fr(u.props.className,l),s.title=t.props.title,s.readOnly=t.props.readOnly,s.required=t.props.required,s.tabIndex=t.props.tabIndex,s["aria-describedby"]=t.props.ariaDescribedBy,s["aria-invalid"]=t.props.ariaInvalid,s["aria-labelledby"]=t.props.ariaLabelledBy,s["aria-required"]=t.props.ariaRequired,s))},t.renderClearButton=function(){var n=t.props,s=n.isClearable,o=n.disabled,l=n.selected,u=n.startDate,i=n.endDate,d=n.clearButtonTitle,h=n.clearButtonClassName,c=h===void 0?"":h,f=n.ariaLabelClose,g=f===void 0?"Close":f,p=n.selectedDates;return s&&(l!=null||u!=null||i!=null||p!=null&&p.length)?le.createElement("button",{type:"button",className:Fr("react-datepicker__close-icon",c,{"react-datepicker__close-icon--disabled":o}),disabled:o,"aria-label":g,onClick:t.onClearClick,title:d,tabIndex:-1}):null},t.state=t.calcInitialState(),t.preventFocusTimeout=void 0,t}return Object.defineProperty(a,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:us,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},a.prototype.componentDidUpdate=function(e,t){var n,s,o,l;e.inline&&Gde(e.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:ig(this.props.highlightDates)}),!t.focused&&!Ti(e.selected,this.props.selected)&&this.setState({inputValue:null}),t.open!==this.state.open&&(t.open===!1&&this.state.open===!0&&((s=(n=this.props).onCalendarOpen)===null||s===void 0||s.call(n)),t.open===!0&&this.state.open===!1&&((l=(o=this.props).onCalendarClose)===null||l===void 0||l.call(o)))},a.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},a.prototype.renderInputContainer=function(){var e=this.props,t=e.showIcon,n=e.icon,s=e.calendarIconClassname,o=e.calendarIconClassName,l=e.toggleCalendarOnIconClick,u=this.state.open;return s&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),le.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&le.createElement(Bde,tr({icon:n,className:Fr(o,!o&&s,u&&"react-datepicker-ignore-onclickoutside")},l?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},a.prototype.render=function(){var e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?le.createElement(mg,{enableTabLoop:this.props.enableTabLoop},le.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=le.createElement(hg,tr({portalId:this.props.portalId},this.props),t)),le.createElement("div",null,this.renderInputContainer(),t)}return le.createElement(Ude,tr({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},a}(le.Component),Kde="input",dc="navigate";const Qde={[_a.GT]:">",[_a.LT]:"<",[_a.EQ]:"="},Zde=le.memo(({columnFilterValue:r,onChange:a,onInputKeyDown:e,propIsRequired:t,propName:n,propSchema:s,translate:o})=>{const{displayTimezone:l}=le.useContext(io),{type:u,format:i,minimum:d,maximum:h}=s||{},c=r,f=i==="date-time";switch(u){case"number":case"integer":const g=c||{},p=(b,M,D)=>{const $={...g,[b]:M.value===""?void 0:parseInt(M.value)},A=Object.values($).find(H=>isFinite(H));a(A!==void 0&&(d===void 0||A>=d)?$:void 0,D)};return Ye.jsxs("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:[t?null:Ye.jsxs("li",{style:{padding:8},children:[Ye.jsxs("label",{className:"d-flex",children:[Ye.jsx("input",{type:"checkbox",style:{marginRight:14},checked:!!g.filterEmpty,onChange:()=>{const{filterEmpty:b,...M}=g;b||(M.filterEmpty=!0),a(Object.keys(M).length?M:void 0,!0)}}),"Hide empty values"]}),Ye.jsx("hr",{})]}),Object.keys(_a).map(b=>{const M=g[b];return Ye.jsxs("li",{children:[Ye.jsx("label",{style:{width:40,paddingLeft:16},children:Qde[b]}),Ye.jsx("input",{className:"form-control",style:{width:120},type:"number",value:M!==void 0?M:"","data-prop-name":n,onChange:D=>{p(b,D.currentTarget,!1)},onBlur:D=>{p(b,D.currentTarget,!0)},onKeyDown:e,min:d,max:h})]},b)})]});case"boolean":const m=["✓","✕"];t||m.push("?");let v=c?"✓":"✕";return c===null&&(v="?"),c===void 0&&(v=""),Ye.jsx("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:Ye.jsx("li",{children:Ye.jsxs("select",{autoFocus:!0,className:"form-select",value:v,"data-prop-name":n,onChange:b=>{switch(b.currentTarget.value){case"✓":a(!0,!0);break;case"✕":a(!1,!0);break;case"?":a(null,!0);break;default:a(void 0,!0)}},children:[Ye.jsx("option",{value:"",children:"All"},"all"),m.map(b=>Ye.jsx("option",{value:b,children:b},`column-filter-select-${b}`))]})})});case"string":if(s!=null&&s.enum)return Ye.jsx("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:Ye.jsx("li",{children:Ye.jsxs("select",{autoFocus:!0,className:"form-select",value:c,"data-prop-name":n,onChange:b=>{a(b.currentTarget.value||void 0,!0)},children:[Ye.jsx("option",{value:"",children:"All"},"all"),s.enum.map(b=>Ye.jsx("option",{value:b,children:o(b)},`column-filter-select-${b}`))]})})});if(f||i==="date"){const b=f?rs:Hd,M=r||{from:void 0,to:void 0,filterEmpty:void 0};return Ye.jsxs("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:[t?null:Ye.jsxs("li",{style:{padding:8},children:[Ye.jsxs("label",{className:"d-flex",children:[Ye.jsx("input",{type:"checkbox",checked:!!M.filterEmpty,onChange:()=>{const{filterEmpty:D,...$}=M;D||($.filterEmpty=!0),a(Object.keys($).length?$:void 0,!0)}}),"Hide empty values"]}),Ye.jsx("hr",{})]}),Ye.jsxs("li",{style:{padding:8},children:[Ye.jsx("label",{style:{width:120,paddingLeft:4},children:"After"}),Ye.jsx(gg,{dateFormat:b,"data-prop-name":n,locale:lu,selected:M.from?eo.toZonedTime(M.from,l||_r.timeZone):null,onChange:D=>{if(!D&&!M.to){a(void 0,!0);return}if(M.to&&D&&D>M.to)return;const $=D?eo.fromZonedTime(D,l||_r.timeZone):void 0;a({...r,from:$},!0)},placeholderText:b,isClearable:!0,selectsStart:!0,showTimeSelect:f,showTimeInput:f,showMonthDropdown:!0,showYearDropdown:!0,timeIntervals:15,shouldCloseOnSelect:!f})]}),Ye.jsxs("li",{style:{padding:8},children:[Ye.jsx("label",{style:{width:120,paddingLeft:4},children:"Before"}),Ye.jsx(gg,{id:"filter-date",dateFormat:b,"data-prop-name":n,locale:lu,selectsEnd:!0,selected:M.to?eo.toZonedTime(M.to,l||_r.timeZone):null,showMonthDropdown:!0,showYearDropdown:!0,onChange:D=>{if(!D&&!M.from){a(void 0,!0);return}const $=D?f?eo.fromZonedTime(D,l||_r.timeZone):qi(D):void 0;M.from&&$&&$<M.from||a({...r,to:$},!0)},placeholderText:b,isClearable:!0,startDate:M.from,endDate:M.to,showTimeInput:f,showTimeSelect:f,timeIntervals:15,shouldCloseOnSelect:!f})]})]})}default:return Ye.jsx("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:Ye.jsx("li",{children:Ye.jsx("input",{autoFocus:!0,type:"search",className:"form-control",placeholder:`Search ${n}`,"aria-label":`Search ${n}`,value:c||"","data-prop-name":n,onChange:b=>{a(b.currentTarget.value||void 0,!1)},onKeyDown:e,onBlur:b=>{a(b.currentTarget.value||void 0,!0)}})})})}}),Jde=({isSortable:r,isFilterable:a,onChange:e,onClose:t,onInputKeyDown:n,propConfig:s,propIsRequired:o,propName:l,propSchema:u,referenceElement:i,setFilterSortColumn:d,translate:h,value:c})=>{const f=ec({placement:"bottom-start",elements:{reference:i},middleware:[tc()]}),g=ec({placement:"right-start",middleware:[tc()]});le.useEffect(()=>{const M=D=>{if(!f.elements.floating)return;let $=D.target;for(;$&&f.elements.floating;){if($===f.elements.floating||$===g.elements.floating)return;$=$.parentNode===window.document?null:$.parentNode}t(D)};return window.addEventListener("click",M,{capture:!0}),()=>{window.removeEventListener("click",M,{capture:!0})}},[f.elements.floating,t,g.elements.floating]);const p=(s==null?void 0:s.FilterMenu)||Zde,m=le.useCallback(M=>{d(l,!0),t(M)},[t,l,d]),v=le.useCallback(M=>{d(l,!1),t(M)},[t,l,d]),b=le.useCallback(()=>{e(void 0,!0)},[e]);return!r&&!a?null:Ye.jsxs(Ye.Fragment,{children:[Ye.jsx("div",{className:"mig-schema-table mig-schema-table__th-menu",ref:f.refs.setFloating,style:f.floatingStyles,children:Ye.jsxs("ol",{className:"mig-schema-table-menu",children:[r?Ye.jsxs("li",{onClick:m,style:{padding:8},children:[Ye.jsx("span",{className:"mig-schema-table__th-menu__icon",children:"↓"})," ",h("sortAscending")]}):null,r?Ye.jsxs("li",{onClick:v,style:{padding:8},children:[Ye.jsx("span",{className:"mig-schema-table__th-menu__icon",children:"↑"})," ",h("sortDescending")]}):null,a?Ye.jsxs("li",{style:{padding:8},onMouseOver:M=>{g.refs.setReference(M.currentTarget)},children:[Ye.jsx("span",{className:"mig-schema-table__th-menu__icon",children:Ye.jsx("input",{type:"checkbox",id:"mig-schema-table__th-menu__filters",checked:c!==void 0,disabled:c===void 0,onChange:b})}),Ye.jsx("label",{htmlFor:"mig-schema-table__th-menu__filters",children:h("filters")}),Ye.jsx("div",{className:"mig-schema-table__th-menu__sub-menu-indicator"})]}):null]})}),g.elements.reference?Ye.jsx("div",{className:"mig-schema-table mig-schema-table__th-menu__sub-menu",ref:g.refs.setFloating,style:g.floatingStyles,children:Ye.jsx(p,{columnFilterValue:c,onChange:e,onInputKeyDown:n,propIsRequired:o,propName:l,propSchema:u,translate:h})}):null]})},ece=le.memo(Jde),tce=({columnWidths:r,resizeColumnIndex:a,setResizeColumnIndex:e,tableBodyHeight:t})=>{const[n,s]=le.useState(0),o=_p(),l=le.useCallback(h=>{const c=r.map((f,g)=>g===a?Math.max(f+h,Bd):f);o(c)},[r,a,o]);let u=0;const i=le.useCallback(h=>{e(parseInt(h.currentTarget.dataset.columnIndex)),s(h.clientX)},[e]),d=le.useCallback(h=>{l(h.clientX-n),s(0),e(-1)},[n,l,e]);return Ye.jsx("div",{children:[...r].map((h,c)=>{u+=h;const f=["mig-schema-table__column_resizer"];return c===a&&f.push("mig-schema-table__column_resizer--dragged"),Ye.jsx("div",{style:{left:u-vp,bottom:t},className:f.join(" "),draggable:"true","data-column-index":c,onDragStart:i,onDragEnd:d},c)})})};function bg(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r}function rce(r){var a=r.lastRenderedStartIndex,e=r.lastRenderedStopIndex,t=r.startIndex,n=r.stopIndex;return!(t>e||n<a)}function nce(r){for(var a=r.isItemLoaded,e=r.itemCount,t=r.minimumBatchSize,n=r.startIndex,s=r.stopIndex,o=[],l=null,u=null,i=n;i<=s;i++){var d=a(i);d?u!==null&&(o.push(l,u),l=u=null):(u=i,l===null&&(l=i))}if(u!==null){for(var h=Math.min(Math.max(u,l+t-1),e-1),c=u+1;c<=h&&!a(c);c++)u=c;o.push(l,u)}if(o.length)for(;o[1]-o[0]+1<t&&o[0]>0;){var f=o[0]-1;if(!a(f))o[0]=f;else break}return o}var ace=function(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")},ice=function(){function r(a,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(a,n.key,n)}}return function(a,e,t){return e&&r(a.prototype,e),t&&r(a,t),a}}(),oce=function(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);r.prototype=Object.create(a&&a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a)},vg=function(r,a){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:r},sce=function(r){oce(a,r);function a(){var e,t,n,s;ace(this,a);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return s=(t=(n=vg(this,(e=a.__proto__||Object.getPrototypeOf(a)).call.apply(e,[this].concat(l))),n),n._lastRenderedStartIndex=-1,n._lastRenderedStopIndex=-1,n._memoizedUnloadedRanges=[],n._onItemsRendered=function(i){var d=i.visibleStartIndex,h=i.visibleStopIndex;process.env.NODE_ENV!=="production"&&((!bg(d)||!bg(h))&&console.warn("Invalid onItemsRendered signature; please refer to InfiniteLoader documentation."),typeof n.props.loadMoreRows=="function"&&console.warn('InfiniteLoader "loadMoreRows" prop has been renamed to "loadMoreItems".')),n._lastRenderedStartIndex=d,n._lastRenderedStopIndex=h,n._ensureRowsLoaded(d,h)},n._setRef=function(i){n._listRef=i},t),vg(n,s)}return ice(a,[{key:"resetloadMoreItemsCache",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],t&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){process.env.NODE_ENV!=="production"&&this._listRef==null&&console.warn("Invalid list ref; please refer to InfiniteLoader documentation.")}},{key:"render",value:function(){var t=this.props.children;return t({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(t,n){var s=this.props,o=s.isItemLoaded,l=s.itemCount,u=s.minimumBatchSize,i=u===void 0?10:u,d=s.threshold,h=d===void 0?15:d,c=nce({isItemLoaded:o,itemCount:l,minimumBatchSize:i,startIndex:Math.max(0,t-h),stopIndex:Math.min(l-1,n+h)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some(function(f,g){return c[g]!==f}))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(t){for(var n=this,s=this.props.loadMoreItems||this.props.loadMoreRows,o=function(i){var d=t[i],h=t[i+1],c=s(d,h);c!=null&&c.then(function(){if(rce({lastRenderedStartIndex:n._lastRenderedStartIndex,lastRenderedStopIndex:n._lastRenderedStopIndex,startIndex:d,stopIndex:h})){if(n._listRef==null)return;typeof n._listRef.resetAfterIndex=="function"?n._listRef.resetAfterIndex(d,!0):(typeof n._listRef._getItemStyleCache=="function"&&n._listRef._getItemStyleCache(-1),n._listRef.forceUpdate())}})},l=0;l<t.length;l+=2)o(l)}}]),a}(le.PureComponent);const yg=r=>{const[a,e]=le.useState({width:0,height:0}),t=le.useMemo(()=>wa.debounce(e,100),[]);return le.useEffect(()=>{if(!r)return;const n=new ResizeObserver(s=>{for(const o of s){const{blockSize:l,inlineSize:u}=o.borderBoxSize[0];u&&l&&t({width:u,height:l})}});return n.observe(r),()=>{n.disconnect()}},[t,r]),a},wg=new Date("1000-01-01 00:00:00Z"),uce=new Intl.NumberFormat("nl-NL"),lce=new Intl.NumberFormat("nl-NL",{style:"currency",currency:"EUR"});function dce(r,a){const{TdBody:e,sortByValue:t}=a||{};if(t!==void 0)return t;if(!r)return!1;const{format:n,type:s}=r;return(n==null?void 0:n.startsWith("date"))||s==="boolean"||s==="integer"||s==="number"||!!e}const cce=({CustomElement:r,CustomSearchInput:a,Heading:e=Ub,autoRender:t,checkedIndexes:n,config:s,customElementProps:o,data:l,defaultColumnFilters:u,defaultSortAsc:i=!1,defaultSortColumn:d,disabledCheckedIndexes:h,displayTimezone:c,enableAutoFocus:f=!0,enableRowCounter:g=!0,getRowClassName:p,getRowSelected:m,getSearchQueryFilterResult:v,infiniteLoaderRef:b,isColumnFilterable:M=!0,isExportable:D=!0,isResizable:$=!0,isSearchable:A=!0,isSortable:H=!0,itemCount:N,loadMoreItems:z,maxHeight:L,onRowClick:Y,onRowDoubleClick:B,onSearchEnter:T,onTableDataStateChange:E,rowHeight:P=36,schema:w,searchPlaceholder:_,setCheckedIndexes:k,settingsStorageKey:x,style:C,translate:O=pp,useFilterStateHash:R,variableSizeGridRef:X,width:q})=>{var nt;const[te,F]=le.useState(),[G,j]=le.useState(),[W,V]=le.useState(-1),[Q,ie]=le.useState(-1),[ee,ne]=le.useState(),[be,ve]=le.useState(),re=l instanceof Function,[ce,fe]=le.useState(re?void 0:l),[_e,we]=le.useState(),[me,De]=le.useState({searchQuery:"",columnFilterMap:u||{},sortColumn:d,sortAsc:i}),[Se,Ie]=le.useState(R?_r.parseLocationHash(window.location.hash):null);le.useEffect(()=>{re||fe(l)},[l,re]),le.useEffect(()=>{!re||ce!==void 0||l(Se&&Object.keys(Se).length!==0?{...Se,columnFilterMap:Se.columnFilterMap||{}}:me).then(fe)},[l,re,Se,ce,me]),le.useEffect(()=>{_e||we(me)},[me,_e]),le.useEffect(()=>{if(!R)return;const Re=()=>{Ie(_r.parseLocationHash(window.location.hash))};return window.addEventListener("hashchange",Re),()=>{window.removeEventListener("hashchange",Re)}},[R]),le.useEffect(()=>{if(!R)return;const{columnFilterMap:Re,searchQuery:Be,sortAsc:Ke,sortColumn:qe}=Se||{},ct={searchQuery:Be||"",columnFilterMap:Re||u||{},sortAsc:Ke===void 0?i:Ke,sortColumn:qe===void 0?d:qe};De(oe=>wa.isEqual(ct,oe)?oe:ct)},[Se,R,u,i,d]),le.useEffect(()=>{E&&E(me)},[E,me]);const Je=le.useRef(null),Ge=le.useRef(null),Xe=yg(Je.current),gt=yg(Ge.current),ft=le.useMemo(()=>q||Math.floor(Xe.width||0),[Xe.width,q]),ht=le.useMemo(()=>!wa.isEqual(me,_e)&&re,[me,_e,re]),{properties:lt,required:tt}=le.useMemo(()=>({properties:{},required:[],...w}),[w]),Ve=x?localStorage.getItem(`${x}.columnNames`):null,rt=x?localStorage.getItem(`${x}.columnWidths`):null,it=le.useMemo(()=>{if(te)return te;const Re=Ve?JSON.parse(Ve):void 0;let Be=Object.keys(lt);if(k&&Be.unshift(vn),s){Object.keys(s).forEach(qe=>{Be.includes(qe)||Be.push(qe)});const Ke=Object.entries(s).reduce((qe,[ct,oe])=>(oe.hidden&&qe.push(ct),qe),[]);Be=Be.filter(qe=>!Ke.includes(qe)).sort((qe,ct)=>{let oe=s[qe]?s[qe].order:void 0;oe===void 0&&(oe=Object.keys(lt).findIndex($e=>$e===qe));let pe=s[ct]?s[ct].order:void 0;return pe===void 0&&(pe=Object.keys(lt).findIndex($e=>$e===ct)),ct===vn||qe===vn?0:oe===-1?1:pe===-1?-1:oe-pe})}return(Re==null?void 0:Re.length)===Be.length?Re:Be},[s,te,k,lt,Ve]),st=le.useMemo(()=>ce&&it?ce.map((Re,Be)=>it.reduce((Ke,qe)=>{var $e;const ct=lt[qe],oe=s?s[qe]:void 0;if(oe!=null&&oe.renderData)return Ke[qe]=oe.renderData(Re,Be),Ke;if(!ct||qe===vn)return Ke[qe]="",Ke;const pe=Re?Re[qe]:"";switch(ct.type){case"array":return Ke[qe]=(($e=ct.items)==null?void 0:$e.type)==="string"&&pe?pe.map(Oe=>O(Oe)).join(", "):JSON.stringify(pe),Ke;case"boolean":return Ke[qe]=pe===void 0?"?":pe?"✓":"✕",Ke;case"number":case"integer":return pe===void 0?(Ke[qe]="",Ke):(Ke[qe]=ct.format==="currency"?lce.format(pe):uce.format(pe),Ke);case"string":if(ct.format==="date"&&pe)return Ke[qe]=["2999-12-31","1970-01-01"].includes(pe)?"-":_d(new Date(pe),(oe==null?void 0:oe.dateFormat)||Hd),Ke;if(ct.format==="date-time"&&pe)return Ke[qe]=c?_r.localeFormatInTimeZone(new Date(pe),c,rs):_d(new Date(pe),(oe==null?void 0:oe.dateFormat)||rs),Ke;if(ct.enum)return Ke[qe]=pe?O(pe):"",Ke;default:return Ke[qe]=pe?`${pe}`:"",Ke}},{_index:Be})):void 0,[ce,it,lt,s,O,c]),$t=it?it.length:0,{dynamicWidthColumnCount:Xt,fixedWidthColumnsWidth:mt}=le.useMemo(()=>{let Re=0,Be=0;return(it||[]).forEach(Ke=>{if(Ke===vn){Re+=gp;return}const qe=s?s[Ke]:void 0;qe!=null&&qe.width?Re+=qe.width:Be+=1},0),{dynamicWidthColumnCount:Be,fixedWidthColumnsWidth:Re}},[it,s]),Dt=le.useMemo(()=>{if(G)return new Uint16Array(G);const Re=rt?new Uint16Array(JSON.parse(rt)):void 0,Be=Math.max(Math.floor((ft-mt)/Xt),Bd);let Ke=(ft-mt)%Xt;const qe=new Uint16Array(it.map(ct=>{if(ct===vn)return gp;const oe=s?s[ct]:void 0;return oe!=null&&oe.width?oe==null?void 0:oe.width:Ke?(Ke-=1,Be+1):Be}));return(Re==null?void 0:Re.length)===qe.length?Re:qe},[it,s,G,Xt,mt,rt,ft]),Et=le.useCallback(Re=>Dt?Dt[Re]:1,[Dt]),_t=le.useMemo(()=>{if(!st||!M&&!A||re)return st;const{searchQuery:Re}=me,Be=Re.toLowerCase()||"",Ke=qe=>ce&&v?v(ce[qe._index],Re):!(it&&!it.find(ct=>`${qe[ct]}`.toLowerCase().includes(Be)));return st.filter(qe=>{let ct=Ke(qe);return!ct||!me.columnFilterMap?!1:(Object.entries(me.columnFilterMap).forEach(([oe,pe])=>{var ze;if(!ct||pe===void 0)return;const $e=s?s[oe]:void 0;if(ce&&($e!=null&&$e.filter)){ct=$e.filter(ce[qe._index],pe);return}const Oe=lt[oe],at=(ze=ce[qe._index])==null?void 0:ze[oe];switch(Oe==null?void 0:Oe.type){case"boolean":case"number":case"integer":if(pe&&typeof pe=="object"){pe.filterEmpty&&at===void 0&&(ct=!1);for(const Le of Object.keys(_a)){const Nt=pe[Le];if(ct&&wa.isFinite(Nt))switch(Le){case _a.EQ:at!==Nt&&(ct=!1);break;case _a.GT:at<=Nt&&(ct=!1);break;case _a.LT:at>=Nt&&(ct=!1);break}}}else{if(at===void 0&&pe===null)return!0;ct=at===pe}break;case"string":if(typeof pe=="object"&&(Oe.format==="date"||Oe.format==="date-time")){const{from:Le,to:Nt,filterEmpty:At}=pe;if(!at)ct=!At;else{const It=at?new Date(at):void 0;(At===!1||Le&&(!It||It<Le)||Nt&&(!It||It>Nt))&&(ct=!1)}return}default:if(Oe!=null&&Oe.enum){ct=at===pe;return}ct=`${qe[oe]}`.toLowerCase().includes(`${pe}`.toLowerCase())}}),ct)})},[st,M,A,re,me,v,it,s,ce,lt]),Tt=le.useMemo(()=>{var $e;const{sortAsc:Re,sortColumn:Be}=me;if(!Be||!_t||!ce||re)return _t;const Ke=lt[Be],qe=s?s[Be]:void 0,ct=qe==null?void 0:qe.sort;if(ct)return _t.sort((Oe,at)=>{const ze=ce[Oe._index],Le=ce[at._index];return ze?Le?ct(ze,Le,Re===void 0?i:Re):-1:1});const oe=Ke&&(($e=Ke.format)==null?void 0:$e.startsWith("date")),pe=dce(Ke,qe);return _t.sort((Oe,at)=>{let ze=pe&&ce[Oe._index]?ce[Oe._index][Be]:`${Oe[Be]}`.toLowerCase(),Le=pe&&ce[at._index]?ce[at._index][Be]:`${at[Be]}`.toLowerCase();return pe&&oe&&(ze=new Date(ze),isNaN(ze.getTime())&&(ze=wg),Le=new Date(Le),isNaN(Le.getTime())&&(Le=wg)),ze===Le?0:ze?Le?(ze<Le?1:-1)*(Re?-1:1):Re?1:-1:Re?-1:1})},[s,i,_t,re,lt,ce,me]),Bt=le.useCallback(Re=>{const Be={...me.columnFilterMap};delete Be[Re],De({...me,columnFilterMap:Be})},[me]),vt=le.useCallback((Re,Be)=>{if(R){window.location.hash=_r.serializeLocationHash({...Se,sortColumn:Re,sortAsc:Be});return}De({...me,sortColumn:Re,sortAsc:Be})},[me,Se,R]),Lt=le.useCallback(Re=>{De({...me,searchQuery:Re.currentTarget.value})},[me]),Vt=le.useCallback(()=>{we(me),fe(void 0)},[me]);le.useEffect(()=>{if(!t||!Se||!_e||!R)return;const Re=Object.keys(Se);let Be=!1;for(const Ke of Re){const qe=Se[Ke],ct=_e[Ke];if(typeof qe=="string"&&qe!==ct){Be=!0;break}if(typeof qe=="object"&&!wa.isEqual(qe,ct)){Be=!0;break}}Be&&Vt()},[t,Se,_e,Vt,R]);const kt=le.useCallback(Re=>{Re.key==="Enter"&&(ne(void 0),ht&&Vt(),T&&Re.currentTarget.className==="mig-schema-table__search"&&T(me.searchQuery||""))},[ht,me.searchQuery,T,Vt]),qt=le.useCallback(()=>P,[P]),Ot=le.useMemo(()=>wa.sum(Dt),[Dt]),xt=le.useMemo(()=>Tt?Tt.length:0,[Tt]),ge=le.useMemo(()=>{const Re=P*xt;let Be;L&&(Be=L==="100%"?Xe.height:L);const Ke=Be?Be-gt.height-bp:0;return Ke&&Ke<Re?Ke:Re},[P,xt,L,gt,Xe.height]),Pe=le.useCallback(Re=>{ne(void 0),Re.preventDefault(),Re.stopPropagation()},[]),Ee=le.useCallback((Re,Be)=>{if(!ee)return;if(R&&Be!==!1){window.location.hash=_r.serializeLocationHash({...Se,columnFilterMap:{...me.columnFilterMap,[ee.propName]:Re}});return}if(Re===void 0){Bt(ee.propName);return}const Ke={...me.columnFilterMap,[ee.propName]:Re};De({...me,columnFilterMap:Ke})},[Bt,me,Se,ee,R]),Qe=le.useCallback(()=>{const Re={searchQuery:"",columnFilterMap:{},sortColumn:d,sortAsc:i};R&&(window.location.hash=_r.serializeLocationHash(Re)),we(Re),De(Re)},[R,i,d]),de=le.useCallback(()=>{const Re=(Se==null?void 0:Se.searchQuery)||"";R&&(me.searchQuery||Re)&&me.searchQuery!==Re&&(window.location.hash=_r.serializeLocationHash({...Se,searchQuery:me.searchQuery}))},[Se,me.searchQuery,R]),xe=le.useCallback(async Re=>{if(Re.preventDefault(),Re.stopPropagation(),!Tt)return;const{renderDataToExcel:Be}=await Promise.resolve().then(()=>gce);Be(Tt)},[Tt]),je=le.useCallback(()=>{x&&(localStorage.removeItem(`${x}.columnNames`),localStorage.removeItem(`${x}.columnWidths`),F(void 0),j(void 0))},[x]),Fe=le.useCallback(Re=>!Tt||!ce||!z||!N?!0:ce[Tt[Re]._index]!==void 0,[N,z,Tt,ce]),Ue=le.useMemo(()=>!(ce&&!ht)&&!z?Ye.jsx("div",{style:{width:Ot,height:Math.max(50,ge),border:"1px solid #BBB",textAlign:"center",display:"flex",backgroundColor:"#CCC",alignItems:"center",justifyContent:"center"},children:ht?Ye.jsx("button",{onClick:Vt,className:"btn border",children:"Refresh data"}):Ye.jsx("div",{children:"⌛ Loading..."})}):z&&N?Ye.jsx(sce,{ref:b,isItemLoaded:Fe,itemCount:N,loadMoreItems:z,children:({onItemsRendered:Be,ref:Ke})=>Ye.jsx(Wf,{className:"mig-schema-table__tbody",estimatedRowHeight:P,height:ge,width:Ot,columnWidth:Et,rowHeight:qt,columnCount:$t,rowCount:xt,ref:Ke,onItemsRendered:({overscanRowStartIndex:qe,overscanRowStopIndex:ct,visibleRowStartIndex:oe,visibleRowStopIndex:pe})=>Be({overscanStartIndex:qe,overscanStopIndex:ct,visibleStartIndex:oe,visibleStopIndex:pe}),children:yp},`tbody_${ge}_${Ot}_${me.sortColumn}_${me.sortAsc}_${me.searchQuery}_${$t}_${Dt.join(" ")}`)}):Ye.jsx(Wf,{className:"mig-schema-table__tbody",estimatedRowHeight:P,height:ge,width:Ot,columnWidth:Et,rowHeight:qt,columnCount:$t,rowCount:xt,ref:X,children:yp},`tbody_${ge}_${Ot}_${me.sortColumn}_${me.sortAsc}_${me.searchQuery}_${$t}_${Dt.join(" ")}`),[$t,Dt,Et,qt,b,ht,Fe,N,z,Vt,xt,P,Ot,me.searchQuery,me.sortAsc,me.sortColumn,ce,ge,X]),ot=le.useMemo(()=>({...C,width:q?Math.min(Ot,ft):void 0,height:"100%",maxHeight:L==="100%"?"100%":void 0}),[L,Ot,C,ft,q]),Ze=a||"input";return Ye.jsx(io.Provider,{value:{checkedIndexes:n,columnNames:it,columnWidths:Dt,config:s,disabledCheckedIndexes:h,displayTimezone:c,dropTargetIndex:Q,getRowClassName:p,getRowSelected:m,isColumnFilterable:M,isItemLoaded:Fe,isSortable:H,lastCheckChangedRowIndex:be,onRowClick:Y,onRowDoubleClick:B,properties:lt,required:tt,setCheckedIndexes:k,setCustomColumnNames:F,setCustomColumnWidths:j,setDropTargetIndex:ie,setFilterSortColumn:vt,setLastCheckChangedRowIndex:ve,setMenuConfig:ne,settingsStorageKey:x,sortedRenderData:Tt,sourceData:ce,tableDataState:me,translate:O||pp},children:Ye.jsxs("div",{className:`mig-schema-table${Y?" mig-schema-table--clickable-rows":""}`,ref:Je,style:ot,role:"table",children:[Ye.jsxs("div",{className:"mig-schema-table__action-container",ref:Ge,children:[Ye.jsx("div",{children:A?Ye.jsx(Ze,{className:"mig-schema-table__search",type:"search",name:"search",autoComplete:"off",placeholder:_||O("search..."),value:me.searchQuery,onChange:Lt,onKeyDown:kt,autoFocus:f,onBlur:de}):null}),r?Ye.jsx(r,{...o,renderData:Tt}):Ye.jsx("div",{className:"mig-schema-table__custom_element_placeholder"}),g&&Array.isArray(l)?Ye.jsx("span",{className:"mig-schema-table__row_counter",children:O("showingFilteredCountOfTotalCount",(Tt==null?void 0:Tt.length)||0,l.length)}):null,D?Ye.jsx("button",{onClick:xe,style:{marginLeft:8},disabled:!(Tt!=null&&Tt.length),children:O("exportData")}):null,A||M?Ye.jsx("button",{onClick:Qe,style:{marginLeft:8},disabled:me.columnFilterMap&&me.searchQuery?Object.keys(me.columnFilterMap).length+me.searchQuery.length===0:!1,children:O("clearFilters")}):null,x?Ye.jsx("button",{onClick:je,style:{marginLeft:8},disabled:!Ve&&!rt,children:O("clearSettings")}):null]}),Ye.jsxs("div",{className:"mig-schema-table__column_resize_container",children:[Ye.jsx(e,{height:bp,itemCount:$t,itemSize:Et,layout:"horizontal",width:Ot,sortAsc:me.sortAsc,setFilterSortColumn:vt,sortColumn:me.sortColumn,sortedRenderData:Tt,className:"mig-schema-table__th-row",children:kp},`thead_${Ot}_${me.sortColumn}_${me.sortAsc}_${me.searchQuery}_${Dt.join(" ")}`),Ue,$?Ye.jsx(tce,{columnWidths:Dt,resizeColumnIndex:W,setResizeColumnIndex:V,tableBodyHeight:ge}):null]}),ce?ce.length>0?Ye.jsx(Ye.Fragment,{children:Na.createPortal(ee?Ye.jsx(ece,{isFilterable:M&&((nt=ee.propConfig)==null?void 0:nt.isFilterable)!==!1,isSortable:wp(!!H,w.properties[ee.propName],ee.propConfig),onChange:Ee,onClose:Pe,onInputKeyDown:kt,propConfig:ee.propConfig,propIsRequired:ee.propIsRequired,propName:ee.propName,propSchema:w.properties[ee.propName],referenceElement:ee.referenceElement,setFilterSortColumn:vt,translate:O,value:me.columnFilterMap?me.columnFilterMap[ee.propName]:null}):null,document.body)}):Ye.jsx("div",{className:"mig-schema-table__no_data",children:"No data found"}):null]})})},fce=le.memo(cce),hce=le.memo(({refresh:r,period:a=60})=>{const[e,t]=le.useState(new Date),[n,s]=le.useState(new Date),o=le.useCallback(()=>{s(new Date),r()},[r]),l=le.useMemo(()=>gi(e,n),[e,n]);le.useEffect(()=>{l>a&&o()},[l,e,n,a,o]),le.useEffect(()=>{const d=setInterval(()=>{t(new Date)},1e3);return()=>{clearInterval(d)}},[]);const u=a-l;return Ye.jsxs("div",{className:"mx-auto",title:`Refresh ${u>0?`in ${u} seconds`:"NOW"}`,children:["Last update ",_d(n,"HH:mm")]})});function Bu(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _g={exports:{}};/*! ExcelJS 19-10-2023 */(function(r,a){(function(e){r.exports=e()})(function(){return function e(t,n,s){function o(i,d){if(!n[i]){if(!t[i]){var h=typeof Bu=="function"&&Bu;if(!d&&h)return h(i,!0);if(l)return l(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[i]={exports:{}};t[i][0].call(f.exports,function(g){return o(t[i][1][g]||g)},f,f.exports,e,t,n,s)}return n[i].exports}for(var l=typeof Bu=="function"&&Bu,u=0;u<s.length;u++)o(s[u]);return o}({1:[function(e,t,n){const s=e("fs"),o=e("fast-csv"),l=e("dayjs/plugin/customParseFormat"),u=e("dayjs/plugin/utc"),i=e("dayjs").extend(l).extend(u),d=e("../utils/stream-buf"),{fs:{exists:h}}=e("../utils/utils"),c={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};t.exports=class{constructor(f){this.workbook=f,this.worksheet=null}async readFile(f,g){if(g=g||{},!await h(f))throw new Error("File not found: "+f);const p=s.createReadStream(f),m=await this.read(p,g);return p.close(),m}read(f,g){return g=g||{},new Promise((p,m)=>{const v=this.workbook.addWorksheet(g.sheetName),b=g.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],M=g.map||function($){if($==="")return null;const A=Number($);if(!Number.isNaN(A)&&A!==1/0)return A;const H=b.reduce((z,L)=>{if(z)return z;const Y=i($,L,!0);return Y.isValid()?Y:null},null);if(H)return new Date(H.valueOf());const N=c[$];return N!==void 0?N:$},D=o.parse(g.parserOptions).on("data",$=>{v.addRow($.map(M))}).on("end",()=>{D.emit("worksheet",v)});D.on("worksheet",p).on("error",m),f.pipe(D)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(f,g){return new Promise((p,m)=>{g=g||{};const v=this.workbook.getWorksheet(g.sheetName||g.sheetId),b=o.format(g.formatterOptions);f.on("finish",()=>{p()}),b.on("error",m),b.pipe(f);const{dateFormat:M,dateUTC:D}=g,$=g.map||(N=>{if(N){if(N.text||N.hyperlink)return N.hyperlink||N.text||"";if(N.formula||N.result)return N.result||"";if(N instanceof Date)return M?D?i.utc(N).format(M):i(N).format(M):D?i.utc(N).format():i(N).format();if(N.error)return N.error;if(typeof N=="object")return JSON.stringify(N)}return N}),A=g.includeEmptyRows===void 0||g.includeEmptyRows;let H=1;v&&v.eachRow((N,z)=>{if(A)for(;H++<z-1;)b.write([]);const{values:L}=N;L.shift(),b.write(L.map($)),H=z}),b.end()})}writeFile(f,g){const p={encoding:(g=g||{}).encoding||"utf8"},m=s.createWriteStream(f,p);return this.write(m,g)}async writeBuffer(f){const g=new d;return await this.write(g,f),g.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(e,t,n){const s=e("../utils/col-cache");class o{constructor(u,i){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=u,i)if(typeof i=="string"){const h=s.decodeAddress(i);this.nativeCol=h.col+d,this.nativeColOff=0,this.nativeRow=h.row+d,this.nativeRowOff=0}else i.nativeCol!==void 0?(this.nativeCol=i.nativeCol||0,this.nativeColOff=i.nativeColOff||0,this.nativeRow=i.nativeRow||0,this.nativeRowOff=i.nativeRowOff||0):i.col!==void 0?(this.col=i.col+d,this.row=i.row+d):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(u){return u instanceof o||u==null?u:new o(u)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(u){this.nativeCol=Math.floor(u),this.nativeColOff=Math.floor((u-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(u){this.nativeRow=Math.floor(u),this.nativeRowOff=Math.floor((u-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(u){this.nativeCol=u.nativeCol,this.nativeColOff=u.nativeColOff,this.nativeRow=u.nativeRow,this.nativeRowOff=u.nativeRowOff}}t.exports=o},{"../utils/col-cache":19}],3:[function(e,t,n){const s=e("../utils/col-cache"),o=e("../utils/under-dash"),l=e("./enums"),{slideFormula:u}=e("../utils/shared-formula"),i=e("./note");class d{constructor(f,g,p){if(!f||!g)throw new Error("A Cell needs a Row");this._row=f,this._column=g,s.validateAddress(p),this._address=p,this._value=h.create(d.Types.Null,this),this.style=this._mergeStyle(f.style,g.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(f){this.style.numFmt=f}get font(){return this.style.font}set font(f){this.style.font=f}get alignment(){return this.style.alignment}set alignment(f){this.style.alignment=f}get border(){return this.style.border}set border(f){this.style.border=f}get fill(){return this.style.fill}set fill(f){this.style.fill=f}get protection(){return this.style.protection}set protection(f){this.style.protection=f}_mergeStyle(f,g,p){const m=f&&f.numFmt||g&&g.numFmt;m&&(p.numFmt=m);const v=f&&f.font||g&&g.font;v&&(p.font=v);const b=f&&f.alignment||g&&g.alignment;b&&(p.alignment=b);const M=f&&f.border||g&&g.border;M&&(p.border=M);const D=f&&f.fill||g&&g.fill;D&&(p.fill=D);const $=f&&f.protection||g&&g.protection;return $&&(p.protection=$),p}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===d.Types.Merge}merge(f,g){this._value.release(),this._value=h.create(d.Types.Merge,this,f),g||(this.style=f.style)}unmerge(){this.type===d.Types.Merge&&(this._value.release(),this._value=h.create(d.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(f){return this._value.type===d.Types.Merge&&this._value.isMergedTo(f)}get master(){return this.type===d.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===d.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(f){this.type!==d.Types.Merge?(this._value.release(),this._value=h.create(h.getType(f),this,f)):this._value.master.value=f}get note(){return this._comment&&this._comment.note}set note(f){this._comment=new i(f)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(f){this.type===d.Types.String&&(this._value=h.create(d.Types.Hyperlink,this,{text:this._value.value,hyperlink:f}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:f}=this._row;return{sheetName:f.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(f){this.names=[f]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(f){const{definedNames:g}=this.workbook;g.removeAllNames(this.fullAddress),f.forEach(p=>{g.addEx(this.fullAddress,p)})}addName(f){this.workbook.definedNames.addEx(this.fullAddress,f)}removeName(f){this.workbook.definedNames.removeEx(this.fullAddress,f)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(f){this._dataValidations.add(this.address,f)}get model(){const{model:f}=this._value;return f.style=this.style,this._comment&&(f.comment=this._comment.model),f}set model(f){if(this._value.release(),this._value=h.create(f.type,this),this._value.model=f,f.comment)switch(f.comment.type){case"note":this._comment=i.fromModel(f.comment)}f.style?this.style=f.style:this.style={}}}d.Types=l.ValueType;const h={getType:c=>c==null?d.Types.Null:c instanceof String||typeof c=="string"?d.Types.String:typeof c=="number"?d.Types.Number:typeof c=="boolean"?d.Types.Boolean:c instanceof Date?d.Types.Date:c.text&&c.hyperlink?d.Types.Hyperlink:c.formula||c.sharedFormula?d.Types.Formula:c.richText?d.Types.RichText:c.sharedString?d.Types.SharedString:c.error?d.Types.Error:d.Types.JSON,types:[{t:d.Types.Null,f:class{constructor(c){this.model={address:c.address,type:d.Types.Null}}get value(){return null}set value(c){}get type(){return d.Types.Null}get effectiveType(){return d.Types.Null}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return""}release(){}toString(){return""}}},{t:d.Types.Number,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Number,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.Number}get effectiveType(){return d.Types.Number}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:d.Types.String,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.String,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.String}get effectiveType(){return d.Types.String}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:d.Types.Date,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Date,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.Date}get effectiveType(){return d.Types.Date}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:d.Types.Hyperlink,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Hyperlink,text:f?f.text:void 0,hyperlink:f?f.hyperlink:void 0},f&&f.tooltip&&(this.model.tooltip=f.tooltip)}get value(){const c={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(c.tooltip=this.model.tooltip),c}set value(c){this.model={text:c.text,hyperlink:c.hyperlink},c.tooltip&&(this.model.tooltip=c.tooltip)}get text(){return this.model.text}set text(c){this.model.text=c}get hyperlink(){return this.model.hyperlink}set hyperlink(c){this.model.hyperlink=c}get type(){return d.Types.Hyperlink}get effectiveType(){return d.Types.Hyperlink}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:d.Types.Formula,f:class{constructor(c,f){this.cell=c,this.model={address:c.address,type:d.Types.Formula,shareType:f?f.shareType:void 0,ref:f?f.ref:void 0,formula:f?f.formula:void 0,sharedFormula:f?f.sharedFormula:void 0,result:f?f.result:void 0}}_copyModel(c){const f={},g=p=>{const m=c[p];m&&(f[p]=m)};return g("formula"),g("result"),g("ref"),g("shareType"),g("sharedFormula"),f}get value(){return this._copyModel(this.model)}set value(c){this.model=this._copyModel(c)}validate(c){switch(h.getType(c)){case d.Types.Null:case d.Types.String:case d.Types.Number:case d.Types.Date:break;case d.Types.Hyperlink:case d.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(c){this.model.formula=c}get formulaType(){return this.model.formula?l.FormulaType.Master:this.model.sharedFormula?l.FormulaType.Shared:l.FormulaType.None}get result(){return this.model.result}set result(c){this.model.result=c}get type(){return d.Types.Formula}get effectiveType(){const c=this.model.result;return c==null?l.ValueType.Null:c instanceof String||typeof c=="string"?l.ValueType.String:typeof c=="number"?l.ValueType.Number:c instanceof Date?l.ValueType.Date:c.text&&c.hyperlink?l.ValueType.Hyperlink:c.formula?l.ValueType.Formula:l.ValueType.Null}get address(){return this.model.address}set address(c){this.model.address=c}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:c}=this.cell,f=c.findCell(this.model.sharedFormula);this._translatedFormula=f&&u(f.formula,f.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:d.Types.Merge,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Merge,master:f?f.address:void 0},this._master=f,f&&f.addMergeRef()}get value(){return this._master.value}set value(c){c instanceof d?(this._master&&this._master.releaseMergeRef(),c.addMergeRef(),this._master=c):this._master.value=c}isMergedTo(c){return c===this._master}get master(){return this._master}get type(){return d.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:d.Types.JSON,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.String,value:JSON.stringify(f),rawValue:f}}get value(){return this.model.rawValue}set value(c){this.model.rawValue=c,this.model.value=JSON.stringify(c)}get type(){return d.Types.String}get effectiveType(){return d.Types.String}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:d.Types.SharedString,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.SharedString,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.SharedString}get effectiveType(){return d.Types.SharedString}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:d.Types.RichText,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.String,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}toString(){return this.model.value.richText.map(c=>c.text).join("")}get type(){return d.Types.RichText}get effectiveType(){return d.Types.RichText}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:d.Types.Boolean,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Boolean,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.Boolean}get effectiveType(){return d.Types.Boolean}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:d.Types.Error,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Error,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.Error}get effectiveType(){return d.Types.Error}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((c,f)=>(c[f.t]=f.f,c),[]),create(c,f,g){const p=this.types[c];if(!p)throw new Error("Could not create Value of type "+c);return new p(f,g)}};t.exports=d},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,t,n){const s=e("../utils/under-dash"),o=e("./enums"),l=e("../utils/col-cache");class u{constructor(d,h,c){this._worksheet=d,this._number=h,c!==!1&&(this.defn=c)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return l.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(d){d?(this.key=d.key,this.width=d.width!==void 0?d.width:9,this.outlineLevel=d.outlineLevel,d.style?this.style=d.style:this.style={},this.header=d.header,this._hidden=!!d.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(d){d!==void 0?(this._header=d,this.headers.forEach((h,c)=>{this._worksheet.getCell(c+1,this.number).value=h})):this._header=void 0}get key(){return this._key}set key(d){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=d,d&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(d){this._hidden=d}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(d){this._outlineLevel=d}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(d){return this.width===d.width&&this.hidden===d.hidden&&this.outlineLevel===d.outlineLevel&&s.isEqual(this.style,d.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const d=this.style;return!d||!(d.font||d.numFmt||d.alignment||d.border||d.fill||d.protection)}get headerCount(){return this.headers.length}eachCell(d,h){const c=this.number;h||(h=d,d=null),this._worksheet.eachRow(d,(f,g)=>{h(f.getCell(c),g)})}get values(){const d=[];return this.eachCell((h,c)=>{h&&h.type!==o.ValueType.Null&&(d[c]=h.value)}),d}set values(d){if(!d)return;const h=this.number;let c=0;d.hasOwnProperty("0")&&(c=1),d.forEach((f,g)=>{this._worksheet.getCell(g+c,h).value=f})}_applyStyle(d,h){return this.style[d]=h,this.eachCell(c=>{c[d]=h}),h}get numFmt(){return this.style.numFmt}set numFmt(d){this._applyStyle("numFmt",d)}get font(){return this.style.font}set font(d){this._applyStyle("font",d)}get alignment(){return this.style.alignment}set alignment(d){this._applyStyle("alignment",d)}get protection(){return this.style.protection}set protection(d){this._applyStyle("protection",d)}get border(){return this.style.border}set border(d){this._applyStyle("border",d)}get fill(){return this.style.fill}set fill(d){this._applyStyle("fill",d)}static toModel(d){const h=[];let c=null;return d&&d.forEach((f,g)=>{f.isDefault?c&&(c=null):c&&f.equivalentTo(c)?c.max=g+1:(c={min:g+1,max:g+1,width:f.width!==void 0?f.width:9,style:f.style,isCustomWidth:f.isCustomWidth,hidden:f.hidden,outlineLevel:f.outlineLevel,collapsed:f.collapsed},h.push(c))}),h.length?h:void 0}static fromModel(d,h){const c=[];let f=1,g=0;for(h=(h=h||[]).sort(function(p,m){return p.min-m.min});g<h.length;){const p=h[g++];for(;f<p.min;)c.push(new u(d,f++));for(;f<=p.max;)c.push(new u(d,f++,p))}return c.length?c:null}}t.exports=u},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,t,n){t.exports=class{constructor(s){this.model=s||{}}add(s,o){return this.model[s]=o}find(s){return this.model[s]}remove(s){this.model[s]=void 0}}},{}],6:[function(e,t,n){const s=e("../utils/under-dash"),o=e("../utils/col-cache"),l=e("../utils/cell-matrix"),u=e("./range"),i=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;t.exports=class{constructor(){this.matrixMap={}}getMatrix(d){return this.matrixMap[d]||(this.matrixMap[d]=new l)}add(d,h){const c=o.decodeEx(d);this.addEx(c,h)}addEx(d,h){const c=this.getMatrix(h);if(d.top)for(let f=d.left;f<=d.right;f++)for(let g=d.top;g<=d.bottom;g++){const p={sheetName:d.sheetName,address:o.n2l(f)+g,row:g,col:f};c.addCellEx(p)}else c.addCellEx(d)}remove(d,h){const c=o.decodeEx(d);this.removeEx(c,h)}removeEx(d,h){this.getMatrix(h).removeCellEx(d)}removeAllNames(d){s.each(this.matrixMap,h=>{h.removeCellEx(d)})}forEach(d){s.each(this.matrixMap,(h,c)=>{h.forEach(f=>{d(c,f)})})}getNames(d){return this.getNamesEx(o.decodeEx(d))}getNamesEx(d){return s.map(this.matrixMap,(h,c)=>h.findCellEx(d)&&c).filter(Boolean)}_explore(d,h){h.mark=!1;const{sheetName:c}=h,f=new u(h.row,h.col,h.row,h.col,c);let g,p;function m(b,M){const D=d.findCellAt(c,b,h.col);return!(!D||!D.mark)&&(f[M]=b,D.mark=!1,!0)}for(p=h.row-1;m(p,"top");p--);for(p=h.row+1;m(p,"bottom");p++);function v(b,M){const D=[];for(p=f.top;p<=f.bottom;p++){const $=d.findCellAt(c,p,b);if(!$||!$.mark)return!1;D.push($)}f[M]=b;for(let $=0;$<D.length;$++)D[$].mark=!1;return!0}for(g=h.col-1;v(g,"left");g--);for(g=h.col+1;v(g,"right");g++);return f}getRanges(d,h){return(h=h||this.matrixMap[d])?(h.forEach(c=>{c.mark=!0}),{name:d,ranges:h.map(c=>c.mark&&this._explore(h,c)).filter(Boolean).map(c=>c.$shortRange)}):{name:d,ranges:[]}}normaliseMatrix(d,h){d.forEachInSheet(h,(c,f,g)=>{c&&(c.row===f&&c.col===g||(c.row=f,c.col=g,c.address=o.n2l(g)+f))})}spliceRows(d,h,c,f){s.each(this.matrixMap,g=>{g.spliceRows(d,h,c,f),this.normaliseMatrix(g,d)})}spliceColumns(d,h,c,f){s.each(this.matrixMap,g=>{g.spliceColumns(d,h,c,f),this.normaliseMatrix(g,d)})}get model(){return s.map(this.matrixMap,(d,h)=>this.getRanges(h,d)).filter(d=>d.ranges.length)}set model(d){const h=this.matrixMap={};d.forEach(c=>{const f=h[c.name]=new l;c.ranges.forEach(g=>{i.test(g.split("!").pop()||"")&&f.addCell(g)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,t,n){t.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,t,n){const s=e("../utils/col-cache"),o=e("./anchor");t.exports=class{constructor(l,u){this.worksheet=l,this.model=u}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(l){let{type:u,imageId:i,range:d,hyperlinks:h}=l;if(this.type=u,this.imageId=i,u==="image")if(typeof d=="string"){const c=s.decode(d);this.range={tl:new o(this.worksheet,{col:c.left,row:c.top},-1),br:new o(this.worksheet,{col:c.right,row:c.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,d.tl,0),br:d.br&&new o(this.worksheet,d.br,0),ext:d.ext,editAs:d.editAs,hyperlinks:h||d.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,t,n){const s=e("../utils/under-dash");class o{constructor(u){this.note=u}get model(){let u=null;switch(typeof this.note){case"string":u={type:"note",note:{texts:[{text:this.note}]}};break;default:u={type:"note",note:this.note}}return s.deepMerge({},o.DEFAULT_CONFIGS,u)}set model(u){const{note:i}=u,{texts:d}=i;d.length===1&&Object.keys(d[0]).length===1?this.note=d[0].text:this.note=i}static fromModel(u){const i=new o;return i.model=u,i}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},t.exports=o},{"../utils/under-dash":26}],10:[function(e,t,n){const s=e("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(u,i,d,h,c){if(arguments.length<4){const f=s.decodeAddress(u),g=s.decodeAddress(i);this.model={top:Math.min(f.row,g.row),left:Math.min(f.col,g.col),bottom:Math.max(f.row,g.row),right:Math.max(f.col,g.col),sheetName:d},this.setTLBR(f.row,f.col,g.row,g.col,c)}else this.model={top:Math.min(u,d),left:Math.min(i,h),bottom:Math.max(u,d),right:Math.max(i,h),sheetName:c}}decode(u){switch(u.length){case 5:this.setTLBR(u[0],u[1],u[2],u[3],u[4]);break;case 4:this.setTLBR(u[0],u[1],u[2],u[3]);break;case 3:this.setTLBR(u[0],u[1],u[2]);break;case 2:this.setTLBR(u[0],u[1]);break;case 1:{const i=u[0];if(i instanceof o)this.model={top:i.model.top,left:i.model.left,bottom:i.model.bottom,right:i.model.right,sheetName:i.sheetName};else if(i instanceof Array)this.decode(i);else if(i.top&&i.left&&i.bottom&&i.right)this.model={top:i.top,left:i.left,bottom:i.bottom,right:i.right,sheetName:i.sheetName};else{const d=s.decodeEx(i);d.top?this.model={top:d.top,left:d.left,bottom:d.bottom,right:d.right,sheetName:d.sheetName}:this.model={top:d.row,left:d.col,bottom:d.row,right:d.col,sheetName:d.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+u.length)}}get top(){return this.model.top||1}set top(u){this.model.top=u}get left(){return this.model.left||1}set left(u){this.model.left=u}get bottom(){return this.model.bottom||1}set bottom(u){this.model.bottom=u}get right(){return this.model.right||1}set right(u){this.model.right=u}get sheetName(){return this.model.sheetName}set sheetName(u){this.model.sheetName=u}get _serialisedSheetName(){const{sheetName:u}=this.model;return u?/^[a-zA-Z0-9]*$/.test(u)?u+"!":`'${u}'!`:""}expand(u,i,d,h){(!this.model.top||u<this.top)&&(this.top=u),(!this.model.left||i<this.left)&&(this.left=i),(!this.model.bottom||d>this.bottom)&&(this.bottom=d),(!this.model.right||h>this.right)&&(this.right=h)}expandRow(u){if(u){const{dimensions:i,number:d}=u;i&&this.expand(d,i.min,d,i.max)}}expandToAddress(u){const i=s.decodeEx(u);this.expand(i.row,i.col,i.row,i.col)}get tl(){return s.n2l(this.left)+this.top}get $t$l(){return`$${s.n2l(this.left)}$${this.top}`}get br(){return s.n2l(this.right)+this.bottom}get $b$r(){return`$${s.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(u){return(!u.sheetName||!this.sheetName||u.sheetName===this.sheetName)&&!(u.bottom<this.top)&&!(u.top>this.bottom)&&!(u.right<this.left)&&!(u.left>this.right)}contains(u){const i=s.decodeEx(u);return this.containsEx(i)}containsEx(u){return(!u.sheetName||!this.sheetName||u.sheetName===this.sheetName)&&u.row>=this.top&&u.row<=this.bottom&&u.col>=this.left&&u.col<=this.right}forEachAddress(u){for(let i=this.left;i<=this.right;i++)for(let d=this.top;d<=this.bottom;d++)u(s.encodeAddress(d,i),d,i)}}t.exports=o},{"../utils/col-cache":19}],11:[function(e,t,n){const s=e("../utils/under-dash"),o=e("./enums"),l=e("../utils/col-cache"),u=e("./cell");t.exports=class{constructor(i,d){this._worksheet=i,this._number=d,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(i){return this._cells[i-1]}getCellEx(i){let d=this._cells[i.col-1];if(!d){const h=this._worksheet.getColumn(i.col);d=new u(this,h,i.address),this._cells[i.col-1]=d}return d}getCell(i){if(typeof i=="string"){const d=this._worksheet.getColumnKey(i);i=d?d.number:l.l2n(i)}return this._cells[i-1]||this.getCellEx({address:l.encodeAddress(this._number,i),row:this._number,col:i})}splice(i,d){const h=i+d;for(var c=arguments.length,f=new Array(c>2?c-2:0),g=2;g<c;g++)f[g-2]=arguments[g];const p=f.length-d,m=this._cells.length;let v,b,M;if(p<0)for(v=i+f.length;v<=m;v++)M=this._cells[v-1],b=this._cells[v-p-1],b?(M=this.getCell(v),M.value=b.value,M.style=b.style,M._comment=b._comment):M&&(M.value=null,M.style={},M._comment=void 0);else if(p>0)for(v=m;v>=h;v--)b=this._cells[v-1],b?(M=this.getCell(v+p),M.value=b.value,M.style=b.style,M._comment=b._comment):this._cells[v+p-1]=void 0;for(v=0;v<f.length;v++)M=this.getCell(i+v),M.value=f[v],M.style={},M._comment=void 0}eachCell(i,d){if(d||(d=i,i=null),i&&i.includeEmpty){const h=this._cells.length;for(let c=1;c<=h;c++)d(this.getCell(c),c)}else this._cells.forEach((h,c)=>{h&&h.type!==o.ValueType.Null&&d(h,c+1)})}addPageBreak(i,d){const h=this._worksheet,c=Math.max(0,i-1)||0,f=Math.max(0,d-1)||16838,g={id:this._number,max:f,man:1};c&&(g.min=c),h.rowBreaks.push(g)}get values(){const i=[];return this._cells.forEach(d=>{d&&d.type!==o.ValueType.Null&&(i[d.col]=d.value)}),i}set values(i){if(this._cells=[],i)if(i instanceof Array){let d=0;i.hasOwnProperty("0")&&(d=1),i.forEach((h,c)=>{h!==void 0&&(this.getCellEx({address:l.encodeAddress(this._number,c+d),row:this._number,col:c+d}).value=h)})}else this._worksheet.eachColumnKey((d,h)=>{i[h]!==void 0&&(this.getCellEx({address:l.encodeAddress(this._number,d.number),row:this._number,col:d.number}).value=i[h])})}get hasValues(){return s.some(this._cells,i=>i&&i.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let i=0;return this.eachCell(()=>{i++}),i}get dimensions(){let i=0,d=0;return this._cells.forEach(h=>{h&&h.type!==o.ValueType.Null&&((!i||i>h.col)&&(i=h.col),d<h.col&&(d=h.col))}),i>0?{min:i,max:d}:null}_applyStyle(i,d){return this.style[i]=d,this._cells.forEach(h=>{h&&(h[i]=d)}),d}get numFmt(){return this.style.numFmt}set numFmt(i){this._applyStyle("numFmt",i)}get font(){return this.style.font}set font(i){this._applyStyle("font",i)}get alignment(){return this.style.alignment}set alignment(i){this._applyStyle("alignment",i)}get protection(){return this.style.protection}set protection(i){this._applyStyle("protection",i)}get border(){return this.style.border}set border(i){this._applyStyle("border",i)}get fill(){return this.style.fill}set fill(i){this._applyStyle("fill",i)}get hidden(){return!!this._hidden}set hidden(i){this._hidden=i}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(i){this._outlineLevel=i}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const i=[];let d=0,h=0;return this._cells.forEach(c=>{if(c){const f=c.model;f&&((!d||d>c.col)&&(d=c.col),h<c.col&&(h=c.col),i.push(f))}}),this.height||i.length?{cells:i,number:this.number,min:d,max:h,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(i){if(i.number!==this._number)throw new Error("Invalid row number in model");let d;this._cells=[],i.cells.forEach(h=>{switch(h.type){case u.Types.Merge:break;default:{let c;if(h.address)c=l.decodeAddress(h.address);else if(d){const{row:f}=d,g=d.col+1;c={row:f,col:g,address:l.encodeAddress(f,g),$col$row:`$${l.n2l(g)}$${f}`}}d=c,this.getCellEx(c).model=h;break}}}),i.height?this.height=i.height:delete this.height,this.hidden=i.hidden,this.outlineLevel=i.outlineLevel||0,this.style=i.style&&JSON.parse(JSON.stringify(i.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,t,n){const s=e("../utils/col-cache");class o{constructor(u,i,d){this.table=u,this.column=i,this.index=d}_set(u,i){this.table.cacheState(),this.column[u]=i}get name(){return this.column.name}set name(u){this._set("name",u)}get filterButton(){return this.column.filterButton}set filterButton(u){this.column.filterButton=u}get style(){return this.column.style}set style(u){this.column.style=u}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(u){this._set("totalsRowLabel",u)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(u){this._set("totalsRowFunction",u)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(u){this._set("totalsRowResult",u)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(u){this._set("totalsRowFormula",u)}}t.exports=class{constructor(l,u){this.worksheet=l,u&&(this.table=u,this.validate(),this.store())}getFormula(l){switch(l.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${l.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${l.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${l.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${l.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${l.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${l.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${l.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${l.name}])`;case"custom":return l.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+l.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:l}=this,u=(p,m,v)=>{p[m]===void 0&&(p[m]=v)};u(l,"headerRow",!0),u(l,"totalsRow",!1),u(l,"style",{}),u(l.style,"theme","TableStyleMedium2"),u(l.style,"showFirstColumn",!1),u(l.style,"showLastColumn",!1),u(l.style,"showRowStripes",!1),u(l.style,"showColumnStripes",!1);const i=(p,m)=>{if(!p)throw new Error(m)};i(l.ref,"Table must have ref"),i(l.columns,"Table must have column definitions"),i(l.rows,"Table must have row definitions"),l.tl=s.decodeAddress(l.ref);const{row:d,col:h}=l.tl;i(d>0,"Table must be on valid row"),i(h>0,"Table must be on valid col");const{width:c,filterHeight:f,tableHeight:g}=this;l.autoFilterRef=s.encode(d,h,d+f-1,h+c-1),l.tableRef=s.encode(d,h,d+g-1,h+c-1),l.columns.forEach((p,m)=>{i(p.name,`Column ${m} must have a name`),m===0?u(p,"totalsRowLabel","Total"):(u(p,"totalsRowFunction","none"),p.totalsRowFormula=this.getFormula(p))})}store(){const l=(f,g)=>{g&&Object.keys(g).forEach(p=>{f[p]=g[p]})},{worksheet:u,table:i}=this,{row:d,col:h}=i.tl;let c=0;if(i.headerRow){const f=u.getRow(d+c++);i.columns.forEach((g,p)=>{const{style:m,name:v}=g,b=f.getCell(h+p);b.value=v,l(b,m)})}if(i.rows.forEach(f=>{const g=u.getRow(d+c++);f.forEach((p,m)=>{const v=g.getCell(h+m);v.value=p,l(v,i.columns[m].style)})}),i.totalsRow){const f=u.getRow(d+c++);i.columns.forEach((g,p)=>{const m=f.getCell(h+p);if(p===0)m.value=g.totalsRowLabel;else{const v=this.getFormula(g);m.value=v?{formula:g.totalsRowFormula,result:g.totalsRowResult}:null}l(m,g.style)})}}load(l){const{table:u}=this,{row:i,col:d}=u.tl;let h=0;if(u.headerRow){const c=l.getRow(i+h++);u.columns.forEach((f,g)=>{c.getCell(d+g).value=f.name})}if(u.rows.forEach(c=>{const f=l.getRow(i+h++);c.forEach((g,p)=>{f.getCell(d+p).value=g})}),u.totalsRow){const c=l.getRow(i+h++);u.columns.forEach((f,g)=>{const p=c.getCell(d+g);g===0?p.value=f.totalsRowLabel:this.getFormula(f)&&(p.value={formula:f.totalsRowFormula,result:f.totalsRowResult})})}}get model(){return this.table}set model(l){this.table=l}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const l=s.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let u=0;u<this._cache.tableHeight;u++){const i=this.worksheet.getRow(l.row+u);for(let d=0;d<this._cache.width;d++)i.getCell(l.col+d).value=null}else{for(let u=this.tableHeight;u<this._cache.tableHeight;u++){const i=this.worksheet.getRow(l.row+u);for(let d=0;d<this._cache.width;d++)i.getCell(l.col+d).value=null}for(let u=0;u<this.tableHeight;u++){const i=this.worksheet.getRow(l.row+u);for(let d=this.width;d<this._cache.width;d++)i.getCell(l.col+d).value=null}}this.store()}addRow(l,u){this.cacheState(),u===void 0?this.table.rows.push(l):this.table.rows.splice(u,0,l)}removeRows(l){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(l,u)}getColumn(l){const u=this.table.columns[l];return new o(this,u,l)}addColumn(l,u,i){this.cacheState(),i===void 0?(this.table.columns.push(l),this.table.rows.forEach((d,h)=>{d.push(u[h])})):(this.table.columns.splice(i,0,l),this.table.rows.forEach((d,h)=>{d.splice(i,0,u[h])}))}removeColumns(l){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(l,u),this.table.rows.forEach(i=>{i.splice(l,u)})}_assign(l,u,i){this.cacheState(),l[u]=i}get ref(){return this.table.ref}set ref(l){this._assign(this.table,"ref",l)}get name(){return this.table.name}set name(l){this.table.name=l}get displayName(){return this.table.displyName||this.table.name}set displayNamename(l){this.table.displayName=l}get headerRow(){return this.table.headerRow}set headerRow(l){this._assign(this.table,"headerRow",l)}get totalsRow(){return this.table.totalsRow}set totalsRow(l){this._assign(this.table,"totalsRow",l)}get theme(){return this.table.style.name}set theme(l){this.table.style.name=l}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(l){this.table.style.showFirstColumn=l}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(l){this.table.style.showLastColumn=l}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(l){this.table.style.showRowStripes=l}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(l){this.table.style.showColumnStripes=l}}},{"../utils/col-cache":19}],13:[function(e,t,n){const s=e("./worksheet"),o=e("./defined-names"),l=e("../xlsx/xlsx"),u=e("../csv/csv");t.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new l(this)),this._xlsx}get csv(){return this._csv||(this._csv=new u(this)),this._csv}get nextId(){for(let i=1;i<this._worksheets.length;i++)if(!this._worksheets[i])return i;return this._worksheets.length||1}addWorksheet(i,d){const h=this.nextId;d&&(typeof d=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),d={properties:{tabColor:{argb:d}}}):(d.argb||d.theme||d.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),d={properties:{tabColor:d}}));const c=this._worksheets.reduce((p,m)=>(m&&m.orderNo)>p?m.orderNo:p,0),f=Object.assign({},d,{id:h,name:i,orderNo:c+1,workbook:this}),g=new s(f);return this._worksheets[h]=g,g}removeWorksheetEx(i){delete this._worksheets[i.id]}removeWorksheet(i){const d=this.getWorksheet(i);d&&d.destroy()}getWorksheet(i){return i===void 0?this._worksheets.find(Boolean):typeof i=="number"?this._worksheets[i]:typeof i=="string"?this._worksheets.find(d=>d&&d.name===i):void 0}get worksheets(){return this._worksheets.slice(1).sort((i,d)=>i.orderNo-d.orderNo).filter(Boolean)}eachSheet(i){this.worksheets.forEach(d=>{i(d,d.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(i){const d=this.media.length;return this.media.push(Object.assign({},i,{type:"image"})),d}getImage(i){return this.media[i]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(i=>i.model),sheets:this.worksheets.map(i=>i.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(i){this.creator=i.creator,this.lastModifiedBy=i.lastModifiedBy,this.lastPrinted=i.lastPrinted,this.created=i.created,this.modified=i.modified,this.company=i.company,this.manager=i.manager,this.title=i.title,this.subject=i.subject,this.keywords=i.keywords,this.category=i.category,this.description=i.description,this.language=i.language,this.revision=i.revision,this.contentStatus=i.contentStatus,this.properties=i.properties,this.calcProperties=i.calcProperties,this._worksheets=[],i.worksheets.forEach(d=>{const{id:h,name:c,state:f}=d,g=i.sheets&&i.sheets.findIndex(p=>p.id===h);(this._worksheets[h]=new s({id:h,name:c,orderNo:g,state:f,workbook:this})).model=d}),this._definedNames.model=i.definedNames,this.views=i.views,this._themes=i.themes,this.media=i.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,t,n){const s=e("../utils/under-dash"),o=e("../utils/col-cache"),l=e("./range"),u=e("./row"),i=e("./column"),d=e("./enums"),h=e("./image"),c=e("./table"),f=e("./data-validations"),g=e("../utils/encryptor"),{copyStyle:p}=e("../utils/copy-style");t.exports=class{constructor(m){m=m||{},this._workbook=m.workbook,this.id=m.id,this.orderNo=m.orderNo,this.name=m.name,this.state=m.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},m.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!m.pageSetup||!m.pageSetup.fitToWidth&&!m.pageSetup.fitToHeight||m.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},m.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},m.headerFooter),this.dataValidations=new f,this.views=m.views||[],this.autoFilter=m.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(m){if(m===void 0&&(m="sheet"+this.id),this._name!==m){if(typeof m!="string")throw new Error("The name has to be a string.");if(m==="")throw new Error("The name can't be empty.");if(m==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(m))throw new Error(`Worksheet name ${m} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(m))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+m);if(m&&m.length>31&&(console.warn(`Worksheet name ${m} exceeds 31 chars. This will be truncated`),m=m.substring(0,31)),this._workbook._worksheets.find(v=>v&&v.name.toLowerCase()===m.toLowerCase()))throw new Error("Worksheet name already exists: "+m);this._name=m}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const m=new l;return this._rows.forEach(v=>{if(v){const b=v.dimensions;b&&m.expand(v.number,b.min,v.number,b.max)}}),m}get columns(){return this._columns}set columns(m){this._headerRowCount=m.reduce((M,D)=>{const $=(D.header?1:D.headers&&D.headers.length)||0;return Math.max(M,$)},0);let v=1;const b=this._columns=[];m.forEach(M=>{const D=new i(this,v++,!1);b.push(D),D.defn=M})}getColumnKey(m){return this._keys[m]}setColumnKey(m,v){this._keys[m]=v}deleteColumnKey(m){delete this._keys[m]}eachColumnKey(m){s.each(this._keys,m)}getColumn(m){if(typeof m=="string"){const v=this._keys[m];if(v)return v;m=o.l2n(m)}if(this._columns||(this._columns=[]),m>this._columns.length){let v=this._columns.length+1;for(;v<=m;)this._columns.push(new i(this,v++))}return this._columns[m-1]}spliceColumns(m,v){const b=this._rows.length;for(var M=arguments.length,D=new Array(M>2?M-2:0),$=2;$<M;$++)D[$-2]=arguments[$];if(D.length>0)for(let z=0;z<b;z++){const L=[m,v];D.forEach(B=>{L.push(B[z]||null)});const Y=this.getRow(z+1);Y.splice.apply(Y,L)}else this._rows.forEach(z=>{z&&z.splice(m,v)});const A=D.length-v,H=m+v,N=this._columns.length;if(A<0)for(let z=m+D.length;z<=N;z++)this.getColumn(z).defn=this.getColumn(z-A).defn;else if(A>0)for(let z=N;z>=H;z--)this.getColumn(z+A).defn=this.getColumn(z).defn;for(let z=m;z<m+D.length;z++)this.getColumn(z).defn=null;this.workbook.definedNames.spliceColumns(this.name,m,v,D.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let m=0;return this.eachRow(v=>{m=Math.max(m,v.cellCount)}),m}get actualColumnCount(){const m=[];let v=0;return this.eachRow(b=>{b.eachCell(M=>{let{col:D}=M;m[D]||(m[D]=!0,v++)})}),v}_commitRow(){}get _lastRowNumber(){const m=this._rows;let v=m.length;for(;v>0&&m[v-1]===void 0;)v--;return v}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(m){return this._rows[m-1]}findRows(m,v){return this._rows.slice(m-1,m-1+v)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let m=0;return this.eachRow(()=>{m++}),m}getRow(m){let v=this._rows[m-1];return v||(v=this._rows[m-1]=new u(this,m)),v}getRows(m,v){if(v<1)return;const b=[];for(let M=m;M<m+v;M++)b.push(this.getRow(M));return b}addRow(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const b=this._nextRow,M=this.getRow(b);return M.values=m,this._setStyleOption(b,v[0]==="i"?v:"n"),M}addRows(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const b=[];return m.forEach(M=>{b.push(this.addRow(M,v))}),b}insertRow(m,v){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(m,0,v),this._setStyleOption(m,b),this.getRow(m)}insertRows(m,v){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(m,0,...v),b!=="n")for(let M=0;M<v.length;M++)b[0]==="o"&&this.findRow(v.length+m+M)!==void 0?this._copyStyle(v.length+m+M,m+M,b[1]==="+"):b[0]==="i"&&this.findRow(m-1)!==void 0&&this._copyStyle(m-1,m+M,b[1]==="+");return this.getRows(m,v.length)}_setStyleOption(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";v[0]==="o"&&this.findRow(m+1)!==void 0?this._copyStyle(m+1,m,v[1]==="+"):v[0]==="i"&&this.findRow(m-1)!==void 0&&this._copyStyle(m-1,m,v[1]==="+")}_copyStyle(m,v){let b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const M=this.getRow(m),D=this.getRow(v);D.style=p(M.style),M.eachCell({includeEmpty:b},($,A)=>{D.getCell(A).style=p($.style)}),D.height=M.height}duplicateRow(m,v){let b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const M=this._rows[m-1],D=new Array(v).fill(M.values);this.spliceRows(m+1,b?0:v,...D);for(let $=0;$<v;$++){const A=this._rows[m+$];A.style=M.style,A.height=M.height,M.eachCell({includeEmpty:!0},(H,N)=>{A.getCell(N).style=H.style})}}spliceRows(m,v){const b=m+v;for(var M=arguments.length,D=new Array(M>2?M-2:0),$=2;$<M;$++)D[$-2]=arguments[$];const A=D.length,H=A-v,N=this._rows.length;let z,L;if(H<0)for(m===N&&(this._rows[N-1]=void 0),z=b;z<=N;z++)if(L=this._rows[z-1],L){const Y=this.getRow(z+H);Y.values=L.values,Y.style=L.style,Y.height=L.height,L.eachCell({includeEmpty:!0},(B,T)=>{Y.getCell(T).style=B.style}),this._rows[z-1]=void 0}else this._rows[z+H-1]=void 0;else if(H>0)for(z=N;z>=b;z--)if(L=this._rows[z-1],L){const Y=this.getRow(z+H);Y.values=L.values,Y.style=L.style,Y.height=L.height,L.eachCell({includeEmpty:!0},(B,T)=>{if(Y.getCell(T).style=B.style,B._value.constructor.name==="MergeValue"){const E=this.getRow(B._row._number+A).getCell(T),P=B._value._master,w=this.getRow(P._row._number+A).getCell(P._column._number);E.merge(w)}})}else this._rows[z+H-1]=void 0;for(z=0;z<A;z++){const Y=this.getRow(m+z);Y.style={},Y.values=D[z]}this.workbook.definedNames.spliceRows(this.name,m,v,A)}eachRow(m,v){if(v||(v=m,m=void 0),m&&m.includeEmpty){const b=this._rows.length;for(let M=1;M<=b;M++)v(this.getRow(M),M)}else this._rows.forEach(b=>{b&&b.hasValues&&v(b,b.number)})}getSheetValues(){const m=[];return this._rows.forEach(v=>{v&&(m[v.number]=v.values)}),m}findCell(m,v){const b=o.getAddress(m,v),M=this._rows[b.row-1];return M?M.findCell(b.col):void 0}getCell(m,v){const b=o.getAddress(m,v);return this.getRow(b.row).getCellEx(b)}mergeCells(){for(var m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];const M=new l(v);this._mergeCellsInternal(M)}mergeCellsWithoutStyle(){for(var m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];const M=new l(v);this._mergeCellsInternal(M,!0)}_mergeCellsInternal(m,v){s.each(this._merges,M=>{if(M.intersects(m))throw new Error("Cannot merge already merged cells")});const b=this.getCell(m.top,m.left);for(let M=m.top;M<=m.bottom;M++)for(let D=m.left;D<=m.right;D++)(M>m.top||D>m.left)&&this.getCell(M,D).merge(b,v);this._merges[b.address]=m}_unMergeMaster(m){const v=this._merges[m.address];if(v){for(let b=v.top;b<=v.bottom;b++)for(let M=v.left;M<=v.right;M++)this.getCell(b,M).unmerge();delete this._merges[m.address]}}get hasMerges(){return s.some(this._merges,Boolean)}unMergeCells(){for(var m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];const M=new l(v);for(let D=M.top;D<=M.bottom;D++)for(let $=M.left;$<=M.right;$++){const A=this.findCell(D,$);A&&(A.type===d.ValueType.Merge?this._unMergeMaster(A.master):this._merges[A.address]&&this._unMergeMaster(A))}}fillFormula(m,v,b){let M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const D=o.decode(m),{top:$,left:A,bottom:H,right:N}=D,z=N-A+1,L=o.encodeAddress($,A),Y=M==="shared";let B;B=typeof b=="function"?b:Array.isArray(b)?Array.isArray(b[0])?(E,P)=>b[E-$][P-A]:(E,P)=>b[(E-$)*z+(P-A)]:()=>{};let T=!0;for(let E=$;E<=H;E++)for(let P=A;P<=N;P++)T?(this.getCell(E,P).value={shareType:M,formula:v,ref:m,result:B(E,P)},T=!1):this.getCell(E,P).value=Y?{sharedFormula:L,result:B(E,P)}:B(E,P)}addImage(m,v){const b={type:"image",imageId:m,range:v};this._media.push(new h(this,b))}getImages(){return this._media.filter(m=>m.type==="image")}addBackgroundImage(m){const v={type:"background",imageId:m};this._media.push(new h(this,v))}getBackgroundImageId(){const m=this._media.find(v=>v.type==="background");return m&&m.imageId}protect(m,v){return new Promise(b=>{this.sheetProtection={sheet:!0},v&&"spinCount"in v&&(v.spinCount=Number.isFinite(v.spinCount)?Math.round(Math.max(0,v.spinCount)):1e5),m&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=g.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=v&&"spinCount"in v?v.spinCount:1e5,this.sheetProtection.hashValue=g.convertPasswordToHash(m,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),v&&(this.sheetProtection=Object.assign(this.sheetProtection,v),!m&&"spinCount"in v&&delete this.sheetProtection.spinCount),b()})}unprotect(){this.sheetProtection=null}addTable(m){const v=new c(this,m);return this.tables[m.name]=v,v}getTable(m){return this.tables[m]}removeTable(m){delete this.tables[m]}getTables(){return Object.values(this.tables)}addConditionalFormatting(m){this.conditionalFormattings.push(m)}removeConditionalFormatting(m){typeof m=="number"?this.conditionalFormattings.splice(m,1):this.conditionalFormattings=m instanceof Function?this.conditionalFormattings.filter(m):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(m){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=m}get model(){const m={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(M=>M.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(M=>M.model),conditionalFormattings:this.conditionalFormattings};m.cols=i.toModel(this.columns);const v=m.rows=[],b=m.dimensions=new l;return this._rows.forEach(M=>{const D=M&&M.model;D&&(b.expand(D.number,D.min,D.number,D.max),v.push(D))}),m.merges=[],s.each(this._merges,M=>{m.merges.push(M.range)}),m}_parseRows(m){this._rows=[],m.rows.forEach(v=>{const b=new u(this,v.number);this._rows[b.number-1]=b,b.model=v})}_parseMergeCells(m){s.each(m.mergeCells,v=>{this.mergeCellsWithoutStyle(v)})}set model(m){this.name=m.name,this._columns=i.fromModel(this,m.cols),this._parseRows(m),this._parseMergeCells(m),this.dataValidations=new f(m.dataValidations),this.properties=m.properties,this.pageSetup=m.pageSetup,this.headerFooter=m.headerFooter,this.views=m.views,this.autoFilter=m.autoFilter,this._media=m.media.map(v=>new h(this,v)),this.sheetProtection=m.sheetProtection,this.tables=m.tables.reduce((v,b)=>{const M=new c;return M.model=b,v[b.name]=M,v},{}),this.conditionalFormattings=m.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,t,n){e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");const s={Workbook:e("./doc/workbook")},o=e("./doc/enums");Object.keys(o).forEach(l=>{s[l]=o[l]}),t.exports=s},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,t,n){const s=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");n.bufferToString=function(o){return typeof o=="string"?o:s?s.decode(o):o.toString()}},{}],17:[function(e,t,n){const s=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=e("buffer");n.stringToBuffer=function(l){return typeof l!="string"?l:s?o.from(s.encode(l).buffer):o.from(l)}},{buffer:220}],18:[function(e,t,n){const s=e("./under-dash"),o=e("./col-cache");t.exports=class{constructor(l){this.template=l,this.sheets={}}addCell(l){this.addCellEx(o.decodeEx(l))}getCell(l){return this.findCellEx(o.decodeEx(l),!0)}findCell(l){return this.findCellEx(o.decodeEx(l),!1)}findCellAt(l,u,i){const d=this.sheets[l],h=d&&d[u];return h&&h[i]}addCellEx(l){if(l.top)for(let u=l.top;u<=l.bottom;u++)for(let i=l.left;i<=l.right;i++)this.getCellAt(l.sheetName,u,i);else this.findCellEx(l,!0)}getCellEx(l){return this.findCellEx(l,!0)}findCellEx(l,u){const i=this.findSheet(l,u),d=this.findSheetRow(i,l,u);return this.findRowCell(d,l,u)}getCellAt(l,u,i){const d=this.sheets[l]||(this.sheets[l]=[]),h=d[u]||(d[u]=[]);return h[i]||(h[i]={sheetName:l,address:o.n2l(i)+u,row:u,col:i})}removeCellEx(l){const u=this.findSheet(l);if(!u)return;const i=this.findSheetRow(u,l);i&&delete i[l.col]}forEachInSheet(l,u){const i=this.sheets[l];i&&i.forEach((d,h)=>{d&&d.forEach((c,f)=>{c&&u(c,h,f)})})}forEach(l){s.each(this.sheets,(u,i)=>{this.forEachInSheet(i,l)})}map(l){const u=[];return this.forEach(i=>{u.push(l(i))}),u}findSheet(l,u){const i=l.sheetName;return this.sheets[i]?this.sheets[i]:u?this.sheets[i]=[]:void 0}findSheetRow(l,u,i){const{row:d}=u;return l&&l[d]?l[d]:i?l[d]=[]:void 0}findRowCell(l,u,i){const{col:d}=u;return l&&l[d]?l[d]:i?l[d]=this.template?Object.assign(u,JSON.parse(JSON.stringify(this.template))):u:void 0}spliceRows(l,u,i,d){const h=this.sheets[l];if(h){const c=[];for(let f=0;f<d;f++)c.push([]);h.splice(u,i,...c)}}spliceColumns(l,u,i,d){const h=this.sheets[l];if(h){const c=[];for(let f=0;f<d;f++)c.push(null);s.each(h,f=>{f.splice(u,i,...c)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,t,n){const s=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:l=>l<=26?1:l<=676?2:3,_fill(l){let u,i,d,h,c,f=1;if(l>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&l>=1){for(;f<=26;)u=this._dictionary[f-1],this._n2l[f]=u,this._l2n[u]=f,f++;this._l2nFill=1}if(this._l2nFill<2&&l>=2){for(f=27;f<=702;)i=f-27,d=i%26,h=Math.floor(i/26),u=this._dictionary[h]+this._dictionary[d],this._n2l[f]=u,this._l2n[u]=f,f++;this._l2nFill=2}if(this._l2nFill<3&&l>=3){for(f=703;f<=16384;)i=f-703,d=i%26,h=Math.floor(i/26)%26,c=Math.floor(i/676),u=this._dictionary[c]+this._dictionary[h]+this._dictionary[d],this._n2l[f]=u,this._l2n[u]=f,f++;this._l2nFill=3}},l2n(l){if(this._l2n[l]||this._fill(l.length),!this._l2n[l])throw new Error("Out of bounds. Invalid column letter: "+l);return this._l2n[l]},n2l(l){if(l<1||l>16384)throw new Error(l+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[l]||this._fill(this._level(l)),this._n2l[l]},_hash:{},validateAddress(l){if(!s.test(l))throw new Error("Invalid Address: "+l);return!0},decodeAddress(l){const u=l.length<5&&this._hash[l];if(u)return u;let i=!1,d="",h=0,c=!1,f="",g=0;for(let m,v=0;v<l.length;v++)if(m=l.charCodeAt(v),!c&&m>=65&&m<=90)i=!0,d+=l[v],h=26*h+m-64;else if(m>=48&&m<=57)c=!0,f+=l[v],g=10*g+m-48;else if(c&&i&&m!==36)break;if(i){if(h>16384)throw new Error("Out of bounds. Invalid column letter: "+d)}else h=void 0;c||(g=void 0);const p={address:l=d+f,col:h,row:g,$col$row:`$${d}$${f}`};return h<=100&&g<=100&&(this._hash[l]=p,this._hash[p.$col$row]=p),p},getAddress(l,u){if(u){const i=this.n2l(u)+l;return this.decodeAddress(i)}return this.decodeAddress(l)},decode(l){const u=l.split(":");if(u.length===2){const i=this.decodeAddress(u[0]),d=this.decodeAddress(u[1]),h={top:Math.min(i.row,d.row),left:Math.min(i.col,d.col),bottom:Math.max(i.row,d.row),right:Math.max(i.col,d.col)};return h.tl=this.n2l(h.left)+h.top,h.br=this.n2l(h.right)+h.bottom,h.dimensions=`${h.tl}:${h.br}`,h}return this.decodeAddress(l)},decodeEx(l){const u=l.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),i=u[1]||u[2],d=u[3],h=d.split(":");if(h.length>1){let f=this.decodeAddress(h[0]),g=this.decodeAddress(h[1]);const p=Math.min(f.row,g.row),m=Math.min(f.col,g.col),v=Math.max(f.row,g.row),b=Math.max(f.col,g.col);return f=this.n2l(m)+p,g=this.n2l(b)+v,{top:p,left:m,bottom:v,right:b,sheetName:i,tl:{address:f,col:m,row:p,$col$row:`$${this.n2l(m)}$${p}`,sheetName:i},br:{address:g,col:b,row:v,$col$row:`$${this.n2l(b)}$${v}`,sheetName:i},dimensions:`${f}:${g}`}}if(d.startsWith("#"))return i?{sheetName:i,error:d}:{error:d};const c=this.decodeAddress(d);return i?{sheetName:i,...c}:c},encodeAddress:(l,u)=>o.n2l(u)+l,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(l,u){const[i,d,,h,c]=l,[f,g]=u;return f>=i&&f<=h&&g>=d&&g<=c}};t.exports=o},{}],20:[function(e,t,n){const s=(l,u)=>({...l,...u.reduce((i,d)=>(l[d]&&(i[d]={...l[d]}),i),{})}),o=function(l,u,i){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];l[i]&&(u[i]=s(l[i],d))};n.copyStyle=l=>{if(!l)return l;if(u=l,Object.keys(u).length===0)return{};var u;const i={...l};return o(l,i,"font",["color"]),o(l,i,"alignment"),o(l,i,"protection"),l.border&&(o(l,i,"border"),o(l.border,i.border,"top",["color"]),o(l.border,i.border,"left",["color"]),o(l.border,i.border,"bottom",["color"]),o(l.border,i.border,"right",["color"]),o(l.border,i.border,"diagonal",["color"])),l.fill&&(o(l,i,"fill",["fgColor","bgColor","center"]),l.fill.stops&&(i.fill.stops=l.fill.stops.map(d=>s(d,["color"])))),i}},{}],21:[function(e,t,n){(function(s){(function(){const o=e("crypto"),l={hash(u){const i=o.createHash(u);for(var d=arguments.length,h=new Array(d>1?d-1:0),c=1;c<d;c++)h[c-1]=arguments[c];return i.update(s.concat(h)),i.digest()},convertPasswordToHash(u,i,d,h){if(i=i.toLowerCase(),o.getHashes().indexOf(i)<0)throw new Error(`Hash algorithm '${i}' not supported!`);const c=s.from(u,"utf16le");let f=this.hash(i,s.from(d,"base64"),c);for(let g=0;g<h;g++){const p=s.alloc(4);p.writeUInt32LE(g,0),f=this.hash(i,f,p)}return f.toString("base64")},randomBytes:u=>o.randomBytes(u)};t.exports=l}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,t,n){const{SaxesParser:s}=e("saxes"),{PassThrough:o}=e("readable-stream"),{bufferToString:l}=e("./browser-buffer-decode");t.exports=async function*(u){u.pipe&&!u[Symbol.asyncIterator]&&(u=u.pipe(new o));const i=new s;let d;i.on("error",c=>{d=c});let h=[];i.on("opentag",c=>h.push({eventType:"opentag",value:c})),i.on("text",c=>h.push({eventType:"text",value:c})),i.on("closetag",c=>h.push({eventType:"closetag",value:c}));for await(const c of u){if(i.write(l(c)),d)throw d;yield h,h=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,t,n){const s=e("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,l=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;t.exports={slideFormula:function(u,i,d){const h=s.decode(i),c=s.decode(d);return u.replace(o,(f,g,p,m,v)=>{if(v)return f;const b=l.exec(m);if(b){const M=b[1],D=b[2].toUpperCase(),$=b[3],A=b[4];if(D.length>3||D.length===3&&D>"XFD")return f;let H=s.l2n(D),N=parseInt(A,10);return M||(H+=c.col-h.col),$||(N+=c.row-h.row),(g||"")+(M||"")+s.n2l(H)+($||"")+N}return f})}}},{"./col-cache":19}],24:[function(e,t,n){(function(s,o){(function(){const l=e("readable-stream"),u=e("./utils"),i=e("./string-buf");class d{constructor(m,v){this._data=m,this._encoding=v}get length(){return this.toBuffer().length}copy(m,v,b,M){return this.toBuffer().copy(m,v,b,M)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class h{constructor(m){this._data=m}get length(){return this._data.length}copy(m,v,b,M){return this._data._buf.copy(m,v,b,M)}toBuffer(){return this._data.toBuffer()}}class c{constructor(m){this._data=m}get length(){return this._data.length}copy(m,v,b,M){this._data.copy(m,v,b,M)}toBuffer(){return this._data}}class f{constructor(m){this.size=m,this.buffer=o.alloc(m),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const m=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(m,0,this.iRead,this.iWrite),m}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(m){let v;return m===0?null:m===void 0||m>=this.length?(v=this.toBuffer(),this.iRead=this.iWrite,v):(v=o.alloc(m),this.buffer.copy(v,0,this.iRead,m),this.iRead+=m,v)}write(m,v,b){const M=Math.min(b,this.size-this.iWrite);return m.copy(this.buffer,this.iWrite,v,v+M),this.iWrite+=M,M}}const g=function(p){p=p||{},this.bufSize=p.bufSize||1048576,this.buffers=[],this.batch=p.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};u.inherits(g,l.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(p=>p.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const m=this.buffers[this.buffers.length-1];if(!m.full)return m}const p=new f(this.bufSize);return this.buffers.push(p),p},async _pipe(p){await Promise.all(this.pipes.map(function(m){return new Promise(v=>{m.write(p.toBuffer(),()=>{v()})})}))},_writeToBuffers(p){let m=0;const v=p.length;for(;m<v;)m+=this._getWritableBuffer().write(p,m,v-m)},async write(p,m,v){let b;if(m instanceof Function&&(v=m,m="utf8"),v=v||u.nop,p instanceof i)b=new h(p);else if(p instanceof o)b=new c(p);else{if(!(typeof p=="string"||p instanceof String||p instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");b=new d(p,m)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(b);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(b),s.nextTick(v)):(await this._pipe(b),v());else this.paused||this.emit("data",b.toBuffer()),this._writeToBuffers(b),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(p,m,v){const b=M=>{M?v(M):(this._flush(),this.pipes.forEach(D=>{D.end()}),this.emit("finish"))};p?this.write(p,m,b):b()},read(p){let m;if(p){for(m=[];p&&this.buffers.length&&!this.buffers[0].eod;){const v=this.buffers[0],b=v.read(p);p-=b.length,m.push(b),v.eod&&v.full&&this.buffers.shift()}return o.concat(m)}return m=this.buffers.map(v=>v.toBuffer()).filter(Boolean),this.buffers=[],o.concat(m)},setEncoding(p){this.encoding=p},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(p){this.pipes.push(p),!this.paused&&this.buffers.length&&this.end()},unpipe(p){this.pipes=this.pipes.filter(m=>m!==p)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),t.exports=g}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,t,n){(function(s){(function(){t.exports=class{constructor(o){this._buf=s.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=s.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let l=2*this._buf.length;for(;l<o;)l*=2;const u=s.alloc(l);this._buf.copy(u,0),this._buf=u}addText(o){this._buffer=void 0;let l=this._inPos+this._buf.write(o,this._inPos,this._encoding);for(;l>=this._buf.length-4;)this._grow(this._inPos+o.length),l=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=l}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,t,n){const{toString:s}=Object.prototype,o=/["&<>]/,l={each:function(u,i){u&&(Array.isArray(u)?u.forEach(i):Object.keys(u).forEach(d=>{i(u[d],d)}))},some:function(u,i){return!!u&&(Array.isArray(u)?u.some(i):Object.keys(u).some(d=>i(u[d],d)))},every:function(u,i){return!u||(Array.isArray(u)?u.every(i):Object.keys(u).every(d=>i(u[d],d)))},map:function(u,i){return u?Array.isArray(u)?u.map(i):Object.keys(u).map(d=>i(u[d],d)):[]},keyBy:(u,i)=>u.reduce((d,h)=>(d[h[i]]=h,d),{}),isEqual:function(u,i){const d=typeof u,h=typeof i,c=Array.isArray(u),f=Array.isArray(i);let g;if(d!==h)return!1;switch(typeof u){case"object":if(c||f)return!(!c||!f)&&u.length===i.length&&u.every((p,m)=>{const v=i[m];return l.isEqual(p,v)});if(u===null||i===null)return u===i;if(g=Object.keys(u),Object.keys(i).length!==g.length)return!1;for(const p of g)if(!i.hasOwnProperty(p))return!1;return l.every(u,(p,m)=>{const v=i[m];return l.isEqual(p,v)});default:return u===i}},escapeHtml(u){const i=o.exec(u);if(!i)return u;let d="",h="",c=0,f=i.index;for(;f<u.length;f++){switch(u.charAt(f)){case'"':h=""";break;case"&":h="&";break;case"'":h="'";break;case"<":h="<";break;case">":h=">";break;default:continue}c!==f&&(d+=u.substring(c,f)),c=f+1,d+=h}return c!==f?d+u.substring(c,f):d},strcmp:(u,i)=>u<i?-1:u>i?1:0,isUndefined:u=>s.call(u)==="[object Undefined]",isObject:u=>s.call(u)==="[object Object]",deepMerge(){const u=arguments[0]||{},{length:i}=arguments;let d,h,c;function f(g,p){d=u[p],c=Array.isArray(g),l.isObject(g)||c?(c?(c=!1,h=d&&Array.isArray(d)?d:[]):h=d&&l.isObject(d)?d:{},u[p]=l.deepMerge(h,g)):l.isUndefined(g)||(u[p]=g)}for(let g=0;g<i;g++)l.each(arguments[g],f);return u}};t.exports=l},{}],27:[function(e,t,n){(function(s,o){(function(){const l=e("fs"),u=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,i={nop(){},promiseImmediate:d=>new Promise(h=>{s.setImmediate?o(()=>{h(d)}):setTimeout(()=>{h(d)},1)}),inherits:function(d,h,c,f){d.super_=h,f||(f=c,c=null),c&&Object.keys(c).forEach(p=>{Object.defineProperty(d,p,Object.getOwnPropertyDescriptor(c,p))});const g={constructor:{value:d,enumerable:!1,writable:!1,configurable:!0}};f&&Object.keys(f).forEach(p=>{g[p]=Object.getOwnPropertyDescriptor(f,p)}),d.prototype=Object.create(h.prototype,g)},dateToExcel:(d,h)=>25569+d.getTime()/864e5-(h?1462:0),excelToDate(d,h){const c=Math.round(24*(d-25569+(h?1462:0))*3600*1e3);return new Date(c)},parsePath(d){const h=d.lastIndexOf("/");return{path:d.substring(0,h),name:d.substring(h+1)}},getRelsPath(d){const h=i.parsePath(d);return`${h.path}/_rels/${h.name}.rels`},xmlEncode(d){const h=u.exec(d);if(!h)return d;let c="",f="",g=0,p=h.index;for(;p<d.length;p++){const m=d.charCodeAt(p);switch(m){case 34:f=""";break;case 38:f="&";break;case 39:f="'";break;case 60:f="<";break;case 62:f=">";break;case 127:f="";break;default:if(m<=31&&(m<=8||m>=11&&m!==13)){f="";break}continue}g!==p&&(c+=d.substring(g,p)),g=p+1,f&&(c+=f)}return g!==p?c+d.substring(g,p):c},xmlDecode:d=>d.replace(/&([a-z]*);/g,h=>{switch(h){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return h}}),validInt(d){const h=parseInt(d,10);return Number.isNaN(h)?0:h},isDateFmt(d){return d?(d=(d=d.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:d=>new Promise(h=>{l.access(d,l.constants.F_OK,c=>{h(!c)})})},toIsoDateString:d=>d.toIsoString().subsstr(0,10),parseBoolean:d=>d===!0||d==="true"||d===1||d==="1"};t.exports=i}).call(this)}).call(this,typeof Rt<"u"?Rt:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,t,n){const s=e("./under-dash"),o=e("./utils");function l(d,h,c){d.push(` ${h}="${o.xmlEncode(c.toString())}"`)}function u(d,h){if(h){const c=[];s.each(h,(f,g)=>{f!==void 0&&l(c,g,f)}),d.push(c.join(""))}}class i{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(h){const c=this._xml;c.push("<?xml"),u(c,h),c.push(`?>
|
|
60
|
+
*/var rc=function(a,e){return rc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])},rc(a,e)};function Ar(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");rc(r,a);function e(){this.constructor=r}r.prototype=a===null?Object.create(a):(e.prototype=a.prototype,new e)}var tr=function(){return tr=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},tr.apply(this,arguments)};function ia(r,a,e){if(e||arguments.length===2)for(var t=0,n=a.length,s;t<n;t++)(s||!(t in a))&&(s||(s=Array.prototype.slice.call(a,0,t)),s[t]=a[t]);return r.concat(s||Array.prototype.slice.call(a))}typeof SuppressedError=="function"&&SuppressedError;var rde=function(r){var a=r.showTimeSelectOnly,e=a===void 0?!1:a,t=r.showTime,n=t===void 0?!1:t,s=r.className,o=r.children,l=e?"Choose Time":"Choose Date".concat(n?" and Time":"");return le.createElement("div",{className:s,role:"dialog","aria-label":l,"aria-modal":"true"},o)},nde=function(r,a){var e=le.useRef(null),t=le.useRef(r);t.current=r;var n=le.useCallback(function(s){var o,l=s.composed&&s.composedPath&&s.composedPath().find(function(u){return u instanceof Node})||s.target;e.current&&!e.current.contains(l)&&(a&&l instanceof HTMLElement&&l.classList.contains(a)||(o=t.current)===null||o===void 0||o.call(t,s))},[a]);return le.useEffect(function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[n]),e},ju=function(r){var a=r.children,e=r.onClickOutside,t=r.className,n=r.containerRef,s=r.style,o=r.ignoreClass,l=nde(e,o);return le.createElement("div",{className:t,style:s,ref:function(u){l.current=u,n&&(n.current=u)}},a)},dt;(function(r){r.ArrowUp="ArrowUp",r.ArrowDown="ArrowDown",r.ArrowLeft="ArrowLeft",r.ArrowRight="ArrowRight",r.PageUp="PageUp",r.PageDown="PageDown",r.Home="Home",r.End="End",r.Enter="Enter",r.Space=" ",r.Tab="Tab",r.Escape="Escape",r.Backspace="Backspace",r.X="x"})(dt||(dt={}));function Vp(){var r=typeof window<"u"?window:globalThis;return r}var us=12;function lr(r){if(r==null)return new Date;var a=typeof r=="string"?jh(r):Ce(r);return Ou(a)?a:new Date}function nc(r,a,e,t,n){n===void 0&&(n=lr());for(var s=fo(e)||fo(ic()),o=Array.isArray(a)?a:[a],l=0,u=o;l<u.length;l++){var i=u[l],d=Yl(r,i,n,{locale:s,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(Ou(d)&&(!t||r===vr(d,i,e)))return d}return null}function Ou(r,a){return Sn(r)&&!Xa(r,new Date("1/1/1800"))}function vr(r,a,e){if(e==="en")return Qi(r,a,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?fo(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||fo(ic()),Qi(r,a,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Cn(r,a){var e=a.dateFormat,t=a.locale,n=Array.isArray(e)&&e.length>0?e[0]:e;return r&&vr(r,n,t)||""}function ade(r,a,e){if(!r)return"";var t=Cn(r,e),n=a?Cn(a,e):"";return"".concat(t," - ").concat(n)}function ide(r,a){if(!(r!=null&&r.length))return"";var e=r[0]?Cn(r[0],a):"";if(r.length===1)return e;if(r.length===2&&r[1]){var t=Cn(r[1],a);return"".concat(e,", ").concat(t)}var n=r.length-1;return"".concat(e," (+").concat(n,")")}function ac(r,a){var e=a.hour,t=e===void 0?0:e,n=a.minute,s=n===void 0?0:n,o=a.second,l=o===void 0?0:o;return zo(Lo(Ho(r,l),s),t)}function ode(r){return Zs(r)}function sde(r,a){return vr(r,"ddd",a)}function Nu(r){return ma(r)}function ei(r,a,e){var t=fo(a||ic());return Nr(r,{locale:t,weekStartsOn:e})}function ka(r){return Ui(r)}function ls(r){return Gi(r)}function Yp(r){return Ha(r)}function Xp(){return ma(lr())}function qp(r){return qi(r)}function ude(r){return zl(r)}function lde(r){return Ao(r)}function oa(r,a){return r&&a?Ql(r,a):!r&&!a}function nn(r,a){return r&&a?Ul(r,a):!r&&!a}function Au(r,a){return r&&a?Gl(r,a):!r&&!a}function rr(r,a){return r&&a?Xi(r,a):!r&&!a}function Ti(r,a){return r&&a?vh(r,a):!r&&!a}function ds(r,a,e){var t,n=ma(a),s=qi(e);try{t=Zi(r,{start:n,end:s})}catch{t=!1}return t}function ic(){var r=Vp();return r.__localeId__}function fo(r){if(typeof r=="string"){var a=Vp();return a.__localeData__?a.__localeData__[r]:void 0}else return r}function dde(r,a,e){return a(vr(r,"EEEE",e))}function cde(r,a){return vr(r,"EEEEEE",a)}function fde(r,a){return vr(r,"EEE",a)}function oc(r,a){return vr(dn(lr(),r),"LLLL",a)}function Up(r,a){return vr(dn(lr(),r),"LLL",a)}function hde(r,a){return vr(wi(lr(),r),"QQQ",a)}function $n(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.excludeDateIntervals,l=e.includeDates,u=e.includeDateIntervals,i=e.filterDate;return cs(r,{minDate:t,maxDate:n})||s&&s.some(function(d){return d instanceof Date?rr(r,d):rr(r,d.date)})||o&&o.some(function(d){var h=d.start,c=d.end;return Zi(r,{start:h,end:c})})||l&&!l.some(function(d){return rr(r,d)})||u&&!u.some(function(d){var h=d.start,c=d.end;return Zi(r,{start:h,end:c})})||i&&!i(lr(r))||!1}function sc(r,a){var e=a===void 0?{}:a,t=e.excludeDates,n=e.excludeDateIntervals;return n&&n.length>0?n.some(function(s){var o=s.start,l=s.end;return Zi(r,{start:o,end:l})}):t&&t.some(function(s){var o;return s instanceof Date?rr(r,s):rr(r,(o=s.date)!==null&&o!==void 0?o:new Date)})||!1}function Gp(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.includeDates,l=e.filterDate;return cs(r,{minDate:t?Ui(t):void 0,maxDate:n?Ao(n):void 0})||(s==null?void 0:s.some(function(u){return nn(r,u instanceof Date?u:u.date)}))||o&&!o.some(function(u){return nn(r,u)})||l&&!l(lr(r))||!1}function Iu(r,a,e,t){var n=Gt(r),s=Vr(r),o=Gt(a),l=Vr(a),u=Gt(t);return n===o&&n===u?s<=e&&e<=l:n<o?u===n&&s<=e||u===o&&l>=e||u<o&&u>n:!1}function mde(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.includeDates;return cs(r,{minDate:t,maxDate:n})||s&&s.some(function(l){return nn(l instanceof Date?l:l.date,r)})||o&&!o.some(function(l){return nn(l,r)})||!1}function Ru(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.includeDates,l=e.filterDate;return cs(r,{minDate:t,maxDate:n})||(s==null?void 0:s.some(function(u){return Au(r,u instanceof Date?u:u.date)}))||o&&!o.some(function(u){return Au(r,u)})||l&&!l(lr(r))||!1}function Fu(r,a,e){if(!a||!e||!Sn(a)||!Sn(e))return!1;var t=Gt(a),n=Gt(e);return t<=r&&n>=r}function zu(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.maxDate,s=e.excludeDates,o=e.includeDates,l=e.filterDate,u=new Date(r,0,1);return cs(u,{minDate:t?Gi(t):void 0,maxDate:n?Qs(n):void 0})||(s==null?void 0:s.some(function(i){return oa(u,i instanceof Date?i:i.date)}))||o&&!o.some(function(i){return oa(u,i)})||l&&!l(lr(u))||!1}function Lu(r,a,e,t){var n=Gt(r),s=Fa(r),o=Gt(a),l=Fa(a),u=Gt(t);return n===o&&n===u?s<=e&&e<=l:n<o?u===n&&s<=e||u===o&&l>=e||u<o&&u>n:!1}function cs(r,a){var e,t=a===void 0?{}:a,n=t.minDate,s=t.maxDate;return(e=n&&ln(r,n)<0||s&&ln(r,s)>0)!==null&&e!==void 0?e:!1}function Kp(r,a){return a.some(function(e){return Zn(e)===Zn(r)&&Jn(e)===Jn(r)&&ba(e)===ba(r)})}function Qp(r,a){var e=a===void 0?{}:a,t=e.excludeTimes,n=e.includeTimes,s=e.filterTime;return t&&Kp(r,t)||n&&!Kp(r,n)||s&&!s(r)||!1}function Zp(r,a){var e=a.minTime,t=a.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var n=lr();n=zo(n,Zn(r)),n=Lo(n,Jn(r)),n=Ho(n,ba(r));var s=lr();s=zo(s,Zn(e)),s=Lo(s,Jn(e)),s=Ho(s,ba(e));var o=lr();o=zo(o,Zn(t)),o=Lo(o,Jn(t)),o=Ho(o,ba(t));var l;try{l=!Zi(n,{start:s,end:o})}catch{l=!1}return l}function Jp(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.includeDates,s=ya(r,1);return t&&Ra(t,s)>0||n&&n.every(function(o){return Ra(o,s)>0})||!1}function eg(r,a){var e=a===void 0?{}:a,t=e.maxDate,n=e.includeDates,s=bn(r,1);return t&&Ra(s,t)>0||n&&n.every(function(o){return Ra(s,o)>0})||!1}function pde(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.includeDates,s=Gi(r),o=Jl(s,1);return t&&za(t,o)>0||n&&n.every(function(l){return za(l,o)>0})||!1}function gde(r,a){var e=a===void 0?{}:a,t=e.maxDate,n=e.includeDates,s=Qs(r),o=No(s,1);return t&&za(o,t)>0||n&&n.every(function(l){return za(o,l)>0})||!1}function tg(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.includeDates,s=_i(r,1);return t&&pa(t,s)>0||n&&n.every(function(o){return pa(o,s)>0})||!1}function bde(r,a){var e=a===void 0?{}:a,t=e.minDate,n=e.yearItemNumber,s=n===void 0?us:n,o=ls(_i(r,s)),l=ti(o,s).endPeriod,u=t&&Gt(t);return u&&u>l||!1}function rg(r,a){var e=a===void 0?{}:a,t=e.maxDate,n=e.includeDates,s=Un(r,1);return t&&pa(s,t)>0||n&&n.every(function(o){return pa(s,o)>0})||!1}function vde(r,a){var e=a===void 0?{}:a,t=e.maxDate,n=e.yearItemNumber,s=n===void 0?us:n,o=Un(r,s),l=ti(o,s).startPeriod,u=t&&Gt(t);return u&&u<l||!1}function ng(r){var a=r.minDate,e=r.includeDates;if(e&&a){var t=e.filter(function(n){return ln(n,a)>=0});return Ys(t)}else return e?Ys(e):a}function ag(r){var a=r.maxDate,e=r.includeDates;if(e&&a){var t=e.filter(function(n){return ln(n,a)<=0});return Vs(t)}else return e?Vs(e):a}function ig(r,a){var e;r===void 0&&(r=[]),a===void 0&&(a="react-datepicker__day--highlighted");for(var t=new Map,n=0,s=r.length;n<s;n++){var o=r[n];if(Kn(o)){var l=vr(o,"MM.dd.yyyy"),u=t.get(l)||[];u.includes(a)||(u.push(a),t.set(l,u))}else if(typeof o=="object"){var i=Object.keys(o),d=(e=i[0])!==null&&e!==void 0?e:"",h=o[d];if(typeof d=="string"&&Array.isArray(h))for(var c=0,f=h.length;c<f;c++){var g=h[c];if(g){var l=vr(g,"MM.dd.yyyy"),u=t.get(l)||[];u.includes(d)||(u.push(d),t.set(l,u))}}}}return t}function yde(r,a){return r.length!==a.length?!1:r.every(function(e,t){return e===a[t]})}function wde(r,a){r===void 0&&(r=[]),a===void 0&&(a="react-datepicker__day--holidays");var e=new Map;return r.forEach(function(t){var n=t.date,s=t.holidayName;if(Kn(n)){var o=vr(n,"MM.dd.yyyy"),l=e.get(o)||{className:"",holidayNames:[]};if(!("className"in l&&l.className===a&&yde(l.holidayNames,[s]))){l.className=a;var u=l.holidayNames;l.holidayNames=u?ia(ia([],u,!0),[s],!1):[s],e.set(o,l)}}}),e}function _de(r,a,e,t,n){for(var s=n.length,o=[],l=0;l<s;l++){var u=r,i=n[l];i&&(u=Al(u,Zn(i)),u=Yi(u,Jn(i)),u=Il(u,ba(i)));var d=Yi(r,(e+1)*t);va(u,a)&&Xa(u,d)&&i!=null&&o.push(i)}return o}function og(r){return r<10?"0".concat(r):"".concat(r)}function ti(r,a){a===void 0&&(a=us);var e=Math.ceil(Gt(r)/a)*a,t=e-(a-1);return{startPeriod:t,endPeriod:e}}function kde(r){var a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),e=new Date(r.getFullYear(),r.getMonth(),r.getDate(),24);return Math.round((+e-+a)/36e5)}function sg(r){var a=r.getSeconds(),e=r.getMilliseconds();return Ce(r.getTime()-a*1e3-e)}function xde(r,a){return sg(r).getTime()===sg(a).getTime()}function ug(r){if(!Kn(r))throw new Error("Invalid date");var a=new Date(r);return a.setHours(0,0,0,0),a}function lg(r,a){if(!Kn(r)||!Kn(a))throw new Error("Invalid date received");var e=ug(r),t=ug(a);return Xa(e,t)}function dg(r){return r.key===dt.Space}var Mde=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.inputRef=le.createRef(),t.onTimeChange=function(n){var s,o;t.setState({time:n});var l=t.props.date,u=l instanceof Date&&!isNaN(+l),i=u?l:new Date;if(n!=null&&n.includes(":")){var d=n.split(":"),h=d[0],c=d[1];i.setHours(Number(h)),i.setMinutes(Number(c))}(o=(s=t.props).onChange)===null||o===void 0||o.call(s,i)},t.renderTimeInput=function(){var n=t.state.time,s=t.props,o=s.date,l=s.timeString,u=s.customTimeInput;return u?le.cloneElement(u,{date:o,value:n,onChange:t.onTimeChange}):le.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:t.inputRef,onClick:function(){var i;(i=t.inputRef.current)===null||i===void 0||i.focus()},required:!0,value:n,onChange:function(i){t.onTimeChange(i.target.value||l)}})},t.state={time:t.props.timeString},t}return a.getDerivedStateFromProps=function(e,t){return e.timeString!==t.time?{time:e.timeString}:null},a.prototype.render=function(){return le.createElement("div",{className:"react-datepicker__input-time-container"},le.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),le.createElement("div",{className:"react-datepicker-time__input-container"},le.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},a}(le.Component),Pde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.dayEl=le.createRef(),e.handleClick=function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)},e.handleMouseEnter=function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)},e.handleOnKeyDown=function(t){var n,s,o=t.key;o===dt.Space&&(t.preventDefault(),t.key=dt.Enter),(s=(n=e.props).handleOnKeyDown)===null||s===void 0||s.call(n,t)},e.isSameDay=function(t){return rr(e.props.day,t)},e.isKeyboardSelected=function(){var t;if(e.props.disabledKeyboardNavigation)return!1;var n=e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(o){return e.isSameDayOrWeek(o)}):e.isSameDayOrWeek(e.props.selected),s=e.props.preSelection&&e.isDisabled(e.props.preSelection);return!n&&e.isSameDayOrWeek(e.props.preSelection)&&!s},e.isDisabled=function(t){return t===void 0&&(t=e.props.day),$n(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(){return sc(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return rr(e.props.day,ei(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&rr(t,ei(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameDayOrWeek=function(t){return e.isSameDay(t)||e.isSameWeek(t)},e.getHighLightedClass=function(){var t=e.props,n=t.day,s=t.highlightDates;if(!s)return!1;var o=vr(n,"MM.dd.yyyy");return s.get(o)},e.getHolidaysClass=function(){var t,n=e.props,s=n.day,o=n.holidays;if(!o)return[void 0];var l=vr(s,"MM.dd.yyyy");return o.has(l)?[(t=o.get(l))===null||t===void 0?void 0:t.className]:[void 0]},e.isInRange=function(){var t=e.props,n=t.day,s=t.startDate,o=t.endDate;return!s||!o?!1:ds(n,s,o)},e.isInSelectingRange=function(){var t,n=e.props,s=n.day,o=n.selectsStart,l=n.selectsEnd,u=n.selectsRange,i=n.selectsDisabledDaysInRange,d=n.startDate,h=n.endDate,c=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return!(o||l||u)||!c||!i&&e.isDisabled()?!1:o&&h&&(Xa(c,h)||Ti(c,h))?ds(s,c,h):l&&d&&(va(c,d)||Ti(c,d))||u&&d&&!h&&(va(c,d)||Ti(c,d))?ds(s,d,c):!1},e.isSelectingRangeStart=function(){var t;if(!e.isInSelectingRange())return!1;var n=e.props,s=n.day,o=n.startDate,l=n.selectsStart,u=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return l?rr(s,u):rr(s,o)},e.isSelectingRangeEnd=function(){var t;if(!e.isInSelectingRange())return!1;var n=e.props,s=n.day,o=n.endDate,l=n.selectsEnd,u=n.selectsRange,i=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return l||u?rr(s,i):rr(s,o)},e.isRangeStart=function(){var t=e.props,n=t.day,s=t.startDate,o=t.endDate;return!s||!o?!1:rr(s,n)},e.isRangeEnd=function(){var t=e.props,n=t.day,s=t.startDate,o=t.endDate;return!s||!o?!1:rr(o,n)},e.isWeekend=function(){var t=Io(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===Vr(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(Vr(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(lr())},e.isSelected=function(){var t;return e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(n){return e.isSameDayOrWeek(n)}):e.isSameDayOrWeek(e.props.selected)},e.getClassNames=function(t){var n=e.props.dayClassName?e.props.dayClassName(t):void 0;return Fr("react-datepicker__day",n,"react-datepicker__day--"+sde(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSelected(),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isCurrentDay(),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isAfterMonth()||e.isBeforeMonth()},e.getHighLightedClass(),e.getHolidaysClass())},e.getAriaLabel=function(){var t=e.props,n=t.day,s=t.ariaLabelPrefixWhenEnabled,o=s===void 0?"Choose":s,l=t.ariaLabelPrefixWhenDisabled,u=l===void 0?"Not available":l,i=e.isDisabled()||e.isExcluded()?u:o;return"".concat(i," ").concat(vr(n,"PPPP",e.props.locale))},e.getTitle=function(){var t=e.props,n=t.day,s=t.holidays,o=s===void 0?new Map:s,l=t.excludeDates,u=vr(n,"MM.dd.yyyy"),i=[];return o.has(u)&&i.push.apply(i,o.get(u).holidayNames),e.isExcluded()&&i.push(l==null?void 0:l.filter(function(d){return d instanceof Date?rr(d,n):rr(d==null?void 0:d.date,n)}).map(function(d){if(!(d instanceof Date))return d==null?void 0:d.message})),i.join(", ")},e.getTabIndex=function(){var t=e.props.selected,n=e.props.preSelection,s=!(e.props.showWeekPicker&&(e.props.showWeekNumber||!e.isStartOfWeek()))&&(e.isKeyboardSelected()||e.isSameDay(t)&&rr(n,t))?0:-1;return s},e.handleFocusDay=function(){var t;e.shouldFocusDay()&&((t=e.dayEl.current)===null||t===void 0||t.focus({preventScroll:!0}))},e.renderDayContents=function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(ru(e.props.day),e.props.day):ru(e.props.day)},e.render=function(){return le.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.props.usePointerEvent?void 0:e.handleMouseEnter,onPointerEnter:e.props.usePointerEvent?e.handleMouseEnter:void 0,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"option",title:e.getTitle(),"aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents(),e.getTitle()!==""&&le.createElement("span",{className:"overlay"},e.getTitle()))},e}return a.prototype.componentDidMount=function(){this.handleFocusDay()},a.prototype.componentDidUpdate=function(){this.handleFocusDay()},a.prototype.shouldFocusDay=function(){var e=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(e=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(e=!1),this.isDayActiveElement()&&(e=!0),this.isDuplicateDay()&&(e=!1)),e},a.prototype.isDayActiveElement=function(){var e,t,n;return((t=(e=this.props.containerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.contains(document.activeElement))&&((n=document.activeElement)===null||n===void 0?void 0:n.classList.contains("react-datepicker__day"))},a.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},a}(le.Component),Sde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.weekNumberEl=le.createRef(),e.handleClick=function(t){e.props.onClick&&e.props.onClick(t)},e.handleOnKeyDown=function(t){var n,s,o=t.key;o===dt.Space&&(t.preventDefault(),t.key=dt.Enter),(s=(n=e.props).handleOnKeyDown)===null||s===void 0||s.call(n,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!rr(e.props.date,e.props.selected)&&rr(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||rr(e.props.date,e.props.selected)&&rr(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var n=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&rr(e.props.date,e.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(n=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(n=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(n=!0)),n&&e.weekNumberEl.current&&e.weekNumberEl.current.focus({preventScroll:!0})},e}return Object.defineProperty(a,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},a.prototype.componentDidUpdate=function(e){this.handleFocusWeekNumber(e)},a.prototype.render=function(){var e=this.props,t=e.weekNumber,n=e.isWeekDisabled,s=e.ariaLabelPrefix,o=s===void 0?a.defaultProps.ariaLabelPrefix:s,l=e.onClick,u={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!l&&!n,"react-datepicker__week-number--selected":!!l&&rr(this.props.date,this.props.selected)};return le.createElement("div",{ref:this.weekNumberEl,className:Fr(u),"aria-label":"".concat(o," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},a}(le.Component),Dde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.isDisabled=function(t){return $n(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.handleDayClick=function(t,n){e.props.onDayClick&&e.props.onDayClick(t,n)},e.handleDayMouseEnter=function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)},e.handleWeekClick=function(t,n,s){for(var o,l,u,i=new Date(t),d=0;d<7;d++){var h=new Date(t);h.setDate(h.getDate()+d);var c=!e.isDisabled(h);if(c){i=h;break}}typeof e.props.onWeekSelect=="function"&&e.props.onWeekSelect(i,n,s),e.props.showWeekPicker&&e.handleDayClick(i,s),((o=e.props.shouldCloseOnSelect)!==null&&o!==void 0?o:a.defaultProps.shouldCloseOnSelect)&&((u=(l=e.props).setOpen)===null||u===void 0||u.call(l,!1))},e.formatWeekNumber=function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):ode(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),n=Rr(t,6),s=new Date(t);s<=n;){if(!e.isDisabled(s))return!1;s=Rr(s,1)}return!0},e.renderDays=function(){var t=e.startOfWeek(),n=[],s=e.formatWeekNumber(t);if(e.props.showWeekNumber){var o=e.props.onWeekSelect||e.props.showWeekPicker?e.handleWeekClick.bind(e,t,s):void 0;n.push(le.createElement(Sde,tr({key:"W"},a.defaultProps,e.props,{weekNumber:s,isWeekDisabled:e.isWeekDisabled(),date:t,onClick:o})))}return n.concat([0,1,2,3,4,5,6].map(function(l){var u=Rr(t,l);return le.createElement(Pde,tr({},a.defaultProps,e.props,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:u.valueOf(),day:u,onClick:e.handleDayClick.bind(e,u),onMouseEnter:e.handleDayMouseEnter.bind(e,u)}))}))},e.startOfWeek=function(){return ei(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!rr(e.startOfWeek(),e.props.selected)&&rr(e.startOfWeek(),e.props.preSelection)},e}return Object.defineProperty(a,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),a.prototype.render=function(){var e={"react-datepicker__week":!0,"react-datepicker__week--selected":rr(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return le.createElement("div",{className:Fr(e)},this.renderDays())},a}(le.Component),fs,Tde=6,ho={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},uc=(fs={},fs[ho.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},fs[ho.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},fs[ho.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},fs),Hu=1;function cg(r,a){return r?ho.FOUR_COLUMNS:a?ho.TWO_COLUMNS:ho.THREE_COLUMNS}var Cde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.MONTH_REFS=ia([],Array(12),!0).map(function(){return le.createRef()}),e.QUARTER_REFS=ia([],Array(4),!0).map(function(){return le.createRef()}),e.isDisabled=function(t){return $n(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(t){return sc(t,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.handleDayClick=function(t,n){var s,o;(o=(s=e.props).onDayClick)===null||o===void 0||o.call(s,t,n,e.props.orderInDisplay)},e.handleDayMouseEnter=function(t){var n,s;(s=(n=e.props).onDayMouseEnter)===null||s===void 0||s.call(n,t)},e.handleMouseLeave=function(){var t,n;(n=(t=e.props).onMouseLeave)===null||n===void 0||n.call(t)},e.isRangeStartMonth=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate;return!o||!l?!1:nn(dn(s,t),o)},e.isRangeStartQuarter=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate;return!o||!l?!1:Au(wi(s,t),o)},e.isRangeEndMonth=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate;return!o||!l?!1:nn(dn(s,t),l)},e.isRangeEndQuarter=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate;return!o||!l?!1:Au(wi(s,t),l)},e.isInSelectingRangeMonth=function(t){var n,s=e.props,o=s.day,l=s.selectsStart,u=s.selectsEnd,i=s.selectsRange,d=s.startDate,h=s.endDate,c=(n=e.props.selectingDate)!==null&&n!==void 0?n:e.props.preSelection;return!(l||u||i)||!c?!1:l&&h?Iu(c,h,t,o):u&&d||i&&d&&!h?Iu(d,c,t,o):!1},e.isSelectingMonthRangeStart=function(t){var n;if(!e.isInSelectingRangeMonth(t))return!1;var s=e.props,o=s.day,l=s.startDate,u=s.selectsStart,i=dn(o,t),d=(n=e.props.selectingDate)!==null&&n!==void 0?n:e.props.preSelection;return u?nn(i,d):nn(i,l)},e.isSelectingMonthRangeEnd=function(t){var n;if(!e.isInSelectingRangeMonth(t))return!1;var s=e.props,o=s.day,l=s.endDate,u=s.selectsEnd,i=s.selectsRange,d=dn(o,t),h=(n=e.props.selectingDate)!==null&&n!==void 0?n:e.props.preSelection;return u||i?nn(d,h):nn(d,l)},e.isInSelectingRangeQuarter=function(t){var n,s=e.props,o=s.day,l=s.selectsStart,u=s.selectsEnd,i=s.selectsRange,d=s.startDate,h=s.endDate,c=(n=e.props.selectingDate)!==null&&n!==void 0?n:e.props.preSelection;return!(l||u||i)||!c?!1:l&&h?Lu(c,h,t,o):u&&d||i&&d&&!h?Lu(d,c,t,o):!1},e.isWeekInMonth=function(t){var n=e.props.day,s=Rr(t,6);return nn(t,n)||nn(s,n)},e.isCurrentMonth=function(t,n){return Gt(t)===Gt(lr())&&n===Vr(lr())},e.isCurrentQuarter=function(t,n){return Gt(t)===Gt(lr())&&n===Fa(lr())},e.isSelectedMonth=function(t,n,s){return Vr(s)===n&&Gt(t)===Gt(s)},e.isSelectMonthInList=function(t,n,s){return s.some(function(o){return e.isSelectedMonth(t,n,o)})},e.isSelectedQuarter=function(t,n,s){return Fa(t)===n&&Gt(t)===Gt(s)},e.renderWeeks=function(){for(var t=[],n=e.props.fixedHeight,s=0,o=!1,l=ei(ka(e.props.day),e.props.locale,e.props.calendarStartDay),u=function(g){return e.props.showWeekPicker?ei(g,e.props.locale,e.props.calendarStartDay):e.props.preSelection},i=function(g){return e.props.showWeekPicker?ei(g,e.props.locale,e.props.calendarStartDay):e.props.selected},d=e.props.selected?i(e.props.selected):void 0,h=e.props.preSelection?u(e.props.preSelection):void 0;t.push(le.createElement(Dde,tr({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:s,day:l,month:Vr(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:d,preSelection:h,showWeekNumber:e.props.showWeekNumbers}))),!o;){s++,l=pi(l,1);var c=n&&s>=Tde,f=!n&&!e.isWeekInMonth(l);if(c||f)if(e.props.peekNextMonth)o=!0;else break}return t},e.onMonthClick=function(t,n){var s=e.isMonthDisabledForLabelDate(n),o=s.isDisabled,l=s.labelDate;o||e.handleDayClick(ka(l),t)},e.onMonthMouseEnter=function(t){var n=e.isMonthDisabledForLabelDate(t),s=n.isDisabled,o=n.labelDate;s||e.handleDayMouseEnter(ka(o))},e.handleMonthNavigation=function(t,n){var s,o,l,u;(o=(s=e.props).setPreSelection)===null||o===void 0||o.call(s,n),(u=(l=e.MONTH_REFS[t])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus()},e.handleKeyboardNavigation=function(t,n,s){var o,l=e.props,u=l.selected,i=l.preSelection,d=l.setPreSelection,h=l.minDate,c=l.maxDate,f=l.showFourColumnMonthYearPicker,g=l.showTwoColumnMonthYearPicker;if(i){var p=cg(f,g),m=e.getVerticalOffset(p),v=(o=uc[p])===null||o===void 0?void 0:o.grid,b=function(H,N,z){var L,Y,B=N,T=z;switch(H){case dt.ArrowRight:B=bn(N,Hu),T=z===11?0:z+Hu;break;case dt.ArrowLeft:B=ya(N,Hu),T=z===0?11:z-Hu;break;case dt.ArrowUp:B=ya(N,m),T=!((L=v==null?void 0:v[0])===null||L===void 0)&&L.includes(z)?z+12-m:z-m;break;case dt.ArrowDown:B=bn(N,m),T=!((Y=v==null?void 0:v[v.length-1])===null||Y===void 0)&&Y.includes(z)?z-12+m:z+m;break}return{newCalculatedDate:B,newCalculatedMonth:T}},M=function(H,N,z){for(var L=40,Y=H,B=!1,T=0,E=b(Y,N,z),P=E.newCalculatedDate,w=E.newCalculatedMonth;!B;){if(T>=L){P=N,w=z;break}if(h&&P<h){Y=dt.ArrowRight;var _=b(Y,P,w);P=_.newCalculatedDate,w=_.newCalculatedMonth}if(c&&P>c){Y=dt.ArrowLeft;var _=b(Y,P,w);P=_.newCalculatedDate,w=_.newCalculatedMonth}if(mde(P,e.props)){var _=b(Y,P,w);P=_.newCalculatedDate,w=_.newCalculatedMonth}else B=!0;T++}return{newCalculatedDate:P,newCalculatedMonth:w}};if(n===dt.Enter){e.isMonthDisabled(s)||(e.onMonthClick(t,s),d==null||d(u));return}var D=M(n,i,s),$=D.newCalculatedDate,A=D.newCalculatedMonth;switch(n){case dt.ArrowRight:case dt.ArrowLeft:case dt.ArrowUp:case dt.ArrowDown:e.handleMonthNavigation(A,$);break}}},e.getVerticalOffset=function(t){var n,s;return(s=(n=uc[t])===null||n===void 0?void 0:n.verticalNavigationOffset)!==null&&s!==void 0?s:0},e.onMonthKeyDown=function(t,n){var s=e.props,o=s.disabledKeyboardNavigation,l=s.handleOnMonthKeyDown,u=t.key;u!==dt.Tab&&t.preventDefault(),o||e.handleKeyboardNavigation(t,u,n),l&&l(t)},e.onQuarterClick=function(t,n){var s=wi(e.props.day,n);Ru(s,e.props)||e.handleDayClick(Yp(s),t)},e.onQuarterMouseEnter=function(t){var n=wi(e.props.day,t);Ru(n,e.props)||e.handleDayMouseEnter(Yp(n))},e.handleQuarterNavigation=function(t,n){var s,o,l,u;e.isDisabled(n)||e.isExcluded(n)||((o=(s=e.props).setPreSelection)===null||o===void 0||o.call(s,n),(u=(l=e.QUARTER_REFS[t-1])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus())},e.onQuarterKeyDown=function(t,n){var s,o,l=t.key;if(!e.props.disabledKeyboardNavigation)switch(l){case dt.Enter:e.onQuarterClick(t,n),(o=(s=e.props).setPreSelection)===null||o===void 0||o.call(s,e.props.selected);break;case dt.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(n===4?1:n+1,No(e.props.preSelection,1));break;case dt.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(n===1?4:n-1,Jl(e.props.preSelection,1));break}},e.isMonthDisabledForLabelDate=function(t){var n,s=e.props,o=s.day,l=s.minDate,u=s.maxDate,i=s.excludeDates,d=s.includeDates,h=dn(o,t);return{isDisabled:(n=(l||u||i||d)&&Gp(h,e.props))!==null&&n!==void 0?n:!1,labelDate:h}},e.isMonthDisabled=function(t){var n=e.isMonthDisabledForLabelDate(t).isDisabled;return n},e.getMonthClassNames=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate,u=n.preSelection,i=n.monthClassName,d=i?i(dn(s,t)):void 0,h=e.getSelection();return Fr("react-datepicker__month-text","react-datepicker__month-".concat(t),d,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":h?e.isSelectMonthInList(s,t,h):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&u&&e.isSelectedMonth(s,t,u)&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":o&&l?Iu(o,l,t,s):void 0,"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(s,t)})},e.getTabIndex=function(t){if(e.props.preSelection==null)return"-1";var n=Vr(e.props.preSelection),s=e.isMonthDisabledForLabelDate(n).isDisabled,o=t===n&&!(s||e.props.disabledKeyboardNavigation)?"0":"-1";return o},e.getQuarterTabIndex=function(t){if(e.props.preSelection==null)return"-1";var n=Fa(e.props.preSelection),s=Ru(e.props.day,e.props),o=t===n&&!(s||e.props.disabledKeyboardNavigation)?"0":"-1";return o},e.getAriaLabel=function(t){var n=e.props,s=n.chooseDayAriaLabelPrefix,o=s===void 0?"Choose":s,l=n.disabledDayAriaLabelPrefix,u=l===void 0?"Not available":l,i=n.day,d=n.locale,h=dn(i,t),c=e.isDisabled(h)||e.isExcluded(h)?u:o;return"".concat(c," ").concat(vr(h,"MMMM yyyy",d))},e.getQuarterClassNames=function(t){var n=e.props,s=n.day,o=n.startDate,l=n.endDate,u=n.selected,i=n.minDate,d=n.maxDate,h=n.excludeDates,c=n.includeDates,f=n.filterDate,g=n.preSelection,p=n.disabledKeyboardNavigation,m=(i||d||h||c||f)&&Ru(wi(s,t),e.props);return Fr("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":m,"react-datepicker__quarter-text--selected":u?e.isSelectedQuarter(s,t,u):void 0,"react-datepicker__quarter-text--keyboard-selected":!p&&g&&e.isSelectedQuarter(s,t,g)&&!m,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":o&&l?Lu(o,l,t,s):void 0,"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t)})},e.getMonthContent=function(t){var n=e.props,s=n.showFullMonthYearPicker,o=n.renderMonthContent,l=n.locale,u=n.day,i=Up(t,l),d=oc(t,l);return o?o(t,i,d,u):s?d:i},e.getQuarterContent=function(t){var n,s=e.props,o=s.renderQuarterContent,l=s.locale,u=hde(t,l);return(n=o==null?void 0:o(t,u))!==null&&n!==void 0?n:u},e.renderMonths=function(){var t,n=e.props,s=n.showTwoColumnMonthYearPicker,o=n.showFourColumnMonthYearPicker,l=n.day,u=n.selected,i=(t=uc[cg(o,s)])===null||t===void 0?void 0:t.grid;return i==null?void 0:i.map(function(d,h){return le.createElement("div",{className:"react-datepicker__month-wrapper",key:h},d.map(function(c,f){return le.createElement("div",{ref:e.MONTH_REFS[c],key:f,onClick:function(g){e.onMonthClick(g,c)},onKeyDown:function(g){dg(g)&&(g.preventDefault(),g.key=dt.Enter),e.onMonthKeyDown(g,c)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(c)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(c)}:void 0,tabIndex:Number(e.getTabIndex(c)),className:e.getMonthClassNames(c),"aria-disabled":e.isMonthDisabled(c),role:"option","aria-label":e.getAriaLabel(c),"aria-current":e.isCurrentMonth(l,c)?"date":void 0,"aria-selected":u?e.isSelectedMonth(l,c,u):void 0},e.getMonthContent(c))}))})},e.renderQuarters=function(){var t=e.props,n=t.day,s=t.selected,o=[1,2,3,4];return le.createElement("div",{className:"react-datepicker__quarter-wrapper"},o.map(function(l,u){return le.createElement("div",{key:u,ref:e.QUARTER_REFS[u],role:"option",onClick:function(i){e.onQuarterClick(i,l)},onKeyDown:function(i){e.onQuarterKeyDown(i,l)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onQuarterMouseEnter(l)},onPointerEnter:e.props.usePointerEvent?function(){return e.onQuarterMouseEnter(l)}:void 0,className:e.getQuarterClassNames(l),"aria-selected":s?e.isSelectedQuarter(n,l,s):void 0,tabIndex:Number(e.getQuarterTabIndex(l)),"aria-current":e.isCurrentQuarter(n,l)?"date":void 0},e.getQuarterContent(l))}))},e.getClassNames=function(){var t=e.props,n=t.selectingDate,s=t.selectsStart,o=t.selectsEnd,l=t.showMonthYearPicker,u=t.showQuarterYearPicker,i=t.showWeekPicker;return Fr("react-datepicker__month",{"react-datepicker__month--selecting-range":n&&(s||o)},{"react-datepicker__monthPicker":l},{"react-datepicker__quarterPicker":u},{"react-datepicker__weekPicker":i})},e}return a.prototype.getSelection=function(){var e=this.props,t=e.selected,n=e.selectedDates,s=e.selectsMultiple;if(s)return n;if(t)return[t]},a.prototype.render=function(){var e=this.props,t=e.showMonthYearPicker,n=e.showQuarterYearPicker,s=e.day,o=e.ariaLabelPrefix,l=o===void 0?"Month ":o,u=l?l.trim()+" ":"";return le.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(u).concat(vr(s,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():n?this.renderQuarters():this.renderWeeks())},a}(le.Component),$de=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.isSelectedMonth=function(t){return e.props.month===t},e.renderOptions=function(){return e.props.monthNames.map(function(t,n){return le.createElement("div",{className:e.isSelectedMonth(n)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(e,n),"aria-selected":e.isSelectedMonth(n)?"true":void 0},e.isSelectedMonth(n)?le.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)})},e.onChange=function(t){return e.props.onChange(t)},e.handleClickOutside=function(){return e.props.onCancel()},e}return a.prototype.render=function(){return le.createElement(ju,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},a}(le.Component),Ede=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(t){return t.map(function(n,s){return le.createElement("option",{key:n,value:s},n)})},e.renderSelectMode=function(t){return le.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(n){return e.onChange(parseInt(n.target.value))}},e.renderSelectOptions(t))},e.renderReadView=function(t,n){return le.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},le.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),le.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},n[e.props.month]))},e.renderDropdown=function(t){return le.createElement($de,tr({key:"dropdown"},e.props,{monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(t){var n=e.state.dropdownVisible,s=[e.renderReadView(!n,t)];return n&&s.unshift(e.renderDropdown(t)),s},e.onChange=function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return a.prototype.render=function(){var e=this,t=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(s){return Up(s,e.props.locale)}:function(s){return oc(s,e.props.locale)}),n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode(t);break;case"select":n=this.renderSelectMode(t);break}return le.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},n)},a}(le.Component);function Wde(r,a){for(var e=[],t=ka(r),n=ka(a);!va(t,n);)e.push(lr(t)),t=bn(t,1);return e}var jde=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.renderOptions=function(){return t.state.monthYearsList.map(function(n){var s=nu(n),o=oa(t.props.date,n)&&nn(t.props.date,n);return le.createElement("div",{className:o?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:s,onClick:t.onChange.bind(t,s),"aria-selected":o?"true":void 0},o?le.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",vr(n,t.props.dateFormat,t.props.locale))})},t.onChange=function(n){return t.props.onChange(n)},t.handleClickOutside=function(){t.props.onCancel()},t.state={monthYearsList:Wde(t.props.minDate,t.props.maxDate)},t}return a.prototype.render=function(){var e=Fr({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return le.createElement(ju,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},a}(le.Component),Ode=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=ka(e.props.minDate),n=ka(e.props.maxDate),s=[];!va(t,n);){var o=nu(t);s.push(le.createElement("option",{key:o,value:o},vr(t,e.props.dateFormat,e.props.locale))),t=bn(t,1)}return s},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return le.createElement("select",{value:nu(ka(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var n=vr(e.props.date,e.props.dateFormat,e.props.locale);return le.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:e.toggleDropdown},le.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),le.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},n))},e.renderDropdown=function(){return le.createElement(jde,tr({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n},e.onChange=function(t){e.toggleDropdown();var n=lr(t);oa(e.props.date,n)&&nn(e.props.date,n)||e.props.onChange(n)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return a.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return le.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)},a}(le.Component),Nde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={height:null},e.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var t,n,s;e.list&&(e.list.scrollTop=(s=e.centerLi&&a.calcCenterPosition(e.props.monthRef?e.props.monthRef.clientHeight-((n=(t=e.header)===null||t===void 0?void 0:t.clientHeight)!==null&&n!==void 0?n:0):e.list.clientHeight,e.centerLi))!==null&&s!==void 0?s:0)})},e.handleClick=function(t){var n,s;(e.props.minTime||e.props.maxTime)&&Zp(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Qp(t,e.props)||(s=(n=e.props).onChange)===null||s===void 0||s.call(n,t)},e.isSelectedTime=function(t){return e.props.selected&&xde(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&Zp(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Qp(t,e.props)},e.liClasses=function(t){var n,s=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t):void 0];return e.isSelectedTime(t)&&s.push("react-datepicker__time-list-item--selected"),e.isDisabledTime(t)&&s.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(Zn(t)*3600+Jn(t)*60+ba(t))%(((n=e.props.intervals)!==null&&n!==void 0?n:a.defaultProps.intervals)*60)!==0&&s.push("react-datepicker__time-list-item--injected"),s.join(" ")},e.handleOnKeyDown=function(t,n){var s,o;t.key===dt.Space&&(t.preventDefault(),t.key=dt.Enter),(t.key===dt.ArrowUp||t.key===dt.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===dt.ArrowDown||t.key===dt.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===dt.Enter&&e.handleClick(n),(o=(s=e.props).handleOnKeyDown)===null||o===void 0||o.call(s,t)},e.renderTimes=function(){for(var t,n=[],s=typeof e.props.format=="string"?e.props.format:"p",o=(t=e.props.intervals)!==null&&t!==void 0?t:a.defaultProps.intervals,l=e.props.selected||e.props.openToDate||lr(),u=Nu(l),i=e.props.injectTimes&&e.props.injectTimes.sort(function(m,v){return m.getTime()-v.getTime()}),d=60*kde(l),h=d/o,c=0;c<h;c++){var f=Yi(u,c*o);if(n.push(f),i){var g=_de(u,f,c,o,i);n=n.concat(g)}}var p=n.reduce(function(m,v){return v.getTime()<=l.getTime()?v:m},n[0]);return n.map(function(m){return le.createElement("li",{key:m.valueOf(),onClick:e.handleClick.bind(e,m),className:e.liClasses(m),ref:function(v){m===p&&(e.centerLi=v)},onKeyDown:function(v){e.handleOnKeyDown(v,m)},tabIndex:m===p?0:-1,role:"option","aria-selected":e.isSelectedTime(m)?"true":void 0,"aria-disabled":e.isDisabledTime(m)?"true":void 0},vr(m,s,e.props.locale))})},e.renderTimeCaption=function(){return e.props.showTimeCaption===!1?le.createElement(le.Fragment,null):le.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(e.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){e.header=t}},le.createElement("div",{className:"react-datepicker-time__header"},e.props.timeCaption))},e}return Object.defineProperty(a,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},a.prototype.render=function(){var e=this,t,n=this.state.height;return le.createElement("div",{className:"react-datepicker__time-container ".concat(((t=this.props.todayButton)!==null&&t!==void 0?t:a.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),le.createElement("div",{className:"react-datepicker__time"},le.createElement("div",{className:"react-datepicker__time-box"},le.createElement("ul",{className:"react-datepicker__time-list",ref:function(s){e.list=s},style:n?{height:n}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},a.calcCenterPosition=function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)},a}(le.Component),fg=3,Ade=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.YEAR_REFS=ia([],Array(t.props.yearItemNumber),!0).map(function(){return le.createRef()}),t.isDisabled=function(n){return $n(n,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(n){return sc(n,{excludeDates:t.props.excludeDates})},t.selectingDate=function(){var n;return(n=t.props.selectingDate)!==null&&n!==void 0?n:t.props.preSelection},t.updateFocusOnPaginate=function(n){var s=function(){var o,l;(l=(o=t.YEAR_REFS[n])===null||o===void 0?void 0:o.current)===null||l===void 0||l.focus()};window.requestAnimationFrame(s)},t.handleYearClick=function(n,s){t.props.onDayClick&&t.props.onDayClick(n,s)},t.handleYearNavigation=function(n,s){var o,l,u,i,d=t.props,h=d.date,c=d.yearItemNumber;if(!(h===void 0||c===void 0)){var f=ti(h,c).startPeriod;t.isDisabled(s)||t.isExcluded(s)||((l=(o=t.props).setPreSelection)===null||l===void 0||l.call(o,s),n-f<0?t.updateFocusOnPaginate(c-(f-n)):n-f>=c?t.updateFocusOnPaginate(Math.abs(c-(n-f))):(i=(u=t.YEAR_REFS[n-f])===null||u===void 0?void 0:u.current)===null||i===void 0||i.focus())}},t.isSameDay=function(n,s){return rr(n,s)},t.isCurrentYear=function(n){return n===Gt(lr())},t.isRangeStart=function(n){return t.props.startDate&&t.props.endDate&&oa(Ln(lr(),n),t.props.startDate)},t.isRangeEnd=function(n){return t.props.startDate&&t.props.endDate&&oa(Ln(lr(),n),t.props.endDate)},t.isInRange=function(n){return Fu(n,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(n){var s=t.props,o=s.selectsStart,l=s.selectsEnd,u=s.selectsRange,i=s.startDate,d=s.endDate;return!(o||l||u)||!t.selectingDate()?!1:o&&d?Fu(n,t.selectingDate(),d):l&&i||u&&i&&!d?Fu(n,i,t.selectingDate()):!1},t.isSelectingRangeStart=function(n){var s;if(!t.isInSelectingRange(n))return!1;var o=t.props,l=o.startDate,u=o.selectsStart,i=Ln(lr(),n);return u?oa(i,(s=t.selectingDate())!==null&&s!==void 0?s:null):oa(i,l??null)},t.isSelectingRangeEnd=function(n){var s;if(!t.isInSelectingRange(n))return!1;var o=t.props,l=o.endDate,u=o.selectsEnd,i=o.selectsRange,d=Ln(lr(),n);return u||i?oa(d,(s=t.selectingDate())!==null&&s!==void 0?s:null):oa(d,l??null)},t.isKeyboardSelected=function(n){if(!(t.props.date===void 0||t.props.selected==null||t.props.preSelection==null)){var s=t.props,o=s.minDate,l=s.maxDate,u=s.excludeDates,i=s.includeDates,d=s.filterDate,h=ls(Ln(t.props.date,n)),c=(o||l||u||i||d)&&zu(n,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!rr(h,ls(t.props.selected))&&rr(h,ls(t.props.preSelection))&&!c}},t.onYearClick=function(n,s){var o=t.props.date;o!==void 0&&t.handleYearClick(ls(Ln(o,s)),n)},t.onYearKeyDown=function(n,s){var o,l,u=n.key,i=t.props,d=i.date,h=i.yearItemNumber,c=i.handleOnKeyDown;if(u!==dt.Tab&&n.preventDefault(),!t.props.disabledKeyboardNavigation)switch(u){case dt.Enter:if(t.props.selected==null)break;t.onYearClick(n,s),(l=(o=t.props).setPreSelection)===null||l===void 0||l.call(o,t.props.selected);break;case dt.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(s+1,Un(t.props.preSelection,1));break;case dt.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(s-1,_i(t.props.preSelection,1));break;case dt.ArrowUp:{if(d===void 0||h===void 0||t.props.preSelection==null)break;var f=ti(d,h).startPeriod,g=fg,p=s-g;if(p<f){var m=h%g;s>=f&&s<f+m?g=m:g+=m,p=s-g}t.handleYearNavigation(p,_i(t.props.preSelection,g));break}case dt.ArrowDown:{if(d===void 0||h===void 0||t.props.preSelection==null)break;var v=ti(d,h).endPeriod,g=fg,p=s+g;if(p>v){var m=h%g;s<=v&&s>v-m?g=m:g+=m,p=s+g}t.handleYearNavigation(p,Un(t.props.preSelection,g));break}}c&&c(n)},t.getYearClassNames=function(n){var s=t.props,o=s.date,l=s.minDate,u=s.maxDate,i=s.selected,d=s.excludeDates,h=s.includeDates,c=s.filterDate,f=s.yearClassName;return Fr("react-datepicker__year-text","react-datepicker__year-".concat(n),o?f==null?void 0:f(Ln(o,n)):void 0,{"react-datepicker__year-text--selected":i?n===Gt(i):void 0,"react-datepicker__year-text--disabled":(l||u||d||h||c)&&zu(n,t.props),"react-datepicker__year-text--keyboard-selected":t.isKeyboardSelected(n),"react-datepicker__year-text--range-start":t.isRangeStart(n),"react-datepicker__year-text--range-end":t.isRangeEnd(n),"react-datepicker__year-text--in-range":t.isInRange(n),"react-datepicker__year-text--in-selecting-range":t.isInSelectingRange(n),"react-datepicker__year-text--selecting-range-start":t.isSelectingRangeStart(n),"react-datepicker__year-text--selecting-range-end":t.isSelectingRangeEnd(n),"react-datepicker__year-text--today":t.isCurrentYear(n)})},t.getYearTabIndex=function(n){if(t.props.disabledKeyboardNavigation||t.props.preSelection==null)return"-1";var s=Gt(t.props.preSelection),o=zu(n,t.props);return n===s&&!o?"0":"-1"},t.getYearContent=function(n){return t.props.renderYearContent?t.props.renderYearContent(n):n},t}return a.prototype.render=function(){var e=this,t=[],n=this.props,s=n.date,o=n.yearItemNumber,l=n.onYearMouseEnter,u=n.onYearMouseLeave;if(s===void 0)return null;for(var i=ti(s,o),d=i.startPeriod,h=i.endPeriod,c=function(p){t.push(le.createElement("div",{ref:f.YEAR_REFS[p-d],onClick:function(m){e.onYearClick(m,p)},onKeyDown:function(m){dg(m)&&(m.preventDefault(),m.key=dt.Enter),e.onYearKeyDown(m,p)},tabIndex:Number(f.getYearTabIndex(p)),className:f.getYearClassNames(p),onMouseEnter:f.props.usePointerEvent?void 0:function(m){return l(m,p)},onPointerEnter:f.props.usePointerEvent?function(m){return l(m,p)}:void 0,onMouseLeave:f.props.usePointerEvent?void 0:function(m){return u(m,p)},onPointerLeave:f.props.usePointerEvent?function(m){return u(m,p)}:void 0,key:p,"aria-current":f.isCurrentYear(p)?"date":void 0},f.getYearContent(p)))},f=this,g=d;g<=h;g++)c(g);return le.createElement("div",{className:"react-datepicker__year"},le.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},t))},a}(le.Component);function Ide(r,a,e,t){for(var n=[],s=0;s<2*a+1;s++){var o=r+a-s,l=!0;e&&(l=Gt(e)<=o),t&&l&&(l=Gt(t)>=o),l&&n.push(o)}return n}var Rde=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;t.renderOptions=function(){var l=t.props.year,u=t.state.yearsList.map(function(h){return le.createElement("div",{className:l===h?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:h,onClick:t.onChange.bind(t,h),"aria-selected":l===h?"true":void 0},l===h?le.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",h)}),i=t.props.minDate?Gt(t.props.minDate):null,d=t.props.maxDate?Gt(t.props.maxDate):null;return(!d||!t.state.yearsList.find(function(h){return h===d}))&&u.unshift(le.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},le.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!i||!t.state.yearsList.find(function(h){return h===i}))&&u.push(le.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},le.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),u},t.onChange=function(l){t.props.onChange(l)},t.handleClickOutside=function(){t.props.onCancel()},t.shiftYears=function(l){var u=t.state.yearsList.map(function(i){return i+l});t.setState({yearsList:u})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var n=e.yearDropdownItemNumber,s=e.scrollableYearDropdown,o=n||(s?10:5);return t.state={yearsList:Ide(t.props.year,o,t.props.minDate,t.props.maxDate)},t.dropdownRef=le.createRef(),t}return a.prototype.componentDidMount=function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,n=t?t.find(function(s){return s.ariaSelected}):null;e.scrollTop=n&&n instanceof HTMLElement?n.offsetTop+(n.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}},a.prototype.render=function(){var e=Fr({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return le.createElement(ju,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},a}(le.Component),Fde=function(r){Ar(a,r);function a(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=e.props.minDate?Gt(e.props.minDate):1900,n=e.props.maxDate?Gt(e.props.maxDate):2100,s=[],o=t;o<=n;o++)s.push(le.createElement("option",{key:o,value:o},o));return s},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return le.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){return le.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(n){return e.toggleDropdown(n)}},le.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),le.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))},e.renderDropdown=function(){return le.createElement(Rde,tr({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n},e.onChange=function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)},e.toggleDropdown=function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)})},e.handleYearChange=function(t,n){var s;(s=e.onSelect)===null||s===void 0||s.call(e,t,n),e.setOpen()},e.onSelect=function(t,n){var s,o;(o=(s=e.props).onSelect)===null||o===void 0||o.call(s,t,n)},e.setOpen=function(){var t,n;(n=(t=e.props).setOpen)===null||n===void 0||n.call(t,!0)},e}return a.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return le.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)},a}(le.Component),zde=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],Lde=function(r){var a=(r.className||"").split(/\s+/);return zde.some(function(e){return a.indexOf(e)>=0})},Hde=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.monthContainer=void 0,t.handleClickOutside=function(n){t.props.onClickOutside(n)},t.setClickOutsideRef=function(){return t.containerRef.current},t.handleDropdownFocus=function(n){var s,o;Lde(n.target)&&((o=(s=t.props).onDropdownFocus)===null||o===void 0||o.call(s,n))},t.getDateInView=function(){var n=t.props,s=n.preSelection,o=n.selected,l=n.openToDate,u=ng(t.props),i=ag(t.props),d=lr(),h=l||o||s;return h||(u&&Xa(d,u)?u:i&&va(d,i)?i:d)},t.increaseMonth=function(){t.setState(function(n){var s=n.date;return{date:bn(s,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(n){var s=n.date;return{date:ya(s,1)}},function(){return t.handleMonthChange(t.state.date)})},t.handleDayClick=function(n,s,o){t.props.onSelect(n,s,o),t.props.setPreSelection&&t.props.setPreSelection(n)},t.handleDayMouseEnter=function(n){t.setState({selectingDate:n}),t.props.onDayMouseEnter&&t.props.onDayMouseEnter(n)},t.handleMonthMouseLeave=function(){t.setState({selectingDate:void 0}),t.props.onMonthMouseLeave&&t.props.onMonthMouseLeave()},t.handleYearMouseEnter=function(n,s){t.setState({selectingDate:Ln(lr(),s)}),t.props.onYearMouseEnter&&t.props.onYearMouseEnter(n,s)},t.handleYearMouseLeave=function(n,s){t.props.onYearMouseLeave&&t.props.onYearMouseLeave(n,s)},t.handleYearChange=function(n){var s,o,l,u;(o=(s=t.props).onYearChange)===null||o===void 0||o.call(s,n),t.setState({isRenderAriaLiveMessage:!0}),t.props.adjustDateOnChange&&(t.props.onSelect(n),(u=(l=t.props).setOpen)===null||u===void 0||u.call(l,!0)),t.props.setPreSelection&&t.props.setPreSelection(n)},t.getEnabledPreSelectionDateForMonth=function(n){if(!$n(n,t.props))return n;for(var s=ka(n),o=lde(n),l=qs(o,s),u=null,i=0;i<=l;i++){var d=Rr(s,i);if(!$n(d,t.props)){u=d;break}}return u},t.handleMonthChange=function(n){var s,o,l,u=(s=t.getEnabledPreSelectionDateForMonth(n))!==null&&s!==void 0?s:n;t.handleCustomMonthChange(u),t.props.adjustDateOnChange&&(t.props.onSelect(u),(l=(o=t.props).setOpen)===null||l===void 0||l.call(o,!0)),t.props.setPreSelection&&t.props.setPreSelection(u)},t.handleCustomMonthChange=function(n){var s,o;(o=(s=t.props).onMonthChange)===null||o===void 0||o.call(s,n),t.setState({isRenderAriaLiveMessage:!0})},t.handleMonthYearChange=function(n){t.handleYearChange(n),t.handleMonthChange(n)},t.changeYear=function(n){t.setState(function(s){var o=s.date;return{date:Ln(o,Number(n))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(n){t.setState(function(s){var o=s.date;return{date:dn(o,Number(n))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(n){t.setState(function(s){var o=s.date;return{date:Ln(dn(o,Vr(n)),Gt(n))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(n){n===void 0&&(n=t.state.date);var s=ei(n,t.props.locale,t.props.calendarStartDay),o=[];return t.props.showWeekNumbers&&o.push(le.createElement("div",{key:"W",className:"react-datepicker__day-name"},t.props.weekLabel||"#")),o.concat([0,1,2,3,4,5,6].map(function(l){var u=Rr(s,l),i=t.formatWeekday(u,t.props.locale),d=t.props.weekDayClassName?t.props.weekDayClassName(u):void 0;return le.createElement("div",{key:l,"aria-label":vr(u,"EEEE",t.props.locale),className:Fr("react-datepicker__day-name",d)},i)}))},t.formatWeekday=function(n,s){return t.props.formatWeekDay?dde(n,t.props.formatWeekDay,s):t.props.useWeekdaysShort?fde(n,s):cde(n,s)},t.decreaseYear=function(){t.setState(function(n){var s,o=n.date;return{date:_i(o,t.props.showYearPicker?(s=t.props.yearItemNumber)!==null&&s!==void 0?s:a.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.clearSelectingDate=function(){t.setState({selectingDate:void 0})},t.renderPreviousButton=function(){var n,s,o;if(!t.props.renderCustomHeader){var l=(n=t.props.monthsShown)!==null&&n!==void 0?n:a.defaultProps.monthsShown,u=t.props.showPreviousMonths?l-1:0,i=(s=t.props.monthSelectedIn)!==null&&s!==void 0?s:u,d=ya(t.state.date,i),h;switch(!0){case t.props.showMonthYearPicker:h=tg(t.state.date,t.props);break;case t.props.showYearPicker:h=bde(t.state.date,t.props);break;case t.props.showQuarterYearPicker:h=pde(t.state.date,t.props);break;default:h=Jp(d,t.props);break}if(!(!((o=t.props.forceShowMonthNavigation)!==null&&o!==void 0?o:a.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&h||t.props.showTimeSelectOnly)){var c=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],f=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(g=t.decreaseYear),h&&t.props.showDisabledMonthNavigation&&(f.push("react-datepicker__navigation--previous--disabled"),g=void 0);var p=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,m=t.props,v=m.previousMonthButtonLabel,b=v===void 0?a.defaultProps.previousMonthButtonLabel:v,M=m.previousYearButtonLabel,D=M===void 0?a.defaultProps.previousYearButtonLabel:M,$=t.props,A=$.previousMonthAriaLabel,H=A===void 0?typeof b=="string"?b:"Previous Month":A,N=$.previousYearAriaLabel,z=N===void 0?typeof D=="string"?D:"Previous Year":N;return le.createElement("button",{type:"button",className:f.join(" "),onClick:g,onKeyDown:t.props.handleOnKeyDown,"aria-label":p?z:H},le.createElement("span",{className:c.join(" ")},p?D:b))}}},t.increaseYear=function(){t.setState(function(n){var s,o=n.date;return{date:Un(o,t.props.showYearPicker?(s=t.props.yearItemNumber)!==null&&s!==void 0?s:a.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.renderNextButton=function(){var n;if(!t.props.renderCustomHeader){var s;switch(!0){case t.props.showMonthYearPicker:s=rg(t.state.date,t.props);break;case t.props.showYearPicker:s=vde(t.state.date,t.props);break;case t.props.showQuarterYearPicker:s=gde(t.state.date,t.props);break;default:s=eg(t.state.date,t.props);break}if(!(!((n=t.props.forceShowMonthNavigation)!==null&&n!==void 0?n:a.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&s||t.props.showTimeSelectOnly)){var o=["react-datepicker__navigation","react-datepicker__navigation--next"],l=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];t.props.showTimeSelect&&o.push("react-datepicker__navigation--next--with-time"),t.props.todayButton&&o.push("react-datepicker__navigation--next--with-today-button");var u=t.increaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(u=t.increaseYear),s&&t.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--next--disabled"),u=void 0);var i=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,d=t.props,h=d.nextMonthButtonLabel,c=h===void 0?a.defaultProps.nextMonthButtonLabel:h,f=d.nextYearButtonLabel,g=f===void 0?a.defaultProps.nextYearButtonLabel:f,p=t.props,m=p.nextMonthAriaLabel,v=m===void 0?typeof c=="string"?c:"Next Month":m,b=p.nextYearAriaLabel,M=b===void 0?typeof g=="string"?g:"Next Year":b;return le.createElement("button",{type:"button",className:o.join(" "),onClick:u,onKeyDown:t.props.handleOnKeyDown,"aria-label":i?M:v},le.createElement("span",{className:l.join(" ")},i?g:c))}}},t.renderCurrentMonth=function(n){n===void 0&&(n=t.state.date);var s=["react-datepicker__current-month"];return t.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),t.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),t.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),le.createElement("h2",{className:s.join(" ")},vr(n,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(n){if(n===void 0&&(n=!1),!(!t.props.showYearDropdown||n))return le.createElement(Fde,tr({},a.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:Gt(t.state.date)}))},t.renderMonthDropdown=function(n){if(n===void 0&&(n=!1),!(!t.props.showMonthDropdown||n))return le.createElement(Ede,tr({},a.defaultProps,t.props,{month:Vr(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(n){if(n===void 0&&(n=!1),!(!t.props.showMonthYearDropdown||n))return le.createElement(Ode,tr({},a.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(n){t.props.onSelect(Xp(),n),t.props.setPreSelection&&t.props.setPreSelection(Xp())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return le.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDefaultHeader=function(n){var s=n.monthDate,o=n.i;return le.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(s),le.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(t.props.dropdownMode),onFocus:t.handleDropdownFocus},t.renderMonthDropdown(o!==0),t.renderMonthYearDropdown(o!==0),t.renderYearDropdown(o!==0)),le.createElement("div",{className:"react-datepicker__day-names"},t.header(s)))},t.renderCustomHeader=function(n){var s,o,l=n.monthDate,u=n.i;if(t.props.showTimeSelect&&!t.state.monthContainer||t.props.showTimeSelectOnly)return null;var i=Jp(t.state.date,t.props),d=eg(t.state.date,t.props),h=tg(t.state.date,t.props),c=rg(t.state.date,t.props),f=!t.props.showMonthYearPicker&&!t.props.showQuarterYearPicker&&!t.props.showYearPicker;return le.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:t.props.onDropdownFocus},(o=(s=t.props).renderCustomHeader)===null||o===void 0?void 0:o.call(s,tr(tr({},t.state),{customHeaderCount:u,monthDate:l,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:i,nextMonthButtonDisabled:d,prevYearButtonDisabled:h,nextYearButtonDisabled:c})),f&&le.createElement("div",{className:"react-datepicker__day-names"},t.header(l)))},t.renderYearHeader=function(n){var s=n.monthDate,o=t.props,l=o.showYearPicker,u=o.yearItemNumber,i=u===void 0?a.defaultProps.yearItemNumber:u,d=ti(s,i),h=d.startPeriod,c=d.endPeriod;return le.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},l?"".concat(h," - ").concat(c):Gt(s))},t.renderHeader=function(n){var s=n.monthDate,o=n.i,l=o===void 0?0:o,u={monthDate:s,i:l};switch(!0){case t.props.renderCustomHeader!==void 0:return t.renderCustomHeader(u);case(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker):return t.renderYearHeader(u);default:return t.renderDefaultHeader(u)}},t.renderMonths=function(){var n,s;if(!(t.props.showTimeSelectOnly||t.props.showYearPicker)){for(var o=[],l=(n=t.props.monthsShown)!==null&&n!==void 0?n:a.defaultProps.monthsShown,u=t.props.showPreviousMonths?l-1:0,i=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Un(t.state.date,u):ya(t.state.date,u),d=(s=t.props.monthSelectedIn)!==null&&s!==void 0?s:u,h=0;h<l;++h){var c=h-d+u,f=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Un(i,c):bn(i,c),g="month-".concat(h),p=h<l-1,m=h>0;o.push(le.createElement("div",{key:g,ref:function(v){t.monthContainer=v??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:f,i:h}),le.createElement(Cde,tr({},a.defaultProps,t.props,{ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:f,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:h,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:m}))))}return o}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return le.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),le.createElement(Ade,tr({},a.defaultProps,t.props,{selectingDate:t.state.selectingDate,date:t.state.date,onDayClick:t.handleDayClick,clearSelectingDate:t.clearSelectingDate,onYearMouseEnter:t.handleYearMouseEnter,onYearMouseLeave:t.handleYearMouseLeave})))},t.renderTimeSection=function(){if(t.props.showTimeSelect&&(t.state.monthContainer||t.props.showTimeSelectOnly))return le.createElement(Nde,tr({},a.defaultProps,t.props,{onChange:t.props.onTimeChange,format:t.props.timeFormat,intervals:t.props.timeIntervals,monthRef:t.state.monthContainer}))},t.renderInputTimeSection=function(){var n=t.props.selected?new Date(t.props.selected):void 0,s=n&&Ou(n)&&!!t.props.selected,o=s?"".concat(og(n.getHours()),":").concat(og(n.getMinutes())):"";if(t.props.showTimeInput)return le.createElement(Mde,tr({},a.defaultProps,t.props,{date:n,timeString:o,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var n,s=ti(t.state.date,(n=t.props.yearItemNumber)!==null&&n!==void 0?n:a.defaultProps.yearItemNumber),o=s.startPeriod,l=s.endPeriod,u;return t.props.showYearPicker?u="".concat(o," - ").concat(l):t.props.showMonthYearPicker||t.props.showQuarterYearPicker?u=Gt(t.state.date):u="".concat(oc(Vr(t.state.date),t.props.locale)," ").concat(Gt(t.state.date)),le.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&u)},t.renderChildren=function(){if(t.props.children)return le.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=le.createRef(),t.state={date:t.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},t}return Object.defineProperty(a,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:us}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){e.setState({monthContainer:e.monthContainer})}())},a.prototype.componentDidUpdate=function(e){var t=this;if(this.props.preSelection&&(!rr(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var n=!nn(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return n&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!rr(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},a.prototype.render=function(){var e=this.props.container||rde;return le.createElement(ju,{onClickOutside:this.handleClickOutside,style:{display:"contents"},containerRef:this.containerRef,ignoreClass:this.props.outsideClickIgnoreClass},le.createElement(e,{className:Fr("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))},a}(le.Component),Bde=function(r){var a=r.icon,e=r.className,t=e===void 0?"":e,n=r.onClick,s="react-datepicker__calendar-icon";if(typeof a=="string")return le.createElement("i",{className:"".concat(s," ").concat(a," ").concat(t),"aria-hidden":"true",onClick:n});if(le.isValidElement(a)){var o=a;return le.cloneElement(o,{className:"".concat(o.props.className||""," ").concat(s," ").concat(t),onClick:function(l){typeof o.props.onClick=="function"&&o.props.onClick(l),typeof n=="function"&&n(l)}})}return le.createElement("svg",{className:"".concat(s," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:n},le.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},hg=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.portalRoot=null,t.el=document.createElement("div"),t}return a.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},a.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},a.prototype.render=function(){return Na.createPortal(this.props.children,this.el)},a}(le.Component),Vde="[tabindex], a, button, input, select, textarea",Yde=function(r){return(r instanceof HTMLAnchorElement||!r.disabled)&&r.tabIndex!==-1},mg=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.getTabChildren=function(){var n;return Array.prototype.slice.call((n=t.tabLoopRef.current)===null||n===void 0?void 0:n.querySelectorAll(Vde),1,-1).filter(Yde)},t.handleFocusStart=function(){var n=t.getTabChildren();n&&n.length>1&&n[n.length-1].focus()},t.handleFocusEnd=function(){var n=t.getTabChildren();n&&n.length>1&&n[0].focus()},t.tabLoopRef=le.createRef(),t}return a.prototype.render=function(){var e;return((e=this.props.enableTabLoop)!==null&&e!==void 0?e:a.defaultProps.enableTabLoop)?le.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},le.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,le.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},a.defaultProps={enableTabLoop:!0},a}(le.Component);function Xde(r){var a=function(e){var t,n=typeof e.hidePopper=="boolean"?e.hidePopper:!0,s=le.useRef(null),o=tde(tr({open:!n,whileElementsMounted:Nle,placement:e.popperPlacement,middleware:ia([tc({padding:15}),zle(10),Lle({element:s})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),l=tr(tr({},e),{hidePopper:n,popperProps:tr(tr({},o),{arrowRef:s})});return le.createElement(r,tr({},l))};return a}var qde=function(r){Ar(a,r);function a(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(a,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),a.prototype.render=function(){var e=this.props,t=e.className,n=e.wrapperClassName,s=e.hidePopper,o=s===void 0?a.defaultProps.hidePopper:s,l=e.popperComponent,u=e.targetComponent,i=e.enableTabLoop,d=e.popperOnKeyDown,h=e.portalId,c=e.portalHost,f=e.popperProps,g=e.showArrow,p=void 0;if(!o){var m=Fr("react-datepicker-popper",t);p=le.createElement(mg,{enableTabLoop:i},le.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:m,"data-placement":f.placement,onKeyDown:d},l,g&&le.createElement(Ule,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(p=le.createElement(this.props.popperContainer,{},p)),h&&!o&&(p=le.createElement(hg,{portalId:h,portalHost:c},p));var v=Fr("react-datepicker-wrapper",n);return le.createElement(le.Fragment,null,le.createElement("div",{ref:f.refs.setReference,className:v},u),p)},a}(le.Component),Ude=Xde(qde),pg="react-datepicker-ignore-onclickoutside";function Gde(r,a){return r&&a?Vr(r)!==Vr(a)||Gt(r)!==Gt(a):r!==a}var lc="Date input not valid.",gg=function(r){Ar(a,r);function a(e){var t=r.call(this,e)||this;return t.calendar=null,t.input=null,t.getPreSelection=function(){return t.props.openToDate?t.props.openToDate:t.props.selectsEnd&&t.props.startDate?t.props.startDate:t.props.selectsStart&&t.props.endDate?t.props.endDate:lr()},t.modifyHolidays=function(){var n;return(n=t.props.holidays)===null||n===void 0?void 0:n.reduce(function(s,o){var l=new Date(o.date);return Ou(l)?ia(ia([],s,!0),[tr(tr({},o),{date:l})],!1):s},[])},t.calcInitialState=function(){var n,s=t.getPreSelection(),o=ng(t.props),l=ag(t.props),u=o&&Xa(s,Nu(o))?o:l&&va(s,qp(l))?l:s;return{open:t.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(n=t.props.selectsRange?t.props.startDate:t.props.selected)!==null&&n!==void 0?n:u,highlightDates:ig(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.resetHiddenStatus=function(){t.setState(tr(tr({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(tr(tr({},t.state),{wasHidden:!0}))},t.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&t.setHiddenStatus()},t.clearPreventFocusTimeout=function(){t.preventFocusTimeout&&clearTimeout(t.preventFocusTimeout)},t.safeFocus=function(){setTimeout(function(){var n,s;(s=(n=t.input)===null||n===void 0?void 0:n.focus)===null||s===void 0||s.call(n,{preventScroll:!0})},0)},t.safeBlur=function(){setTimeout(function(){var n,s;(s=(n=t.input)===null||n===void 0?void 0:n.blur)===null||s===void 0||s.call(n)},0)},t.setFocus=function(){t.safeFocus()},t.setBlur=function(){t.safeBlur(),t.cancelFocusInput()},t.setOpen=function(n,s){s===void 0&&(s=!1),t.setState({open:n,preSelection:n&&t.state.open?t.state.preSelection:t.calcInitialState().preSelection,lastPreSelectChange:dc},function(){n||t.setState(function(o){return{focused:s?o.focused:!1}},function(){!s&&t.setBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return Kn(t.state.preSelection)},t.isCalendarOpen=function(){return t.props.open===void 0?t.state.open&&!t.props.disabled&&!t.props.readOnly:t.props.open},t.handleFocus=function(n){var s,o,l=t.state.wasHidden,u=l?t.state.open:!0;l&&t.resetHiddenStatus(),t.state.preventFocus||((o=(s=t.props).onFocus)===null||o===void 0||o.call(s,n),u&&!t.props.preventOpenOnFocus&&!t.props.readOnly&&t.setOpen(!0)),t.setState({focused:!0})},t.sendFocusBackToInput=function(){t.preventFocusTimeout&&t.clearPreventFocusTimeout(),t.setState({preventFocus:!0},function(){t.preventFocusTimeout=setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})})},t.cancelFocusInput=function(){clearTimeout(t.inputFocusTimeout),t.inputFocusTimeout=void 0},t.deferFocusInput=function(){t.cancelFocusInput(),t.inputFocusTimeout=setTimeout(function(){return t.setFocus()},1)},t.handleDropdownFocus=function(){t.cancelFocusInput()},t.handleBlur=function(n){var s,o;(!t.state.open||t.props.withPortal||t.props.showTimeInput)&&((o=(s=t.props).onBlur)===null||o===void 0||o.call(s,n)),t.state.open&&t.props.open===!1&&t.setOpen(!1),t.setState({focused:!1})},t.handleCalendarClickOutside=function(n){var s,o;t.props.inline||t.setOpen(!1),(o=(s=t.props).onClickOutside)===null||o===void 0||o.call(s,n),t.props.withPortal&&n.preventDefault()},t.handleChange=function(){for(var n,s,o,l,u,i=[],d=0;d<arguments.length;d++)i[d]=arguments[d];var h=i[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,i),!h||typeof h.isDefaultPrevented!="function"||h.isDefaultPrevented()))){t.setState({inputValue:(h==null?void 0:h.target)instanceof HTMLInputElement?h.target.value:null,lastPreSelectChange:Kde});var c=t.props,f=c.selectsRange,g=c.startDate,p=c.endDate,m=(n=t.props.dateFormat)!==null&&n!==void 0?n:a.defaultProps.dateFormat,v=(s=t.props.strictParsing)!==null&&s!==void 0?s:a.defaultProps.strictParsing,b=(h==null?void 0:h.target)instanceof HTMLInputElement?h.target.value:"";if(f){var M=b.split("-",2).map(function(Y){return Y.trim()}),D=M[0],$=M[1],A=nc(D??"",m,t.props.locale,v),H=nc($??"",m,t.props.locale,v),N=(g==null?void 0:g.getTime())!==(A==null?void 0:A.getTime()),z=(p==null?void 0:p.getTime())!==(H==null?void 0:H.getTime());if(!N&&!z||A&&$n(A,t.props)||H&&$n(H,t.props))return;(l=(o=t.props).onChange)===null||l===void 0||l.call(o,[A,H],h)}else{var L=nc(b,m,t.props.locale,v,(u=t.props.selected)!==null&&u!==void 0?u:void 0);(L||!b)&&t.setSelected(L,h,!0)}}},t.handleSelect=function(n,s,o){if(t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&t.sendFocusBackToInput(),t.props.onChangeRaw&&t.props.onChangeRaw(s),t.setSelected(n,s,!1,o),t.props.showDateSelect&&t.setState({isRenderAriaLiveMessage:!0}),!t.props.shouldCloseOnSelect||t.props.showTimeSelect)t.setPreSelection(n);else if(!t.props.inline){t.props.selectsRange||t.setOpen(!1);var l=t.props,u=l.startDate,i=l.endDate;u&&!i&&(t.props.swapRange||!lg(n,u))&&t.setOpen(!1)}},t.setSelected=function(n,s,o,l){var u,i,d=n;if(t.props.showYearPicker){if(d!==null&&zu(Gt(d),t.props))return}else if(t.props.showMonthYearPicker){if(d!==null&&Gp(d,t.props))return}else if(d!==null&&$n(d,t.props))return;var h=t.props,c=h.onChange,f=h.selectsRange,g=h.startDate,p=h.endDate,m=h.selectsMultiple,v=h.selectedDates,b=h.minTime,M=h.swapRange;if(!Ti(t.props.selected,d)||t.props.allowSameDay||f||m)if(d!==null&&(t.props.selected&&(!o||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(d=ac(d,{hour:Zn(t.props.selected),minute:Jn(t.props.selected),second:ba(t.props.selected)})),!o&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&b&&(d=ac(d,{hour:b.getHours(),minute:b.getMinutes(),second:b.getSeconds()})),t.props.inline||t.setState({preSelection:d}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:l})),f){var D=!g&&!p,$=g&&!p,A=g&&p;D?c==null||c([d,null],s):$&&(d===null?c==null||c([null,null],s):lg(d,g)?M?c==null||c([d,g],s):c==null||c([d,null],s):c==null||c([g,d],s)),A&&(c==null||c([d,null],s))}else if(m){if(d!==null)if(!(v!=null&&v.length))c==null||c([d],s);else{var H=v.some(function(z){return rr(z,d)});if(H){var N=v.filter(function(z){return!rr(z,d)});c==null||c(N,s)}else c==null||c(ia(ia([],v,!0),[d],!1),s)}}else c==null||c(d,s);o||((i=(u=t.props).onSelect)===null||i===void 0||i.call(u,d,s),t.setState({inputValue:null}))},t.setPreSelection=function(n){var s=Kn(t.props.minDate),o=Kn(t.props.maxDate),l=!0;if(n){var u=Nu(n);if(s&&o)l=ds(n,t.props.minDate,t.props.maxDate);else if(s){var i=Nu(t.props.minDate);l=va(n,i)||Ti(u,i)}else if(o){var d=qp(t.props.maxDate);l=Xa(n,d)||Ti(u,d)}}l&&t.setState({preSelection:n})},t.toggleCalendar=function(){t.setOpen(!t.state.open)},t.handleTimeChange=function(n){var s,o;if(!(t.props.selectsRange||t.props.selectsMultiple)){var l=t.props.selected?t.props.selected:t.getPreSelection(),u=t.props.selected?n:ac(l,{hour:Zn(n),minute:Jn(n)});t.setState({preSelection:u}),(o=(s=t.props).onChange)===null||o===void 0||o.call(s,u),t.props.shouldCloseOnSelect&&!t.props.showTimeInput&&(t.sendFocusBackToInput(),t.setOpen(!1)),t.props.showTimeInput&&t.setOpen(!0),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),t.setState({inputValue:null})}},t.onInputClick=function(){var n,s;!t.props.disabled&&!t.props.readOnly&&t.setOpen(!0),(s=(n=t.props).onInputClick)===null||s===void 0||s.call(n)},t.onInputKeyDown=function(n){var s,o,l,u,i,d;(o=(s=t.props).onKeyDown)===null||o===void 0||o.call(s,n);var h=n.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(h===dt.ArrowDown||h===dt.ArrowUp||h===dt.Enter)&&((l=t.onInputClick)===null||l===void 0||l.call(t));return}if(t.state.open){if(h===dt.ArrowDown||h===dt.ArrowUp){n.preventDefault();var c=t.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":t.props.showWeekPicker&&t.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':t.props.showFullMonthYearPicker||t.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',f=((u=t.calendar)===null||u===void 0?void 0:u.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(c);f instanceof HTMLElement&&f.focus({preventScroll:!0});return}var g=lr(t.state.preSelection);h===dt.Enter?(n.preventDefault(),n.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===dc?(t.handleSelect(g,n),!t.props.shouldCloseOnSelect&&t.setPreSelection(g)):t.setOpen(!1)):h===dt.Escape?(n.preventDefault(),n.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):h===dt.Tab&&t.setOpen(!1),t.inputOk()||(d=(i=t.props).onInputError)===null||d===void 0||d.call(i,{code:1,msg:lc})}},t.onPortalKeyDown=function(n){var s=n.key;s===dt.Escape&&(n.preventDefault(),t.setState({preventFocus:!0},function(){t.setOpen(!1),setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})}))},t.onDayKeyDown=function(n){var s,o,l,u,i,d,h=t.props,c=h.minDate,f=h.maxDate,g=h.disabledKeyboardNavigation,p=h.showWeekPicker,m=h.shouldCloseOnSelect,v=h.locale,b=h.calendarStartDay,M=h.adjustDateOnChange,D=h.inline;if((o=(s=t.props).onKeyDown)===null||o===void 0||o.call(s,n),!g){var $=n.key,A=n.shiftKey,H=lr(t.state.preSelection),N=function(P,w){var _=w;switch(P){case dt.ArrowRight:_=p?pi(w,1):Rr(w,1);break;case dt.ArrowLeft:_=p?ed(w,1):Ro(w,1);break;case dt.ArrowUp:_=ed(w,1);break;case dt.ArrowDown:_=pi(w,1);break;case dt.PageUp:_=A?_i(w,1):ya(w,1);break;case dt.PageDown:_=A?Un(w,1):bn(w,1);break;case dt.Home:_=ei(w,v,b);break;case dt.End:_=ude(w);break}return _},z=function(P,w){for(var _=40,k=P,x=!1,C=0,O=N(P,w);!x;){if(C>=_){O=w;break}c&&O<c&&(k=dt.ArrowRight,O=$n(c,t.props)?N(k,O):c),f&&O>f&&(k=dt.ArrowLeft,O=$n(f,t.props)?N(k,O):f),$n(O,t.props)?((k===dt.PageUp||k===dt.Home)&&(k=dt.ArrowRight),(k===dt.PageDown||k===dt.End)&&(k=dt.ArrowLeft),O=N(k,O)):x=!0,C++}return O};if($===dt.Enter){n.preventDefault(),t.handleSelect(H,n),!m&&t.setPreSelection(H);return}else if($===dt.Escape){n.preventDefault(),t.setOpen(!1),t.inputOk()||(u=(l=t.props).onInputError)===null||u===void 0||u.call(l,{code:1,msg:lc});return}var L=null;switch($){case dt.ArrowLeft:case dt.ArrowRight:case dt.ArrowUp:case dt.ArrowDown:case dt.PageUp:case dt.PageDown:case dt.Home:case dt.End:L=z($,H);break}if(!L){(d=(i=t.props).onInputError)===null||d===void 0||d.call(i,{code:1,msg:lc});return}if(n.preventDefault(),t.setState({lastPreSelectChange:dc}),M&&t.setSelected(L),t.setPreSelection(L),D){var Y=Vr(H),B=Vr(L),T=Gt(H),E=Gt(L);Y!==B||T!==E?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(n){var s=n.key;s===dt.Escape&&(n.preventDefault(),t.sendFocusBackToInput())},t.onClearClick=function(n){n&&n.preventDefault&&n.preventDefault(),t.sendFocusBackToInput();var s=t.props,o=s.selectsRange,l=s.onChange;o?l==null||l([null,null],n):l==null||l(null,n),t.setState({inputValue:null})},t.clear=function(){t.onClearClick()},t.onScroll=function(n){typeof t.props.closeOnScroll=="boolean"&&t.props.closeOnScroll?(n.target===document||n.target===document.documentElement||n.target===document.body)&&t.setOpen(!1):typeof t.props.closeOnScroll=="function"&&t.props.closeOnScroll(n)&&t.setOpen(!1)},t.renderCalendar=function(){var n,s;return!t.props.inline&&!t.isCalendarOpen()?null:le.createElement(Hde,tr({showMonthYearDropdown:void 0,ref:function(o){t.calendar=o}},t.props,t.state,{setOpen:t.setOpen,dateFormat:(n=t.props.dateFormatCalendar)!==null&&n!==void 0?n:a.defaultProps.dateFormatCalendar,onSelect:t.handleSelect,onClickOutside:t.handleCalendarClickOutside,holidays:wde(t.modifyHolidays()),outsideClickIgnoreClass:pg,onDropdownFocus:t.handleDropdownFocus,onTimeChange:t.handleTimeChange,className:t.props.calendarClassName,container:t.props.calendarContainer,handleOnKeyDown:t.props.onKeyDown,handleOnDayKeyDown:t.onDayKeyDown,setPreSelection:t.setPreSelection,dropdownMode:(s=t.props.dropdownMode)!==null&&s!==void 0?s:a.defaultProps.dropdownMode}),t.props.children)},t.renderAriaLiveRegion=function(){var n=t.props,s=n.dateFormat,o=s===void 0?a.defaultProps.dateFormat:s,l=n.locale,u=t.props.showTimeInput||t.props.showTimeSelect,i=u?"PPPPp":"PPPP",d;return t.props.selectsRange?d="Selected start date: ".concat(Cn(t.props.startDate,{dateFormat:i,locale:l}),". ").concat(t.props.endDate?"End date: "+Cn(t.props.endDate,{dateFormat:i,locale:l}):""):t.props.showTimeSelectOnly?d="Selected time: ".concat(Cn(t.props.selected,{dateFormat:o,locale:l})):t.props.showYearPicker?d="Selected year: ".concat(Cn(t.props.selected,{dateFormat:"yyyy",locale:l})):t.props.showMonthYearPicker?d="Selected month: ".concat(Cn(t.props.selected,{dateFormat:"MMMM yyyy",locale:l})):t.props.showQuarterYearPicker?d="Selected quarter: ".concat(Cn(t.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):d="Selected date: ".concat(Cn(t.props.selected,{dateFormat:i,locale:l})),le.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},d)},t.renderDateInput=function(){var n,s,o,l=Fr(t.props.className,(n={},n[pg]=t.state.open,n)),u=t.props.customInput||le.createElement("input",{type:"text"}),i=t.props.customInputRef||"ref",d=t.props,h=d.dateFormat,c=h===void 0?a.defaultProps.dateFormat:h,f=d.locale,g=typeof t.props.value=="string"?t.props.value:typeof t.state.inputValue=="string"?t.state.inputValue:t.props.selectsRange?ade(t.props.startDate,t.props.endDate,{dateFormat:c,locale:f}):t.props.selectsMultiple?ide((o=t.props.selectedDates)!==null&&o!==void 0?o:[],{dateFormat:c,locale:f}):Cn(t.props.selected,{dateFormat:c,locale:f});return le.cloneElement(u,(s={},s[i]=function(p){t.input=p},s.value=g,s.onBlur=t.handleBlur,s.onChange=t.handleChange,s.onClick=t.onInputClick,s.onFocus=t.handleFocus,s.onKeyDown=t.onInputKeyDown,s.id=t.props.id,s.name=t.props.name,s.form=t.props.form,s.autoFocus=t.props.autoFocus,s.placeholder=t.props.placeholderText,s.disabled=t.props.disabled,s.autoComplete=t.props.autoComplete,s.className=Fr(u.props.className,l),s.title=t.props.title,s.readOnly=t.props.readOnly,s.required=t.props.required,s.tabIndex=t.props.tabIndex,s["aria-describedby"]=t.props.ariaDescribedBy,s["aria-invalid"]=t.props.ariaInvalid,s["aria-labelledby"]=t.props.ariaLabelledBy,s["aria-required"]=t.props.ariaRequired,s))},t.renderClearButton=function(){var n=t.props,s=n.isClearable,o=n.disabled,l=n.selected,u=n.startDate,i=n.endDate,d=n.clearButtonTitle,h=n.clearButtonClassName,c=h===void 0?"":h,f=n.ariaLabelClose,g=f===void 0?"Close":f,p=n.selectedDates;return s&&(l!=null||u!=null||i!=null||p!=null&&p.length)?le.createElement("button",{type:"button",className:Fr("react-datepicker__close-icon",c,{"react-datepicker__close-icon--disabled":o}),disabled:o,"aria-label":g,onClick:t.onClearClick,title:d,tabIndex:-1}):null},t.state=t.calcInitialState(),t.preventFocusTimeout=void 0,t}return Object.defineProperty(a,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:us,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),a.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},a.prototype.componentDidUpdate=function(e,t){var n,s,o,l;e.inline&&Gde(e.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:ig(this.props.highlightDates)}),!t.focused&&!Ti(e.selected,this.props.selected)&&this.setState({inputValue:null}),t.open!==this.state.open&&(t.open===!1&&this.state.open===!0&&((s=(n=this.props).onCalendarOpen)===null||s===void 0||s.call(n)),t.open===!0&&this.state.open===!1&&((l=(o=this.props).onCalendarClose)===null||l===void 0||l.call(o)))},a.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},a.prototype.renderInputContainer=function(){var e=this.props,t=e.showIcon,n=e.icon,s=e.calendarIconClassname,o=e.calendarIconClassName,l=e.toggleCalendarOnIconClick,u=this.state.open;return s&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),le.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&le.createElement(Bde,tr({icon:n,className:Fr(o,!o&&s,u&&"react-datepicker-ignore-onclickoutside")},l?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},a.prototype.render=function(){var e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?le.createElement(mg,{enableTabLoop:this.props.enableTabLoop},le.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=le.createElement(hg,tr({portalId:this.props.portalId},this.props),t)),le.createElement("div",null,this.renderInputContainer(),t)}return le.createElement(Ude,tr({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},a}(le.Component),Kde="input",dc="navigate";const Qde={[_a.GT]:">",[_a.LT]:"<",[_a.EQ]:"="},Zde=le.memo(({columnFilterValue:r,onChange:a,onInputKeyDown:e,propIsRequired:t,propName:n,propSchema:s,translate:o})=>{const{displayTimezone:l}=le.useContext(io),{type:u,format:i,minimum:d,maximum:h}=s||{},c=r,f=i==="date-time";switch(u){case"number":case"integer":const g=c||{},p=(b,M,D)=>{const $={...g,[b]:M.value===""?void 0:parseInt(M.value)},A=Object.values($).find(H=>isFinite(H));a(A!==void 0&&(d===void 0||A>=d)?$:void 0,D)};return Ye.jsxs("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:[t?null:Ye.jsxs("li",{style:{padding:8},children:[Ye.jsxs("label",{className:"d-flex",children:[Ye.jsx("input",{type:"checkbox",style:{marginRight:14},checked:!!g.filterEmpty,onChange:()=>{const{filterEmpty:b,...M}=g;b||(M.filterEmpty=!0),a(Object.keys(M).length?M:void 0,!0)}}),"Hide empty values"]}),Ye.jsx("hr",{})]}),Object.keys(_a).map(b=>{const M=g[b];return Ye.jsxs("li",{children:[Ye.jsx("label",{style:{width:40,paddingLeft:16},children:Qde[b]}),Ye.jsx("input",{className:"form-control",style:{width:120},type:"number",value:M!==void 0?M:"","data-prop-name":n,onChange:D=>{p(b,D.currentTarget,!1)},onBlur:D=>{p(b,D.currentTarget,!0)},onKeyDown:e,min:d,max:h})]},b)})]});case"boolean":const m=["✓","✕"];t||m.push("?");let v=c?"✓":"✕";return c===null&&(v="?"),c===void 0&&(v=""),Ye.jsx("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:Ye.jsx("li",{children:Ye.jsxs("select",{autoFocus:!0,className:"form-select",value:v,"data-prop-name":n,onChange:b=>{switch(b.currentTarget.value){case"✓":a(!0,!0);break;case"✕":a(!1,!0);break;case"?":a(null,!0);break;default:a(void 0,!0)}},children:[Ye.jsx("option",{value:"",children:"All"},"all"),m.map(b=>Ye.jsx("option",{value:b,children:b},`column-filter-select-${b}`))]})})});case"string":if(s!=null&&s.enum)return Ye.jsx("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:Ye.jsx("li",{children:Ye.jsxs("select",{autoFocus:!0,className:"form-select",value:c,"data-prop-name":n,onChange:b=>{a(b.currentTarget.value||void 0,!0)},children:[Ye.jsx("option",{value:"",children:"All"},"all"),s.enum.map(b=>Ye.jsx("option",{value:b,children:o(b)},`column-filter-select-${b}`))]})})});if(f||i==="date"){const b=f?rs:Hd,M=r||{from:void 0,to:void 0,filterEmpty:void 0};return Ye.jsxs("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:[t?null:Ye.jsxs("li",{style:{padding:8},children:[Ye.jsxs("label",{className:"d-flex",children:[Ye.jsx("input",{type:"checkbox",checked:!!M.filterEmpty,onChange:()=>{const{filterEmpty:D,...$}=M;D||($.filterEmpty=!0),a(Object.keys($).length?$:void 0,!0)}}),"Hide empty values"]}),Ye.jsx("hr",{})]}),Ye.jsxs("li",{style:{padding:8},children:[Ye.jsx("label",{style:{width:120,paddingLeft:4},children:"After"}),Ye.jsx(gg,{dateFormat:b,"data-prop-name":n,locale:lu,selected:M.from?eo.toZonedTime(M.from,l||_r.timeZone):null,onChange:D=>{if(!D&&!M.to){a(void 0,!0);return}if(M.to&&D&&D>M.to)return;const $=D?eo.fromZonedTime(D,l||_r.timeZone):void 0;a({...r,from:$},!0)},placeholderText:b,isClearable:!0,selectsStart:!0,showTimeSelect:f,showTimeInput:f,showMonthDropdown:!0,showYearDropdown:!0,timeIntervals:15,shouldCloseOnSelect:!f})]}),Ye.jsxs("li",{style:{padding:8},children:[Ye.jsx("label",{style:{width:120,paddingLeft:4},children:"Before"}),Ye.jsx(gg,{id:"filter-date",dateFormat:b,"data-prop-name":n,locale:lu,selectsEnd:!0,selected:M.to?eo.toZonedTime(M.to,l||_r.timeZone):null,showMonthDropdown:!0,showYearDropdown:!0,onChange:D=>{if(!D&&!M.from){a(void 0,!0);return}const $=D?f?eo.fromZonedTime(D,l||_r.timeZone):qi(D):void 0;M.from&&$&&$<M.from||a({...r,to:$},!0)},placeholderText:b,isClearable:!0,startDate:M.from,endDate:M.to,showTimeInput:f,showTimeSelect:f,timeIntervals:15,shouldCloseOnSelect:!f})]})]})}default:return Ye.jsx("ol",{className:"mig-schema-table-menu mig-schema-table__th-menu__filter-menu-component",children:Ye.jsx("li",{children:Ye.jsx("input",{autoFocus:!0,type:"search",className:"form-control",placeholder:`Search ${n}`,"aria-label":`Search ${n}`,value:c||"","data-prop-name":n,onChange:b=>{a(b.currentTarget.value||void 0,!1)},onKeyDown:e,onBlur:b=>{a(b.currentTarget.value||void 0,!0)}})})})}}),Jde=({isSortable:r,isFilterable:a,onChange:e,onClose:t,onInputKeyDown:n,propConfig:s,propIsRequired:o,propName:l,propSchema:u,referenceElement:i,setFilterSortColumn:d,translate:h,value:c})=>{const f=ec({placement:"bottom-start",elements:{reference:i},middleware:[tc()]}),g=ec({placement:"right-start",middleware:[tc()]});le.useEffect(()=>{const M=D=>{if(!f.elements.floating)return;let $=D.target;for(;$&&f.elements.floating;){if($===f.elements.floating||$===g.elements.floating)return;$=$.parentNode===window.document?null:$.parentNode}t(D)};return window.addEventListener("click",M,{capture:!0}),()=>{window.removeEventListener("click",M,{capture:!0})}},[f.elements.floating,t,g.elements.floating]);const p=(s==null?void 0:s.FilterMenu)||Zde,m=le.useCallback(M=>{d(l,!0),t(M)},[t,l,d]),v=le.useCallback(M=>{d(l,!1),t(M)},[t,l,d]),b=le.useCallback(()=>{e(void 0,!0)},[e]);return!r&&!a?null:Ye.jsxs(Ye.Fragment,{children:[Ye.jsx("div",{className:"mig-schema-table mig-schema-table__th-menu",ref:f.refs.setFloating,style:f.floatingStyles,children:Ye.jsxs("ol",{className:"mig-schema-table-menu",children:[r?Ye.jsxs("li",{onClick:m,style:{padding:8},children:[Ye.jsx("span",{className:"mig-schema-table__th-menu__icon",children:"↓"})," ",h("sortAscending")]}):null,r?Ye.jsxs("li",{onClick:v,style:{padding:8},children:[Ye.jsx("span",{className:"mig-schema-table__th-menu__icon",children:"↑"})," ",h("sortDescending")]}):null,a?Ye.jsxs("li",{style:{padding:8},onMouseOver:M=>{g.refs.setReference(M.currentTarget)},children:[Ye.jsx("span",{className:"mig-schema-table__th-menu__icon",children:Ye.jsx("input",{type:"checkbox",id:"mig-schema-table__th-menu__filters",checked:c!==void 0,disabled:c===void 0,onChange:b})}),Ye.jsx("label",{htmlFor:"mig-schema-table__th-menu__filters",children:h("filters")}),Ye.jsx("div",{className:"mig-schema-table__th-menu__sub-menu-indicator"})]}):null]})}),g.elements.reference?Ye.jsx("div",{className:"mig-schema-table mig-schema-table__th-menu__sub-menu",ref:g.refs.setFloating,style:g.floatingStyles,children:Ye.jsx(p,{columnFilterValue:c,onChange:e,onInputKeyDown:n,propIsRequired:o,propName:l,propSchema:u,translate:h})}):null]})},ece=le.memo(Jde),tce=({columnWidths:r,resizeColumnIndex:a,setResizeColumnIndex:e,tableBodyHeight:t})=>{const[n,s]=le.useState(0),o=_p(),l=le.useCallback(h=>{const c=r.map((f,g)=>g===a?Math.max(f+h,Bd):f);o(c)},[r,a,o]);let u=0;const i=le.useCallback(h=>{e(parseInt(h.currentTarget.dataset.columnIndex)),s(h.clientX)},[e]),d=le.useCallback(h=>{l(h.clientX-n),s(0),e(-1)},[n,l,e]);return Ye.jsx("div",{children:[...r].map((h,c)=>{u+=h;const f=["mig-schema-table__column_resizer"];return c===a&&f.push("mig-schema-table__column_resizer--dragged"),Ye.jsx("div",{style:{left:u-vp,bottom:t},className:f.join(" "),draggable:"true","data-column-index":c,onDragStart:i,onDragEnd:d},c)})})};function bg(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r}function rce(r){var a=r.lastRenderedStartIndex,e=r.lastRenderedStopIndex,t=r.startIndex,n=r.stopIndex;return!(t>e||n<a)}function nce(r){for(var a=r.isItemLoaded,e=r.itemCount,t=r.minimumBatchSize,n=r.startIndex,s=r.stopIndex,o=[],l=null,u=null,i=n;i<=s;i++){var d=a(i);d?u!==null&&(o.push(l,u),l=u=null):(u=i,l===null&&(l=i))}if(u!==null){for(var h=Math.min(Math.max(u,l+t-1),e-1),c=u+1;c<=h&&!a(c);c++)u=c;o.push(l,u)}if(o.length)for(;o[1]-o[0]+1<t&&o[0]>0;){var f=o[0]-1;if(!a(f))o[0]=f;else break}return o}var ace=function(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")},ice=function(){function r(a,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(a,n.key,n)}}return function(a,e,t){return e&&r(a.prototype,e),t&&r(a,t),a}}(),oce=function(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);r.prototype=Object.create(a&&a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a)},vg=function(r,a){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:r},sce=function(r){oce(a,r);function a(){var e,t,n,s;ace(this,a);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return s=(t=(n=vg(this,(e=a.__proto__||Object.getPrototypeOf(a)).call.apply(e,[this].concat(l))),n),n._lastRenderedStartIndex=-1,n._lastRenderedStopIndex=-1,n._memoizedUnloadedRanges=[],n._onItemsRendered=function(i){var d=i.visibleStartIndex,h=i.visibleStopIndex;process.env.NODE_ENV!=="production"&&((!bg(d)||!bg(h))&&console.warn("Invalid onItemsRendered signature; please refer to InfiniteLoader documentation."),typeof n.props.loadMoreRows=="function"&&console.warn('InfiniteLoader "loadMoreRows" prop has been renamed to "loadMoreItems".')),n._lastRenderedStartIndex=d,n._lastRenderedStopIndex=h,n._ensureRowsLoaded(d,h)},n._setRef=function(i){n._listRef=i},t),vg(n,s)}return ice(a,[{key:"resetloadMoreItemsCache",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],t&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){process.env.NODE_ENV!=="production"&&this._listRef==null&&console.warn("Invalid list ref; please refer to InfiniteLoader documentation.")}},{key:"render",value:function(){var t=this.props.children;return t({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(t,n){var s=this.props,o=s.isItemLoaded,l=s.itemCount,u=s.minimumBatchSize,i=u===void 0?10:u,d=s.threshold,h=d===void 0?15:d,c=nce({isItemLoaded:o,itemCount:l,minimumBatchSize:i,startIndex:Math.max(0,t-h),stopIndex:Math.min(l-1,n+h)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some(function(f,g){return c[g]!==f}))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(t){for(var n=this,s=this.props.loadMoreItems||this.props.loadMoreRows,o=function(i){var d=t[i],h=t[i+1],c=s(d,h);c!=null&&c.then(function(){if(rce({lastRenderedStartIndex:n._lastRenderedStartIndex,lastRenderedStopIndex:n._lastRenderedStopIndex,startIndex:d,stopIndex:h})){if(n._listRef==null)return;typeof n._listRef.resetAfterIndex=="function"?n._listRef.resetAfterIndex(d,!0):(typeof n._listRef._getItemStyleCache=="function"&&n._listRef._getItemStyleCache(-1),n._listRef.forceUpdate())}})},l=0;l<t.length;l+=2)o(l)}}]),a}(le.PureComponent);const yg=r=>{const[a,e]=le.useState({width:0,height:0}),t=le.useMemo(()=>wa.debounce(e,100),[]);return le.useEffect(()=>{if(!r)return;const n=new ResizeObserver(s=>{for(const o of s){const{blockSize:l,inlineSize:u}=o.borderBoxSize[0];u&&l&&t({width:u,height:l})}});return n.observe(r),()=>{n.disconnect()}},[t,r]),a},wg=new Date("1000-01-01 00:00:00Z"),uce=new Intl.NumberFormat("nl-NL"),lce=new Intl.NumberFormat("nl-NL",{style:"currency",currency:"EUR"});function dce(r,a){const{TdBody:e,sortByValue:t}=a||{};if(t!==void 0)return t;if(!r)return!1;const{format:n,type:s}=r;return(n==null?void 0:n.startsWith("date"))||s==="boolean"||s==="integer"||s==="number"||!!e}const cce=({CustomElement:r,CustomSearchInput:a,Heading:e=Ub,autoRender:t,checkedIndexes:n,config:s,customElementProps:o,data:l,defaultColumnFilters:u,defaultSortAsc:i=!1,defaultSortColumn:d,disabledCheckedIndexes:h,displayTimezone:c,enableAutoFocus:f=!0,enableRowCounter:g=!0,getRowClassName:p,getRowSelected:m,getSearchQueryFilterResult:v,infiniteLoaderRef:b,isColumnFilterable:M=!0,isExportable:D=!0,isResizable:$=!0,isSearchable:A=!0,isSortable:H=!0,itemCount:N,loadMoreItems:z,maxHeight:L,onRowClick:Y,onRowDoubleClick:B,onSearchEnter:T,onTableDataStateChange:E,rowHeight:P=36,schema:w,searchPlaceholder:_,setCheckedIndexes:k,settingsStorageKey:x,style:C,translate:O=pp,useFilterStateHash:R,variableSizeGridRef:X,width:q})=>{var nt;const[te,F]=le.useState(),[G,j]=le.useState(),[W,V]=le.useState(-1),[Q,ie]=le.useState(-1),[ee,ne]=le.useState(),[be,ve]=le.useState(),re=l instanceof Function,[ce,fe]=le.useState(re?void 0:l),[_e,we]=le.useState(),[me,De]=le.useState({searchQuery:"",columnFilterMap:u||{},sortColumn:d,sortAsc:i}),[Se,Ie]=le.useState(R?_r.parseLocationHash(window.location.hash):null);le.useEffect(()=>{re||fe(l)},[l,re]),le.useEffect(()=>{!re||ce!==void 0||l(Se&&Object.keys(Se).length!==0?{...Se,columnFilterMap:Se.columnFilterMap||{}}:me).then(fe)},[l,re,Se,ce,me]),le.useEffect(()=>{_e||we(me)},[me,_e]),le.useEffect(()=>{if(!R)return;const Re=()=>{Ie(_r.parseLocationHash(window.location.hash))};return window.addEventListener("hashchange",Re),()=>{window.removeEventListener("hashchange",Re)}},[R]),le.useEffect(()=>{if(!R)return;const{columnFilterMap:Re,searchQuery:Be,sortAsc:Ke,sortColumn:qe}=Se||{},ct={searchQuery:Be||"",columnFilterMap:Re||u||{},sortAsc:Ke===void 0?i:Ke,sortColumn:qe===void 0?d:qe};De(oe=>wa.isEqual(ct,oe)?oe:ct)},[Se,R,u,i,d]),le.useEffect(()=>{E&&E(me)},[E,me]);const Je=le.useRef(null),Ge=le.useRef(null),Xe=yg(Je.current),gt=yg(Ge.current),ft=le.useMemo(()=>q||Math.floor(Xe.width||0),[Xe.width,q]),ht=le.useMemo(()=>!wa.isEqual(me,_e)&&re,[me,_e,re]),{properties:lt,required:tt}=le.useMemo(()=>({properties:{},required:[],...w}),[w]),Ve=x?localStorage.getItem(`${x}.columnNames`):null,rt=x?localStorage.getItem(`${x}.columnWidths`):null,it=le.useMemo(()=>{if(te)return te;const Re=Ve?JSON.parse(Ve):void 0;let Be=Object.keys(lt);if(k&&Be.unshift(vn),s){Object.keys(s).forEach(qe=>{Be.includes(qe)||Be.push(qe)});const Ke=Object.entries(s).reduce((qe,[ct,oe])=>(oe.hidden&&qe.push(ct),qe),[]);Be=Be.filter(qe=>!Ke.includes(qe)).sort((qe,ct)=>{let oe=s[qe]?s[qe].order:void 0;oe===void 0&&(oe=Object.keys(lt).findIndex($e=>$e===qe));let pe=s[ct]?s[ct].order:void 0;return pe===void 0&&(pe=Object.keys(lt).findIndex($e=>$e===ct)),ct===vn||qe===vn?0:oe===-1?1:pe===-1?-1:oe-pe})}return(Re==null?void 0:Re.length)===Be.length?Re:Be},[s,te,k,lt,Ve]),st=le.useMemo(()=>ce&&it?ce.map((Re,Be)=>it.reduce((Ke,qe)=>{var $e;const ct=lt[qe],oe=s?s[qe]:void 0;if(oe!=null&&oe.renderData)return Ke[qe]=oe.renderData(Re,Be),Ke;if(!ct||qe===vn)return Ke[qe]="",Ke;const pe=Re?Re[qe]:"";switch(ct.type){case"array":return Ke[qe]=(($e=ct.items)==null?void 0:$e.type)==="string"&&pe?pe.map(Oe=>O(Oe)).join(", "):JSON.stringify(pe),Ke;case"boolean":return Ke[qe]=pe===void 0?"?":pe?"✓":"✕",Ke;case"number":case"integer":return pe===void 0?(Ke[qe]="",Ke):(Ke[qe]=ct.format==="currency"?lce.format(pe):uce.format(pe),Ke);case"string":if(ct.format==="date"&&pe)return Ke[qe]=["2999-12-31","1970-01-01"].includes(pe)?"-":_d(new Date(pe),(oe==null?void 0:oe.dateFormat)||Hd),Ke;if(ct.format==="date-time"&&pe)return Ke[qe]=c?_r.localeFormatInTimeZone(new Date(pe),c,rs):_d(new Date(pe),(oe==null?void 0:oe.dateFormat)||rs),Ke;if(ct.enum)return Ke[qe]=pe?O(pe):"",Ke;default:return Ke[qe]=pe?`${pe}`:"",Ke}},{_index:Be})):void 0,[ce,it,lt,s,O,c]),$t=it?it.length:0,{dynamicWidthColumnCount:Xt,fixedWidthColumnsWidth:mt}=le.useMemo(()=>{let Re=0,Be=0;return(it||[]).forEach(Ke=>{if(Ke===vn){Re+=gp;return}const qe=s?s[Ke]:void 0;qe!=null&&qe.width?Re+=qe.width:Be+=1},0),{dynamicWidthColumnCount:Be,fixedWidthColumnsWidth:Re}},[it,s]),Dt=le.useMemo(()=>{if(G)return new Uint16Array(G);const Re=rt?new Uint16Array(JSON.parse(rt)):void 0,Be=Math.max(Math.floor((ft-mt)/Xt),Bd);let Ke=(ft-mt)%Xt;const qe=new Uint16Array(it.map(ct=>{if(ct===vn)return gp;const oe=s?s[ct]:void 0;return oe!=null&&oe.width?oe==null?void 0:oe.width:Ke?(Ke-=1,Be+1):Be}));return(Re==null?void 0:Re.length)===qe.length?Re:qe},[it,s,G,Xt,mt,rt,ft]),Et=le.useCallback(Re=>Dt?Dt[Re]:1,[Dt]),_t=le.useMemo(()=>{if(!st||!M&&!A||re)return st;const{searchQuery:Re}=me,Be=Re.toLowerCase()||"",Ke=qe=>ce&&v?v(ce[qe._index],Re):!(it&&!it.find(ct=>`${qe[ct]}`.toLowerCase().includes(Be)));return st.filter(qe=>{let ct=Ke(qe);return!ct||!me.columnFilterMap?!1:(Object.entries(me.columnFilterMap).forEach(([oe,pe])=>{var ze;if(!ct||pe===void 0)return;const $e=s?s[oe]:void 0;if(ce&&($e!=null&&$e.filter)){ct=$e.filter(ce[qe._index],pe);return}const Oe=lt[oe],at=(ze=ce[qe._index])==null?void 0:ze[oe];switch(Oe==null?void 0:Oe.type){case"boolean":case"number":case"integer":if(pe&&typeof pe=="object"){pe.filterEmpty&&at===void 0&&(ct=!1);for(const Le of Object.keys(_a)){const Nt=pe[Le];if(ct&&wa.isFinite(Nt))switch(Le){case _a.EQ:at!==Nt&&(ct=!1);break;case _a.GT:at<=Nt&&(ct=!1);break;case _a.LT:at>=Nt&&(ct=!1);break}}}else{if(at===void 0&&pe===null)return!0;ct=at===pe}break;case"string":if(typeof pe=="object"&&(Oe.format==="date"||Oe.format==="date-time")){const{from:Le,to:Nt,filterEmpty:At}=pe;if(!at)ct=!At;else{const It=at?new Date(at):void 0;(At===!1||Le&&(!It||It<Le)||Nt&&(!It||It>Nt))&&(ct=!1)}return}default:if(Oe!=null&&Oe.enum){ct=at===pe;return}ct=`${qe[oe]}`.toLowerCase().includes(`${pe}`.toLowerCase())}}),ct)})},[st,M,A,re,me,v,it,s,ce,lt]),Tt=le.useMemo(()=>{var $e;const{sortAsc:Re,sortColumn:Be}=me;if(!Be||!_t||!ce||re)return _t;const Ke=lt[Be],qe=s?s[Be]:void 0,ct=qe==null?void 0:qe.sort;if(ct)return _t.sort((Oe,at)=>{const ze=ce[Oe._index],Le=ce[at._index];return ze?Le?ct(ze,Le,Re===void 0?i:Re):-1:1});const oe=Ke&&(($e=Ke.format)==null?void 0:$e.startsWith("date")),pe=dce(Ke,qe);return _t.sort((Oe,at)=>{let ze=pe&&ce[Oe._index]?ce[Oe._index][Be]:`${Oe[Be]}`.toLowerCase(),Le=pe&&ce[at._index]?ce[at._index][Be]:`${at[Be]}`.toLowerCase();return pe&&oe&&(ze=new Date(ze),isNaN(ze.getTime())&&(ze=wg),Le=new Date(Le),isNaN(Le.getTime())&&(Le=wg)),ze===Le?0:ze?Le?(ze<Le?1:-1)*(Re?-1:1):Re?1:-1:Re?-1:1})},[s,i,_t,re,lt,ce,me]),Bt=le.useCallback(Re=>{const Be={...me.columnFilterMap};delete Be[Re],De({...me,columnFilterMap:Be})},[me]),vt=le.useCallback((Re,Be)=>{if(R){window.location.hash=_r.serializeLocationHash({...Se,sortColumn:Re,sortAsc:Be});return}De({...me,sortColumn:Re,sortAsc:Be})},[me,Se,R]),Lt=le.useCallback(Re=>{De({...me,searchQuery:Re.currentTarget.value})},[me]),Vt=le.useCallback(()=>{we(me),fe(void 0)},[me]);le.useEffect(()=>{if(!t||!Se||!_e||!R)return;const Re=Object.keys(Se);let Be=!1;for(const Ke of Re){const qe=Se[Ke],ct=_e[Ke];if(typeof qe=="string"&&qe!==ct){Be=!0;break}if(typeof qe=="object"&&!wa.isEqual(qe,ct)){Be=!0;break}}Be&&Vt()},[t,Se,_e,Vt,R]);const kt=le.useCallback(Re=>{Re.key==="Enter"&&(ne(void 0),ht&&Vt(),T&&Re.currentTarget.className==="mig-schema-table__search"&&T(me.searchQuery||""))},[ht,me.searchQuery,T,Vt]),qt=le.useCallback(()=>P,[P]),Ot=le.useMemo(()=>wa.sum(Dt),[Dt]),xt=le.useMemo(()=>Tt?Tt.length:0,[Tt]),ge=le.useMemo(()=>{const Re=P*xt;let Be;L&&(Be=L==="100%"?Xe.height:L);const Ke=Be?Be-gt.height-bp:0;return Ke&&Ke<Re?Ke:Re},[P,xt,L,gt,Xe.height]),Pe=le.useCallback(Re=>{ne(void 0),Re.preventDefault(),Re.stopPropagation()},[]),Ee=le.useCallback((Re,Be)=>{if(!ee)return;if(R&&Be!==!1){window.location.hash=_r.serializeLocationHash({...Se,columnFilterMap:{...me.columnFilterMap,[ee.propName]:Re}});return}if(Re===void 0){Bt(ee.propName);return}const Ke={...me.columnFilterMap,[ee.propName]:Re};De({...me,columnFilterMap:Ke})},[Bt,me,Se,ee,R]),Qe=le.useCallback(()=>{const Re={searchQuery:"",columnFilterMap:{},sortColumn:d,sortAsc:i};R&&(window.location.hash=_r.serializeLocationHash(Re)),we(Re),De(Re)},[R,i,d]),de=le.useCallback(()=>{const Re=(Se==null?void 0:Se.searchQuery)||"";R&&(me.searchQuery||Re)&&me.searchQuery!==Re&&(window.location.hash=_r.serializeLocationHash({...Se,searchQuery:me.searchQuery}))},[Se,me.searchQuery,R]),xe=le.useCallback(async Re=>{if(Re.preventDefault(),Re.stopPropagation(),!Tt)return;const{renderDataToExcel:Be}=await Promise.resolve().then(()=>gce);Be(Tt)},[Tt]),je=le.useCallback(()=>{x&&(localStorage.removeItem(`${x}.columnNames`),localStorage.removeItem(`${x}.columnWidths`),F(void 0),j(void 0))},[x]),Fe=le.useCallback(Re=>!Tt||!ce||!z||!N?!0:ce[Tt[Re]._index]!==void 0,[N,z,Tt,ce]),Ue=le.useMemo(()=>!(ce&&!ht)&&!z?Ye.jsx("div",{style:{width:Ot,height:Math.max(50,ge),border:"1px solid #BBB",textAlign:"center",display:"flex",backgroundColor:"#CCC",alignItems:"center",justifyContent:"center"},children:ht?Ye.jsx("button",{onClick:Vt,className:"btn border",children:"Refresh data"}):Ye.jsx("div",{children:"⌛ Loading..."})}):z&&N?Ye.jsx(sce,{ref:b,isItemLoaded:Fe,itemCount:N,loadMoreItems:z,children:({onItemsRendered:Be,ref:Ke})=>Ye.jsx(Wf,{className:"mig-schema-table__tbody",estimatedRowHeight:P,height:ge,width:Ot,columnWidth:Et,rowHeight:qt,columnCount:$t,rowCount:xt,ref:Ke,onItemsRendered:({overscanRowStartIndex:qe,overscanRowStopIndex:ct,visibleRowStartIndex:oe,visibleRowStopIndex:pe})=>Be({overscanStartIndex:qe,overscanStopIndex:ct,visibleStartIndex:oe,visibleStopIndex:pe}),children:yp},`tbody_${ge}_${Ot}_${me.sortColumn}_${me.sortAsc}_${me.searchQuery}_${$t}_${Dt.join(" ")}`)}):Ye.jsx(Wf,{className:"mig-schema-table__tbody",estimatedRowHeight:P,height:ge,width:Ot,columnWidth:Et,rowHeight:qt,columnCount:$t,rowCount:xt,ref:X,children:yp},`tbody_${ge}_${Ot}_${me.sortColumn}_${me.sortAsc}_${me.searchQuery}_${$t}_${Dt.join(" ")}`),[$t,Dt,Et,qt,b,ht,Fe,N,z,Vt,xt,P,Ot,me.searchQuery,me.sortAsc,me.sortColumn,ce,ge,X]),ot=le.useMemo(()=>({...C,width:q?Math.min(Ot,ft):void 0,height:L==="100%"?"100%":void 0,maxHeight:L==="100%"?"100%":void 0}),[L,Ot,C,ft,q]),Ze=a||"input";return Ye.jsx(io.Provider,{value:{checkedIndexes:n,columnNames:it,columnWidths:Dt,config:s,disabledCheckedIndexes:h,displayTimezone:c,dropTargetIndex:Q,getRowClassName:p,getRowSelected:m,isColumnFilterable:M,isItemLoaded:Fe,isSortable:H,lastCheckChangedRowIndex:be,onRowClick:Y,onRowDoubleClick:B,properties:lt,required:tt,setCheckedIndexes:k,setCustomColumnNames:F,setCustomColumnWidths:j,setDropTargetIndex:ie,setFilterSortColumn:vt,setLastCheckChangedRowIndex:ve,setMenuConfig:ne,settingsStorageKey:x,sortedRenderData:Tt,sourceData:ce,tableDataState:me,translate:O||pp},children:Ye.jsxs("div",{className:`mig-schema-table${Y?" mig-schema-table--clickable-rows":""}`,ref:Je,style:ot,role:"table",children:[Ye.jsxs("div",{className:"mig-schema-table__action-container",ref:Ge,children:[Ye.jsx("div",{children:A?Ye.jsx(Ze,{className:"mig-schema-table__search",type:"search",name:"search",autoComplete:"off",placeholder:_||O("search..."),value:me.searchQuery,onChange:Lt,onKeyDown:kt,autoFocus:f,onBlur:de}):null}),r?Ye.jsx(r,{...o,renderData:Tt}):Ye.jsx("div",{className:"mig-schema-table__custom_element_placeholder"}),g&&Array.isArray(l)?Ye.jsx("span",{className:"mig-schema-table__row_counter",children:O("showingFilteredCountOfTotalCount",(Tt==null?void 0:Tt.length)||0,l.length)}):null,D?Ye.jsx("button",{onClick:xe,style:{marginLeft:8},disabled:!(Tt!=null&&Tt.length),children:O("exportData")}):null,A||M?Ye.jsx("button",{onClick:Qe,style:{marginLeft:8},disabled:me.columnFilterMap&&me.searchQuery?Object.keys(me.columnFilterMap).length+me.searchQuery.length===0:!1,children:O("clearFilters")}):null,x?Ye.jsx("button",{onClick:je,style:{marginLeft:8},disabled:!Ve&&!rt,children:O("clearSettings")}):null]}),Ye.jsxs("div",{className:"mig-schema-table__column_resize_container",children:[Ye.jsx(e,{height:bp,itemCount:$t,itemSize:Et,layout:"horizontal",width:Ot,sortAsc:me.sortAsc,setFilterSortColumn:vt,sortColumn:me.sortColumn,sortedRenderData:Tt,className:"mig-schema-table__th-row",children:kp},`thead_${Ot}_${me.sortColumn}_${me.sortAsc}_${me.searchQuery}_${Dt.join(" ")}`),Ue,$?Ye.jsx(tce,{columnWidths:Dt,resizeColumnIndex:W,setResizeColumnIndex:V,tableBodyHeight:ge}):null]}),ce?ce.length>0?Ye.jsx(Ye.Fragment,{children:Na.createPortal(ee?Ye.jsx(ece,{isFilterable:M&&((nt=ee.propConfig)==null?void 0:nt.isFilterable)!==!1,isSortable:wp(!!H,w.properties[ee.propName],ee.propConfig),onChange:Ee,onClose:Pe,onInputKeyDown:kt,propConfig:ee.propConfig,propIsRequired:ee.propIsRequired,propName:ee.propName,propSchema:w.properties[ee.propName],referenceElement:ee.referenceElement,setFilterSortColumn:vt,translate:O,value:me.columnFilterMap?me.columnFilterMap[ee.propName]:null}):null,document.body)}):Ye.jsx("div",{className:"mig-schema-table__no_data",children:"No data found"}):null]})})},fce=le.memo(cce),hce=le.memo(({refresh:r,period:a=60})=>{const[e,t]=le.useState(new Date),[n,s]=le.useState(new Date),o=le.useCallback(()=>{s(new Date),r()},[r]),l=le.useMemo(()=>gi(e,n),[e,n]);le.useEffect(()=>{l>a&&o()},[l,e,n,a,o]),le.useEffect(()=>{const d=setInterval(()=>{t(new Date)},1e3);return()=>{clearInterval(d)}},[]);const u=a-l;return Ye.jsxs("div",{className:"mx-auto",title:`Refresh ${u>0?`in ${u} seconds`:"NOW"}`,children:["Last update ",_d(n,"HH:mm")]})});function Bu(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _g={exports:{}};/*! ExcelJS 19-10-2023 */(function(r,a){(function(e){r.exports=e()})(function(){return function e(t,n,s){function o(i,d){if(!n[i]){if(!t[i]){var h=typeof Bu=="function"&&Bu;if(!d&&h)return h(i,!0);if(l)return l(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[i]={exports:{}};t[i][0].call(f.exports,function(g){return o(t[i][1][g]||g)},f,f.exports,e,t,n,s)}return n[i].exports}for(var l=typeof Bu=="function"&&Bu,u=0;u<s.length;u++)o(s[u]);return o}({1:[function(e,t,n){const s=e("fs"),o=e("fast-csv"),l=e("dayjs/plugin/customParseFormat"),u=e("dayjs/plugin/utc"),i=e("dayjs").extend(l).extend(u),d=e("../utils/stream-buf"),{fs:{exists:h}}=e("../utils/utils"),c={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};t.exports=class{constructor(f){this.workbook=f,this.worksheet=null}async readFile(f,g){if(g=g||{},!await h(f))throw new Error("File not found: "+f);const p=s.createReadStream(f),m=await this.read(p,g);return p.close(),m}read(f,g){return g=g||{},new Promise((p,m)=>{const v=this.workbook.addWorksheet(g.sheetName),b=g.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],M=g.map||function($){if($==="")return null;const A=Number($);if(!Number.isNaN(A)&&A!==1/0)return A;const H=b.reduce((z,L)=>{if(z)return z;const Y=i($,L,!0);return Y.isValid()?Y:null},null);if(H)return new Date(H.valueOf());const N=c[$];return N!==void 0?N:$},D=o.parse(g.parserOptions).on("data",$=>{v.addRow($.map(M))}).on("end",()=>{D.emit("worksheet",v)});D.on("worksheet",p).on("error",m),f.pipe(D)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(f,g){return new Promise((p,m)=>{g=g||{};const v=this.workbook.getWorksheet(g.sheetName||g.sheetId),b=o.format(g.formatterOptions);f.on("finish",()=>{p()}),b.on("error",m),b.pipe(f);const{dateFormat:M,dateUTC:D}=g,$=g.map||(N=>{if(N){if(N.text||N.hyperlink)return N.hyperlink||N.text||"";if(N.formula||N.result)return N.result||"";if(N instanceof Date)return M?D?i.utc(N).format(M):i(N).format(M):D?i.utc(N).format():i(N).format();if(N.error)return N.error;if(typeof N=="object")return JSON.stringify(N)}return N}),A=g.includeEmptyRows===void 0||g.includeEmptyRows;let H=1;v&&v.eachRow((N,z)=>{if(A)for(;H++<z-1;)b.write([]);const{values:L}=N;L.shift(),b.write(L.map($)),H=z}),b.end()})}writeFile(f,g){const p={encoding:(g=g||{}).encoding||"utf8"},m=s.createWriteStream(f,p);return this.write(m,g)}async writeBuffer(f){const g=new d;return await this.write(g,f),g.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(e,t,n){const s=e("../utils/col-cache");class o{constructor(u,i){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=u,i)if(typeof i=="string"){const h=s.decodeAddress(i);this.nativeCol=h.col+d,this.nativeColOff=0,this.nativeRow=h.row+d,this.nativeRowOff=0}else i.nativeCol!==void 0?(this.nativeCol=i.nativeCol||0,this.nativeColOff=i.nativeColOff||0,this.nativeRow=i.nativeRow||0,this.nativeRowOff=i.nativeRowOff||0):i.col!==void 0?(this.col=i.col+d,this.row=i.row+d):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(u){return u instanceof o||u==null?u:new o(u)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(u){this.nativeCol=Math.floor(u),this.nativeColOff=Math.floor((u-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(u){this.nativeRow=Math.floor(u),this.nativeRowOff=Math.floor((u-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(u){this.nativeCol=u.nativeCol,this.nativeColOff=u.nativeColOff,this.nativeRow=u.nativeRow,this.nativeRowOff=u.nativeRowOff}}t.exports=o},{"../utils/col-cache":19}],3:[function(e,t,n){const s=e("../utils/col-cache"),o=e("../utils/under-dash"),l=e("./enums"),{slideFormula:u}=e("../utils/shared-formula"),i=e("./note");class d{constructor(f,g,p){if(!f||!g)throw new Error("A Cell needs a Row");this._row=f,this._column=g,s.validateAddress(p),this._address=p,this._value=h.create(d.Types.Null,this),this.style=this._mergeStyle(f.style,g.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(f){this.style.numFmt=f}get font(){return this.style.font}set font(f){this.style.font=f}get alignment(){return this.style.alignment}set alignment(f){this.style.alignment=f}get border(){return this.style.border}set border(f){this.style.border=f}get fill(){return this.style.fill}set fill(f){this.style.fill=f}get protection(){return this.style.protection}set protection(f){this.style.protection=f}_mergeStyle(f,g,p){const m=f&&f.numFmt||g&&g.numFmt;m&&(p.numFmt=m);const v=f&&f.font||g&&g.font;v&&(p.font=v);const b=f&&f.alignment||g&&g.alignment;b&&(p.alignment=b);const M=f&&f.border||g&&g.border;M&&(p.border=M);const D=f&&f.fill||g&&g.fill;D&&(p.fill=D);const $=f&&f.protection||g&&g.protection;return $&&(p.protection=$),p}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===d.Types.Merge}merge(f,g){this._value.release(),this._value=h.create(d.Types.Merge,this,f),g||(this.style=f.style)}unmerge(){this.type===d.Types.Merge&&(this._value.release(),this._value=h.create(d.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(f){return this._value.type===d.Types.Merge&&this._value.isMergedTo(f)}get master(){return this.type===d.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===d.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(f){this.type!==d.Types.Merge?(this._value.release(),this._value=h.create(h.getType(f),this,f)):this._value.master.value=f}get note(){return this._comment&&this._comment.note}set note(f){this._comment=new i(f)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(f){this.type===d.Types.String&&(this._value=h.create(d.Types.Hyperlink,this,{text:this._value.value,hyperlink:f}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:f}=this._row;return{sheetName:f.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(f){this.names=[f]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(f){const{definedNames:g}=this.workbook;g.removeAllNames(this.fullAddress),f.forEach(p=>{g.addEx(this.fullAddress,p)})}addName(f){this.workbook.definedNames.addEx(this.fullAddress,f)}removeName(f){this.workbook.definedNames.removeEx(this.fullAddress,f)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(f){this._dataValidations.add(this.address,f)}get model(){const{model:f}=this._value;return f.style=this.style,this._comment&&(f.comment=this._comment.model),f}set model(f){if(this._value.release(),this._value=h.create(f.type,this),this._value.model=f,f.comment)switch(f.comment.type){case"note":this._comment=i.fromModel(f.comment)}f.style?this.style=f.style:this.style={}}}d.Types=l.ValueType;const h={getType:c=>c==null?d.Types.Null:c instanceof String||typeof c=="string"?d.Types.String:typeof c=="number"?d.Types.Number:typeof c=="boolean"?d.Types.Boolean:c instanceof Date?d.Types.Date:c.text&&c.hyperlink?d.Types.Hyperlink:c.formula||c.sharedFormula?d.Types.Formula:c.richText?d.Types.RichText:c.sharedString?d.Types.SharedString:c.error?d.Types.Error:d.Types.JSON,types:[{t:d.Types.Null,f:class{constructor(c){this.model={address:c.address,type:d.Types.Null}}get value(){return null}set value(c){}get type(){return d.Types.Null}get effectiveType(){return d.Types.Null}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return""}release(){}toString(){return""}}},{t:d.Types.Number,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Number,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.Number}get effectiveType(){return d.Types.Number}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:d.Types.String,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.String,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.String}get effectiveType(){return d.Types.String}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:d.Types.Date,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Date,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.Date}get effectiveType(){return d.Types.Date}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:d.Types.Hyperlink,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Hyperlink,text:f?f.text:void 0,hyperlink:f?f.hyperlink:void 0},f&&f.tooltip&&(this.model.tooltip=f.tooltip)}get value(){const c={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(c.tooltip=this.model.tooltip),c}set value(c){this.model={text:c.text,hyperlink:c.hyperlink},c.tooltip&&(this.model.tooltip=c.tooltip)}get text(){return this.model.text}set text(c){this.model.text=c}get hyperlink(){return this.model.hyperlink}set hyperlink(c){this.model.hyperlink=c}get type(){return d.Types.Hyperlink}get effectiveType(){return d.Types.Hyperlink}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:d.Types.Formula,f:class{constructor(c,f){this.cell=c,this.model={address:c.address,type:d.Types.Formula,shareType:f?f.shareType:void 0,ref:f?f.ref:void 0,formula:f?f.formula:void 0,sharedFormula:f?f.sharedFormula:void 0,result:f?f.result:void 0}}_copyModel(c){const f={},g=p=>{const m=c[p];m&&(f[p]=m)};return g("formula"),g("result"),g("ref"),g("shareType"),g("sharedFormula"),f}get value(){return this._copyModel(this.model)}set value(c){this.model=this._copyModel(c)}validate(c){switch(h.getType(c)){case d.Types.Null:case d.Types.String:case d.Types.Number:case d.Types.Date:break;case d.Types.Hyperlink:case d.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(c){this.model.formula=c}get formulaType(){return this.model.formula?l.FormulaType.Master:this.model.sharedFormula?l.FormulaType.Shared:l.FormulaType.None}get result(){return this.model.result}set result(c){this.model.result=c}get type(){return d.Types.Formula}get effectiveType(){const c=this.model.result;return c==null?l.ValueType.Null:c instanceof String||typeof c=="string"?l.ValueType.String:typeof c=="number"?l.ValueType.Number:c instanceof Date?l.ValueType.Date:c.text&&c.hyperlink?l.ValueType.Hyperlink:c.formula?l.ValueType.Formula:l.ValueType.Null}get address(){return this.model.address}set address(c){this.model.address=c}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:c}=this.cell,f=c.findCell(this.model.sharedFormula);this._translatedFormula=f&&u(f.formula,f.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:d.Types.Merge,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Merge,master:f?f.address:void 0},this._master=f,f&&f.addMergeRef()}get value(){return this._master.value}set value(c){c instanceof d?(this._master&&this._master.releaseMergeRef(),c.addMergeRef(),this._master=c):this._master.value=c}isMergedTo(c){return c===this._master}get master(){return this._master}get type(){return d.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:d.Types.JSON,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.String,value:JSON.stringify(f),rawValue:f}}get value(){return this.model.rawValue}set value(c){this.model.rawValue=c,this.model.value=JSON.stringify(c)}get type(){return d.Types.String}get effectiveType(){return d.Types.String}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:d.Types.SharedString,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.SharedString,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.SharedString}get effectiveType(){return d.Types.SharedString}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:d.Types.RichText,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.String,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}toString(){return this.model.value.richText.map(c=>c.text).join("")}get type(){return d.Types.RichText}get effectiveType(){return d.Types.RichText}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:d.Types.Boolean,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Boolean,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.Boolean}get effectiveType(){return d.Types.Boolean}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:d.Types.Error,f:class{constructor(c,f){this.model={address:c.address,type:d.Types.Error,value:f}}get value(){return this.model.value}set value(c){this.model.value=c}get type(){return d.Types.Error}get effectiveType(){return d.Types.Error}get address(){return this.model.address}set address(c){this.model.address=c}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((c,f)=>(c[f.t]=f.f,c),[]),create(c,f,g){const p=this.types[c];if(!p)throw new Error("Could not create Value of type "+c);return new p(f,g)}};t.exports=d},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,t,n){const s=e("../utils/under-dash"),o=e("./enums"),l=e("../utils/col-cache");class u{constructor(d,h,c){this._worksheet=d,this._number=h,c!==!1&&(this.defn=c)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return l.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(d){d?(this.key=d.key,this.width=d.width!==void 0?d.width:9,this.outlineLevel=d.outlineLevel,d.style?this.style=d.style:this.style={},this.header=d.header,this._hidden=!!d.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(d){d!==void 0?(this._header=d,this.headers.forEach((h,c)=>{this._worksheet.getCell(c+1,this.number).value=h})):this._header=void 0}get key(){return this._key}set key(d){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=d,d&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(d){this._hidden=d}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(d){this._outlineLevel=d}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(d){return this.width===d.width&&this.hidden===d.hidden&&this.outlineLevel===d.outlineLevel&&s.isEqual(this.style,d.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const d=this.style;return!d||!(d.font||d.numFmt||d.alignment||d.border||d.fill||d.protection)}get headerCount(){return this.headers.length}eachCell(d,h){const c=this.number;h||(h=d,d=null),this._worksheet.eachRow(d,(f,g)=>{h(f.getCell(c),g)})}get values(){const d=[];return this.eachCell((h,c)=>{h&&h.type!==o.ValueType.Null&&(d[c]=h.value)}),d}set values(d){if(!d)return;const h=this.number;let c=0;d.hasOwnProperty("0")&&(c=1),d.forEach((f,g)=>{this._worksheet.getCell(g+c,h).value=f})}_applyStyle(d,h){return this.style[d]=h,this.eachCell(c=>{c[d]=h}),h}get numFmt(){return this.style.numFmt}set numFmt(d){this._applyStyle("numFmt",d)}get font(){return this.style.font}set font(d){this._applyStyle("font",d)}get alignment(){return this.style.alignment}set alignment(d){this._applyStyle("alignment",d)}get protection(){return this.style.protection}set protection(d){this._applyStyle("protection",d)}get border(){return this.style.border}set border(d){this._applyStyle("border",d)}get fill(){return this.style.fill}set fill(d){this._applyStyle("fill",d)}static toModel(d){const h=[];let c=null;return d&&d.forEach((f,g)=>{f.isDefault?c&&(c=null):c&&f.equivalentTo(c)?c.max=g+1:(c={min:g+1,max:g+1,width:f.width!==void 0?f.width:9,style:f.style,isCustomWidth:f.isCustomWidth,hidden:f.hidden,outlineLevel:f.outlineLevel,collapsed:f.collapsed},h.push(c))}),h.length?h:void 0}static fromModel(d,h){const c=[];let f=1,g=0;for(h=(h=h||[]).sort(function(p,m){return p.min-m.min});g<h.length;){const p=h[g++];for(;f<p.min;)c.push(new u(d,f++));for(;f<=p.max;)c.push(new u(d,f++,p))}return c.length?c:null}}t.exports=u},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,t,n){t.exports=class{constructor(s){this.model=s||{}}add(s,o){return this.model[s]=o}find(s){return this.model[s]}remove(s){this.model[s]=void 0}}},{}],6:[function(e,t,n){const s=e("../utils/under-dash"),o=e("../utils/col-cache"),l=e("../utils/cell-matrix"),u=e("./range"),i=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;t.exports=class{constructor(){this.matrixMap={}}getMatrix(d){return this.matrixMap[d]||(this.matrixMap[d]=new l)}add(d,h){const c=o.decodeEx(d);this.addEx(c,h)}addEx(d,h){const c=this.getMatrix(h);if(d.top)for(let f=d.left;f<=d.right;f++)for(let g=d.top;g<=d.bottom;g++){const p={sheetName:d.sheetName,address:o.n2l(f)+g,row:g,col:f};c.addCellEx(p)}else c.addCellEx(d)}remove(d,h){const c=o.decodeEx(d);this.removeEx(c,h)}removeEx(d,h){this.getMatrix(h).removeCellEx(d)}removeAllNames(d){s.each(this.matrixMap,h=>{h.removeCellEx(d)})}forEach(d){s.each(this.matrixMap,(h,c)=>{h.forEach(f=>{d(c,f)})})}getNames(d){return this.getNamesEx(o.decodeEx(d))}getNamesEx(d){return s.map(this.matrixMap,(h,c)=>h.findCellEx(d)&&c).filter(Boolean)}_explore(d,h){h.mark=!1;const{sheetName:c}=h,f=new u(h.row,h.col,h.row,h.col,c);let g,p;function m(b,M){const D=d.findCellAt(c,b,h.col);return!(!D||!D.mark)&&(f[M]=b,D.mark=!1,!0)}for(p=h.row-1;m(p,"top");p--);for(p=h.row+1;m(p,"bottom");p++);function v(b,M){const D=[];for(p=f.top;p<=f.bottom;p++){const $=d.findCellAt(c,p,b);if(!$||!$.mark)return!1;D.push($)}f[M]=b;for(let $=0;$<D.length;$++)D[$].mark=!1;return!0}for(g=h.col-1;v(g,"left");g--);for(g=h.col+1;v(g,"right");g++);return f}getRanges(d,h){return(h=h||this.matrixMap[d])?(h.forEach(c=>{c.mark=!0}),{name:d,ranges:h.map(c=>c.mark&&this._explore(h,c)).filter(Boolean).map(c=>c.$shortRange)}):{name:d,ranges:[]}}normaliseMatrix(d,h){d.forEachInSheet(h,(c,f,g)=>{c&&(c.row===f&&c.col===g||(c.row=f,c.col=g,c.address=o.n2l(g)+f))})}spliceRows(d,h,c,f){s.each(this.matrixMap,g=>{g.spliceRows(d,h,c,f),this.normaliseMatrix(g,d)})}spliceColumns(d,h,c,f){s.each(this.matrixMap,g=>{g.spliceColumns(d,h,c,f),this.normaliseMatrix(g,d)})}get model(){return s.map(this.matrixMap,(d,h)=>this.getRanges(h,d)).filter(d=>d.ranges.length)}set model(d){const h=this.matrixMap={};d.forEach(c=>{const f=h[c.name]=new l;c.ranges.forEach(g=>{i.test(g.split("!").pop()||"")&&f.addCell(g)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,t,n){t.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,t,n){const s=e("../utils/col-cache"),o=e("./anchor");t.exports=class{constructor(l,u){this.worksheet=l,this.model=u}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(l){let{type:u,imageId:i,range:d,hyperlinks:h}=l;if(this.type=u,this.imageId=i,u==="image")if(typeof d=="string"){const c=s.decode(d);this.range={tl:new o(this.worksheet,{col:c.left,row:c.top},-1),br:new o(this.worksheet,{col:c.right,row:c.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,d.tl,0),br:d.br&&new o(this.worksheet,d.br,0),ext:d.ext,editAs:d.editAs,hyperlinks:h||d.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,t,n){const s=e("../utils/under-dash");class o{constructor(u){this.note=u}get model(){let u=null;switch(typeof this.note){case"string":u={type:"note",note:{texts:[{text:this.note}]}};break;default:u={type:"note",note:this.note}}return s.deepMerge({},o.DEFAULT_CONFIGS,u)}set model(u){const{note:i}=u,{texts:d}=i;d.length===1&&Object.keys(d[0]).length===1?this.note=d[0].text:this.note=i}static fromModel(u){const i=new o;return i.model=u,i}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},t.exports=o},{"../utils/under-dash":26}],10:[function(e,t,n){const s=e("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(u,i,d,h,c){if(arguments.length<4){const f=s.decodeAddress(u),g=s.decodeAddress(i);this.model={top:Math.min(f.row,g.row),left:Math.min(f.col,g.col),bottom:Math.max(f.row,g.row),right:Math.max(f.col,g.col),sheetName:d},this.setTLBR(f.row,f.col,g.row,g.col,c)}else this.model={top:Math.min(u,d),left:Math.min(i,h),bottom:Math.max(u,d),right:Math.max(i,h),sheetName:c}}decode(u){switch(u.length){case 5:this.setTLBR(u[0],u[1],u[2],u[3],u[4]);break;case 4:this.setTLBR(u[0],u[1],u[2],u[3]);break;case 3:this.setTLBR(u[0],u[1],u[2]);break;case 2:this.setTLBR(u[0],u[1]);break;case 1:{const i=u[0];if(i instanceof o)this.model={top:i.model.top,left:i.model.left,bottom:i.model.bottom,right:i.model.right,sheetName:i.sheetName};else if(i instanceof Array)this.decode(i);else if(i.top&&i.left&&i.bottom&&i.right)this.model={top:i.top,left:i.left,bottom:i.bottom,right:i.right,sheetName:i.sheetName};else{const d=s.decodeEx(i);d.top?this.model={top:d.top,left:d.left,bottom:d.bottom,right:d.right,sheetName:d.sheetName}:this.model={top:d.row,left:d.col,bottom:d.row,right:d.col,sheetName:d.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+u.length)}}get top(){return this.model.top||1}set top(u){this.model.top=u}get left(){return this.model.left||1}set left(u){this.model.left=u}get bottom(){return this.model.bottom||1}set bottom(u){this.model.bottom=u}get right(){return this.model.right||1}set right(u){this.model.right=u}get sheetName(){return this.model.sheetName}set sheetName(u){this.model.sheetName=u}get _serialisedSheetName(){const{sheetName:u}=this.model;return u?/^[a-zA-Z0-9]*$/.test(u)?u+"!":`'${u}'!`:""}expand(u,i,d,h){(!this.model.top||u<this.top)&&(this.top=u),(!this.model.left||i<this.left)&&(this.left=i),(!this.model.bottom||d>this.bottom)&&(this.bottom=d),(!this.model.right||h>this.right)&&(this.right=h)}expandRow(u){if(u){const{dimensions:i,number:d}=u;i&&this.expand(d,i.min,d,i.max)}}expandToAddress(u){const i=s.decodeEx(u);this.expand(i.row,i.col,i.row,i.col)}get tl(){return s.n2l(this.left)+this.top}get $t$l(){return`$${s.n2l(this.left)}$${this.top}`}get br(){return s.n2l(this.right)+this.bottom}get $b$r(){return`$${s.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(u){return(!u.sheetName||!this.sheetName||u.sheetName===this.sheetName)&&!(u.bottom<this.top)&&!(u.top>this.bottom)&&!(u.right<this.left)&&!(u.left>this.right)}contains(u){const i=s.decodeEx(u);return this.containsEx(i)}containsEx(u){return(!u.sheetName||!this.sheetName||u.sheetName===this.sheetName)&&u.row>=this.top&&u.row<=this.bottom&&u.col>=this.left&&u.col<=this.right}forEachAddress(u){for(let i=this.left;i<=this.right;i++)for(let d=this.top;d<=this.bottom;d++)u(s.encodeAddress(d,i),d,i)}}t.exports=o},{"../utils/col-cache":19}],11:[function(e,t,n){const s=e("../utils/under-dash"),o=e("./enums"),l=e("../utils/col-cache"),u=e("./cell");t.exports=class{constructor(i,d){this._worksheet=i,this._number=d,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(i){return this._cells[i-1]}getCellEx(i){let d=this._cells[i.col-1];if(!d){const h=this._worksheet.getColumn(i.col);d=new u(this,h,i.address),this._cells[i.col-1]=d}return d}getCell(i){if(typeof i=="string"){const d=this._worksheet.getColumnKey(i);i=d?d.number:l.l2n(i)}return this._cells[i-1]||this.getCellEx({address:l.encodeAddress(this._number,i),row:this._number,col:i})}splice(i,d){const h=i+d;for(var c=arguments.length,f=new Array(c>2?c-2:0),g=2;g<c;g++)f[g-2]=arguments[g];const p=f.length-d,m=this._cells.length;let v,b,M;if(p<0)for(v=i+f.length;v<=m;v++)M=this._cells[v-1],b=this._cells[v-p-1],b?(M=this.getCell(v),M.value=b.value,M.style=b.style,M._comment=b._comment):M&&(M.value=null,M.style={},M._comment=void 0);else if(p>0)for(v=m;v>=h;v--)b=this._cells[v-1],b?(M=this.getCell(v+p),M.value=b.value,M.style=b.style,M._comment=b._comment):this._cells[v+p-1]=void 0;for(v=0;v<f.length;v++)M=this.getCell(i+v),M.value=f[v],M.style={},M._comment=void 0}eachCell(i,d){if(d||(d=i,i=null),i&&i.includeEmpty){const h=this._cells.length;for(let c=1;c<=h;c++)d(this.getCell(c),c)}else this._cells.forEach((h,c)=>{h&&h.type!==o.ValueType.Null&&d(h,c+1)})}addPageBreak(i,d){const h=this._worksheet,c=Math.max(0,i-1)||0,f=Math.max(0,d-1)||16838,g={id:this._number,max:f,man:1};c&&(g.min=c),h.rowBreaks.push(g)}get values(){const i=[];return this._cells.forEach(d=>{d&&d.type!==o.ValueType.Null&&(i[d.col]=d.value)}),i}set values(i){if(this._cells=[],i)if(i instanceof Array){let d=0;i.hasOwnProperty("0")&&(d=1),i.forEach((h,c)=>{h!==void 0&&(this.getCellEx({address:l.encodeAddress(this._number,c+d),row:this._number,col:c+d}).value=h)})}else this._worksheet.eachColumnKey((d,h)=>{i[h]!==void 0&&(this.getCellEx({address:l.encodeAddress(this._number,d.number),row:this._number,col:d.number}).value=i[h])})}get hasValues(){return s.some(this._cells,i=>i&&i.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let i=0;return this.eachCell(()=>{i++}),i}get dimensions(){let i=0,d=0;return this._cells.forEach(h=>{h&&h.type!==o.ValueType.Null&&((!i||i>h.col)&&(i=h.col),d<h.col&&(d=h.col))}),i>0?{min:i,max:d}:null}_applyStyle(i,d){return this.style[i]=d,this._cells.forEach(h=>{h&&(h[i]=d)}),d}get numFmt(){return this.style.numFmt}set numFmt(i){this._applyStyle("numFmt",i)}get font(){return this.style.font}set font(i){this._applyStyle("font",i)}get alignment(){return this.style.alignment}set alignment(i){this._applyStyle("alignment",i)}get protection(){return this.style.protection}set protection(i){this._applyStyle("protection",i)}get border(){return this.style.border}set border(i){this._applyStyle("border",i)}get fill(){return this.style.fill}set fill(i){this._applyStyle("fill",i)}get hidden(){return!!this._hidden}set hidden(i){this._hidden=i}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(i){this._outlineLevel=i}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const i=[];let d=0,h=0;return this._cells.forEach(c=>{if(c){const f=c.model;f&&((!d||d>c.col)&&(d=c.col),h<c.col&&(h=c.col),i.push(f))}}),this.height||i.length?{cells:i,number:this.number,min:d,max:h,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(i){if(i.number!==this._number)throw new Error("Invalid row number in model");let d;this._cells=[],i.cells.forEach(h=>{switch(h.type){case u.Types.Merge:break;default:{let c;if(h.address)c=l.decodeAddress(h.address);else if(d){const{row:f}=d,g=d.col+1;c={row:f,col:g,address:l.encodeAddress(f,g),$col$row:`$${l.n2l(g)}$${f}`}}d=c,this.getCellEx(c).model=h;break}}}),i.height?this.height=i.height:delete this.height,this.hidden=i.hidden,this.outlineLevel=i.outlineLevel||0,this.style=i.style&&JSON.parse(JSON.stringify(i.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,t,n){const s=e("../utils/col-cache");class o{constructor(u,i,d){this.table=u,this.column=i,this.index=d}_set(u,i){this.table.cacheState(),this.column[u]=i}get name(){return this.column.name}set name(u){this._set("name",u)}get filterButton(){return this.column.filterButton}set filterButton(u){this.column.filterButton=u}get style(){return this.column.style}set style(u){this.column.style=u}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(u){this._set("totalsRowLabel",u)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(u){this._set("totalsRowFunction",u)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(u){this._set("totalsRowResult",u)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(u){this._set("totalsRowFormula",u)}}t.exports=class{constructor(l,u){this.worksheet=l,u&&(this.table=u,this.validate(),this.store())}getFormula(l){switch(l.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${l.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${l.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${l.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${l.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${l.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${l.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${l.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${l.name}])`;case"custom":return l.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+l.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:l}=this,u=(p,m,v)=>{p[m]===void 0&&(p[m]=v)};u(l,"headerRow",!0),u(l,"totalsRow",!1),u(l,"style",{}),u(l.style,"theme","TableStyleMedium2"),u(l.style,"showFirstColumn",!1),u(l.style,"showLastColumn",!1),u(l.style,"showRowStripes",!1),u(l.style,"showColumnStripes",!1);const i=(p,m)=>{if(!p)throw new Error(m)};i(l.ref,"Table must have ref"),i(l.columns,"Table must have column definitions"),i(l.rows,"Table must have row definitions"),l.tl=s.decodeAddress(l.ref);const{row:d,col:h}=l.tl;i(d>0,"Table must be on valid row"),i(h>0,"Table must be on valid col");const{width:c,filterHeight:f,tableHeight:g}=this;l.autoFilterRef=s.encode(d,h,d+f-1,h+c-1),l.tableRef=s.encode(d,h,d+g-1,h+c-1),l.columns.forEach((p,m)=>{i(p.name,`Column ${m} must have a name`),m===0?u(p,"totalsRowLabel","Total"):(u(p,"totalsRowFunction","none"),p.totalsRowFormula=this.getFormula(p))})}store(){const l=(f,g)=>{g&&Object.keys(g).forEach(p=>{f[p]=g[p]})},{worksheet:u,table:i}=this,{row:d,col:h}=i.tl;let c=0;if(i.headerRow){const f=u.getRow(d+c++);i.columns.forEach((g,p)=>{const{style:m,name:v}=g,b=f.getCell(h+p);b.value=v,l(b,m)})}if(i.rows.forEach(f=>{const g=u.getRow(d+c++);f.forEach((p,m)=>{const v=g.getCell(h+m);v.value=p,l(v,i.columns[m].style)})}),i.totalsRow){const f=u.getRow(d+c++);i.columns.forEach((g,p)=>{const m=f.getCell(h+p);if(p===0)m.value=g.totalsRowLabel;else{const v=this.getFormula(g);m.value=v?{formula:g.totalsRowFormula,result:g.totalsRowResult}:null}l(m,g.style)})}}load(l){const{table:u}=this,{row:i,col:d}=u.tl;let h=0;if(u.headerRow){const c=l.getRow(i+h++);u.columns.forEach((f,g)=>{c.getCell(d+g).value=f.name})}if(u.rows.forEach(c=>{const f=l.getRow(i+h++);c.forEach((g,p)=>{f.getCell(d+p).value=g})}),u.totalsRow){const c=l.getRow(i+h++);u.columns.forEach((f,g)=>{const p=c.getCell(d+g);g===0?p.value=f.totalsRowLabel:this.getFormula(f)&&(p.value={formula:f.totalsRowFormula,result:f.totalsRowResult})})}}get model(){return this.table}set model(l){this.table=l}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const l=s.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let u=0;u<this._cache.tableHeight;u++){const i=this.worksheet.getRow(l.row+u);for(let d=0;d<this._cache.width;d++)i.getCell(l.col+d).value=null}else{for(let u=this.tableHeight;u<this._cache.tableHeight;u++){const i=this.worksheet.getRow(l.row+u);for(let d=0;d<this._cache.width;d++)i.getCell(l.col+d).value=null}for(let u=0;u<this.tableHeight;u++){const i=this.worksheet.getRow(l.row+u);for(let d=this.width;d<this._cache.width;d++)i.getCell(l.col+d).value=null}}this.store()}addRow(l,u){this.cacheState(),u===void 0?this.table.rows.push(l):this.table.rows.splice(u,0,l)}removeRows(l){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(l,u)}getColumn(l){const u=this.table.columns[l];return new o(this,u,l)}addColumn(l,u,i){this.cacheState(),i===void 0?(this.table.columns.push(l),this.table.rows.forEach((d,h)=>{d.push(u[h])})):(this.table.columns.splice(i,0,l),this.table.rows.forEach((d,h)=>{d.splice(i,0,u[h])}))}removeColumns(l){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(l,u),this.table.rows.forEach(i=>{i.splice(l,u)})}_assign(l,u,i){this.cacheState(),l[u]=i}get ref(){return this.table.ref}set ref(l){this._assign(this.table,"ref",l)}get name(){return this.table.name}set name(l){this.table.name=l}get displayName(){return this.table.displyName||this.table.name}set displayNamename(l){this.table.displayName=l}get headerRow(){return this.table.headerRow}set headerRow(l){this._assign(this.table,"headerRow",l)}get totalsRow(){return this.table.totalsRow}set totalsRow(l){this._assign(this.table,"totalsRow",l)}get theme(){return this.table.style.name}set theme(l){this.table.style.name=l}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(l){this.table.style.showFirstColumn=l}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(l){this.table.style.showLastColumn=l}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(l){this.table.style.showRowStripes=l}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(l){this.table.style.showColumnStripes=l}}},{"../utils/col-cache":19}],13:[function(e,t,n){const s=e("./worksheet"),o=e("./defined-names"),l=e("../xlsx/xlsx"),u=e("../csv/csv");t.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new l(this)),this._xlsx}get csv(){return this._csv||(this._csv=new u(this)),this._csv}get nextId(){for(let i=1;i<this._worksheets.length;i++)if(!this._worksheets[i])return i;return this._worksheets.length||1}addWorksheet(i,d){const h=this.nextId;d&&(typeof d=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),d={properties:{tabColor:{argb:d}}}):(d.argb||d.theme||d.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),d={properties:{tabColor:d}}));const c=this._worksheets.reduce((p,m)=>(m&&m.orderNo)>p?m.orderNo:p,0),f=Object.assign({},d,{id:h,name:i,orderNo:c+1,workbook:this}),g=new s(f);return this._worksheets[h]=g,g}removeWorksheetEx(i){delete this._worksheets[i.id]}removeWorksheet(i){const d=this.getWorksheet(i);d&&d.destroy()}getWorksheet(i){return i===void 0?this._worksheets.find(Boolean):typeof i=="number"?this._worksheets[i]:typeof i=="string"?this._worksheets.find(d=>d&&d.name===i):void 0}get worksheets(){return this._worksheets.slice(1).sort((i,d)=>i.orderNo-d.orderNo).filter(Boolean)}eachSheet(i){this.worksheets.forEach(d=>{i(d,d.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(i){const d=this.media.length;return this.media.push(Object.assign({},i,{type:"image"})),d}getImage(i){return this.media[i]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(i=>i.model),sheets:this.worksheets.map(i=>i.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(i){this.creator=i.creator,this.lastModifiedBy=i.lastModifiedBy,this.lastPrinted=i.lastPrinted,this.created=i.created,this.modified=i.modified,this.company=i.company,this.manager=i.manager,this.title=i.title,this.subject=i.subject,this.keywords=i.keywords,this.category=i.category,this.description=i.description,this.language=i.language,this.revision=i.revision,this.contentStatus=i.contentStatus,this.properties=i.properties,this.calcProperties=i.calcProperties,this._worksheets=[],i.worksheets.forEach(d=>{const{id:h,name:c,state:f}=d,g=i.sheets&&i.sheets.findIndex(p=>p.id===h);(this._worksheets[h]=new s({id:h,name:c,orderNo:g,state:f,workbook:this})).model=d}),this._definedNames.model=i.definedNames,this.views=i.views,this._themes=i.themes,this.media=i.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,t,n){const s=e("../utils/under-dash"),o=e("../utils/col-cache"),l=e("./range"),u=e("./row"),i=e("./column"),d=e("./enums"),h=e("./image"),c=e("./table"),f=e("./data-validations"),g=e("../utils/encryptor"),{copyStyle:p}=e("../utils/copy-style");t.exports=class{constructor(m){m=m||{},this._workbook=m.workbook,this.id=m.id,this.orderNo=m.orderNo,this.name=m.name,this.state=m.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},m.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!m.pageSetup||!m.pageSetup.fitToWidth&&!m.pageSetup.fitToHeight||m.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},m.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},m.headerFooter),this.dataValidations=new f,this.views=m.views||[],this.autoFilter=m.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(m){if(m===void 0&&(m="sheet"+this.id),this._name!==m){if(typeof m!="string")throw new Error("The name has to be a string.");if(m==="")throw new Error("The name can't be empty.");if(m==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(m))throw new Error(`Worksheet name ${m} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(m))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+m);if(m&&m.length>31&&(console.warn(`Worksheet name ${m} exceeds 31 chars. This will be truncated`),m=m.substring(0,31)),this._workbook._worksheets.find(v=>v&&v.name.toLowerCase()===m.toLowerCase()))throw new Error("Worksheet name already exists: "+m);this._name=m}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const m=new l;return this._rows.forEach(v=>{if(v){const b=v.dimensions;b&&m.expand(v.number,b.min,v.number,b.max)}}),m}get columns(){return this._columns}set columns(m){this._headerRowCount=m.reduce((M,D)=>{const $=(D.header?1:D.headers&&D.headers.length)||0;return Math.max(M,$)},0);let v=1;const b=this._columns=[];m.forEach(M=>{const D=new i(this,v++,!1);b.push(D),D.defn=M})}getColumnKey(m){return this._keys[m]}setColumnKey(m,v){this._keys[m]=v}deleteColumnKey(m){delete this._keys[m]}eachColumnKey(m){s.each(this._keys,m)}getColumn(m){if(typeof m=="string"){const v=this._keys[m];if(v)return v;m=o.l2n(m)}if(this._columns||(this._columns=[]),m>this._columns.length){let v=this._columns.length+1;for(;v<=m;)this._columns.push(new i(this,v++))}return this._columns[m-1]}spliceColumns(m,v){const b=this._rows.length;for(var M=arguments.length,D=new Array(M>2?M-2:0),$=2;$<M;$++)D[$-2]=arguments[$];if(D.length>0)for(let z=0;z<b;z++){const L=[m,v];D.forEach(B=>{L.push(B[z]||null)});const Y=this.getRow(z+1);Y.splice.apply(Y,L)}else this._rows.forEach(z=>{z&&z.splice(m,v)});const A=D.length-v,H=m+v,N=this._columns.length;if(A<0)for(let z=m+D.length;z<=N;z++)this.getColumn(z).defn=this.getColumn(z-A).defn;else if(A>0)for(let z=N;z>=H;z--)this.getColumn(z+A).defn=this.getColumn(z).defn;for(let z=m;z<m+D.length;z++)this.getColumn(z).defn=null;this.workbook.definedNames.spliceColumns(this.name,m,v,D.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let m=0;return this.eachRow(v=>{m=Math.max(m,v.cellCount)}),m}get actualColumnCount(){const m=[];let v=0;return this.eachRow(b=>{b.eachCell(M=>{let{col:D}=M;m[D]||(m[D]=!0,v++)})}),v}_commitRow(){}get _lastRowNumber(){const m=this._rows;let v=m.length;for(;v>0&&m[v-1]===void 0;)v--;return v}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(m){return this._rows[m-1]}findRows(m,v){return this._rows.slice(m-1,m-1+v)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let m=0;return this.eachRow(()=>{m++}),m}getRow(m){let v=this._rows[m-1];return v||(v=this._rows[m-1]=new u(this,m)),v}getRows(m,v){if(v<1)return;const b=[];for(let M=m;M<m+v;M++)b.push(this.getRow(M));return b}addRow(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const b=this._nextRow,M=this.getRow(b);return M.values=m,this._setStyleOption(b,v[0]==="i"?v:"n"),M}addRows(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const b=[];return m.forEach(M=>{b.push(this.addRow(M,v))}),b}insertRow(m,v){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(m,0,v),this._setStyleOption(m,b),this.getRow(m)}insertRows(m,v){let b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(m,0,...v),b!=="n")for(let M=0;M<v.length;M++)b[0]==="o"&&this.findRow(v.length+m+M)!==void 0?this._copyStyle(v.length+m+M,m+M,b[1]==="+"):b[0]==="i"&&this.findRow(m-1)!==void 0&&this._copyStyle(m-1,m+M,b[1]==="+");return this.getRows(m,v.length)}_setStyleOption(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";v[0]==="o"&&this.findRow(m+1)!==void 0?this._copyStyle(m+1,m,v[1]==="+"):v[0]==="i"&&this.findRow(m-1)!==void 0&&this._copyStyle(m-1,m,v[1]==="+")}_copyStyle(m,v){let b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const M=this.getRow(m),D=this.getRow(v);D.style=p(M.style),M.eachCell({includeEmpty:b},($,A)=>{D.getCell(A).style=p($.style)}),D.height=M.height}duplicateRow(m,v){let b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const M=this._rows[m-1],D=new Array(v).fill(M.values);this.spliceRows(m+1,b?0:v,...D);for(let $=0;$<v;$++){const A=this._rows[m+$];A.style=M.style,A.height=M.height,M.eachCell({includeEmpty:!0},(H,N)=>{A.getCell(N).style=H.style})}}spliceRows(m,v){const b=m+v;for(var M=arguments.length,D=new Array(M>2?M-2:0),$=2;$<M;$++)D[$-2]=arguments[$];const A=D.length,H=A-v,N=this._rows.length;let z,L;if(H<0)for(m===N&&(this._rows[N-1]=void 0),z=b;z<=N;z++)if(L=this._rows[z-1],L){const Y=this.getRow(z+H);Y.values=L.values,Y.style=L.style,Y.height=L.height,L.eachCell({includeEmpty:!0},(B,T)=>{Y.getCell(T).style=B.style}),this._rows[z-1]=void 0}else this._rows[z+H-1]=void 0;else if(H>0)for(z=N;z>=b;z--)if(L=this._rows[z-1],L){const Y=this.getRow(z+H);Y.values=L.values,Y.style=L.style,Y.height=L.height,L.eachCell({includeEmpty:!0},(B,T)=>{if(Y.getCell(T).style=B.style,B._value.constructor.name==="MergeValue"){const E=this.getRow(B._row._number+A).getCell(T),P=B._value._master,w=this.getRow(P._row._number+A).getCell(P._column._number);E.merge(w)}})}else this._rows[z+H-1]=void 0;for(z=0;z<A;z++){const Y=this.getRow(m+z);Y.style={},Y.values=D[z]}this.workbook.definedNames.spliceRows(this.name,m,v,A)}eachRow(m,v){if(v||(v=m,m=void 0),m&&m.includeEmpty){const b=this._rows.length;for(let M=1;M<=b;M++)v(this.getRow(M),M)}else this._rows.forEach(b=>{b&&b.hasValues&&v(b,b.number)})}getSheetValues(){const m=[];return this._rows.forEach(v=>{v&&(m[v.number]=v.values)}),m}findCell(m,v){const b=o.getAddress(m,v),M=this._rows[b.row-1];return M?M.findCell(b.col):void 0}getCell(m,v){const b=o.getAddress(m,v);return this.getRow(b.row).getCellEx(b)}mergeCells(){for(var m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];const M=new l(v);this._mergeCellsInternal(M)}mergeCellsWithoutStyle(){for(var m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];const M=new l(v);this._mergeCellsInternal(M,!0)}_mergeCellsInternal(m,v){s.each(this._merges,M=>{if(M.intersects(m))throw new Error("Cannot merge already merged cells")});const b=this.getCell(m.top,m.left);for(let M=m.top;M<=m.bottom;M++)for(let D=m.left;D<=m.right;D++)(M>m.top||D>m.left)&&this.getCell(M,D).merge(b,v);this._merges[b.address]=m}_unMergeMaster(m){const v=this._merges[m.address];if(v){for(let b=v.top;b<=v.bottom;b++)for(let M=v.left;M<=v.right;M++)this.getCell(b,M).unmerge();delete this._merges[m.address]}}get hasMerges(){return s.some(this._merges,Boolean)}unMergeCells(){for(var m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];const M=new l(v);for(let D=M.top;D<=M.bottom;D++)for(let $=M.left;$<=M.right;$++){const A=this.findCell(D,$);A&&(A.type===d.ValueType.Merge?this._unMergeMaster(A.master):this._merges[A.address]&&this._unMergeMaster(A))}}fillFormula(m,v,b){let M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const D=o.decode(m),{top:$,left:A,bottom:H,right:N}=D,z=N-A+1,L=o.encodeAddress($,A),Y=M==="shared";let B;B=typeof b=="function"?b:Array.isArray(b)?Array.isArray(b[0])?(E,P)=>b[E-$][P-A]:(E,P)=>b[(E-$)*z+(P-A)]:()=>{};let T=!0;for(let E=$;E<=H;E++)for(let P=A;P<=N;P++)T?(this.getCell(E,P).value={shareType:M,formula:v,ref:m,result:B(E,P)},T=!1):this.getCell(E,P).value=Y?{sharedFormula:L,result:B(E,P)}:B(E,P)}addImage(m,v){const b={type:"image",imageId:m,range:v};this._media.push(new h(this,b))}getImages(){return this._media.filter(m=>m.type==="image")}addBackgroundImage(m){const v={type:"background",imageId:m};this._media.push(new h(this,v))}getBackgroundImageId(){const m=this._media.find(v=>v.type==="background");return m&&m.imageId}protect(m,v){return new Promise(b=>{this.sheetProtection={sheet:!0},v&&"spinCount"in v&&(v.spinCount=Number.isFinite(v.spinCount)?Math.round(Math.max(0,v.spinCount)):1e5),m&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=g.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=v&&"spinCount"in v?v.spinCount:1e5,this.sheetProtection.hashValue=g.convertPasswordToHash(m,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),v&&(this.sheetProtection=Object.assign(this.sheetProtection,v),!m&&"spinCount"in v&&delete this.sheetProtection.spinCount),b()})}unprotect(){this.sheetProtection=null}addTable(m){const v=new c(this,m);return this.tables[m.name]=v,v}getTable(m){return this.tables[m]}removeTable(m){delete this.tables[m]}getTables(){return Object.values(this.tables)}addConditionalFormatting(m){this.conditionalFormattings.push(m)}removeConditionalFormatting(m){typeof m=="number"?this.conditionalFormattings.splice(m,1):this.conditionalFormattings=m instanceof Function?this.conditionalFormattings.filter(m):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(m){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=m}get model(){const m={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(M=>M.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(M=>M.model),conditionalFormattings:this.conditionalFormattings};m.cols=i.toModel(this.columns);const v=m.rows=[],b=m.dimensions=new l;return this._rows.forEach(M=>{const D=M&&M.model;D&&(b.expand(D.number,D.min,D.number,D.max),v.push(D))}),m.merges=[],s.each(this._merges,M=>{m.merges.push(M.range)}),m}_parseRows(m){this._rows=[],m.rows.forEach(v=>{const b=new u(this,v.number);this._rows[b.number-1]=b,b.model=v})}_parseMergeCells(m){s.each(m.mergeCells,v=>{this.mergeCellsWithoutStyle(v)})}set model(m){this.name=m.name,this._columns=i.fromModel(this,m.cols),this._parseRows(m),this._parseMergeCells(m),this.dataValidations=new f(m.dataValidations),this.properties=m.properties,this.pageSetup=m.pageSetup,this.headerFooter=m.headerFooter,this.views=m.views,this.autoFilter=m.autoFilter,this._media=m.media.map(v=>new h(this,v)),this.sheetProtection=m.sheetProtection,this.tables=m.tables.reduce((v,b)=>{const M=new c;return M.model=b,v[b.name]=M,v},{}),this.conditionalFormattings=m.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,t,n){e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");const s={Workbook:e("./doc/workbook")},o=e("./doc/enums");Object.keys(o).forEach(l=>{s[l]=o[l]}),t.exports=s},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,t,n){const s=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");n.bufferToString=function(o){return typeof o=="string"?o:s?s.decode(o):o.toString()}},{}],17:[function(e,t,n){const s=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=e("buffer");n.stringToBuffer=function(l){return typeof l!="string"?l:s?o.from(s.encode(l).buffer):o.from(l)}},{buffer:220}],18:[function(e,t,n){const s=e("./under-dash"),o=e("./col-cache");t.exports=class{constructor(l){this.template=l,this.sheets={}}addCell(l){this.addCellEx(o.decodeEx(l))}getCell(l){return this.findCellEx(o.decodeEx(l),!0)}findCell(l){return this.findCellEx(o.decodeEx(l),!1)}findCellAt(l,u,i){const d=this.sheets[l],h=d&&d[u];return h&&h[i]}addCellEx(l){if(l.top)for(let u=l.top;u<=l.bottom;u++)for(let i=l.left;i<=l.right;i++)this.getCellAt(l.sheetName,u,i);else this.findCellEx(l,!0)}getCellEx(l){return this.findCellEx(l,!0)}findCellEx(l,u){const i=this.findSheet(l,u),d=this.findSheetRow(i,l,u);return this.findRowCell(d,l,u)}getCellAt(l,u,i){const d=this.sheets[l]||(this.sheets[l]=[]),h=d[u]||(d[u]=[]);return h[i]||(h[i]={sheetName:l,address:o.n2l(i)+u,row:u,col:i})}removeCellEx(l){const u=this.findSheet(l);if(!u)return;const i=this.findSheetRow(u,l);i&&delete i[l.col]}forEachInSheet(l,u){const i=this.sheets[l];i&&i.forEach((d,h)=>{d&&d.forEach((c,f)=>{c&&u(c,h,f)})})}forEach(l){s.each(this.sheets,(u,i)=>{this.forEachInSheet(i,l)})}map(l){const u=[];return this.forEach(i=>{u.push(l(i))}),u}findSheet(l,u){const i=l.sheetName;return this.sheets[i]?this.sheets[i]:u?this.sheets[i]=[]:void 0}findSheetRow(l,u,i){const{row:d}=u;return l&&l[d]?l[d]:i?l[d]=[]:void 0}findRowCell(l,u,i){const{col:d}=u;return l&&l[d]?l[d]:i?l[d]=this.template?Object.assign(u,JSON.parse(JSON.stringify(this.template))):u:void 0}spliceRows(l,u,i,d){const h=this.sheets[l];if(h){const c=[];for(let f=0;f<d;f++)c.push([]);h.splice(u,i,...c)}}spliceColumns(l,u,i,d){const h=this.sheets[l];if(h){const c=[];for(let f=0;f<d;f++)c.push(null);s.each(h,f=>{f.splice(u,i,...c)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,t,n){const s=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:l=>l<=26?1:l<=676?2:3,_fill(l){let u,i,d,h,c,f=1;if(l>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&l>=1){for(;f<=26;)u=this._dictionary[f-1],this._n2l[f]=u,this._l2n[u]=f,f++;this._l2nFill=1}if(this._l2nFill<2&&l>=2){for(f=27;f<=702;)i=f-27,d=i%26,h=Math.floor(i/26),u=this._dictionary[h]+this._dictionary[d],this._n2l[f]=u,this._l2n[u]=f,f++;this._l2nFill=2}if(this._l2nFill<3&&l>=3){for(f=703;f<=16384;)i=f-703,d=i%26,h=Math.floor(i/26)%26,c=Math.floor(i/676),u=this._dictionary[c]+this._dictionary[h]+this._dictionary[d],this._n2l[f]=u,this._l2n[u]=f,f++;this._l2nFill=3}},l2n(l){if(this._l2n[l]||this._fill(l.length),!this._l2n[l])throw new Error("Out of bounds. Invalid column letter: "+l);return this._l2n[l]},n2l(l){if(l<1||l>16384)throw new Error(l+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[l]||this._fill(this._level(l)),this._n2l[l]},_hash:{},validateAddress(l){if(!s.test(l))throw new Error("Invalid Address: "+l);return!0},decodeAddress(l){const u=l.length<5&&this._hash[l];if(u)return u;let i=!1,d="",h=0,c=!1,f="",g=0;for(let m,v=0;v<l.length;v++)if(m=l.charCodeAt(v),!c&&m>=65&&m<=90)i=!0,d+=l[v],h=26*h+m-64;else if(m>=48&&m<=57)c=!0,f+=l[v],g=10*g+m-48;else if(c&&i&&m!==36)break;if(i){if(h>16384)throw new Error("Out of bounds. Invalid column letter: "+d)}else h=void 0;c||(g=void 0);const p={address:l=d+f,col:h,row:g,$col$row:`$${d}$${f}`};return h<=100&&g<=100&&(this._hash[l]=p,this._hash[p.$col$row]=p),p},getAddress(l,u){if(u){const i=this.n2l(u)+l;return this.decodeAddress(i)}return this.decodeAddress(l)},decode(l){const u=l.split(":");if(u.length===2){const i=this.decodeAddress(u[0]),d=this.decodeAddress(u[1]),h={top:Math.min(i.row,d.row),left:Math.min(i.col,d.col),bottom:Math.max(i.row,d.row),right:Math.max(i.col,d.col)};return h.tl=this.n2l(h.left)+h.top,h.br=this.n2l(h.right)+h.bottom,h.dimensions=`${h.tl}:${h.br}`,h}return this.decodeAddress(l)},decodeEx(l){const u=l.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),i=u[1]||u[2],d=u[3],h=d.split(":");if(h.length>1){let f=this.decodeAddress(h[0]),g=this.decodeAddress(h[1]);const p=Math.min(f.row,g.row),m=Math.min(f.col,g.col),v=Math.max(f.row,g.row),b=Math.max(f.col,g.col);return f=this.n2l(m)+p,g=this.n2l(b)+v,{top:p,left:m,bottom:v,right:b,sheetName:i,tl:{address:f,col:m,row:p,$col$row:`$${this.n2l(m)}$${p}`,sheetName:i},br:{address:g,col:b,row:v,$col$row:`$${this.n2l(b)}$${v}`,sheetName:i},dimensions:`${f}:${g}`}}if(d.startsWith("#"))return i?{sheetName:i,error:d}:{error:d};const c=this.decodeAddress(d);return i?{sheetName:i,...c}:c},encodeAddress:(l,u)=>o.n2l(u)+l,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(l,u){const[i,d,,h,c]=l,[f,g]=u;return f>=i&&f<=h&&g>=d&&g<=c}};t.exports=o},{}],20:[function(e,t,n){const s=(l,u)=>({...l,...u.reduce((i,d)=>(l[d]&&(i[d]={...l[d]}),i),{})}),o=function(l,u,i){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];l[i]&&(u[i]=s(l[i],d))};n.copyStyle=l=>{if(!l)return l;if(u=l,Object.keys(u).length===0)return{};var u;const i={...l};return o(l,i,"font",["color"]),o(l,i,"alignment"),o(l,i,"protection"),l.border&&(o(l,i,"border"),o(l.border,i.border,"top",["color"]),o(l.border,i.border,"left",["color"]),o(l.border,i.border,"bottom",["color"]),o(l.border,i.border,"right",["color"]),o(l.border,i.border,"diagonal",["color"])),l.fill&&(o(l,i,"fill",["fgColor","bgColor","center"]),l.fill.stops&&(i.fill.stops=l.fill.stops.map(d=>s(d,["color"])))),i}},{}],21:[function(e,t,n){(function(s){(function(){const o=e("crypto"),l={hash(u){const i=o.createHash(u);for(var d=arguments.length,h=new Array(d>1?d-1:0),c=1;c<d;c++)h[c-1]=arguments[c];return i.update(s.concat(h)),i.digest()},convertPasswordToHash(u,i,d,h){if(i=i.toLowerCase(),o.getHashes().indexOf(i)<0)throw new Error(`Hash algorithm '${i}' not supported!`);const c=s.from(u,"utf16le");let f=this.hash(i,s.from(d,"base64"),c);for(let g=0;g<h;g++){const p=s.alloc(4);p.writeUInt32LE(g,0),f=this.hash(i,f,p)}return f.toString("base64")},randomBytes:u=>o.randomBytes(u)};t.exports=l}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,t,n){const{SaxesParser:s}=e("saxes"),{PassThrough:o}=e("readable-stream"),{bufferToString:l}=e("./browser-buffer-decode");t.exports=async function*(u){u.pipe&&!u[Symbol.asyncIterator]&&(u=u.pipe(new o));const i=new s;let d;i.on("error",c=>{d=c});let h=[];i.on("opentag",c=>h.push({eventType:"opentag",value:c})),i.on("text",c=>h.push({eventType:"text",value:c})),i.on("closetag",c=>h.push({eventType:"closetag",value:c}));for await(const c of u){if(i.write(l(c)),d)throw d;yield h,h=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,t,n){const s=e("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,l=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;t.exports={slideFormula:function(u,i,d){const h=s.decode(i),c=s.decode(d);return u.replace(o,(f,g,p,m,v)=>{if(v)return f;const b=l.exec(m);if(b){const M=b[1],D=b[2].toUpperCase(),$=b[3],A=b[4];if(D.length>3||D.length===3&&D>"XFD")return f;let H=s.l2n(D),N=parseInt(A,10);return M||(H+=c.col-h.col),$||(N+=c.row-h.row),(g||"")+(M||"")+s.n2l(H)+($||"")+N}return f})}}},{"./col-cache":19}],24:[function(e,t,n){(function(s,o){(function(){const l=e("readable-stream"),u=e("./utils"),i=e("./string-buf");class d{constructor(m,v){this._data=m,this._encoding=v}get length(){return this.toBuffer().length}copy(m,v,b,M){return this.toBuffer().copy(m,v,b,M)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class h{constructor(m){this._data=m}get length(){return this._data.length}copy(m,v,b,M){return this._data._buf.copy(m,v,b,M)}toBuffer(){return this._data.toBuffer()}}class c{constructor(m){this._data=m}get length(){return this._data.length}copy(m,v,b,M){this._data.copy(m,v,b,M)}toBuffer(){return this._data}}class f{constructor(m){this.size=m,this.buffer=o.alloc(m),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const m=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(m,0,this.iRead,this.iWrite),m}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(m){let v;return m===0?null:m===void 0||m>=this.length?(v=this.toBuffer(),this.iRead=this.iWrite,v):(v=o.alloc(m),this.buffer.copy(v,0,this.iRead,m),this.iRead+=m,v)}write(m,v,b){const M=Math.min(b,this.size-this.iWrite);return m.copy(this.buffer,this.iWrite,v,v+M),this.iWrite+=M,M}}const g=function(p){p=p||{},this.bufSize=p.bufSize||1048576,this.buffers=[],this.batch=p.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};u.inherits(g,l.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(p=>p.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const m=this.buffers[this.buffers.length-1];if(!m.full)return m}const p=new f(this.bufSize);return this.buffers.push(p),p},async _pipe(p){await Promise.all(this.pipes.map(function(m){return new Promise(v=>{m.write(p.toBuffer(),()=>{v()})})}))},_writeToBuffers(p){let m=0;const v=p.length;for(;m<v;)m+=this._getWritableBuffer().write(p,m,v-m)},async write(p,m,v){let b;if(m instanceof Function&&(v=m,m="utf8"),v=v||u.nop,p instanceof i)b=new h(p);else if(p instanceof o)b=new c(p);else{if(!(typeof p=="string"||p instanceof String||p instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");b=new d(p,m)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(b);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(b),s.nextTick(v)):(await this._pipe(b),v());else this.paused||this.emit("data",b.toBuffer()),this._writeToBuffers(b),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(p,m,v){const b=M=>{M?v(M):(this._flush(),this.pipes.forEach(D=>{D.end()}),this.emit("finish"))};p?this.write(p,m,b):b()},read(p){let m;if(p){for(m=[];p&&this.buffers.length&&!this.buffers[0].eod;){const v=this.buffers[0],b=v.read(p);p-=b.length,m.push(b),v.eod&&v.full&&this.buffers.shift()}return o.concat(m)}return m=this.buffers.map(v=>v.toBuffer()).filter(Boolean),this.buffers=[],o.concat(m)},setEncoding(p){this.encoding=p},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(p){this.pipes.push(p),!this.paused&&this.buffers.length&&this.end()},unpipe(p){this.pipes=this.pipes.filter(m=>m!==p)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),t.exports=g}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,t,n){(function(s){(function(){t.exports=class{constructor(o){this._buf=s.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=s.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let l=2*this._buf.length;for(;l<o;)l*=2;const u=s.alloc(l);this._buf.copy(u,0),this._buf=u}addText(o){this._buffer=void 0;let l=this._inPos+this._buf.write(o,this._inPos,this._encoding);for(;l>=this._buf.length-4;)this._grow(this._inPos+o.length),l=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=l}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,t,n){const{toString:s}=Object.prototype,o=/["&<>]/,l={each:function(u,i){u&&(Array.isArray(u)?u.forEach(i):Object.keys(u).forEach(d=>{i(u[d],d)}))},some:function(u,i){return!!u&&(Array.isArray(u)?u.some(i):Object.keys(u).some(d=>i(u[d],d)))},every:function(u,i){return!u||(Array.isArray(u)?u.every(i):Object.keys(u).every(d=>i(u[d],d)))},map:function(u,i){return u?Array.isArray(u)?u.map(i):Object.keys(u).map(d=>i(u[d],d)):[]},keyBy:(u,i)=>u.reduce((d,h)=>(d[h[i]]=h,d),{}),isEqual:function(u,i){const d=typeof u,h=typeof i,c=Array.isArray(u),f=Array.isArray(i);let g;if(d!==h)return!1;switch(typeof u){case"object":if(c||f)return!(!c||!f)&&u.length===i.length&&u.every((p,m)=>{const v=i[m];return l.isEqual(p,v)});if(u===null||i===null)return u===i;if(g=Object.keys(u),Object.keys(i).length!==g.length)return!1;for(const p of g)if(!i.hasOwnProperty(p))return!1;return l.every(u,(p,m)=>{const v=i[m];return l.isEqual(p,v)});default:return u===i}},escapeHtml(u){const i=o.exec(u);if(!i)return u;let d="",h="",c=0,f=i.index;for(;f<u.length;f++){switch(u.charAt(f)){case'"':h=""";break;case"&":h="&";break;case"'":h="'";break;case"<":h="<";break;case">":h=">";break;default:continue}c!==f&&(d+=u.substring(c,f)),c=f+1,d+=h}return c!==f?d+u.substring(c,f):d},strcmp:(u,i)=>u<i?-1:u>i?1:0,isUndefined:u=>s.call(u)==="[object Undefined]",isObject:u=>s.call(u)==="[object Object]",deepMerge(){const u=arguments[0]||{},{length:i}=arguments;let d,h,c;function f(g,p){d=u[p],c=Array.isArray(g),l.isObject(g)||c?(c?(c=!1,h=d&&Array.isArray(d)?d:[]):h=d&&l.isObject(d)?d:{},u[p]=l.deepMerge(h,g)):l.isUndefined(g)||(u[p]=g)}for(let g=0;g<i;g++)l.each(arguments[g],f);return u}};t.exports=l},{}],27:[function(e,t,n){(function(s,o){(function(){const l=e("fs"),u=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,i={nop(){},promiseImmediate:d=>new Promise(h=>{s.setImmediate?o(()=>{h(d)}):setTimeout(()=>{h(d)},1)}),inherits:function(d,h,c,f){d.super_=h,f||(f=c,c=null),c&&Object.keys(c).forEach(p=>{Object.defineProperty(d,p,Object.getOwnPropertyDescriptor(c,p))});const g={constructor:{value:d,enumerable:!1,writable:!1,configurable:!0}};f&&Object.keys(f).forEach(p=>{g[p]=Object.getOwnPropertyDescriptor(f,p)}),d.prototype=Object.create(h.prototype,g)},dateToExcel:(d,h)=>25569+d.getTime()/864e5-(h?1462:0),excelToDate(d,h){const c=Math.round(24*(d-25569+(h?1462:0))*3600*1e3);return new Date(c)},parsePath(d){const h=d.lastIndexOf("/");return{path:d.substring(0,h),name:d.substring(h+1)}},getRelsPath(d){const h=i.parsePath(d);return`${h.path}/_rels/${h.name}.rels`},xmlEncode(d){const h=u.exec(d);if(!h)return d;let c="",f="",g=0,p=h.index;for(;p<d.length;p++){const m=d.charCodeAt(p);switch(m){case 34:f=""";break;case 38:f="&";break;case 39:f="'";break;case 60:f="<";break;case 62:f=">";break;case 127:f="";break;default:if(m<=31&&(m<=8||m>=11&&m!==13)){f="";break}continue}g!==p&&(c+=d.substring(g,p)),g=p+1,f&&(c+=f)}return g!==p?c+d.substring(g,p):c},xmlDecode:d=>d.replace(/&([a-z]*);/g,h=>{switch(h){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return h}}),validInt(d){const h=parseInt(d,10);return Number.isNaN(h)?0:h},isDateFmt(d){return d?(d=(d=d.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:d=>new Promise(h=>{l.access(d,l.constants.F_OK,c=>{h(!c)})})},toIsoDateString:d=>d.toIsoString().subsstr(0,10),parseBoolean:d=>d===!0||d==="true"||d===1||d==="1"};t.exports=i}).call(this)}).call(this,typeof Rt<"u"?Rt:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,t,n){const s=e("./under-dash"),o=e("./utils");function l(d,h,c){d.push(` ${h}="${o.xmlEncode(c.toString())}"`)}function u(d,h){if(h){const c=[];s.each(h,(f,g)=>{f!==void 0&&l(c,g,f)}),d.push(c.join(""))}}class i{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(h){const c=this._xml;c.push("<?xml"),u(c,h),c.push(`?>
|
|
61
61
|
`)}openNode(h,c){const f=this.tos,g=this._xml;f&&this.open&&g.push(">"),this._stack.push(h),g.push("<"),g.push(h),u(g,c),this.leaf=!0,this.open=!0}addAttribute(h,c){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");c!==void 0&&l(this._xml,h,c)}addAttributes(h){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");u(this._xml,h)}writeText(h){const c=this._xml;this.open&&(c.push(">"),this.open=!1),this.leaf=!1,c.push(o.xmlEncode(h.toString()))}writeXml(h){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(h)}closeNode(){const h=this._stack.pop(),c=this._xml;this.leaf?c.push("/>"):(c.push("</"),c.push(h),c.push(">")),this.open=!1,this.leaf=!1}leafNode(h,c,f){this.openNode(h,c),f!==void 0&&this.writeText(f),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const h=this._rollbacks.pop();this._xml.length>h.xml&&this._xml.splice(h.xml,this._xml.length-h.xml),this._stack.length>h.stack&&this._stack.splice(h.stack,this._stack.length-h.stack),this.leaf=h.leaf,this.open=h.open}get xml(){return this.closeAll(),this._xml.join("")}}i.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},t.exports=i},{"./under-dash":26,"./utils":27}],29:[function(e,t,n){(function(s){(function(){const o=e("events"),l=e("jszip"),u=e("./stream-buf"),{stringToBuffer:i}=e("./browser-buffer-encode");class d extends o.EventEmitter{constructor(c){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},c),this.zip=new l,this.stream=new u}append(c,f){f.hasOwnProperty("base64")&&f.base64?this.zip.file(f.name,c,{base64:!0}):(s.browser&&typeof c=="string"&&(c=i(c)),this.zip.file(f.name,c))}async finalize(){const c=await this.zip.generateAsync(this.options);this.stream.end(c),this.emit("finish")}read(c){return this.stream.read(c)}setEncoding(c){return this.stream.setEncoding(c)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(c,f){return this.stream.pipe(c,f)}unpipe(c){return this.stream.unpipe(c)}unshift(c){return this.stream.unshift(c)}wrap(c){return this.stream.wrap(c)}}t.exports={ZipWriter:d}}).call(this)}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(e,t,n){t.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(e,t,n){t.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(e,t,n){const s=e("../../utils/parse-sax"),o=e("../../utils/xml-stream");class l{prepare(){}render(){}parseOpen(i){}parseText(i){}parseClose(i){}reconcile(i,d){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(i=>{i instanceof l?i.reset():i.xform&&i.xform.reset()})}mergeModel(i){this.model=Object.assign(this.model||{},i)}async parse(i){for await(const d of i)for(const{eventType:h,value:c}of d)if(h==="opentag")this.parseOpen(c);else if(h==="text")this.parseText(c);else if(h==="closetag"&&!this.parseClose(c.name))return this.model;return this.model}async parseStream(i){return this.parse(s(i))}get xml(){return this.toXml(this.model)}toXml(i){const d=new o;return this.render(d,i),d.xml}static toAttribute(i,d){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(i===void 0){if(h)return d}else if(h||i!==d)return i.toString()}static toStringAttribute(i,d){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return l.toAttribute(i,d,h)}static toStringValue(i,d){return i===void 0?d:i}static toBoolAttribute(i,d){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(i===void 0){if(h)return d}else if(h||i!==d)return i?"1":"0"}static toBoolValue(i,d){return i===void 0?d:i==="1"}static toIntAttribute(i,d){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return l.toAttribute(i,d,h)}static toIntValue(i,d){return i===void 0?d:parseInt(i,10)}static toFloatAttribute(i,d){let h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return l.toAttribute(i,d,h)}static toFloatValue(i,d){return i===void 0?d:parseFloat(i)}}t.exports=l},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,t,n){const s=e("../base-xform"),o=e("../../../utils/col-cache");function l(i){try{return o.decodeEx(i),!0}catch{return!1}}function u(i){const d=[];let h=!1,c="";return i.split(",").forEach(f=>{if(!f)return;const g=(f.match(/'/g)||[]).length;if(!g)return void(h?c+=f+",":l(f)&&d.push(f));const p=g%2==0;!h&&p&&l(f)?d.push(f):h&&!p?(h=!1,l(c+f)&&d.push(c+f),c=""):(h=!0,c+=f+",")}),d}t.exports=class extends s{render(i,d){i.openNode("definedName",{name:d.name,localSheetId:d.localSheetId}),i.writeText(d.ranges.join(",")),i.closeNode()}parseOpen(i){switch(i.name){case"definedName":return this._parsedName=i.attributes.name,this._parsedLocalSheetId=i.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(i){this._parsedText.push(i)}parseClose(){return this.model={name:this._parsedName,ranges:u(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(e,t,n){const s=e("../../../utils/utils"),o=e("../base-xform");t.exports=class extends o{render(l,u){l.leafNode("sheet",{sheetId:u.id,name:u.name,state:u.state,"r:id":u.rId})}parseOpen(l){return l.name==="sheet"&&(this.model={name:s.xmlDecode(l.attributes.name),id:parseInt(l.attributes.sheetId,10),state:l.attributes.state,rId:l.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{render(o,l){o.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:l.fullCalcOnLoad?1:void 0})}parseOpen(o){return o.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{render(o,l){o.leafNode("workbookPr",{date1904:l.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(o){return o.name==="workbookPr"&&(this.model={date1904:o.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{render(o,l){const u={xWindow:l.x||0,yWindow:l.y||0,windowWidth:l.width||12e3,windowHeight:l.height||24e3,firstSheet:l.firstSheet,activeTab:l.activeTab};l.visibility&&l.visibility!=="visible"&&(u.visibility=l.visibility),o.leafNode("workbookView",u)}parseOpen(o){if(o.name==="workbookView"){const l=this.model={},u=function(d,h,c){const f=h!==void 0?l[d]=h:c;f!==void 0&&(l[d]=f)},i=function(d,h,c){const f=h!==void 0?l[d]=parseInt(h,10):c;f!==void 0&&(l[d]=f)};return i("x",o.attributes.xWindow,0),i("y",o.attributes.yWindow,0),i("width",o.attributes.windowWidth,25e3),i("height",o.attributes.windowHeight,1e4),u("visibility",o.attributes.visibility,"visible"),i("activeTab",o.attributes.activeTab,void 0),i("firstSheet",o.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../../../utils/col-cache"),l=e("../../../utils/xml-stream"),u=e("../base-xform"),i=e("../static-xform"),d=e("../list-xform"),h=e("./defined-name-xform"),c=e("./sheet-xform"),f=e("./workbook-view-xform"),g=e("./workbook-properties-xform"),p=e("./workbook-calc-properties-xform");class m extends u{constructor(){super(),this.map={fileVersion:m.STATIC_XFORMS.fileVersion,workbookPr:new g,bookViews:new d({tag:"bookViews",count:!1,childXform:new f}),sheets:new d({tag:"sheets",count:!1,childXform:new c}),definedNames:new d({tag:"definedNames",count:!1,childXform:new h}),calcPr:new p}}prepare(b){b.sheets=b.worksheets;const M=[];let D=0;b.sheets.forEach($=>{if($.pageSetup&&$.pageSetup.printArea&&$.pageSetup.printArea.split("&&").forEach(A=>{const H=A.split(":"),N={name:"_xlnm.Print_Area",ranges:[`'${$.name}'!$${H[0]}:$${H[1]}`],localSheetId:D};M.push(N)}),$.pageSetup&&($.pageSetup.printTitlesRow||$.pageSetup.printTitlesColumn)){const A=[];if($.pageSetup.printTitlesColumn){const N=$.pageSetup.printTitlesColumn.split(":");A.push(`'${$.name}'!$${N[0]}:$${N[1]}`)}if($.pageSetup.printTitlesRow){const N=$.pageSetup.printTitlesRow.split(":");A.push(`'${$.name}'!$${N[0]}:$${N[1]}`)}const H={name:"_xlnm.Print_Titles",ranges:A,localSheetId:D};M.push(H)}D++}),M.length&&(b.definedNames=b.definedNames.concat(M)),(b.media||[]).forEach(($,A)=>{$.name=$.type+(A+1)})}render(b,M){b.openXml(l.StdDocAttributes),b.openNode("workbook",m.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(b),this.map.workbookPr.render(b,M.properties),this.map.bookViews.render(b,M.views),this.map.sheets.render(b,M.sheets),this.map.definedNames.render(b,M.definedNames),this.map.calcPr.render(b,M.calcProperties),b.closeNode()}parseOpen(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case"workbook":return!0;default:return this.parser=this.map[b.name],this.parser&&this.parser.parseOpen(b),!0}}parseText(b){this.parser&&this.parser.parseText(b)}parseClose(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(b){const M=(b.workbookRels||[]).reduce((N,z)=>(N[z.Id]=z,N),{}),D=[];let $,A=0;(b.sheets||[]).forEach(N=>{const z=M[N.rId];z&&($=b.worksheetHash["xl/"+z.Target.replace(/^(\s|\/xl\/)+/,"")],$&&($.name=N.name,$.id=N.id,$.state=N.state,D[A++]=$))});const H=[];s.each(b.definedNames,N=>{if(N.name==="_xlnm.Print_Area"){if($=D[N.localSheetId],$){$.pageSetup||($.pageSetup={});const z=o.decodeEx(N.ranges[0]);$.pageSetup.printArea=$.pageSetup.printArea?`${$.pageSetup.printArea}&&${z.dimensions}`:z.dimensions}}else if(N.name==="_xlnm.Print_Titles"){if($=D[N.localSheetId],$){$.pageSetup||($.pageSetup={});const z=N.ranges.join(","),L=/\$/g,Y=/\$\d+:\$\d+/,B=z.match(Y);if(B&&B.length){const P=B[0];$.pageSetup.printTitlesRow=P.replace(L,"")}const T=/\$[A-Z]+:\$[A-Z]+/,E=z.match(T);if(E&&E.length){const P=E[0];$.pageSetup.printTitlesColumn=P.replace(L,"")}}}else H.push(N)}),b.definedNames=H,b.media.forEach((N,z)=>{N.index=z})}}m.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},m.STATIC_XFORMS={fileVersion:new i({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},t.exports=m},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(e,t,n){const s=e("../strings/rich-text-xform"),o=e("../../../utils/utils"),l=e("../base-xform"),u=t.exports=function(i){this.model=i};o.inherits(u,l,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new s),this._richTextXform},render(i,d){d=d||this.model,i.openNode("comment",{ref:d.ref,authorId:0}),i.openNode("text"),d&&d.note&&d.note.texts&&d.note.texts.forEach(h=>{this.richTextXform.render(i,h)}),i.closeNode(),i.closeNode()},parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"comment":return this.model={type:"note",note:{texts:[]},...i.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(i),!0;default:return!1}},parseText(i){this.parser&&this.parser.parseText(i)},parseClose(i){switch(i){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(i),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(e,t,n){const s=e("../../../utils/xml-stream"),o=e("../../../utils/utils"),l=e("../base-xform"),u=e("./comment-xform"),i=t.exports=function(){this.map={comment:new u}};o.inherits(i,l,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(d,h){h=h||this.model,d.openXml(s.StdDocAttributes),d.openNode("comments",i.COMMENTS_ATTRIBUTES),d.openNode("authors"),d.leafNode("author",null,"Author"),d.closeNode(),d.openNode("commentList"),h.comments.forEach(c=>{this.map.comment.render(d,c)}),d.closeNode(),d.closeNode()},parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(d),!0;default:return!1}},parseText(d){this.parser&&this.parser.parseText(d)},parseClose(d){switch(d){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(d),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,t,n){const s=e("../../base-xform");t.exports=class extends s{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,l,u){(l===u[2]||this.tag==="x:SizeWithCells"&&l===u[1])&&o.leafNode(this.tag)}parseOpen(o){switch(o.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(e,t,n){const s=e("../../base-xform");t.exports=class extends s{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,l){o.leafNode(this.tag,null,l)}parseOpen(o){switch(o.name){case this.tag:return this.text="",!0;default:return!1}}parseText(o){this.text=o}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"x:Anchor"}getAnchorRect(o){const l=Math.floor(o.left),u=Math.floor(68*(o.left-l)),i=Math.floor(o.top),d=Math.floor(18*(o.top-i)),h=Math.floor(o.right),c=Math.floor(68*(o.right-h)),f=Math.floor(o.bottom);return[l,u,i,d,h,c,f,Math.floor(18*(o.bottom-f))]}getDefaultRect(o){const l=o.col,u=Math.max(o.row-2,0);return[l,6,u,14,l+2,2,u+4,16]}render(o,l){const u=l.anchor?this.getAnchorRect(l.anchor):this.getDefaultRect(l.refAddress);o.leafNode("x:Anchor",null,u.join(", "))}parseOpen(o){switch(o.name){case this.tag:return this.text="",!0;default:return!1}}parseText(o){this.text=o}parseClose(){return!1}}},{"../base-xform":32}],44:[function(e,t,n){const s=e("../base-xform"),o=e("./vml-anchor-xform"),l=e("./style/vml-protection-xform"),u=e("./style/vml-position-xform"),i=["twoCells","oneCells","absolute"];t.exports=class extends s{constructor(){super(),this.map={"x:Anchor":new o,"x:Locked":new l({tag:"x:Locked"}),"x:LockText":new l({tag:"x:LockText"}),"x:SizeWithCells":new u({tag:"x:SizeWithCells"}),"x:MoveWithCells":new u({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(d,h){const{protection:c,editAs:f}=h.note;d.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(d,f,i),this.map["x:SizeWithCells"].render(d,f,i),this.map["x:Anchor"].render(d,h),this.map["x:Locked"].render(d,c.locked),d.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(d,c.lockText),d.leafNode("x:Row",null,h.refAddress.row-1),d.leafNode("x:Column",null,h.refAddress.col-1),d.closeNode()}parseOpen(d){switch(d.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){const d=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),h=Object.keys(d).length;this.model.editAs=i[h],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(e,t,n){const s=e("../../../utils/xml-stream"),o=e("../base-xform"),l=e("./vml-shape-xform");class u extends o{constructor(){super(),this.map={"v:shape":new l}}get tag(){return"xml"}render(d,h){d.openXml(s.StdDocAttributes),d.openNode(this.tag,u.DRAWING_ATTRIBUTES),d.openNode("o:shapelayout",{"v:ext":"edit"}),d.leafNode("o:idmap",{"v:ext":"edit",data:1}),d.closeNode(),d.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),d.leafNode("v:stroke",{joinstyle:"miter"}),d.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),d.closeNode(),h.comments.forEach((c,f)=>{this.map["v:shape"].render(d,c,f)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(d){case this.tag:return!1;default:return!0}}reconcile(d,h){d.anchors.forEach(c=>{c.br?this.map["xdr:twoCellAnchor"].reconcile(c,h):this.map["xdr:oneCellAnchor"].reconcile(c,h)})}}u.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},t.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,t,n){const s=e("../base-xform"),o=e("./vml-textbox-xform"),l=e("./vml-client-data-xform");class u extends s{constructor(){super(),this.map={"v:textbox":new o,"x:ClientData":new l}}get tag(){return"v:shape"}render(d,h,c){d.openNode("v:shape",u.V_SHAPE_ATTRIBUTES(h,c)),d.leafNode("v:fill",{color2:"infoBackground [80]"}),d.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),d.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(d,h),this.map["x:ClientData"].render(d,h),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset(),this.model={margins:{insetmode:d.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}u.V_SHAPE_ATTRIBUTES=(i,d)=>({id:"_x0000_s"+(1025+d),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":i.note.margins&&i.note.margins.insetmode}),t.exports=u},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"v:textbox"}conversionUnit(o,l,u){return`${parseFloat(o)*l.toFixed(2)}${u}`}reverseConversionUnit(o){return(o||"").split(",").map(l=>Number(parseFloat(this.conversionUnit(parseFloat(l),.1,"")).toFixed(2)))}render(o,l){const u={style:"mso-direction-alt:auto"};if(l&&l.note){let{inset:i}=l.note&&l.note.margins;Array.isArray(i)&&(i=i.map(d=>this.conversionUnit(d,10,"mm")).join(",")),i&&(u.inset=i)}o.openNode("v:textbox",u),o.leafNode("div",{style:"text-align:left"}),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:return this.model={inset:this.reverseConversionUnit(o.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(e,t,n){const s=e("./base-xform");t.exports=class extends s{createNewModel(o){return{}}parseOpen(o){return this.parser=this.parser||this.map[o.name],this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag&&(this.model=this.createNewModel(o),!0)}parseText(o){this.parser&&this.parser.parseText(o)}onParserClose(o,l){this.model[o]=l.model}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.onParserClose(o,this.parser),this.parser=void 0),!0):o!==this.tag}}},{"./base-xform":32}],49:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{render(o,l){o.openNode("HeadingPairs"),o.openNode("vt:vector",{size:2,baseType:"variant"}),o.openNode("vt:variant"),o.leafNode("vt:lpstr",void 0,"Worksheets"),o.closeNode(),o.openNode("vt:variant"),o.leafNode("vt:i4",void 0,l.length),o.closeNode(),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="HeadingPairs"}parseText(){}parseClose(o){return o!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{render(o,l){o.openNode("TitlesOfParts"),o.openNode("vt:vector",{size:l.length,baseType:"lpstr"}),l.forEach(u=>{o.leafNode("vt:lpstr",void 0,u.name)}),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="TitlesOfParts"}parseText(){}parseClose(o){return o!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(e,t,n){const s=e("../../../utils/xml-stream"),o=e("../base-xform"),l=e("../simple/string-xform"),u=e("./app-heading-pairs-xform"),i=e("./app-titles-of-parts-xform");class d extends o{constructor(){super(),this.map={Company:new l({tag:"Company"}),Manager:new l({tag:"Manager"}),HeadingPairs:new u,TitleOfParts:new i}}render(c,f){c.openXml(s.StdDocAttributes),c.openNode("Properties",d.PROPERTY_ATTRIBUTES),c.leafNode("Application",void 0,"Microsoft Excel"),c.leafNode("DocSecurity",void 0,"0"),c.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(c,f.worksheets),this.map.TitleOfParts.render(c,f.worksheets),this.map.Company.render(c,f.company||""),this.map.Manager.render(c,f.manager),c.leafNode("LinksUpToDate",void 0,"false"),c.leafNode("SharedDoc",void 0,"false"),c.leafNode("HyperlinksChanged",void 0,"false"),c.leafNode("AppVersion",void 0,"16.0300"),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"Properties":return!0;default:return this.parser=this.map[c.name],!!this.parser&&(this.parser.parseOpen(c),!0)}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.parser=void 0),!0;switch(c){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}d.DateFormat=function(h){return h.toISOString().replace(/[.]\d{3,6}/,"")},d.DateAttrs={"xsi:type":"dcterms:W3CDTF"},d.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},t.exports=d},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(e,t,n){const s=e("../../../utils/xml-stream"),o=e("../base-xform");class l extends o{render(i,d){i.openXml(s.StdDocAttributes),i.openNode("Types",l.PROPERTY_ATTRIBUTES);const h={};(d.media||[]).forEach(c=>{if(c.type==="image"){const f=c.extension;h[f]||(h[f]=!0,i.leafNode("Default",{Extension:f,ContentType:"image/"+f}))}}),i.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),i.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),i.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),d.worksheets.forEach(c=>{const f=`/xl/worksheets/sheet${c.id}.xml`;i.leafNode("Override",{PartName:f,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),i.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),i.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),d.sharedStrings&&d.sharedStrings.count&&i.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),d.tables&&d.tables.forEach(c=>{i.leafNode("Override",{PartName:"/xl/tables/"+c.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),d.drawings&&d.drawings.forEach(c=>{i.leafNode("Override",{PartName:`/xl/drawings/${c.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),d.commentRefs&&(i.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),d.commentRefs.forEach(c=>{let{commentName:f}=c;i.leafNode("Override",{PartName:`/xl/${f}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),i.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),i.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),i.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}l.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},t.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,t,n){const s=e("../../../utils/xml-stream"),o=e("../base-xform"),l=e("../simple/date-xform"),u=e("../simple/string-xform"),i=e("../simple/integer-xform");class d extends o{constructor(){super(),this.map={"dc:creator":new u({tag:"dc:creator"}),"dc:title":new u({tag:"dc:title"}),"dc:subject":new u({tag:"dc:subject"}),"dc:description":new u({tag:"dc:description"}),"dc:identifier":new u({tag:"dc:identifier"}),"dc:language":new u({tag:"dc:language"}),"cp:keywords":new u({tag:"cp:keywords"}),"cp:category":new u({tag:"cp:category"}),"cp:lastModifiedBy":new u({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new l({tag:"cp:lastPrinted",format:d.DateFormat}),"cp:revision":new i({tag:"cp:revision"}),"cp:version":new u({tag:"cp:version"}),"cp:contentStatus":new u({tag:"cp:contentStatus"}),"cp:contentType":new u({tag:"cp:contentType"}),"dcterms:created":new l({tag:"dcterms:created",attrs:d.DateAttrs,format:d.DateFormat}),"dcterms:modified":new l({tag:"dcterms:modified",attrs:d.DateAttrs,format:d.DateFormat})}}render(c,f){c.openXml(s.StdDocAttributes),c.openNode("cp:coreProperties",d.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(c,f.creator),this.map["dc:title"].render(c,f.title),this.map["dc:subject"].render(c,f.subject),this.map["dc:description"].render(c,f.description),this.map["dc:identifier"].render(c,f.identifier),this.map["dc:language"].render(c,f.language),this.map["cp:keywords"].render(c,f.keywords),this.map["cp:category"].render(c,f.category),this.map["cp:lastModifiedBy"].render(c,f.lastModifiedBy),this.map["cp:lastPrinted"].render(c,f.lastPrinted),this.map["cp:revision"].render(c,f.revision),this.map["cp:version"].render(c,f.version),this.map["cp:contentStatus"].render(c,f.contentStatus),this.map["cp:contentType"].render(c,f.contentType),this.map["dcterms:created"].render(c,f.created),this.map["dcterms:modified"].render(c,f.modified),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[c.name],this.parser)return this.parser.parseOpen(c),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(c))}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.parser=void 0),!0;switch(c){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+c)}}}d.DateFormat=function(h){return h.toISOString().replace(/[.]\d{3}/,"")},d.DateAttrs={"xsi:type":"dcterms:W3CDTF"},d.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},t.exports=d},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{render(o,l){o.leafNode("Relationship",l)}parseOpen(o){switch(o.name){case"Relationship":return this.model=o.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(e,t,n){const s=e("../../../utils/xml-stream"),o=e("../base-xform"),l=e("./relationship-xform");class u extends o{constructor(){super(),this.map={Relationship:new l}}render(d,h){h=h||this._values,d.openXml(s.StdDocAttributes),d.openNode("Relationships",u.RELATIONSHIPS_ATTRIBUTES),h.forEach(c=>{this.map.Relationship.render(d,c)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[d.name],this.parser)return this.parser.parseOpen(d),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(d))}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(d){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+d)}}}u.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},t.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:this.reset(),this.model={range:{editAs:o.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)}return!0}parseText(o){this.parser&&this.parser.parseText(o)}reconcilePicture(o,l){if(o&&o.rId){const u=l.rels[o.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(u){const i=u[1],d=l.mediaIndex[i];return l.media[d]}}}}},{"../base-xform":32}],57:[function(e,t,n){const s=e("../base-xform"),o=e("./blip-xform");t.exports=class extends s{constructor(){super(),this.map={"a:blip":new o}}get tag(){return"xdr:blipFill"}render(l,u){l.openNode(this.tag),this.map["a:blip"].render(l,u),l.openNode("a:stretch"),l.leafNode("a:fillRect"),l.closeNode(),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:this.reset();break;default:this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)}return!0}parseText(){}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"a:blip"}render(o,l){o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":l.rId,cstate:"print"})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"xdr:cNvPicPr"}render(o){o.openNode(this.tag),o.leafNode("a:picLocks",{noChangeAspect:"1"}),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(e,t,n){const s=e("../base-xform"),o=e("./hlink-click-xform"),l=e("./ext-lst-xform");t.exports=class extends s{constructor(){super(),this.map={"a:hlinkClick":new o,"a:extLst":new l}}get tag(){return"xdr:cNvPr"}render(u,i){u.openNode(this.tag,{id:i.index,name:"Picture "+i.index}),this.map["a:hlinkClick"].render(u,i),this.map["a:extLst"].render(u,i),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(){}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(e,t,n){const s=e("../base-xform"),o=e("../simple/integer-xform");t.exports=class extends s{constructor(l){super(),this.tag=l.tag,this.map={"xdr:col":new o({tag:"xdr:col",zero:!0}),"xdr:colOff":new o({tag:"xdr:colOff",zero:!0}),"xdr:row":new o({tag:"xdr:row",zero:!0}),"xdr:rowOff":new o({tag:"xdr:rowOff",zero:!0})}}render(l,u){l.openNode(this.tag),this.map["xdr:col"].render(l,u.nativeCol),this.map["xdr:colOff"].render(l,u.nativeColOff),this.map["xdr:row"].render(l,u.nativeRow),this.map["xdr:rowOff"].render(l,u.nativeRowOff),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:this.reset();break;default:this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)}return!0}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(e,t,n){const s=e("../../../utils/col-cache"),o=e("../../../utils/xml-stream"),l=e("../base-xform"),u=e("./two-cell-anchor-xform"),i=e("./one-cell-anchor-xform");class d extends l{constructor(){super(),this.map={"xdr:twoCellAnchor":new u,"xdr:oneCellAnchor":new i}}prepare(c){c.anchors.forEach((f,g)=>{f.anchorType=function(p){return(typeof p.range=="string"?s.decode(p.range):p.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(f),this.map[f.anchorType].prepare(f,{index:g})})}get tag(){return"xdr:wsDr"}render(c,f){c.openXml(o.StdDocAttributes),c.openNode(this.tag,d.DRAWING_ATTRIBUTES),f.anchors.forEach(g=>{this.map[g.anchorType].render(c,g)}),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[c.name],this.parser&&this.parser.parseOpen(c)}return!0}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(c){case this.tag:return!1;default:return!0}}reconcile(c,f){c.anchors.forEach(g=>{g.br?this.map["xdr:twoCellAnchor"].reconcile(g,f):this.map["xdr:oneCellAnchor"].reconcile(g,f)})}}d.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},t.exports=d},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"a:extLst"}render(o){o.openNode(this.tag),o.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),o.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),o.closeNode(),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{constructor(o){super(),this.tag=o.tag,this.map={}}render(o,l){o.openNode(this.tag);const u=Math.floor(9525*l.width),i=Math.floor(9525*l.height);o.addAttribute("cx",u),o.addAttribute("cy",i),o.closeNode()}parseOpen(o){return o.name===this.tag&&(this.model={width:parseInt(o.attributes.cx||"0",10)/9525,height:parseInt(o.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"a:hlinkClick"}render(o,l){l.hyperlinks&&l.hyperlinks.rId&&o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":l.hyperlinks.rId,tooltip:l.hyperlinks.tooltip})}parseOpen(o){switch(o.name){case this.tag:return this.model={hyperlinks:{rId:o.attributes["r:id"],tooltip:o.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(e,t,n){const s=e("../base-xform"),o=e("./c-nv-pr-xform"),l=e("./c-nv-pic-pr-xform");t.exports=class extends s{constructor(){super(),this.map={"xdr:cNvPr":new o,"xdr:cNvPicPr":new l}}get tag(){return"xdr:nvPicPr"}render(u,i){u.openNode(this.tag),this.map["xdr:cNvPr"].render(u,i),this.map["xdr:cNvPicPr"].render(u,i),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(){}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(e,t,n){const s=e("./base-cell-anchor-xform"),o=e("../static-xform"),l=e("./cell-position-xform"),u=e("./ext-xform"),i=e("./pic-xform");t.exports=class extends s{constructor(){super(),this.map={"xdr:from":new l({tag:"xdr:from"}),"xdr:ext":new u({tag:"xdr:ext"}),"xdr:pic":new i,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(d,h){this.map["xdr:pic"].prepare(d.picture,h)}render(d,h){d.openNode(this.tag,{editAs:h.range.editAs||"oneCell"}),this.map["xdr:from"].render(d,h.range.tl),this.map["xdr:ext"].render(d,h.range.ext),this.map["xdr:pic"].render(d,h.picture),this.map["xdr:clientData"].render(d,{}),d.closeNode()}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(d,h){d.medium=this.reconcilePicture(d.picture,h)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,t,n){const s=e("../base-xform"),o=e("../static-xform"),l=e("./blip-fill-xform"),u=e("./nv-pic-pr-xform"),i=e("./sp-pr");t.exports=class extends s{constructor(){super(),this.map={"xdr:nvPicPr":new u,"xdr:blipFill":new l,"xdr:spPr":new o(i)}}get tag(){return"xdr:pic"}prepare(d,h){d.index=h.index+1}render(d,h){d.openNode(this.tag),this.map["xdr:nvPicPr"].render(d,h),this.map["xdr:blipFill"].render(d,h),this.map["xdr:spPr"].render(d,h),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset();break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(){}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(d){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(e,t,n){t.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(e,t,n){const s=e("./base-cell-anchor-xform"),o=e("../static-xform"),l=e("./cell-position-xform"),u=e("./pic-xform");t.exports=class extends s{constructor(){super(),this.map={"xdr:from":new l({tag:"xdr:from"}),"xdr:to":new l({tag:"xdr:to"}),"xdr:pic":new u,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(i,d){this.map["xdr:pic"].prepare(i.picture,d)}render(i,d){i.openNode(this.tag,{editAs:d.range.editAs||"oneCell"}),this.map["xdr:from"].render(i,d.range.tl),this.map["xdr:to"].render(i,d.range.br),this.map["xdr:pic"].render(i,d.picture),this.map["xdr:clientData"].render(i,{}),i.closeNode()}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(i,d){i.medium=this.reconcilePicture(i.picture,d)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,t,n){const s=e("./base-xform");t.exports=class extends s{constructor(o){super(),this.tag=o.tag,this.always=!!o.always,this.count=o.count,this.empty=o.empty,this.$count=o.$count||"count",this.$=o.$,this.childXform=o.childXform,this.maxItems=o.maxItems}prepare(o,l){const{childXform:u}=this;o&&o.forEach((i,d)=>{l.index=d,u.prepare(i,l)})}render(o,l){if(this.always||l&&l.length){o.openNode(this.tag,this.$),this.count&&o.addAttribute(this.$count,l&&l.length||0);const{childXform:u}=this;(l||[]).forEach((i,d)=>{u.render(o,i,d)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(o)&&(this.parser=this.childXform,!0)}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser){if(!this.parser.parseClose(o)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(o,l){if(o){const{childXform:u}=this;o.forEach(i=>{u.reconcile(i,l)})}}}},{"./base-xform":32}],72:[function(e,t,n){const s=e("../../../utils/col-cache"),o=e("../base-xform");t.exports=class extends o{get tag(){return"autoFilter"}render(l,u){if(u)if(typeof u=="string")l.leafNode("autoFilter",{ref:u});else{const i=function(c){return typeof c=="string"?c:s.getAddress(c.row,c.column).address},d=i(u.from),h=i(u.to);d&&h&&l.leafNode("autoFilter",{ref:`${d}:${h}`})}}parseOpen(l){l.name==="autoFilter"&&(this.model=l.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,t,n){const s=e("../../../utils/utils"),o=e("../base-xform"),l=e("../../../doc/range"),u=e("../../../doc/enums"),i=e("../strings/rich-text-xform");function d(h){if(h==null)return u.ValueType.Null;if(h instanceof String||typeof h=="string")return u.ValueType.String;if(typeof h=="number")return u.ValueType.Number;if(typeof h=="boolean")return u.ValueType.Boolean;if(h instanceof Date)return u.ValueType.Date;if(h.text&&h.hyperlink)return u.ValueType.Hyperlink;if(h.formula)return u.ValueType.Formula;if(h.error)return u.ValueType.Error;throw new Error("I could not understand type of value")}t.exports=class extends o{constructor(){super(),this.richTextXForm=new i}get tag(){return"c"}prepare(h,c){const f=c.styles.addStyleModel(h.style||{},function(g){switch(g.type){case u.ValueType.Formula:return d(g.result);default:return g.type}}(h));switch(f&&(h.styleId=f),h.comment&&c.comments.push({...h.comment,ref:h.address}),h.type){case u.ValueType.String:case u.ValueType.RichText:c.sharedStrings&&(h.ssId=c.sharedStrings.add(h.value));break;case u.ValueType.Date:c.date1904&&(h.date1904=!0);break;case u.ValueType.Hyperlink:c.sharedStrings&&h.text!==void 0&&h.text!==null&&(h.ssId=c.sharedStrings.add(h.text)),c.hyperlinks.push({address:h.address,target:h.hyperlink,tooltip:h.tooltip});break;case u.ValueType.Merge:c.merges.add(h);break;case u.ValueType.Formula:if(c.date1904&&(h.date1904=!0),h.shareType==="shared"&&(h.si=c.siFormulae++),h.formula)c.formulae[h.address]=h;else if(h.sharedFormula){const g=c.formulae[h.sharedFormula];if(!g)throw new Error("Shared Formula master must exist above and or left of clone for cell "+h.address);g.si===void 0?(g.shareType="shared",g.si=c.siFormulae++,g.range=new l(g.address,h.address)):g.range&&g.range.expandToAddress(h.address),h.si=g.si}}}renderFormula(h,c){let f=null;switch(c.shareType){case"shared":f={t:"shared",ref:c.ref||c.range.range,si:c.si};break;case"array":f={t:"array",ref:c.ref};break;default:c.si!==void 0&&(f={t:"shared",si:c.si})}switch(d(c.result)){case u.ValueType.Null:h.leafNode("f",f,c.formula);break;case u.ValueType.String:h.addAttribute("t","str"),h.leafNode("f",f,c.formula),h.leafNode("v",null,c.result);break;case u.ValueType.Number:h.leafNode("f",f,c.formula),h.leafNode("v",null,c.result);break;case u.ValueType.Boolean:h.addAttribute("t","b"),h.leafNode("f",f,c.formula),h.leafNode("v",null,c.result?1:0);break;case u.ValueType.Error:h.addAttribute("t","e"),h.leafNode("f",f,c.formula),h.leafNode("v",null,c.result.error);break;case u.ValueType.Date:h.leafNode("f",f,c.formula),h.leafNode("v",null,s.dateToExcel(c.result,c.date1904));break;default:throw new Error("I could not understand type of value")}}render(h,c){if(c.type!==u.ValueType.Null||c.styleId){switch(h.openNode("c"),h.addAttribute("r",c.address),c.styleId&&h.addAttribute("s",c.styleId),c.type){case u.ValueType.Null:break;case u.ValueType.Number:h.leafNode("v",null,c.value);break;case u.ValueType.Boolean:h.addAttribute("t","b"),h.leafNode("v",null,c.value?"1":"0");break;case u.ValueType.Error:h.addAttribute("t","e"),h.leafNode("v",null,c.value.error);break;case u.ValueType.String:case u.ValueType.RichText:c.ssId!==void 0?(h.addAttribute("t","s"),h.leafNode("v",null,c.ssId)):c.value&&c.value.richText?(h.addAttribute("t","inlineStr"),h.openNode("is"),c.value.richText.forEach(f=>{this.richTextXForm.render(h,f)}),h.closeNode("is")):(h.addAttribute("t","str"),h.leafNode("v",null,c.value));break;case u.ValueType.Date:h.leafNode("v",null,s.dateToExcel(c.value,c.date1904));break;case u.ValueType.Hyperlink:c.ssId!==void 0?(h.addAttribute("t","s"),h.leafNode("v",null,c.ssId)):(h.addAttribute("t","str"),h.leafNode("v",null,c.text));break;case u.ValueType.Formula:this.renderFormula(h,c);break;case u.ValueType.Merge:}h.closeNode()}}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case"c":return this.model={address:h.attributes.r},this.t=h.attributes.t,h.attributes.s&&(this.model.styleId=parseInt(h.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=h.attributes.si,this.model.shareType=h.attributes.t,this.model.ref=h.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(h),!0;default:return!1}}parseText(h){if(this.parser)this.parser.parseText(h);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+h:h;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+h:h:this.model.value=this.model.value?this.model.value+h:h}}parseClose(h){switch(h){case"c":{const{model:c}=this;if(c.formula||c.shareType)c.type=u.ValueType.Formula,c.value&&(this.t==="str"?c.result=s.xmlDecode(c.value):this.t==="b"?c.result=parseInt(c.value,10)!==0:this.t==="e"?c.result={error:c.value}:c.result=parseFloat(c.value),c.value=void 0);else if(c.value!==void 0)switch(this.t){case"s":c.type=u.ValueType.String,c.value=parseInt(c.value,10);break;case"str":c.type=u.ValueType.String,c.value=s.xmlDecode(c.value);break;case"inlineStr":c.type=u.ValueType.String;break;case"b":c.type=u.ValueType.Boolean,c.value=parseInt(c.value,10)!==0;break;case"e":c.type=u.ValueType.Error,c.value={error:c.value};break;default:c.type=u.ValueType.Number,c.value=parseFloat(c.value)}else c.styleId?c.type=u.ValueType.Null:c.type=u.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(h),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(h),!0)}}reconcile(h,c){const f=h.styleId&&c.styles&&c.styles.getStyleModel(h.styleId);switch(f&&(h.style=f),h.styleId!==void 0&&(h.styleId=void 0),h.type){case u.ValueType.String:typeof h.value=="number"&&c.sharedStrings&&(h.value=c.sharedStrings.getString(h.value)),h.value.richText&&(h.type=u.ValueType.RichText);break;case u.ValueType.Number:f&&s.isDateFmt(f.numFmt)&&(h.type=u.ValueType.Date,h.value=s.excelToDate(h.value,c.date1904));break;case u.ValueType.Formula:h.result!==void 0&&f&&s.isDateFmt(f.numFmt)&&(h.result=s.excelToDate(h.result,c.date1904)),h.shareType==="shared"&&(h.ref?c.formulae[h.si]=h.address:(h.sharedFormula=c.formulae[h.si],delete h.shareType),delete h.si)}const g=c.hyperlinkMap[h.address];g&&(h.type===u.ValueType.Formula?(h.text=h.result,h.result=void 0):(h.text=h.value,h.value=void 0),h.type=u.ValueType.Hyperlink,h.hyperlink=g);const p=c.commentsMap&&c.commentsMap[h.address];p&&(h.comment=p)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,t,n){const s=e("../../base-xform");t.exports=class extends s{get tag(){return"x14:cfIcon"}render(o,l){o.leafNode(this.tag,{iconSet:l.iconSet,iconId:l.iconId})}parseOpen(o){let{attributes:l}=o;this.model={iconSet:l.iconSet,iconId:s.toIntValue(l.iconId)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],75:[function(e,t,n){const{v4:s}=e("uuid"),o=e("../../base-xform"),l=e("../../composite-xform"),u=e("./databar-ext-xform"),i=e("./icon-set-ext-xform"),d={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class h extends l{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new u,"x14:iconSet":this.iconSetXform=new i}}get tag(){return"x14:cfRule"}static isExt(f){return f.type==="dataBar"?u.isExt(f):!(f.type!=="iconSet"||!f.custom&&!d[f.iconSet])}prepare(f){h.isExt(f)&&(f.x14Id=`{${s()}}`.toUpperCase())}render(f,g){if(h.isExt(g))switch(g.type){case"dataBar":this.renderDataBar(f,g);break;case"iconSet":this.renderIconSet(f,g)}}renderDataBar(f,g){f.openNode(this.tag,{type:"dataBar",id:g.x14Id}),this.databarXform.render(f,g),f.closeNode()}renderIconSet(f,g){f.openNode(this.tag,{type:"iconSet",priority:g.priority,id:g.x14Id||`{${s()}}`}),this.iconSetXform.render(f,g),f.closeNode()}createNewModel(f){let{attributes:g}=f;return{type:g.type,x14Id:g.id,priority:o.toIntValue(g.priority)}}onParserClose(f,g){Object.assign(this.model,g.model)}}t.exports=h},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,t,n){const s=e("../../composite-xform"),o=e("./f-ext-xform");t.exports=class extends s{constructor(){super(),this.map={"xm:f":this.fExtXform=new o}}get tag(){return"x14:cfvo"}render(l,u){l.openNode(this.tag,{type:u.type}),u.value!==void 0&&this.fExtXform.render(l,u.value),l.closeNode()}createNewModel(l){return{type:l.attributes.type}}onParserClose(l,u){switch(l){case"xm:f":this.model.value=u.model?parseFloat(u.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,t,n){const s=e("../../composite-xform"),o=e("./sqref-ext-xform"),l=e("./cf-rule-ext-xform");t.exports=class extends s{constructor(){super(),this.map={"xm:sqref":this.sqRef=new o,"x14:cfRule":this.cfRule=new l}}get tag(){return"x14:conditionalFormatting"}prepare(u,i){u.rules.forEach(d=>{this.cfRule.prepare(d,i)})}render(u,i){i.rules.some(l.isExt)&&(u.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),i.rules.filter(l.isExt).forEach(d=>this.cfRule.render(u,d)),this.sqRef.render(u,i.ref),u.closeNode())}createNewModel(){return{rules:[]}}onParserClose(u,i){switch(u){case"xm:sqref":this.model.ref=i.model;break;case"x14:cfRule":this.model.rules.push(i.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,t,n){const s=e("../../composite-xform"),o=e("./cf-rule-ext-xform"),l=e("./conditional-formatting-ext-xform");t.exports=class extends s{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new l}}get tag(){return"x14:conditionalFormattings"}hasContent(u){return u.hasExtContent===void 0&&(u.hasExtContent=u.some(i=>i.rules.some(o.isExt))),u.hasExtContent}prepare(u,i){u.forEach(d=>{this.cfXform.prepare(d,i)})}render(u,i){this.hasContent(i)&&(u.openNode(this.tag),i.forEach(d=>this.cfXform.render(u,d)),u.closeNode())}createNewModel(){return[]}onParserClose(u,i){this.model.push(i.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,t,n){const s=e("../../base-xform"),o=e("../../composite-xform"),l=e("../../style/color-xform"),u=e("./cfvo-ext-xform");t.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new u,"x14:borderColor":this.borderColorXform=new l("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new l("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new l("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new l("x14:axisColor")}}static isExt(i){return!i.gradient}get tag(){return"x14:dataBar"}render(i,d){i.openNode(this.tag,{minLength:s.toIntAttribute(d.minLength,0,!0),maxLength:s.toIntAttribute(d.maxLength,100,!0),border:s.toBoolAttribute(d.border,!1),gradient:s.toBoolAttribute(d.gradient,!0),negativeBarColorSameAsPositive:s.toBoolAttribute(d.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:s.toBoolAttribute(d.negativeBarBorderColorSameAsPositive,!0),axisPosition:s.toAttribute(d.axisPosition,"auto"),direction:s.toAttribute(d.direction,"leftToRight")}),d.cfvo.forEach(h=>{this.cfvoXform.render(i,h)}),this.borderColorXform.render(i,d.borderColor),this.negativeBorderColorXform.render(i,d.negativeBorderColor),this.negativeFillColorXform.render(i,d.negativeFillColor),this.axisColorXform.render(i,d.axisColor),i.closeNode()}createNewModel(i){let{attributes:d}=i;return{cfvo:[],minLength:s.toIntValue(d.minLength,0),maxLength:s.toIntValue(d.maxLength,100),border:s.toBoolValue(d.border,!1),gradient:s.toBoolValue(d.gradient,!0),negativeBarColorSameAsPositive:s.toBoolValue(d.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:s.toBoolValue(d.negativeBarBorderColorSameAsPositive,!0),axisPosition:s.toStringValue(d.axisPosition,"auto"),direction:s.toStringValue(d.direction,"leftToRight")}}onParserClose(i,d){const[,h]=i.split(":");switch(h){case"cfvo":this.model.cfvo.push(d.model);break;default:this.model[h]=d.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,t,n){const s=e("../../base-xform");t.exports=class extends s{get tag(){return"xm:f"}render(o,l){o.leafNode(this.tag,null,l)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],81:[function(e,t,n){const s=e("../../base-xform"),o=e("../../composite-xform"),l=e("./cfvo-ext-xform"),u=e("./cf-icon-ext-xform");t.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new l,"x14:cfIcon":this.cfIconXform=new u}}get tag(){return"x14:iconSet"}render(i,d){i.openNode(this.tag,{iconSet:s.toStringAttribute(d.iconSet),reverse:s.toBoolAttribute(d.reverse,!1),showValue:s.toBoolAttribute(d.showValue,!0),custom:s.toBoolAttribute(d.icons,!1)}),d.cfvo.forEach(h=>{this.cfvoXform.render(i,h)}),d.icons&&d.icons.forEach((h,c)=>{h.iconId=c,this.cfIconXform.render(i,h)}),i.closeNode()}createNewModel(i){let{attributes:d}=i;return{cfvo:[],iconSet:s.toStringValue(d.iconSet,"3TrafficLights"),reverse:s.toBoolValue(d.reverse,!1),showValue:s.toBoolValue(d.showValue,!0)}}onParserClose(i,d){const[,h]=i.split(":");switch(h){case"cfvo":this.model.cfvo.push(d.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(d.model);break;default:this.model[h]=d.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,t,n){const s=e("../../base-xform");t.exports=class extends s{get tag(){return"xm:sqref"}render(o,l){o.leafNode(this.tag,null,l)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],83:[function(e,t,n){const s=e("../../base-xform"),o=e("../../composite-xform"),l=e("../../../../doc/range"),u=e("./databar-xform"),i=e("./ext-lst-ref-xform"),d=e("./formula-xform"),h=e("./color-scale-xform"),c=e("./icon-set-xform"),f={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},g=m=>{const{type:v,operator:b}=m;switch(v){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:v};default:return{type:v,operator:b}}};class p extends o{constructor(){super(),this.map={dataBar:this.databarXform=new u,extLst:this.extLstRefXform=new i,formula:this.formulaXform=new d,colorScale:this.colorScaleXform=new h,iconSet:this.iconSetXform=new c}}get tag(){return"cfRule"}static isPrimitive(v){return v.type!=="iconSet"||!v.custom&&!f[v.iconSet]}render(v,b){switch(b.type){case"expression":this.renderExpression(v,b);break;case"cellIs":this.renderCellIs(v,b);break;case"top10":this.renderTop10(v,b);break;case"aboveAverage":this.renderAboveAverage(v,b);break;case"dataBar":this.renderDataBar(v,b);break;case"colorScale":this.renderColorScale(v,b);break;case"iconSet":this.renderIconSet(v,b);break;case"containsText":this.renderText(v,b);break;case"timePeriod":this.renderTimePeriod(v,b)}}renderExpression(v,b){v.openNode(this.tag,{type:"expression",dxfId:b.dxfId,priority:b.priority}),this.formulaXform.render(v,b.formulae[0]),v.closeNode()}renderCellIs(v,b){v.openNode(this.tag,{type:"cellIs",dxfId:b.dxfId,priority:b.priority,operator:b.operator}),b.formulae.forEach(M=>{this.formulaXform.render(v,M)}),v.closeNode()}renderTop10(v,b){v.leafNode(this.tag,{type:"top10",dxfId:b.dxfId,priority:b.priority,percent:s.toBoolAttribute(b.percent,!1),bottom:s.toBoolAttribute(b.bottom,!1),rank:s.toIntValue(b.rank,10,!0)})}renderAboveAverage(v,b){v.leafNode(this.tag,{type:"aboveAverage",dxfId:b.dxfId,priority:b.priority,aboveAverage:s.toBoolAttribute(b.aboveAverage,!0)})}renderDataBar(v,b){v.openNode(this.tag,{type:"dataBar",priority:b.priority}),this.databarXform.render(v,b),this.extLstRefXform.render(v,b),v.closeNode()}renderColorScale(v,b){v.openNode(this.tag,{type:"colorScale",priority:b.priority}),this.colorScaleXform.render(v,b),v.closeNode()}renderIconSet(v,b){p.isPrimitive(b)&&(v.openNode(this.tag,{type:"iconSet",priority:b.priority}),this.iconSetXform.render(v,b),v.closeNode())}renderText(v,b){v.openNode(this.tag,{type:b.operator,dxfId:b.dxfId,priority:b.priority,operator:s.toStringAttribute(b.operator,"containsText")});const M=(D=>{if(D.formulae&&D.formulae[0])return D.formulae[0];const $=new l(D.ref),{tl:A}=$;switch(D.operator){case"containsText":return`NOT(ISERROR(SEARCH("${D.text}",${A})))`;case"containsBlanks":return`LEN(TRIM(${A}))=0`;case"notContainsBlanks":return`LEN(TRIM(${A}))>0`;case"containsErrors":return`ISERROR(${A})`;case"notContainsErrors":return`NOT(ISERROR(${A}))`;default:return}})(b);M&&this.formulaXform.render(v,M),v.closeNode()}renderTimePeriod(v,b){v.openNode(this.tag,{type:"timePeriod",dxfId:b.dxfId,priority:b.priority,timePeriod:b.timePeriod});const M=(D=>{if(D.formulae&&D.formulae[0])return D.formulae[0];const $=new l(D.ref),{tl:A}=$;switch(D.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${A},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${A},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${A},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${A},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${A},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${A},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${A},1)=TODAY()-1`;case"today":return`FLOOR(${A},1)=TODAY()`;case"tomorrow":return`FLOOR(${A},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${A},1)<=6,FLOOR(${A},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${A})=MONTH(EDATE(TODAY(),0-1)),YEAR(${A})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${A})=MONTH(TODAY()),YEAR(${A})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${A})=MONTH(EDATE(TODAY(),0+1)),YEAR(${A})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(b);M&&this.formulaXform.render(v,M),v.closeNode()}createNewModel(v){let{attributes:b}=v;return{...g(b),dxfId:s.toIntValue(b.dxfId),priority:s.toIntValue(b.priority),timePeriod:b.timePeriod,percent:s.toBoolValue(b.percent),bottom:s.toBoolValue(b.bottom),rank:s.toIntValue(b.rank),aboveAverage:s.toBoolValue(b.aboveAverage)}}onParserClose(v,b){switch(v){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,b.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(b.model)}}}t.exports=p},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(e,t,n){const s=e("../../base-xform");t.exports=class extends s{get tag(){return"cfvo"}render(o,l){o.leafNode(this.tag,{type:l.type,val:l.value})}parseOpen(o){this.model={type:o.attributes.type,value:s.toFloatValue(o.attributes.val)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],85:[function(e,t,n){const s=e("../../composite-xform"),o=e("../../style/color-xform"),l=e("./cfvo-xform");t.exports=class extends s{constructor(){super(),this.map={cfvo:this.cfvoXform=new l,color:this.colorXform=new o}}get tag(){return"colorScale"}render(u,i){u.openNode(this.tag),i.cfvo.forEach(d=>{this.cfvoXform.render(u,d)}),i.color.forEach(d=>{this.colorXform.render(u,d)}),u.closeNode()}createNewModel(u){return{cfvo:[],color:[]}}onParserClose(u,i){this.model[u].push(i.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,t,n){const s=e("../../composite-xform"),o=e("./cf-rule-xform");t.exports=class extends s{constructor(){super(),this.map={cfRule:new o}}get tag(){return"conditionalFormatting"}render(l,u){u.rules.some(o.isPrimitive)&&(l.openNode(this.tag,{sqref:u.ref}),u.rules.forEach(i=>{o.isPrimitive(i)&&(i.ref=u.ref,this.map.cfRule.render(l,i))}),l.closeNode())}createNewModel(l){let{attributes:u}=l;return{ref:u.sqref,rules:[]}}onParserClose(l,u){this.model.rules.push(u.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,t,n){const s=e("../../base-xform"),o=e("./conditional-formatting-xform");t.exports=class extends s{constructor(){super(),this.cfXform=new o}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(l,u){let i=l.reduce((d,h)=>Math.max(d,...h.rules.map(c=>c.priority||0)),1);l.forEach(d=>{d.rules.forEach(h=>{h.priority||(h.priority=i++),h.style&&(h.dxfId=u.styles.addDxfStyle(h.style))})})}render(l,u){u.forEach(i=>{this.cfXform.render(l,i)})}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(l),!0;default:return!1}}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){return!!this.parser&&(!!this.parser.parseClose(l)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(l,u){l.forEach(i=>{i.rules.forEach(d=>{d.dxfId!==void 0&&(d.style=u.styles.getDxfStyle(d.dxfId),delete d.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,t,n){const s=e("../../composite-xform"),o=e("../../style/color-xform"),l=e("./cfvo-xform");t.exports=class extends s{constructor(){super(),this.map={cfvo:this.cfvoXform=new l,color:this.colorXform=new o}}get tag(){return"dataBar"}render(u,i){u.openNode(this.tag),i.cfvo.forEach(d=>{this.cfvoXform.render(u,d)}),this.colorXform.render(u,i.color),u.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(u,i){switch(u){case"cfvo":this.model.cfvo.push(i.model);break;case"color":this.model.color=i.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,t,n){const s=e("../../base-xform"),o=e("../../composite-xform");class l extends s{get tag(){return"x14:id"}render(d,h){d.leafNode(this.tag,null,h)}parseOpen(){this.model=""}parseText(d){this.model+=d}parseClose(d){return d!==this.tag}}class u extends o{constructor(){super(),this.map={"x14:id":this.idXform=new l}}get tag(){return"ext"}render(d,h){d.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(d,h.x14Id),d.closeNode()}createNewModel(){return{}}onParserClose(d,h){this.model.x14Id=h.model}}t.exports=class extends o{constructor(){super(),this.map={ext:new u}}get tag(){return"extLst"}render(i,d){i.openNode(this.tag),this.map.ext.render(i,d),i.closeNode()}createNewModel(){return{}}onParserClose(i,d){Object.assign(this.model,d.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,t,n){const s=e("../../base-xform");t.exports=class extends s{get tag(){return"formula"}render(o,l){o.leafNode(this.tag,null,l)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],91:[function(e,t,n){const s=e("../../base-xform"),o=e("../../composite-xform"),l=e("./cfvo-xform");t.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new l}}get tag(){return"iconSet"}render(u,i){u.openNode(this.tag,{iconSet:s.toStringAttribute(i.iconSet,"3TrafficLights"),reverse:s.toBoolAttribute(i.reverse,!1),showValue:s.toBoolAttribute(i.showValue,!0)}),i.cfvo.forEach(d=>{this.cfvoXform.render(u,d)}),u.closeNode()}createNewModel(u){let{attributes:i}=u;return{iconSet:s.toStringValue(i.iconSet,"3TrafficLights"),reverse:s.toBoolValue(i.reverse),showValue:s.toBoolValue(i.showValue),cfvo:[]}}onParserClose(u,i){this.model[u].push(i.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,t,n){const s=e("../../../utils/utils"),o=e("../base-xform");t.exports=class extends o{get tag(){return"col"}prepare(l,u){const i=u.styles.addStyleModel(l.style||{});i&&(l.styleId=i)}render(l,u){l.openNode("col"),l.addAttribute("min",u.min),l.addAttribute("max",u.max),u.width&&l.addAttribute("width",u.width),u.styleId&&l.addAttribute("style",u.styleId),u.hidden&&l.addAttribute("hidden","1"),u.bestFit&&l.addAttribute("bestFit","1"),u.outlineLevel&&l.addAttribute("outlineLevel",u.outlineLevel),u.collapsed&&l.addAttribute("collapsed","1"),l.addAttribute("customWidth","1"),l.closeNode()}parseOpen(l){if(l.name==="col"){const u=this.model={min:parseInt(l.attributes.min||"0",10),max:parseInt(l.attributes.max||"0",10),width:l.attributes.width===void 0?void 0:parseFloat(l.attributes.width||"0")};return l.attributes.style&&(u.styleId=parseInt(l.attributes.style,10)),s.parseBoolean(l.attributes.hidden)&&(u.hidden=!0),s.parseBoolean(l.attributes.bestFit)&&(u.bestFit=!0),l.attributes.outlineLevel&&(u.outlineLevel=parseInt(l.attributes.outlineLevel,10)),s.parseBoolean(l.attributes.collapsed)&&(u.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(l,u){l.styleId&&(l.style=u.styles.getStyleModel(l.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../../../utils/utils"),l=e("../../../utils/col-cache"),u=e("../base-xform"),i=e("../../../doc/range");function d(c,f,g,p){const m=f[g];m!==void 0?c[g]=m:p!==void 0&&(c[g]=p)}function h(c,f,g,p){const m=f[g];m!==void 0&&(c[g]=o.parseBoolean(m))}t.exports=class extends u{get tag(){return"dataValidations"}render(c,f){const g=function(p){const m=s.map(p,(M,D)=>({address:D,dataValidation:M,marked:!1})).sort((M,D)=>s.strcmp(M.address,D.address)),v=s.keyBy(m,"address"),b=(M,D,$)=>{for(let A=0;A<D;A++){const H=l.encodeAddress(M.row+A,$);if(!p[H]||!s.isEqual(p[M.address],p[H]))return!1}return!0};return m.map(M=>{if(!M.marked){const D=l.decodeEx(M.address);if(D.dimensions)return v[D.dimensions].marked=!0,{...M.dataValidation,sqref:M.address};let $=1,A=l.encodeAddress(D.row+$,D.col);for(;p[A]&&s.isEqual(M.dataValidation,p[A]);)$++,A=l.encodeAddress(D.row+$,D.col);let H=1;for(;b(D,$,D.col+H);)H++;for(let N=0;N<$;N++)for(let z=0;z<H;z++)A=l.encodeAddress(D.row+N,D.col+z),v[A].marked=!0;if($>1||H>1){const N=D.row+($-1),z=D.col+(H-1);return{...M.dataValidation,sqref:`${M.address}:${l.encodeAddress(N,z)}`}}return{...M.dataValidation,sqref:M.address}}return null}).filter(Boolean)}(f);g.length&&(c.openNode("dataValidations",{count:g.length}),g.forEach(p=>{c.openNode("dataValidation"),p.type!=="any"&&(c.addAttribute("type",p.type),p.operator&&p.type!=="list"&&p.operator!=="between"&&c.addAttribute("operator",p.operator),p.allowBlank&&c.addAttribute("allowBlank","1")),p.showInputMessage&&c.addAttribute("showInputMessage","1"),p.promptTitle&&c.addAttribute("promptTitle",p.promptTitle),p.prompt&&c.addAttribute("prompt",p.prompt),p.showErrorMessage&&c.addAttribute("showErrorMessage","1"),p.errorStyle&&c.addAttribute("errorStyle",p.errorStyle),p.errorTitle&&c.addAttribute("errorTitle",p.errorTitle),p.error&&c.addAttribute("error",p.error),c.addAttribute("sqref",p.sqref),(p.formulae||[]).forEach((m,v)=>{c.openNode("formula"+(v+1)),p.type==="date"?c.writeText(o.dateToExcel(new Date(m))):c.writeText(m),c.closeNode()}),c.closeNode()}),c.closeNode())}parseOpen(c){switch(c.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=c.attributes.sqref;const f={type:c.attributes.type||"any",formulae:[]};switch(c.attributes.type&&h(f,c.attributes,"allowBlank"),h(f,c.attributes,"showInputMessage"),h(f,c.attributes,"showErrorMessage"),f.type){case"any":case"list":case"custom":break;default:d(f,c.attributes,"operator","between")}return d(f,c.attributes,"promptTitle"),d(f,c.attributes,"prompt"),d(f,c.attributes,"errorStyle"),d(f,c.attributes,"errorTitle"),d(f,c.attributes,"error"),this._dataValidation=f,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(c){this._formula&&this._formula.push(c)}parseClose(c){switch(c){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(f=>{f.includes(":")?new i(f).forEachAddress(g=>{this.model[g]=this._dataValidation}):this.model[f]=this._dataValidation}),!0;case"formula1":case"formula2":{let f=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":f=parseInt(f,10);break;case"decimal":f=parseFloat(f);break;case"date":f=o.excelToDate(parseFloat(f))}return this._dataValidation.formulae.push(f),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"dimension"}render(o,l){l&&o.leafNode("dimension",{ref:l})}parseOpen(o){return o.name==="dimension"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"drawing"}render(o,l){l&&o.leafNode(this.tag,{"r:id":l.rId})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(e,t,n){const s=e("../composite-xform"),o=e("./cf-ext/conditional-formattings-ext-xform");class l extends s{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new o}}get tag(){return"ext"}hasContent(i){return this.conditionalFormattings.hasContent(i.conditionalFormattings)}prepare(i,d){this.conditionalFormattings.prepare(i.conditionalFormattings,d)}render(i,d){i.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(i,d.conditionalFormattings),i.closeNode()}createNewModel(){return{}}onParserClose(i,d){this.model[i]=d.model}}t.exports=class extends s{constructor(){super(),this.map={ext:this.ext=new l}}get tag(){return"extLst"}prepare(u,i){this.ext.prepare(u,i)}hasContent(u){return this.ext.hasContent(u)}render(u,i){this.hasContent(i)&&(u.openNode("extLst"),this.ext.render(u,i),u.closeNode())}createNewModel(){return{}}onParserClose(u,i){Object.assign(this.model,i.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"headerFooter"}render(o,l){if(l){o.addRollback();let u=!1;o.openNode("headerFooter"),l.differentFirst&&(o.addAttribute("differentFirst","1"),u=!0),l.differentOddEven&&(o.addAttribute("differentOddEven","1"),u=!0),l.oddHeader&&typeof l.oddHeader=="string"&&(o.leafNode("oddHeader",null,l.oddHeader),u=!0),l.oddFooter&&typeof l.oddFooter=="string"&&(o.leafNode("oddFooter",null,l.oddFooter),u=!0),l.evenHeader&&typeof l.evenHeader=="string"&&(o.leafNode("evenHeader",null,l.evenHeader),u=!0),l.evenFooter&&typeof l.evenFooter=="string"&&(o.leafNode("evenFooter",null,l.evenFooter),u=!0),l.firstHeader&&typeof l.firstHeader=="string"&&(o.leafNode("firstHeader",null,l.firstHeader),u=!0),l.firstFooter&&typeof l.firstFooter=="string"&&(o.leafNode("firstFooter",null,l.firstFooter),u=!0),u?(o.closeNode(),o.commit()):o.rollback()}}parseOpen(o){switch(o.name){case"headerFooter":return this.model={},o.attributes.differentFirst&&(this.model.differentFirst=parseInt(o.attributes.differentFirst,0)===1),o.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(o.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(o){switch(this.currentNode){case"oddHeader":this.model.oddHeader=o;break;case"oddFooter":this.model.oddFooter=o;break;case"evenHeader":this.model.evenHeader=o;break;case"evenFooter":this.model.evenFooter=o;break;case"firstHeader":this.model.firstHeader=o;break;case"firstFooter":this.model.firstFooter=o}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"hyperlink"}render(o,l){this.isInternalLink(l)?o.leafNode("hyperlink",{ref:l.address,"r:id":l.rId,tooltip:l.tooltip,location:l.target}):o.leafNode("hyperlink",{ref:l.address,"r:id":l.rId,tooltip:l.tooltip})}parseOpen(o){return o.name==="hyperlink"&&(this.model={address:o.attributes.ref,rId:o.attributes["r:id"],tooltip:o.attributes.tooltip},o.attributes.location&&(this.model.target=o.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(o){return o.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(o.target)}}},{"../base-xform":32}],99:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"mergeCell"}render(o,l){o.leafNode("mergeCell",{ref:l})}parseOpen(o){return o.name==="mergeCell"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../../../doc/range"),l=e("../../../utils/col-cache"),u=e("../../../doc/enums");t.exports=class{constructor(){this.merges={}}add(i){if(this.merges[i.master])this.merges[i.master].expandToAddress(i.address);else{const d=`${i.master}:${i.address}`;this.merges[i.master]=new o(d)}}get mergeCells(){return s.map(this.merges,i=>i.range)}reconcile(i,d){s.each(i,h=>{const c=l.decode(h);for(let f=c.top;f<=c.bottom;f++){const g=d[f-1];for(let p=c.left;p<=c.right;p++){const m=g.cells[p-1];m?m.type===u.ValueType.Merge&&(m.master=c.tl):g.cells[p]={type:u.ValueType.Null,address:l.encodeAddress(f,p)}}}})}getMasterAddress(i){const d=this.hash[i];return d&&d.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,t,n){const s=e("../base-xform"),o=l=>l!==void 0;t.exports=class extends s{get tag(){return"outlinePr"}render(l,u){return!(!u||!o(u.summaryBelow)&&!o(u.summaryRight))&&(l.leafNode(this.tag,{summaryBelow:o(u.summaryBelow)?Number(u.summaryBelow):void 0,summaryRight:o(u.summaryRight)?Number(u.summaryRight):void 0}),!0)}parseOpen(l){return l.name===this.tag&&(this.model={summaryBelow:o(l.attributes.summaryBelow)?!!Number(l.attributes.summaryBelow):void 0,summaryRight:o(l.attributes.summaryRight)?!!Number(l.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"brk"}render(o,l){o.leafNode("brk",l)}parseOpen(o){return o.name==="brk"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../base-xform");t.exports=class extends o{get tag(){return"pageMargins"}render(l,u){if(u){const i={left:u.left,right:u.right,top:u.top,bottom:u.bottom,header:u.header,footer:u.footer};s.some(i,d=>d!==void 0)&&l.leafNode(this.tag,i)}}parseOpen(l){switch(l.name){case this.tag:return this.model={left:parseFloat(l.attributes.left||.7),right:parseFloat(l.attributes.right||.7),top:parseFloat(l.attributes.top||.75),bottom:parseFloat(l.attributes.bottom||.75),header:parseFloat(l.attributes.header||.3),footer:parseFloat(l.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"pageSetUpPr"}render(o,l){return!(!l||!l.fitToPage)&&(o.leafNode(this.tag,{fitToPage:l.fitToPage?"1":void 0}),!0)}parseOpen(o){return o.name===this.tag&&(this.model={fitToPage:o.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../base-xform");function l(h){return h?"1":void 0}function u(h){switch(h){case"overThenDown":return h;default:return}}function i(h){switch(h){case"atEnd":case"asDisplyed":return h;default:return}}function d(h){switch(h){case"dash":case"blank":case"NA":return h;default:return}}t.exports=class extends o{get tag(){return"pageSetup"}render(h,c){if(c){const f={paperSize:c.paperSize,orientation:c.orientation,horizontalDpi:c.horizontalDpi,verticalDpi:c.verticalDpi,pageOrder:u(c.pageOrder),blackAndWhite:l(c.blackAndWhite),draft:l(c.draft),cellComments:i(c.cellComments),errors:d(c.errors),scale:c.scale,fitToWidth:c.fitToWidth,fitToHeight:c.fitToHeight,firstPageNumber:c.firstPageNumber,useFirstPageNumber:l(c.firstPageNumber),usePrinterDefaults:l(c.usePrinterDefaults),copies:c.copies};s.some(f,g=>g!==void 0)&&h.leafNode(this.tag,f)}}parseOpen(h){switch(h.name){case this.tag:return this.model={paperSize:(c=h.attributes.paperSize,c!==void 0?parseInt(c,10):void 0),orientation:h.attributes.orientation||"portrait",horizontalDpi:parseInt(h.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(h.attributes.verticalDpi||"4294967295",10),pageOrder:h.attributes.pageOrder||"downThenOver",blackAndWhite:h.attributes.blackAndWhite==="1",draft:h.attributes.draft==="1",cellComments:h.attributes.cellComments||"None",errors:h.attributes.errors||"displayed",scale:parseInt(h.attributes.scale||"100",10),fitToWidth:parseInt(h.attributes.fitToWidth||"1",10),fitToHeight:parseInt(h.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(h.attributes.firstPageNumber||"1",10),useFirstPageNumber:h.attributes.useFirstPageNumber==="1",usePrinterDefaults:h.attributes.usePrinterDefaults==="1",copies:parseInt(h.attributes.copies||"1",10)},!0;default:return!1}var c}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"picture"}render(o,l){l&&o.leafNode(this.tag,{"r:id":l.rId})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../base-xform");function l(u){return u?"1":void 0}t.exports=class extends o{get tag(){return"printOptions"}render(u,i){if(i){const d={headings:l(i.showRowColHeaders),gridLines:l(i.showGridLines),horizontalCentered:l(i.horizontalCentered),verticalCentered:l(i.verticalCentered)};s.some(d,h=>h!==void 0)&&u.leafNode(this.tag,d)}}parseOpen(u){switch(u.name){case this.tag:return this.model={showRowColHeaders:u.attributes.headings==="1",showGridLines:u.attributes.gridLines==="1",horizontalCentered:u.attributes.horizontalCentered==="1",verticalCentered:u.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,t,n){const s=e("./page-breaks-xform"),o=e("../list-xform");t.exports=class extends o{constructor(){super({tag:"rowBreaks",count:!0,childXform:new s})}render(l,u){if(u&&u.length){l.openNode(this.tag,this.$),this.count&&(l.addAttribute(this.$count,u.length),l.addAttribute("manualBreakCount",u.length));const{childXform:i}=this;u.forEach(d=>{i.render(l,d)}),l.closeNode()}else this.empty&&l.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,t,n){const s=e("../base-xform"),o=e("../../../utils/utils"),l=e("./cell-xform");t.exports=class extends s{constructor(u){super(),this.maxItems=u&&u.maxItems,this.map={c:new l}}get tag(){return"row"}prepare(u,i){const d=i.styles.addStyleModel(u.style);d&&(u.styleId=d);const h=this.map.c;u.cells.forEach(c=>{h.prepare(c,i)})}render(u,i,d){u.openNode("row"),u.addAttribute("r",i.number),i.height&&(u.addAttribute("ht",i.height),u.addAttribute("customHeight","1")),i.hidden&&u.addAttribute("hidden","1"),i.min>0&&i.max>0&&i.min<=i.max&&u.addAttribute("spans",`${i.min}:${i.max}`),i.styleId&&(u.addAttribute("s",i.styleId),u.addAttribute("customFormat","1")),u.addAttribute("x14ac:dyDescent","0.25"),i.outlineLevel&&u.addAttribute("outlineLevel",i.outlineLevel),i.collapsed&&u.addAttribute("collapsed","1");const h=this.map.c;i.cells.forEach(c=>{h.render(u,c,d)}),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;if(u.name==="row"){this.numRowsSeen+=1;const i=u.attributes.spans?u.attributes.spans.split(":").map(h=>parseInt(h,10)):[void 0,void 0],d=this.model={number:parseInt(u.attributes.r,10),min:i[0],max:i[1],cells:[]};return u.attributes.s&&(d.styleId=parseInt(u.attributes.s,10)),o.parseBoolean(u.attributes.hidden)&&(d.hidden=!0),o.parseBoolean(u.attributes.bestFit)&&(d.bestFit=!0),u.attributes.ht&&(d.height=parseFloat(u.attributes.ht)),u.attributes.outlineLevel&&(d.outlineLevel=parseInt(u.attributes.outlineLevel,10)),o.parseBoolean(u.attributes.collapsed)&&(d.collapsed=!0),!0}return this.parser=this.map[u.name],!!this.parser&&(this.parser.parseOpen(u),!0)}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser){if(!this.parser.parseClose(u)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(u,i){u.style=u.styleId?i.styles.getStyleModel(u.styleId):{},u.styleId!==void 0&&(u.styleId=void 0);const d=this.map.c;u.cells.forEach(h=>{d.reconcile(h,i)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../base-xform");t.exports=class extends o{get tag(){return"sheetFormatPr"}render(l,u){if(u){const i={defaultRowHeight:u.defaultRowHeight,outlineLevelRow:u.outlineLevelRow,outlineLevelCol:u.outlineLevelCol,"x14ac:dyDescent":u.dyDescent};u.defaultColWidth&&(i.defaultColWidth=u.defaultColWidth),u.defaultRowHeight&&u.defaultRowHeight===15||(i.customHeight="1"),s.some(i,d=>d!==void 0)&&l.leafNode("sheetFormatPr",i)}}parseOpen(l){return l.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(l.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(l.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(l.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(l.attributes.outlineLevelCol||"0",10)},l.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(l.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,t,n){const s=e("../base-xform"),o=e("../style/color-xform"),l=e("./page-setup-properties-xform"),u=e("./outline-properties-xform");t.exports=class extends s{constructor(){super(),this.map={tabColor:new o("tabColor"),pageSetUpPr:new l,outlinePr:new u}}get tag(){return"sheetPr"}render(i,d){if(d){i.addRollback(),i.openNode("sheetPr");let h=!1;h=this.map.tabColor.render(i,d.tabColor)||h,h=this.map.pageSetUpPr.render(i,d.pageSetup)||h,h=this.map.outlinePr.render(i,d.outlineProperties)||h,h?(i.closeNode(),i.commit()):i.rollback()}}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name===this.tag?(this.reset(),!0):!!this.map[i.name]&&(this.parser=this.map[i.name],this.parser.parseOpen(i),!0)}parseText(i){return!!this.parser&&(this.parser.parseText(i),!0)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../base-xform");function l(i,d){return i?d:void 0}function u(i,d){return i===d||void 0}t.exports=class extends o{get tag(){return"sheetProtection"}render(i,d){if(d){const h={sheet:l(d.sheet,"1"),selectLockedCells:d.selectLockedCells===!1?"1":void 0,selectUnlockedCells:d.selectUnlockedCells===!1?"1":void 0,formatCells:l(d.formatCells,"0"),formatColumns:l(d.formatColumns,"0"),formatRows:l(d.formatRows,"0"),insertColumns:l(d.insertColumns,"0"),insertRows:l(d.insertRows,"0"),insertHyperlinks:l(d.insertHyperlinks,"0"),deleteColumns:l(d.deleteColumns,"0"),deleteRows:l(d.deleteRows,"0"),sort:l(d.sort,"0"),autoFilter:l(d.autoFilter,"0"),pivotTables:l(d.pivotTables,"0")};d.sheet&&(h.algorithmName=d.algorithmName,h.hashValue=d.hashValue,h.saltValue=d.saltValue,h.spinCount=d.spinCount,h.objects=l(d.objects===!1,"1"),h.scenarios=l(d.scenarios===!1,"1")),s.some(h,c=>c!==void 0)&&i.leafNode(this.tag,h)}}parseOpen(i){switch(i.name){case this.tag:return this.model={sheet:u(i.attributes.sheet,"1"),objects:i.attributes.objects!=="1"&&void 0,scenarios:i.attributes.scenarios!=="1"&&void 0,selectLockedCells:i.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:i.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:u(i.attributes.formatCells,"0"),formatColumns:u(i.attributes.formatColumns,"0"),formatRows:u(i.attributes.formatRows,"0"),insertColumns:u(i.attributes.insertColumns,"0"),insertRows:u(i.attributes.insertRows,"0"),insertHyperlinks:u(i.attributes.insertHyperlinks,"0"),deleteColumns:u(i.attributes.deleteColumns,"0"),deleteRows:u(i.attributes.deleteRows,"0"),sort:u(i.attributes.sort,"0"),autoFilter:u(i.attributes.autoFilter,"0"),pivotTables:u(i.attributes.pivotTables,"0")},i.attributes.algorithmName&&(this.model.algorithmName=i.attributes.algorithmName,this.model.hashValue=i.attributes.hashValue,this.model.saltValue=i.attributes.saltValue,this.model.spinCount=parseInt(i.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,t,n){const s=e("../../../utils/col-cache"),o=e("../base-xform"),l={frozen:"frozen",frozenSplit:"frozen",split:"split"};t.exports=class extends o{get tag(){return"sheetView"}prepare(u){switch(u.state){case"frozen":case"split":break;default:u.state="normal"}}render(u,i){u.openNode("sheetView",{workbookViewId:i.workbookViewId||0});const d=function(p,m,v){v&&u.addAttribute(p,m)};let h,c,f,g;switch(d("rightToLeft","1",i.rightToLeft===!0),d("tabSelected","1",i.tabSelected),d("showRuler","0",i.showRuler===!1),d("showRowColHeaders","0",i.showRowColHeaders===!1),d("showGridLines","0",i.showGridLines===!1),d("zoomScale",i.zoomScale,i.zoomScale),d("zoomScaleNormal",i.zoomScaleNormal,i.zoomScaleNormal),d("view",i.style,i.style),i.state){case"frozen":c=i.xSplit||0,f=i.ySplit||0,h=i.topLeftCell||s.getAddress(f+1,c+1).address,g=(i.xSplit&&i.ySplit?"bottomRight":i.xSplit&&"topRight")||"bottomLeft",u.leafNode("pane",{xSplit:i.xSplit||void 0,ySplit:i.ySplit||void 0,topLeftCell:h,activePane:g,state:"frozen"}),u.leafNode("selection",{pane:g,activeCell:i.activeCell,sqref:i.activeCell});break;case"split":i.activePane==="topLeft"&&(i.activePane=void 0),u.leafNode("pane",{xSplit:i.xSplit||void 0,ySplit:i.ySplit||void 0,topLeftCell:i.topLeftCell,activePane:i.activePane}),u.leafNode("selection",{pane:i.activePane,activeCell:i.activeCell,sqref:i.activeCell});break;case"normal":i.activeCell&&u.leafNode("selection",{activeCell:i.activeCell,sqref:i.activeCell})}u.closeNode()}parseOpen(u){switch(u.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(u.attributes.workbookViewId,10),rightToLeft:u.attributes.rightToLeft==="1",tabSelected:u.attributes.tabSelected==="1",showRuler:u.attributes.showRuler!=="0",showRowColHeaders:u.attributes.showRowColHeaders!=="0",showGridLines:u.attributes.showGridLines!=="0",zoomScale:parseInt(u.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(u.attributes.zoomScaleNormal||"100",10),style:u.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(u.attributes.xSplit||"0",10),ySplit:parseInt(u.attributes.ySplit||"0",10),topLeftCell:u.attributes.topLeftCell,activePane:u.attributes.activePane||"topLeft",state:u.attributes.state},!0;case"selection":{const i=u.attributes.pane||"topLeft";return this.selections[i]={pane:i,activeCell:u.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(u){let i,d;switch(u){case"sheetView":return this.sheetView&&this.pane?(i=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:l[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(i.activePane=this.pane.activePane),d=this.selections[this.pane.activePane],d&&d.activeCell&&(i.activeCell=d.activeCell),this.sheetView.style&&(i.style=this.sheetView.style)):(i=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},d=this.selections.topLeft,d&&d.activeCell&&(i.activeCell=d.activeCell),this.sheetView.style&&(i.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"tablePart"}render(o,l){l&&o.leafNode(this.tag,{"r:id":l.rId})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../../../utils/col-cache"),l=e("../../../utils/xml-stream"),u=e("../../rel-type"),i=e("./merges"),d=e("../base-xform"),h=e("../list-xform"),c=e("./row-xform"),f=e("./col-xform"),g=e("./dimension-xform"),p=e("./hyperlink-xform"),m=e("./merge-cell-xform"),v=e("./data-validations-xform"),b=e("./sheet-properties-xform"),M=e("./sheet-format-properties-xform"),D=e("./sheet-view-xform"),$=e("./sheet-protection-xform"),A=e("./page-margins-xform"),H=e("./page-setup-xform"),N=e("./print-options-xform"),z=e("./auto-filter-xform"),L=e("./picture-xform"),Y=e("./drawing-xform"),B=e("./table-part-xform"),T=e("./row-breaks-xform"),E=e("./header-footer-xform"),P=e("./cf/conditional-formattings-xform"),w=e("./ext-lst-xform"),_=(x,C)=>{if(!C||!C.length)return x;if(!x||!x.length)return C;const O={},R={};return x.forEach(X=>{O[X.ref]=X,X.rules.forEach(q=>{const{x14Id:te}=q;te&&(R[te]=q)})}),C.forEach(X=>{X.rules.forEach(q=>{const te=R[q.x14Id];te?((F,G)=>{Object.keys(G).forEach(j=>{const W=F[j],V=G[j];W===void 0&&V!==void 0&&(F[j]=V)})})(te,q):O[X.ref]?O[X.ref].rules.push(q):x.push({ref:X.ref,rules:[q]})})}),x};class k extends d{constructor(C){super();const{maxRows:O,maxCols:R,ignoreNodes:X}=C||{};this.ignoreNodes=X||[],this.map={sheetPr:new b,dimension:new g,sheetViews:new h({tag:"sheetViews",count:!1,childXform:new D}),sheetFormatPr:new M,cols:new h({tag:"cols",count:!1,childXform:new f}),sheetData:new h({tag:"sheetData",count:!1,empty:!0,childXform:new c({maxItems:R}),maxItems:O}),autoFilter:new z,mergeCells:new h({tag:"mergeCells",count:!0,childXform:new m}),rowBreaks:new T,hyperlinks:new h({tag:"hyperlinks",count:!1,childXform:new p}),pageMargins:new A,dataValidations:new v,pageSetup:new H,headerFooter:new E,printOptions:new N,picture:new L,drawing:new Y,sheetProtection:new $,tableParts:new h({tag:"tableParts",count:!0,childXform:new B}),conditionalFormatting:new P,extLst:new w}}prepare(C,O){O.merges=new i,C.hyperlinks=O.hyperlinks=[],C.comments=O.comments=[],O.formulae={},O.siFormulae=0,this.map.cols.prepare(C.cols,O),this.map.sheetData.prepare(C.rows,O),this.map.conditionalFormatting.prepare(C.conditionalFormattings,O),C.mergeCells=O.merges.mergeCells;const R=C.rels=[];function X(F){return"rId"+(F.length+1)}if(C.hyperlinks.forEach(F=>{const G=X(R);F.rId=G,R.push({Id:G,Type:u.Hyperlink,Target:F.target,TargetMode:"External"})}),C.comments.length>0){const F={Id:X(R),Type:u.Comments,Target:`../comments${C.id}.xml`};R.push(F);const G={Id:X(R),Type:u.VmlDrawing,Target:`../drawings/vmlDrawing${C.id}.vml`};R.push(G),C.comments.forEach(j=>{j.refAddress=o.decodeAddress(j.ref)}),O.commentRefs.push({commentName:"comments"+C.id,vmlDrawing:"vmlDrawing"+C.id})}const q=[];let te;C.media.forEach(F=>{if(F.type==="background"){const G=X(R);te=O.media[F.imageId],R.push({Id:G,Type:u.Image,Target:`../media/${te.name}.${te.extension}`}),C.background={rId:G},C.image=O.media[F.imageId]}else if(F.type==="image"){let{drawing:G}=C;te=O.media[F.imageId],G||(G=C.drawing={rId:X(R),name:"drawing"+ ++O.drawingsCount,anchors:[],rels:[]},O.drawings.push(G),R.push({Id:G.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${G.name}.xml`}));let j=this.preImageId===F.imageId?q[F.imageId]:q[G.rels.length];j||(j=X(G.rels),q[G.rels.length]=j,G.rels.push({Id:j,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${te.name}.${te.extension}`}));const W={picture:{rId:j},range:F.range};if(F.hyperlinks&&F.hyperlinks.hyperlink){const V=X(G.rels);q[G.rels.length]=V,W.picture.hyperlinks={tooltip:F.hyperlinks.tooltip,rId:V},G.rels.push({Id:V,Type:u.Hyperlink,Target:F.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=F.imageId,G.anchors.push(W)}}),C.tables.forEach(F=>{const G=X(R);F.rId=G,R.push({Id:G,Type:u.Table,Target:"../tables/"+F.target}),F.columns.forEach(j=>{const{style:W}=j;W&&(j.dxfId=O.styles.addDxfStyle(W))})}),this.map.extLst.prepare(C,O)}render(C,O){C.openXml(l.StdDocAttributes),C.openNode("worksheet",k.WORKSHEET_ATTRIBUTES);const R=O.properties?{defaultRowHeight:O.properties.defaultRowHeight,dyDescent:O.properties.dyDescent,outlineLevelCol:O.properties.outlineLevelCol,outlineLevelRow:O.properties.outlineLevelRow}:void 0;O.properties&&O.properties.defaultColWidth&&(R.defaultColWidth=O.properties.defaultColWidth);const X={outlineProperties:O.properties&&O.properties.outlineProperties,tabColor:O.properties&&O.properties.tabColor,pageSetup:O.pageSetup&&O.pageSetup.fitToPage?{fitToPage:O.pageSetup.fitToPage}:void 0},q=O.pageSetup&&O.pageSetup.margins,te={showRowColHeaders:O.pageSetup&&O.pageSetup.showRowColHeaders,showGridLines:O.pageSetup&&O.pageSetup.showGridLines,horizontalCentered:O.pageSetup&&O.pageSetup.horizontalCentered,verticalCentered:O.pageSetup&&O.pageSetup.verticalCentered},F=O.sheetProtection;this.map.sheetPr.render(C,X),this.map.dimension.render(C,O.dimensions),this.map.sheetViews.render(C,O.views),this.map.sheetFormatPr.render(C,R),this.map.cols.render(C,O.cols),this.map.sheetData.render(C,O.rows),this.map.sheetProtection.render(C,F),this.map.autoFilter.render(C,O.autoFilter),this.map.mergeCells.render(C,O.mergeCells),this.map.conditionalFormatting.render(C,O.conditionalFormattings),this.map.dataValidations.render(C,O.dataValidations),this.map.hyperlinks.render(C,O.hyperlinks),this.map.printOptions.render(C,te),this.map.pageMargins.render(C,q),this.map.pageSetup.render(C,O.pageSetup),this.map.headerFooter.render(C,O.headerFooter),this.map.rowBreaks.render(C,O.rowBreaks),this.map.drawing.render(C,O.drawing),this.map.picture.render(C,O.background),this.map.tableParts.render(C,O.tables),this.map.extLst.render(C,O),O.rels&&O.rels.forEach(G=>{G.Type===u.VmlDrawing&&C.leafNode("legacyDrawing",{"r:id":G.Id})}),C.closeNode()}parseOpen(C){return this.parser?(this.parser.parseOpen(C),!0):C.name==="worksheet"?(s.each(this.map,O=>{O.reset()}),!0):(this.map[C.name]&&!this.ignoreNodes.includes(C.name)&&(this.parser=this.map[C.name],this.parser.parseOpen(C)),!0)}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case"worksheet":{const O=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(O.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(O.outlineProperties=this.map.sheetPr.model.outlineProperties);const R={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},X=Object.assign(R,this.map.pageSetup.model,this.map.printOptions.model),q=_(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:O,views:this.map.sheetViews.model,pageSetup:X,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:q},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(C,O){const R=(C.relationships||[]).reduce((q,te)=>{if(q[te.Id]=te,te.Type===u.Comments&&(C.comments=O.comments[te.Target].comments),te.Type===u.VmlDrawing&&C.comments&&C.comments.length){const F=O.vmlDrawings[te.Target].comments;C.comments.forEach((G,j)=>{G.note=Object.assign({},G.note,F[j])})}return q},{});if(O.commentsMap=(C.comments||[]).reduce((q,te)=>(te.ref&&(q[te.ref]=te),q),{}),O.hyperlinkMap=(C.hyperlinks||[]).reduce((q,te)=>(te.rId&&(q[te.address]=R[te.rId].Target),q),{}),O.formulae={},C.rows=C.rows&&C.rows.filter(Boolean)||[],C.rows.forEach(q=>{q.cells=q.cells&&q.cells.filter(Boolean)||[]}),this.map.cols.reconcile(C.cols,O),this.map.sheetData.reconcile(C.rows,O),this.map.conditionalFormatting.reconcile(C.conditionalFormattings,O),C.media=[],C.drawing){const q=R[C.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(q){const te=q[1];O.drawings[te].anchors.forEach(F=>{if(F.medium){const G={type:"image",imageId:F.medium.index,range:F.range,hyperlinks:F.picture.hyperlinks};C.media.push(G)}})}}const X=C.background&&R[C.background.rId];if(X){const q=X.Target.split("/media/")[1],te=O.mediaIndex&&O.mediaIndex[q];te!==void 0&&C.media.push({type:"background",imageId:te})}C.tables=(C.tables||[]).map(q=>{const te=R[q.rId];return O.tables[te.Target]}),delete C.relationships,delete C.hyperlinks,delete C.comments}}k.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},t.exports=k},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{constructor(o){super(),this.tag=o.tag,this.attr=o.attr}render(o,l){l&&(o.openNode(this.tag),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this._format=o.format||function(l){try{return Number.isNaN(l.getTime())?"":l.toISOString()}catch{return""}},this._parse=o.parse||function(l){return new Date(l)}}render(o,l){l&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,this._format(l)):o.writeText(this._format(l)),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=this._parse(o.attributes[this.attr]):this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this.zero=o.zero}render(o,l){(l||this.zero)&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,l):o.writeText(l),o.closeNode())}parseOpen(o){return o.name===this.tag&&(this.attr?this.model=parseInt(o.attributes[this.attr],10):this.text=[],!0)}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs}render(o,l){l!==void 0&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,l):o.writeText(l),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=o.attributes[this.attr]:this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(e,t,n){const s=e("./base-xform"),o=e("../../utils/xml-stream");t.exports=class extends s{constructor(l){super(),this._model=l}render(l){if(!this._xml){const u=new o;(function i(d,h){d.openNode(h.tag,h.$),h.c&&h.c.forEach(c=>{i(d,c)}),h.t&&d.writeText(h.t),d.closeNode()})(u,this._model),this._xml=u.xml}l.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(l){switch(l){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,t,n){const s=e("./text-xform"),o=e("./rich-text-xform"),l=e("../base-xform");t.exports=class extends l{constructor(){super(),this.map={r:new o,t:new s}}get tag(){return"rPh"}render(u,i){if(u.openNode(this.tag,{sb:i.sb||0,eb:i.eb||0}),i&&i.hasOwnProperty("richText")&&i.richText){const{r:d}=this.map;i.richText.forEach(h=>{d.render(u,h)})}else i&&this.map.t.render(u,i.text);u.closeNode()}parseOpen(u){const{name:i}=u;return this.parser?(this.parser.parseOpen(u),!0):i===this.tag?(this.model={sb:parseInt(u.attributes.sb,10),eb:parseInt(u.attributes.eb,10)},!0):(this.parser=this.map[i],!!this.parser&&(this.parser.parseOpen(u),!0))}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser){if(!this.parser.parseClose(u)){switch(u){case"r":{let i=this.model.richText;i||(i=this.model.richText=[]),i.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(u){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,t,n){const s=e("./text-xform"),o=e("../style/font-xform"),l=e("../base-xform");class u extends l{constructor(d){super(),this.model=d}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new s)}get fontXform(){return this._fontXform||(this._fontXform=new o(u.FONT_OPTIONS))}render(d,h){h=h||this.model,d.openNode("r"),h.font&&this.fontXform.render(d,h.font),this.textXform.render(d,h.text),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(d),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(d),!0;default:return!1}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){switch(d){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(d),!0}}}u.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},t.exports=u},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,t,n){const s=e("./text-xform"),o=e("./rich-text-xform"),l=e("./phonetic-text-xform"),u=e("../base-xform");t.exports=class extends u{constructor(i){super(),this.model=i,this.map={r:new o,t:new s,rPh:new l}}get tag(){return"si"}render(i,d){i.openNode(this.tag),d&&d.hasOwnProperty("richText")&&d.richText?d.richText.length?d.richText.forEach(h=>{this.map.r.render(i,h)}):this.map.t.render(i,""):d!=null&&this.map.t.render(i,d),i.closeNode()}parseOpen(i){const{name:d}=i;return this.parser?(this.parser.parseOpen(i),!0):d===this.tag?(this.model={},!0):(this.parser=this.map[d],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser){if(!this.parser.parseClose(i)){switch(i){case"r":{let d=this.model.richText;d||(d=this.model.richText=[]),d.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(i){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(e,t,n){const s=e("../../../utils/xml-stream"),o=e("../base-xform"),l=e("./shared-string-xform");t.exports=class extends o{constructor(u){super(),this.model=u||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new l)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(u){return this.model.values[u]}add(u){return u.richText?this.addRichText(u):this.addText(u)}addText(u){let i=this.hash[u];return i===void 0&&(i=this.hash[u]=this.model.values.length,this.model.values.push(u)),this.model.count++,i}addRichText(u){const i=this.sharedStringXform.toXml(u);let d=this.rich[i];return d===void 0&&(d=this.rich[i]=this.model.values.length,this.model.values.push(u)),this.model.count++,d}render(u,i){i=i||this._values,u.openXml(s.StdDocAttributes),u.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:i.count,uniqueCount:i.values.length});const d=this.sharedStringXform;i.values.forEach(h=>{d.render(u,h)}),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(u),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(u))}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(u){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+u)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"t"}render(o,l){o.openNode("t"),/^\s|\n|\s$/.test(l)&&o.addAttribute("xml:space","preserve"),o.writeText(l),o.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(o,l)=>String.fromCharCode(parseInt(l,16)))}parseOpen(o){switch(o.name){case"t":return this._text=[],!0;default:return!1}}parseText(o){this._text.push(o)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(e,t,n){const s=e("../../../doc/enums"),o=e("../../../utils/utils"),l=e("../base-xform"),u={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((d,h)=>(d[h]=!0,d),{}),horizontal(d){return this.horizontalValues[d]?d:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((d,h)=>(d[h]=!0,d),{}),vertical(d){return d==="middle"?"center":this.verticalValues[d]?d:void 0},wrapText:d=>!!d||void 0,shrinkToFit:d=>!!d||void 0,textRotation(d){switch(d){case"vertical":return d;default:return(d=o.validInt(d))>=-90&&d<=90?d:void 0}},indent:d=>(d=o.validInt(d),Math.max(0,d)),readingOrder(d){switch(d){case"ltr":return s.ReadingOrder.LeftToRight;case"rtl":return s.ReadingOrder.RightToLeft;default:return}}},i={toXml(d){if(d=u.textRotation(d)){if(d==="vertical")return 255;const h=Math.round(d);if(h>=0&&h<=90)return h;if(h<0&&h>=-90)return 90-h}},toModel(d){const h=o.validInt(d);if(h!==void 0){if(h===255)return"vertical";if(h>=0&&h<=90)return h;if(h>90&&h<=180)return 90-h}}};t.exports=class extends l{get tag(){return"alignment"}render(d,h){d.addRollback(),d.openNode("alignment");let c=!1;function f(g,p){p&&(d.addAttribute(g,p),c=!0)}f("horizontal",u.horizontal(h.horizontal)),f("vertical",u.vertical(h.vertical)),f("wrapText",!!u.wrapText(h.wrapText)&&"1"),f("shrinkToFit",!!u.shrinkToFit(h.shrinkToFit)&&"1"),f("indent",u.indent(h.indent)),f("textRotation",i.toXml(h.textRotation)),f("readingOrder",u.readingOrder(h.readingOrder)),d.closeNode(),c?d.commit():d.rollback()}parseOpen(d){const h={};let c=!1;function f(g,p,m){g&&(h[p]=m,c=!0)}f(d.attributes.horizontal,"horizontal",d.attributes.horizontal),f(d.attributes.vertical,"vertical",d.attributes.vertical==="center"?"middle":d.attributes.vertical),f(d.attributes.wrapText,"wrapText",o.parseBoolean(d.attributes.wrapText)),f(d.attributes.shrinkToFit,"shrinkToFit",o.parseBoolean(d.attributes.shrinkToFit)),f(d.attributes.indent,"indent",parseInt(d.attributes.indent,10)),f(d.attributes.textRotation,"textRotation",i.toModel(d.attributes.textRotation)),f(d.attributes.readingOrder,"readingOrder",d.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=c?h:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,t,n){const s=e("../base-xform"),o=e("../../../utils/utils"),l=e("./color-xform");class u extends s{constructor(d){super(),this.name=d,this.map={color:new l}}get tag(){return this.name}render(d,h,c){const f=h&&h.color||c||this.defaultColor;d.openNode(this.name),h&&h.style&&(d.addAttribute("style",h.style),f&&this.map.color.render(d,f)),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.name:{const{style:h}=d.attributes;return this.model=h?{style:h}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(d),!0;default:return!1}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){return this.parser?(this.parser.parseClose(d)||(this.parser=void 0),!0):(d===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(d){return u.validStyleValues[d]}}u.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((i,d)=>(i[d]=!0,i),{}),t.exports=class extends s{constructor(){super(),this.map={top:new u("top"),left:new u("left"),bottom:new u("bottom"),right:new u("right"),diagonal:new u("diagonal")}}render(i,d){const{color:h}=d;function c(f,g){f&&!f.color&&d.color&&(f={...f,color:d.color}),g.render(i,f,h)}i.openNode("border"),d.diagonal&&d.diagonal.style&&(d.diagonal.up&&i.addAttribute("diagonalUp","1"),d.diagonal.down&&i.addAttribute("diagonalDown","1")),c(d.left,this.map.left),c(d.right,this.map.right),c(d.top,this.map.top),c(d.bottom,this.map.bottom),c(d.diagonal,this.map.diagonal),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"border":return this.reset(),this.diagonalUp=o.parseBoolean(i.attributes.diagonalUp),this.diagonalDown=o.parseBoolean(i.attributes.diagonalDown),!0;default:return this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0)}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;if(i==="border"){const d=this.model={},h=function(c,f,g){f&&(g&&Object.assign(f,g),d[c]=f)};h("left",this.map.left.model),h("right",this.map.right.model),h("top",this.map.top.model),h("bottom",this.map.bottom.model),h("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{constructor(o){super(),this.name=o||"color"}get tag(){return this.name}render(o,l){return!!l&&(o.openNode(this.name),l.argb?o.addAttribute("rgb",l.argb):l.theme!==void 0?(o.addAttribute("theme",l.theme),l.tint!==void 0&&o.addAttribute("tint",l.tint)):l.indexed!==void 0?o.addAttribute("indexed",l.indexed):o.addAttribute("auto","1"),o.closeNode(),!0)}parseOpen(o){return o.name===this.name&&(o.attributes.rgb?this.model={argb:o.attributes.rgb}:o.attributes.theme?(this.model={theme:parseInt(o.attributes.theme,10)},o.attributes.tint&&(this.model.tint=parseFloat(o.attributes.tint))):o.attributes.indexed?this.model={indexed:parseInt(o.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(e,t,n){const s=e("../base-xform"),o=e("./alignment-xform"),l=e("./border-xform"),u=e("./fill-xform"),i=e("./font-xform"),d=e("./numfmt-xform"),h=e("./protection-xform");t.exports=class extends s{constructor(){super(),this.map={alignment:new o,border:new l,fill:new u,font:new i,numFmt:new d,protection:new h}}get tag(){return"dxf"}render(c,f){if(c.openNode(this.tag),f.font&&this.map.font.render(c,f.font),f.numFmt&&f.numFmtId){const g={id:f.numFmtId,formatCode:f.numFmt};this.map.numFmt.render(c,g)}f.fill&&this.map.fill.render(c,f.fill),f.alignment&&this.map.alignment.render(c,f.alignment),f.border&&this.map.border.render(c,f.border),f.protection&&this.map.protection.render(c,f.protection),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[c.name],this.parser&&this.parser.parseOpen(c),!0}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){return this.parser?(this.parser.parseClose(c)||(this.parser=void 0),!0):c!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(e,t,n){const s=e("../base-xform"),o=e("./color-xform");class l extends s{constructor(){super(),this.map={color:new o}}get tag(){return"stop"}render(c,f){c.openNode("stop"),c.addAttribute("position",f.position),this.map.color.render(c,f.color),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"stop":return this.model={position:parseFloat(c.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(c),!0;default:return!1}}parseText(){}parseClose(c){return!!this.parser&&(this.parser.parseClose(c)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class u extends s{constructor(){super(),this.map={fgColor:new o("fgColor"),bgColor:new o("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(c,f){c.openNode("patternFill"),c.addAttribute("patternType",f.pattern),f.fgColor&&this.map.fgColor.render(c,f.fgColor),f.bgColor&&this.map.bgColor.render(c,f.bgColor),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"patternFill":return this.model={type:"pattern",pattern:c.attributes.patternType},!0;default:return this.parser=this.map[c.name],!!this.parser&&(this.parser.parseOpen(c),!0)}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){return!!this.parser&&(this.parser.parseClose(c)||(this.parser.model&&(this.model[c]=this.parser.model),this.parser=void 0),!0)}}class i extends s{constructor(){super(),this.map={stop:new l}}get name(){return"gradient"}get tag(){return"gradientFill"}render(c,f){switch(c.openNode("gradientFill"),f.gradient){case"angle":c.addAttribute("degree",f.degree);break;case"path":c.addAttribute("type","path"),f.center.left&&(c.addAttribute("left",f.center.left),f.center.right===void 0&&c.addAttribute("right",f.center.left)),f.center.right&&c.addAttribute("right",f.center.right),f.center.top&&(c.addAttribute("top",f.center.top),f.center.bottom===void 0&&c.addAttribute("bottom",f.center.top)),f.center.bottom&&c.addAttribute("bottom",f.center.bottom)}const g=this.map.stop;f.stops.forEach(p=>{g.render(c,p)}),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"gradientFill":{const f=this.model={stops:[]};return c.attributes.degree?(f.gradient="angle",f.degree=parseInt(c.attributes.degree,10)):c.attributes.type==="path"&&(f.gradient="path",f.center={left:c.attributes.left?parseFloat(c.attributes.left):0,top:c.attributes.top?parseFloat(c.attributes.top):0},c.attributes.right!==c.attributes.left&&(f.center.right=c.attributes.right?parseFloat(c.attributes.right):0),c.attributes.bottom!==c.attributes.top&&(f.center.bottom=c.attributes.bottom?parseFloat(c.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(c),!0;default:return!1}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){return!!this.parser&&(this.parser.parseClose(c)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class d extends s{constructor(){super(),this.map={patternFill:new u,gradientFill:new i}}get tag(){return"fill"}render(c,f){switch(c.addRollback(),c.openNode("fill"),f.type){case"pattern":this.map.patternFill.render(c,f);break;case"gradient":this.map.gradientFill.render(c,f);break;default:return void c.rollback()}c.closeNode(),c.commit()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"fill":return this.model={},!0;default:return this.parser=this.map[c.name],!!this.parser&&(this.parser.parseOpen(c),!0)}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){return!!this.parser&&(this.parser.parseClose(c)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(c){return d.validPatternValues[c]}}d.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((h,c)=>(h[c]=!0,h),{}),d.StopXform=l,d.PatternFillXform=u,d.GradientFillXform=i,t.exports=d},{"../base-xform":32,"./color-xform":128}],131:[function(e,t,n){const s=e("./color-xform"),o=e("../simple/boolean-xform"),l=e("../simple/integer-xform"),u=e("../simple/string-xform"),i=e("./underline-xform"),d=e("../../../utils/under-dash"),h=e("../base-xform");class c extends h{constructor(g){super(),this.options=g||c.OPTIONS,this.map={b:{prop:"bold",xform:new o({tag:"b",attr:"val"})},i:{prop:"italic",xform:new o({tag:"i",attr:"val"})},u:{prop:"underline",xform:new i},charset:{prop:"charset",xform:new l({tag:"charset",attr:"val"})},color:{prop:"color",xform:new s},condense:{prop:"condense",xform:new o({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new o({tag:"extend",attr:"val"})},family:{prop:"family",xform:new l({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new o({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new u({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new u({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new o({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new o({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new l({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new u({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(g,p){const{map:m}=this;g.openNode(this.options.tagName),d.each(this.map,(v,b)=>{m[b].xform.render(g,p[v.prop])}),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;if(this.map[g.name])return this.parser=this.map[g.name].xform,this.parser.parseOpen(g);switch(g.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){if(this.parser&&!this.parser.parseClose(g)){const p=this.map[g];return this.parser.model&&(this.model[p.prop]=this.parser.model),this.parser=void 0,!0}switch(g){case this.options.tagName:return!1;default:return!0}}}c.OPTIONS={tagName:"font",fontNameTag:"name"},t.exports=c},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(e,t,n){const s=e("../../../utils/under-dash"),o=e("../../defaultnumformats"),l=e("../base-xform"),u=function(){const d={};return s.each(o,(h,c)=>{h.f&&(d[h.f]=parseInt(c,10))}),d}();class i extends l{constructor(h,c){super(),this.id=h,this.formatCode=c}get tag(){return"numFmt"}render(h,c){h.leafNode("numFmt",{numFmtId:c.id,formatCode:c.formatCode})}parseOpen(h){switch(h.name){case"numFmt":return this.model={id:parseInt(h.attributes.numFmtId,10),formatCode:h.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}i.getDefaultFmtId=function(d){return u[d]},i.getDefaultFmtCode=function(d){return o[d]&&o[d].f},t.exports=i},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,t,n){const s=e("../base-xform"),o={boolean:(l,u)=>l===void 0?u:l};t.exports=class extends s{get tag(){return"protection"}render(l,u){l.addRollback(),l.openNode("protection");let i=!1;function d(h,c){c!==void 0&&(l.addAttribute(h,c),i=!0)}d("locked",o.boolean(u.locked,!0)?void 0:"0"),d("hidden",o.boolean(u.hidden,!1)?"1":void 0),l.closeNode(),i?l.commit():l.rollback()}parseOpen(l){const u={locked:l.attributes.locked!=="0",hidden:l.attributes.hidden==="1"},i=!u.locked||u.hidden;this.model=i?u:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(e,t,n){const s=e("../base-xform"),o=e("./alignment-xform"),l=e("./protection-xform");t.exports=class extends s{constructor(u){super(),this.xfId=!(!u||!u.xfId),this.map={alignment:new o,protection:new l}}get tag(){return"xf"}render(u,i){u.openNode("xf",{numFmtId:i.numFmtId||0,fontId:i.fontId||0,fillId:i.fillId||0,borderId:i.borderId||0}),this.xfId&&u.addAttribute("xfId",i.xfId||0),i.numFmtId&&u.addAttribute("applyNumberFormat","1"),i.fontId&&u.addAttribute("applyFont","1"),i.fillId&&u.addAttribute("applyFill","1"),i.borderId&&u.addAttribute("applyBorder","1"),i.alignment&&u.addAttribute("applyAlignment","1"),i.protection&&u.addAttribute("applyProtection","1"),i.alignment&&this.map.alignment.render(u,i.alignment),i.protection&&this.map.protection.render(u,i.protection),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"xf":return this.model={numFmtId:parseInt(u.attributes.numFmtId,10),fontId:parseInt(u.attributes.fontId,10),fillId:parseInt(u.attributes.fillId,10),borderId:parseInt(u.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(u.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(u),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(u),!0;default:return!1}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){return this.parser?(this.parser.parseClose(u)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):u!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,t,n){const s=e("../../../doc/enums"),o=e("../../../utils/xml-stream"),l=e("../base-xform"),u=e("../static-xform"),i=e("../list-xform"),d=e("./font-xform"),h=e("./fill-xform"),c=e("./border-xform"),f=e("./numfmt-xform"),g=e("./style-xform"),p=e("./dxf-xform");class m extends l{constructor(b){super(),this.map={numFmts:new i({tag:"numFmts",count:!0,childXform:new f}),fonts:new i({tag:"fonts",count:!0,childXform:new d,$:{"x14ac:knownFonts":1}}),fills:new i({tag:"fills",count:!0,childXform:new h}),borders:new i({tag:"borders",count:!0,childXform:new c}),cellStyleXfs:new i({tag:"cellStyleXfs",count:!0,childXform:new g}),cellXfs:new i({tag:"cellXfs",count:!0,childXform:new g({xfId:!0})}),dxfs:new i({tag:"dxfs",always:!0,count:!0,childXform:new p}),numFmt:new f,font:new d,fill:new h,border:new c,style:new g({xfId:!0}),cellStyles:m.STATIC_XFORMS.cellStyles,tableStyles:m.STATIC_XFORMS.tableStyles,extLst:m.STATIC_XFORMS.extLst},b&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(b,M){M=M||this.model,b.openXml(o.StdDocAttributes),b.openNode("styleSheet",m.STYLESHEET_ATTRIBUTES),this.index?(M.numFmts&&M.numFmts.length&&(b.openNode("numFmts",{count:M.numFmts.length}),M.numFmts.forEach(D=>{b.writeXml(D)}),b.closeNode()),M.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),b.openNode("fonts",{count:M.fonts.length,"x14ac:knownFonts":1}),M.fonts.forEach(D=>{b.writeXml(D)}),b.closeNode(),b.openNode("fills",{count:M.fills.length}),M.fills.forEach(D=>{b.writeXml(D)}),b.closeNode(),b.openNode("borders",{count:M.borders.length}),M.borders.forEach(D=>{b.writeXml(D)}),b.closeNode(),this.map.cellStyleXfs.render(b,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),b.openNode("cellXfs",{count:M.styles.length}),M.styles.forEach(D=>{b.writeXml(D)}),b.closeNode()):(this.map.numFmts.render(b,M.numFmts),this.map.fonts.render(b,M.fonts),this.map.fills.render(b,M.fills),this.map.borders.render(b,M.borders),this.map.cellStyleXfs.render(b,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(b,M.styles)),m.STATIC_XFORMS.cellStyles.render(b),this.map.dxfs.render(b,M.dxfs),m.STATIC_XFORMS.tableStyles.render(b),m.STATIC_XFORMS.extLst.render(b),b.closeNode()}parseOpen(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[b.name],this.parser&&this.parser.parseOpen(b),!0}}parseText(b){this.parser&&this.parser.parseText(b)}parseClose(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case"styleSheet":{this.model={};const M=(D,$)=>{$.model&&$.model.length&&(this.model[D]=$.model)};if(M("numFmts",this.map.numFmts),M("fonts",this.map.fonts),M("fills",this.map.fills),M("borders",this.map.borders),M("styles",this.map.cellXfs),M("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const D=this.index.numFmt;this.model.numFmts.forEach($=>{D[$.id]=$.formatCode})}return!1}default:return!0}}addStyleModel(b,M){if(!b)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(b))return this.weakMap.get(b);const D={};if(M=M||s.ValueType.Number,b.numFmt)D.numFmtId=this._addNumFmtStr(b.numFmt);else switch(M){case s.ValueType.Number:D.numFmtId=this._addNumFmtStr("General");break;case s.ValueType.Date:D.numFmtId=this._addNumFmtStr("mm-dd-yy")}b.font&&(D.fontId=this._addFont(b.font)),b.border&&(D.borderId=this._addBorder(b.border)),b.fill&&(D.fillId=this._addFill(b.fill)),b.alignment&&(D.alignment=b.alignment),b.protection&&(D.protection=b.protection);const $=this._addStyle(D);return this.weakMap&&this.weakMap.set(b,$),$}getStyleModel(b){const M=this.model.styles[b];if(!M)return null;let D=this.index.model[b];if(D)return D;if(D=this.index.model[b]={},M.numFmtId){const A=this.index.numFmt[M.numFmtId]||f.getDefaultFmtCode(M.numFmtId);A&&(D.numFmt=A)}function $(A,H,N){if(N||N===0){const z=H[N];z&&(D[A]=z)}}return $("font",this.model.fonts,M.fontId),$("border",this.model.borders,M.borderId),$("fill",this.model.fills,M.fillId),M.alignment&&(D.alignment=M.alignment),M.protection&&(D.protection=M.protection),D}addDxfStyle(b){return b.numFmt&&(b.numFmtId=this._addNumFmtStr(b.numFmt)),this.model.dxfs.push(b),this.model.dxfs.length-1}getDxfStyle(b){return this.model.dxfs[b]}_addStyle(b){const M=this.map.style.toXml(b);let D=this.index.style[M];return D===void 0&&(D=this.index.style[M]=this.model.styles.length,this.model.styles.push(M)),D}_addNumFmtStr(b){let M=f.getDefaultFmtId(b);if(M!==void 0||(M=this.index.numFmt[b],M!==void 0))return M;M=this.index.numFmt[b]=164+this.model.numFmts.length;const D=this.map.numFmt.toXml({id:M,formatCode:b});return this.model.numFmts.push(D),M}_addFont(b){const M=this.map.font.toXml(b);let D=this.index.font[M];return D===void 0&&(D=this.index.font[M]=this.model.fonts.length,this.model.fonts.push(M)),D}_addBorder(b){const M=this.map.border.toXml(b);let D=this.index.border[M];return D===void 0&&(D=this.index.border[M]=this.model.borders.length,this.model.borders.push(M)),D}_addFill(b){const M=this.map.fill.toXml(b);let D=this.index.fill[M];return D===void 0&&(D=this.index.fill[M]=this.model.fills.length,this.model.fills.push(M)),D}}m.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},m.STATIC_XFORMS={cellStyles:new u({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new u({tag:"dxfs",$:{count:0}}),tableStyles:new u({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new u({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},m.Mock=class extends m{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(v){return v.autodrain(),Promise.resolve()}addStyleModel(v,b){switch(b){case s.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const v={numFmtId:f.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(v)}return this._dateStyleId}getStyleModel(){return{}}},t.exports=m},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(e,t,n){const s=e("../base-xform");class o extends s{constructor(u){super(),this.model=u}get tag(){return"u"}render(u,i){if((i=i||this.model)===!0)u.leafNode("u");else{const d=o.Attributes[i];d&&u.leafNode("u",d)}}parseOpen(u){u.name==="u"&&(this.model=u.attributes.val||!0)}parseText(){}parseClose(){return!1}}o.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},t.exports=o},{"../base-xform":32}],137:[function(e,t,n){const s=e("../base-xform"),o=e("./filter-column-xform");t.exports=class extends s{constructor(){super(),this.map={filterColumn:new o}}get tag(){return"autoFilter"}prepare(l){l.columns.forEach((u,i)=>{this.map.filterColumn.prepare(u,{index:i})})}render(l,u){return l.openNode(this.tag,{ref:u.autoFilterRef}),u.columns.forEach(i=>{this.map.filterColumn.render(l,i)}),l.closeNode(),!0}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case this.tag:return this.model={autoFilterRef:l.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[l.name],this.parser)return this.parseOpen(l),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(l))}}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(l){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+l)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"customFilter"}render(o,l){o.leafNode(this.tag,{val:l.val,operator:l.operator})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val,operator:o.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(e,t,n){const s=e("../base-xform"),o=e("../list-xform"),l=e("./custom-filter-xform"),u=e("./filter-xform");t.exports=class extends s{constructor(){super(),this.map={customFilters:new o({tag:"customFilters",count:!1,empty:!0,childXform:new l}),filters:new o({tag:"filters",count:!1,empty:!0,childXform:new u})}}get tag(){return"filterColumn"}prepare(i,d){i.colId=d.index.toString()}render(i,d){return d.customFilters?(i.openNode(this.tag,{colId:d.colId,hiddenButton:d.filterButton?"0":"1"}),this.map.customFilters.render(i,d.customFilters),i.closeNode(),!0):(i.leafNode(this.tag,{colId:d.colId,hiddenButton:d.filterButton?"0":"1"}),!0)}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;const{attributes:d}=i;switch(i.name){case this.tag:return this.model={filterButton:d.hiddenButton==="0"},!0;default:if(this.parser=this.map[i.name],this.parser)return this.parseOpen(i),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(i))}}parseText(){}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"filter"}render(o,l){o.leafNode(this.tag,{val:l.val})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"tableColumn"}prepare(o,l){o.id=l.index+1}render(o,l){return o.leafNode(this.tag,{id:l.id.toString(),name:l.name,totalsRowLabel:l.totalsRowLabel,totalsRowFunction:l.totalsRowFunction,dxfId:l.dxfId}),!0}parseOpen(o){if(o.name===this.tag){const{attributes:l}=o;return this.model={name:l.name,totalsRowLabel:l.totalsRowLabel,totalsRowFunction:l.totalsRowFunction,dxfId:l.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(e,t,n){const s=e("../base-xform");t.exports=class extends s{get tag(){return"tableStyleInfo"}render(o,l){return o.leafNode(this.tag,{name:l.theme?l.theme:void 0,showFirstColumn:l.showFirstColumn?"1":"0",showLastColumn:l.showLastColumn?"1":"0",showRowStripes:l.showRowStripes?"1":"0",showColumnStripes:l.showColumnStripes?"1":"0"}),!0}parseOpen(o){if(o.name===this.tag){const{attributes:l}=o;return this.model={theme:l.name?l.name:null,showFirstColumn:l.showFirstColumn==="1",showLastColumn:l.showLastColumn==="1",showRowStripes:l.showRowStripes==="1",showColumnStripes:l.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(e,t,n){const s=e("../../../utils/xml-stream"),o=e("../base-xform"),l=e("../list-xform"),u=e("./auto-filter-xform"),i=e("./table-column-xform"),d=e("./table-style-info-xform");class h extends o{constructor(){super(),this.map={autoFilter:new u,tableColumns:new l({tag:"tableColumns",count:!0,empty:!0,childXform:new i}),tableStyleInfo:new d}}prepare(f,g){this.map.autoFilter.prepare(f),this.map.tableColumns.prepare(f.columns,g)}get tag(){return"table"}render(f,g){f.openXml(s.StdDocAttributes),f.openNode(this.tag,{...h.TABLE_ATTRIBUTES,id:g.id,name:g.name,displayName:g.displayName||g.name,ref:g.tableRef,totalsRowCount:g.totalsRow?"1":void 0,totalsRowShown:g.totalsRow?void 0:"1",headerRowCount:g.headerRow?"1":"0"}),this.map.autoFilter.render(f,g),this.map.tableColumns.render(f,g.columns),this.map.tableStyleInfo.render(f,g.style),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;const{name:g,attributes:p}=f;switch(g){case this.tag:this.reset(),this.model={name:p.name,displayName:p.displayName||p.name,tableRef:p.ref,totalsRow:p.totalsRowCount==="1",headerRow:p.headerRowCount==="1"};break;default:this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f)}return!0}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((g,p)=>{this.model.columns[p].filterButton=g.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(f,g){f.columns.forEach(p=>{p.dxfId!==void 0&&(p.style=g.styles.getDxfStyle(p.dxfId))})}}h.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},t.exports=h},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(e,t,n){(function(s,o){(function(){const l=e("fs"),u=e("jszip"),{PassThrough:i}=e("readable-stream"),d=e("../utils/zip-stream"),h=e("../utils/stream-buf"),c=e("../utils/utils"),f=e("../utils/xml-stream"),{bufferToString:g}=e("../utils/browser-buffer-decode"),p=e("./xform/style/styles-xform"),m=e("./xform/core/core-xform"),v=e("./xform/strings/shared-strings-xform"),b=e("./xform/core/relationships-xform"),M=e("./xform/core/content-types-xform"),D=e("./xform/core/app-xform"),$=e("./xform/book/workbook-xform"),A=e("./xform/sheet/worksheet-xform"),H=e("./xform/drawing/drawing-xform"),N=e("./xform/table/table-xform"),z=e("./xform/comment/comments-xform"),L=e("./xform/comment/vml-notes-xform"),Y=e("./xml/theme1");class B{constructor(E){this.workbook=E}async readFile(E,P){if(!await c.fs.exists(E))throw new Error("File not found: "+E);const w=l.createReadStream(E);try{const _=await this.read(w,P);return w.close(),_}catch(_){throw w.close(),_}}parseRels(E){return new b().parseStream(E)}parseWorkbook(E){return new $().parseStream(E)}parseSharedStrings(E){return new v().parseStream(E)}reconcile(E,P){const w=new $,_=new A(P),k=new H,x=new N;w.reconcile(E);const C={media:E.media,mediaIndex:E.mediaIndex};Object.keys(E.drawings).forEach(X=>{const q=E.drawings[X],te=E.drawingRels[X];te&&(C.rels=te.reduce((F,G)=>(F[G.Id]=G,F),{}),(q.anchors||[]).forEach(F=>{const G=F.picture&&F.picture.hyperlinks;G&&C.rels[G.rId]&&(G.hyperlink=C.rels[G.rId].Target,delete G.rId)}),k.reconcile(q,C))});const O={styles:E.styles};Object.values(E.tables).forEach(X=>{x.reconcile(X,O)});const R={styles:E.styles,sharedStrings:E.sharedStrings,media:E.media,mediaIndex:E.mediaIndex,date1904:E.properties&&E.properties.date1904,drawings:E.drawings,comments:E.comments,tables:E.tables,vmlDrawings:E.vmlDrawings};E.worksheets.forEach(X=>{X.relationships=E.worksheetRels[X.sheetNo],_.reconcile(X,R)}),delete E.worksheetHash,delete E.worksheetRels,delete E.globalRels,delete E.sharedStrings,delete E.workbookRels,delete E.sheetDefs,delete E.styles,delete E.mediaIndex,delete E.drawings,delete E.drawingRels,delete E.vmlDrawings}async _processWorksheetEntry(E,P,w,_,k){const x=new A(_),C=await x.parseStream(E);C.sheetNo=w,P.worksheetHash[k]=C,P.worksheets.push(C)}async _processCommentEntry(E,P,w){const _=new z,k=await _.parseStream(E);P.comments[`../${w}.xml`]=k}async _processTableEntry(E,P,w){const _=new N,k=await _.parseStream(E);P.tables[`../tables/${w}.xml`]=k}async _processWorksheetRelsEntry(E,P,w){const _=new b,k=await _.parseStream(E);P.worksheetRels[w]=k}async _processMediaEntry(E,P,w){const _=w.lastIndexOf(".");if(_>=1){const k=w.substr(_+1),x=w.substr(0,_);await new Promise((C,O)=>{const R=new h;R.on("finish",()=>{P.mediaIndex[w]=P.media.length,P.mediaIndex[x]=P.media.length;const X={type:"image",name:x,extension:k,buffer:R.toBuffer()};P.media.push(X),C()}),E.on("error",X=>{O(X)}),E.pipe(R)})}}async _processDrawingEntry(E,P,w){const _=new H,k=await _.parseStream(E);P.drawings[w]=k}async _processDrawingRelsEntry(E,P,w){const _=new b,k=await _.parseStream(E);P.drawingRels[w]=k}async _processVmlDrawingEntry(E,P,w){const _=new L,k=await _.parseStream(E);P.vmlDrawings[`../drawings/${w}.vml`]=k}async _processThemeEntry(E,P,w){await new Promise((_,k)=>{const x=new h;E.on("error",k),x.on("error",k),x.on("finish",()=>{P.themes[w]=x.read().toString(),_()}),E.pipe(x)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(E,P){!E[Symbol.asyncIterator]&&E.pipe&&(E=E.pipe(new i));const w=[];for await(const _ of E)w.push(_);return this.load(o.concat(w),P)}async load(E,P){let w;w=P&&P.base64?o.from(E.toString(),"base64"):E;const _={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},k=await u.loadAsync(w);for(const x of Object.values(k.files))if(!x.dir){let C,O=x.name;if(O[0]==="/"&&(O=O.substr(1)),O.match(/xl\/media\//)||O.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))C=new i,C.write(await x.async("nodebuffer"));else{let R;C=new i({writableObjectMode:!0,readableObjectMode:!0}),R=s.browser?g(await x.async("nodebuffer")):await x.async("string");const X=16384;for(let q=0;q<R.length;q+=X)C.write(R.substring(q,q+X))}switch(C.end(),O){case"_rels/.rels":_.globalRels=await this.parseRels(C);break;case"xl/workbook.xml":{const R=await this.parseWorkbook(C);_.sheets=R.sheets,_.definedNames=R.definedNames,_.views=R.views,_.properties=R.properties,_.calcProperties=R.calcProperties;break}case"xl/_rels/workbook.xml.rels":_.workbookRels=await this.parseRels(C);break;case"xl/sharedStrings.xml":_.sharedStrings=new v,await _.sharedStrings.parseStream(C);break;case"xl/styles.xml":_.styles=new p,await _.styles.parseStream(C);break;case"docProps/app.xml":{const R=new D,X=await R.parseStream(C);_.company=X.company,_.manager=X.manager;break}case"docProps/core.xml":{const R=new m,X=await R.parseStream(C);Object.assign(_,X);break}default:{let R=O.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(R){await this._processWorksheetEntry(C,_,R[1],P,O);break}if(R=O.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),R){await this._processWorksheetRelsEntry(C,_,R[1]);break}if(R=O.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),R){await this._processThemeEntry(C,_,R[1]);break}if(R=O.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),R){await this._processMediaEntry(C,_,R[1]);break}if(R=O.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),R){await this._processDrawingEntry(C,_,R[1]);break}if(R=O.match(/xl\/(comments\d+)[.]xml/),R){await this._processCommentEntry(C,_,R[1]);break}if(R=O.match(/xl\/tables\/(table\d+)[.]xml/),R){await this._processTableEntry(C,_,R[1]);break}if(R=O.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),R){await this._processDrawingRelsEntry(C,_,R[1]);break}if(R=O.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),R){await this._processVmlDrawingEntry(C,_,R[1]);break}}}}return this.reconcile(_,P),this.workbook.model=_,this.workbook}async addMedia(E,P){await Promise.all(P.media.map(async w=>{if(w.type==="image"){const _=`xl/media/${w.name}.${w.extension}`;if(w.filename){const k=await function(x,C){return new Promise((O,R)=>{l.readFile(x,C,(X,q)=>{X?R(X):O(q)})})}(w.filename);return E.append(k,{name:_})}if(w.buffer)return E.append(w.buffer,{name:_});if(w.base64){const k=w.base64,x=k.substring(k.indexOf(",")+1);return E.append(x,{name:_,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(E,P){const w=new H,_=new b;P.worksheets.forEach(k=>{const{drawing:x}=k;if(x){w.prepare(x,{});let C=w.toXml(x);E.append(C,{name:`xl/drawings/${x.name}.xml`}),C=_.toXml(x.rels),E.append(C,{name:`xl/drawings/_rels/${x.name}.xml.rels`})}})}addTables(E,P){const w=new N;P.worksheets.forEach(_=>{const{tables:k}=_;k.forEach(x=>{w.prepare(x,{});const C=w.toXml(x);E.append(C,{name:"xl/tables/"+x.target})})})}async addContentTypes(E,P){const w=new M().toXml(P);E.append(w,{name:"[Content_Types].xml"})}async addApp(E,P){const w=new D().toXml(P);E.append(w,{name:"docProps/app.xml"})}async addCore(E,P){const w=new m;E.append(w.toXml(P),{name:"docProps/core.xml"})}async addThemes(E,P){const w=P.themes||{theme1:Y};Object.keys(w).forEach(_=>{const k=w[_],x=`xl/theme/${_}.xml`;E.append(k,{name:x})})}async addOfficeRels(E){const P=new b().toXml([{Id:"rId1",Type:B.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:B.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:B.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);E.append(P,{name:"_rels/.rels"})}async addWorkbookRels(E,P){let w=1;const _=[{Id:"rId"+w++,Type:B.RelType.Styles,Target:"styles.xml"},{Id:"rId"+w++,Type:B.RelType.Theme,Target:"theme/theme1.xml"}];P.sharedStrings.count&&_.push({Id:"rId"+w++,Type:B.RelType.SharedStrings,Target:"sharedStrings.xml"}),P.worksheets.forEach(x=>{x.rId="rId"+w++,_.push({Id:x.rId,Type:B.RelType.Worksheet,Target:`worksheets/sheet${x.id}.xml`})});const k=new b().toXml(_);E.append(k,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(E,P){P.sharedStrings&&P.sharedStrings.count&&E.append(P.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(E,P){const{xml:w}=P.styles;w&&E.append(w,{name:"xl/styles.xml"})}async addWorkbook(E,P){const w=new $;E.append(w.toXml(P),{name:"xl/workbook.xml"})}async addWorksheets(E,P){const w=new A,_=new b,k=new z,x=new L;P.worksheets.forEach(C=>{let O=new f;w.render(O,C),E.append(O.xml,{name:`xl/worksheets/sheet${C.id}.xml`}),C.rels&&C.rels.length&&(O=new f,_.render(O,C.rels),E.append(O.xml,{name:`xl/worksheets/_rels/sheet${C.id}.xml.rels`})),C.comments.length>0&&(O=new f,k.render(O,C),E.append(O.xml,{name:`xl/comments${C.id}.xml`}),O=new f,x.render(O,C),E.append(O.xml,{name:`xl/drawings/vmlDrawing${C.id}.vml`}))})}_finalize(E){return new Promise((P,w)=>{E.on("finish",()=>{P(this)}),E.on("error",w),E.finalize()})}prepareModel(E,P){E.creator=E.creator||"ExcelJS",E.lastModifiedBy=E.lastModifiedBy||"ExcelJS",E.created=E.created||new Date,E.modified=E.modified||new Date,E.useSharedStrings=P.useSharedStrings===void 0||P.useSharedStrings,E.useStyles=P.useStyles===void 0||P.useStyles,E.sharedStrings=new v,E.styles=E.useStyles?new p(!0):new p.Mock;const w=new $,_=new A;w.prepare(E);const k={sharedStrings:E.sharedStrings,styles:E.styles,date1904:E.properties.date1904,drawingsCount:0,media:E.media};k.drawings=E.drawings=[],k.commentRefs=E.commentRefs=[];let x=0;E.tables=[],E.worksheets.forEach(C=>{C.tables.forEach(O=>{x++,O.target=`table${x}.xml`,O.id=x,E.tables.push(O)}),_.prepare(C,k)})}async write(E,P){P=P||{};const{model:w}=this.workbook,_=new d.ZipWriter(P.zip);return _.pipe(E),this.prepareModel(w,P),await this.addContentTypes(_,w),await this.addOfficeRels(_,w),await this.addWorkbookRels(_,w),await this.addWorksheets(_,w),await this.addSharedStrings(_,w),await this.addDrawings(_,w),await this.addTables(_,w),await Promise.all([this.addThemes(_,w),this.addStyles(_,w)]),await this.addMedia(_,w),await Promise.all([this.addApp(_,w),this.addCore(_,w)]),await this.addWorkbook(_,w),this._finalize(_)}writeFile(E,P){const w=l.createWriteStream(E);return new Promise((_,k)=>{w.on("finish",()=>{_()}),w.on("error",x=>{k(x)}),this.write(w,P).then(()=>{w.end()}).catch(x=>{k(x)})})}async writeBuffer(E){const P=new h;return await this.write(P,E),P.read()}}B.RelType=e("./rel-type"),t.exports=B}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(e,t,n){t.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
62
62
|
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`},{}],146:[function(e,t,n){(function(s){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.CsvFormatterStream=void 0;const o=e("stream"),l=e("./formatter");class u extends o.Transform{constructor(d){super({writableObjectMode:d.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=d,this.rowFormatter=new l.RowFormatter(d),this.hasWrittenBOM=!d.writeBOM}transform(d){return this.rowFormatter.rowTransform=d,this}_transform(d,h,c){let f=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(d,(g,p)=>g?(f=!0,c(g)):(p&&p.forEach(m=>{this.push(s.from(m,"utf8"))}),f=!0,c()))}catch(g){if(f)throw g;c(g)}}_flush(d){this.rowFormatter.finish((h,c)=>h?d(h):(c&&c.forEach(f=>{this.push(s.from(f,"utf8"))}),d()))}}n.CsvFormatterStream=u}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.FormatterOptions=void 0,n.FormatterOptions=class{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var o;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
|
|
63
63
|
`,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,s||{}),(s==null?void 0:s.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(s==null?void 0:s.quote)===!0?this.quote='"':(s==null?void 0:s.quote)===!1&&(this.quote=""),typeof(s==null?void 0:s.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((o=s.writeHeaders)===null||o===void 0||o),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(e,t,n){var s=function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(n,"__esModule",{value:!0}),n.FieldFormatter=void 0;const o=s(e("lodash.isboolean")),l=s(e("lodash.isnil")),u=s(e("lodash.escaperegexp"));n.FieldFormatter=class{constructor(i){this._headers=null,this.formatterOptions=i,i.headers!==null&&(this.headers=i.headers),this.REPLACE_REGEXP=new RegExp(i.quote,"g");const d=`[${i.delimiter}${u.default(i.rowDelimiter)}|\r|
|