@nodeblocks/frontend-list-users-block 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/lib.d.ts +0 -94
- package/dist/lib.d.ts.map +1 -1
- package/dist/list-users.d.ts +89 -26
- package/dist/list-users.d.ts.map +1 -1
- package/dist/list-users.test.d.ts +2 -0
- package/dist/list-users.test.d.ts.map +1 -0
- package/package.json +10 -4
- package/dist/blocks.d.ts +0 -17
- package/dist/blocks.d.ts.map +0 -1
- package/dist/context.d.ts +0 -31
- package/dist/context.d.ts.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),n=require("react");class s extends Error{}class r extends s{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends s{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class a extends s{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends s{}class l extends s{constructor(e){super(`Invalid unit ${e}`)}}class u extends s{}class c extends s{constructor(){super("Zone is an abstract class")}}const h="numeric",d="short",m="long",f={year:h,month:h,day:h},y={year:h,month:d,day:h},g={year:h,month:d,day:h,weekday:d},p={year:h,month:m,day:h},w={year:h,month:m,day:h,weekday:m},k={hour:h,minute:h},b={hour:h,minute:h,second:h},v={hour:h,minute:h,second:h,timeZoneName:d},T={hour:h,minute:h,second:h,timeZoneName:m},S={hour:h,minute:h,hourCycle:"h23"},O={hour:h,minute:h,second:h,hourCycle:"h23"},N={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:d},x={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:m},M={year:h,month:h,day:h,hour:h,minute:h},D={year:h,month:h,day:h,hour:h,minute:h,second:h},I={year:h,month:d,day:h,hour:h,minute:h},V={year:h,month:d,day:h,hour:h,minute:h,second:h},C={year:h,month:d,day:h,weekday:d,hour:h,minute:h},E={year:h,month:m,day:h,hour:h,minute:h,timeZoneName:d},F={year:h,month:m,day:h,hour:h,minute:h,second:h,timeZoneName:d},j={year:h,month:m,day:h,weekday:m,hour:h,minute:h,timeZoneName:m},L={year:h,month:m,day:h,weekday:m,hour:h,minute:h,second:h,timeZoneName:m};class ${get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let W=null;class Z extends ${static get instance(){return null===W&&(W=new Z),W}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n)}formatOffset(e,t){return lt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const z=new Map,A={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},q=new Map;class U extends ${static create(e){let t=q.get(e);return void 0===t&&q.set(e,t=new U(e)),t}static resetCache(){q.clear(),z.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=U.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return rt(e,t,n,this.name)}formatOffset(e,t){return lt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=z.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),z.set(e,t)),t}(this.name);let[s,r,i,a,o,l,u]=n.formatToParts?function(e,t){const n=e.formatToParts(t),s=[];for(let e=0;e<n.length;e++){const{type:t,value:r}=n[e],i=A[t];"era"===t?s[i]=r:We(i)||(s[i]=parseInt(r,10))}return s}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,i,a,o,l,u,c]=s;return[a,r,i,o,l,u,c]}(n,t);"BC"===a&&(s=1-Math.abs(s));let c=+t;const h=c%1e3;return c-=h>=0?h:1e3+h,(et({year:s,month:r,day:i,hour:24===o?0:o,minute:l,second:u,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let _={};const R=new Map;function H(e,t={}){const n=JSON.stringify([e,t]);let s=R.get(n);return void 0===s&&(s=new Intl.DateTimeFormat(e,t),R.set(n,s)),s}const Y=new Map,P=new Map;let J=null;const G=new Map;function B(e){let t=G.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),G.set(e,t)),t}const Q=new Map;function K(e,t,n,s){const r=e.listingMode();return"error"===r?null:"en"===r?n(t):s(t)}class X{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:s,floor:r,...i}=n;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let s=Y.get(n);return void 0===s&&(s=new Intl.NumberFormat(e,t),Y.set(n,s)),s}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Ye(this.floor?Math.floor(e):Be(e,3),this.padTo)}}class ee{constructor(e,t,n){let s;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&U.create(n).valid?(s=n,this.dt=e):(s="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const r={...this.opts};r.timeZone=r.timeZone||s,this.dtf=H(t,r)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class te{constructor(e,t,n){this.opts={style:"long",...n},!t&&Ae()&&(this.rtf=function(e,t={}){const{base:n,...s}=t,r=JSON.stringify([e,s]);let i=P.get(r);return void 0===i&&(i=new Intl.RelativeTimeFormat(e,t),P.set(r,i)),i}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",s=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${r[e][0]}`;case-1:return n?"yesterday":`last ${r[e][0]}`;case 0:return n?"today":`this ${r[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,u=r[e],c=s?l?u[1]:u[2]||u[1]:l?r[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const ne={firstDay:1,minimalDays:4,weekend:[6,7]};class se{static fromOpts(e){return se.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,s,r=!1){const i=e||ve.defaultLocale,a=i||(r?"en-US":J||(J=(new Intl.DateTimeFormat).resolvedOptions().locale,J)),o=t||ve.defaultNumberingSystem,l=n||ve.defaultOutputCalendar,u=Re(s)||ve.defaultWeekSettings;return new se(a,o,l,u,i)}static resetCache(){J=null,R.clear(),Y.clear(),P.clear(),G.clear(),Q.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:s}={}){return se.create(e,t,n,s)}constructor(e,t,n,s,r){const[i,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,s;try{t=H(e).resolvedOptions(),s=e}catch(r){const i=e.substring(0,n);t=H(i).resolvedOptions(),s=i}const{numberingSystem:r,calendar:i}=t;return[s,r,i]}}(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=s,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===B(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?se.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Re(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return K(this,e,mt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),s=(t&=!n)?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";if(!this.monthsCache[r][e]){const t=n?e=>this.dtFormatter(e,s).format():e=>this.extract(e,s,"month");this.monthsCache[r][e]=function(e){const t=[];for(let n=1;n<=12;n++){const s=gs.utc(2009,n,1);t.push(e(s))}return t}(t)}return this.monthsCache[r][e]})}weekdays(e,t=!1){return K(this,e,pt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=function(e){const t=[];for(let n=1;n<=7;n++){const s=gs.utc(2016,11,13+n);t.push(e(s))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return K(this,void 0,()=>wt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[gs.utc(2016,11,13,9),gs.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return K(this,e,Tt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[gs.utc(-40,1,1),gs.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const s=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return s?s.value:null}numberFormatter(e={}){return new X(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ee(e,this.intl,t)}relFormatter(e={}){return new te(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let s=_[n];return s||(s=new Intl.ListFormat(e,t),_[n]=s),s}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||B(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:qe()?function(e){let t=Q.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...ne,...t}),Q.set(e,t)}return t}(this.locale):ne}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let re=null;class ie extends ${static get utcInstance(){return null===re&&(re=new ie(0)),re}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(it(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${lt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${lt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return lt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ae extends ${constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function oe(e,t){if(We(e)||null===e)return t;if(e instanceof $)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?Z.instance:"utc"===n||"gmt"===n?ie.utcInstance:ie.parseSpecifier(n)||U.create(e)}return Ze(e)?ie.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ae(e)}const le={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ue={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ce=le.hanidec.replace(/[\[|\]]/g,"").split(""),he=new Map;function de({numberingSystem:e},t=""){const n=e||"latn";let s=he.get(n);void 0===s&&(s=new Map,he.set(n,s));let r=s.get(t);return void 0===r&&(r=new RegExp(`${le[n]}${t}`),s.set(t,r)),r}let me,fe=()=>Date.now(),ye="system",ge=null,pe=null,we=null,ke=60,be=null;class ve{static get now(){return fe}static set now(e){fe=e}static set defaultZone(e){ye=e}static get defaultZone(){return oe(ye,Z.instance)}static get defaultLocale(){return ge}static set defaultLocale(e){ge=e}static get defaultNumberingSystem(){return pe}static set defaultNumberingSystem(e){pe=e}static get defaultOutputCalendar(){return we}static set defaultOutputCalendar(e){we=e}static get defaultWeekSettings(){return be}static set defaultWeekSettings(e){be=Re(e)}static get twoDigitCutoffYear(){return ke}static set twoDigitCutoffYear(e){ke=e%100}static get throwOnInvalid(){return me}static set throwOnInvalid(e){me=e}static resetCaches(){se.resetCache(),U.resetCache(),gs.resetCache(),he.clear()}}class Te{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Se=[0,31,59,90,120,151,181,212,243,273,304,334],Oe=[0,31,60,91,121,152,182,213,244,274,305,335];function Ne(e,t){return new Te("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function xe(e,t,n){const s=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return 0===r?7:r}function Me(e,t,n){return n+(Qe(e)?Oe:Se)[t-1]}function De(e,t){const n=Qe(e)?Oe:Se,s=n.findIndex(e=>e<t);return{month:s+1,day:t-n[s]}}function Ie(e,t){return(e-t+7)%7+1}function Ve(e,t=4,n=1){const{year:s,month:r,day:i}=e,a=Me(s,r,i),o=Ie(xe(s,r,i),n);let l,u=Math.floor((a-o+14-t)/7);return u<1?(l=s-1,u=nt(l,t,n)):u>nt(s,t,n)?(l=s+1,u=1):l=s,{weekYear:l,weekNumber:u,weekday:o,...ut(e)}}function Ce(e,t=4,n=1){const{weekYear:s,weekNumber:r,weekday:i}=e,a=Ie(xe(s,1,t),n),o=Ke(s);let l,u=7*r+i-a-7+t;u<1?(l=s-1,u+=Ke(l)):u>o?(l=s+1,u-=Ke(s)):l=s;const{month:c,day:h}=De(l,u);return{year:l,month:c,day:h,...ut(e)}}function Ee(e){const{year:t,month:n,day:s}=e;return{year:t,ordinal:Me(t,n,s),...ut(e)}}function Fe(e){const{year:t,ordinal:n}=e,{month:s,day:r}=De(t,n);return{year:t,month:s,day:r,...ut(e)}}function je(e,t){if(!We(e.localWeekday)||!We(e.localWeekNumber)||!We(e.localWeekYear)){if(!We(e.weekday)||!We(e.weekNumber)||!We(e.weekYear))throw new o("Cannot mix locale-based week fields with ISO-based week fields");return We(e.localWeekday)||(e.weekday=e.localWeekday),We(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),We(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Le(e){const t=ze(e.year),n=He(e.month,1,12),s=He(e.day,1,Xe(e.year,e.month));return t?n?!s&&Ne("day",e.day):Ne("month",e.month):Ne("year",e.year)}function $e(e){const{hour:t,minute:n,second:s,millisecond:r}=e,i=He(t,0,23)||24===t&&0===n&&0===s&&0===r,a=He(n,0,59),o=He(s,0,59),l=He(r,0,999);return i?a?o?!l&&Ne("millisecond",r):Ne("second",s):Ne("minute",n):Ne("hour",t)}function We(e){return void 0===e}function Ze(e){return"number"==typeof e}function ze(e){return"number"==typeof e&&e%1==0}function Ae(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function qe(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ue(e,t,n){if(0!==e.length)return e.reduce((e,s)=>{const r=[t(s),s];return e&&n(e[0],r[0])===e[0]?e:r},null)[1]}function _e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Re(e){if(null==e)return null;if("object"!=typeof e)throw new u("Week settings must be an object");if(!He(e.firstDay,1,7)||!He(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!He(e,1,7)))throw new u("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function He(e,t,n){return ze(e)&&e>=t&&e<=n}function Ye(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Pe(e){return We(e)||null===e||""===e?void 0:parseInt(e,10)}function Je(e){return We(e)||null===e||""===e?void 0:parseFloat(e)}function Ge(e){if(!We(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Be(e,t,n="round"){const s=10**t;switch(n){case"expand":return e>0?Math.ceil(e*s)/s:Math.floor(e*s)/s;case"trunc":return Math.trunc(e*s)/s;case"round":return Math.round(e*s)/s;case"floor":return Math.floor(e*s)/s;case"ceil":return Math.ceil(e*s)/s;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Qe(e){return e%4==0&&(e%100!=0||e%400==0)}function Ke(e){return Qe(e)?366:365}function Xe(e,t){const n=(s=t-1)-12*Math.floor(s/12)+1;var s;return 2===n?Qe(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function et(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function tt(e,t,n){return-Ie(xe(e,1,t),n)+t-1}function nt(e,t=4,n=1){const s=tt(e,t,n),r=tt(e+1,t,n);return(Ke(e)-s+r)/7}function st(e){return e>99?e:e>ve.twoDigitCutoffYear?1900+e:2e3+e}function rt(e,t,n,s=null){const r=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const a={timeZoneName:t,...i},o=new Intl.DateTimeFormat(n,a).formatToParts(r).find(e=>"timezonename"===e.type.toLowerCase());return o?o.value:null}function it(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const s=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-s:s)}function at(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new u(`Invalid unit value ${e}`);return t}function ot(e,t){const n={};for(const s in e)if(_e(e,s)){const r=e[s];if(null==r)continue;n[t(s)]=at(r)}return n}function lt(e,t){const n=Math.trunc(Math.abs(e/60)),s=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return`${r}${Ye(n,2)}:${Ye(s,2)}`;case"narrow":return`${r}${n}${s>0?`:${s}`:""}`;case"techie":return`${r}${Ye(n,2)}${Ye(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ut(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}(e)}const ct=["January","February","March","April","May","June","July","August","September","October","November","December"],ht=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dt=["J","F","M","A","M","J","J","A","S","O","N","D"];function mt(e){switch(e){case"narrow":return[...dt];case"short":return[...ht];case"long":return[...ct];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ft=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],yt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],gt=["M","T","W","T","F","S","S"];function pt(e){switch(e){case"narrow":return[...gt];case"short":return[...yt];case"long":return[...ft];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const wt=["AM","PM"],kt=["Before Christ","Anno Domini"],bt=["BC","AD"],vt=["B","A"];function Tt(e){switch(e){case"narrow":return[...vt];case"short":return[...bt];case"long":return[...kt];default:return null}}function St(e,t){let n="";for(const s of e)s.literal?n+=s.val:n+=t(s.val);return n}const Ot={D:f,DD:y,DDD:p,DDDD:w,t:k,tt:b,ttt:v,tttt:T,T:S,TT:O,TTT:N,TTTT:x,f:M,ff:I,fff:E,ffff:j,F:D,FF:V,FFF:F,FFFF:L};class Nt{static create(e,t={}){return new Nt(e,t)}static parseFormat(e){let t=null,n="",s=!1;const r=[];for(let i=0;i<e.length;i++){const a=e.charAt(i);"'"===a?((n.length>0||s)&&r.push({literal:s||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",s=!s):s||a===t?n+=a:(n.length>0&&r.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&r.push({literal:s||/^\s+$/.test(n),val:n}),r}static macroTokenToFormatOpts(e){return Ot[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return Ye(e,t);const s={...this.opts};return t>0&&(s.padTo=t),n&&(s.signDisplay=n),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),s=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,r=(t,n)=>this.loc.extract(e,t,n),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=(t,s)=>n?function(e,t){return mt(t)[e.month-1]}(e,t):r(s?{month:t}:{month:t,day:"numeric"},"month"),o=(t,s)=>n?function(e,t){return pt(t)[e.weekday-1]}(e,t):r(s?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=Nt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},u=t=>n?function(e,t){return Tt(t)[e.year<0?0:1]}(e,t):r({era:t},"era");return St(Nt.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return wt[e.hour<12?0:1]}(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return s?r({day:"numeric"},"day"):this.num(e.day);case"dd":return s?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return o("short",!0);case"cccc":return o("long",!0);case"ccccc":return o("narrow",!0);case"EEE":return o("short",!1);case"EEEE":return o("long",!1);case"EEEEE":return o("narrow",!1);case"L":return s?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?r({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?r({month:"numeric"},"month"):this.num(e.month);case"MM":return s?r({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?r({year:"numeric"},"year"):this.num(e.year);case"yy":return s?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,s=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},r=Nt.parseFormat(t),i=r.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),a=e.shiftTo(...i.map(s).filter(e=>e));return St(r,((e,t)=>r=>{const i=s(r);if(i){const s=t.isNegativeDuration&&i!==t.largestUnit?n:1;let a;return a="negativeLargestOnly"===this.opts.signMode&&i!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(i)*s,r.length,a)}return r})(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}}const xt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Mt(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function Dt(...e){return t=>e.reduce(([e,n,s],r)=>{const[i,a,o]=r(t,s);return[{...e,...i},a||n,o]},[{},null,1]).slice(0,2)}function It(e,...t){if(null==e)return[null,null];for(const[n,s]of t){const t=n.exec(e);if(t)return s(t)}return[null,null]}function Vt(...e){return(t,n)=>{const s={};let r;for(r=0;r<e.length;r++)s[e[r]]=Pe(t[n+r]);return[s,null,n+r]}}const Ct=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Et=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ft=RegExp(`${Et.source}(?:${Ct.source}?(?:\\[(${xt.source})\\])?)?`),jt=RegExp(`(?:[Tt]${Ft.source})?`),Lt=Vt("weekYear","weekNumber","weekDay"),$t=Vt("year","ordinal"),Wt=RegExp(`${Et.source} ?(?:${Ct.source}|(${xt.source}))?`),Zt=RegExp(`(?: ${Wt.source})?`);function zt(e,t,n){const s=e[t];return We(s)?n:Pe(s)}function At(e,t){return[{hours:zt(e,t,0),minutes:zt(e,t+1,0),seconds:zt(e,t+2,0),milliseconds:Ge(e[t+3])},null,t+4]}function qt(e,t){const n=!e[t]&&!e[t+1],s=it(e[t+1],e[t+2]);return[{},n?null:ie.instance(s),t+3]}function Ut(e,t){return[{},e[t]?U.create(e[t]):null,t+1]}const _t=RegExp(`^T?${Et.source}$`),Rt=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Ht(e){const[t,n,s,r,i,a,o,l,u]=e,c="-"===t[0],h=l&&"-"===l[0],d=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:d(Je(n)),months:d(Je(s)),weeks:d(Je(r)),days:d(Je(i)),hours:d(Je(a)),minutes:d(Je(o)),seconds:d(Je(l),"-0"===l),milliseconds:d(Ge(u),h)}]}const Yt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pt(e,t,n,s,r,i,a){const o={year:2===t.length?st(Pe(t)):Pe(t),month:ht.indexOf(n)+1,day:Pe(s),hour:Pe(r),minute:Pe(i)};return a&&(o.second=Pe(a)),e&&(o.weekday=e.length>3?ft.indexOf(e)+1:yt.indexOf(e)+1),o}const Jt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Gt(e){const[,t,n,s,r,i,a,o,l,u,c,h]=e,d=Pt(t,r,s,n,i,a,o);let m;return m=l?Yt[l]:u?0:it(c,h),[d,new ie(m)]}const Bt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Qt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Kt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Xt(e){const[,t,n,s,r,i,a,o]=e;return[Pt(t,r,s,n,i,a,o),ie.utcInstance]}function en(e){const[,t,n,s,r,i,a,o]=e;return[Pt(t,o,n,s,r,i,a),ie.utcInstance]}const tn=Mt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,jt),nn=Mt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,jt),sn=Mt(/(\d{4})-?(\d{3})/,jt),rn=Mt(Ft),an=Dt(function(e,t){return[{year:zt(e,t),month:zt(e,t+1,1),day:zt(e,t+2,1)},null,t+3]},At,qt,Ut),on=Dt(Lt,At,qt,Ut),ln=Dt($t,At,qt,Ut),un=Dt(At,qt,Ut),cn=Dt(At),hn=Mt(/(\d{4})-(\d\d)-(\d\d)/,Zt),dn=Mt(Wt),mn=Dt(At,qt,Ut),fn="Invalid Duration",yn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},gn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...yn},pn={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...yn},wn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],kn=wn.slice(0).reverse();function bn(e,t,n=!1){const s={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new On(s)}function vn(e,t){let n=t.milliseconds??0;for(const s of kn.slice(1))t[s]&&(n+=t[s]*e[s].milliseconds);return n}function Tn(e,t){const n=vn(e,t)<0?-1:1;wn.reduceRight((s,r)=>{if(We(t[r]))return s;if(s){const i=t[s]*n,a=e[r][s],o=Math.floor(i/a);t[r]+=o*n,t[s]-=o*a*n}return r},null),wn.reduce((n,s)=>{if(We(t[s]))return n;if(n){const r=t[n]%1;t[n]-=r,t[s]+=r*e[n][s]}return s},null)}function Sn(e){const t={};for(const[n,s]of Object.entries(e))0!==s&&(t[n]=s);return t}class On{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?pn:gn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||se.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return On.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new On({values:ot(e,On.normalizeUnit),loc:se.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ze(e))return On.fromMillis(e);if(On.isDuration(e))return e;if("object"==typeof e)return On.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return It(e,[Rt,Ht])}(e);return n?On.fromObject(n,t):On.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return It(e,[_t,cn])}(e);return n?On.fromObject(n,t):On.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Duration is invalid");const n=e instanceof Te?e:new Te(e,t);if(ve.throwOnInvalid)throw new a(n);return new On({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new l(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Nt.create(this.loc,n).formatDurationFromString(this,e):fn}toHuman(e={}){if(!this.isValid)return fn;const t=!1!==e.showZeros,n=wn.map(n=>{const s=this.values[n];return We(s)||0===s&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(s)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Be(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},gs.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?vn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=On.fromDurationLike(e),n={};for(const e of wn)(_e(t.values,e)||_e(this.values,e))&&(n[e]=t.get(e)+this.get(e));return bn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=On.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=at(e(this.values[n],n));return bn(this,{values:t},!0)}get(e){return this[On.normalizeUnit(e)]}set(e){return this.isValid?bn(this,{values:{...this.values,...ot(e,On.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:s}={}){return bn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Tn(this.matrix,e),bn(this,{values:e},!0)}rescale(){return this.isValid?bn(this,{values:Sn(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>On.normalizeUnit(e));const t={},n={},s=this.toObject();let r;for(const i of wn)if(e.indexOf(i)>=0){r=i;let e=0;for(const t in n)e+=this.matrix[t][i]*n[t],n[t]=0;Ze(s[i])&&(e+=s[i]);const a=Math.trunc(e);t[i]=a,n[i]=(1e3*e-1e3*a)/1e3}else Ze(s[i])&&(n[i]=s[i]);for(const e in n)0!==n[e]&&(t[r]+=e===r?n[e]:n[e]/this.matrix[r][e]);return Tn(this.matrix,t),bn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return bn(this,{values:e},!0)}removeZeros(){return this.isValid?bn(this,{values:Sn(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of wn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Nn="Invalid Interval";class xn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the Interval is invalid");const n=e instanceof Te?e:new Te(e,t);if(ve.throwOnInvalid)throw new i(n);return new xn({invalid:n})}static fromDateTimes(e,t){const n=ps(e),s=ps(t),r=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?xn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:xn.invalid("missing or invalid end"):xn.invalid("missing or invalid start")}(n,s);return null==r?new xn({start:n,end:s}):r}static after(e,t){const n=On.fromDurationLike(t),s=ps(e);return xn.fromDateTimes(s,s.plus(n))}static before(e,t){const n=On.fromDurationLike(t),s=ps(e);return xn.fromDateTimes(s.minus(n),s)}static fromISO(e,t){const[n,s]=(e||"").split("/",2);if(n&&s){let e,r,i,a;try{e=gs.fromISO(n,t),r=e.isValid}catch(s){r=!1}try{i=gs.fromISO(s,t),a=i.isValid}catch(s){a=!1}if(r&&a)return xn.fromDateTimes(e,i);if(r){const n=On.fromISO(s,t);if(n.isValid)return xn.after(e,n)}else if(a){const e=On.fromISO(n,t);if(e.isValid)return xn.before(i,e)}}return xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let s;return s=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,s=s.startOf(e,t),Math.floor(s.diff(n,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?xn.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ps).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:s}=this,r=0;for(;s<this.e;){const e=t[r]||this.e,i=+e>+this.e?this.e:e;n.push(xn.fromDateTimes(s,i)),s=i,r+=1}return n}splitBy(e){const t=On.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:s}=this,r=1;const i=[];for(;s<this.e;){const e=this.start.plus(t.mapUnits(e=>e*r));n=+e>+this.e?this.e:e,i.push(xn.fromDateTimes(s,n)),s=n,r+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:xn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return xn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const s=[],r=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),i=Array.prototype.concat(...r).sort((e,t)=>e.time-t.time);for(const e of i)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&s.push(xn.fromDateTimes(t,e.time)),t=null);return xn.merge(s)}difference(...e){return xn.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Nn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?Nt.create(this.s.loc.clone(t),e).formatInterval(this):Nn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Nn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Nn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Nn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Nn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):On.invalid(this.invalidReason)}mapEndpoints(e){return xn.fromDateTimes(e(this.s),e(this.e))}}class Mn{static hasDST(e=ve.defaultZone){const t=gs.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return U.isValidZone(e)}static normalizeZone(e){return oe(e,ve.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||se.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||se.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||se.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||se.create(t,n,r)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||se.create(t,n,r)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null}={}){return(s||se.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null}={}){return(s||se.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return se.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return se.create(t,null,"gregory").eras(e)}static features(){return{relative:Ae(),localeWeek:qe()}}}function Dn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(t)-n(e);return Math.floor(On.fromMillis(s).as("days"))}function In(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const s=e.charCodeAt(n);if(-1!==e[n].search(le.hanidec))t+=ce.indexOf(e[n]);else for(const e in ue){const[n,r]=ue[e];s>=n&&s<=r&&(t+=s-n)}}return parseInt(t,10)}return t}(e))}}const Vn=`[ ${String.fromCharCode(160)}]`,Cn=new RegExp(Vn,"g");function En(e){return e.replace(/\./g,"\\.?").replace(Cn,Vn)}function Fn(e){return e.replace(/\./g,"").replace(Cn," ").toLowerCase()}function jn(e,t){return null===e?null:{regex:RegExp(e.map(En).join("|")),deser:([n])=>e.findIndex(e=>Fn(n)===Fn(e))+t}}function Ln(e,t){return{regex:e,deser:([,e,t])=>it(e,t),groups:t}}function $n(e){return{regex:e,deser:([e])=>e}}const Wn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Zn=null;function zn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Un(Nt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class An{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=zn(Nt.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=de(t),s=de(t,"{2}"),r=de(t,"{3}"),i=de(t,"{4}"),a=de(t,"{6}"),o=de(t,"{1,2}"),l=de(t,"{1,3}"),u=de(t,"{1,6}"),c=de(t,"{1,9}"),h=de(t,"{2,4}"),d=de(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return jn(t.eras("short"),0);case"GG":return jn(t.eras("long"),0);case"y":return In(u);case"yy":case"kk":return In(h,st);case"yyyy":case"kkkk":return In(i);case"yyyyy":return In(d);case"yyyyyy":return In(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return In(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return In(s);case"MMM":return jn(t.months("short",!0),1);case"MMMM":return jn(t.months("long",!0),1);case"LLL":return jn(t.months("short",!1),1);case"LLLL":return jn(t.months("long",!1),1);case"o":case"S":return In(l);case"ooo":case"SSS":return In(r);case"u":return $n(c);case"uu":return $n(o);case"uuu":case"E":case"c":return In(n);case"a":return jn(t.meridiems(),0);case"EEE":return jn(t.weekdays("short",!1),1);case"EEEE":return jn(t.weekdays("long",!1),1);case"ccc":return jn(t.weekdays("short",!0),1);case"cccc":return jn(t.weekdays("long",!0),1);case"Z":case"ZZ":return Ln(new RegExp(`([+-]${o.source})(?::(${s.source}))?`),2);case"ZZZ":return Ln(new RegExp(`([+-]${o.source})(${s.source})?`),2);case"z":return $n(/[a-z_+-/]{1,256}?/i);case" ":return $n(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const s=e.match(t);if(s){const e={};let t=1;for(const r in n)if(_e(n,r)){const i=n[r],a=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(s.slice(t,t+a))),t+=a}return[s,e]}return[s,{}]}(e,this.regex,this.handlers),[s,r,i]=n?function(e){let t,n=null;return We(e.z)||(n=U.create(e.z)),We(e.Z)||(n||(n=new ie(e.Z)),t=e.Z),We(e.q)||(e.M=3*(e.q-1)+1),We(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),We(e.u)||(e.S=Ge(e.u)),[Object.keys(e).reduce((t,n)=>{const s=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return s&&(t[s]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(_e(n,"a")&&_e(n,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:s,zone:r,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function qn(e,t,n){return new An(e,n).explainFromTokens(t)}function Un(e,t){if(!e)return null;const n=Nt.create(t,e).dtFormatter((Zn||(Zn=gs.fromMillis(1555555555555)),Zn)),s=n.formatToParts(),r=n.resolvedOptions();return s.map(t=>function(e,t,n){const{type:s,value:r}=e;if("literal"===s){const e=/^\s+$/.test(r);return{literal:!e,val:e?" ":r}}const i=t[s];let a=s;"hour"===s&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=Wn[a];if("object"==typeof o&&(o=o[i]),o)return{literal:!1,val:o}}(t,e,r))}const _n="Invalid DateTime",Rn=864e13;function Hn(e){return new Te("unsupported zone",`the zone "${e.name}" is not supported`)}function Yn(e){return null===e.weekData&&(e.weekData=Ve(e.c)),e.weekData}function Pn(e){return null===e.localWeekData&&(e.localWeekData=Ve(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Jn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new gs({...n,...t,old:n})}function Gn(e,t,n){let s=e-60*t*1e3;const r=n.offset(s);if(t===r)return[s,t];s-=60*(r-t)*1e3;const i=n.offset(s);return r===i?[s,r]:[e-60*Math.min(r,i)*1e3,Math.max(r,i)]}function Bn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Qn(e,t,n){return Gn(et(e),t,n)}function Kn(e,t){const n=e.o,s=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:s,month:r,day:Math.min(e.c.day,Xe(s,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=On.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=et(i);let[l,u]=Gn(o,n,e.zone);return 0!==a&&(l+=a,u=e.zone.offset(l)),{ts:l,o:u}}function Xn(e,t,n,s,r,i){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const s=t||o,r=gs.fromObject(e,{...n,zone:s,specificOffset:i});return a?r:r.setZone(o)}return gs.invalid(new Te("unparsable",`the input "${r}" can't be parsed as ${s}`))}function es(e,t,n=!0){return e.isValid?Nt.create(se.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ts(e,t,n){const s=e.c.year>9999||e.c.year<0;let r="";if(s&&e.c.year>=0&&(r+="+"),r+=Ye(e.c.year,s?6:4),"year"===n)return r;if(t){if(r+="-",r+=Ye(e.c.month),"month"===n)return r;r+="-"}else if(r+=Ye(e.c.month),"month"===n)return r;return r+=Ye(e.c.day),r}function ns(e,t,n,s,r,i,a){let o=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(a){case"day":case"month":case"year":break;default:if(l+=Ye(e.c.hour),"hour"===a)break;if(t){if(l+=":",l+=Ye(e.c.minute),"minute"===a)break;o&&(l+=":",l+=Ye(e.c.second))}else{if(l+=Ye(e.c.minute),"minute"===a)break;o&&(l+=Ye(e.c.second))}if("second"===a)break;!o||s&&0===e.c.millisecond||(l+=".",l+=Ye(e.c.millisecond,3))}return r&&(e.isOffsetFixed&&0===e.offset&&!i?l+="Z":e.o<0?(l+="-",l+=Ye(Math.trunc(-e.o/60)),l+=":",l+=Ye(Math.trunc(-e.o%60))):(l+="+",l+=Ye(Math.trunc(e.o/60)),l+=":",l+=Ye(Math.trunc(e.o%60)))),i&&(l+="["+e.zone.ianaName+"]"),l}const ss={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},is={ordinal:1,hour:0,minute:0,second:0,millisecond:0},as=["year","month","day","hour","minute","second","millisecond"],os=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ls=["year","ordinal","hour","minute","second","millisecond"];function us(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new l(e);return t}function cs(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return us(e)}}function hs(e,t){const n=oe(t.zone,ve.defaultZone);if(!n.isValid)return gs.invalid(Hn(n));const s=se.fromObject(t);let r,i;if(We(e.year))r=ve.now();else{for(const t of as)We(e[t])&&(e[t]=ss[t]);const t=Le(e)||$e(e);if(t)return gs.invalid(t);const s=function(e){if(void 0===fs&&(fs=ve.now()),"iana"!==e.type)return e.offset(fs);const t=e.name;let n=ys.get(t);return void 0===n&&(n=e.offset(fs),ys.set(t,n)),n}(n);[r,i]=Qn(e,s,n)}return new gs({ts:r,zone:n,loc:s,o:i})}function ds(e,t,n){const s=!!We(n.round)||n.round,r=We(n.rounding)?"trunc":n.rounding,i=(e,i)=>(e=Be(e,s||n.calendary?0:2,n.calendary?"round":r),t.loc.clone(n).relFormatter(n).format(e,i)),a=s=>n.calendary?t.hasSame(e,s)?0:t.startOf(s).diff(e.startOf(s),s).get(s):t.diff(e,s).get(s);if(n.unit)return i(a(n.unit),n.unit);for(const e of n.units){const t=a(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,n.units[n.units.length-1])}function ms(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let fs;const ys=new Map;class gs{constructor(e){const t=e.zone||ve.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Te("invalid input"):null)||(t.isValid?null:Hn(t));this.ts=We(e.ts)?ve.now():e.ts;let s=null,r=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,r]=[e.old.c,e.old.o];else{const i=Ze(e.o)&&!e.old?e.o:t.offset(this.ts);s=Bn(this.ts,i),n=Number.isNaN(s.year)?new Te("invalid input"):null,s=n?null:s,r=n?null:i}this._zone=t,this.loc=e.loc||se.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=s,this.o=r,this.isLuxonDateTime=!0}static now(){return new gs({})}static local(){const[e,t]=ms(arguments),[n,s,r,i,a,o,l]=t;return hs({year:n,month:s,day:r,hour:i,minute:a,second:o,millisecond:l},e)}static utc(){const[e,t]=ms(arguments),[n,s,r,i,a,o,l]=t;return e.zone=ie.utcInstance,hs({year:n,month:s,day:r,hour:i,minute:a,second:o,millisecond:l},e)}static fromJSDate(e,t={}){const n=(s=e,"[object Date]"===Object.prototype.toString.call(s)?e.valueOf():NaN);var s;if(Number.isNaN(n))return gs.invalid("invalid input");const r=oe(t.zone,ve.defaultZone);return r.isValid?new gs({ts:n,zone:r,loc:se.fromObject(t)}):gs.invalid(Hn(r))}static fromMillis(e,t={}){if(Ze(e))return e<-Rn||e>Rn?gs.invalid("Timestamp out of range"):new gs({ts:e,zone:oe(t.zone,ve.defaultZone),loc:se.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ze(e))return new gs({ts:1e3*e,zone:oe(t.zone,ve.defaultZone),loc:se.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=oe(t.zone,ve.defaultZone);if(!n.isValid)return gs.invalid(Hn(n));const s=se.fromObject(t),r=ot(e,cs),{minDaysInFirstWeek:i,startOfWeek:a}=je(r,s),l=ve.now(),u=We(t.specificOffset)?n.offset(l):t.specificOffset,c=!We(r.ordinal),h=!We(r.year),d=!We(r.month)||!We(r.day),m=h||d,f=r.weekYear||r.weekNumber;if((m||c)&&f)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new o("Can't mix ordinal dates with month/day");const y=f||r.weekday&&!m;let g,p,w=Bn(l,u);y?(g=os,p=rs,w=Ve(w,i,a)):c?(g=ls,p=is,w=Ee(w)):(g=as,p=ss);let k=!1;for(const e of g)We(r[e])?r[e]=k?p[e]:w[e]:k=!0;const b=y?function(e,t=4,n=1){const s=ze(e.weekYear),r=He(e.weekNumber,1,nt(e.weekYear,t,n)),i=He(e.weekday,1,7);return s?r?!i&&Ne("weekday",e.weekday):Ne("week",e.weekNumber):Ne("weekYear",e.weekYear)}(r,i,a):c?function(e){const t=ze(e.year),n=He(e.ordinal,1,Ke(e.year));return t?!n&&Ne("ordinal",e.ordinal):Ne("year",e.year)}(r):Le(r),v=b||$e(r);if(v)return gs.invalid(v);const T=y?Ce(r,i,a):c?Fe(r):r,[S,O]=Qn(T,u,n),N=new gs({ts:S,zone:n,o:O,loc:s});return r.weekday&&m&&e.weekday!==N.weekday?gs.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${N.toISO()}`):N.isValid?N:gs.invalid(N.invalid)}static fromISO(e,t={}){const[n,s]=function(e){return It(e,[tn,an],[nn,on],[sn,ln],[rn,un])}(e);return Xn(n,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,s]=function(e){return It(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Jt,Gt])}(e);return Xn(n,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,s]=function(e){return It(e,[Bt,Xt],[Qt,Xt],[Kt,en])}(e);return Xn(n,s,t,"HTTP",t)}static fromFormat(e,t,n={}){if(We(e)||We(t))throw new u("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:r=null}=n,i=se.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0}),[a,o,l,c]=function(e,t,n){const{result:s,zone:r,specificOffset:i,invalidReason:a}=qn(e,t,n);return[s,r,i,a]}(i,e,t);return c?gs.invalid(c):Xn(a,o,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return gs.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,s]=function(e){return It(e,[hn,an],[dn,mn])}(e);return Xn(n,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new u("need to specify a reason the DateTime is invalid");const n=e instanceof Te?e:new Te(e,t);if(ve.throwOnInvalid)throw new r(n);return new gs({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Un(e,se.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return zn(Nt.parseFormat(e),se.fromObject(t)).map(e=>e.val).join("")}static resetCache(){fs=void 0,ys.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Yn(this).weekYear:NaN}get weekNumber(){return this.isValid?Yn(this).weekNumber:NaN}get weekday(){return this.isValid?Yn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Pn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Pn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Pn(this).weekYear:NaN}get ordinal(){return this.isValid?Ee(this.c).ordinal:NaN}get monthShort(){return this.isValid?Mn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Mn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Mn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Mn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=et(this.c),s=this.zone.offset(n-e),r=this.zone.offset(n+e),i=this.zone.offset(n-s*t),a=this.zone.offset(n-r*t);if(i===a)return[this];const o=n-i*t,l=n-a*t,u=Bn(o,i),c=Bn(l,a);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[Jn(this,{ts:o}),Jn(this,{ts:l})]:[this]}get isInLeapYear(){return Qe(this.year)}get daysInMonth(){return Xe(this.year,this.month)}get daysInYear(){return this.isValid?Ke(this.year):NaN}get weeksInWeekYear(){return this.isValid?nt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?nt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:s}=Nt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(ve.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=oe(e,ve.defaultZone)).equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[s]=Qn(n,t,e)}return Jn(this,{ts:s,zone:e})}return gs.invalid(Hn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Jn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ot(e,cs),{minDaysInFirstWeek:n,startOfWeek:s}=je(t,this.loc),r=!We(t.weekYear)||!We(t.weekNumber)||!We(t.weekday),i=!We(t.ordinal),a=!We(t.year),l=!We(t.month)||!We(t.day),u=a||l,c=t.weekYear||t.weekNumber;if((u||i)&&c)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&i)throw new o("Can't mix ordinal dates with month/day");let h;r?h=Ce({...Ve(this.c,n,s),...t},n,s):We(t.ordinal)?(h={...this.toObject(),...t},We(t.day)&&(h.day=Math.min(Xe(h.year,h.month),h.day))):h=Fe({...Ee(this.c),...t});const[d,m]=Qn(h,this.o,this.zone);return Jn(this,{ts:d,o:m})}plus(e){return this.isValid?Jn(this,Kn(this,On.fromDurationLike(e))):this}minus(e){return this.isValid?Jn(this,Kn(this,On.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},s=On.normalizeUnit(e);switch(s){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===s)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===s){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Nt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):_n}toLocaleString(e=f,t={}){return this.isValid?Nt.create(this.loc.clone(t),e).formatDateTime(this):_n}toLocaleParts(e={}){return this.isValid?Nt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:s=!0,extendedZone:r=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;const a="extended"===e;let o=ts(this,a,i=us(i));return as.indexOf(i)>=3&&(o+="T"),o+=ns(this,a,t,n,s,r,i),o}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?ts(this,"extended"===e,us(t)):null}toISOWeekDate(){return es(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:s=!1,extendedZone:r=!1,format:i="extended",precision:a="milliseconds"}={}){return this.isValid?(a=us(a),(s&&as.indexOf(a)>=3?"T":"")+ns(this,"extended"===i,t,e,n,r,a)):null}toRFC2822(){return es(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return es(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ts(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(n&&(s+=" "),t?s+="z":e&&(s+="ZZ")),es(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():_n}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return On.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...n},r=(o=t,Array.isArray(o)?o:[o]).map(On.normalizeUnit),i=e.valueOf()>this.valueOf(),a=function(e,t,n,s){let[r,i,a,o]=function(e,t,n){const s=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Dn(e,t);return(n-n%7)/7}],["days",Dn]],r={},i=e;let a,o;for(const[l,u]of s)n.indexOf(l)>=0&&(a=l,r[l]=u(e,t),o=i.plus(r),o>t?(r[l]--,(e=i.plus(r))>t&&(o=e,r[l]--,e=i.plus(r))):e=o);return[e,r,o,a]}(e,t,n);const l=t-r,u=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===u.length&&(a<t&&(a=r.plus({[o]:1})),a!==r&&(i[o]=(i[o]||0)+l/(a-r)));const c=On.fromObject(i,s);return u.length>0?On.fromMillis(l,s).shiftTo(...u).plus(c):c}(i?this:e,i?e:this,r,s);var o;return i?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(gs.now(),e,t)}until(e){return this.isValid?xn.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const s=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t,n)<=s&&s<=r.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||gs.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],r=e.unit;return Array.isArray(e.unit)&&(s=e.unit,r=void 0),ds(t,this.plus(n),{...e,numeric:"always",units:s,unit:r})}toRelativeCalendar(e={}){return this.isValid?ds(e.base||gs.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(gs.isDateTime))throw new u("min requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(gs.isDateTime))throw new u("max requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:s=null,numberingSystem:r=null}=n;return qn(se.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return gs.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:s=null}=t,r=se.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0});return new An(r,e)}static fromFormatParser(e,t,n={}){if(We(e)||We(t))throw new u("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:r=null}=n,i=se.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});if(!i.equals(t.locale))throw new u(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?gs.invalid(c):Xn(a,o,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return f}static get DATE_MED(){return y}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return p}static get DATE_HUGE(){return w}static get TIME_SIMPLE(){return k}static get TIME_WITH_SECONDS(){return b}static get TIME_WITH_SHORT_OFFSET(){return v}static get TIME_WITH_LONG_OFFSET(){return T}static get TIME_24_SIMPLE(){return S}static get TIME_24_WITH_SECONDS(){return O}static get TIME_24_WITH_SHORT_OFFSET(){return N}static get TIME_24_WITH_LONG_OFFSET(){return x}static get DATETIME_SHORT(){return M}static get DATETIME_SHORT_WITH_SECONDS(){return D}static get DATETIME_MED(){return I}static get DATETIME_MED_WITH_SECONDS(){return V}static get DATETIME_MED_WITH_WEEKDAY(){return C}static get DATETIME_FULL(){return E}static get DATETIME_FULL_WITH_SECONDS(){return F}static get DATETIME_HUGE(){return j}static get DATETIME_HUGE_WITH_SECONDS(){return L}}function ps(e){if(gs.isDateTime(e))return e;if(e&&e.valueOf&&Ze(e.valueOf()))return gs.fromJSDate(e);if(e&&"object"==typeof e)return gs.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const ws=["listUsersTitle","isLoading","labels","onNavigate","pagination","data","rowHref","tabs","currentTab","onTabChange"],ks=n.createContext(void 0),bs=({children:t,...n})=>e.jsx(ks.Provider,{value:n,children:t}),vs=()=>{const e=n.useContext(ks);if(!e)throw new Error("useListUsersContext must be used within a ListUsersProvider");return e};function Ts({blocksOverride:e,defaultBlocks:t,defaultBlockOrder:n,children:s}){if(void 0===e)return s({blocks:t,blockOrder:n});if("function"==typeof e){const{blocks:r,blockOrder:i}=e({defaultBlocks:t,defaultBlockOrder:n});return s({blocks:r,blockOrder:i})}return e}function Ss(e,t){const n={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Os(...e){return e.flat().filter(Boolean).join(" ")}function Ns(e,...t){const n={...e};for(const e of t)delete n[e];return n}function xs(e,...t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');\n");const Ms=({sx:s,spacing:r=3,className:i,children:a,...o})=>e.jsx(t.Stack,{className:Os("nbb-list-users-container",i),spacing:r,sx:[{p:3},...Array.isArray(s)?s:[s]],...Ns(o,...ws),children:e.jsx(bs,{...xs(o,...ws),children:e.jsx(Ts,{defaultBlocks:Ds,defaultBlockOrder:Object.keys(Ds),blocksOverride:a,children:({blocks:{title:t,tabs:s,table:r,...i},blockOrder:a})=>a.filter(e=>e in i).map(t=>e.jsx(n.Fragment,{children:i[t]},String(t)))})})});Ms.Title=n=>{const s=vs(),{children:r,className:i,listUsersTitle:a}=Ss(s,n),{component:o="h1",variant:l="h4",...u}=n;return e.jsx(t.Typography,{component:o,variant:l,className:Os("nbb-list-users-title",i),...Ns(u,...ws),children:r||a})},Ms.Header=n=>{const{children:s,className:r}=Ss(vs(),n);return e.jsx(t.Box,{className:Os("nbb-list-users-header",r),...n,children:s||e.jsx(t.Stack,{direction:"row",sx:{justifyContent:"space-between"},children:e.jsx(Ms.Title,{})})})},Ms.Loader=n=>{const{children:s,className:r}=Ss(vs(),n),{sx:i=[],...a}=n;return e.jsx(t.Stack,{className:Os("nbb-list-users-loader",r),sx:[{alignItems:"center"},...Array.isArray(i)?i:[i]],...a,children:s||e.jsx(t.CircularProgress,{})})};const Ds=(Is={title:Ms.Title,header:Ms.Header,content:Ms.Content=n=>{const s=vs(),{children:r,className:i,isLoading:a}=Ss(s,n);return e.jsx(t.Box,{className:Os("nbb-list-users-content",i),...Ns(n,...ws),children:r?e.jsx(e.Fragment,{children:r}):a?e.jsx(Ms.Loader,{}):e.jsxs(t.Stack,{spacing:3,direction:"column",children:[e.jsx(Ms.Tabs,{}),e.jsx(Ms.Table,{})]})})},tabs:Ms.Tabs=n=>{const s=vs(),{tabs:r,currentTab:i,onTabChange:a,className:o}=Ss(s,n);if(!r||0===r.length)return null;const l=Math.max(0,r.findIndex(e=>e.label===i)),u=a&&((e,t)=>{const n=r[t];a(n.label)});return e.jsx(t.Tabs,{value:l,...u&&{onChange:u},variant:"fullWidth",className:Os("nbb-list-users-tabs",o),...Ns(n,...ws),children:r.map((n,s)=>e.jsx(t.Tab,{label:e.jsxs(e.Fragment,{children:[n.label,n.subtitle&&e.jsx(t.Typography,{component:"span",variant:"body2",color:"text.secondary",children:n.subtitle})]}),disabled:Boolean(n.isDisabled)},n.key??s))})},table:Ms.Table=n=>{const s=vs(),{className:r,labels:i,data:a,rowHref:o,onNavigate:l,pagination:u}=Ss(s,n),{spacing:c=3,...h}=n,d=e=>{if(!e)return null;const t=gs.fromISO(e);return t.isValid?t:null};return a?0===a.length?e.jsx(t.Stack,{className:Os("nbb-list-users-table",r),...Ns(h,...ws),children:e.jsxs(t.Box,{className:"nbb-table-empty-state",children:[e.jsx(t.Icon,{baseClassName:"material-symbols-outlined",className:"nbb-table-empty-state-icon",children:"person"}),e.jsx(t.Typography,{variant:"body1",className:"nbb-table-empty-state-message",children:i.emptyStateMessage})]})}):e.jsxs(t.Stack,{className:Os("nbb-list-users-table",r),spacing:c,...Ns(h,...ws),children:[e.jsx(t.TableContainer,{component:t.Paper,elevation:0,children:e.jsxs(t.Table,{children:[e.jsx(t.TableHead,{children:e.jsxs(t.TableRow,{children:[e.jsx(t.TableCell,{children:e.jsx(t.Typography,{variant:"body2",color:"text.secondary",sx:{fontWeight:"bold"},children:i.headerRow.name})}),e.jsx(t.TableCell,{children:e.jsx(t.Typography,{variant:"body2",color:"text.secondary",sx:{fontWeight:"bold"},children:i.headerRow.createdAt})}),e.jsx(t.TableCell,{children:e.jsx(t.Typography,{variant:"body2",color:"text.secondary",sx:{fontWeight:"bold"},children:i.headerRow.status})})]})}),e.jsx(t.TableBody,{children:a.map(n=>{const s=o?.(n);return e.jsxs(t.TableRow,{hover:!!s,onClick:()=>{s&&l&&l(s)},sx:e=>({cursor:s?"pointer":"default",...!s&&{"&.MuiTableRow-root.MuiTableRow-root:hover":{bgcolor:e.palette.background.paper}}}),children:[e.jsx(t.TableCell,{children:e.jsx(t.Typography,{variant:"body2",children:n.name})}),e.jsx(t.TableCell,{children:e.jsx(t.Typography,{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:d(n.createdAt)?.toLocaleString(gs.DATETIME_FULL)??"N/A",children:d(n.createdAt)?.toFormat("yyyy/M/d")??"N/A"})}),e.jsx(t.TableCell,{children:e.jsx(t.Typography,{variant:"body2",children:n.status})})]},n.id)})})]})}),u&&e.jsx(t.Stack,{sx:{alignItems:"center"},children:e.jsx(t.Pagination,{count:u.totalPages,page:u.currentPage,onChange:(e,t)=>u.onPageChange(t),...u.className&&{className:u.className},variant:"outlined",shape:"rounded"})})]}):null}},Object.fromEntries(Object.entries(Is).map(([e,t])=>[e,n.createElement(t,{key:e})])));var Is;exports.ListUsers=Ms;
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@mui/icons-material"),n=require("@mui/material"),r=require("react"),i=require("@mui/material/useMediaQuery"),s=require("@mui/material/styles");class a extends Error{}class o extends a{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class l extends a{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class u extends a{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class c extends a{}class d extends a{constructor(e){super(`Invalid unit ${e}`)}}class h extends a{}class m extends a{constructor(){super("Zone is an abstract class")}}const f="numeric",y="short",g="long",p={year:f,month:f,day:f},b={year:f,month:y,day:f},w={year:f,month:y,day:f,weekday:y},v={year:f,month:g,day:f},k={year:f,month:g,day:f,weekday:g},x={hour:f,minute:f},S={hour:f,minute:f,second:f},T={hour:f,minute:f,second:f,timeZoneName:y},M={hour:f,minute:f,second:f,timeZoneName:g},O={hour:f,minute:f,hourCycle:"h23"},C={hour:f,minute:f,second:f,hourCycle:"h23"},N={hour:f,minute:f,second:f,hourCycle:"h23",timeZoneName:y},I={hour:f,minute:f,second:f,hourCycle:"h23",timeZoneName:g},D={year:f,month:f,day:f,hour:f,minute:f},j={year:f,month:f,day:f,hour:f,minute:f,second:f},A={year:f,month:y,day:f,hour:f,minute:f},E={year:f,month:y,day:f,hour:f,minute:f,second:f},V={year:f,month:y,day:f,weekday:y,hour:f,minute:f},F={year:f,month:g,day:f,hour:f,minute:f,timeZoneName:y},L={year:f,month:g,day:f,hour:f,minute:f,second:f,timeZoneName:y},$={year:f,month:g,day:f,weekday:g,hour:f,minute:f,timeZoneName:g},W={year:f,month:g,day:f,weekday:g,hour:f,minute:f,second:f,timeZoneName:g};class z{get type(){throw new m}get name(){throw new m}get ianaName(){return this.name}get isUniversal(){throw new m}offsetName(e,t){throw new m}formatOffset(e,t){throw new m}offset(e){throw new m}equals(e){throw new m}get isValid(){throw new m}}let R=null;class Z extends z{static get instance(){return null===R&&(R=new Z),R}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ot(e,t,n)}formatOffset(e,t){return dt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const P=new Map,B={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},q=new Map;class U extends z{static create(e){let t=q.get(e);return void 0===t&&q.set(e,t=new U(e)),t}static resetCache(){q.clear(),P.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=U.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ot(e,t,n,this.name)}formatOffset(e,t){return dt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=P.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),P.set(e,t)),t}(this.name);let[r,i,s,a,o,l,u]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const{type:t,value:i}=n[e],s=B[t];"era"===t?r[s]=i:Re(s)||(r[s]=parseInt(i,10))}return r}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,s,a,o,l,u,c]=r;return[a,i,s,o,l,u,c]}(n,t);"BC"===a&&(r=1-Math.abs(r));let c=+t;const d=c%1e3;return c-=d>=0?d:1e3+d,(rt({year:r,month:i,day:s,hour:24===o?0:o,minute:l,second:u,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let H={};const _=new Map;function Y(e,t={}){const n=JSON.stringify([e,t]);let r=_.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),_.set(n,r)),r}const J=new Map,G=new Map;let Q=null;const K=new Map;function X(e){let t=K.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),K.set(e,t)),t}const ee=new Map;function te(e,t,n,r){const i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class ne{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...s}=n;if(!t||Object.keys(s).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=J.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),J.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Je(this.floor?Math.floor(e):Xe(e,3),this.padTo)}}class re{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&U.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=Y(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class ie{constructor(e,t,n){this.opts={style:"long",...n},!t&&Be()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,i=JSON.stringify([e,r]);let s=G.get(i);return void 0===s&&(s=new Intl.RelativeTimeFormat(e,t),G.set(i,s)),s}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&s){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case-1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,u=i[e],c=r?l?u[1]:u[2]||u[1]:l?i[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const se={firstDay:1,minimalDays:4,weekend:[6,7]};class ae{static fromOpts(e){return ae.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){const s=e||Te.defaultLocale,a=s||(i?"en-US":Q||(Q=(new Intl.DateTimeFormat).resolvedOptions().locale,Q)),o=t||Te.defaultNumberingSystem,l=n||Te.defaultOutputCalendar,u=_e(r)||Te.defaultWeekSettings;return new ae(a,o,l,u,s)}static resetCache(){Q=null,_.clear(),J.clear(),G.clear(),K.clear(),ee.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return ae.create(e,t,n,r)}constructor(e,t,n,r,i){const[s,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=Y(e).resolvedOptions(),r=e}catch(i){const s=e.substring(0,n);t=Y(s).resolvedOptions(),r=s}const{numberingSystem:i,calendar:s}=t;return[r,i,s]}}(e);this.locale=s,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===X(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ae.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,_e(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return te(this,e,gt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[i][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=wr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return te(this,e,vt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=wr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return te(this,void 0,()=>kt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[wr.utc(2016,11,13,9),wr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return te(this,e,Mt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[wr.utc(-40,1,1),wr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new ne(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new re(e,this.intl,t)}relFormatter(e={}){return new ie(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=H[n];return r||(r=new Intl.ListFormat(e,t),H[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||X(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:qe()?function(e){let t=ee.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...se,...t}),ee.set(e,t)}return t}(this.locale):se}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let oe=null;class le extends z{static get utcInstance(){return null===oe&&(oe=new le(0)),oe}static instance(e){return 0===e?le.utcInstance:new le(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new le(lt(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${dt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${dt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return dt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ue extends z{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ce(e,t){if(Re(e)||null===e)return t;if(e instanceof z)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?Z.instance:"utc"===n||"gmt"===n?le.utcInstance:le.parseSpecifier(n)||U.create(e)}return Ze(e)?le.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ue(e)}const de={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},he={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},me=de.hanidec.replace(/[\[|\]]/g,"").split(""),fe=new Map;function ye({numberingSystem:e},t=""){const n=e||"latn";let r=fe.get(n);void 0===r&&(r=new Map,fe.set(n,r));let i=r.get(t);return void 0===i&&(i=new RegExp(`${de[n]}${t}`),r.set(t,i)),i}let ge,pe=()=>Date.now(),be="system",we=null,ve=null,ke=null,xe=60,Se=null;class Te{static get now(){return pe}static set now(e){pe=e}static set defaultZone(e){be=e}static get defaultZone(){return ce(be,Z.instance)}static get defaultLocale(){return we}static set defaultLocale(e){we=e}static get defaultNumberingSystem(){return ve}static set defaultNumberingSystem(e){ve=e}static get defaultOutputCalendar(){return ke}static set defaultOutputCalendar(e){ke=e}static get defaultWeekSettings(){return Se}static set defaultWeekSettings(e){Se=_e(e)}static get twoDigitCutoffYear(){return xe}static set twoDigitCutoffYear(e){xe=e%100}static get throwOnInvalid(){return ge}static set throwOnInvalid(e){ge=e}static resetCaches(){ae.resetCache(),U.resetCache(),wr.resetCache(),fe.clear()}}class Me{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Oe=[0,31,59,90,120,151,181,212,243,273,304,334],Ce=[0,31,60,91,121,152,182,213,244,274,305,335];function Ne(e,t){return new Me("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Ie(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return 0===i?7:i}function De(e,t,n){return n+(et(e)?Ce:Oe)[t-1]}function je(e,t){const n=et(e)?Ce:Oe,r=n.findIndex(e=>e<t);return{month:r+1,day:t-n[r]}}function Ae(e,t){return(e-t+7)%7+1}function Ee(e,t=4,n=1){const{year:r,month:i,day:s}=e,a=De(r,i,s),o=Ae(Ie(r,i,s),n);let l,u=Math.floor((a-o+14-t)/7);return u<1?(l=r-1,u=st(l,t,n)):u>st(r,t,n)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:o,...ht(e)}}function Ve(e,t=4,n=1){const{weekYear:r,weekNumber:i,weekday:s}=e,a=Ae(Ie(r,1,t),n),o=tt(r);let l,u=7*i+s-a-7+t;u<1?(l=r-1,u+=tt(l)):u>o?(l=r+1,u-=tt(r)):l=r;const{month:c,day:d}=je(l,u);return{year:l,month:c,day:d,...ht(e)}}function Fe(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:De(t,n,r),...ht(e)}}function Le(e){const{year:t,ordinal:n}=e,{month:r,day:i}=je(t,n);return{year:t,month:r,day:i,...ht(e)}}function $e(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new c("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function We(e){const t=Pe(e.year),n=Ye(e.month,1,12),r=Ye(e.day,1,nt(e.year,e.month));return t?n?!r&&Ne("day",e.day):Ne("month",e.month):Ne("year",e.year)}function ze(e){const{hour:t,minute:n,second:r,millisecond:i}=e,s=Ye(t,0,23)||24===t&&0===n&&0===r&&0===i,a=Ye(n,0,59),o=Ye(r,0,59),l=Ye(i,0,999);return s?a?o?!l&&Ne("millisecond",i):Ne("second",r):Ne("minute",n):Ne("hour",t)}function Re(e){return void 0===e}function Ze(e){return"number"==typeof e}function Pe(e){return"number"==typeof e&&e%1==0}function Be(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function qe(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ue(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function He(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _e(e){if(null==e)return null;if("object"!=typeof e)throw new h("Week settings must be an object");if(!Ye(e.firstDay,1,7)||!Ye(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Ye(e,1,7)))throw new h("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ye(e,t,n){return Pe(e)&&e>=t&&e<=n}function Je(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Ge(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function Qe(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function Ke(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Xe(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function et(e){return e%4==0&&(e%100!=0||e%400==0)}function tt(e){return et(e)?366:365}function nt(e,t){const n=(r=t-1)-12*Math.floor(r/12)+1;var r;return 2===n?et(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function rt(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function it(e,t,n){return-Ae(Ie(e,1,t),n)+t-1}function st(e,t=4,n=1){const r=it(e,t,n),i=it(e+1,t,n);return(tt(e)-r+i)/7}function at(e){return e>99?e:e>Te.twoDigitCutoffYear?1900+e:2e3+e}function ot(e,t,n,r=null){const i=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const a={timeZoneName:t,...s},o=new Intl.DateTimeFormat(n,a).formatToParts(i).find(e=>"timezonename"===e.type.toLowerCase());return o?o.value:null}function lt(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function ut(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new h(`Invalid unit value ${e}`);return t}function ct(e,t){const n={};for(const r in e)if(He(e,r)){const i=e[r];if(null==i)continue;n[t(r)]=ut(i)}return n}function dt(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${Je(n,2)}:${Je(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${Je(n,2)}${Je(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ht(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}(e)}const mt=["January","February","March","April","May","June","July","August","September","October","November","December"],ft=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yt=["J","F","M","A","M","J","J","A","S","O","N","D"];function gt(e){switch(e){case"narrow":return[...yt];case"short":return[...ft];case"long":return[...mt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const pt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],bt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],wt=["M","T","W","T","F","S","S"];function vt(e){switch(e){case"narrow":return[...wt];case"short":return[...bt];case"long":return[...pt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const kt=["AM","PM"],xt=["Before Christ","Anno Domini"],St=["BC","AD"],Tt=["B","A"];function Mt(e){switch(e){case"narrow":return[...Tt];case"short":return[...St];case"long":return[...xt];default:return null}}function Ot(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Ct={D:p,DD:b,DDD:v,DDDD:k,t:x,tt:S,ttt:T,tttt:M,T:O,TT:C,TTT:N,TTTT:I,f:D,ff:A,fff:F,ffff:$,F:j,FF:E,FFF:L,FFFF:W};class Nt{static create(e,t={}){return new Nt(e,t)}static parseFormat(e){let t=null,n="",r=!1;const i=[];for(let s=0;s<e.length;s++){const a=e.charAt(s);"'"===a?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return Ct[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return Je(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),s=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=(t,r)=>n?function(e,t){return gt(t)[e.month-1]}(e,t):i(r?{month:t}:{month:t,day:"numeric"},"month"),o=(t,r)=>n?function(e,t){return vt(t)[e.weekday-1]}(e,t):i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=Nt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},u=t=>n?function(e,t){return Mt(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return Ot(Nt.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return kt[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return o("short",!0);case"cccc":return o("long",!0);case"ccccc":return o("narrow",!0);case"EEE":return o("short",!1);case"EEEE":return o("long",!1);case"EEEEE":return o("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},i=Nt.parseFormat(t),s=i.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),a=e.shiftTo(...s.map(r).filter(e=>e));return Ot(i,((e,t)=>i=>{const s=r(i);if(s){const r=t.isNegativeDuration&&s!==t.largestUnit?n:1;let a;return a="negativeLargestOnly"===this.opts.signMode&&s!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(s)*r,i.length,a)}return i})(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}}const It=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Dt(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function jt(...e){return t=>e.reduce(([e,n,r],i)=>{const[s,a,o]=i(t,r);return[{...e,...s},a||n,o]},[{},null,1]).slice(0,2)}function At(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function Et(...e){return(t,n)=>{const r={};let i;for(i=0;i<e.length;i++)r[e[i]]=Ge(t[n+i]);return[r,null,n+i]}}const Vt=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Ft=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Lt=RegExp(`${Ft.source}(?:${Vt.source}?(?:\\[(${It.source})\\])?)?`),$t=RegExp(`(?:[Tt]${Lt.source})?`),Wt=Et("weekYear","weekNumber","weekDay"),zt=Et("year","ordinal"),Rt=RegExp(`${Ft.source} ?(?:${Vt.source}|(${It.source}))?`),Zt=RegExp(`(?: ${Rt.source})?`);function Pt(e,t,n){const r=e[t];return Re(r)?n:Ge(r)}function Bt(e,t){return[{hours:Pt(e,t,0),minutes:Pt(e,t+1,0),seconds:Pt(e,t+2,0),milliseconds:Ke(e[t+3])},null,t+4]}function qt(e,t){const n=!e[t]&&!e[t+1],r=lt(e[t+1],e[t+2]);return[{},n?null:le.instance(r),t+3]}function Ut(e,t){return[{},e[t]?U.create(e[t]):null,t+1]}const Ht=RegExp(`^T?${Ft.source}$`),_t=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Yt(e){const[t,n,r,i,s,a,o,l,u]=e,c="-"===t[0],d=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:h(Qe(n)),months:h(Qe(r)),weeks:h(Qe(i)),days:h(Qe(s)),hours:h(Qe(a)),minutes:h(Qe(o)),seconds:h(Qe(l),"-0"===l),milliseconds:h(Ke(u),d)}]}const Jt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Gt(e,t,n,r,i,s,a){const o={year:2===t.length?at(Ge(t)):Ge(t),month:ft.indexOf(n)+1,day:Ge(r),hour:Ge(i),minute:Ge(s)};return a&&(o.second=Ge(a)),e&&(o.weekday=e.length>3?pt.indexOf(e)+1:bt.indexOf(e)+1),o}const Qt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Kt(e){const[,t,n,r,i,s,a,o,l,u,c,d]=e,h=Gt(t,i,r,n,s,a,o);let m;return m=l?Jt[l]:u?0:lt(c,d),[h,new le(m)]}const Xt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,en=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,tn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function nn(e){const[,t,n,r,i,s,a,o]=e;return[Gt(t,i,r,n,s,a,o),le.utcInstance]}function rn(e){const[,t,n,r,i,s,a,o]=e;return[Gt(t,o,n,r,i,s,a),le.utcInstance]}const sn=Dt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,$t),an=Dt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,$t),on=Dt(/(\d{4})-?(\d{3})/,$t),ln=Dt(Lt),un=jt(function(e,t){return[{year:Pt(e,t),month:Pt(e,t+1,1),day:Pt(e,t+2,1)},null,t+3]},Bt,qt,Ut),cn=jt(Wt,Bt,qt,Ut),dn=jt(zt,Bt,qt,Ut),hn=jt(Bt,qt,Ut),mn=jt(Bt),fn=Dt(/(\d{4})-(\d\d)-(\d\d)/,Zt),yn=Dt(Rt),gn=jt(Bt,qt,Ut),pn="Invalid Duration",bn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},wn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...bn},vn={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...bn},kn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],xn=kn.slice(0).reverse();function Sn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Cn(r)}function Tn(e,t){let n=t.milliseconds??0;for(const r of xn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Mn(e,t){const n=Tn(e,t)<0?-1:1;kn.reduceRight((r,i)=>{if(Re(t[i]))return r;if(r){const s=t[r]*n,a=e[i][r],o=Math.floor(s/a);t[i]+=o*n,t[r]-=o*a*n}return i},null),kn.reduce((n,r)=>{if(Re(t[r]))return n;if(n){const i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function On(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class Cn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?vn:wn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ae.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Cn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new h("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Cn({values:ct(e,Cn.normalizeUnit),loc:ae.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ze(e))return Cn.fromMillis(e);if(Cn.isDuration(e))return e;if("object"==typeof e)return Cn.fromObject(e);throw new h(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return At(e,[_t,Yt])}(e);return n?Cn.fromObject(n,t):Cn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return At(e,[Ht,mn])}(e);return n?Cn.fromObject(n,t):Cn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new h("need to specify a reason the Duration is invalid");const n=e instanceof Me?e:new Me(e,t);if(Te.throwOnInvalid)throw new u(n);return new Cn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new d(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Nt.create(this.loc,n).formatDurationFromString(this,e):pn}toHuman(e={}){if(!this.isValid)return pn;const t=!1!==e.showZeros,n=kn.map(n=>{const r=this.values[n];return Re(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Xe(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},wr.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Tn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Cn.fromDurationLike(e),n={};for(const e of kn)(He(t.values,e)||He(this.values,e))&&(n[e]=t.get(e)+this.get(e));return Sn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Cn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=ut(e(this.values[n],n));return Sn(this,{values:t},!0)}get(e){return this[Cn.normalizeUnit(e)]}set(e){return this.isValid?Sn(this,{values:{...this.values,...ct(e,Cn.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return Sn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Mn(this.matrix,e),Sn(this,{values:e},!0)}rescale(){return this.isValid?Sn(this,{values:On(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>Cn.normalizeUnit(e));const t={},n={},r=this.toObject();let i;for(const s of kn)if(e.indexOf(s)>=0){i=s;let e=0;for(const t in n)e+=this.matrix[t][s]*n[t],n[t]=0;Ze(r[s])&&(e+=r[s]);const a=Math.trunc(e);t[s]=a,n[s]=(1e3*e-1e3*a)/1e3}else Ze(r[s])&&(n[s]=r[s]);for(const e in n)0!==n[e]&&(t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]);return Mn(this.matrix,t),Sn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Sn(this,{values:e},!0)}removeZeros(){return this.isValid?Sn(this,{values:On(this.values)},!0):this}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of kn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Nn="Invalid Interval";class In{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new h("need to specify a reason the Interval is invalid");const n=e instanceof Me?e:new Me(e,t);if(Te.throwOnInvalid)throw new l(n);return new In({invalid:n})}static fromDateTimes(e,t){const n=vr(e),r=vr(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?In.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:In.invalid("missing or invalid end"):In.invalid("missing or invalid start")}(n,r);return null==i?new In({start:n,end:r}):i}static after(e,t){const n=Cn.fromDurationLike(t),r=vr(e);return In.fromDateTimes(r,r.plus(n))}static before(e,t){const n=Cn.fromDurationLike(t),r=vr(e);return In.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,i,s,a;try{e=wr.fromISO(n,t),i=e.isValid}catch(r){i=!1}try{s=wr.fromISO(r,t),a=s.isValid}catch(r){a=!1}if(i&&a)return In.fromDateTimes(e,s);if(i){const n=Cn.fromISO(r,t);if(n.isValid)return In.after(e,n)}else if(a){const e=Cn.fromISO(n,t);if(e.isValid)return In.before(s,e)}}return In.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?In.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(vr).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,i=0;for(;r<this.e;){const e=t[i]||this.e,s=+e>+this.e?this.e:e;n.push(In.fromDateTimes(r,s)),r=s,i+=1}return n}splitBy(e){const t=Cn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,i=1;const s=[];for(;r<this.e;){const e=this.start.plus(t.mapUnits(e=>e*i));n=+e>+this.e?this.e:e,s.push(In.fromDateTimes(r,n)),r=n,i+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:In.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return In.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],i=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),s=Array.prototype.concat(...i).sort((e,t)=>e.time-t.time);for(const e of s)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(In.fromDateTimes(t,e.time)),t=null);return In.merge(r)}difference(...e){return In.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Nn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=p,t={}){return this.isValid?Nt.create(this.s.loc.clone(t),e).formatInterval(this):Nn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Nn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Nn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Nn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Nn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Cn.invalid(this.invalidReason)}mapEndpoints(e){return In.fromDateTimes(e(this.s),e(this.e))}}class Dn{static hasDST(e=Te.defaultZone){const t=wr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return U.isValidZone(e)}static normalizeZone(e){return ce(e,Te.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ae.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ae.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ae.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ae.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ae.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ae.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ae.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ae.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ae.create(t,null,"gregory").eras(e)}static features(){return{relative:Be(),localeWeek:qe()}}}function jn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Cn.fromMillis(r).as("days"))}function An(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(-1!==e[n].search(de.hanidec))t+=me.indexOf(e[n]);else for(const e in he){const[n,i]=he[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const En=`[ ${String.fromCharCode(160)}]`,Vn=new RegExp(En,"g");function Fn(e){return e.replace(/\./g,"\\.?").replace(Vn,En)}function Ln(e){return e.replace(/\./g,"").replace(Vn," ").toLowerCase()}function $n(e,t){return null===e?null:{regex:RegExp(e.map(Fn).join("|")),deser:([n])=>e.findIndex(e=>Ln(n)===Ln(e))+t}}function Wn(e,t){return{regex:e,deser:([,e,t])=>lt(e,t),groups:t}}function zn(e){return{regex:e,deser:([e])=>e}}const Rn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Zn=null;function Pn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Un(Nt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Bn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Pn(Nt.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=ye(t),r=ye(t,"{2}"),i=ye(t,"{3}"),s=ye(t,"{4}"),a=ye(t,"{6}"),o=ye(t,"{1,2}"),l=ye(t,"{1,3}"),u=ye(t,"{1,6}"),c=ye(t,"{1,9}"),d=ye(t,"{2,4}"),h=ye(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return $n(t.eras("short"),0);case"GG":return $n(t.eras("long"),0);case"y":return An(u);case"yy":case"kk":return An(d,at);case"yyyy":case"kkkk":return An(s);case"yyyyy":return An(h);case"yyyyyy":return An(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return An(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return An(r);case"MMM":return $n(t.months("short",!0),1);case"MMMM":return $n(t.months("long",!0),1);case"LLL":return $n(t.months("short",!1),1);case"LLLL":return $n(t.months("long",!1),1);case"o":case"S":return An(l);case"ooo":case"SSS":return An(i);case"u":return zn(c);case"uu":return zn(o);case"uuu":case"E":case"c":return An(n);case"a":return $n(t.meridiems(),0);case"EEE":return $n(t.weekdays("short",!1),1);case"EEEE":return $n(t.weekdays("long",!1),1);case"ccc":return $n(t.weekdays("short",!0),1);case"cccc":return $n(t.weekdays("long",!0),1);case"Z":case"ZZ":return Wn(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return Wn(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return zn(/[a-z_+-/]{1,256}?/i);case" ":return zn(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const i in n)if(He(n,i)){const s=n[i],a=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,i,s]=n?function(e){let t,n=null;return Re(e.z)||(n=U.create(e.z)),Re(e.Z)||(n||(n=new le(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Re(e.u)||(e.S=Ke(e.u)),[Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(He(n,"a")&&He(n,"H"))throw new c("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:s}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function qn(e,t,n){return new Bn(e,n).explainFromTokens(t)}function Un(e,t){if(!e)return null;const n=Nt.create(t,e).dtFormatter((Zn||(Zn=wr.fromMillis(1555555555555)),Zn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:i}=e;if("literal"===r){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const s=t[r];let a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=Rn[a];if("object"==typeof o&&(o=o[s]),o)return{literal:!1,val:o}}(t,e,i))}const Hn="Invalid DateTime",_n=864e13;function Yn(e){return new Me("unsupported zone",`the zone "${e.name}" is not supported`)}function Jn(e){return null===e.weekData&&(e.weekData=Ee(e.c)),e.weekData}function Gn(e){return null===e.localWeekData&&(e.localWeekData=Ee(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Qn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new wr({...n,...t,old:n})}function Kn(e,t,n){let r=e-60*t*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;const s=n.offset(r);return i===s?[r,i]:[e-60*Math.min(i,s)*1e3,Math.max(i,s)]}function Xn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function er(e,t,n){return Kn(rt(e),t,n)}function tr(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:r,month:i,day:Math.min(e.c.day,nt(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=Cn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=rt(s);let[l,u]=Kn(o,n,e.zone);return 0!==a&&(l+=a,u=e.zone.offset(l)),{ts:l,o:u}}function nr(e,t,n,r,i,s){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const r=t||o,i=wr.fromObject(e,{...n,zone:r,specificOffset:s});return a?i:i.setZone(o)}return wr.invalid(new Me("unparsable",`the input "${i}" can't be parsed as ${r}`))}function rr(e,t,n=!0){return e.isValid?Nt.create(ae.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ir(e,t,n){const r=e.c.year>9999||e.c.year<0;let i="";if(r&&e.c.year>=0&&(i+="+"),i+=Je(e.c.year,r?6:4),"year"===n)return i;if(t){if(i+="-",i+=Je(e.c.month),"month"===n)return i;i+="-"}else if(i+=Je(e.c.month),"month"===n)return i;return i+=Je(e.c.day),i}function sr(e,t,n,r,i,s,a){let o=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(a){case"day":case"month":case"year":break;default:if(l+=Je(e.c.hour),"hour"===a)break;if(t){if(l+=":",l+=Je(e.c.minute),"minute"===a)break;o&&(l+=":",l+=Je(e.c.second))}else{if(l+=Je(e.c.minute),"minute"===a)break;o&&(l+=Je(e.c.second))}if("second"===a)break;!o||r&&0===e.c.millisecond||(l+=".",l+=Je(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&0===e.offset&&!s?l+="Z":e.o<0?(l+="-",l+=Je(Math.trunc(-e.o/60)),l+=":",l+=Je(Math.trunc(-e.o%60))):(l+="+",l+=Je(Math.trunc(e.o/60)),l+=":",l+=Je(Math.trunc(e.o%60)))),s&&(l+="["+e.zone.ianaName+"]"),l}const ar={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},or={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},lr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ur=["year","month","day","hour","minute","second","millisecond"],cr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],dr=["year","ordinal","hour","minute","second","millisecond"];function hr(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new d(e);return t}function mr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hr(e)}}function fr(e,t){const n=ce(t.zone,Te.defaultZone);if(!n.isValid)return wr.invalid(Yn(n));const r=ae.fromObject(t);let i,s;if(Re(e.year))i=Te.now();else{for(const t of ur)Re(e[t])&&(e[t]=ar[t]);const t=We(e)||ze(e);if(t)return wr.invalid(t);const r=function(e){if(void 0===pr&&(pr=Te.now()),"iana"!==e.type)return e.offset(pr);const t=e.name;let n=br.get(t);return void 0===n&&(n=e.offset(pr),br.set(t,n)),n}(n);[i,s]=er(e,r,n)}return new wr({ts:i,zone:n,loc:r,o:s})}function yr(e,t,n){const r=!!Re(n.round)||n.round,i=Re(n.rounding)?"trunc":n.rounding,s=(e,s)=>(e=Xe(e,r||n.calendary?0:2,n.calendary?"round":i),t.loc.clone(n).relFormatter(n).format(e,s)),a=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return s(a(n.unit),n.unit);for(const e of n.units){const t=a(e);if(Math.abs(t)>=1)return s(t,e)}return s(e>t?-0:0,n.units[n.units.length-1])}function gr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let pr;const br=new Map;class wr{constructor(e){const t=e.zone||Te.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Me("invalid input"):null)||(t.isValid?null:Yn(t));this.ts=Re(e.ts)?Te.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const s=Ze(e.o)&&!e.old?e.o:t.offset(this.ts);r=Xn(this.ts,s),n=Number.isNaN(r.year)?new Me("invalid input"):null,r=n?null:r,i=n?null:s}this._zone=t,this.loc=e.loc||ae.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new wr({})}static local(){const[e,t]=gr(arguments),[n,r,i,s,a,o,l]=t;return fr({year:n,month:r,day:i,hour:s,minute:a,second:o,millisecond:l},e)}static utc(){const[e,t]=gr(arguments),[n,r,i,s,a,o,l]=t;return e.zone=le.utcInstance,fr({year:n,month:r,day:i,hour:s,minute:a,second:o,millisecond:l},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return wr.invalid("invalid input");const i=ce(t.zone,Te.defaultZone);return i.isValid?new wr({ts:n,zone:i,loc:ae.fromObject(t)}):wr.invalid(Yn(i))}static fromMillis(e,t={}){if(Ze(e))return e<-_n||e>_n?wr.invalid("Timestamp out of range"):new wr({ts:e,zone:ce(t.zone,Te.defaultZone),loc:ae.fromObject(t)});throw new h(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ze(e))return new wr({ts:1e3*e,zone:ce(t.zone,Te.defaultZone),loc:ae.fromObject(t)});throw new h("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=ce(t.zone,Te.defaultZone);if(!n.isValid)return wr.invalid(Yn(n));const r=ae.fromObject(t),i=ct(e,mr),{minDaysInFirstWeek:s,startOfWeek:a}=$e(i,r),o=Te.now(),l=Re(t.specificOffset)?n.offset(o):t.specificOffset,u=!Re(i.ordinal),d=!Re(i.year),h=!Re(i.month)||!Re(i.day),m=d||h,f=i.weekYear||i.weekNumber;if((m||u)&&f)throw new c("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new c("Can't mix ordinal dates with month/day");const y=f||i.weekday&&!m;let g,p,b=Xn(o,l);y?(g=cr,p=or,b=Ee(b,s,a)):u?(g=dr,p=lr,b=Fe(b)):(g=ur,p=ar);let w=!1;for(const e of g)Re(i[e])?i[e]=w?p[e]:b[e]:w=!0;const v=y?function(e,t=4,n=1){const r=Pe(e.weekYear),i=Ye(e.weekNumber,1,st(e.weekYear,t,n)),s=Ye(e.weekday,1,7);return r?i?!s&&Ne("weekday",e.weekday):Ne("week",e.weekNumber):Ne("weekYear",e.weekYear)}(i,s,a):u?function(e){const t=Pe(e.year),n=Ye(e.ordinal,1,tt(e.year));return t?!n&&Ne("ordinal",e.ordinal):Ne("year",e.year)}(i):We(i),k=v||ze(i);if(k)return wr.invalid(k);const x=y?Ve(i,s,a):u?Le(i):i,[S,T]=er(x,l,n),M=new wr({ts:S,zone:n,o:T,loc:r});return i.weekday&&m&&e.weekday!==M.weekday?wr.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${M.toISO()}`):M.isValid?M:wr.invalid(M.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return At(e,[sn,un],[an,cn],[on,dn],[ln,hn])}(e);return nr(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return At(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Qt,Kt])}(e);return nr(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return At(e,[Xt,nn],[en,nn],[tn,rn])}(e);return nr(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Re(e)||Re(t))throw new h("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=n,s=ae.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[a,o,l,u]=function(e,t,n){const{result:r,zone:i,specificOffset:s,invalidReason:a}=qn(e,t,n);return[r,i,s,a]}(s,e,t);return u?wr.invalid(u):nr(a,o,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return wr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return At(e,[fn,un],[yn,gn])}(e);return nr(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new h("need to specify a reason the DateTime is invalid");const n=e instanceof Me?e:new Me(e,t);if(Te.throwOnInvalid)throw new o(n);return new wr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Un(e,ae.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Pn(Nt.parseFormat(e),ae.fromObject(t)).map(e=>e.val).join("")}static resetCache(){pr=void 0,br.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Jn(this).weekYear:NaN}get weekNumber(){return this.isValid?Jn(this).weekNumber:NaN}get weekday(){return this.isValid?Jn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Gn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Gn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Gn(this).weekYear:NaN}get ordinal(){return this.isValid?Fe(this.c).ordinal:NaN}get monthShort(){return this.isValid?Dn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Dn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Dn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Dn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=rt(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),s=this.zone.offset(n-r*t),a=this.zone.offset(n-i*t);if(s===a)return[this];const o=n-s*t,l=n-a*t,u=Xn(o,s),c=Xn(l,a);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[Qn(this,{ts:o}),Qn(this,{ts:l})]:[this]}get isInLeapYear(){return et(this.year)}get daysInMonth(){return nt(this.year,this.month)}get daysInYear(){return this.isValid?tt(this.year):NaN}get weeksInWeekYear(){return this.isValid?st(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?st(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Nt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(le.instance(e),t)}toLocal(){return this.setZone(Te.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=ce(e,Te.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=er(n,t,e)}return Qn(this,{ts:r,zone:e})}return wr.invalid(Yn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Qn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ct(e,mr),{minDaysInFirstWeek:n,startOfWeek:r}=$e(t,this.loc),i=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),s=!Re(t.ordinal),a=!Re(t.year),o=!Re(t.month)||!Re(t.day),l=a||o,u=t.weekYear||t.weekNumber;if((l||s)&&u)throw new c("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new c("Can't mix ordinal dates with month/day");let d;i?d=Ve({...Ee(this.c,n,r),...t},n,r):Re(t.ordinal)?(d={...this.toObject(),...t},Re(t.day)&&(d.day=Math.min(nt(d.year,d.month),d.day))):d=Le({...Fe(this.c),...t});const[h,m]=er(d,this.o,this.zone);return Qn(this,{ts:h,o:m})}plus(e){return this.isValid?Qn(this,tr(this,Cn.fromDurationLike(e))):this}minus(e){return this.isValid?Qn(this,tr(this,Cn.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=Cn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===r){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Nt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Hn}toLocaleString(e=p,t={}){return this.isValid?Nt.create(this.loc.clone(t),e).formatDateTime(this):Hn}toLocaleParts(e={}){return this.isValid?Nt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;const a="extended"===e;let o=ir(this,a,s=hr(s));return ur.indexOf(s)>=3&&(o+="T"),o+=sr(this,a,t,n,r,i,s),o}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?ir(this,"extended"===e,hr(t)):null}toISOWeekDate(){return rr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:s="extended",precision:a="milliseconds"}={}){return this.isValid?(a=hr(a),(r&&ur.indexOf(a)>=3?"T":"")+sr(this,"extended"===s,t,e,n,i,a)):null}toRFC2822(){return rr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return rr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ir(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),rr(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Hn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return Cn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=(o=t,Array.isArray(o)?o:[o]).map(Cn.normalizeUnit),s=e.valueOf()>this.valueOf(),a=function(e,t,n,r){let[i,s,a,o]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=jn(e,t);return(n-n%7)/7}],["days",jn]],i={},s=e;let a,o;for(const[l,u]of r)n.indexOf(l)>=0&&(a=l,i[l]=u(e,t),o=s.plus(i),o>t?(i[l]--,(e=s.plus(i))>t&&(o=e,i[l]--,e=s.plus(i))):e=o);return[e,i,o,a]}(e,t,n);const l=t-i,u=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===u.length&&(a<t&&(a=i.plus({[o]:1})),a!==i&&(s[o]=(s[o]||0)+l/(a-i)));const c=Cn.fromObject(s,r);return u.length>0?Cn.fromMillis(l,r).shiftTo(...u).plus(c):c}(s?this:e,s?e:this,i,r);var o;return s?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(wr.now(),e,t)}until(e){return this.isValid?In.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||wr.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),yr(t,this.plus(n),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?yr(e.base||wr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(wr.isDateTime))throw new h("min requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(wr.isDateTime))throw new h("max requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:i=null}=n;return qn(ae.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return wr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,i=ae.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Bn(i,e)}static fromFormatParser(e,t,n={}){if(Re(e)||Re(t))throw new h("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=n,s=ae.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!s.equals(t.locale))throw new h(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:l,invalidReason:u}=t.explainFromTokens(e);return u?wr.invalid(u):nr(a,o,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return p}static get DATE_MED(){return b}static get DATE_MED_WITH_WEEKDAY(){return w}static get DATE_FULL(){return v}static get DATE_HUGE(){return k}static get TIME_SIMPLE(){return x}static get TIME_WITH_SECONDS(){return S}static get TIME_WITH_SHORT_OFFSET(){return T}static get TIME_WITH_LONG_OFFSET(){return M}static get TIME_24_SIMPLE(){return O}static get TIME_24_WITH_SECONDS(){return C}static get TIME_24_WITH_SHORT_OFFSET(){return N}static get TIME_24_WITH_LONG_OFFSET(){return I}static get DATETIME_SHORT(){return D}static get DATETIME_SHORT_WITH_SECONDS(){return j}static get DATETIME_MED(){return A}static get DATETIME_MED_WITH_SECONDS(){return E}static get DATETIME_MED_WITH_WEEKDAY(){return V}static get DATETIME_FULL(){return F}static get DATETIME_FULL_WITH_SECONDS(){return L}static get DATETIME_HUGE(){return $}static get DATETIME_HUGE_WITH_SECONDS(){return W}}function vr(e){if(wr.isDateTime(e))return e;if(e&&e.valueOf&&Ze(e.valueOf()))return wr.fromJSDate(e);if(e&&"object"==typeof e)return wr.fromObject(e);throw new h(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const kr=r.createContext(void 0),xr=({children:t,...n})=>e.jsx(kr.Provider,{value:n,children:t}),Sr=()=>{const e=r.useContext(kr);if(!e)throw new Error("useBaseTableContext must be used within a BaseTableProvider");return e};function Tr(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,r.createElement(t,{key:e})]))}function Mr({blocksOverride:e,defaultBlocks:t,defaultBlockOrder:n,children:r}){if(void 0===e)return r({blocks:t,blockOrder:n});if("function"==typeof e){const{blocks:i,blockOrder:s}=e({defaultBlocks:t,defaultBlockOrder:n});return r({blocks:i,blockOrder:s})}return e}function Or(e,t){const n={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Cr(...e){return e.flat().filter(Boolean).join(" ")}function Nr(e,...t){const n={...e};for(const e of t)delete n[e];return n}const Ir=["isLoading","headerTitle","headerActions","searchChipsTitle","searchChips","onSearchChipDelete","tabs","activeTab","onTabChange","columns","rows","actionColumn","rowActions","pagination","noRowsOverlay","onRowClick","getRowId"];function Dr(t,i,s){const a=i[t.field],o={row:i,rowIndex:s,column:t};if(t.renderCell)return t.renderCell(a,o);const l=t.valueFormatter?t.valueFormatter(a,o):a;return e.jsx(n.Typography,{variant:"body2",children:(u=l,null==u?"":"string"==typeof u||"number"==typeof u||"boolean"==typeof u?String(u):r.isValidElement(u)?u:"")});var u}function jr(e){return e.width??180}function Ar(e,t){return e?.pin?{position:"sticky",..."left"===e.pin?{left:e.left??0}:{right:e.right??0},zIndex:t?12:4,isolation:"isolate",...t?{backgroundColor:"common.white",backgroundImage:"none",backgroundClip:"padding-box",opacity:1,"&::before":{content:'""',position:"absolute",inset:0,zIndex:-1,backgroundColor:e=>e.palette.common.white}}:{},...t?{}:{backgroundColor:"inherit"},...e.isLeftBoundary?{borderRight:e=>`1px solid ${e.palette.divider}`}:{},...e.isRightBoundary?{borderLeft:e=>`1px solid ${e.palette.divider}`}:{}}:{}}function Er(e,t,n){const r="left"===e;return{position:"absolute",top:0,bottom:0,...r?{left:t}:{right:t},width:0,pointerEvents:"none",zIndex:7,"&::after":{content:'""',position:"absolute",top:0,bottom:0,...r?{left:0}:{right:0},width:8,background:r?"linear-gradient(to right, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0))":"linear-gradient(to left, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0))",opacity:n?1:0,transition:e=>e.transitions.create("opacity",{duration:160})}}}function Vr(e,t,n){return r.isValidElement(e)?r.cloneElement(e,void 0===n?t:{key:n,...t}):e}function Fr(t,n){return n.map(e=>({key:String(e),block:t[String(e)]})).filter(({block:e})=>void 0!==e).map(({key:t,block:n})=>e.jsx(r.Fragment,{children:n},t))}const Lr=t=>{const r=Sr(),{headerTitle:i}=r,{children:s,className:a,component:o="h1",variant:l="h4",...u}=t;return s||i?e.jsx(n.Typography,{component:o,variant:l,className:Cr("nbb-base-table-header-title",a),...u,children:s||i}):null},$r=t=>{const{headerActions:r}=Sr(),{children:i,className:s,sx:a=[],...o}=t;return i||r?e.jsx(n.Stack,{direction:"row",className:Cr("nbb-base-table-header-actions",s),sx:[{alignItems:"center"},...Array.isArray(a)?a:[a]],...o,children:i||r}):null},Wr=Tr({title:Lr,actions:$r}),zr=t=>{const{headerTitle:r,headerActions:i}=Sr(),{children:s,className:a,sx:o=[],...l}=t;return s||r||i?e.jsx(n.Stack,{direction:"row",className:Cr("nbb-base-table-header",a),sx:[{justifyContent:"space-between",alignItems:"center"},...Array.isArray(o)?o:[o]],...l,children:e.jsx(Mr,{defaultBlocks:Wr,defaultBlockOrder:Object.keys(Wr),blocksOverride:s,children:({blocks:e,blockOrder:t})=>Fr(e,t)})}):null},Rr=t=>{const{children:r,className:i,sx:s=[],...a}=t;return e.jsx(n.Stack,{className:Cr("nbb-base-table-content-loader",i),sx:[{alignItems:"center",justifyContent:"center",width:"100%",height:e=>e.spacing(18.25)},...Array.isArray(s)?s:[s]],...a,children:r||e.jsx(n.CircularProgress,{})})},Zr=t=>{const{tabs:r,activeTab:i,onTabChange:s}=Sr(),{children:a,className:o,value:l,onChange:u,variant:c,sx:d,tabProps:h,centered:m=!1,...f}=t,{sx:y,...g}=h??{},p=void 0===d?[]:Array.isArray(d)?d:[d],b=void 0===y?[]:Array.isArray(y)?y:[y],w=l??i,v=c??"scrollable",k=u??((e,t)=>{s?.(t)});return r&&0!==r.length&&void 0!==w?e.jsx(n.Tabs,{value:w,onChange:k,variant:v,scrollButtons:"auto",allowScrollButtonsMobile:!0,centered:m,className:Cr("nbb-base-table-tabs",o),sx:[{minHeight:44,position:"relative",width:"100%",overflow:"hidden","& .MuiTabs-scroller":{overflowX:"auto"},"& .MuiTabs-list, & .MuiTabs-flexContainer":{minWidth:"max-content",justifyContent:"flex-start",margin:0},"& .MuiTabs-scrollButtons":{position:"absolute",top:0,bottom:0,zIndex:2,width:32,backgroundColor:"background.paper",opacity:1,visibility:"visible",transition:"opacity 160ms ease, visibility 160ms ease"},"& .MuiTabs-scrollButtons:first-of-type":{left:0,borderRight:e=>`1px solid ${e.palette.divider}`},"& .MuiTabs-scrollButtons:last-of-type":{right:0,borderLeft:e=>`1px solid ${e.palette.divider}`},"& .MuiTabs-scrollButtons.Mui-disabled":{opacity:0,visibility:"hidden",pointerEvents:"none"}},...p],...f,children:a||r.map(t=>e.jsx(n.Tab,{value:t.value,...void 0!==t.disabled?{disabled:t.disabled}:{},sx:[{minHeight:44,minWidth:{xs:130,sm:182},flex:"0 0 auto",textTransform:"none"},...b],label:t.label,...g},String(t.value)))}):null},Pr=r=>{const i=Sr(),{searchChipsTitle:s,searchChips:a,onSearchChipDelete:o}=Or(i,r),{children:l,className:u,sx:c=[],...d}=r,h=a??[];return l||0!==h.length?e.jsx(n.Stack,{className:Cr("nbb-base-table-search-chips",u),sx:[{width:"100%",minWidth:0,gap:{xs:1,sm:3}},...Array.isArray(c)?c:[c]],...Nr(d,...Ir),children:l||e.jsxs(e.Fragment,{children:[s&&e.jsx(n.Typography,{sx:e=>({fontSize:{xs:e.typography.body1.fontSize,sm:e.typography.h6.fontSize},fontWeight:600}),children:s}),e.jsx(n.Stack,{direction:"row",spacing:{xs:1,sm:2},useFlexGap:!0,flexWrap:"wrap",children:h.map((r,i)=>e.jsx(n.Chip,{label:r.label,deleteIcon:e.jsx(t.CloseOutlined,{fontSize:"inherit"}),...o&&{onDelete:e=>o(r,i,e)},sx:e=>({height:"auto",borderRadius:1.5,bgcolor:e.palette.grey[50],py:e.spacing(1.25),px:{xs:e.spacing(1.5),sm:e.spacing(2)},"& .MuiChip-label":{px:0,fontSize:{xs:e.typography.body2.fontSize,sm:e.typography.body1.fontSize},lineHeight:1.75},"& .MuiChip-deleteIcon":{m:0,ml:e.spacing(1),fontSize:e.typography.body1.fontSize,color:e.palette.text.secondary}})},r.key))})]})}):null},Br=t=>{const{className:r,column:i,pinMeta:s,labelProps:a,children:o,sx:l,...u}=t,{className:c,sx:d,...h}=a??{},m=void 0===l?[]:Array.isArray(l)?l:[l],f=void 0===d?[]:Array.isArray(d)?d:[d],y=i.width??(s?.pin?jr(i):void 0);return e.jsx(n.TableCell,{className:Cr("nbb-base-table-content-grid-head-cell",r),...s?.pin?{"data-pinned":s.pin}:{},...s?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...s?.isRightBoundary?{"data-pinned-boundary":"right"}:{},...i.align?{align:i.align}:{},sx:[{py:1,verticalAlign:"middle",position:"relative",zIndex:10,backgroundColor:"common.white",backgroundImage:"none",opacity:1,...y?{width:y,minWidth:y}:{},...Ar(s,!0)},...m],...u,children:o||e.jsx(n.Typography,{variant:"body2",color:"text.secondary",...void 0!==c?{className:c}:{},sx:[{fontWeight:"bold"},...f],...h,children:i.headLabel})})},qr=t=>{const{className:r,column:i,pinMeta:s,row:a,rowIndex:o,children:l,sx:u,...c}=t,d=void 0===u?[]:Array.isArray(u)?u:[u],h=i.width??(s?.pin?jr(i):void 0);return e.jsx(n.TableCell,{className:Cr("nbb-base-table-content-grid-body-cell",r),...s?.pin?{"data-pinned":s.pin}:{},...s?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...s?.isRightBoundary?{"data-pinned-boundary":"right"}:{},...i.align?{align:i.align}:{},sx:[{py:1,height:72,verticalAlign:"middle",wordBreak:"break-word",...h?{width:h,minWidth:h}:{},...Ar(s,!1)},...d],...c,children:l||Dr(i,a,o)})},Ur=t=>{const{className:r,children:i,pinMeta:s,sx:a,...o}=t,l=void 0===a?[]:Array.isArray(a)?a:[a];return e.jsx(n.TableCell,{className:Cr("nbb-base-table-content-grid-head-action-cell",r),...s?.pin?{"data-pinned":s.pin}:{},...s?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...s?.isRightBoundary?{"data-pinned-boundary":"right"}:{},sx:[{width:56,py:1,verticalAlign:"middle",position:"relative",zIndex:10,backgroundColor:"common.white",backgroundImage:"none",opacity:1},Ar(s,!0),...l],...o,children:i})},Hr=r=>{const{className:i,row:s,showActionMenu:a,pinMeta:o,onOpenRowMenu:l,iconButtonProps:u,icon:c,children:d,sx:h,...m}=r,{sx:f,...y}=u??{},g=void 0===h?[]:Array.isArray(h)?h:[h],p=void 0===f?[]:Array.isArray(f)?f:[f],b=a&&Boolean(l);return e.jsx(n.TableCell,{className:Cr("nbb-base-table-content-grid-body-action-cell",i),...o?.pin?{"data-pinned":o.pin}:{},...o?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...o?.isRightBoundary?{"data-pinned-boundary":"right"}:{},sx:[{width:56,py:1,height:72,verticalAlign:"middle",textAlign:"right",...Ar(o,!1)},...g],...m,children:d||e.jsx(n.IconButton,{"aria-label":"row action",size:"small",sx:[{color:"text.secondary",visibility:b?"visible":"hidden"},...p],onClick:e=>{l&&a&&l(e,s)},disabled:!b,tabIndex:b?0:-1,...y,children:c||e.jsx(t.MoreVertOutlined,{})})})},_r=Tr({cell:Br,actionCell:Ur}),Yr=t=>{const{className:i,children:s,columns:a,rowActions:o,headCell:l,actionHeadCell:u,columnPinMeta:c,actionColumnPinMeta:d,sx:h,...m}=t,f=void 0===h?[]:Array.isArray(h)?h:[h];return e.jsx(n.TableRow,{className:Cr("nbb-base-table-content-grid-head-row",i),sx:[{backgroundColor:"background.paper"},...f],...m,children:e.jsx(Mr,{defaultBlocks:_r,defaultBlockOrder:Object.keys(_r),blocksOverride:s,children:({blocks:t})=>{const n=t.cell,i=t.actionCell;return e.jsxs(e.Fragment,{children:[a.map((t,i)=>{const s=c?.[i],a="function"==typeof l?l({column:t,columnIndex:i,...void 0!==s?{pinMeta:s}:{}}):l;return e.jsx(r.Fragment,{children:a??Vr(n,{column:t,...void 0!==s?{pinMeta:s}:{}},`cell-${String(t.field)}-${i}`)},`${String(t.field)}-${i}`)}),o&&(("function"==typeof u?u({rowActions:o,...void 0!==d?{actionColumnPinMeta:d}:{}}):u)??Vr(i,{...void 0!==d?{pinMeta:d}:{}},"action-cell"))]})}})})},Jr=Tr({cell:qr,actionCell:Hr}),Gr=t=>{const{className:i,children:s,row:a,rowIndex:o,columns:l,rowActions:u,onRowClick:c,onOpenRowMenu:d,bodyCell:h,actionBodyCell:m,columnPinMeta:f,actionColumnPinMeta:y,sx:g,onClick:p,hover:b,...w}=t,v=void 0===g?[]:Array.isArray(g)?g:[g],k=(u?.(a)??[]).length>0,x=b??Boolean(c),S=c?e=>{p?.(e),e.defaultPrevented||c(a)}:p;return e.jsx(n.TableRow,{className:Cr("nbb-base-table-content-grid-body-row",i),hover:!1,sx:[{backgroundColor:"common.white","& > .MuiTableCell-root":{backgroundColor:"inherit",transition:e=>e.transitions.create("background-color",{duration:120})}},...x?[{...c?{cursor:"pointer"}:{},"&:hover":{backgroundColor:e=>e.palette.grey[100]||e.palette.action.hover},"&:hover > .MuiTableCell-root":{backgroundColor:"inherit"},"&:hover > .MuiTableCell-root[data-pinned]":{backgroundColor:"inherit"},"&.MuiTableRow-hover:hover":{backgroundColor:e=>e.palette.grey[100]||e.palette.action.hover},"&.MuiTableRow-hover:hover > .MuiTableCell-root":{backgroundColor:"inherit"},"&.MuiTableRow-hover:hover > .MuiTableCell-root[data-pinned]":{backgroundColor:"inherit"}}]:[],...v],onClick:S,...w,children:e.jsx(Mr,{defaultBlocks:Jr,defaultBlockOrder:Object.keys(Jr),blocksOverride:s,children:({blocks:t})=>{const n=t.cell,i=t.actionCell;return e.jsxs(e.Fragment,{children:[l.map((t,i)=>e.jsx(r.Fragment,{children:(()=>{const e=f?.[i];return"function"==typeof h?h({column:t,columnIndex:i,...void 0!==e?{pinMeta:e}:{},row:a,rowIndex:o}):h})()??Vr(n,{column:t,...void 0!==f?.[i]?{pinMeta:f[i]}:{},row:a,rowIndex:o},`cell-${String(t.field)}-${i}`)},`${String(t.field)}-${i}`)),u&&(("function"==typeof m?m({row:a,rowIndex:o,showActionMenu:k,...void 0!==y?{actionColumnPinMeta:y}:{},onOpenRowMenu:d}):m)??Vr(i,{row:a,showActionMenu:k,...void 0!==y?{pinMeta:y}:{},onOpenRowMenu:d},"action-cell"))]})}})})},Qr=Tr({row:Yr}),Kr=t=>{const{className:r,children:i,columns:s,rowActions:a,headRow:o,headCell:l,actionHeadCell:u,columnPinMeta:c,actionColumnPinMeta:d,sx:h,...m}=t,f=void 0===h?[]:Array.isArray(h)?h:[h],y="function"==typeof o?o({columns:s,rowActions:a,...void 0!==c?{columnPinMeta:c}:{},...void 0!==d?{actionColumnPinMeta:d}:{}}):o;return e.jsx(n.TableHead,{className:Cr("nbb-base-table-content-grid-head",r),sx:[{width:"100%",minWidth:0,backgroundColor:"common.white",backgroundImage:"none","& .MuiTableCell-root":{backgroundColor:"common.white",backgroundImage:"none",backgroundClip:"padding-box",opacity:1},position:"relative",zIndex:6},...f],...m,children:e.jsx(Mr,{defaultBlocks:Qr,defaultBlockOrder:Object.keys(Qr),blocksOverride:i,children:({blocks:e})=>y??Vr(e.row,{columns:s,rowActions:a,headCell:l,actionHeadCell:u,...void 0!==c?{columnPinMeta:c}:{},...void 0!==d?{actionColumnPinMeta:d}:{}})})})},Xr=Tr({row:Gr}),ei=t=>{const{className:i,children:s,columns:a,rows:o,rowActions:l,onRowClick:u,getRowId:c,onOpenRowMenu:d,bodyRow:h,bodyCell:m,actionBodyCell:f,columnPinMeta:y,actionColumnPinMeta:g,sx:p,...b}=t,w=void 0===p?[]:Array.isArray(p)?p:[p];return e.jsx(n.TableBody,{className:Cr("nbb-base-table-content-grid-body",i),sx:w,...b,children:e.jsx(Mr,{defaultBlocks:Xr,defaultBlockOrder:Object.keys(Xr),blocksOverride:s,children:({blocks:t})=>{const n=t.row;return o.map((t,i)=>{const s=c?.(t,i)??t.id??i,o="function"==typeof h?h({row:t,rowIndex:i,columns:a,rowActions:l,onRowClick:u,onOpenRowMenu:d,...void 0!==y?{columnPinMeta:y}:{},...void 0!==g?{actionColumnPinMeta:g}:{}}):h;return e.jsx(r.Fragment,{children:o??Vr(n,{row:t,rowIndex:i,columns:a,rowActions:l,onRowClick:u,onOpenRowMenu:d,bodyCell:m,actionBodyCell:f,...void 0!==y?{columnPinMeta:y}:{},...void 0!==g?{actionColumnPinMeta:g}:{}},`row-${String(s)}`)},String(s))})}})})},ti=t=>{const{className:r,children:i,menuAnchorEl:s,menuRow:a,menuActions:o,onClose:l,anchorOrigin:u={vertical:"bottom",horizontal:"right"},transformOrigin:c={vertical:"top",horizontal:"right"},...d}=t;return e.jsx(n.Menu,{className:Cr("nbb-base-table-content-grid-row-menu",r),anchorEl:s,open:Boolean(s&&a),onClose:l,anchorOrigin:u,transformOrigin:c,...d,children:i||o.map((t,r)=>e.jsxs(n.MenuItem,{...void 0!==t.disabled?{disabled:t.disabled}:{},onClick:e=>{e.stopPropagation(),a&&t.onClick(a),l()},children:[t.icon&&e.jsx(n.ListItemIcon,{children:t.icon}),t.label]},`${String(t.label)}-${r}`))})},ni=r=>{const{noRowsOverlay:i}=Or(Sr(),r),{children:s,className:a,sx:o,...l}=r,u=void 0===o?[]:Array.isArray(o)?o:[o],c={icon:e.jsx(t.PersonOutlined,{}),title:"No Item",...i};return e.jsx(n.Box,{className:Cr("nbb-base-table-content-empty-state",a),sx:[e=>({alignItems:"center",backgroundColor:e.palette.grey[50]||e.palette.background.default,borderRadius:e.spacing(1),boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",padding:`${e.spacing(4.375)} 0`,width:"100%",minHeight:e.spacing(18.25),gap:e.spacing(1)}),...u],...Nr(l,...Ir),children:s||e.jsxs(e.Fragment,{children:[e.jsx(n.Box,{sx:{"& .MuiSvgIcon-root":{fontSize:e=>e.spacing(5),color:"text.disabled"}},children:c.icon}),e.jsx(n.Typography,{variant:"body1",sx:{fontWeight:e=>e.typography.h6.fontWeight,color:"text.disabled"},children:c.title}),c.description&&e.jsx(n.Typography,{variant:"body2",color:"text.secondary",children:c.description}),c.action&&e.jsx(n.Button,{variant:"outlined",size:"small",onClick:c.action.onClick,startIcon:c.action.icon,...void 0!==c.action.disabled?{disabled:c.action.disabled}:{},children:c.action.label})]})})},ri=t=>{const{className:i,children:s,tableProps:a,onPinnedShadowChange:o,onHorizontalOverflowChange:l,showLeftPinnedShadow:u=!1,showRightPinnedShadow:c=!1,sx:d,...h}=t,{sx:m,...f}=a??{},y=r.useRef(null),g=r.useRef(null),[p,b]=r.useState({left:null,right:null}),w=void 0===d?[]:Array.isArray(d)?d:[d],v=r.useCallback(()=>{const e=y.current,t=g.current;if(!e||!t)return;const n=Math.max(0,t.scrollWidth-t.clientWidth),r=n>1;l?.(r);const i=r&&t.scrollLeft>1,s=r&&t.scrollLeft<n-1;o?.({left:i,right:s});const a=e.getBoundingClientRect(),u=t.querySelector('[data-pinned-boundary="left"]'),c=t.querySelector('[data-pinned-boundary="right"]'),d=u?Math.max(0,Math.round(u.getBoundingClientRect().right-a.left)):null,h=c?Math.max(0,Math.round(a.right-c.getBoundingClientRect().left)):null;b(e=>e.left===d&&e.right===h?e:{left:d,right:h})},[l,o]);return r.useEffect(()=>{const e=g.current;if(!e)return;v(),e.addEventListener("scroll",v,{passive:!0});const t=new ResizeObserver(v);return t.observe(e),()=>{e.removeEventListener("scroll",v),t.disconnect()}},[v]),r.useEffect(()=>{v()},[s,v]),e.jsxs(n.Box,{ref:y,sx:{position:"relative",width:"100%",minWidth:0},children:[null!==p.left&&e.jsx(n.Box,{sx:Er("left",Math.max(0,p.left),u)}),null!==p.right&&e.jsx(n.Box,{sx:Er("right",Math.max(0,p.right),c)}),e.jsx(n.TableContainer,{ref:g,component:n.Paper,elevation:0,className:Cr("nbb-base-table-content-grid-table",i),sx:[{width:"100%",overflowX:"auto",overflowY:"hidden",backgroundColor:"background.paper"},...w],...h,children:e.jsx(n.Table,{sx:[{backgroundColor:"common.white"},...void 0===m?[]:Array.isArray(m)?m:[m]],...f,children:s})})]})},ii=Tr({table:ri,head:Kr,body:ei,rowMenu:ti,emptyState:ni}),si=t=>{const i=Sr(),{columns:s,rows:a,actionColumn:o,rowActions:l,noRowsOverlay:u,onRowClick:c,getRowId:d}=Or(i,t),{className:h,children:m,emptyState:f,head:y,body:g,rowMenu:p,headRow:b,headCell:w,actionHeadCell:v,bodyRow:k,bodyCell:x,actionBodyCell:S,sx:T,...M}=t,O=void 0===T?[]:Array.isArray(T)?T:[T],[C,N]=r.useState(null),[I,D]=r.useState(null),[j,A]=r.useState(!1),[E,V]=r.useState({left:!1,right:!1}),F=r.useCallback(e=>{A(t=>t===e?t:e)},[]),L=r.useCallback(e=>{V(t=>t.left===e.left&&t.right===e.right?t:e)},[]),$=r.useMemo(()=>j?s:s.map(e=>{const{pin:t,...n}=e;return n}),[s,j]),W=j&&"right"===o?.pin?"right":void 0,z=r.useMemo(()=>{const e=function(e){const t=e.map(()=>({})),n=[],r=[];let i=0;e.forEach((e,r)=>{"left"===e.pin&&(t[r]={pin:"left",left:i},i+=jr(e),n.push(r))});let s=0;for(let n=e.length-1;n>=0;n-=1){const i=e[n];"right"===i?.pin&&(t[n]={pin:"right",right:s},s+=jr(i),r.push(n))}const a=n[n.length-1];void 0!==a&&(t[a]={...t[a],isLeftBoundary:!0});const o=r[r.length-1];return void 0!==o&&(t[o]={...t[o],isRightBoundary:!0}),t}($),t=Boolean(l)&&"right"===W?56:0;return e.map(e=>{const n="left"===e.pin?e:"right"===e.pin?{...e,right:(e.right??0)+t}:e;return"left"===n.pin&&n.isLeftBoundary?{...n,showBoundaryShadow:E.left}:"right"===n.pin&&n.isRightBoundary?{...n,showBoundaryShadow:E.right}:n})},[E.left,E.right,W,$,l]),R=r.useMemo(()=>{if(l&&"right"===W){const e=!$.some(e=>"right"===e.pin);return{pin:"right",right:0,isRightBoundary:e,showBoundaryShadow:e&&E.right}}},[E.right,W,$,l]),Z=r.useMemo(()=>I&&l?l(I):[],[I,l]),P=(e,t)=>{e.stopPropagation(),N(e.currentTarget),D(t)},B=()=>{N(null),D(null)},q="function"==typeof y?y({columns:$,rowActions:l,columnPinMeta:z,...void 0!==R?{actionColumnPinMeta:R}:{},headRow:b,headCell:w,actionHeadCell:v}):y,U="function"==typeof g?g({columns:$,rows:a,rowActions:l,onRowClick:c,getRowId:d,onOpenRowMenu:P,columnPinMeta:z,...void 0!==R?{actionColumnPinMeta:R}:{},bodyRow:k,bodyCell:x,actionBodyCell:S}):g,H="function"==typeof p?p({menuAnchorEl:C,menuRow:I,menuActions:Z,onClose:B}):p;return e.jsx(n.Stack,{className:Cr("nbb-base-table-content-grid",h),sx:[{width:"100%",minWidth:0},...O],...Nr(M,...Ir),children:e.jsx(Mr,{defaultBlocks:ii,defaultBlockOrder:Object.keys(ii),blocksOverride:m,children:({blocks:t})=>{const n=t;if(0===a.length)return f??Vr(n.emptyState,{...void 0!==u?{noRowsOverlay:u}:{}},"empty-state");const r=q??Vr(n.head,{columns:$,rowActions:l,...void 0!==z?{columnPinMeta:z}:{},...void 0!==R?{actionColumnPinMeta:R}:{},headRow:b,headCell:w,actionHeadCell:v},"grid-head"),i=U??Vr(n.body,{columns:$,rows:a,rowActions:l,onRowClick:c,getRowId:d,onOpenRowMenu:P,...void 0!==z?{columnPinMeta:z}:{},...void 0!==R?{actionColumnPinMeta:R}:{},bodyRow:k,bodyCell:x,actionBodyCell:S},"grid-body"),s=Vr(n.table,{onHorizontalOverflowChange:F,onPinnedShadowChange:L,showLeftPinnedShadow:E.left,showRightPinnedShadow:E.right,children:e.jsxs(e.Fragment,{children:[r,i]})},"grid-table"),o=H??Vr(n.rowMenu,{menuAnchorEl:C,menuRow:I,menuActions:Z,onClose:B},"grid-row-menu");return e.jsxs(e.Fragment,{children:[s,o]})}})})},ai=Tr({loader:Rr,emptyState:ni,grid:si}),oi=t=>{const{isLoading:r,rows:i}=Or(Sr(),t),{children:s,className:a,...o}=t;return e.jsx(n.Box,{className:Cr("nbb-base-table-content",a),...Nr(o,...Ir),children:e.jsx(Mr,{defaultBlocks:ai,defaultBlockOrder:Object.keys(ai),blocksOverride:s,children:({blocks:e})=>{const t=e;return r?Vr(t.loader,{},"content-loader"):i&&0!==i.length?Vr(t.grid,{},"content-grid"):Vr(t.emptyState,{},"content-empty-state")}})})},li=t=>{const{pagination:r,rows:a,isLoading:o}=Or(Sr(),t),{children:l,className:u,sx:c=[],...d}=t,h=s.useTheme(),m=i(h.breakpoints.down("sm")),f=i(h.breakpoints.down("md"));if(!r||o||!a||0===a.length)return null;const y=m?0:1,g=m||f?0:1;return e.jsx(n.Stack,{className:Cr("nbb-base-table-pagination",u),sx:[{alignItems:"center",width:"100%"},...Array.isArray(c)?c:[c]],...Nr(d,...Ir),children:l||e.jsx(n.Pagination,{count:Math.max(1,Math.ceil(r.total/r.pageSize)),page:r.page,onChange:(e,t)=>r.onPageChange(t),variant:"outlined",color:"primary",shape:"rounded",boundaryCount:y,siblingCount:g,sx:{maxWidth:"100%","& .MuiPagination-ul":{flexWrap:"nowrap",justifyContent:"center"}}})})},ui=Tr({header:zr,tabs:Zr,searchChips:Pr,content:oi,pagination:li}),ci=({sx:t,spacing:i=3,className:s,children:a,...o})=>{const l=function(e,...t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}(o,...Ir),u=Nr(o,...Ir),{tabs:c,activeTab:d,onTabChange:h}=l,[m,f]=r.useState(c?.[0]?.value);r.useEffect(()=>{c?.length&&f(e=>void 0!==e&&c.some(t=>t.value===e)?e:c[0]?.value)},[c]);const y=void 0!==d?d:m,g={...l,...void 0!==y?{activeTab:y}:{},onTabChange:e=>{void 0===d&&f(e),h?.(e)}};return e.jsx(n.Stack,{className:Cr("nbb-base-table",s),spacing:i,sx:[{p:2,width:"100%",maxWidth:"100%",boxSizing:"border-box"},...Array.isArray(t)?t:[t]],...u,children:e.jsx(xr,{...g,children:e.jsx(Mr,{defaultBlocks:ui,defaultBlockOrder:Object.keys(ui),blocksOverride:a,children:({blocks:e,blockOrder:t})=>Fr(e,t)})})})},di=zr;di.Title=Lr,di.Actions=$r;const hi=Pr,mi=Kr;mi.Row=Yr,mi.Cell=Br,mi.ActionCell=Ur;const fi=ei;fi.Row=Gr,fi.Cell=qr,fi.ActionCell=Hr;const yi=si;yi.Table=ri,yi.Head=mi,yi.Body=fi,yi.RowMenu=ti;const gi=oi;function pi(...e){return e.flat().filter(Boolean).join(" ")}function bi({labels:r,searchValue:i,onSearchFieldChange:s,onSearchSubmit:a}){return e.jsx(n.TextField,{type:"search",variant:"outlined",placeholder:r.searchFieldPlaceholder,onChange:e=>s?.(e.target.value),onKeyDown:e=>{a&&"Enter"===e.key&&!e.nativeEvent.isComposing&&e.target instanceof HTMLInputElement&&(e.preventDefault(),a())},...void 0!==i?{value:i}:{},sx:e=>({width:{xs:"100%",md:e.spacing(44.75)},"& .MuiOutlinedInput-root":{pr:1.5,"& .MuiOutlinedInput-input":{pl:1.5,pt:1.625,pb:1.625,fontSize:e.typography.body2.fontSize}}}),slotProps:{input:{endAdornment:e.jsx(n.InputAdornment,{position:"end",children:e.jsx(n.IconButton,{"aria-label":"Search",edge:"end",size:"small",...a?{onClick:a}:{},children:e.jsx(t.Search,{fontSize:"small"})})})}}})}function wi(n){return{icon:e.jsx(t.PersonOutlined,{}),title:n.emptyStateMessage}}function vi(n,r,i,s,a){if(!a||!n.rowActions)return;const o=n.rowActions;return n=>{if(s&&!s(n))return[];const l=a(n);return l&&0!==l.length?l.flatMap(s=>"activate"===s?r?[{label:o.activate,icon:e.jsx(t.Loop,{sx:e=>({fontSize:e.typography.h5.fontSize})}),onClick:()=>r(n.id)}]:[]:"deactivate"===s&&i?[{label:o.deactivate,icon:e.jsx(t.BlockOutlined,{sx:e=>({fontSize:e.typography.h5.fontSize})}),onClick:()=>i(n.id)}]:[]):[]}}function ki(t,r){return[{field:"name",headLabel:t.headerRow.name,width:180},{field:"createdAt",headLabel:t.headerRow.createdAt,width:180,valueFormatter:t=>{const r=function(e){if(!e)return null;const t=wr.fromISO(e);return t.isValid?t:null}("string"==typeof t?t:void 0),i=r?.toFormat("yyyy/MM/dd")??"N/A",s=r?.toLocaleString(wr.DATETIME_FULL)??"N/A";return e.jsx(n.Tooltip,{title:s,children:e.jsx("span",{children:i})})}},{field:"status",headLabel:t.headerRow.status,width:180,valueFormatter:(e,{row:n})=>n.status===r.inUse?t.cellData.statusActive:n.status===r.notInUse?t.cellData.statusInactive:n.status}]}function xi(e){return{page:e.currentPage,pageSize:1,total:e.totalPages,onPageChange:e.onPageChange}}function Si(t,n){return n.filter(e=>e in t).map(n=>e.jsx(r.Fragment,{children:t[n]},String(n)))}gi.Loader=Rr,gi.EmptyState=ni,gi.Grid=yi,ci.Header=di,ci.Tabs=Zr,ci.SearchChips=hi,ci.Content=gi,ci.Pagination=li;const Ti=({className:t,children:r,listUsersTitle:i,labels:s,searchValue:a,onSearchFieldChange:o,onSearchSubmit:l,onItemActivate:u,onItemDeactivate:c,shouldShowDropdownMenu:d,resolveRowAction:h,statusMatch:m={inUse:"active",notInUse:"inactive"},onNavigate:f,pagination:y,data:g,rowHref:p,tabs:b,currentTab:w,onTabChange:v,...k})=>{const x=ki(s,m),S=b&&function(t){return t.map(t=>({value:t.key,disabled:Boolean(t.isDisabled),label:e.jsxs(e.Fragment,{children:[t.label,t.subtitle&&e.jsx(n.Typography,{component:"span",variant:"body2",color:"text.secondary",children:t.subtitle})]})}))}(b),T=y&&xi(y),M=vi(s,u,c,d,h),O=bi({labels:s,searchValue:a,onSearchFieldChange:o,onSearchSubmit:l}),C=e.jsx(Ti.Title,{}),N=e.jsx(Ti.Action,{}),I=e.jsxs(Ti.Header,{children:[C,N]}),D=e.jsx(Ti.Loader,{}),j=e.jsx(Ti.Tabs,{}),A=e.jsx(Ti.SearchChips,{}),E=e.jsx(Ti.Table,{}),V=e.jsx(Ti.Pagination,{...y?{pagination:y}:{},data:g,...void 0!==k.isLoading?{isLoading:k.isLoading}:{}}),F={title:C,action:N,header:I,loader:D,content:e.jsx(Ti.Content,{}),tabs:j,searchChips:A,table:E,pagination:V},L=["header","searchChips","content","pagination"],$=void 0===r?Si(F,L):"function"==typeof r?(()=>{const{blocks:e,blockOrder:t}=r({defaultBlocks:F,defaultBlockOrder:L});return Si(e,t)})():r;return e.jsx(ci,{className:pi("nbb-list-users-container",t),headerTitle:i,headerActions:O,columns:x,rows:g,...M?{rowActions:M,actionColumn:{pin:"right"}}:{},noRowsOverlay:wi(s),...S?{tabs:S}:{},...void 0!==w?{activeTab:w}:{},...v?{onTabChange:v}:{},...T?{pagination:T}:{},...p&&f?{onRowClick:e=>{const t=p(e);t&&f(t)}}:{},...k,children:$})};Ti.Title=({listUsersTitle:t,children:n,className:r,...i})=>e.jsx(ci.Header.Title,{className:pi("nbb-list-users-title",r),...i,children:n||t}),Ti.Header=({children:t,className:n,sx:r=[],...i})=>e.jsx(ci.Header,{className:pi("nbb-list-users-header",n),sx:[{flexWrap:{xs:"wrap",md:"nowrap"},alignItems:{xs:"flex-start",md:"center"},columnGap:2,rowGap:2},...Array.isArray(r)?r:[r]],...i,children:t}),Ti.Action=({children:t,className:n,labels:r,searchValue:i,onSearchFieldChange:s,onSearchSubmit:a,sx:o=[],...l})=>{const u=t||(r?bi({labels:r,searchValue:i,onSearchFieldChange:s,onSearchSubmit:a}):void 0);return e.jsx(ci.Header.Actions,{className:pi("nbb-list-users-actions",n),sx:[{width:{xs:"100%",md:"auto"},justifyContent:{xs:"flex-start",md:"flex-end"}},...Array.isArray(o)?o:[o]],...l,children:u})},Ti.Loader=({children:t,className:n,...r})=>e.jsx(ci.Content.Loader,{className:pi("nbb-list-users-loader",n),...r,children:t}),Ti.Content=({children:t,className:n,...r})=>e.jsx(ci.Content,{className:pi("nbb-list-users-content",n),...r,children:t}),Ti.Tabs=({children:t,className:n,...r})=>e.jsx(ci.Tabs,{className:pi("nbb-list-users-tabs",n),...r,children:t}),Ti.SearchChips=({className:t,...n})=>e.jsx(ci.SearchChips,{className:pi("nbb-list-users-search-chips",t),...n}),Ti.Pagination=({className:t,pagination:n,data:r,isLoading:i,...s})=>{const a=n&&xi(n),o=pi("nbb-list-users-pagination",n?.className,t);return e.jsx(ci.Pagination,{className:o,...a?{pagination:a}:{},...r?{rows:r}:{},...void 0!==i?{isLoading:i}:{},...s})},Ti.Table=({className:t,labels:n,data:r,onItemActivate:i,onItemDeactivate:s,shouldShowDropdownMenu:a,resolveRowAction:o,rowHref:l,onNavigate:u,statusMatch:c={inUse:"active",notInUse:"inactive"},...d})=>{const h=n&&ki(n,c),m=n&&wi(n),f=n?vi(n,i,s,a,o):void 0,y=l&&u?e=>{const t=l(e);t&&u(t)}:void 0;return e.jsx(ci.Content.Grid,{className:pi("nbb-list-users-table",t),...h?{columns:h}:{},...r?{rows:r}:{},...m?{noRowsOverlay:m}:{},...f?{rowActions:f,actionColumn:{pin:"right"}}:{},...y?{onRowClick:y}:{},...d})},exports.ListUsers=Ti;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as ListUsers } from './list-users';
|
|
1
|
+
export { default as ListUsers, type ListUsersRowData } from './list-users';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|