@nyaruka/temba-components 0.62.0 → 0.62.1

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/CHANGELOG.md CHANGED
@@ -4,8 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v0.62.1](https://github.com/nyaruka/temba-components/compare/v0.62.0...v0.62.1)
8
+
9
+ - Show urns properly for urn change events [`#374`](https://github.com/nyaruka/temba-components/pull/374)
10
+
7
11
  #### [v0.62.0](https://github.com/nyaruka/temba-components/compare/v0.61.1...v0.62.0)
8
12
 
13
+ > 12 October 2023
14
+
9
15
  - Localized compose [`#373`](https://github.com/nyaruka/temba-components/pull/373)
10
16
  - Add localization to compose [`26ea436`](https://github.com/nyaruka/temba-components/commit/26ea436e117a601d19fcb7161630287073db8727)
11
17
  - Update compose tests [`5ae09aa`](https://github.com/nyaruka/temba-components/commit/5ae09aa8423d38b661975ecd8bdf4fab07774471)
@@ -224,7 +224,7 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
224
224
  <slot></slot>
225
225
  </div>
226
226
  </temba-field>
227
- `}}t([ct({type:Boolean})],xt.prototype,"textarea",void 0),t([ct({type:String})],xt.prototype,"placeholder",void 0),t([ct({type:Boolean})],xt.prototype,"password",void 0),t([ct({type:Number})],xt.prototype,"maxlength",void 0),t([ct({type:Object})],xt.prototype,"inputElement",void 0),t([ct({type:Boolean})],xt.prototype,"clearable",void 0),t([ct({type:Boolean})],xt.prototype,"gsm",void 0),t([ct({type:String})],xt.prototype,"counter",void 0),t([ct({type:Boolean})],xt.prototype,"loading",void 0),t([ct({type:Boolean})],xt.prototype,"submitOnEnter",void 0),t([ct()],xt.prototype,"onBlur",void 0),t([ct({type:Boolean})],xt.prototype,"autogrow",void 0);var wt,kt,St,Et,Ct,$t,Tt,At,Lt,Mt,Ot,zt,Pt,It,Dt,Nt,Rt,Bt,qt=function(t,e,i){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,i),i},Ut=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)};const Zt=function(t){var e=0;t+="x";var i=Math.floor(65745979961613.07);for(let n=0;n<t.length;n++)e>i&&(e=Math.floor(e/137)),e=131*e+t.charCodeAt(n);return e},Ft="0123456789abcdef".split(""),Vt=[-2147483648,8388608,32768,128],jt=[24,16,8,0],Ht=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Wt=[];class Gt{constructor(t=!1,e=!1){wt.set(this,void 0),kt.set(this,void 0),St.set(this,void 0),Et.set(this,void 0),Ct.set(this,void 0),$t.set(this,void 0),Tt.set(this,void 0),At.set(this,void 0),Lt.set(this,void 0),Mt.set(this,void 0),Ot.set(this,void 0),zt.set(this,void 0),Pt.set(this,void 0),It.set(this,void 0),Dt.set(this,void 0),Nt.set(this,void 0),Rt.set(this,0),Bt.set(this,void 0),this.init(t,e)}init(t,e){e?(Wt[0]=Wt[16]=Wt[1]=Wt[2]=Wt[3]=Wt[4]=Wt[5]=Wt[6]=Wt[7]=Wt[8]=Wt[9]=Wt[10]=Wt[11]=Wt[12]=Wt[13]=Wt[14]=Wt[15]=0,qt(this,kt,Wt)):qt(this,kt,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(qt(this,$t,3238371032),qt(this,Tt,914150663),qt(this,At,812702999),qt(this,Lt,4144912697),qt(this,Mt,4290775857),qt(this,Ot,1750603025),qt(this,zt,1694076839),qt(this,Pt,3204075428)):(qt(this,$t,1779033703),qt(this,Tt,3144134277),qt(this,At,1013904242),qt(this,Lt,2773480762),qt(this,Mt,1359893119),qt(this,Ot,2600822924),qt(this,zt,528734635),qt(this,Pt,1541459225)),qt(this,wt,qt(this,Bt,qt(this,St,qt(this,Dt,0)))),qt(this,Et,qt(this,It,!1)),qt(this,Ct,!0),qt(this,Nt,t)}update(t){if(Ut(this,Et))return this;let e;e=t instanceof ArrayBuffer?new Uint8Array(t):t;let i=0;const n=e.length,o=Ut(this,kt);for(;i<n;){let t;if(Ut(this,It)&&(qt(this,It,!1),o[0]=Ut(this,wt),o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),"string"!=typeof e)for(t=Ut(this,Bt);i<n&&t<64;++i)o[t>>2]|=e[i]<<jt[3&t++];else for(t=Ut(this,Bt);i<n&&t<64;++i){let n=e.charCodeAt(i);n<128?o[t>>2]|=n<<jt[3&t++]:n<2048?(o[t>>2]|=(192|n>>6)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++]):n<55296||n>=57344?(o[t>>2]|=(224|n>>12)<<jt[3&t++],o[t>>2]|=(128|n>>6&63)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++i)),o[t>>2]|=(240|n>>18)<<jt[3&t++],o[t>>2]|=(128|n>>12&63)<<jt[3&t++],o[t>>2]|=(128|n>>6&63)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++])}qt(this,Rt,t),qt(this,St,Ut(this,St)+(t-Ut(this,Bt))),t>=64?(qt(this,wt,o[16]),qt(this,Bt,t-64),this.hash(),qt(this,It,!0)):qt(this,Bt,t)}return Ut(this,St)>4294967295&&(qt(this,Dt,Ut(this,Dt)+(Ut(this,St)/4294967296<<0)),qt(this,St,Ut(this,St)%4294967296)),this}finalize(){if(Ut(this,Et))return;qt(this,Et,!0);const t=Ut(this,kt),e=Ut(this,Rt);t[16]=Ut(this,wt),t[e>>2]|=Vt[3&e],qt(this,wt,t[16]),e>=56&&(Ut(this,It)||this.hash(),t[0]=Ut(this,wt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=Ut(this,Dt)<<3|Ut(this,St)>>>29,t[15]=Ut(this,St)<<3,this.hash()}hash(){let t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt);const l=Ut(this,kt);let h,c,d,u,p,m,f,g,v,y;for(let t=16;t<64;++t)u=l[t-15],h=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,u=l[t-2],c=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,l[t]=l[t-16]+h+l[t-7]+c<<0;y=e&i;for(let b=0;b<64;b+=4)Ut(this,Ct)?(Ut(this,Nt)?(f=300032,u=l[0]-1413257819,a=u-150054599<<0,n=u+24177077<<0):(f=704751109,u=l[0]-210244248,a=u-1521486534<<0,n=u+143694565<<0),qt(this,Ct,!1)):(h=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),c=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),f=t&e,d=f^t&i^y,m=o&s^~o&r,u=a+c+m+Ht[b]+l[b],p=h+d,a=n+u<<0,n=u+p<<0),h=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),c=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),g=n&t,d=g^n&e^f,m=a&o^~a&s,u=r+c+m+Ht[b+1]+l[b+1],p=h+d,r=i+u<<0,i=u+p<<0,h=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),c=(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7),v=i&n,d=v^i&t^g,m=r&a^~r&o,u=s+c+m+Ht[b+2]+l[b+2],p=h+d,s=e+u<<0,e=u+p<<0,h=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),c=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),y=e&i,d=y^e&n^v,m=s&r^~s&a,u=o+c+m+Ht[b+3]+l[b+3],p=h+d,o=t+u<<0,t=u+p<<0;qt(this,$t,Ut(this,$t)+t<<0),qt(this,Tt,Ut(this,Tt)+e<<0),qt(this,At,Ut(this,At)+i<<0),qt(this,Lt,Ut(this,Lt)+n<<0),qt(this,Mt,Ut(this,Mt)+o<<0),qt(this,Ot,Ut(this,Ot)+s<<0),qt(this,zt,Ut(this,zt)+r<<0),qt(this,Pt,Ut(this,Pt)+a<<0)}hex(){this.finalize();const t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt);let l=Ft[t>>28&15]+Ft[t>>24&15]+Ft[t>>20&15]+Ft[t>>16&15]+Ft[t>>12&15]+Ft[t>>8&15]+Ft[t>>4&15]+Ft[15&t]+Ft[e>>28&15]+Ft[e>>24&15]+Ft[e>>20&15]+Ft[e>>16&15]+Ft[e>>12&15]+Ft[e>>8&15]+Ft[e>>4&15]+Ft[15&e]+Ft[i>>28&15]+Ft[i>>24&15]+Ft[i>>20&15]+Ft[i>>16&15]+Ft[i>>12&15]+Ft[i>>8&15]+Ft[i>>4&15]+Ft[15&i]+Ft[n>>28&15]+Ft[n>>24&15]+Ft[n>>20&15]+Ft[n>>16&15]+Ft[n>>12&15]+Ft[n>>8&15]+Ft[n>>4&15]+Ft[15&n]+Ft[o>>28&15]+Ft[o>>24&15]+Ft[o>>20&15]+Ft[o>>16&15]+Ft[o>>12&15]+Ft[o>>8&15]+Ft[o>>4&15]+Ft[15&o]+Ft[s>>28&15]+Ft[s>>24&15]+Ft[s>>20&15]+Ft[s>>16&15]+Ft[s>>12&15]+Ft[s>>8&15]+Ft[s>>4&15]+Ft[15&s]+Ft[r>>28&15]+Ft[r>>24&15]+Ft[r>>20&15]+Ft[r>>16&15]+Ft[r>>12&15]+Ft[r>>8&15]+Ft[r>>4&15]+Ft[15&r];return Ut(this,Nt)||(l+=Ft[a>>28&15]+Ft[a>>24&15]+Ft[a>>20&15]+Ft[a>>16&15]+Ft[a>>12&15]+Ft[a>>8&15]+Ft[a>>4&15]+Ft[15&a]),l}toString(){return this.hex()}digest(){this.finalize();const t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt),l=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s,r>>24&255,r>>16&255,r>>8&255,255&r];return Ut(this,Nt)||l.push(a>>24&255,a>>16&255,a>>8&255,255&a),l}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(Ut(this,Nt)?28:32),e=new DataView(t);return e.setUint32(0,Ut(this,$t)),e.setUint32(4,Ut(this,Tt)),e.setUint32(8,Ut(this,At)),e.setUint32(12,Ut(this,Lt)),e.setUint32(16,Ut(this,Mt)),e.setUint32(20,Ut(this,Ot)),e.setUint32(24,Ut(this,zt)),Ut(this,Nt)||e.setUint32(28,Ut(this,Pt)),t}}function Kt(t){const e=new Gt;return e.update(t),parseInt(e.hex().substring(0,8),16)}wt=new WeakMap,kt=new WeakMap,St=new WeakMap,Et=new WeakMap,Ct=new WeakMap,$t=new WeakMap,Tt=new WeakMap,At=new WeakMap,Lt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,zt=new WeakMap,Pt=new WeakMap,It=new WeakMap,Dt=new WeakMap,Nt=new WeakMap,Rt=new WeakMap,Bt=new WeakMap;const Yt=function(t,e,i){var n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;return[(t/=360)+1/3,t,t-1/3].map((function(t){return t<0&&t++,t>1&&t--,t=t<1/6?o+6*(n-o)*t:t<.5?n:t<2/3?o+6*(n-o)*(2/3-t):o,Math.round(255*t)}))};const Jt="/api/v2/media.json",Xt=new class{constructor(t={}){const[e,i]=[t.lightness,t.saturation].map((function(t){return t=void 0!==t?t:[.35,.5,.65],Array.isArray(t)?t.concat():[t]}));this.L=e,this.S=i,"number"==typeof t.hue&&(t.hue={min:t.hue,max:t.hue}),"object"!=typeof t.hue||Array.isArray(t.hue)||(t.hue=[t.hue]),void 0===t.hue&&(t.hue=[]),this.hueRanges=t.hue.map((function(t){return{min:void 0===t.min?0:t.min,max:void 0===t.max?360:t.max}})),this.hash=Kt,"function"==typeof t.hash&&(this.hash=t.hash),"bkdr"===t.hash&&(this.hash=Zt)}hsl(t){var e,i,n=this.hash(t);if(this.hueRanges.length){const t=this.hueRanges[n%this.hueRanges.length];e=n/this.hueRanges.length%727*(t.max-t.min)/727+t.min}else e=n%359;return n=Math.ceil(n/360),i=this.S[n%this.S.length],n=Math.ceil(n/this.S.length),[e,i,this.L[n%this.L.length]]}rgb(t){var e=this.hsl(t);return Yt.apply(this,e)}hex(t){var e,i=this.rgb(t);return e="#",i.forEach((function(t){t<16&&(e+=0),e+=t.toString(16)})),e}},Qt=(t={})=>{const e=(t=>{for(const e of document.cookie.split(";")){const i=e.indexOf("=");let n=e.substr(0,i),o=e.substr(i+1);if(n=n.trim(),o=o.trim(),n===t)return o}return null})("csrftoken"),i=e?{"X-CSRFToken":e}:{};return i["X-Requested-With"]="XMLHttpRequest",Object.keys(t).forEach((e=>{i[e]=t[e]})),i},te=(t,e=null,i={})=>new Promise(((n,o)=>{const s={method:"GET",headers:Qt(i)};e&&(s.signal=e.signal),fetch(t,s).then((t=>{t.text().then((i=>{let o={};try{o=JSON.parse(i)}catch(t){}n({controller:e,body:i,json:o,url:t.url,headers:t.headers,status:t.status})}))})).catch((t=>{o(t)}))})),ee=t=>{const e=[];Object.keys(t).forEach((i=>{t[i]&&e.push(i)}));let i=e.join(" ");return i.trim().length>0&&(i=" "+i),i.trim()},ie=(t,e=null)=>new Promise(((i,n)=>{te(t,e).then((t=>{i({results:t.json.results,next:t.json.next})})).catch((t=>n(t)))})),ne=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await ie(i);t.results&&(e=e.concat(t.results)),i=t.next}return e},oe=t=>new Promise(((e,i)=>{te(t).then((t=>{t.status>=200&&t.status<300?e({assets:t.json.results,next:t.json.next}):i(t)})).catch((t=>i(t)))})),se=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await oe(i);t.assets?(e=e.concat(t.assets),i=t.next):i=null}return e},re=(t,e,i={},n=null)=>{const o=Qt(i);n&&(o["Content-Type"]=n);const s={method:"POST",headers:o,body:e};return new Promise(((e,i)=>{fetch(t,s).then((async t=>{t.text().then((i=>{let n={};try{n=JSON.parse(i)}catch(t){}e({body:i,json:n,headers:t.headers,status:t.status,redirected:t.redirected,url:t.url})}))})).catch((t=>{i(t)}))}))},ae=(t,e)=>re(t,JSON.stringify(e),!1,"application/json"),le=(t,e)=>new Promise(((i,n)=>{re(t,e,!0).then((e=>{e.status>=200&&e.status<400?i(e):n(t===Jt?e:"Server failure")})).catch((t=>{console.error(t),n(t)}))})),he=t=>{const e=t.parentNode||t.host;if(e){const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY,i=t&&!(t.includes("hidden")||t.includes("visible"));return e?i&&e.scrollHeight>=e.clientHeight?e:he(e):null}return null},ce=(t,e,i=!1)=>{let n;return function(...o){const s=this,r=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||t.apply(s,o)}),e),r&&t.apply(s,o)}},de=(t,e)=>{let i=!0;return function(...n){i&&(i=!1,t.apply(this,n),setTimeout((()=>{i=!0}),e))}},ue=(t,e)=>t.length>e?t.substring(0,e)+"...":t,pe=(t,e="and")=>1===t.length?t[0]:2===t.length?"html"===t[0].type?D`${t[0]} ${e} ${t[1]}`:t.join(" "+e+" "):"html"===t[0].type?t.map(((i,n)=>n<t.length-1?D`${i}, `:D`${e} ${i}`)):t.join(", ")+e+t[t.length-1],me=(t,e,i="and")=>pe(t.map(e),i),fe=t=>{let e=null;if(document.cookie&&""!=document.cookie){const i=document.cookie.split(";");for(let n=0;n<i.length;n++){const o=i[n].trim();if(o.substring(0,t.length+1)==t+"="){e=decodeURIComponent(o.substring(t.length+1));break}}}return e};var ge;!function(t){t.SETTINGS="settings",t.MENU_COLLAPSED="menu-collapsed",t.TICKET_SHOW_DETAILS="tickets.show-details"}(ge||(ge={}));const ve=([t,...e],i=navigator.language)=>void 0===t?"":t.toLocaleUpperCase(i)+e.join(""),ye=(t,e)=>{if(0==t)return"0 KB";const i=e||2,n=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,n)).toFixed(i))+" "+["B","KB","MB","GB"][n]},be=t=>{t&&(t.stopPropagation(),t.preventDefault())},_e=(t,e,i)=>{i/=100;const n=e*Math.min(i,1-i)/100,o=e=>{const o=(e+t/30)%12,s=i-n*Math.max(Math.min(o-3,9-o,1),-1);return Math.round(255*s).toString(16).padStart(2,"0")};return`#${o(0)}${o(8)}${o(4)}`},xe=t=>{if(t.position||(t.position="right"),t.image)return D`<img src="${t.image}">`;let e=t.name;if(t.user&&(e=`${t.user.first_name} ${t.user.last_name}`),!e)return null;const i=Xt.hex(e);let n=e.indexOf(" ")+1;n<1&&(n=e.length>1?1:0);let o=e.substring(0,1)+e.substring(n,n+1);o=o.toUpperCase();const s=D` <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center"> <div class="avatar-circle" style="display:flex;height:2em;width:2em;flex-direction:row;align-items:center;color:#fff;border-radius:100%;font-weight:400;border:.3em solid rgba(0,0,0,.05);background:${i}"> <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center;flex-grow:1"> <div style="border:0 solid #00f">${o}</div> </div> </div> </div> `;return t.tip?D` <temba-tip text="${e}" position="${t.position}"> ${s} </temba-tip> `:s};var we,ke,Se,Ee;!function(t){t.DayFirst="day_first",t.MonthFirst="month_first",t.YearFirst="year_first"}(we||(we={})),function(t){t.CampaignEvent="campaign_event",t.ScheduledBroadcast="scheduled_broadcast",t.ScheduledTrigger="scheduled_trigger"}(ke||(ke={})),function(t){t.Open="open",t.Closed="closed"}(Se||(Se={})),function(t){t.Loaded="temba-loaded",t.Canceled="temba-canceled",t.CursorChanged="temba-cursor-changed",t.Refreshed="temba-refreshed",t.Selection="temba-selection",t.ButtonClicked="temba-button-clicked",t.DialogHidden="temba-dialog-hidden",t.ScrollThreshold="temba-scroll-threshold",t.ContentChanged="temba-content-changed",t.ContextChanged="temba-context-changed",t.FetchComplete="temba-fetch-complete",t.MessageSent="temba-message-sent",t.Submitted="temba-submitted",t.Redirected="temba-redirected",t.NoPath="temba-no-path",t.StoreUpdated="temba-store-updated",t.Ready="temba-ready",t.OrderChanged="temba-order-changed",t.DragStart="temba-drag-start",t.DragStop="temba-drag-stop",t.Resized="temba-resized"}(Ee||(Ee={}));class Ce{constructor(t=0,e=0){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.size=0,this.ttl=e}has(t){return t in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const e=this.items[t];delete this.items[t],this.size--,null!==e.prev&&(e.prev.next=e.next),null!==e.next&&(e.next.prev=e.prev),this.first===e&&(this.first=e.next),this.last===e&&(this.last=e.prev)}return this}evict(t=!1){if(t||this.size>0){const t=this.first;delete this.items[t.key],this.size--,0===this.size?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}return this}get(t){let e;if(this.has(t)){const i=this.items[t];this.ttl>0&&i.expiry<=(new Date).getTime()?this.delete(t):(e=i.value,this.set(t,e,!0))}return e}keys(){return Object.keys(this.items)}set(t,e,i=!1){let n;if(i||this.has(t)){if(n=this.items[t],n.value=e,this.last!==n){const t=this.last,e=n.next,i=n.prev;this.first===n&&(this.first=n.next),n.next=null,n.prev=this.last,t.next=n,null!==i&&(i.next=e),null!==e&&(e.prev=i)}}else this.max>0&&this.size===this.max&&this.evict(!0),n=this.items[t]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:e},1==++this.size?this.first=n:this.last.next=n;return this.last=n,this}}function $e(t=1e3,e=0){if(isNaN(t)||t<0)throw new TypeError("Invalid max value");if(isNaN(e)||e<0)throw new TypeError("Invalid ttl value");return new Ce(t,e)}class Te extends Error{}class Ae extends Te{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Le extends Te{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Me extends Te{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Oe extends Te{}class ze extends Te{constructor(t){super(`Invalid unit ${t}`)}}class Pe extends Te{}class Ie extends Te{constructor(){super("Zone is an abstract class")}}const De="numeric",Ne="short",Re="long",Be={year:De,month:De,day:De},qe={year:De,month:Ne,day:De},Ue={year:De,month:Ne,day:De,weekday:Ne},Ze={year:De,month:Re,day:De},Fe={year:De,month:Re,day:De,weekday:Re},Ve={hour:De,minute:De},je={hour:De,minute:De,second:De},He={hour:De,minute:De,second:De,timeZoneName:Ne},We={hour:De,minute:De,second:De,timeZoneName:Re},Ge={hour:De,minute:De,hourCycle:"h23"},Ke={hour:De,minute:De,second:De,hourCycle:"h23"},Ye={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Ne},Je={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Re},Xe={year:De,month:De,day:De,hour:De,minute:De},Qe={year:De,month:De,day:De,hour:De,minute:De,second:De},ti={year:De,month:Ne,day:De,hour:De,minute:De},ei={year:De,month:Ne,day:De,hour:De,minute:De,second:De},ii={year:De,month:Ne,day:De,weekday:Ne,hour:De,minute:De},ni={year:De,month:Re,day:De,hour:De,minute:De,timeZoneName:Ne},oi={year:De,month:Re,day:De,hour:De,minute:De,second:De,timeZoneName:Ne},si={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,timeZoneName:Re},ri={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,second:De,timeZoneName:Re};function ai(t){return void 0===t}function li(t){return"number"==typeof t}function hi(t){return"number"==typeof t&&t%1==0}function ci(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function di(t,e,i){if(0!==t.length)return t.reduce(((t,n)=>{const o=[e(n),n];return t&&i(t[0],o[0])===t[0]?t:o}),null)[1]}function ui(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function pi(t,e,i){return hi(t)&&t>=e&&t<=i}function mi(t,e=2){let i;return i=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),i}function fi(t){return ai(t)||null===t||""===t?void 0:parseInt(t,10)}function gi(t){return ai(t)||null===t||""===t?void 0:parseFloat(t)}function vi(t){if(!ai(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function yi(t,e,i=!1){const n=10**e;return(i?Math.trunc:Math.round)(t*n)/n}function bi(t){return t%4==0&&(t%100!=0||t%400==0)}function _i(t){return bi(t)?366:365}function xi(t,e){const i=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===i?bi(t+(e-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function wi(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function ki(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,i=t-1,n=(i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400))%7;return 4===e||3===n?53:52}function Si(t){return t>99?t:t>60?1900+t:2e3+t}function Ei(t,e,i,n=null){const o=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);const r={timeZoneName:e,...s},a=new Intl.DateTimeFormat(i,r).formatToParts(o).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function Ci(t,e){let i=parseInt(t,10);Number.isNaN(i)&&(i=0);const n=parseInt(e,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function $i(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new Pe(`Invalid unit value ${t}`);return e}function Ti(t,e){const i={};for(const n in t)if(ui(t,n)){const o=t[n];if(null==o)continue;i[e(n)]=$i(o)}return i}function Ai(t,e){const i=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(e){case"short":return`${o}${mi(i,2)}:${mi(n,2)}`;case"narrow":return`${o}${i}${n>0?`:${n}`:""}`;case"techie":return`${o}${mi(i,2)}${mi(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Li(t){return function(t,e){return e.reduce(((e,i)=>(e[i]=t[i],e)),{})}(t,["hour","minute","second","millisecond"])}const Mi=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],zi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pi=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ii(t){switch(t){case"narrow":return[...Pi];case"short":return[...zi];case"long":return[...Oi];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 Di=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ni=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ri=["M","T","W","T","F","S","S"];function Bi(t){switch(t){case"narrow":return[...Ri];case"short":return[...Ni];case"long":return[...Di];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qi=["AM","PM"],Ui=["Before Christ","Anno Domini"],Zi=["BC","AD"],Fi=["B","A"];function Vi(t){switch(t){case"narrow":return[...Fi];case"short":return[...Zi];case"long":return[...Ui];default:return null}}function ji(t,e){let i="";for(const n of t)n.literal?i+=n.val:i+=e(n.val);return i}const Hi={D:Be,DD:qe,DDD:Ze,DDDD:Fe,t:Ve,tt:je,ttt:He,tttt:We,T:Ge,TT:Ke,TTT:Ye,TTTT:Je,f:Xe,ff:ti,fff:ni,ffff:si,F:Qe,FF:ei,FFF:oi,FFFF:ri};class Wi{static create(t,e={}){return new Wi(t,e)}static parseFormat(t){let e=null,i="",n=!1;const o=[];for(let s=0;s<t.length;s++){const r=t.charAt(s);"'"===r?(i.length>0&&o.push({literal:n,val:i}),e=null,i="",n=!n):n||r===e?i+=r:(i.length>0&&o.push({literal:!1,val:i}),i=r,e=r)}return i.length>0&&o.push({literal:n,val:i}),o}static macroTokenToFormatOpts(t){return Hi[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTime(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTimeParts(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).formatToParts()}resolvedOptions(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return mi(t,e);const i={...this.opts};return e>0&&(i.padTo=e),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,e){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=(e,i)=>this.loc.extract(t,e,i),s=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",r=()=>i?function(t){return qi[t.hour<12?0:1]}(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,n)=>i?function(t,e){return Ii(e)[t.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month"),l=(e,n)=>i?function(t,e){return Bi(e)[t.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),h=e=>{const i=Wi.macroTokenToFormatOpts(e);return i?this.formatWithSystemDefault(t,i):e},c=e=>i?function(t,e){return Vi(e)[t.year<0?0:1]}(t,e):o({era:e},"era");return ji(Wi.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.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 t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return r();case"d":return n?o({day:"numeric"},"day"):this.num(t.day);case"dd":return n?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return n?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return n?o({month:"numeric"},"month"):this.num(t.month);case"MM":return n?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return n?o({year:"numeric"},"year"):this.num(t.year);case"yy":return n?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(e)}}))}formatDurationFromString(t,e){const i=t=>{switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=Wi.parseFormat(e),o=n.reduce(((t,{literal:e,val:i})=>e?t:t.concat(i)),[]),s=t.shiftTo(...o.map(i).filter((t=>t)));return ji(n,(t=>e=>{const n=i(e);return n?this.num(t.get(n),e.length):e})(s))}}class Gi{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ki{get type(){throw new Ie}get name(){throw new Ie}get ianaName(){return this.name}get isUniversal(){throw new Ie}offsetName(t,e){throw new Ie}formatOffset(t,e){throw new Ie}offset(t){throw new Ie}equals(t){throw new Ie}get isValid(){throw new Ie}}let Yi=null;class Ji extends Ki{static get instance(){return null===Yi&&(Yi=new Ji),Yi}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ei(t,e,i)}formatOffset(t,e){return Ai(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let Xi={};const Qi={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let tn={};class en extends Ki{static create(t){return tn[t]||(tn[t]=new en(t)),tn[t]}static resetCache(){tn={},Xi={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=en.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ei(t,e,i,this.name)}formatOffset(t,e){return Ai(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const i=(n=this.name,Xi[n]||(Xi[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Xi[n]);var n;let[o,s,r,a,l,h,c]=i.formatToParts?function(t,e){const i=t.formatToParts(e),n=[];for(let t=0;t<i.length;t++){const{type:e,value:o}=i[t],s=Qi[e];"era"===e?n[s]=o:ai(s)||(n[s]=parseInt(o,10))}return n}(i,e):function(t,e){const i=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,o,s,r,a,l,h,c]=n;return[r,o,s,a,l,h,c]}(i,e);"BC"===a&&(o=1-Math.abs(o));let d=+e;const u=d%1e3;return d-=u>=0?u:1e3+u,(wi({year:o,month:s,day:r,hour:24===l?0:l,minute:h,second:c,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let nn=null;class on extends Ki{static get utcInstance(){return null===nn&&(nn=new on(0)),nn}static instance(t){return 0===t?on.utcInstance:new on(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new on(Ci(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Ai(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Ai(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return Ai(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class sn extends Ki{constructor(t){super(),this.zoneName=t}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 rn(t,e){if(ai(t)||null===t)return e;if(t instanceof Ki)return t;if(function(t){return"string"==typeof t}(t)){const i=t.toLowerCase();return"local"===i||"system"===i?e:"utc"===i||"gmt"===i?on.utcInstance:on.parseSpecifier(i)||en.create(t)}return li(t)?on.instance(t):"object"==typeof t&&t.offset&&"number"==typeof t.offset?t:new sn(t)}let an,ln=()=>Date.now(),hn="system",cn=null,dn=null,un=null;class pn{static get now(){return ln}static set now(t){ln=t}static set defaultZone(t){hn=t}static get defaultZone(){return rn(hn,Ji.instance)}static get defaultLocale(){return cn}static set defaultLocale(t){cn=t}static get defaultNumberingSystem(){return dn}static set defaultNumberingSystem(t){dn=t}static get defaultOutputCalendar(){return un}static set defaultOutputCalendar(t){un=t}static get throwOnInvalid(){return an}static set throwOnInvalid(t){an=t}static resetCaches(){Sn.resetCache(),en.resetCache()}}let mn={};let fn={};function gn(t,e={}){const i=JSON.stringify([t,e]);let n=fn[i];return n||(n=new Intl.DateTimeFormat(t,e),fn[i]=n),n}let vn={};let yn={};let bn=null;function _n(t,e,i,n,o){const s=t.listingMode(i);return"error"===s?null:"en"===s?n(e):o(e)}class xn{constructor(t,e,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:o,...s}=i;if(!e||Object.keys(s).length>0){const e={useGrouping:!1,...i};i.padTo>0&&(e.minimumIntegerDigits=i.padTo),this.inf=function(t,e={}){const i=JSON.stringify([t,e]);let n=vn[i];return n||(n=new Intl.NumberFormat(t,e),vn[i]=n),n}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return mi(this.floor?Math.floor(t):yi(t,3),this.padTo)}}class wn{constructor(t,e,i){let n;if(this.opts=i,t.zone.isUniversal){const e=t.offset/60*-1,o=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&en.create(o).valid?(n=o,this.dt=t):(n="UTC",i.timeZoneName?this.dt=t:this.dt=0===t.offset?t:Ss.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,n=t.zone.name);const o={...this.opts};n&&(o.timeZone=n),this.dtf=gn(e,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class kn{constructor(t,e,i){this.opts={style:"long",...i},!e&&ci()&&(this.rtf=function(t,e={}){const{base:i,...n}=e,o=JSON.stringify([t,n]);let s=yn[o];return s||(s=new Intl.RelativeTimeFormat(t,e),yn[o]=s),s}(t,i))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,i="always",n=!1){const o={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(t);if("auto"===i&&s){const i="days"===t;switch(e){case 1:return i?"tomorrow":`next ${o[t][0]}`;case-1:return i?"yesterday":`last ${o[t][0]}`;case 0:return i?"today":`this ${o[t][0]}`}}const r=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,h=o[t],c=n?l?h[1]:h[2]||h[1]:l?o[t][0]:t;return r?`${a} ${c} ago`:`in ${a} ${c}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}class Sn{static fromOpts(t){return Sn.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,e,i,n=!1){const o=t||pn.defaultLocale,s=o||(n?"en-US":bn||(bn=(new Intl.DateTimeFormat).resolvedOptions().locale,bn)),r=e||pn.defaultNumberingSystem,a=i||pn.defaultOutputCalendar;return new Sn(s,r,a,o)}static resetCache(){bn=null,fn={},vn={},yn={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:i}={}){return Sn.create(t,e,i)}constructor(t,e,i,n){const[o,s,r]=function(t){const e=t.indexOf("-u-");if(-1===e)return[t];{let i;const n=t.substring(0,e);try{i=gn(t).resolvedOptions()}catch(t){i=gn(n).resolvedOptions()}const{numberingSystem:o,calendar:s}=i;return[n,o,s]}}(t);this.locale=o,this.numberingSystem=e||s||null,this.outputCalendar=i||r||null,this.intl=function(t,e,i){return i||e?(t+="-u",i&&(t+=`-ca-${i}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?Sn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1,i=!0){return _n(this,t,i,Ii,(()=>{const i=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=function(t){const e=[];for(let i=1;i<=12;i++){const n=Ss.utc(2016,i,1);e.push(t(n))}return e}((t=>this.extract(t,i,"month")))),this.monthsCache[n][t]}))}weekdays(t,e=!1,i=!0){return _n(this,t,i,Bi,(()=>{const i=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=function(t){const e=[];for(let i=1;i<=7;i++){const n=Ss.utc(2016,11,13+i);e.push(t(n))}return e}((t=>this.extract(t,i,"weekday")))),this.weekdaysCache[n][t]}))}meridiems(t=!0){return _n(this,void 0,t,(()=>qi),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ss.utc(2016,11,13,9),Ss.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t,e=!0){return _n(this,t,e,Vi,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ss.utc(-40,1,1),Ss.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,i){const n=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===i));return n?n.value:null}numberFormatter(t={}){return new xn(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new wn(t,this.intl,e)}relFormatter(t={}){return new kn(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const i=JSON.stringify([t,e]);let n=mn[i];return n||(n=new Intl.ListFormat(t,e),mn[i]=n),n}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}function En(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function Cn(...t){return e=>t.reduce((([t,i,n],o)=>{const[s,r,a]=o(e,n);return[{...t,...s},r||i,a]}),[{},null,1]).slice(0,2)}function $n(t,...e){if(null==t)return[null,null];for(const[i,n]of e){const e=i.exec(t);if(e)return n(e)}return[null,null]}function Tn(...t){return(e,i)=>{const n={};let o;for(o=0;o<t.length;o++)n[t[o]]=fi(e[i+o]);return[n,null,i+o]}}const An=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Ln=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Mn=RegExp(`${Ln.source}${`(?:${An.source}?(?:\\[(${Mi.source})\\])?)?`}`),On=RegExp(`(?:T${Mn.source})?`),zn=Tn("weekYear","weekNumber","weekDay"),Pn=Tn("year","ordinal"),In=RegExp(`${Ln.source} ?(?:${An.source}|(${Mi.source}))?`),Dn=RegExp(`(?: ${In.source})?`);function Nn(t,e,i){const n=t[e];return ai(n)?i:fi(n)}function Rn(t,e){return[{hours:Nn(t,e,0),minutes:Nn(t,e+1,0),seconds:Nn(t,e+2,0),milliseconds:vi(t[e+3])},null,e+4]}function Bn(t,e){const i=!t[e]&&!t[e+1],n=Ci(t[e+1],t[e+2]);return[{},i?null:on.instance(n),e+3]}function qn(t,e){return[{},t[e]?en.create(t[e]):null,e+1]}const Un=RegExp(`^T?${Ln.source}$`),Zn=/^-?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 Fn(t){const[e,i,n,o,s,r,a,l,h]=t,c="-"===e[0],d=l&&"-"===l[0],u=(t,e=!1)=>void 0!==t&&(e||t&&c)?-t:t;return[{years:u(gi(i)),months:u(gi(n)),weeks:u(gi(o)),days:u(gi(s)),hours:u(gi(r)),minutes:u(gi(a)),seconds:u(gi(l),"-0"===l),milliseconds:u(vi(h),d)}]}const Vn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jn(t,e,i,n,o,s,r){const a={year:2===e.length?Si(fi(e)):fi(e),month:zi.indexOf(i)+1,day:fi(n),hour:fi(o),minute:fi(s)};return r&&(a.second=fi(r)),t&&(a.weekday=t.length>3?Di.indexOf(t)+1:Ni.indexOf(t)+1),a}const Hn=/^(?:(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 Wn(t){const[,e,i,n,o,s,r,a,l,h,c,d]=t,u=jn(e,o,n,i,s,r,a);let p;return p=l?Vn[l]:h?0:Ci(c,d),[u,new on(p)]}const Gn=/^(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$/,Kn=/^(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$/,Yn=/^(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 Jn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,o,n,i,s,r,a),on.utcInstance]}function Xn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,a,i,n,o,s,r),on.utcInstance]}const Qn=En(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,On),to=En(/(\d{4})-?W(\d\d)(?:-?(\d))?/,On),eo=En(/(\d{4})-?(\d{3})/,On),io=En(Mn),no=Cn((function(t,e){return[{year:Nn(t,e),month:Nn(t,e+1,1),day:Nn(t,e+2,1)},null,e+3]}),Rn,Bn,qn),oo=Cn(zn,Rn,Bn,qn),so=Cn(Pn,Rn,Bn,qn),ro=Cn(Rn,Bn,qn);const ao=Cn(Rn);const lo=En(/(\d{4})-(\d\d)-(\d\d)/,Dn),ho=En(In),co=Cn(Rn,Bn,qn);const uo={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}},po={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},...uo},mo=365.2425,fo=30.436875,go={years:{quarters:4,months:12,weeks:52.1775,days:mo,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:fo,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...uo},vo=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],yo=vo.slice(0).reverse();function bo(t,e,i=!1){const n={values:i?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new xo(n)}function _o(t,e,i,n,o){const s=t[o][i],r=e[i]/s,a=!(Math.sign(r)===Math.sign(n[o]))&&0!==n[o]&&Math.abs(r)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(r):Math.trunc(r);n[o]+=a,e[i]-=a*s}class xo{constructor(t){const e="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||Sn.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=e?go:po,this.isLuxonDuration=!0}static fromMillis(t,e){return xo.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new Pe("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new xo({values:Ti(t,xo.normalizeUnit),loc:Sn.fromObject(e),conversionAccuracy:e.conversionAccuracy})}static fromDurationLike(t){if(li(t))return xo.fromMillis(t);if(xo.isDuration(t))return t;if("object"==typeof t)return xo.fromObject(t);throw new Pe(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[i]=function(t){return $n(t,[Zn,Fn])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[i]=function(t){return $n(t,[Un,ao])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Duration is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Me(i);return new xo({invalid:i})}static normalizeUnit(t){const e={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"}[t?t.toLowerCase():t];if(!e)throw new ze(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const i={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Wi.create(this.loc,i).formatDurationFromString(this,t):"Invalid Duration"}toHuman(t={}){const e=vo.map((e=>{const i=this.values[e];return ai(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(i)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=yi(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let n="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===i.seconds&&0===i.milliseconds||(n+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===i.milliseconds||(n+=".SSS"));let o=i.toFormat(n);return t.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t),i={};for(const t of vo)(ui(e.values,t)||ui(this.values,t))&&(i[t]=e.get(t)+this.get(t));return bo(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const i of Object.keys(this.values))e[i]=$i(t(this.values[i],i));return bo(this,{values:e},!0)}get(t){return this[xo.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return bo(this,{values:{...this.values,...Ti(t,xo.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:i}={}){const n={loc:this.loc.clone({locale:t,numberingSystem:e})};return i&&(n.conversionAccuracy=i),bo(this,n)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return function(t,e){yo.reduce(((i,n)=>ai(e[n])?i:(i&&_o(t,e,i,e,n),n)),null)}(this.matrix,t),bo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>xo.normalizeUnit(t)));const e={},i={},n=this.toObject();let o;for(const s of vo)if(t.indexOf(s)>=0){o=s;let t=0;for(const e in i)t+=this.matrix[e][s]*i[e],i[e]=0;li(n[s])&&(t+=n[s]);const r=Math.trunc(t);e[s]=r,i[s]=(1e3*t-1e3*r)/1e3;for(const t in n)vo.indexOf(t)>vo.indexOf(s)&&_o(this.matrix,n,t,e,s)}else li(n[s])&&(i[s]=n[s]);for(const t in i)0!==i[t]&&(e[o]+=t===o?i[t]:i[t]/this.matrix[o][t]);return bo(this,{values:e},!0).normalize()}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return bo(this,{values:t},!0)}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(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const n of vo)if(e=this.values[n],i=t.values[n],!(void 0===e||0===e?void 0===i||0===i:e===i))return!1;var e,i;return!0}}const wo="Invalid Interval";class ko{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Interval is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Le(i);return new ko({invalid:i})}static fromDateTimes(t,e){const i=Es(t),n=Es(e),o=function(t,e){return t&&t.isValid?e&&e.isValid?e<t?ko.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null:ko.invalid("missing or invalid end"):ko.invalid("missing or invalid start")}(i,n);return null==o?new ko({start:i,end:n}):o}static after(t,e){const i=xo.fromDurationLike(e),n=Es(t);return ko.fromDateTimes(n,n.plus(i))}static before(t,e){const i=xo.fromDurationLike(e),n=Es(t);return ko.fromDateTimes(n.minus(i),n)}static fromISO(t,e){const[i,n]=(t||"").split("/",2);if(i&&n){let t,o,s,r;try{t=Ss.fromISO(i,e),o=t.isValid}catch(n){o=!1}try{s=Ss.fromISO(n,e),r=s.isValid}catch(n){r=!1}if(o&&r)return ko.fromDateTimes(t,s);if(o){const i=xo.fromISO(n,e);if(i.isValid)return ko.after(t,i)}else if(r){const t=xo.fromISO(i,e);if(t.isValid)return ko.before(s,t)}}return ko.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e: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(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const e=this.start.startOf(t),i=this.end.startOf(t);return Math.floor(i.diff(e,t).get(t))+1}hasSame(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return!!this.isValid&&this.s>t}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?ko.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(Es).filter((t=>this.contains(t))).sort(),i=[];let{s:n}=this,o=0;for(;n<this.e;){const t=e[o]||this.e,s=+t>+this.e?this.e:t;i.push(ko.fromDateTimes(n,s)),n=s,o+=1}return i}splitBy(t){const e=xo.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let i,{s:n}=this,o=1;const s=[];for(;n<this.e;){const t=this.start.plus(e.mapUnits((t=>t*o)));i=+t>+this.e?this.e:t,s.push(ko.fromDateTimes(n,i)),n=i,o+=1}return s}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return!!this.isValid&&+this.e==+t.s}abutsEnd(t){return!!this.isValid&&+t.e==+this.s}engulfs(t){return!!this.isValid&&(this.s<=t.s&&this.e>=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return e>=i?null:ko.fromDateTimes(e,i)}union(t){if(!this.isValid)return this;const e=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return ko.fromDateTimes(e,i)}static merge(t){const[e,i]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],i)=>e?e.overlaps(i)||e.abutsStart(i)?[t,e.union(i)]:[t.concat([e]),i]:[t,i]),[[],null]);return i&&e.push(i),e}static xor(t){let e=null,i=0;const n=[],o=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),s=Array.prototype.concat(...o).sort(((t,e)=>t.time-e.time));for(const t of s)i+="s"===t.type?1:-1,1===i?e=t.time:(e&&+e!=+t.time&&n.push(ko.fromDateTimes(e,t.time)),e=null);return ko.merge(n)}difference(...t){return ko.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:wo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:wo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:wo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:wo}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:wo}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):xo.invalid(this.invalidReason)}mapEndpoints(t){return ko.fromDateTimes(t(this.s),t(this.e))}}class So{static hasDST(t=pn.defaultZone){const e=Ss.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return en.isValidZone(t)}static normalizeZone(t){return rn(t,pn.defaultZone)}static months(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Sn.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return Sn.create(e,null,"gregory").eras(t)}static features(){return{relative:ci()}}}function Eo(t,e){const i=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(e)-i(t);return Math.floor(xo.fromMillis(n).as("days"))}function Co(t,e,i,n){let[o,s,r,a]=function(t,e,i){const n=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const i=Eo(t,e);return(i-i%7)/7}],["days",Eo]],o={};let s,r;for(const[a,l]of n)if(i.indexOf(a)>=0){s=a;let i=l(t,e);r=t.plus({[a]:i}),r>e?(t=t.plus({[a]:i-1}),i-=1):t=r,o[a]=i}return[t,o,r,s]}(t,e,i);const l=e-o,h=i.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===h.length&&(r<e&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const c=xo.fromObject(s,n);return h.length>0?xo.fromMillis(l,n).shiftTo(...h).plus(c):c}const $o={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},To={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]},Ao=$o.hanidec.replace(/[\[|\]]/g,"").split("");function Lo({numberingSystem:t},e=""){return new RegExp(`${$o[t||"latn"]}${e}`)}function Mo(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let i=0;i<t.length;i++){const n=t.charCodeAt(i);if(-1!==t[i].search($o.hanidec))e+=Ao.indexOf(t[i]);else for(const t in To){const[i,o]=To[t];n>=i&&n<=o&&(e+=n-i)}}return parseInt(e,10)}return e}(t))}}const Oo=`[ ${String.fromCharCode(160)}]`,zo=new RegExp(Oo,"g");function Po(t){return t.replace(/\./g,"\\.?").replace(zo,Oo)}function Io(t){return t.replace(/\./g,"").replace(zo," ").toLowerCase()}function Do(t,e){return null===t?null:{regex:RegExp(t.map(Po).join("|")),deser:([i])=>t.findIndex((t=>Io(i)===Io(t)))+e}}function No(t,e){return{regex:t,deser:([,t,e])=>Ci(t,e),groups:e}}function Ro(t){return{regex:t,deser:([t])=>t}}const Bo={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",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};let qo=null;function Uo(t,e){if(t.literal)return t;const i=Wi.macroTokenToFormatOpts(t.val);if(!i)return t;const n=Wi.create(e,i).formatDateTimeParts((qo||(qo=Ss.fromMillis(1555555555555)),qo)).map((t=>function(t,e,i){const{type:n,value:o}=t;if("literal"===n)return{literal:!0,val:o};const s=i[n];let r=Bo[n];return"object"==typeof r&&(r=r[s]),r?{literal:!1,val:r}:void 0}(t,0,i)));return n.includes(void 0)?t:n}function Zo(t,e,i){const n=function(t,e){return Array.prototype.concat(...t.map((t=>Uo(t,e))))}(Wi.parseFormat(i),t),o=n.map((e=>function(t,e){const i=Lo(e),n=Lo(e,"{2}"),o=Lo(e,"{3}"),s=Lo(e,"{4}"),r=Lo(e,"{6}"),a=Lo(e,"{1,2}"),l=Lo(e,"{1,3}"),h=Lo(e,"{1,6}"),c=Lo(e,"{1,9}"),d=Lo(e,"{2,4}"),u=Lo(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Do(e.eras("short",!1),0);case"GG":return Do(e.eras("long",!1),0);case"y":return Mo(h);case"yy":case"kk":return Mo(d,Si);case"yyyy":case"kkkk":return Mo(s);case"yyyyy":return Mo(u);case"yyyyyy":return Mo(r);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Mo(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Mo(n);case"MMM":return Do(e.months("short",!0,!1),1);case"MMMM":return Do(e.months("long",!0,!1),1);case"LLL":return Do(e.months("short",!1,!1),1);case"LLLL":return Do(e.months("long",!1,!1),1);case"o":case"S":return Mo(l);case"ooo":case"SSS":return Mo(o);case"u":return Ro(c);case"uu":return Ro(a);case"uuu":case"E":case"c":return Mo(i);case"a":return Do(e.meridiems(),0);case"EEE":return Do(e.weekdays("short",!1,!1),1);case"EEEE":return Do(e.weekdays("long",!1,!1),1);case"ccc":return Do(e.weekdays("short",!0,!1),1);case"cccc":return Do(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return No(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return No(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ro(/[a-z_+-/]{1,256}?/i);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),s=o.find((t=>t.invalidReason));if(s)return{input:e,tokens:n,invalidReason:s.invalidReason};{const[t,i]=function(t){const e=t.map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"");return[`^${e}$`,t]}(o),s=RegExp(t,"i"),[r,a]=function(t,e,i){const n=t.match(e);if(n){const t={};let e=1;for(const o in i)if(ui(i,o)){const s=i[o],r=s.groups?s.groups+1:1;!s.literal&&s.token&&(t[s.token.val[0]]=s.deser(n.slice(e,e+r))),e+=r}return[n,t]}return[n,{}]}(e,s,i),[l,h,c]=a?function(t){let e,i=null;ai(t.z)||(i=en.create(t.z)),ai(t.Z)||(i||(i=new on(t.Z)),e=t.Z),ai(t.q)||(t.M=3*(t.q-1)+1),ai(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),ai(t.u)||(t.S=vi(t.u));const n=Object.keys(t).reduce(((e,i)=>{const n=(t=>{switch(t){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}})(i);return n&&(e[n]=t[i]),e}),{});return[n,i,e]}(a):[null,null,void 0];if(ui(a,"a")&&ui(a,"H"))throw new Oe("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:s,rawMatches:r,matches:a,result:l,zone:h,specificOffset:c}}}const Fo=[0,31,59,90,120,151,181,212,243,273,304,334],Vo=[0,31,60,91,121,152,182,213,244,274,305,335];function jo(t,e){return new Gi("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ho(t,e,i){const n=new Date(Date.UTC(t,e-1,i));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const o=n.getUTCDay();return 0===o?7:o}function Wo(t,e,i){return i+(bi(t)?Vo:Fo)[e-1]}function Go(t,e){const i=bi(t)?Vo:Fo,n=i.findIndex((t=>t<e));return{month:n+1,day:e-i[n]}}function Ko(t){const{year:e,month:i,day:n}=t,o=Wo(e,i,n),s=Ho(e,i,n);let r,a=Math.floor((o-s+10)/7);return a<1?(r=e-1,a=ki(r)):a>ki(e)?(r=e+1,a=1):r=e,{weekYear:r,weekNumber:a,weekday:s,...Li(t)}}function Yo(t){const{weekYear:e,weekNumber:i,weekday:n}=t,o=Ho(e,1,4),s=_i(e);let r,a=7*i+n-o-3;a<1?(r=e-1,a+=_i(r)):a>s?(r=e+1,a-=_i(e)):r=e;const{month:l,day:h}=Go(r,a);return{year:r,month:l,day:h,...Li(t)}}function Jo(t){const{year:e,month:i,day:n}=t;return{year:e,ordinal:Wo(e,i,n),...Li(t)}}function Xo(t){const{year:e,ordinal:i}=t,{month:n,day:o}=Go(e,i);return{year:e,month:n,day:o,...Li(t)}}function Qo(t){const e=hi(t.year),i=pi(t.month,1,12),n=pi(t.day,1,xi(t.year,t.month));return e?i?!n&&jo("day",t.day):jo("month",t.month):jo("year",t.year)}function ts(t){const{hour:e,minute:i,second:n,millisecond:o}=t,s=pi(e,0,23)||24===e&&0===i&&0===n&&0===o,r=pi(i,0,59),a=pi(n,0,59),l=pi(o,0,999);return s?r?a?!l&&jo("millisecond",o):jo("second",n):jo("minute",i):jo("hour",e)}const es="Invalid DateTime",is=864e13;function ns(t){return new Gi("unsupported zone",`the zone "${t.name}" is not supported`)}function os(t){return null===t.weekData&&(t.weekData=Ko(t.c)),t.weekData}function ss(t,e){const i={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Ss({...i,...e,old:i})}function rs(t,e,i){let n=t-60*e*1e3;const o=i.offset(n);if(e===o)return[n,e];n-=60*(o-e)*1e3;const s=i.offset(n);return o===s?[n,o]:[t-60*Math.min(o,s)*1e3,Math.max(o,s)]}function as(t,e){const i=new Date(t+=60*e*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function ls(t,e,i){return rs(wi(t),e,i)}function hs(t,e){const i=t.o,n=t.c.year+Math.trunc(e.years),o=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),s={...t.c,year:n,month:o,day:Math.min(t.c.day,xi(n,o))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},r=xo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=wi(s);let[l,h]=rs(a,i,t.zone);return 0!==r&&(l+=r,h=t.zone.offset(l)),{ts:l,o:h}}function cs(t,e,i,n,o,s){const{setZone:r,zone:a}=i;if(t&&0!==Object.keys(t).length){const n=e||a,o=Ss.fromObject(t,{...i,zone:n,specificOffset:s});return r?o:o.setZone(a)}return Ss.invalid(new Gi("unparsable",`the input "${o}" can't be parsed as ${n}`))}function ds(t,e,i=!0){return t.isValid?Wi.create(Sn.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(t,e):null}function us(t,e){const i=t.c.year>9999||t.c.year<0;let n="";return i&&t.c.year>=0&&(n+="+"),n+=mi(t.c.year,i?6:4),e?(n+="-",n+=mi(t.c.month),n+="-",n+=mi(t.c.day)):(n+=mi(t.c.month),n+=mi(t.c.day)),n}function ps(t,e,i,n,o,s){let r=mi(t.c.hour);return e?(r+=":",r+=mi(t.c.minute),0===t.c.second&&i||(r+=":")):r+=mi(t.c.minute),0===t.c.second&&i||(r+=mi(t.c.second),0===t.c.millisecond&&n||(r+=".",r+=mi(t.c.millisecond,3))),o&&(t.isOffsetFixed&&0===t.offset&&!s?r+="Z":t.o<0?(r+="-",r+=mi(Math.trunc(-t.o/60)),r+=":",r+=mi(Math.trunc(-t.o%60))):(r+="+",r+=mi(Math.trunc(t.o/60)),r+=":",r+=mi(Math.trunc(t.o%60)))),s&&(r+="["+t.zone.ianaName+"]"),r}const ms={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},fs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},gs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},vs=["year","month","day","hour","minute","second","millisecond"],ys=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],bs=["year","ordinal","hour","minute","second","millisecond"];function _s(t){const e={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"}[t.toLowerCase()];if(!e)throw new ze(t);return e}function xs(t,e){const i=rn(e.zone,pn.defaultZone),n=Sn.fromObject(e),o=pn.now();let s,r;if(ai(t.year))s=o;else{for(const e of vs)ai(t[e])&&(t[e]=ms[e]);const e=Qo(t)||ts(t);if(e)return Ss.invalid(e);const n=i.offset(o);[s,r]=ls(t,n,i)}return new Ss({ts:s,zone:i,loc:n,o:r})}function ws(t,e,i){const n=!!ai(i.round)||i.round,o=(t,o)=>{t=yi(t,n||i.calendary?0:2,!0);return e.loc.clone(i).relFormatter(i).format(t,o)},s=n=>i.calendary?e.hasSame(t,n)?0:e.startOf(n).diff(t.startOf(n),n).get(n):e.diff(t,n).get(n);if(i.unit)return o(s(i.unit),i.unit);for(const t of i.units){const e=s(t);if(Math.abs(e)>=1)return o(e,t)}return o(t>e?-0:0,i.units[i.units.length-1])}function ks(t){let e,i={};return t.length>0&&"object"==typeof t[t.length-1]?(i=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[i,e]}class Ss{constructor(t){const e=t.zone||pn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Gi("invalid input"):null)||(e.isValid?null:ns(e));this.ts=ai(t.ts)?pn.now():t.ts;let n=null,o=null;if(!i){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[n,o]=[t.old.c,t.old.o];else{const t=e.offset(this.ts);n=as(this.ts,t),i=Number.isNaN(n.year)?new Gi("invalid input"):null,n=i?null:n,o=i?null:t}}this._zone=e,this.loc=t.loc||Sn.create(),this.invalid=i,this.weekData=null,this.c=n,this.o=o,this.isLuxonDateTime=!0}static now(){return new Ss({})}static local(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static utc(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return t.zone=on.utcInstance,xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const i=function(t){return"[object Date]"===Object.prototype.toString.call(t)}(t)?t.valueOf():NaN;if(Number.isNaN(i))return Ss.invalid("invalid input");const n=rn(e.zone,pn.defaultZone);return n.isValid?new Ss({ts:i,zone:n,loc:Sn.fromObject(e)}):Ss.invalid(ns(n))}static fromMillis(t,e={}){if(li(t))return t<-is||t>is?Ss.invalid("Timestamp out of range"):new Ss({ts:t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(li(t))return new Ss({ts:1e3*t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const i=rn(e.zone,pn.defaultZone);if(!i.isValid)return Ss.invalid(ns(i));const n=pn.now(),o=ai(e.specificOffset)?i.offset(n):e.specificOffset,s=Ti(t,_s),r=!ai(s.ordinal),a=!ai(s.year),l=!ai(s.month)||!ai(s.day),h=a||l,c=s.weekYear||s.weekNumber,d=Sn.fromObject(e);if((h||r)&&c)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Oe("Can't mix ordinal dates with month/day");const u=c||s.weekday&&!h;let p,m,f=as(n,o);u?(p=ys,m=fs,f=Ko(f)):r?(p=bs,m=gs,f=Jo(f)):(p=vs,m=ms);let g=!1;for(const t of p){ai(s[t])?s[t]=g?m[t]:f[t]:g=!0}const v=u?function(t){const e=hi(t.weekYear),i=pi(t.weekNumber,1,ki(t.weekYear)),n=pi(t.weekday,1,7);return e?i?!n&&jo("weekday",t.weekday):jo("week",t.week):jo("weekYear",t.weekYear)}(s):r?function(t){const e=hi(t.year),i=pi(t.ordinal,1,_i(t.year));return e?!i&&jo("ordinal",t.ordinal):jo("year",t.year)}(s):Qo(s),y=v||ts(s);if(y)return Ss.invalid(y);const b=u?Yo(s):r?Xo(s):s,[_,x]=ls(b,o,i),w=new Ss({ts:_,zone:i,o:x,loc:d});return s.weekday&&h&&t.weekday!==w.weekday?Ss.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${w.toISO()}`):w}static fromISO(t,e={}){const[i,n]=function(t){return $n(t,[Qn,no],[to,oo],[eo,so],[io,ro])}(t);return cs(i,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[i,n]=function(t){return $n(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Hn,Wn])}(t);return cs(i,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[i,n]=function(t){return $n(t,[Gn,Jn],[Kn,Jn],[Yn,Xn])}(t);return cs(i,n,e,"HTTP",e)}static fromFormat(t,e,i={}){if(ai(t)||ai(e))throw new Pe("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:o=null}=i,s=Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),[r,a,l,h]=function(t,e,i){const{result:n,zone:o,specificOffset:s,invalidReason:r}=Zo(t,e,i);return[n,o,s,r]}(s,t,e);return h?Ss.invalid(h):cs(r,a,i,`format ${e}`,t,l)}static fromString(t,e,i={}){return Ss.fromFormat(t,e,i)}static fromSQL(t,e={}){const[i,n]=function(t){return $n(t,[lo,no],[ho,co])}(t);return cs(i,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the DateTime is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Ae(i);return new Ss({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}get(t){return this[t]}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?os(this).weekYear:NaN}get weekNumber(){return this.isValid?os(this).weekNumber:NaN}get weekday(){return this.isValid?os(this).weekday:NaN}get ordinal(){return this.isValid?Jo(this.c).ordinal:NaN}get monthShort(){return this.isValid?So.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?So.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?So.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?So.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)}get isInLeapYear(){return bi(this.year)}get daysInMonth(){return xi(this.year,this.month)}get daysInYear(){return this.isValid?_i(this.year):NaN}get weeksInWeekYear(){return this.isValid?ki(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:i,calendar:n}=Wi.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:i,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(on.instance(t),e)}toLocal(){return this.setZone(pn.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:i=!1}={}){if((t=rn(t,pn.defaultZone)).equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||i){const e=t.offset(this.ts),i=this.toObject();[n]=ls(i,e,t)}return ss(this,{ts:n,zone:t})}return Ss.invalid(ns(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:i}={}){return ss(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:i})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=Ti(t,_s),i=!ai(e.weekYear)||!ai(e.weekNumber)||!ai(e.weekday),n=!ai(e.ordinal),o=!ai(e.year),s=!ai(e.month)||!ai(e.day),r=o||s,a=e.weekYear||e.weekNumber;if((r||n)&&a)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&n)throw new Oe("Can't mix ordinal dates with month/day");let l;i?l=Yo({...Ko(this.c),...e}):ai(e.ordinal)?(l={...this.toObject(),...e},ai(e.day)&&(l.day=Math.min(xi(l.year,l.month),l.day))):l=Xo({...Jo(this.c),...e});const[h,c]=ls(l,this.o,this.zone);return ss(this,{ts:h,o:c})}plus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t).negate()))}startOf(t){if(!this.isValid)return this;const e={},i=xo.normalizeUnit(t);switch(i){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0}if("weeks"===i&&(e.weekday=1),"quarters"===i){const t=Math.ceil(this.month/3);e.month=3*(t-1)+1}return this.set(e)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,e={}){return this.isValid?Wi.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):es}toLocaleString(t=Be,e={}){return this.isValid?Wi.create(this.loc.clone(e),t).formatDateTime(this):es}toLocaleParts(t={}){return this.isValid?Wi.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const s="extended"===t;let r=us(this,s);return r+="T",r+=ps(this,s,e,i,n,o),r}toISODate({format:t="extended"}={}){return this.isValid?us(this,"extended"===t):null}toISOWeekDate(){return ds(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:o=!1,format:s="extended"}={}){if(!this.isValid)return null;return(n?"T":"")+ps(this,"extended"===s,e,t,i,o)}toRFC2822(){return ds(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ds(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?us(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(e||t)&&(i&&(n+=" "),e?n+="z":t&&(n+="ZZ")),ds(this,n,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():es}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(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",i={}){if(!this.isValid||!t.isValid)return xo.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=(a=e,Array.isArray(a)?a:[a]).map(xo.normalizeUnit),s=t.valueOf()>this.valueOf(),r=Co(s?this:t,s?t:this,o,n);var a;return s?r.negate():r}diffNow(t="milliseconds",e={}){return this.diff(Ss.now(),t,e)}until(t){return this.isValid?ko.fromDateTimes(this,t):this}hasSame(t,e){if(!this.isValid)return!1;const i=t.valueOf(),n=this.setZone(t.zone,{keepLocalTime:!0});return n.startOf(e)<=i&&i<=n.endOf(e)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||Ss.fromObject({},{zone:this.zone}),i=t.padding?this<e?-t.padding:t.padding:0;let n=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(n=t.unit,o=void 0),ws(e,this.plus(i),{...t,numeric:"always",units:n,unit:o})}toRelativeCalendar(t={}){return this.isValid?ws(t.base||Ss.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Ss.isDateTime))throw new Pe("min requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.min)}static max(...t){if(!t.every(Ss.isDateTime))throw new Pe("max requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,i={}){const{locale:n=null,numberingSystem:o=null}=i;return Zo(Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,i={}){return Ss.fromFormatExplain(t,e,i)}static get DATE_SHORT(){return Be}static get DATE_MED(){return qe}static get DATE_MED_WITH_WEEKDAY(){return Ue}static get DATE_FULL(){return Ze}static get DATE_HUGE(){return Fe}static get TIME_SIMPLE(){return Ve}static get TIME_WITH_SECONDS(){return je}static get TIME_WITH_SHORT_OFFSET(){return He}static get TIME_WITH_LONG_OFFSET(){return We}static get TIME_24_SIMPLE(){return Ge}static get TIME_24_WITH_SECONDS(){return Ke}static get TIME_24_WITH_SHORT_OFFSET(){return Ye}static get TIME_24_WITH_LONG_OFFSET(){return Je}static get DATETIME_SHORT(){return Xe}static get DATETIME_SHORT_WITH_SECONDS(){return Qe}static get DATETIME_MED(){return ti}static get DATETIME_MED_WITH_SECONDS(){return ei}static get DATETIME_MED_WITH_WEEKDAY(){return ii}static get DATETIME_FULL(){return ni}static get DATETIME_FULL_WITH_SECONDS(){return oi}static get DATETIME_HUGE(){return si}static get DATETIME_HUGE_WITH_SECONDS(){return ri}}function Es(t){if(Ss.isDateTime(t))return t;if(t&&t.valueOf&&li(t.valueOf()))return Ss.fromJSDate(t);if(t&&"object"==typeof t)return Ss.fromObject(t);throw new Pe(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Cs=(t,e,i)=>{let n=t[0];for(let o=1;o<t.length;o++)n+=e[i?i[o-1]:o-1],n+=t[o];return n},$s=t=>{return"string"!=typeof(e=t)&&"strTag"in e?Cs(t.strings,t.values):t;var e};class Ts{constructor(){this.settled=!1,this.promise=new Promise(((t,e)=>{this._resolve=t,this._reject=e}))}resolve(t){this.settled=!0,this._resolve(t)}reject(t){this.settled=!0,this._reject(t)}}const As=[];for(let t=0;t<256;t++)As[t]=(t>>4&15).toString(16)+(15&t).toString(16);function Ls(t,e){return(e?"h":"s")+function(t){let e=0,i=8997,n=0,o=33826,s=0,r=40164,a=0,l=52210;for(let h=0;h<t.length;h++)i^=t.charCodeAt(h),e=435*i,n=435*o,s=435*r,a=435*l,s+=i<<8,a+=o<<8,n+=e>>>16,i=65535&e,s+=n>>>16,o=65535&n,l=a+(s>>>16)&65535,r=65535&s;return As[l>>8]+As[255&l]+As[r>>8]+As[255&r]+As[o>>8]+As[255&o]+As[i>>8]+As[255&i]}("string"==typeof t?t:t.join(""))}const Ms=new WeakMap,Os=new Map;function zs(t,e,i){var n;if(t){const o=null!==(n=null==i?void 0:i.id)&&void 0!==n?n:function(t){const e="string"==typeof t?t:t.strings;let i=Os.get(e);void 0===i&&(i=Ls(e,"string"!=typeof t&&!("strTag"in t)),Os.set(e,i));return i}(e),s=t[o];if(s){if("string"==typeof s)return s;if("strTag"in s)return Cs(s.strings,e.values,s.values);{let t=Ms.get(s);return void 0===t&&(t=s.values,Ms.set(s,t)),{...s,values:t.map((t=>e.values[t]))}}}}return $s(e)}function Ps(t){window.dispatchEvent(new CustomEvent("lit-localize-status",{detail:t}))}let Is,Ds,Ns,Rs,Bs,qs="",Us=new Ts;Us.resolve();let Zs=0;const Fs=()=>qs,Vs=t=>{if(t===(null!=Is?Is:qs))return Us.promise;if(!Ns||!Rs)throw new Error("Internal error");if(!Ns.has(t))throw new Error("Invalid locale code");Zs++;const e=Zs;Is=t,Us.settled&&(Us=new Ts),Ps({status:"loading",loadingLocale:t});return(t===Ds?Promise.resolve({templates:void 0}):Rs(t)).then((i=>{Zs===e&&(qs=t,Is=void 0,Bs=i.templates,Ps({status:"ready",readyLocale:t}),Us.resolve())}),(i=>{Zs===e&&(Ps({status:"error",errorLocale:t,errorMessage:i.toString()}),Us.reject(i))})),Us.promise};let js=$s,Hs=!1;const Ws=["es","fr","pt"],{setLocale:Gs}=(t=>(function(t){if(Hs)throw new Error("lit-localize can only be configured once");js=t,Hs=!0}(((t,e)=>zs(Bs,t,e))),qs=Ds=t.sourceLocale,Ns=new Set(t.targetLocales),Ns.add(t.sourceLocale),Rs=t.loadLocale,{getLocale:Fs,setLocale:Vs}))({sourceLocale:"en",targetLocales:Ws,loadLocale:t=>import(`./locales/${t}.js`)});class Ks extends lt{constructor(){super(...arguments),this.settings={},this.ttl=6e4,this.max=20,this.ready=!1,this.loader=!1,this.keyedAssets={},this.locale=[...navigator.languages],this.fields={},this.groups={},this.languages={},this.featuredFields=[],this.pendingResolves={},this.fetching={}}static get styles(){return r`
227
+ `}}t([ct({type:Boolean})],xt.prototype,"textarea",void 0),t([ct({type:String})],xt.prototype,"placeholder",void 0),t([ct({type:Boolean})],xt.prototype,"password",void 0),t([ct({type:Number})],xt.prototype,"maxlength",void 0),t([ct({type:Object})],xt.prototype,"inputElement",void 0),t([ct({type:Boolean})],xt.prototype,"clearable",void 0),t([ct({type:Boolean})],xt.prototype,"gsm",void 0),t([ct({type:String})],xt.prototype,"counter",void 0),t([ct({type:Boolean})],xt.prototype,"loading",void 0),t([ct({type:Boolean})],xt.prototype,"submitOnEnter",void 0),t([ct()],xt.prototype,"onBlur",void 0),t([ct({type:Boolean})],xt.prototype,"autogrow",void 0);var wt,kt,St,Et,Ct,$t,Tt,At,Lt,Mt,Ot,zt,Pt,It,Dt,Nt,Rt,Bt,qt=function(t,e,i){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,i),i},Ut=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)};const Zt=function(t){var e=0;t+="x";var i=Math.floor(65745979961613.07);for(let n=0;n<t.length;n++)e>i&&(e=Math.floor(e/137)),e=131*e+t.charCodeAt(n);return e},Ft="0123456789abcdef".split(""),Vt=[-2147483648,8388608,32768,128],jt=[24,16,8,0],Ht=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Wt=[];class Gt{constructor(t=!1,e=!1){wt.set(this,void 0),kt.set(this,void 0),St.set(this,void 0),Et.set(this,void 0),Ct.set(this,void 0),$t.set(this,void 0),Tt.set(this,void 0),At.set(this,void 0),Lt.set(this,void 0),Mt.set(this,void 0),Ot.set(this,void 0),zt.set(this,void 0),Pt.set(this,void 0),It.set(this,void 0),Dt.set(this,void 0),Nt.set(this,void 0),Rt.set(this,0),Bt.set(this,void 0),this.init(t,e)}init(t,e){e?(Wt[0]=Wt[16]=Wt[1]=Wt[2]=Wt[3]=Wt[4]=Wt[5]=Wt[6]=Wt[7]=Wt[8]=Wt[9]=Wt[10]=Wt[11]=Wt[12]=Wt[13]=Wt[14]=Wt[15]=0,qt(this,kt,Wt)):qt(this,kt,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(qt(this,$t,3238371032),qt(this,Tt,914150663),qt(this,At,812702999),qt(this,Lt,4144912697),qt(this,Mt,4290775857),qt(this,Ot,1750603025),qt(this,zt,1694076839),qt(this,Pt,3204075428)):(qt(this,$t,1779033703),qt(this,Tt,3144134277),qt(this,At,1013904242),qt(this,Lt,2773480762),qt(this,Mt,1359893119),qt(this,Ot,2600822924),qt(this,zt,528734635),qt(this,Pt,1541459225)),qt(this,wt,qt(this,Bt,qt(this,St,qt(this,Dt,0)))),qt(this,Et,qt(this,It,!1)),qt(this,Ct,!0),qt(this,Nt,t)}update(t){if(Ut(this,Et))return this;let e;e=t instanceof ArrayBuffer?new Uint8Array(t):t;let i=0;const n=e.length,o=Ut(this,kt);for(;i<n;){let t;if(Ut(this,It)&&(qt(this,It,!1),o[0]=Ut(this,wt),o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),"string"!=typeof e)for(t=Ut(this,Bt);i<n&&t<64;++i)o[t>>2]|=e[i]<<jt[3&t++];else for(t=Ut(this,Bt);i<n&&t<64;++i){let n=e.charCodeAt(i);n<128?o[t>>2]|=n<<jt[3&t++]:n<2048?(o[t>>2]|=(192|n>>6)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++]):n<55296||n>=57344?(o[t>>2]|=(224|n>>12)<<jt[3&t++],o[t>>2]|=(128|n>>6&63)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++i)),o[t>>2]|=(240|n>>18)<<jt[3&t++],o[t>>2]|=(128|n>>12&63)<<jt[3&t++],o[t>>2]|=(128|n>>6&63)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++])}qt(this,Rt,t),qt(this,St,Ut(this,St)+(t-Ut(this,Bt))),t>=64?(qt(this,wt,o[16]),qt(this,Bt,t-64),this.hash(),qt(this,It,!0)):qt(this,Bt,t)}return Ut(this,St)>4294967295&&(qt(this,Dt,Ut(this,Dt)+(Ut(this,St)/4294967296<<0)),qt(this,St,Ut(this,St)%4294967296)),this}finalize(){if(Ut(this,Et))return;qt(this,Et,!0);const t=Ut(this,kt),e=Ut(this,Rt);t[16]=Ut(this,wt),t[e>>2]|=Vt[3&e],qt(this,wt,t[16]),e>=56&&(Ut(this,It)||this.hash(),t[0]=Ut(this,wt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=Ut(this,Dt)<<3|Ut(this,St)>>>29,t[15]=Ut(this,St)<<3,this.hash()}hash(){let t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt);const l=Ut(this,kt);let h,c,d,u,p,m,f,g,v,y;for(let t=16;t<64;++t)u=l[t-15],h=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,u=l[t-2],c=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,l[t]=l[t-16]+h+l[t-7]+c<<0;y=e&i;for(let b=0;b<64;b+=4)Ut(this,Ct)?(Ut(this,Nt)?(f=300032,u=l[0]-1413257819,a=u-150054599<<0,n=u+24177077<<0):(f=704751109,u=l[0]-210244248,a=u-1521486534<<0,n=u+143694565<<0),qt(this,Ct,!1)):(h=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),c=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),f=t&e,d=f^t&i^y,m=o&s^~o&r,u=a+c+m+Ht[b]+l[b],p=h+d,a=n+u<<0,n=u+p<<0),h=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),c=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),g=n&t,d=g^n&e^f,m=a&o^~a&s,u=r+c+m+Ht[b+1]+l[b+1],p=h+d,r=i+u<<0,i=u+p<<0,h=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),c=(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7),v=i&n,d=v^i&t^g,m=r&a^~r&o,u=s+c+m+Ht[b+2]+l[b+2],p=h+d,s=e+u<<0,e=u+p<<0,h=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),c=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),y=e&i,d=y^e&n^v,m=s&r^~s&a,u=o+c+m+Ht[b+3]+l[b+3],p=h+d,o=t+u<<0,t=u+p<<0;qt(this,$t,Ut(this,$t)+t<<0),qt(this,Tt,Ut(this,Tt)+e<<0),qt(this,At,Ut(this,At)+i<<0),qt(this,Lt,Ut(this,Lt)+n<<0),qt(this,Mt,Ut(this,Mt)+o<<0),qt(this,Ot,Ut(this,Ot)+s<<0),qt(this,zt,Ut(this,zt)+r<<0),qt(this,Pt,Ut(this,Pt)+a<<0)}hex(){this.finalize();const t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt);let l=Ft[t>>28&15]+Ft[t>>24&15]+Ft[t>>20&15]+Ft[t>>16&15]+Ft[t>>12&15]+Ft[t>>8&15]+Ft[t>>4&15]+Ft[15&t]+Ft[e>>28&15]+Ft[e>>24&15]+Ft[e>>20&15]+Ft[e>>16&15]+Ft[e>>12&15]+Ft[e>>8&15]+Ft[e>>4&15]+Ft[15&e]+Ft[i>>28&15]+Ft[i>>24&15]+Ft[i>>20&15]+Ft[i>>16&15]+Ft[i>>12&15]+Ft[i>>8&15]+Ft[i>>4&15]+Ft[15&i]+Ft[n>>28&15]+Ft[n>>24&15]+Ft[n>>20&15]+Ft[n>>16&15]+Ft[n>>12&15]+Ft[n>>8&15]+Ft[n>>4&15]+Ft[15&n]+Ft[o>>28&15]+Ft[o>>24&15]+Ft[o>>20&15]+Ft[o>>16&15]+Ft[o>>12&15]+Ft[o>>8&15]+Ft[o>>4&15]+Ft[15&o]+Ft[s>>28&15]+Ft[s>>24&15]+Ft[s>>20&15]+Ft[s>>16&15]+Ft[s>>12&15]+Ft[s>>8&15]+Ft[s>>4&15]+Ft[15&s]+Ft[r>>28&15]+Ft[r>>24&15]+Ft[r>>20&15]+Ft[r>>16&15]+Ft[r>>12&15]+Ft[r>>8&15]+Ft[r>>4&15]+Ft[15&r];return Ut(this,Nt)||(l+=Ft[a>>28&15]+Ft[a>>24&15]+Ft[a>>20&15]+Ft[a>>16&15]+Ft[a>>12&15]+Ft[a>>8&15]+Ft[a>>4&15]+Ft[15&a]),l}toString(){return this.hex()}digest(){this.finalize();const t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt),l=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s,r>>24&255,r>>16&255,r>>8&255,255&r];return Ut(this,Nt)||l.push(a>>24&255,a>>16&255,a>>8&255,255&a),l}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(Ut(this,Nt)?28:32),e=new DataView(t);return e.setUint32(0,Ut(this,$t)),e.setUint32(4,Ut(this,Tt)),e.setUint32(8,Ut(this,At)),e.setUint32(12,Ut(this,Lt)),e.setUint32(16,Ut(this,Mt)),e.setUint32(20,Ut(this,Ot)),e.setUint32(24,Ut(this,zt)),Ut(this,Nt)||e.setUint32(28,Ut(this,Pt)),t}}function Kt(t){const e=new Gt;return e.update(t),parseInt(e.hex().substring(0,8),16)}wt=new WeakMap,kt=new WeakMap,St=new WeakMap,Et=new WeakMap,Ct=new WeakMap,$t=new WeakMap,Tt=new WeakMap,At=new WeakMap,Lt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,zt=new WeakMap,Pt=new WeakMap,It=new WeakMap,Dt=new WeakMap,Nt=new WeakMap,Rt=new WeakMap,Bt=new WeakMap;const Yt=function(t,e,i){var n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;return[(t/=360)+1/3,t,t-1/3].map((function(t){return t<0&&t++,t>1&&t--,t=t<1/6?o+6*(n-o)*t:t<.5?n:t<2/3?o+6*(n-o)*(2/3-t):o,Math.round(255*t)}))};const Jt="/api/v2/media.json",Xt=new class{constructor(t={}){const[e,i]=[t.lightness,t.saturation].map((function(t){return t=void 0!==t?t:[.35,.5,.65],Array.isArray(t)?t.concat():[t]}));this.L=e,this.S=i,"number"==typeof t.hue&&(t.hue={min:t.hue,max:t.hue}),"object"!=typeof t.hue||Array.isArray(t.hue)||(t.hue=[t.hue]),void 0===t.hue&&(t.hue=[]),this.hueRanges=t.hue.map((function(t){return{min:void 0===t.min?0:t.min,max:void 0===t.max?360:t.max}})),this.hash=Kt,"function"==typeof t.hash&&(this.hash=t.hash),"bkdr"===t.hash&&(this.hash=Zt)}hsl(t){var e,i,n=this.hash(t);if(this.hueRanges.length){const t=this.hueRanges[n%this.hueRanges.length];e=n/this.hueRanges.length%727*(t.max-t.min)/727+t.min}else e=n%359;return n=Math.ceil(n/360),i=this.S[n%this.S.length],n=Math.ceil(n/this.S.length),[e,i,this.L[n%this.L.length]]}rgb(t){var e=this.hsl(t);return Yt.apply(this,e)}hex(t){var e,i=this.rgb(t);return e="#",i.forEach((function(t){t<16&&(e+=0),e+=t.toString(16)})),e}},Qt=(t={})=>{const e=(t=>{for(const e of document.cookie.split(";")){const i=e.indexOf("=");let n=e.substr(0,i),o=e.substr(i+1);if(n=n.trim(),o=o.trim(),n===t)return o}return null})("csrftoken"),i=e?{"X-CSRFToken":e}:{};return i["X-Requested-With"]="XMLHttpRequest",Object.keys(t).forEach((e=>{i[e]=t[e]})),i},te=(t,e=null,i={})=>new Promise(((n,o)=>{const s={method:"GET",headers:Qt(i)};e&&(s.signal=e.signal),fetch(t,s).then((t=>{t.text().then((i=>{let o={};try{o=JSON.parse(i)}catch(t){}n({controller:e,body:i,json:o,url:t.url,headers:t.headers,status:t.status})}))})).catch((t=>{o(t)}))})),ee=t=>{const e=[];Object.keys(t).forEach((i=>{t[i]&&e.push(i)}));let i=e.join(" ");return i.trim().length>0&&(i=" "+i),i.trim()},ie=(t,e=null)=>new Promise(((i,n)=>{te(t,e).then((t=>{i({results:t.json.results,next:t.json.next})})).catch((t=>n(t)))})),ne=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await ie(i);t.results&&(e=e.concat(t.results)),i=t.next}return e},oe=t=>new Promise(((e,i)=>{te(t).then((t=>{t.status>=200&&t.status<300?e({assets:t.json.results,next:t.json.next}):i(t)})).catch((t=>i(t)))})),se=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await oe(i);t.assets?(e=e.concat(t.assets),i=t.next):i=null}return e},re=(t,e,i={},n=null)=>{const o=Qt(i);n&&(o["Content-Type"]=n);const s={method:"POST",headers:o,body:e};return new Promise(((e,i)=>{fetch(t,s).then((async t=>{t.text().then((i=>{let n={};try{n=JSON.parse(i)}catch(t){}e({body:i,json:n,headers:t.headers,status:t.status,redirected:t.redirected,url:t.url})}))})).catch((t=>{i(t)}))}))},ae=(t,e)=>re(t,JSON.stringify(e),!1,"application/json"),le=(t,e)=>new Promise(((i,n)=>{re(t,e,!0).then((e=>{e.status>=200&&e.status<400?i(e):n(t===Jt?e:"Server failure")})).catch((t=>{console.error(t),n(t)}))})),he=t=>{const e=t.parentNode||t.host;if(e){const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY,i=t&&!(t.includes("hidden")||t.includes("visible"));return e?i&&e.scrollHeight>=e.clientHeight?e:he(e):null}return null},ce=(t,e,i=!1)=>{let n;return function(...o){const s=this,r=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||t.apply(s,o)}),e),r&&t.apply(s,o)}},de=(t,e)=>{let i=!0;return function(...n){i&&(i=!1,t.apply(this,n),setTimeout((()=>{i=!0}),e))}},ue=(t,e)=>t.length>e?t.substring(0,e)+"...":t,pe=(t,e="and")=>1===t.length?t[0]:2===t.length?"object"==typeof t[0]?D`${t[0]} ${e} ${t[1]}`:t.join(" "+e+" "):"object"==typeof t[0]?t.map(((i,n)=>n<t.length-1?D`${i}, `:D`${e} ${i}`)):t.join(", ")+e+t[t.length-1],me=(t,e,i="and")=>pe(t.map(e),i),fe=t=>{let e=null;if(document.cookie&&""!=document.cookie){const i=document.cookie.split(";");for(let n=0;n<i.length;n++){const o=i[n].trim();if(o.substring(0,t.length+1)==t+"="){e=decodeURIComponent(o.substring(t.length+1));break}}}return e};var ge;!function(t){t.SETTINGS="settings",t.MENU_COLLAPSED="menu-collapsed",t.TICKET_SHOW_DETAILS="tickets.show-details"}(ge||(ge={}));const ve=([t,...e],i=navigator.language)=>void 0===t?"":t.toLocaleUpperCase(i)+e.join(""),ye=(t,e)=>{if(0==t)return"0 KB";const i=e||2,n=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,n)).toFixed(i))+" "+["B","KB","MB","GB"][n]},be=t=>{t&&(t.stopPropagation(),t.preventDefault())},_e=(t,e,i)=>{i/=100;const n=e*Math.min(i,1-i)/100,o=e=>{const o=(e+t/30)%12,s=i-n*Math.max(Math.min(o-3,9-o,1),-1);return Math.round(255*s).toString(16).padStart(2,"0")};return`#${o(0)}${o(8)}${o(4)}`},xe=t=>{if(t.position||(t.position="right"),t.image)return D`<img src="${t.image}">`;let e=t.name;if(t.user&&(e=`${t.user.first_name} ${t.user.last_name}`),!e)return null;const i=Xt.hex(e);let n=e.indexOf(" ")+1;n<1&&(n=e.length>1?1:0);let o=e.substring(0,1)+e.substring(n,n+1);o=o.toUpperCase();const s=D` <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center"> <div class="avatar-circle" style="display:flex;height:2em;width:2em;flex-direction:row;align-items:center;color:#fff;border-radius:100%;font-weight:400;border:.3em solid rgba(0,0,0,.05);background:${i}"> <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center;flex-grow:1"> <div style="border:0 solid #00f">${o}</div> </div> </div> </div> `;return t.tip?D` <temba-tip text="${e}" position="${t.position}"> ${s} </temba-tip> `:s};var we,ke,Se,Ee;!function(t){t.DayFirst="day_first",t.MonthFirst="month_first",t.YearFirst="year_first"}(we||(we={})),function(t){t.CampaignEvent="campaign_event",t.ScheduledBroadcast="scheduled_broadcast",t.ScheduledTrigger="scheduled_trigger"}(ke||(ke={})),function(t){t.Open="open",t.Closed="closed"}(Se||(Se={})),function(t){t.Loaded="temba-loaded",t.Canceled="temba-canceled",t.CursorChanged="temba-cursor-changed",t.Refreshed="temba-refreshed",t.Selection="temba-selection",t.ButtonClicked="temba-button-clicked",t.DialogHidden="temba-dialog-hidden",t.ScrollThreshold="temba-scroll-threshold",t.ContentChanged="temba-content-changed",t.ContextChanged="temba-context-changed",t.FetchComplete="temba-fetch-complete",t.MessageSent="temba-message-sent",t.Submitted="temba-submitted",t.Redirected="temba-redirected",t.NoPath="temba-no-path",t.StoreUpdated="temba-store-updated",t.Ready="temba-ready",t.OrderChanged="temba-order-changed",t.DragStart="temba-drag-start",t.DragStop="temba-drag-stop",t.Resized="temba-resized"}(Ee||(Ee={}));class Ce{constructor(t=0,e=0){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.size=0,this.ttl=e}has(t){return t in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const e=this.items[t];delete this.items[t],this.size--,null!==e.prev&&(e.prev.next=e.next),null!==e.next&&(e.next.prev=e.prev),this.first===e&&(this.first=e.next),this.last===e&&(this.last=e.prev)}return this}evict(t=!1){if(t||this.size>0){const t=this.first;delete this.items[t.key],this.size--,0===this.size?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}return this}get(t){let e;if(this.has(t)){const i=this.items[t];this.ttl>0&&i.expiry<=(new Date).getTime()?this.delete(t):(e=i.value,this.set(t,e,!0))}return e}keys(){return Object.keys(this.items)}set(t,e,i=!1){let n;if(i||this.has(t)){if(n=this.items[t],n.value=e,this.last!==n){const t=this.last,e=n.next,i=n.prev;this.first===n&&(this.first=n.next),n.next=null,n.prev=this.last,t.next=n,null!==i&&(i.next=e),null!==e&&(e.prev=i)}}else this.max>0&&this.size===this.max&&this.evict(!0),n=this.items[t]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:e},1==++this.size?this.first=n:this.last.next=n;return this.last=n,this}}function $e(t=1e3,e=0){if(isNaN(t)||t<0)throw new TypeError("Invalid max value");if(isNaN(e)||e<0)throw new TypeError("Invalid ttl value");return new Ce(t,e)}class Te extends Error{}class Ae extends Te{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Le extends Te{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Me extends Te{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Oe extends Te{}class ze extends Te{constructor(t){super(`Invalid unit ${t}`)}}class Pe extends Te{}class Ie extends Te{constructor(){super("Zone is an abstract class")}}const De="numeric",Ne="short",Re="long",Be={year:De,month:De,day:De},qe={year:De,month:Ne,day:De},Ue={year:De,month:Ne,day:De,weekday:Ne},Ze={year:De,month:Re,day:De},Fe={year:De,month:Re,day:De,weekday:Re},Ve={hour:De,minute:De},je={hour:De,minute:De,second:De},He={hour:De,minute:De,second:De,timeZoneName:Ne},We={hour:De,minute:De,second:De,timeZoneName:Re},Ge={hour:De,minute:De,hourCycle:"h23"},Ke={hour:De,minute:De,second:De,hourCycle:"h23"},Ye={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Ne},Je={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Re},Xe={year:De,month:De,day:De,hour:De,minute:De},Qe={year:De,month:De,day:De,hour:De,minute:De,second:De},ti={year:De,month:Ne,day:De,hour:De,minute:De},ei={year:De,month:Ne,day:De,hour:De,minute:De,second:De},ii={year:De,month:Ne,day:De,weekday:Ne,hour:De,minute:De},ni={year:De,month:Re,day:De,hour:De,minute:De,timeZoneName:Ne},oi={year:De,month:Re,day:De,hour:De,minute:De,second:De,timeZoneName:Ne},si={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,timeZoneName:Re},ri={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,second:De,timeZoneName:Re};function ai(t){return void 0===t}function li(t){return"number"==typeof t}function hi(t){return"number"==typeof t&&t%1==0}function ci(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function di(t,e,i){if(0!==t.length)return t.reduce(((t,n)=>{const o=[e(n),n];return t&&i(t[0],o[0])===t[0]?t:o}),null)[1]}function ui(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function pi(t,e,i){return hi(t)&&t>=e&&t<=i}function mi(t,e=2){let i;return i=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),i}function fi(t){return ai(t)||null===t||""===t?void 0:parseInt(t,10)}function gi(t){return ai(t)||null===t||""===t?void 0:parseFloat(t)}function vi(t){if(!ai(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function yi(t,e,i=!1){const n=10**e;return(i?Math.trunc:Math.round)(t*n)/n}function bi(t){return t%4==0&&(t%100!=0||t%400==0)}function _i(t){return bi(t)?366:365}function xi(t,e){const i=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===i?bi(t+(e-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function wi(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function ki(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,i=t-1,n=(i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400))%7;return 4===e||3===n?53:52}function Si(t){return t>99?t:t>60?1900+t:2e3+t}function Ei(t,e,i,n=null){const o=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);const r={timeZoneName:e,...s},a=new Intl.DateTimeFormat(i,r).formatToParts(o).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function Ci(t,e){let i=parseInt(t,10);Number.isNaN(i)&&(i=0);const n=parseInt(e,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function $i(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new Pe(`Invalid unit value ${t}`);return e}function Ti(t,e){const i={};for(const n in t)if(ui(t,n)){const o=t[n];if(null==o)continue;i[e(n)]=$i(o)}return i}function Ai(t,e){const i=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(e){case"short":return`${o}${mi(i,2)}:${mi(n,2)}`;case"narrow":return`${o}${i}${n>0?`:${n}`:""}`;case"techie":return`${o}${mi(i,2)}${mi(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Li(t){return function(t,e){return e.reduce(((e,i)=>(e[i]=t[i],e)),{})}(t,["hour","minute","second","millisecond"])}const Mi=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],zi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pi=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ii(t){switch(t){case"narrow":return[...Pi];case"short":return[...zi];case"long":return[...Oi];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 Di=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ni=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ri=["M","T","W","T","F","S","S"];function Bi(t){switch(t){case"narrow":return[...Ri];case"short":return[...Ni];case"long":return[...Di];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qi=["AM","PM"],Ui=["Before Christ","Anno Domini"],Zi=["BC","AD"],Fi=["B","A"];function Vi(t){switch(t){case"narrow":return[...Fi];case"short":return[...Zi];case"long":return[...Ui];default:return null}}function ji(t,e){let i="";for(const n of t)n.literal?i+=n.val:i+=e(n.val);return i}const Hi={D:Be,DD:qe,DDD:Ze,DDDD:Fe,t:Ve,tt:je,ttt:He,tttt:We,T:Ge,TT:Ke,TTT:Ye,TTTT:Je,f:Xe,ff:ti,fff:ni,ffff:si,F:Qe,FF:ei,FFF:oi,FFFF:ri};class Wi{static create(t,e={}){return new Wi(t,e)}static parseFormat(t){let e=null,i="",n=!1;const o=[];for(let s=0;s<t.length;s++){const r=t.charAt(s);"'"===r?(i.length>0&&o.push({literal:n,val:i}),e=null,i="",n=!n):n||r===e?i+=r:(i.length>0&&o.push({literal:!1,val:i}),i=r,e=r)}return i.length>0&&o.push({literal:n,val:i}),o}static macroTokenToFormatOpts(t){return Hi[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTime(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTimeParts(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).formatToParts()}resolvedOptions(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return mi(t,e);const i={...this.opts};return e>0&&(i.padTo=e),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,e){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=(e,i)=>this.loc.extract(t,e,i),s=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",r=()=>i?function(t){return qi[t.hour<12?0:1]}(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,n)=>i?function(t,e){return Ii(e)[t.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month"),l=(e,n)=>i?function(t,e){return Bi(e)[t.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),h=e=>{const i=Wi.macroTokenToFormatOpts(e);return i?this.formatWithSystemDefault(t,i):e},c=e=>i?function(t,e){return Vi(e)[t.year<0?0:1]}(t,e):o({era:e},"era");return ji(Wi.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.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 t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return r();case"d":return n?o({day:"numeric"},"day"):this.num(t.day);case"dd":return n?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return n?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return n?o({month:"numeric"},"month"):this.num(t.month);case"MM":return n?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return n?o({year:"numeric"},"year"):this.num(t.year);case"yy":return n?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(e)}}))}formatDurationFromString(t,e){const i=t=>{switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=Wi.parseFormat(e),o=n.reduce(((t,{literal:e,val:i})=>e?t:t.concat(i)),[]),s=t.shiftTo(...o.map(i).filter((t=>t)));return ji(n,(t=>e=>{const n=i(e);return n?this.num(t.get(n),e.length):e})(s))}}class Gi{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ki{get type(){throw new Ie}get name(){throw new Ie}get ianaName(){return this.name}get isUniversal(){throw new Ie}offsetName(t,e){throw new Ie}formatOffset(t,e){throw new Ie}offset(t){throw new Ie}equals(t){throw new Ie}get isValid(){throw new Ie}}let Yi=null;class Ji extends Ki{static get instance(){return null===Yi&&(Yi=new Ji),Yi}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ei(t,e,i)}formatOffset(t,e){return Ai(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let Xi={};const Qi={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let tn={};class en extends Ki{static create(t){return tn[t]||(tn[t]=new en(t)),tn[t]}static resetCache(){tn={},Xi={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=en.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ei(t,e,i,this.name)}formatOffset(t,e){return Ai(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const i=(n=this.name,Xi[n]||(Xi[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Xi[n]);var n;let[o,s,r,a,l,h,c]=i.formatToParts?function(t,e){const i=t.formatToParts(e),n=[];for(let t=0;t<i.length;t++){const{type:e,value:o}=i[t],s=Qi[e];"era"===e?n[s]=o:ai(s)||(n[s]=parseInt(o,10))}return n}(i,e):function(t,e){const i=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,o,s,r,a,l,h,c]=n;return[r,o,s,a,l,h,c]}(i,e);"BC"===a&&(o=1-Math.abs(o));let d=+e;const u=d%1e3;return d-=u>=0?u:1e3+u,(wi({year:o,month:s,day:r,hour:24===l?0:l,minute:h,second:c,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let nn=null;class on extends Ki{static get utcInstance(){return null===nn&&(nn=new on(0)),nn}static instance(t){return 0===t?on.utcInstance:new on(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new on(Ci(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Ai(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Ai(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return Ai(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class sn extends Ki{constructor(t){super(),this.zoneName=t}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 rn(t,e){if(ai(t)||null===t)return e;if(t instanceof Ki)return t;if(function(t){return"string"==typeof t}(t)){const i=t.toLowerCase();return"local"===i||"system"===i?e:"utc"===i||"gmt"===i?on.utcInstance:on.parseSpecifier(i)||en.create(t)}return li(t)?on.instance(t):"object"==typeof t&&t.offset&&"number"==typeof t.offset?t:new sn(t)}let an,ln=()=>Date.now(),hn="system",cn=null,dn=null,un=null;class pn{static get now(){return ln}static set now(t){ln=t}static set defaultZone(t){hn=t}static get defaultZone(){return rn(hn,Ji.instance)}static get defaultLocale(){return cn}static set defaultLocale(t){cn=t}static get defaultNumberingSystem(){return dn}static set defaultNumberingSystem(t){dn=t}static get defaultOutputCalendar(){return un}static set defaultOutputCalendar(t){un=t}static get throwOnInvalid(){return an}static set throwOnInvalid(t){an=t}static resetCaches(){Sn.resetCache(),en.resetCache()}}let mn={};let fn={};function gn(t,e={}){const i=JSON.stringify([t,e]);let n=fn[i];return n||(n=new Intl.DateTimeFormat(t,e),fn[i]=n),n}let vn={};let yn={};let bn=null;function _n(t,e,i,n,o){const s=t.listingMode(i);return"error"===s?null:"en"===s?n(e):o(e)}class xn{constructor(t,e,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:o,...s}=i;if(!e||Object.keys(s).length>0){const e={useGrouping:!1,...i};i.padTo>0&&(e.minimumIntegerDigits=i.padTo),this.inf=function(t,e={}){const i=JSON.stringify([t,e]);let n=vn[i];return n||(n=new Intl.NumberFormat(t,e),vn[i]=n),n}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return mi(this.floor?Math.floor(t):yi(t,3),this.padTo)}}class wn{constructor(t,e,i){let n;if(this.opts=i,t.zone.isUniversal){const e=t.offset/60*-1,o=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&en.create(o).valid?(n=o,this.dt=t):(n="UTC",i.timeZoneName?this.dt=t:this.dt=0===t.offset?t:Ss.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,n=t.zone.name);const o={...this.opts};n&&(o.timeZone=n),this.dtf=gn(e,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class kn{constructor(t,e,i){this.opts={style:"long",...i},!e&&ci()&&(this.rtf=function(t,e={}){const{base:i,...n}=e,o=JSON.stringify([t,n]);let s=yn[o];return s||(s=new Intl.RelativeTimeFormat(t,e),yn[o]=s),s}(t,i))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,i="always",n=!1){const o={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(t);if("auto"===i&&s){const i="days"===t;switch(e){case 1:return i?"tomorrow":`next ${o[t][0]}`;case-1:return i?"yesterday":`last ${o[t][0]}`;case 0:return i?"today":`this ${o[t][0]}`}}const r=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,h=o[t],c=n?l?h[1]:h[2]||h[1]:l?o[t][0]:t;return r?`${a} ${c} ago`:`in ${a} ${c}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}class Sn{static fromOpts(t){return Sn.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,e,i,n=!1){const o=t||pn.defaultLocale,s=o||(n?"en-US":bn||(bn=(new Intl.DateTimeFormat).resolvedOptions().locale,bn)),r=e||pn.defaultNumberingSystem,a=i||pn.defaultOutputCalendar;return new Sn(s,r,a,o)}static resetCache(){bn=null,fn={},vn={},yn={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:i}={}){return Sn.create(t,e,i)}constructor(t,e,i,n){const[o,s,r]=function(t){const e=t.indexOf("-u-");if(-1===e)return[t];{let i;const n=t.substring(0,e);try{i=gn(t).resolvedOptions()}catch(t){i=gn(n).resolvedOptions()}const{numberingSystem:o,calendar:s}=i;return[n,o,s]}}(t);this.locale=o,this.numberingSystem=e||s||null,this.outputCalendar=i||r||null,this.intl=function(t,e,i){return i||e?(t+="-u",i&&(t+=`-ca-${i}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?Sn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1,i=!0){return _n(this,t,i,Ii,(()=>{const i=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=function(t){const e=[];for(let i=1;i<=12;i++){const n=Ss.utc(2016,i,1);e.push(t(n))}return e}((t=>this.extract(t,i,"month")))),this.monthsCache[n][t]}))}weekdays(t,e=!1,i=!0){return _n(this,t,i,Bi,(()=>{const i=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=function(t){const e=[];for(let i=1;i<=7;i++){const n=Ss.utc(2016,11,13+i);e.push(t(n))}return e}((t=>this.extract(t,i,"weekday")))),this.weekdaysCache[n][t]}))}meridiems(t=!0){return _n(this,void 0,t,(()=>qi),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ss.utc(2016,11,13,9),Ss.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t,e=!0){return _n(this,t,e,Vi,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ss.utc(-40,1,1),Ss.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,i){const n=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===i));return n?n.value:null}numberFormatter(t={}){return new xn(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new wn(t,this.intl,e)}relFormatter(t={}){return new kn(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const i=JSON.stringify([t,e]);let n=mn[i];return n||(n=new Intl.ListFormat(t,e),mn[i]=n),n}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}function En(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function Cn(...t){return e=>t.reduce((([t,i,n],o)=>{const[s,r,a]=o(e,n);return[{...t,...s},r||i,a]}),[{},null,1]).slice(0,2)}function $n(t,...e){if(null==t)return[null,null];for(const[i,n]of e){const e=i.exec(t);if(e)return n(e)}return[null,null]}function Tn(...t){return(e,i)=>{const n={};let o;for(o=0;o<t.length;o++)n[t[o]]=fi(e[i+o]);return[n,null,i+o]}}const An=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Ln=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Mn=RegExp(`${Ln.source}${`(?:${An.source}?(?:\\[(${Mi.source})\\])?)?`}`),On=RegExp(`(?:T${Mn.source})?`),zn=Tn("weekYear","weekNumber","weekDay"),Pn=Tn("year","ordinal"),In=RegExp(`${Ln.source} ?(?:${An.source}|(${Mi.source}))?`),Dn=RegExp(`(?: ${In.source})?`);function Nn(t,e,i){const n=t[e];return ai(n)?i:fi(n)}function Rn(t,e){return[{hours:Nn(t,e,0),minutes:Nn(t,e+1,0),seconds:Nn(t,e+2,0),milliseconds:vi(t[e+3])},null,e+4]}function Bn(t,e){const i=!t[e]&&!t[e+1],n=Ci(t[e+1],t[e+2]);return[{},i?null:on.instance(n),e+3]}function qn(t,e){return[{},t[e]?en.create(t[e]):null,e+1]}const Un=RegExp(`^T?${Ln.source}$`),Zn=/^-?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 Fn(t){const[e,i,n,o,s,r,a,l,h]=t,c="-"===e[0],d=l&&"-"===l[0],u=(t,e=!1)=>void 0!==t&&(e||t&&c)?-t:t;return[{years:u(gi(i)),months:u(gi(n)),weeks:u(gi(o)),days:u(gi(s)),hours:u(gi(r)),minutes:u(gi(a)),seconds:u(gi(l),"-0"===l),milliseconds:u(vi(h),d)}]}const Vn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jn(t,e,i,n,o,s,r){const a={year:2===e.length?Si(fi(e)):fi(e),month:zi.indexOf(i)+1,day:fi(n),hour:fi(o),minute:fi(s)};return r&&(a.second=fi(r)),t&&(a.weekday=t.length>3?Di.indexOf(t)+1:Ni.indexOf(t)+1),a}const Hn=/^(?:(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 Wn(t){const[,e,i,n,o,s,r,a,l,h,c,d]=t,u=jn(e,o,n,i,s,r,a);let p;return p=l?Vn[l]:h?0:Ci(c,d),[u,new on(p)]}const Gn=/^(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$/,Kn=/^(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$/,Yn=/^(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 Jn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,o,n,i,s,r,a),on.utcInstance]}function Xn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,a,i,n,o,s,r),on.utcInstance]}const Qn=En(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,On),to=En(/(\d{4})-?W(\d\d)(?:-?(\d))?/,On),eo=En(/(\d{4})-?(\d{3})/,On),io=En(Mn),no=Cn((function(t,e){return[{year:Nn(t,e),month:Nn(t,e+1,1),day:Nn(t,e+2,1)},null,e+3]}),Rn,Bn,qn),oo=Cn(zn,Rn,Bn,qn),so=Cn(Pn,Rn,Bn,qn),ro=Cn(Rn,Bn,qn);const ao=Cn(Rn);const lo=En(/(\d{4})-(\d\d)-(\d\d)/,Dn),ho=En(In),co=Cn(Rn,Bn,qn);const uo={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}},po={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},...uo},mo=365.2425,fo=30.436875,go={years:{quarters:4,months:12,weeks:52.1775,days:mo,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:fo,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...uo},vo=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],yo=vo.slice(0).reverse();function bo(t,e,i=!1){const n={values:i?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new xo(n)}function _o(t,e,i,n,o){const s=t[o][i],r=e[i]/s,a=!(Math.sign(r)===Math.sign(n[o]))&&0!==n[o]&&Math.abs(r)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(r):Math.trunc(r);n[o]+=a,e[i]-=a*s}class xo{constructor(t){const e="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||Sn.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=e?go:po,this.isLuxonDuration=!0}static fromMillis(t,e){return xo.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new Pe("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new xo({values:Ti(t,xo.normalizeUnit),loc:Sn.fromObject(e),conversionAccuracy:e.conversionAccuracy})}static fromDurationLike(t){if(li(t))return xo.fromMillis(t);if(xo.isDuration(t))return t;if("object"==typeof t)return xo.fromObject(t);throw new Pe(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[i]=function(t){return $n(t,[Zn,Fn])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[i]=function(t){return $n(t,[Un,ao])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Duration is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Me(i);return new xo({invalid:i})}static normalizeUnit(t){const e={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"}[t?t.toLowerCase():t];if(!e)throw new ze(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const i={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Wi.create(this.loc,i).formatDurationFromString(this,t):"Invalid Duration"}toHuman(t={}){const e=vo.map((e=>{const i=this.values[e];return ai(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(i)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=yi(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let n="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===i.seconds&&0===i.milliseconds||(n+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===i.milliseconds||(n+=".SSS"));let o=i.toFormat(n);return t.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t),i={};for(const t of vo)(ui(e.values,t)||ui(this.values,t))&&(i[t]=e.get(t)+this.get(t));return bo(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const i of Object.keys(this.values))e[i]=$i(t(this.values[i],i));return bo(this,{values:e},!0)}get(t){return this[xo.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return bo(this,{values:{...this.values,...Ti(t,xo.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:i}={}){const n={loc:this.loc.clone({locale:t,numberingSystem:e})};return i&&(n.conversionAccuracy=i),bo(this,n)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return function(t,e){yo.reduce(((i,n)=>ai(e[n])?i:(i&&_o(t,e,i,e,n),n)),null)}(this.matrix,t),bo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>xo.normalizeUnit(t)));const e={},i={},n=this.toObject();let o;for(const s of vo)if(t.indexOf(s)>=0){o=s;let t=0;for(const e in i)t+=this.matrix[e][s]*i[e],i[e]=0;li(n[s])&&(t+=n[s]);const r=Math.trunc(t);e[s]=r,i[s]=(1e3*t-1e3*r)/1e3;for(const t in n)vo.indexOf(t)>vo.indexOf(s)&&_o(this.matrix,n,t,e,s)}else li(n[s])&&(i[s]=n[s]);for(const t in i)0!==i[t]&&(e[o]+=t===o?i[t]:i[t]/this.matrix[o][t]);return bo(this,{values:e},!0).normalize()}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return bo(this,{values:t},!0)}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(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const n of vo)if(e=this.values[n],i=t.values[n],!(void 0===e||0===e?void 0===i||0===i:e===i))return!1;var e,i;return!0}}const wo="Invalid Interval";class ko{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Interval is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Le(i);return new ko({invalid:i})}static fromDateTimes(t,e){const i=Es(t),n=Es(e),o=function(t,e){return t&&t.isValid?e&&e.isValid?e<t?ko.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null:ko.invalid("missing or invalid end"):ko.invalid("missing or invalid start")}(i,n);return null==o?new ko({start:i,end:n}):o}static after(t,e){const i=xo.fromDurationLike(e),n=Es(t);return ko.fromDateTimes(n,n.plus(i))}static before(t,e){const i=xo.fromDurationLike(e),n=Es(t);return ko.fromDateTimes(n.minus(i),n)}static fromISO(t,e){const[i,n]=(t||"").split("/",2);if(i&&n){let t,o,s,r;try{t=Ss.fromISO(i,e),o=t.isValid}catch(n){o=!1}try{s=Ss.fromISO(n,e),r=s.isValid}catch(n){r=!1}if(o&&r)return ko.fromDateTimes(t,s);if(o){const i=xo.fromISO(n,e);if(i.isValid)return ko.after(t,i)}else if(r){const t=xo.fromISO(i,e);if(t.isValid)return ko.before(s,t)}}return ko.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e: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(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const e=this.start.startOf(t),i=this.end.startOf(t);return Math.floor(i.diff(e,t).get(t))+1}hasSame(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return!!this.isValid&&this.s>t}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?ko.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(Es).filter((t=>this.contains(t))).sort(),i=[];let{s:n}=this,o=0;for(;n<this.e;){const t=e[o]||this.e,s=+t>+this.e?this.e:t;i.push(ko.fromDateTimes(n,s)),n=s,o+=1}return i}splitBy(t){const e=xo.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let i,{s:n}=this,o=1;const s=[];for(;n<this.e;){const t=this.start.plus(e.mapUnits((t=>t*o)));i=+t>+this.e?this.e:t,s.push(ko.fromDateTimes(n,i)),n=i,o+=1}return s}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return!!this.isValid&&+this.e==+t.s}abutsEnd(t){return!!this.isValid&&+t.e==+this.s}engulfs(t){return!!this.isValid&&(this.s<=t.s&&this.e>=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return e>=i?null:ko.fromDateTimes(e,i)}union(t){if(!this.isValid)return this;const e=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return ko.fromDateTimes(e,i)}static merge(t){const[e,i]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],i)=>e?e.overlaps(i)||e.abutsStart(i)?[t,e.union(i)]:[t.concat([e]),i]:[t,i]),[[],null]);return i&&e.push(i),e}static xor(t){let e=null,i=0;const n=[],o=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),s=Array.prototype.concat(...o).sort(((t,e)=>t.time-e.time));for(const t of s)i+="s"===t.type?1:-1,1===i?e=t.time:(e&&+e!=+t.time&&n.push(ko.fromDateTimes(e,t.time)),e=null);return ko.merge(n)}difference(...t){return ko.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:wo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:wo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:wo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:wo}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:wo}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):xo.invalid(this.invalidReason)}mapEndpoints(t){return ko.fromDateTimes(t(this.s),t(this.e))}}class So{static hasDST(t=pn.defaultZone){const e=Ss.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return en.isValidZone(t)}static normalizeZone(t){return rn(t,pn.defaultZone)}static months(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Sn.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return Sn.create(e,null,"gregory").eras(t)}static features(){return{relative:ci()}}}function Eo(t,e){const i=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(e)-i(t);return Math.floor(xo.fromMillis(n).as("days"))}function Co(t,e,i,n){let[o,s,r,a]=function(t,e,i){const n=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const i=Eo(t,e);return(i-i%7)/7}],["days",Eo]],o={};let s,r;for(const[a,l]of n)if(i.indexOf(a)>=0){s=a;let i=l(t,e);r=t.plus({[a]:i}),r>e?(t=t.plus({[a]:i-1}),i-=1):t=r,o[a]=i}return[t,o,r,s]}(t,e,i);const l=e-o,h=i.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===h.length&&(r<e&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const c=xo.fromObject(s,n);return h.length>0?xo.fromMillis(l,n).shiftTo(...h).plus(c):c}const $o={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},To={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]},Ao=$o.hanidec.replace(/[\[|\]]/g,"").split("");function Lo({numberingSystem:t},e=""){return new RegExp(`${$o[t||"latn"]}${e}`)}function Mo(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let i=0;i<t.length;i++){const n=t.charCodeAt(i);if(-1!==t[i].search($o.hanidec))e+=Ao.indexOf(t[i]);else for(const t in To){const[i,o]=To[t];n>=i&&n<=o&&(e+=n-i)}}return parseInt(e,10)}return e}(t))}}const Oo=`[ ${String.fromCharCode(160)}]`,zo=new RegExp(Oo,"g");function Po(t){return t.replace(/\./g,"\\.?").replace(zo,Oo)}function Io(t){return t.replace(/\./g,"").replace(zo," ").toLowerCase()}function Do(t,e){return null===t?null:{regex:RegExp(t.map(Po).join("|")),deser:([i])=>t.findIndex((t=>Io(i)===Io(t)))+e}}function No(t,e){return{regex:t,deser:([,t,e])=>Ci(t,e),groups:e}}function Ro(t){return{regex:t,deser:([t])=>t}}const Bo={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",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};let qo=null;function Uo(t,e){if(t.literal)return t;const i=Wi.macroTokenToFormatOpts(t.val);if(!i)return t;const n=Wi.create(e,i).formatDateTimeParts((qo||(qo=Ss.fromMillis(1555555555555)),qo)).map((t=>function(t,e,i){const{type:n,value:o}=t;if("literal"===n)return{literal:!0,val:o};const s=i[n];let r=Bo[n];return"object"==typeof r&&(r=r[s]),r?{literal:!1,val:r}:void 0}(t,0,i)));return n.includes(void 0)?t:n}function Zo(t,e,i){const n=function(t,e){return Array.prototype.concat(...t.map((t=>Uo(t,e))))}(Wi.parseFormat(i),t),o=n.map((e=>function(t,e){const i=Lo(e),n=Lo(e,"{2}"),o=Lo(e,"{3}"),s=Lo(e,"{4}"),r=Lo(e,"{6}"),a=Lo(e,"{1,2}"),l=Lo(e,"{1,3}"),h=Lo(e,"{1,6}"),c=Lo(e,"{1,9}"),d=Lo(e,"{2,4}"),u=Lo(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Do(e.eras("short",!1),0);case"GG":return Do(e.eras("long",!1),0);case"y":return Mo(h);case"yy":case"kk":return Mo(d,Si);case"yyyy":case"kkkk":return Mo(s);case"yyyyy":return Mo(u);case"yyyyyy":return Mo(r);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Mo(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Mo(n);case"MMM":return Do(e.months("short",!0,!1),1);case"MMMM":return Do(e.months("long",!0,!1),1);case"LLL":return Do(e.months("short",!1,!1),1);case"LLLL":return Do(e.months("long",!1,!1),1);case"o":case"S":return Mo(l);case"ooo":case"SSS":return Mo(o);case"u":return Ro(c);case"uu":return Ro(a);case"uuu":case"E":case"c":return Mo(i);case"a":return Do(e.meridiems(),0);case"EEE":return Do(e.weekdays("short",!1,!1),1);case"EEEE":return Do(e.weekdays("long",!1,!1),1);case"ccc":return Do(e.weekdays("short",!0,!1),1);case"cccc":return Do(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return No(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return No(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ro(/[a-z_+-/]{1,256}?/i);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),s=o.find((t=>t.invalidReason));if(s)return{input:e,tokens:n,invalidReason:s.invalidReason};{const[t,i]=function(t){const e=t.map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"");return[`^${e}$`,t]}(o),s=RegExp(t,"i"),[r,a]=function(t,e,i){const n=t.match(e);if(n){const t={};let e=1;for(const o in i)if(ui(i,o)){const s=i[o],r=s.groups?s.groups+1:1;!s.literal&&s.token&&(t[s.token.val[0]]=s.deser(n.slice(e,e+r))),e+=r}return[n,t]}return[n,{}]}(e,s,i),[l,h,c]=a?function(t){let e,i=null;ai(t.z)||(i=en.create(t.z)),ai(t.Z)||(i||(i=new on(t.Z)),e=t.Z),ai(t.q)||(t.M=3*(t.q-1)+1),ai(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),ai(t.u)||(t.S=vi(t.u));const n=Object.keys(t).reduce(((e,i)=>{const n=(t=>{switch(t){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}})(i);return n&&(e[n]=t[i]),e}),{});return[n,i,e]}(a):[null,null,void 0];if(ui(a,"a")&&ui(a,"H"))throw new Oe("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:s,rawMatches:r,matches:a,result:l,zone:h,specificOffset:c}}}const Fo=[0,31,59,90,120,151,181,212,243,273,304,334],Vo=[0,31,60,91,121,152,182,213,244,274,305,335];function jo(t,e){return new Gi("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ho(t,e,i){const n=new Date(Date.UTC(t,e-1,i));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const o=n.getUTCDay();return 0===o?7:o}function Wo(t,e,i){return i+(bi(t)?Vo:Fo)[e-1]}function Go(t,e){const i=bi(t)?Vo:Fo,n=i.findIndex((t=>t<e));return{month:n+1,day:e-i[n]}}function Ko(t){const{year:e,month:i,day:n}=t,o=Wo(e,i,n),s=Ho(e,i,n);let r,a=Math.floor((o-s+10)/7);return a<1?(r=e-1,a=ki(r)):a>ki(e)?(r=e+1,a=1):r=e,{weekYear:r,weekNumber:a,weekday:s,...Li(t)}}function Yo(t){const{weekYear:e,weekNumber:i,weekday:n}=t,o=Ho(e,1,4),s=_i(e);let r,a=7*i+n-o-3;a<1?(r=e-1,a+=_i(r)):a>s?(r=e+1,a-=_i(e)):r=e;const{month:l,day:h}=Go(r,a);return{year:r,month:l,day:h,...Li(t)}}function Jo(t){const{year:e,month:i,day:n}=t;return{year:e,ordinal:Wo(e,i,n),...Li(t)}}function Xo(t){const{year:e,ordinal:i}=t,{month:n,day:o}=Go(e,i);return{year:e,month:n,day:o,...Li(t)}}function Qo(t){const e=hi(t.year),i=pi(t.month,1,12),n=pi(t.day,1,xi(t.year,t.month));return e?i?!n&&jo("day",t.day):jo("month",t.month):jo("year",t.year)}function ts(t){const{hour:e,minute:i,second:n,millisecond:o}=t,s=pi(e,0,23)||24===e&&0===i&&0===n&&0===o,r=pi(i,0,59),a=pi(n,0,59),l=pi(o,0,999);return s?r?a?!l&&jo("millisecond",o):jo("second",n):jo("minute",i):jo("hour",e)}const es="Invalid DateTime",is=864e13;function ns(t){return new Gi("unsupported zone",`the zone "${t.name}" is not supported`)}function os(t){return null===t.weekData&&(t.weekData=Ko(t.c)),t.weekData}function ss(t,e){const i={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Ss({...i,...e,old:i})}function rs(t,e,i){let n=t-60*e*1e3;const o=i.offset(n);if(e===o)return[n,e];n-=60*(o-e)*1e3;const s=i.offset(n);return o===s?[n,o]:[t-60*Math.min(o,s)*1e3,Math.max(o,s)]}function as(t,e){const i=new Date(t+=60*e*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function ls(t,e,i){return rs(wi(t),e,i)}function hs(t,e){const i=t.o,n=t.c.year+Math.trunc(e.years),o=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),s={...t.c,year:n,month:o,day:Math.min(t.c.day,xi(n,o))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},r=xo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=wi(s);let[l,h]=rs(a,i,t.zone);return 0!==r&&(l+=r,h=t.zone.offset(l)),{ts:l,o:h}}function cs(t,e,i,n,o,s){const{setZone:r,zone:a}=i;if(t&&0!==Object.keys(t).length){const n=e||a,o=Ss.fromObject(t,{...i,zone:n,specificOffset:s});return r?o:o.setZone(a)}return Ss.invalid(new Gi("unparsable",`the input "${o}" can't be parsed as ${n}`))}function ds(t,e,i=!0){return t.isValid?Wi.create(Sn.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(t,e):null}function us(t,e){const i=t.c.year>9999||t.c.year<0;let n="";return i&&t.c.year>=0&&(n+="+"),n+=mi(t.c.year,i?6:4),e?(n+="-",n+=mi(t.c.month),n+="-",n+=mi(t.c.day)):(n+=mi(t.c.month),n+=mi(t.c.day)),n}function ps(t,e,i,n,o,s){let r=mi(t.c.hour);return e?(r+=":",r+=mi(t.c.minute),0===t.c.second&&i||(r+=":")):r+=mi(t.c.minute),0===t.c.second&&i||(r+=mi(t.c.second),0===t.c.millisecond&&n||(r+=".",r+=mi(t.c.millisecond,3))),o&&(t.isOffsetFixed&&0===t.offset&&!s?r+="Z":t.o<0?(r+="-",r+=mi(Math.trunc(-t.o/60)),r+=":",r+=mi(Math.trunc(-t.o%60))):(r+="+",r+=mi(Math.trunc(t.o/60)),r+=":",r+=mi(Math.trunc(t.o%60)))),s&&(r+="["+t.zone.ianaName+"]"),r}const ms={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},fs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},gs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},vs=["year","month","day","hour","minute","second","millisecond"],ys=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],bs=["year","ordinal","hour","minute","second","millisecond"];function _s(t){const e={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"}[t.toLowerCase()];if(!e)throw new ze(t);return e}function xs(t,e){const i=rn(e.zone,pn.defaultZone),n=Sn.fromObject(e),o=pn.now();let s,r;if(ai(t.year))s=o;else{for(const e of vs)ai(t[e])&&(t[e]=ms[e]);const e=Qo(t)||ts(t);if(e)return Ss.invalid(e);const n=i.offset(o);[s,r]=ls(t,n,i)}return new Ss({ts:s,zone:i,loc:n,o:r})}function ws(t,e,i){const n=!!ai(i.round)||i.round,o=(t,o)=>{t=yi(t,n||i.calendary?0:2,!0);return e.loc.clone(i).relFormatter(i).format(t,o)},s=n=>i.calendary?e.hasSame(t,n)?0:e.startOf(n).diff(t.startOf(n),n).get(n):e.diff(t,n).get(n);if(i.unit)return o(s(i.unit),i.unit);for(const t of i.units){const e=s(t);if(Math.abs(e)>=1)return o(e,t)}return o(t>e?-0:0,i.units[i.units.length-1])}function ks(t){let e,i={};return t.length>0&&"object"==typeof t[t.length-1]?(i=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[i,e]}class Ss{constructor(t){const e=t.zone||pn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Gi("invalid input"):null)||(e.isValid?null:ns(e));this.ts=ai(t.ts)?pn.now():t.ts;let n=null,o=null;if(!i){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[n,o]=[t.old.c,t.old.o];else{const t=e.offset(this.ts);n=as(this.ts,t),i=Number.isNaN(n.year)?new Gi("invalid input"):null,n=i?null:n,o=i?null:t}}this._zone=e,this.loc=t.loc||Sn.create(),this.invalid=i,this.weekData=null,this.c=n,this.o=o,this.isLuxonDateTime=!0}static now(){return new Ss({})}static local(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static utc(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return t.zone=on.utcInstance,xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const i=function(t){return"[object Date]"===Object.prototype.toString.call(t)}(t)?t.valueOf():NaN;if(Number.isNaN(i))return Ss.invalid("invalid input");const n=rn(e.zone,pn.defaultZone);return n.isValid?new Ss({ts:i,zone:n,loc:Sn.fromObject(e)}):Ss.invalid(ns(n))}static fromMillis(t,e={}){if(li(t))return t<-is||t>is?Ss.invalid("Timestamp out of range"):new Ss({ts:t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(li(t))return new Ss({ts:1e3*t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const i=rn(e.zone,pn.defaultZone);if(!i.isValid)return Ss.invalid(ns(i));const n=pn.now(),o=ai(e.specificOffset)?i.offset(n):e.specificOffset,s=Ti(t,_s),r=!ai(s.ordinal),a=!ai(s.year),l=!ai(s.month)||!ai(s.day),h=a||l,c=s.weekYear||s.weekNumber,d=Sn.fromObject(e);if((h||r)&&c)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Oe("Can't mix ordinal dates with month/day");const u=c||s.weekday&&!h;let p,m,f=as(n,o);u?(p=ys,m=fs,f=Ko(f)):r?(p=bs,m=gs,f=Jo(f)):(p=vs,m=ms);let g=!1;for(const t of p){ai(s[t])?s[t]=g?m[t]:f[t]:g=!0}const v=u?function(t){const e=hi(t.weekYear),i=pi(t.weekNumber,1,ki(t.weekYear)),n=pi(t.weekday,1,7);return e?i?!n&&jo("weekday",t.weekday):jo("week",t.week):jo("weekYear",t.weekYear)}(s):r?function(t){const e=hi(t.year),i=pi(t.ordinal,1,_i(t.year));return e?!i&&jo("ordinal",t.ordinal):jo("year",t.year)}(s):Qo(s),y=v||ts(s);if(y)return Ss.invalid(y);const b=u?Yo(s):r?Xo(s):s,[_,x]=ls(b,o,i),w=new Ss({ts:_,zone:i,o:x,loc:d});return s.weekday&&h&&t.weekday!==w.weekday?Ss.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${w.toISO()}`):w}static fromISO(t,e={}){const[i,n]=function(t){return $n(t,[Qn,no],[to,oo],[eo,so],[io,ro])}(t);return cs(i,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[i,n]=function(t){return $n(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Hn,Wn])}(t);return cs(i,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[i,n]=function(t){return $n(t,[Gn,Jn],[Kn,Jn],[Yn,Xn])}(t);return cs(i,n,e,"HTTP",e)}static fromFormat(t,e,i={}){if(ai(t)||ai(e))throw new Pe("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:o=null}=i,s=Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),[r,a,l,h]=function(t,e,i){const{result:n,zone:o,specificOffset:s,invalidReason:r}=Zo(t,e,i);return[n,o,s,r]}(s,t,e);return h?Ss.invalid(h):cs(r,a,i,`format ${e}`,t,l)}static fromString(t,e,i={}){return Ss.fromFormat(t,e,i)}static fromSQL(t,e={}){const[i,n]=function(t){return $n(t,[lo,no],[ho,co])}(t);return cs(i,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the DateTime is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Ae(i);return new Ss({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}get(t){return this[t]}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?os(this).weekYear:NaN}get weekNumber(){return this.isValid?os(this).weekNumber:NaN}get weekday(){return this.isValid?os(this).weekday:NaN}get ordinal(){return this.isValid?Jo(this.c).ordinal:NaN}get monthShort(){return this.isValid?So.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?So.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?So.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?So.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)}get isInLeapYear(){return bi(this.year)}get daysInMonth(){return xi(this.year,this.month)}get daysInYear(){return this.isValid?_i(this.year):NaN}get weeksInWeekYear(){return this.isValid?ki(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:i,calendar:n}=Wi.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:i,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(on.instance(t),e)}toLocal(){return this.setZone(pn.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:i=!1}={}){if((t=rn(t,pn.defaultZone)).equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||i){const e=t.offset(this.ts),i=this.toObject();[n]=ls(i,e,t)}return ss(this,{ts:n,zone:t})}return Ss.invalid(ns(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:i}={}){return ss(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:i})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=Ti(t,_s),i=!ai(e.weekYear)||!ai(e.weekNumber)||!ai(e.weekday),n=!ai(e.ordinal),o=!ai(e.year),s=!ai(e.month)||!ai(e.day),r=o||s,a=e.weekYear||e.weekNumber;if((r||n)&&a)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&n)throw new Oe("Can't mix ordinal dates with month/day");let l;i?l=Yo({...Ko(this.c),...e}):ai(e.ordinal)?(l={...this.toObject(),...e},ai(e.day)&&(l.day=Math.min(xi(l.year,l.month),l.day))):l=Xo({...Jo(this.c),...e});const[h,c]=ls(l,this.o,this.zone);return ss(this,{ts:h,o:c})}plus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t).negate()))}startOf(t){if(!this.isValid)return this;const e={},i=xo.normalizeUnit(t);switch(i){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0}if("weeks"===i&&(e.weekday=1),"quarters"===i){const t=Math.ceil(this.month/3);e.month=3*(t-1)+1}return this.set(e)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,e={}){return this.isValid?Wi.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):es}toLocaleString(t=Be,e={}){return this.isValid?Wi.create(this.loc.clone(e),t).formatDateTime(this):es}toLocaleParts(t={}){return this.isValid?Wi.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const s="extended"===t;let r=us(this,s);return r+="T",r+=ps(this,s,e,i,n,o),r}toISODate({format:t="extended"}={}){return this.isValid?us(this,"extended"===t):null}toISOWeekDate(){return ds(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:o=!1,format:s="extended"}={}){if(!this.isValid)return null;return(n?"T":"")+ps(this,"extended"===s,e,t,i,o)}toRFC2822(){return ds(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ds(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?us(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(e||t)&&(i&&(n+=" "),e?n+="z":t&&(n+="ZZ")),ds(this,n,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():es}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(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",i={}){if(!this.isValid||!t.isValid)return xo.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=(a=e,Array.isArray(a)?a:[a]).map(xo.normalizeUnit),s=t.valueOf()>this.valueOf(),r=Co(s?this:t,s?t:this,o,n);var a;return s?r.negate():r}diffNow(t="milliseconds",e={}){return this.diff(Ss.now(),t,e)}until(t){return this.isValid?ko.fromDateTimes(this,t):this}hasSame(t,e){if(!this.isValid)return!1;const i=t.valueOf(),n=this.setZone(t.zone,{keepLocalTime:!0});return n.startOf(e)<=i&&i<=n.endOf(e)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||Ss.fromObject({},{zone:this.zone}),i=t.padding?this<e?-t.padding:t.padding:0;let n=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(n=t.unit,o=void 0),ws(e,this.plus(i),{...t,numeric:"always",units:n,unit:o})}toRelativeCalendar(t={}){return this.isValid?ws(t.base||Ss.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Ss.isDateTime))throw new Pe("min requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.min)}static max(...t){if(!t.every(Ss.isDateTime))throw new Pe("max requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,i={}){const{locale:n=null,numberingSystem:o=null}=i;return Zo(Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,i={}){return Ss.fromFormatExplain(t,e,i)}static get DATE_SHORT(){return Be}static get DATE_MED(){return qe}static get DATE_MED_WITH_WEEKDAY(){return Ue}static get DATE_FULL(){return Ze}static get DATE_HUGE(){return Fe}static get TIME_SIMPLE(){return Ve}static get TIME_WITH_SECONDS(){return je}static get TIME_WITH_SHORT_OFFSET(){return He}static get TIME_WITH_LONG_OFFSET(){return We}static get TIME_24_SIMPLE(){return Ge}static get TIME_24_WITH_SECONDS(){return Ke}static get TIME_24_WITH_SHORT_OFFSET(){return Ye}static get TIME_24_WITH_LONG_OFFSET(){return Je}static get DATETIME_SHORT(){return Xe}static get DATETIME_SHORT_WITH_SECONDS(){return Qe}static get DATETIME_MED(){return ti}static get DATETIME_MED_WITH_SECONDS(){return ei}static get DATETIME_MED_WITH_WEEKDAY(){return ii}static get DATETIME_FULL(){return ni}static get DATETIME_FULL_WITH_SECONDS(){return oi}static get DATETIME_HUGE(){return si}static get DATETIME_HUGE_WITH_SECONDS(){return ri}}function Es(t){if(Ss.isDateTime(t))return t;if(t&&t.valueOf&&li(t.valueOf()))return Ss.fromJSDate(t);if(t&&"object"==typeof t)return Ss.fromObject(t);throw new Pe(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Cs=(t,e,i)=>{let n=t[0];for(let o=1;o<t.length;o++)n+=e[i?i[o-1]:o-1],n+=t[o];return n},$s=t=>{return"string"!=typeof(e=t)&&"strTag"in e?Cs(t.strings,t.values):t;var e};class Ts{constructor(){this.settled=!1,this.promise=new Promise(((t,e)=>{this._resolve=t,this._reject=e}))}resolve(t){this.settled=!0,this._resolve(t)}reject(t){this.settled=!0,this._reject(t)}}const As=[];for(let t=0;t<256;t++)As[t]=(t>>4&15).toString(16)+(15&t).toString(16);function Ls(t,e){return(e?"h":"s")+function(t){let e=0,i=8997,n=0,o=33826,s=0,r=40164,a=0,l=52210;for(let h=0;h<t.length;h++)i^=t.charCodeAt(h),e=435*i,n=435*o,s=435*r,a=435*l,s+=i<<8,a+=o<<8,n+=e>>>16,i=65535&e,s+=n>>>16,o=65535&n,l=a+(s>>>16)&65535,r=65535&s;return As[l>>8]+As[255&l]+As[r>>8]+As[255&r]+As[o>>8]+As[255&o]+As[i>>8]+As[255&i]}("string"==typeof t?t:t.join(""))}const Ms=new WeakMap,Os=new Map;function zs(t,e,i){var n;if(t){const o=null!==(n=null==i?void 0:i.id)&&void 0!==n?n:function(t){const e="string"==typeof t?t:t.strings;let i=Os.get(e);void 0===i&&(i=Ls(e,"string"!=typeof t&&!("strTag"in t)),Os.set(e,i));return i}(e),s=t[o];if(s){if("string"==typeof s)return s;if("strTag"in s)return Cs(s.strings,e.values,s.values);{let t=Ms.get(s);return void 0===t&&(t=s.values,Ms.set(s,t)),{...s,values:t.map((t=>e.values[t]))}}}}return $s(e)}function Ps(t){window.dispatchEvent(new CustomEvent("lit-localize-status",{detail:t}))}let Is,Ds,Ns,Rs,Bs,qs="",Us=new Ts;Us.resolve();let Zs=0;const Fs=()=>qs,Vs=t=>{if(t===(null!=Is?Is:qs))return Us.promise;if(!Ns||!Rs)throw new Error("Internal error");if(!Ns.has(t))throw new Error("Invalid locale code");Zs++;const e=Zs;Is=t,Us.settled&&(Us=new Ts),Ps({status:"loading",loadingLocale:t});return(t===Ds?Promise.resolve({templates:void 0}):Rs(t)).then((i=>{Zs===e&&(qs=t,Is=void 0,Bs=i.templates,Ps({status:"ready",readyLocale:t}),Us.resolve())}),(i=>{Zs===e&&(Ps({status:"error",errorLocale:t,errorMessage:i.toString()}),Us.reject(i))})),Us.promise};let js=$s,Hs=!1;const Ws=["es","fr","pt"],{setLocale:Gs}=(t=>(function(t){if(Hs)throw new Error("lit-localize can only be configured once");js=t,Hs=!0}(((t,e)=>zs(Bs,t,e))),qs=Ds=t.sourceLocale,Ns=new Set(t.targetLocales),Ns.add(t.sourceLocale),Rs=t.loadLocale,{getLocale:Fs,setLocale:Vs}))({sourceLocale:"en",targetLocales:Ws,loadLocale:t=>import(`./locales/${t}.js`)});class Ks extends lt{constructor(){super(...arguments),this.settings={},this.ttl=6e4,this.max=20,this.ready=!1,this.loader=!1,this.keyedAssets={},this.locale=[...navigator.languages],this.fields={},this.groups={},this.languages={},this.featuredFields=[],this.pendingResolves={},this.fetching={}}static get styles(){return r`
228
228
  :host {
229
229
  position: fixed;
230
230
  z-index: 1000;
package/dist/index.js CHANGED
@@ -224,7 +224,7 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
224
224
  <slot></slot>
225
225
  </div>
226
226
  </temba-field>
227
- `}}t([ct({type:Boolean})],xt.prototype,"textarea",void 0),t([ct({type:String})],xt.prototype,"placeholder",void 0),t([ct({type:Boolean})],xt.prototype,"password",void 0),t([ct({type:Number})],xt.prototype,"maxlength",void 0),t([ct({type:Object})],xt.prototype,"inputElement",void 0),t([ct({type:Boolean})],xt.prototype,"clearable",void 0),t([ct({type:Boolean})],xt.prototype,"gsm",void 0),t([ct({type:String})],xt.prototype,"counter",void 0),t([ct({type:Boolean})],xt.prototype,"loading",void 0),t([ct({type:Boolean})],xt.prototype,"submitOnEnter",void 0),t([ct()],xt.prototype,"onBlur",void 0),t([ct({type:Boolean})],xt.prototype,"autogrow",void 0);var wt,kt,St,Et,Ct,$t,Tt,At,Lt,Mt,Ot,zt,Pt,It,Dt,Nt,Rt,Bt,qt=function(t,e,i){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,i),i},Ut=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)};const Zt=function(t){var e=0;t+="x";var i=Math.floor(65745979961613.07);for(let n=0;n<t.length;n++)e>i&&(e=Math.floor(e/137)),e=131*e+t.charCodeAt(n);return e},Ft="0123456789abcdef".split(""),Vt=[-2147483648,8388608,32768,128],jt=[24,16,8,0],Ht=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Wt=[];class Gt{constructor(t=!1,e=!1){wt.set(this,void 0),kt.set(this,void 0),St.set(this,void 0),Et.set(this,void 0),Ct.set(this,void 0),$t.set(this,void 0),Tt.set(this,void 0),At.set(this,void 0),Lt.set(this,void 0),Mt.set(this,void 0),Ot.set(this,void 0),zt.set(this,void 0),Pt.set(this,void 0),It.set(this,void 0),Dt.set(this,void 0),Nt.set(this,void 0),Rt.set(this,0),Bt.set(this,void 0),this.init(t,e)}init(t,e){e?(Wt[0]=Wt[16]=Wt[1]=Wt[2]=Wt[3]=Wt[4]=Wt[5]=Wt[6]=Wt[7]=Wt[8]=Wt[9]=Wt[10]=Wt[11]=Wt[12]=Wt[13]=Wt[14]=Wt[15]=0,qt(this,kt,Wt)):qt(this,kt,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(qt(this,$t,3238371032),qt(this,Tt,914150663),qt(this,At,812702999),qt(this,Lt,4144912697),qt(this,Mt,4290775857),qt(this,Ot,1750603025),qt(this,zt,1694076839),qt(this,Pt,3204075428)):(qt(this,$t,1779033703),qt(this,Tt,3144134277),qt(this,At,1013904242),qt(this,Lt,2773480762),qt(this,Mt,1359893119),qt(this,Ot,2600822924),qt(this,zt,528734635),qt(this,Pt,1541459225)),qt(this,wt,qt(this,Bt,qt(this,St,qt(this,Dt,0)))),qt(this,Et,qt(this,It,!1)),qt(this,Ct,!0),qt(this,Nt,t)}update(t){if(Ut(this,Et))return this;let e;e=t instanceof ArrayBuffer?new Uint8Array(t):t;let i=0;const n=e.length,o=Ut(this,kt);for(;i<n;){let t;if(Ut(this,It)&&(qt(this,It,!1),o[0]=Ut(this,wt),o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),"string"!=typeof e)for(t=Ut(this,Bt);i<n&&t<64;++i)o[t>>2]|=e[i]<<jt[3&t++];else for(t=Ut(this,Bt);i<n&&t<64;++i){let n=e.charCodeAt(i);n<128?o[t>>2]|=n<<jt[3&t++]:n<2048?(o[t>>2]|=(192|n>>6)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++]):n<55296||n>=57344?(o[t>>2]|=(224|n>>12)<<jt[3&t++],o[t>>2]|=(128|n>>6&63)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++i)),o[t>>2]|=(240|n>>18)<<jt[3&t++],o[t>>2]|=(128|n>>12&63)<<jt[3&t++],o[t>>2]|=(128|n>>6&63)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++])}qt(this,Rt,t),qt(this,St,Ut(this,St)+(t-Ut(this,Bt))),t>=64?(qt(this,wt,o[16]),qt(this,Bt,t-64),this.hash(),qt(this,It,!0)):qt(this,Bt,t)}return Ut(this,St)>4294967295&&(qt(this,Dt,Ut(this,Dt)+(Ut(this,St)/4294967296<<0)),qt(this,St,Ut(this,St)%4294967296)),this}finalize(){if(Ut(this,Et))return;qt(this,Et,!0);const t=Ut(this,kt),e=Ut(this,Rt);t[16]=Ut(this,wt),t[e>>2]|=Vt[3&e],qt(this,wt,t[16]),e>=56&&(Ut(this,It)||this.hash(),t[0]=Ut(this,wt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=Ut(this,Dt)<<3|Ut(this,St)>>>29,t[15]=Ut(this,St)<<3,this.hash()}hash(){let t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt);const l=Ut(this,kt);let h,c,d,u,p,m,f,g,v,y;for(let t=16;t<64;++t)u=l[t-15],h=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,u=l[t-2],c=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,l[t]=l[t-16]+h+l[t-7]+c<<0;y=e&i;for(let b=0;b<64;b+=4)Ut(this,Ct)?(Ut(this,Nt)?(f=300032,u=l[0]-1413257819,a=u-150054599<<0,n=u+24177077<<0):(f=704751109,u=l[0]-210244248,a=u-1521486534<<0,n=u+143694565<<0),qt(this,Ct,!1)):(h=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),c=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),f=t&e,d=f^t&i^y,m=o&s^~o&r,u=a+c+m+Ht[b]+l[b],p=h+d,a=n+u<<0,n=u+p<<0),h=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),c=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),g=n&t,d=g^n&e^f,m=a&o^~a&s,u=r+c+m+Ht[b+1]+l[b+1],p=h+d,r=i+u<<0,i=u+p<<0,h=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),c=(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7),v=i&n,d=v^i&t^g,m=r&a^~r&o,u=s+c+m+Ht[b+2]+l[b+2],p=h+d,s=e+u<<0,e=u+p<<0,h=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),c=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),y=e&i,d=y^e&n^v,m=s&r^~s&a,u=o+c+m+Ht[b+3]+l[b+3],p=h+d,o=t+u<<0,t=u+p<<0;qt(this,$t,Ut(this,$t)+t<<0),qt(this,Tt,Ut(this,Tt)+e<<0),qt(this,At,Ut(this,At)+i<<0),qt(this,Lt,Ut(this,Lt)+n<<0),qt(this,Mt,Ut(this,Mt)+o<<0),qt(this,Ot,Ut(this,Ot)+s<<0),qt(this,zt,Ut(this,zt)+r<<0),qt(this,Pt,Ut(this,Pt)+a<<0)}hex(){this.finalize();const t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt);let l=Ft[t>>28&15]+Ft[t>>24&15]+Ft[t>>20&15]+Ft[t>>16&15]+Ft[t>>12&15]+Ft[t>>8&15]+Ft[t>>4&15]+Ft[15&t]+Ft[e>>28&15]+Ft[e>>24&15]+Ft[e>>20&15]+Ft[e>>16&15]+Ft[e>>12&15]+Ft[e>>8&15]+Ft[e>>4&15]+Ft[15&e]+Ft[i>>28&15]+Ft[i>>24&15]+Ft[i>>20&15]+Ft[i>>16&15]+Ft[i>>12&15]+Ft[i>>8&15]+Ft[i>>4&15]+Ft[15&i]+Ft[n>>28&15]+Ft[n>>24&15]+Ft[n>>20&15]+Ft[n>>16&15]+Ft[n>>12&15]+Ft[n>>8&15]+Ft[n>>4&15]+Ft[15&n]+Ft[o>>28&15]+Ft[o>>24&15]+Ft[o>>20&15]+Ft[o>>16&15]+Ft[o>>12&15]+Ft[o>>8&15]+Ft[o>>4&15]+Ft[15&o]+Ft[s>>28&15]+Ft[s>>24&15]+Ft[s>>20&15]+Ft[s>>16&15]+Ft[s>>12&15]+Ft[s>>8&15]+Ft[s>>4&15]+Ft[15&s]+Ft[r>>28&15]+Ft[r>>24&15]+Ft[r>>20&15]+Ft[r>>16&15]+Ft[r>>12&15]+Ft[r>>8&15]+Ft[r>>4&15]+Ft[15&r];return Ut(this,Nt)||(l+=Ft[a>>28&15]+Ft[a>>24&15]+Ft[a>>20&15]+Ft[a>>16&15]+Ft[a>>12&15]+Ft[a>>8&15]+Ft[a>>4&15]+Ft[15&a]),l}toString(){return this.hex()}digest(){this.finalize();const t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt),l=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s,r>>24&255,r>>16&255,r>>8&255,255&r];return Ut(this,Nt)||l.push(a>>24&255,a>>16&255,a>>8&255,255&a),l}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(Ut(this,Nt)?28:32),e=new DataView(t);return e.setUint32(0,Ut(this,$t)),e.setUint32(4,Ut(this,Tt)),e.setUint32(8,Ut(this,At)),e.setUint32(12,Ut(this,Lt)),e.setUint32(16,Ut(this,Mt)),e.setUint32(20,Ut(this,Ot)),e.setUint32(24,Ut(this,zt)),Ut(this,Nt)||e.setUint32(28,Ut(this,Pt)),t}}function Kt(t){const e=new Gt;return e.update(t),parseInt(e.hex().substring(0,8),16)}wt=new WeakMap,kt=new WeakMap,St=new WeakMap,Et=new WeakMap,Ct=new WeakMap,$t=new WeakMap,Tt=new WeakMap,At=new WeakMap,Lt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,zt=new WeakMap,Pt=new WeakMap,It=new WeakMap,Dt=new WeakMap,Nt=new WeakMap,Rt=new WeakMap,Bt=new WeakMap;const Yt=function(t,e,i){var n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;return[(t/=360)+1/3,t,t-1/3].map((function(t){return t<0&&t++,t>1&&t--,t=t<1/6?o+6*(n-o)*t:t<.5?n:t<2/3?o+6*(n-o)*(2/3-t):o,Math.round(255*t)}))};const Jt="/api/v2/media.json",Xt=new class{constructor(t={}){const[e,i]=[t.lightness,t.saturation].map((function(t){return t=void 0!==t?t:[.35,.5,.65],Array.isArray(t)?t.concat():[t]}));this.L=e,this.S=i,"number"==typeof t.hue&&(t.hue={min:t.hue,max:t.hue}),"object"!=typeof t.hue||Array.isArray(t.hue)||(t.hue=[t.hue]),void 0===t.hue&&(t.hue=[]),this.hueRanges=t.hue.map((function(t){return{min:void 0===t.min?0:t.min,max:void 0===t.max?360:t.max}})),this.hash=Kt,"function"==typeof t.hash&&(this.hash=t.hash),"bkdr"===t.hash&&(this.hash=Zt)}hsl(t){var e,i,n=this.hash(t);if(this.hueRanges.length){const t=this.hueRanges[n%this.hueRanges.length];e=n/this.hueRanges.length%727*(t.max-t.min)/727+t.min}else e=n%359;return n=Math.ceil(n/360),i=this.S[n%this.S.length],n=Math.ceil(n/this.S.length),[e,i,this.L[n%this.L.length]]}rgb(t){var e=this.hsl(t);return Yt.apply(this,e)}hex(t){var e,i=this.rgb(t);return e="#",i.forEach((function(t){t<16&&(e+=0),e+=t.toString(16)})),e}},Qt=(t={})=>{const e=(t=>{for(const e of document.cookie.split(";")){const i=e.indexOf("=");let n=e.substr(0,i),o=e.substr(i+1);if(n=n.trim(),o=o.trim(),n===t)return o}return null})("csrftoken"),i=e?{"X-CSRFToken":e}:{};return i["X-Requested-With"]="XMLHttpRequest",Object.keys(t).forEach((e=>{i[e]=t[e]})),i},te=(t,e=null,i={})=>new Promise(((n,o)=>{const s={method:"GET",headers:Qt(i)};e&&(s.signal=e.signal),fetch(t,s).then((t=>{t.text().then((i=>{let o={};try{o=JSON.parse(i)}catch(t){}n({controller:e,body:i,json:o,url:t.url,headers:t.headers,status:t.status})}))})).catch((t=>{o(t)}))})),ee=t=>{const e=[];Object.keys(t).forEach((i=>{t[i]&&e.push(i)}));let i=e.join(" ");return i.trim().length>0&&(i=" "+i),i.trim()},ie=(t,e=null)=>new Promise(((i,n)=>{te(t,e).then((t=>{i({results:t.json.results,next:t.json.next})})).catch((t=>n(t)))})),ne=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await ie(i);t.results&&(e=e.concat(t.results)),i=t.next}return e},oe=t=>new Promise(((e,i)=>{te(t).then((t=>{t.status>=200&&t.status<300?e({assets:t.json.results,next:t.json.next}):i(t)})).catch((t=>i(t)))})),se=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await oe(i);t.assets?(e=e.concat(t.assets),i=t.next):i=null}return e},re=(t,e,i={},n=null)=>{const o=Qt(i);n&&(o["Content-Type"]=n);const s={method:"POST",headers:o,body:e};return new Promise(((e,i)=>{fetch(t,s).then((async t=>{t.text().then((i=>{let n={};try{n=JSON.parse(i)}catch(t){}e({body:i,json:n,headers:t.headers,status:t.status,redirected:t.redirected,url:t.url})}))})).catch((t=>{i(t)}))}))},ae=(t,e)=>re(t,JSON.stringify(e),!1,"application/json"),le=(t,e)=>new Promise(((i,n)=>{re(t,e,!0).then((e=>{e.status>=200&&e.status<400?i(e):n(t===Jt?e:"Server failure")})).catch((t=>{console.error(t),n(t)}))})),he=t=>{const e=t.parentNode||t.host;if(e){const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY,i=t&&!(t.includes("hidden")||t.includes("visible"));return e?i&&e.scrollHeight>=e.clientHeight?e:he(e):null}return null},ce=(t,e,i=!1)=>{let n;return function(...o){const s=this,r=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||t.apply(s,o)}),e),r&&t.apply(s,o)}},de=(t,e)=>{let i=!0;return function(...n){i&&(i=!1,t.apply(this,n),setTimeout((()=>{i=!0}),e))}},ue=(t,e)=>t.length>e?t.substring(0,e)+"...":t,pe=(t,e="and")=>1===t.length?t[0]:2===t.length?"html"===t[0].type?D`${t[0]} ${e} ${t[1]}`:t.join(" "+e+" "):"html"===t[0].type?t.map(((i,n)=>n<t.length-1?D`${i}, `:D`${e} ${i}`)):t.join(", ")+e+t[t.length-1],me=(t,e,i="and")=>pe(t.map(e),i),fe=t=>{let e=null;if(document.cookie&&""!=document.cookie){const i=document.cookie.split(";");for(let n=0;n<i.length;n++){const o=i[n].trim();if(o.substring(0,t.length+1)==t+"="){e=decodeURIComponent(o.substring(t.length+1));break}}}return e};var ge;!function(t){t.SETTINGS="settings",t.MENU_COLLAPSED="menu-collapsed",t.TICKET_SHOW_DETAILS="tickets.show-details"}(ge||(ge={}));const ve=([t,...e],i=navigator.language)=>void 0===t?"":t.toLocaleUpperCase(i)+e.join(""),ye=(t,e)=>{if(0==t)return"0 KB";const i=e||2,n=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,n)).toFixed(i))+" "+["B","KB","MB","GB"][n]},be=t=>{t&&(t.stopPropagation(),t.preventDefault())},_e=(t,e,i)=>{i/=100;const n=e*Math.min(i,1-i)/100,o=e=>{const o=(e+t/30)%12,s=i-n*Math.max(Math.min(o-3,9-o,1),-1);return Math.round(255*s).toString(16).padStart(2,"0")};return`#${o(0)}${o(8)}${o(4)}`},xe=t=>{if(t.position||(t.position="right"),t.image)return D`<img src="${t.image}">`;let e=t.name;if(t.user&&(e=`${t.user.first_name} ${t.user.last_name}`),!e)return null;const i=Xt.hex(e);let n=e.indexOf(" ")+1;n<1&&(n=e.length>1?1:0);let o=e.substring(0,1)+e.substring(n,n+1);o=o.toUpperCase();const s=D` <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center"> <div class="avatar-circle" style="display:flex;height:2em;width:2em;flex-direction:row;align-items:center;color:#fff;border-radius:100%;font-weight:400;border:.3em solid rgba(0,0,0,.05);background:${i}"> <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center;flex-grow:1"> <div style="border:0 solid #00f">${o}</div> </div> </div> </div> `;return t.tip?D` <temba-tip text="${e}" position="${t.position}"> ${s} </temba-tip> `:s};var we,ke,Se,Ee;!function(t){t.DayFirst="day_first",t.MonthFirst="month_first",t.YearFirst="year_first"}(we||(we={})),function(t){t.CampaignEvent="campaign_event",t.ScheduledBroadcast="scheduled_broadcast",t.ScheduledTrigger="scheduled_trigger"}(ke||(ke={})),function(t){t.Open="open",t.Closed="closed"}(Se||(Se={})),function(t){t.Loaded="temba-loaded",t.Canceled="temba-canceled",t.CursorChanged="temba-cursor-changed",t.Refreshed="temba-refreshed",t.Selection="temba-selection",t.ButtonClicked="temba-button-clicked",t.DialogHidden="temba-dialog-hidden",t.ScrollThreshold="temba-scroll-threshold",t.ContentChanged="temba-content-changed",t.ContextChanged="temba-context-changed",t.FetchComplete="temba-fetch-complete",t.MessageSent="temba-message-sent",t.Submitted="temba-submitted",t.Redirected="temba-redirected",t.NoPath="temba-no-path",t.StoreUpdated="temba-store-updated",t.Ready="temba-ready",t.OrderChanged="temba-order-changed",t.DragStart="temba-drag-start",t.DragStop="temba-drag-stop",t.Resized="temba-resized"}(Ee||(Ee={}));class Ce{constructor(t=0,e=0){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.size=0,this.ttl=e}has(t){return t in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const e=this.items[t];delete this.items[t],this.size--,null!==e.prev&&(e.prev.next=e.next),null!==e.next&&(e.next.prev=e.prev),this.first===e&&(this.first=e.next),this.last===e&&(this.last=e.prev)}return this}evict(t=!1){if(t||this.size>0){const t=this.first;delete this.items[t.key],this.size--,0===this.size?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}return this}get(t){let e;if(this.has(t)){const i=this.items[t];this.ttl>0&&i.expiry<=(new Date).getTime()?this.delete(t):(e=i.value,this.set(t,e,!0))}return e}keys(){return Object.keys(this.items)}set(t,e,i=!1){let n;if(i||this.has(t)){if(n=this.items[t],n.value=e,this.last!==n){const t=this.last,e=n.next,i=n.prev;this.first===n&&(this.first=n.next),n.next=null,n.prev=this.last,t.next=n,null!==i&&(i.next=e),null!==e&&(e.prev=i)}}else this.max>0&&this.size===this.max&&this.evict(!0),n=this.items[t]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:e},1==++this.size?this.first=n:this.last.next=n;return this.last=n,this}}function $e(t=1e3,e=0){if(isNaN(t)||t<0)throw new TypeError("Invalid max value");if(isNaN(e)||e<0)throw new TypeError("Invalid ttl value");return new Ce(t,e)}class Te extends Error{}class Ae extends Te{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Le extends Te{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Me extends Te{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Oe extends Te{}class ze extends Te{constructor(t){super(`Invalid unit ${t}`)}}class Pe extends Te{}class Ie extends Te{constructor(){super("Zone is an abstract class")}}const De="numeric",Ne="short",Re="long",Be={year:De,month:De,day:De},qe={year:De,month:Ne,day:De},Ue={year:De,month:Ne,day:De,weekday:Ne},Ze={year:De,month:Re,day:De},Fe={year:De,month:Re,day:De,weekday:Re},Ve={hour:De,minute:De},je={hour:De,minute:De,second:De},He={hour:De,minute:De,second:De,timeZoneName:Ne},We={hour:De,minute:De,second:De,timeZoneName:Re},Ge={hour:De,minute:De,hourCycle:"h23"},Ke={hour:De,minute:De,second:De,hourCycle:"h23"},Ye={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Ne},Je={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Re},Xe={year:De,month:De,day:De,hour:De,minute:De},Qe={year:De,month:De,day:De,hour:De,minute:De,second:De},ti={year:De,month:Ne,day:De,hour:De,minute:De},ei={year:De,month:Ne,day:De,hour:De,minute:De,second:De},ii={year:De,month:Ne,day:De,weekday:Ne,hour:De,minute:De},ni={year:De,month:Re,day:De,hour:De,minute:De,timeZoneName:Ne},oi={year:De,month:Re,day:De,hour:De,minute:De,second:De,timeZoneName:Ne},si={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,timeZoneName:Re},ri={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,second:De,timeZoneName:Re};function ai(t){return void 0===t}function li(t){return"number"==typeof t}function hi(t){return"number"==typeof t&&t%1==0}function ci(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function di(t,e,i){if(0!==t.length)return t.reduce(((t,n)=>{const o=[e(n),n];return t&&i(t[0],o[0])===t[0]?t:o}),null)[1]}function ui(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function pi(t,e,i){return hi(t)&&t>=e&&t<=i}function mi(t,e=2){let i;return i=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),i}function fi(t){return ai(t)||null===t||""===t?void 0:parseInt(t,10)}function gi(t){return ai(t)||null===t||""===t?void 0:parseFloat(t)}function vi(t){if(!ai(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function yi(t,e,i=!1){const n=10**e;return(i?Math.trunc:Math.round)(t*n)/n}function bi(t){return t%4==0&&(t%100!=0||t%400==0)}function _i(t){return bi(t)?366:365}function xi(t,e){const i=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===i?bi(t+(e-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function wi(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function ki(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,i=t-1,n=(i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400))%7;return 4===e||3===n?53:52}function Si(t){return t>99?t:t>60?1900+t:2e3+t}function Ei(t,e,i,n=null){const o=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);const r={timeZoneName:e,...s},a=new Intl.DateTimeFormat(i,r).formatToParts(o).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function Ci(t,e){let i=parseInt(t,10);Number.isNaN(i)&&(i=0);const n=parseInt(e,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function $i(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new Pe(`Invalid unit value ${t}`);return e}function Ti(t,e){const i={};for(const n in t)if(ui(t,n)){const o=t[n];if(null==o)continue;i[e(n)]=$i(o)}return i}function Ai(t,e){const i=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(e){case"short":return`${o}${mi(i,2)}:${mi(n,2)}`;case"narrow":return`${o}${i}${n>0?`:${n}`:""}`;case"techie":return`${o}${mi(i,2)}${mi(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Li(t){return function(t,e){return e.reduce(((e,i)=>(e[i]=t[i],e)),{})}(t,["hour","minute","second","millisecond"])}const Mi=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],zi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pi=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ii(t){switch(t){case"narrow":return[...Pi];case"short":return[...zi];case"long":return[...Oi];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 Di=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ni=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ri=["M","T","W","T","F","S","S"];function Bi(t){switch(t){case"narrow":return[...Ri];case"short":return[...Ni];case"long":return[...Di];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qi=["AM","PM"],Ui=["Before Christ","Anno Domini"],Zi=["BC","AD"],Fi=["B","A"];function Vi(t){switch(t){case"narrow":return[...Fi];case"short":return[...Zi];case"long":return[...Ui];default:return null}}function ji(t,e){let i="";for(const n of t)n.literal?i+=n.val:i+=e(n.val);return i}const Hi={D:Be,DD:qe,DDD:Ze,DDDD:Fe,t:Ve,tt:je,ttt:He,tttt:We,T:Ge,TT:Ke,TTT:Ye,TTTT:Je,f:Xe,ff:ti,fff:ni,ffff:si,F:Qe,FF:ei,FFF:oi,FFFF:ri};class Wi{static create(t,e={}){return new Wi(t,e)}static parseFormat(t){let e=null,i="",n=!1;const o=[];for(let s=0;s<t.length;s++){const r=t.charAt(s);"'"===r?(i.length>0&&o.push({literal:n,val:i}),e=null,i="",n=!n):n||r===e?i+=r:(i.length>0&&o.push({literal:!1,val:i}),i=r,e=r)}return i.length>0&&o.push({literal:n,val:i}),o}static macroTokenToFormatOpts(t){return Hi[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTime(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTimeParts(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).formatToParts()}resolvedOptions(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return mi(t,e);const i={...this.opts};return e>0&&(i.padTo=e),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,e){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=(e,i)=>this.loc.extract(t,e,i),s=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",r=()=>i?function(t){return qi[t.hour<12?0:1]}(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,n)=>i?function(t,e){return Ii(e)[t.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month"),l=(e,n)=>i?function(t,e){return Bi(e)[t.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),h=e=>{const i=Wi.macroTokenToFormatOpts(e);return i?this.formatWithSystemDefault(t,i):e},c=e=>i?function(t,e){return Vi(e)[t.year<0?0:1]}(t,e):o({era:e},"era");return ji(Wi.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.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 t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return r();case"d":return n?o({day:"numeric"},"day"):this.num(t.day);case"dd":return n?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return n?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return n?o({month:"numeric"},"month"):this.num(t.month);case"MM":return n?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return n?o({year:"numeric"},"year"):this.num(t.year);case"yy":return n?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(e)}}))}formatDurationFromString(t,e){const i=t=>{switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=Wi.parseFormat(e),o=n.reduce(((t,{literal:e,val:i})=>e?t:t.concat(i)),[]),s=t.shiftTo(...o.map(i).filter((t=>t)));return ji(n,(t=>e=>{const n=i(e);return n?this.num(t.get(n),e.length):e})(s))}}class Gi{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ki{get type(){throw new Ie}get name(){throw new Ie}get ianaName(){return this.name}get isUniversal(){throw new Ie}offsetName(t,e){throw new Ie}formatOffset(t,e){throw new Ie}offset(t){throw new Ie}equals(t){throw new Ie}get isValid(){throw new Ie}}let Yi=null;class Ji extends Ki{static get instance(){return null===Yi&&(Yi=new Ji),Yi}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ei(t,e,i)}formatOffset(t,e){return Ai(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let Xi={};const Qi={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let tn={};class en extends Ki{static create(t){return tn[t]||(tn[t]=new en(t)),tn[t]}static resetCache(){tn={},Xi={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=en.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ei(t,e,i,this.name)}formatOffset(t,e){return Ai(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const i=(n=this.name,Xi[n]||(Xi[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Xi[n]);var n;let[o,s,r,a,l,h,c]=i.formatToParts?function(t,e){const i=t.formatToParts(e),n=[];for(let t=0;t<i.length;t++){const{type:e,value:o}=i[t],s=Qi[e];"era"===e?n[s]=o:ai(s)||(n[s]=parseInt(o,10))}return n}(i,e):function(t,e){const i=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,o,s,r,a,l,h,c]=n;return[r,o,s,a,l,h,c]}(i,e);"BC"===a&&(o=1-Math.abs(o));let d=+e;const u=d%1e3;return d-=u>=0?u:1e3+u,(wi({year:o,month:s,day:r,hour:24===l?0:l,minute:h,second:c,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let nn=null;class on extends Ki{static get utcInstance(){return null===nn&&(nn=new on(0)),nn}static instance(t){return 0===t?on.utcInstance:new on(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new on(Ci(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Ai(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Ai(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return Ai(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class sn extends Ki{constructor(t){super(),this.zoneName=t}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 rn(t,e){if(ai(t)||null===t)return e;if(t instanceof Ki)return t;if(function(t){return"string"==typeof t}(t)){const i=t.toLowerCase();return"local"===i||"system"===i?e:"utc"===i||"gmt"===i?on.utcInstance:on.parseSpecifier(i)||en.create(t)}return li(t)?on.instance(t):"object"==typeof t&&t.offset&&"number"==typeof t.offset?t:new sn(t)}let an,ln=()=>Date.now(),hn="system",cn=null,dn=null,un=null;class pn{static get now(){return ln}static set now(t){ln=t}static set defaultZone(t){hn=t}static get defaultZone(){return rn(hn,Ji.instance)}static get defaultLocale(){return cn}static set defaultLocale(t){cn=t}static get defaultNumberingSystem(){return dn}static set defaultNumberingSystem(t){dn=t}static get defaultOutputCalendar(){return un}static set defaultOutputCalendar(t){un=t}static get throwOnInvalid(){return an}static set throwOnInvalid(t){an=t}static resetCaches(){Sn.resetCache(),en.resetCache()}}let mn={};let fn={};function gn(t,e={}){const i=JSON.stringify([t,e]);let n=fn[i];return n||(n=new Intl.DateTimeFormat(t,e),fn[i]=n),n}let vn={};let yn={};let bn=null;function _n(t,e,i,n,o){const s=t.listingMode(i);return"error"===s?null:"en"===s?n(e):o(e)}class xn{constructor(t,e,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:o,...s}=i;if(!e||Object.keys(s).length>0){const e={useGrouping:!1,...i};i.padTo>0&&(e.minimumIntegerDigits=i.padTo),this.inf=function(t,e={}){const i=JSON.stringify([t,e]);let n=vn[i];return n||(n=new Intl.NumberFormat(t,e),vn[i]=n),n}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return mi(this.floor?Math.floor(t):yi(t,3),this.padTo)}}class wn{constructor(t,e,i){let n;if(this.opts=i,t.zone.isUniversal){const e=t.offset/60*-1,o=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&en.create(o).valid?(n=o,this.dt=t):(n="UTC",i.timeZoneName?this.dt=t:this.dt=0===t.offset?t:Ss.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,n=t.zone.name);const o={...this.opts};n&&(o.timeZone=n),this.dtf=gn(e,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class kn{constructor(t,e,i){this.opts={style:"long",...i},!e&&ci()&&(this.rtf=function(t,e={}){const{base:i,...n}=e,o=JSON.stringify([t,n]);let s=yn[o];return s||(s=new Intl.RelativeTimeFormat(t,e),yn[o]=s),s}(t,i))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,i="always",n=!1){const o={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(t);if("auto"===i&&s){const i="days"===t;switch(e){case 1:return i?"tomorrow":`next ${o[t][0]}`;case-1:return i?"yesterday":`last ${o[t][0]}`;case 0:return i?"today":`this ${o[t][0]}`}}const r=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,h=o[t],c=n?l?h[1]:h[2]||h[1]:l?o[t][0]:t;return r?`${a} ${c} ago`:`in ${a} ${c}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}class Sn{static fromOpts(t){return Sn.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,e,i,n=!1){const o=t||pn.defaultLocale,s=o||(n?"en-US":bn||(bn=(new Intl.DateTimeFormat).resolvedOptions().locale,bn)),r=e||pn.defaultNumberingSystem,a=i||pn.defaultOutputCalendar;return new Sn(s,r,a,o)}static resetCache(){bn=null,fn={},vn={},yn={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:i}={}){return Sn.create(t,e,i)}constructor(t,e,i,n){const[o,s,r]=function(t){const e=t.indexOf("-u-");if(-1===e)return[t];{let i;const n=t.substring(0,e);try{i=gn(t).resolvedOptions()}catch(t){i=gn(n).resolvedOptions()}const{numberingSystem:o,calendar:s}=i;return[n,o,s]}}(t);this.locale=o,this.numberingSystem=e||s||null,this.outputCalendar=i||r||null,this.intl=function(t,e,i){return i||e?(t+="-u",i&&(t+=`-ca-${i}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?Sn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1,i=!0){return _n(this,t,i,Ii,(()=>{const i=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=function(t){const e=[];for(let i=1;i<=12;i++){const n=Ss.utc(2016,i,1);e.push(t(n))}return e}((t=>this.extract(t,i,"month")))),this.monthsCache[n][t]}))}weekdays(t,e=!1,i=!0){return _n(this,t,i,Bi,(()=>{const i=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=function(t){const e=[];for(let i=1;i<=7;i++){const n=Ss.utc(2016,11,13+i);e.push(t(n))}return e}((t=>this.extract(t,i,"weekday")))),this.weekdaysCache[n][t]}))}meridiems(t=!0){return _n(this,void 0,t,(()=>qi),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ss.utc(2016,11,13,9),Ss.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t,e=!0){return _n(this,t,e,Vi,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ss.utc(-40,1,1),Ss.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,i){const n=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===i));return n?n.value:null}numberFormatter(t={}){return new xn(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new wn(t,this.intl,e)}relFormatter(t={}){return new kn(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const i=JSON.stringify([t,e]);let n=mn[i];return n||(n=new Intl.ListFormat(t,e),mn[i]=n),n}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}function En(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function Cn(...t){return e=>t.reduce((([t,i,n],o)=>{const[s,r,a]=o(e,n);return[{...t,...s},r||i,a]}),[{},null,1]).slice(0,2)}function $n(t,...e){if(null==t)return[null,null];for(const[i,n]of e){const e=i.exec(t);if(e)return n(e)}return[null,null]}function Tn(...t){return(e,i)=>{const n={};let o;for(o=0;o<t.length;o++)n[t[o]]=fi(e[i+o]);return[n,null,i+o]}}const An=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Ln=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Mn=RegExp(`${Ln.source}${`(?:${An.source}?(?:\\[(${Mi.source})\\])?)?`}`),On=RegExp(`(?:T${Mn.source})?`),zn=Tn("weekYear","weekNumber","weekDay"),Pn=Tn("year","ordinal"),In=RegExp(`${Ln.source} ?(?:${An.source}|(${Mi.source}))?`),Dn=RegExp(`(?: ${In.source})?`);function Nn(t,e,i){const n=t[e];return ai(n)?i:fi(n)}function Rn(t,e){return[{hours:Nn(t,e,0),minutes:Nn(t,e+1,0),seconds:Nn(t,e+2,0),milliseconds:vi(t[e+3])},null,e+4]}function Bn(t,e){const i=!t[e]&&!t[e+1],n=Ci(t[e+1],t[e+2]);return[{},i?null:on.instance(n),e+3]}function qn(t,e){return[{},t[e]?en.create(t[e]):null,e+1]}const Un=RegExp(`^T?${Ln.source}$`),Zn=/^-?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 Fn(t){const[e,i,n,o,s,r,a,l,h]=t,c="-"===e[0],d=l&&"-"===l[0],u=(t,e=!1)=>void 0!==t&&(e||t&&c)?-t:t;return[{years:u(gi(i)),months:u(gi(n)),weeks:u(gi(o)),days:u(gi(s)),hours:u(gi(r)),minutes:u(gi(a)),seconds:u(gi(l),"-0"===l),milliseconds:u(vi(h),d)}]}const Vn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jn(t,e,i,n,o,s,r){const a={year:2===e.length?Si(fi(e)):fi(e),month:zi.indexOf(i)+1,day:fi(n),hour:fi(o),minute:fi(s)};return r&&(a.second=fi(r)),t&&(a.weekday=t.length>3?Di.indexOf(t)+1:Ni.indexOf(t)+1),a}const Hn=/^(?:(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 Wn(t){const[,e,i,n,o,s,r,a,l,h,c,d]=t,u=jn(e,o,n,i,s,r,a);let p;return p=l?Vn[l]:h?0:Ci(c,d),[u,new on(p)]}const Gn=/^(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$/,Kn=/^(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$/,Yn=/^(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 Jn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,o,n,i,s,r,a),on.utcInstance]}function Xn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,a,i,n,o,s,r),on.utcInstance]}const Qn=En(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,On),to=En(/(\d{4})-?W(\d\d)(?:-?(\d))?/,On),eo=En(/(\d{4})-?(\d{3})/,On),io=En(Mn),no=Cn((function(t,e){return[{year:Nn(t,e),month:Nn(t,e+1,1),day:Nn(t,e+2,1)},null,e+3]}),Rn,Bn,qn),oo=Cn(zn,Rn,Bn,qn),so=Cn(Pn,Rn,Bn,qn),ro=Cn(Rn,Bn,qn);const ao=Cn(Rn);const lo=En(/(\d{4})-(\d\d)-(\d\d)/,Dn),ho=En(In),co=Cn(Rn,Bn,qn);const uo={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}},po={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},...uo},mo=365.2425,fo=30.436875,go={years:{quarters:4,months:12,weeks:52.1775,days:mo,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:fo,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...uo},vo=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],yo=vo.slice(0).reverse();function bo(t,e,i=!1){const n={values:i?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new xo(n)}function _o(t,e,i,n,o){const s=t[o][i],r=e[i]/s,a=!(Math.sign(r)===Math.sign(n[o]))&&0!==n[o]&&Math.abs(r)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(r):Math.trunc(r);n[o]+=a,e[i]-=a*s}class xo{constructor(t){const e="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||Sn.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=e?go:po,this.isLuxonDuration=!0}static fromMillis(t,e){return xo.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new Pe("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new xo({values:Ti(t,xo.normalizeUnit),loc:Sn.fromObject(e),conversionAccuracy:e.conversionAccuracy})}static fromDurationLike(t){if(li(t))return xo.fromMillis(t);if(xo.isDuration(t))return t;if("object"==typeof t)return xo.fromObject(t);throw new Pe(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[i]=function(t){return $n(t,[Zn,Fn])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[i]=function(t){return $n(t,[Un,ao])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Duration is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Me(i);return new xo({invalid:i})}static normalizeUnit(t){const e={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"}[t?t.toLowerCase():t];if(!e)throw new ze(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const i={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Wi.create(this.loc,i).formatDurationFromString(this,t):"Invalid Duration"}toHuman(t={}){const e=vo.map((e=>{const i=this.values[e];return ai(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(i)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=yi(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let n="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===i.seconds&&0===i.milliseconds||(n+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===i.milliseconds||(n+=".SSS"));let o=i.toFormat(n);return t.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t),i={};for(const t of vo)(ui(e.values,t)||ui(this.values,t))&&(i[t]=e.get(t)+this.get(t));return bo(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const i of Object.keys(this.values))e[i]=$i(t(this.values[i],i));return bo(this,{values:e},!0)}get(t){return this[xo.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return bo(this,{values:{...this.values,...Ti(t,xo.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:i}={}){const n={loc:this.loc.clone({locale:t,numberingSystem:e})};return i&&(n.conversionAccuracy=i),bo(this,n)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return function(t,e){yo.reduce(((i,n)=>ai(e[n])?i:(i&&_o(t,e,i,e,n),n)),null)}(this.matrix,t),bo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>xo.normalizeUnit(t)));const e={},i={},n=this.toObject();let o;for(const s of vo)if(t.indexOf(s)>=0){o=s;let t=0;for(const e in i)t+=this.matrix[e][s]*i[e],i[e]=0;li(n[s])&&(t+=n[s]);const r=Math.trunc(t);e[s]=r,i[s]=(1e3*t-1e3*r)/1e3;for(const t in n)vo.indexOf(t)>vo.indexOf(s)&&_o(this.matrix,n,t,e,s)}else li(n[s])&&(i[s]=n[s]);for(const t in i)0!==i[t]&&(e[o]+=t===o?i[t]:i[t]/this.matrix[o][t]);return bo(this,{values:e},!0).normalize()}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return bo(this,{values:t},!0)}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(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const n of vo)if(e=this.values[n],i=t.values[n],!(void 0===e||0===e?void 0===i||0===i:e===i))return!1;var e,i;return!0}}const wo="Invalid Interval";class ko{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Interval is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Le(i);return new ko({invalid:i})}static fromDateTimes(t,e){const i=Es(t),n=Es(e),o=function(t,e){return t&&t.isValid?e&&e.isValid?e<t?ko.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null:ko.invalid("missing or invalid end"):ko.invalid("missing or invalid start")}(i,n);return null==o?new ko({start:i,end:n}):o}static after(t,e){const i=xo.fromDurationLike(e),n=Es(t);return ko.fromDateTimes(n,n.plus(i))}static before(t,e){const i=xo.fromDurationLike(e),n=Es(t);return ko.fromDateTimes(n.minus(i),n)}static fromISO(t,e){const[i,n]=(t||"").split("/",2);if(i&&n){let t,o,s,r;try{t=Ss.fromISO(i,e),o=t.isValid}catch(n){o=!1}try{s=Ss.fromISO(n,e),r=s.isValid}catch(n){r=!1}if(o&&r)return ko.fromDateTimes(t,s);if(o){const i=xo.fromISO(n,e);if(i.isValid)return ko.after(t,i)}else if(r){const t=xo.fromISO(i,e);if(t.isValid)return ko.before(s,t)}}return ko.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e: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(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const e=this.start.startOf(t),i=this.end.startOf(t);return Math.floor(i.diff(e,t).get(t))+1}hasSame(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return!!this.isValid&&this.s>t}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?ko.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(Es).filter((t=>this.contains(t))).sort(),i=[];let{s:n}=this,o=0;for(;n<this.e;){const t=e[o]||this.e,s=+t>+this.e?this.e:t;i.push(ko.fromDateTimes(n,s)),n=s,o+=1}return i}splitBy(t){const e=xo.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let i,{s:n}=this,o=1;const s=[];for(;n<this.e;){const t=this.start.plus(e.mapUnits((t=>t*o)));i=+t>+this.e?this.e:t,s.push(ko.fromDateTimes(n,i)),n=i,o+=1}return s}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return!!this.isValid&&+this.e==+t.s}abutsEnd(t){return!!this.isValid&&+t.e==+this.s}engulfs(t){return!!this.isValid&&(this.s<=t.s&&this.e>=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return e>=i?null:ko.fromDateTimes(e,i)}union(t){if(!this.isValid)return this;const e=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return ko.fromDateTimes(e,i)}static merge(t){const[e,i]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],i)=>e?e.overlaps(i)||e.abutsStart(i)?[t,e.union(i)]:[t.concat([e]),i]:[t,i]),[[],null]);return i&&e.push(i),e}static xor(t){let e=null,i=0;const n=[],o=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),s=Array.prototype.concat(...o).sort(((t,e)=>t.time-e.time));for(const t of s)i+="s"===t.type?1:-1,1===i?e=t.time:(e&&+e!=+t.time&&n.push(ko.fromDateTimes(e,t.time)),e=null);return ko.merge(n)}difference(...t){return ko.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:wo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:wo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:wo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:wo}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:wo}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):xo.invalid(this.invalidReason)}mapEndpoints(t){return ko.fromDateTimes(t(this.s),t(this.e))}}class So{static hasDST(t=pn.defaultZone){const e=Ss.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return en.isValidZone(t)}static normalizeZone(t){return rn(t,pn.defaultZone)}static months(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Sn.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return Sn.create(e,null,"gregory").eras(t)}static features(){return{relative:ci()}}}function Eo(t,e){const i=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(e)-i(t);return Math.floor(xo.fromMillis(n).as("days"))}function Co(t,e,i,n){let[o,s,r,a]=function(t,e,i){const n=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const i=Eo(t,e);return(i-i%7)/7}],["days",Eo]],o={};let s,r;for(const[a,l]of n)if(i.indexOf(a)>=0){s=a;let i=l(t,e);r=t.plus({[a]:i}),r>e?(t=t.plus({[a]:i-1}),i-=1):t=r,o[a]=i}return[t,o,r,s]}(t,e,i);const l=e-o,h=i.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===h.length&&(r<e&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const c=xo.fromObject(s,n);return h.length>0?xo.fromMillis(l,n).shiftTo(...h).plus(c):c}const $o={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},To={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]},Ao=$o.hanidec.replace(/[\[|\]]/g,"").split("");function Lo({numberingSystem:t},e=""){return new RegExp(`${$o[t||"latn"]}${e}`)}function Mo(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let i=0;i<t.length;i++){const n=t.charCodeAt(i);if(-1!==t[i].search($o.hanidec))e+=Ao.indexOf(t[i]);else for(const t in To){const[i,o]=To[t];n>=i&&n<=o&&(e+=n-i)}}return parseInt(e,10)}return e}(t))}}const Oo=`[ ${String.fromCharCode(160)}]`,zo=new RegExp(Oo,"g");function Po(t){return t.replace(/\./g,"\\.?").replace(zo,Oo)}function Io(t){return t.replace(/\./g,"").replace(zo," ").toLowerCase()}function Do(t,e){return null===t?null:{regex:RegExp(t.map(Po).join("|")),deser:([i])=>t.findIndex((t=>Io(i)===Io(t)))+e}}function No(t,e){return{regex:t,deser:([,t,e])=>Ci(t,e),groups:e}}function Ro(t){return{regex:t,deser:([t])=>t}}const Bo={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",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};let qo=null;function Uo(t,e){if(t.literal)return t;const i=Wi.macroTokenToFormatOpts(t.val);if(!i)return t;const n=Wi.create(e,i).formatDateTimeParts((qo||(qo=Ss.fromMillis(1555555555555)),qo)).map((t=>function(t,e,i){const{type:n,value:o}=t;if("literal"===n)return{literal:!0,val:o};const s=i[n];let r=Bo[n];return"object"==typeof r&&(r=r[s]),r?{literal:!1,val:r}:void 0}(t,0,i)));return n.includes(void 0)?t:n}function Zo(t,e,i){const n=function(t,e){return Array.prototype.concat(...t.map((t=>Uo(t,e))))}(Wi.parseFormat(i),t),o=n.map((e=>function(t,e){const i=Lo(e),n=Lo(e,"{2}"),o=Lo(e,"{3}"),s=Lo(e,"{4}"),r=Lo(e,"{6}"),a=Lo(e,"{1,2}"),l=Lo(e,"{1,3}"),h=Lo(e,"{1,6}"),c=Lo(e,"{1,9}"),d=Lo(e,"{2,4}"),u=Lo(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Do(e.eras("short",!1),0);case"GG":return Do(e.eras("long",!1),0);case"y":return Mo(h);case"yy":case"kk":return Mo(d,Si);case"yyyy":case"kkkk":return Mo(s);case"yyyyy":return Mo(u);case"yyyyyy":return Mo(r);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Mo(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Mo(n);case"MMM":return Do(e.months("short",!0,!1),1);case"MMMM":return Do(e.months("long",!0,!1),1);case"LLL":return Do(e.months("short",!1,!1),1);case"LLLL":return Do(e.months("long",!1,!1),1);case"o":case"S":return Mo(l);case"ooo":case"SSS":return Mo(o);case"u":return Ro(c);case"uu":return Ro(a);case"uuu":case"E":case"c":return Mo(i);case"a":return Do(e.meridiems(),0);case"EEE":return Do(e.weekdays("short",!1,!1),1);case"EEEE":return Do(e.weekdays("long",!1,!1),1);case"ccc":return Do(e.weekdays("short",!0,!1),1);case"cccc":return Do(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return No(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return No(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ro(/[a-z_+-/]{1,256}?/i);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),s=o.find((t=>t.invalidReason));if(s)return{input:e,tokens:n,invalidReason:s.invalidReason};{const[t,i]=function(t){const e=t.map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"");return[`^${e}$`,t]}(o),s=RegExp(t,"i"),[r,a]=function(t,e,i){const n=t.match(e);if(n){const t={};let e=1;for(const o in i)if(ui(i,o)){const s=i[o],r=s.groups?s.groups+1:1;!s.literal&&s.token&&(t[s.token.val[0]]=s.deser(n.slice(e,e+r))),e+=r}return[n,t]}return[n,{}]}(e,s,i),[l,h,c]=a?function(t){let e,i=null;ai(t.z)||(i=en.create(t.z)),ai(t.Z)||(i||(i=new on(t.Z)),e=t.Z),ai(t.q)||(t.M=3*(t.q-1)+1),ai(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),ai(t.u)||(t.S=vi(t.u));const n=Object.keys(t).reduce(((e,i)=>{const n=(t=>{switch(t){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}})(i);return n&&(e[n]=t[i]),e}),{});return[n,i,e]}(a):[null,null,void 0];if(ui(a,"a")&&ui(a,"H"))throw new Oe("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:s,rawMatches:r,matches:a,result:l,zone:h,specificOffset:c}}}const Fo=[0,31,59,90,120,151,181,212,243,273,304,334],Vo=[0,31,60,91,121,152,182,213,244,274,305,335];function jo(t,e){return new Gi("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ho(t,e,i){const n=new Date(Date.UTC(t,e-1,i));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const o=n.getUTCDay();return 0===o?7:o}function Wo(t,e,i){return i+(bi(t)?Vo:Fo)[e-1]}function Go(t,e){const i=bi(t)?Vo:Fo,n=i.findIndex((t=>t<e));return{month:n+1,day:e-i[n]}}function Ko(t){const{year:e,month:i,day:n}=t,o=Wo(e,i,n),s=Ho(e,i,n);let r,a=Math.floor((o-s+10)/7);return a<1?(r=e-1,a=ki(r)):a>ki(e)?(r=e+1,a=1):r=e,{weekYear:r,weekNumber:a,weekday:s,...Li(t)}}function Yo(t){const{weekYear:e,weekNumber:i,weekday:n}=t,o=Ho(e,1,4),s=_i(e);let r,a=7*i+n-o-3;a<1?(r=e-1,a+=_i(r)):a>s?(r=e+1,a-=_i(e)):r=e;const{month:l,day:h}=Go(r,a);return{year:r,month:l,day:h,...Li(t)}}function Jo(t){const{year:e,month:i,day:n}=t;return{year:e,ordinal:Wo(e,i,n),...Li(t)}}function Xo(t){const{year:e,ordinal:i}=t,{month:n,day:o}=Go(e,i);return{year:e,month:n,day:o,...Li(t)}}function Qo(t){const e=hi(t.year),i=pi(t.month,1,12),n=pi(t.day,1,xi(t.year,t.month));return e?i?!n&&jo("day",t.day):jo("month",t.month):jo("year",t.year)}function ts(t){const{hour:e,minute:i,second:n,millisecond:o}=t,s=pi(e,0,23)||24===e&&0===i&&0===n&&0===o,r=pi(i,0,59),a=pi(n,0,59),l=pi(o,0,999);return s?r?a?!l&&jo("millisecond",o):jo("second",n):jo("minute",i):jo("hour",e)}const es="Invalid DateTime",is=864e13;function ns(t){return new Gi("unsupported zone",`the zone "${t.name}" is not supported`)}function os(t){return null===t.weekData&&(t.weekData=Ko(t.c)),t.weekData}function ss(t,e){const i={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Ss({...i,...e,old:i})}function rs(t,e,i){let n=t-60*e*1e3;const o=i.offset(n);if(e===o)return[n,e];n-=60*(o-e)*1e3;const s=i.offset(n);return o===s?[n,o]:[t-60*Math.min(o,s)*1e3,Math.max(o,s)]}function as(t,e){const i=new Date(t+=60*e*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function ls(t,e,i){return rs(wi(t),e,i)}function hs(t,e){const i=t.o,n=t.c.year+Math.trunc(e.years),o=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),s={...t.c,year:n,month:o,day:Math.min(t.c.day,xi(n,o))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},r=xo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=wi(s);let[l,h]=rs(a,i,t.zone);return 0!==r&&(l+=r,h=t.zone.offset(l)),{ts:l,o:h}}function cs(t,e,i,n,o,s){const{setZone:r,zone:a}=i;if(t&&0!==Object.keys(t).length){const n=e||a,o=Ss.fromObject(t,{...i,zone:n,specificOffset:s});return r?o:o.setZone(a)}return Ss.invalid(new Gi("unparsable",`the input "${o}" can't be parsed as ${n}`))}function ds(t,e,i=!0){return t.isValid?Wi.create(Sn.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(t,e):null}function us(t,e){const i=t.c.year>9999||t.c.year<0;let n="";return i&&t.c.year>=0&&(n+="+"),n+=mi(t.c.year,i?6:4),e?(n+="-",n+=mi(t.c.month),n+="-",n+=mi(t.c.day)):(n+=mi(t.c.month),n+=mi(t.c.day)),n}function ps(t,e,i,n,o,s){let r=mi(t.c.hour);return e?(r+=":",r+=mi(t.c.minute),0===t.c.second&&i||(r+=":")):r+=mi(t.c.minute),0===t.c.second&&i||(r+=mi(t.c.second),0===t.c.millisecond&&n||(r+=".",r+=mi(t.c.millisecond,3))),o&&(t.isOffsetFixed&&0===t.offset&&!s?r+="Z":t.o<0?(r+="-",r+=mi(Math.trunc(-t.o/60)),r+=":",r+=mi(Math.trunc(-t.o%60))):(r+="+",r+=mi(Math.trunc(t.o/60)),r+=":",r+=mi(Math.trunc(t.o%60)))),s&&(r+="["+t.zone.ianaName+"]"),r}const ms={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},fs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},gs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},vs=["year","month","day","hour","minute","second","millisecond"],ys=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],bs=["year","ordinal","hour","minute","second","millisecond"];function _s(t){const e={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"}[t.toLowerCase()];if(!e)throw new ze(t);return e}function xs(t,e){const i=rn(e.zone,pn.defaultZone),n=Sn.fromObject(e),o=pn.now();let s,r;if(ai(t.year))s=o;else{for(const e of vs)ai(t[e])&&(t[e]=ms[e]);const e=Qo(t)||ts(t);if(e)return Ss.invalid(e);const n=i.offset(o);[s,r]=ls(t,n,i)}return new Ss({ts:s,zone:i,loc:n,o:r})}function ws(t,e,i){const n=!!ai(i.round)||i.round,o=(t,o)=>{t=yi(t,n||i.calendary?0:2,!0);return e.loc.clone(i).relFormatter(i).format(t,o)},s=n=>i.calendary?e.hasSame(t,n)?0:e.startOf(n).diff(t.startOf(n),n).get(n):e.diff(t,n).get(n);if(i.unit)return o(s(i.unit),i.unit);for(const t of i.units){const e=s(t);if(Math.abs(e)>=1)return o(e,t)}return o(t>e?-0:0,i.units[i.units.length-1])}function ks(t){let e,i={};return t.length>0&&"object"==typeof t[t.length-1]?(i=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[i,e]}class Ss{constructor(t){const e=t.zone||pn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Gi("invalid input"):null)||(e.isValid?null:ns(e));this.ts=ai(t.ts)?pn.now():t.ts;let n=null,o=null;if(!i){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[n,o]=[t.old.c,t.old.o];else{const t=e.offset(this.ts);n=as(this.ts,t),i=Number.isNaN(n.year)?new Gi("invalid input"):null,n=i?null:n,o=i?null:t}}this._zone=e,this.loc=t.loc||Sn.create(),this.invalid=i,this.weekData=null,this.c=n,this.o=o,this.isLuxonDateTime=!0}static now(){return new Ss({})}static local(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static utc(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return t.zone=on.utcInstance,xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const i=function(t){return"[object Date]"===Object.prototype.toString.call(t)}(t)?t.valueOf():NaN;if(Number.isNaN(i))return Ss.invalid("invalid input");const n=rn(e.zone,pn.defaultZone);return n.isValid?new Ss({ts:i,zone:n,loc:Sn.fromObject(e)}):Ss.invalid(ns(n))}static fromMillis(t,e={}){if(li(t))return t<-is||t>is?Ss.invalid("Timestamp out of range"):new Ss({ts:t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(li(t))return new Ss({ts:1e3*t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const i=rn(e.zone,pn.defaultZone);if(!i.isValid)return Ss.invalid(ns(i));const n=pn.now(),o=ai(e.specificOffset)?i.offset(n):e.specificOffset,s=Ti(t,_s),r=!ai(s.ordinal),a=!ai(s.year),l=!ai(s.month)||!ai(s.day),h=a||l,c=s.weekYear||s.weekNumber,d=Sn.fromObject(e);if((h||r)&&c)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Oe("Can't mix ordinal dates with month/day");const u=c||s.weekday&&!h;let p,m,f=as(n,o);u?(p=ys,m=fs,f=Ko(f)):r?(p=bs,m=gs,f=Jo(f)):(p=vs,m=ms);let g=!1;for(const t of p){ai(s[t])?s[t]=g?m[t]:f[t]:g=!0}const v=u?function(t){const e=hi(t.weekYear),i=pi(t.weekNumber,1,ki(t.weekYear)),n=pi(t.weekday,1,7);return e?i?!n&&jo("weekday",t.weekday):jo("week",t.week):jo("weekYear",t.weekYear)}(s):r?function(t){const e=hi(t.year),i=pi(t.ordinal,1,_i(t.year));return e?!i&&jo("ordinal",t.ordinal):jo("year",t.year)}(s):Qo(s),y=v||ts(s);if(y)return Ss.invalid(y);const b=u?Yo(s):r?Xo(s):s,[_,x]=ls(b,o,i),w=new Ss({ts:_,zone:i,o:x,loc:d});return s.weekday&&h&&t.weekday!==w.weekday?Ss.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${w.toISO()}`):w}static fromISO(t,e={}){const[i,n]=function(t){return $n(t,[Qn,no],[to,oo],[eo,so],[io,ro])}(t);return cs(i,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[i,n]=function(t){return $n(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Hn,Wn])}(t);return cs(i,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[i,n]=function(t){return $n(t,[Gn,Jn],[Kn,Jn],[Yn,Xn])}(t);return cs(i,n,e,"HTTP",e)}static fromFormat(t,e,i={}){if(ai(t)||ai(e))throw new Pe("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:o=null}=i,s=Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),[r,a,l,h]=function(t,e,i){const{result:n,zone:o,specificOffset:s,invalidReason:r}=Zo(t,e,i);return[n,o,s,r]}(s,t,e);return h?Ss.invalid(h):cs(r,a,i,`format ${e}`,t,l)}static fromString(t,e,i={}){return Ss.fromFormat(t,e,i)}static fromSQL(t,e={}){const[i,n]=function(t){return $n(t,[lo,no],[ho,co])}(t);return cs(i,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the DateTime is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Ae(i);return new Ss({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}get(t){return this[t]}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?os(this).weekYear:NaN}get weekNumber(){return this.isValid?os(this).weekNumber:NaN}get weekday(){return this.isValid?os(this).weekday:NaN}get ordinal(){return this.isValid?Jo(this.c).ordinal:NaN}get monthShort(){return this.isValid?So.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?So.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?So.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?So.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)}get isInLeapYear(){return bi(this.year)}get daysInMonth(){return xi(this.year,this.month)}get daysInYear(){return this.isValid?_i(this.year):NaN}get weeksInWeekYear(){return this.isValid?ki(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:i,calendar:n}=Wi.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:i,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(on.instance(t),e)}toLocal(){return this.setZone(pn.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:i=!1}={}){if((t=rn(t,pn.defaultZone)).equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||i){const e=t.offset(this.ts),i=this.toObject();[n]=ls(i,e,t)}return ss(this,{ts:n,zone:t})}return Ss.invalid(ns(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:i}={}){return ss(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:i})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=Ti(t,_s),i=!ai(e.weekYear)||!ai(e.weekNumber)||!ai(e.weekday),n=!ai(e.ordinal),o=!ai(e.year),s=!ai(e.month)||!ai(e.day),r=o||s,a=e.weekYear||e.weekNumber;if((r||n)&&a)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&n)throw new Oe("Can't mix ordinal dates with month/day");let l;i?l=Yo({...Ko(this.c),...e}):ai(e.ordinal)?(l={...this.toObject(),...e},ai(e.day)&&(l.day=Math.min(xi(l.year,l.month),l.day))):l=Xo({...Jo(this.c),...e});const[h,c]=ls(l,this.o,this.zone);return ss(this,{ts:h,o:c})}plus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t).negate()))}startOf(t){if(!this.isValid)return this;const e={},i=xo.normalizeUnit(t);switch(i){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0}if("weeks"===i&&(e.weekday=1),"quarters"===i){const t=Math.ceil(this.month/3);e.month=3*(t-1)+1}return this.set(e)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,e={}){return this.isValid?Wi.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):es}toLocaleString(t=Be,e={}){return this.isValid?Wi.create(this.loc.clone(e),t).formatDateTime(this):es}toLocaleParts(t={}){return this.isValid?Wi.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const s="extended"===t;let r=us(this,s);return r+="T",r+=ps(this,s,e,i,n,o),r}toISODate({format:t="extended"}={}){return this.isValid?us(this,"extended"===t):null}toISOWeekDate(){return ds(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:o=!1,format:s="extended"}={}){if(!this.isValid)return null;return(n?"T":"")+ps(this,"extended"===s,e,t,i,o)}toRFC2822(){return ds(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ds(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?us(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(e||t)&&(i&&(n+=" "),e?n+="z":t&&(n+="ZZ")),ds(this,n,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():es}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(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",i={}){if(!this.isValid||!t.isValid)return xo.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=(a=e,Array.isArray(a)?a:[a]).map(xo.normalizeUnit),s=t.valueOf()>this.valueOf(),r=Co(s?this:t,s?t:this,o,n);var a;return s?r.negate():r}diffNow(t="milliseconds",e={}){return this.diff(Ss.now(),t,e)}until(t){return this.isValid?ko.fromDateTimes(this,t):this}hasSame(t,e){if(!this.isValid)return!1;const i=t.valueOf(),n=this.setZone(t.zone,{keepLocalTime:!0});return n.startOf(e)<=i&&i<=n.endOf(e)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||Ss.fromObject({},{zone:this.zone}),i=t.padding?this<e?-t.padding:t.padding:0;let n=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(n=t.unit,o=void 0),ws(e,this.plus(i),{...t,numeric:"always",units:n,unit:o})}toRelativeCalendar(t={}){return this.isValid?ws(t.base||Ss.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Ss.isDateTime))throw new Pe("min requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.min)}static max(...t){if(!t.every(Ss.isDateTime))throw new Pe("max requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,i={}){const{locale:n=null,numberingSystem:o=null}=i;return Zo(Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,i={}){return Ss.fromFormatExplain(t,e,i)}static get DATE_SHORT(){return Be}static get DATE_MED(){return qe}static get DATE_MED_WITH_WEEKDAY(){return Ue}static get DATE_FULL(){return Ze}static get DATE_HUGE(){return Fe}static get TIME_SIMPLE(){return Ve}static get TIME_WITH_SECONDS(){return je}static get TIME_WITH_SHORT_OFFSET(){return He}static get TIME_WITH_LONG_OFFSET(){return We}static get TIME_24_SIMPLE(){return Ge}static get TIME_24_WITH_SECONDS(){return Ke}static get TIME_24_WITH_SHORT_OFFSET(){return Ye}static get TIME_24_WITH_LONG_OFFSET(){return Je}static get DATETIME_SHORT(){return Xe}static get DATETIME_SHORT_WITH_SECONDS(){return Qe}static get DATETIME_MED(){return ti}static get DATETIME_MED_WITH_SECONDS(){return ei}static get DATETIME_MED_WITH_WEEKDAY(){return ii}static get DATETIME_FULL(){return ni}static get DATETIME_FULL_WITH_SECONDS(){return oi}static get DATETIME_HUGE(){return si}static get DATETIME_HUGE_WITH_SECONDS(){return ri}}function Es(t){if(Ss.isDateTime(t))return t;if(t&&t.valueOf&&li(t.valueOf()))return Ss.fromJSDate(t);if(t&&"object"==typeof t)return Ss.fromObject(t);throw new Pe(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Cs=(t,e,i)=>{let n=t[0];for(let o=1;o<t.length;o++)n+=e[i?i[o-1]:o-1],n+=t[o];return n},$s=t=>{return"string"!=typeof(e=t)&&"strTag"in e?Cs(t.strings,t.values):t;var e};class Ts{constructor(){this.settled=!1,this.promise=new Promise(((t,e)=>{this._resolve=t,this._reject=e}))}resolve(t){this.settled=!0,this._resolve(t)}reject(t){this.settled=!0,this._reject(t)}}const As=[];for(let t=0;t<256;t++)As[t]=(t>>4&15).toString(16)+(15&t).toString(16);function Ls(t,e){return(e?"h":"s")+function(t){let e=0,i=8997,n=0,o=33826,s=0,r=40164,a=0,l=52210;for(let h=0;h<t.length;h++)i^=t.charCodeAt(h),e=435*i,n=435*o,s=435*r,a=435*l,s+=i<<8,a+=o<<8,n+=e>>>16,i=65535&e,s+=n>>>16,o=65535&n,l=a+(s>>>16)&65535,r=65535&s;return As[l>>8]+As[255&l]+As[r>>8]+As[255&r]+As[o>>8]+As[255&o]+As[i>>8]+As[255&i]}("string"==typeof t?t:t.join(""))}const Ms=new WeakMap,Os=new Map;function zs(t,e,i){var n;if(t){const o=null!==(n=null==i?void 0:i.id)&&void 0!==n?n:function(t){const e="string"==typeof t?t:t.strings;let i=Os.get(e);void 0===i&&(i=Ls(e,"string"!=typeof t&&!("strTag"in t)),Os.set(e,i));return i}(e),s=t[o];if(s){if("string"==typeof s)return s;if("strTag"in s)return Cs(s.strings,e.values,s.values);{let t=Ms.get(s);return void 0===t&&(t=s.values,Ms.set(s,t)),{...s,values:t.map((t=>e.values[t]))}}}}return $s(e)}function Ps(t){window.dispatchEvent(new CustomEvent("lit-localize-status",{detail:t}))}let Is,Ds,Ns,Rs,Bs,qs="",Us=new Ts;Us.resolve();let Zs=0;const Fs=()=>qs,Vs=t=>{if(t===(null!=Is?Is:qs))return Us.promise;if(!Ns||!Rs)throw new Error("Internal error");if(!Ns.has(t))throw new Error("Invalid locale code");Zs++;const e=Zs;Is=t,Us.settled&&(Us=new Ts),Ps({status:"loading",loadingLocale:t});return(t===Ds?Promise.resolve({templates:void 0}):Rs(t)).then((i=>{Zs===e&&(qs=t,Is=void 0,Bs=i.templates,Ps({status:"ready",readyLocale:t}),Us.resolve())}),(i=>{Zs===e&&(Ps({status:"error",errorLocale:t,errorMessage:i.toString()}),Us.reject(i))})),Us.promise};let js=$s,Hs=!1;const Ws=["es","fr","pt"],{setLocale:Gs}=(t=>(function(t){if(Hs)throw new Error("lit-localize can only be configured once");js=t,Hs=!0}(((t,e)=>zs(Bs,t,e))),qs=Ds=t.sourceLocale,Ns=new Set(t.targetLocales),Ns.add(t.sourceLocale),Rs=t.loadLocale,{getLocale:Fs,setLocale:Vs}))({sourceLocale:"en",targetLocales:Ws,loadLocale:t=>import(`./locales/${t}.js`)});class Ks extends lt{constructor(){super(...arguments),this.settings={},this.ttl=6e4,this.max=20,this.ready=!1,this.loader=!1,this.keyedAssets={},this.locale=[...navigator.languages],this.fields={},this.groups={},this.languages={},this.featuredFields=[],this.pendingResolves={},this.fetching={}}static get styles(){return r`
227
+ `}}t([ct({type:Boolean})],xt.prototype,"textarea",void 0),t([ct({type:String})],xt.prototype,"placeholder",void 0),t([ct({type:Boolean})],xt.prototype,"password",void 0),t([ct({type:Number})],xt.prototype,"maxlength",void 0),t([ct({type:Object})],xt.prototype,"inputElement",void 0),t([ct({type:Boolean})],xt.prototype,"clearable",void 0),t([ct({type:Boolean})],xt.prototype,"gsm",void 0),t([ct({type:String})],xt.prototype,"counter",void 0),t([ct({type:Boolean})],xt.prototype,"loading",void 0),t([ct({type:Boolean})],xt.prototype,"submitOnEnter",void 0),t([ct()],xt.prototype,"onBlur",void 0),t([ct({type:Boolean})],xt.prototype,"autogrow",void 0);var wt,kt,St,Et,Ct,$t,Tt,At,Lt,Mt,Ot,zt,Pt,It,Dt,Nt,Rt,Bt,qt=function(t,e,i){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,i),i},Ut=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)};const Zt=function(t){var e=0;t+="x";var i=Math.floor(65745979961613.07);for(let n=0;n<t.length;n++)e>i&&(e=Math.floor(e/137)),e=131*e+t.charCodeAt(n);return e},Ft="0123456789abcdef".split(""),Vt=[-2147483648,8388608,32768,128],jt=[24,16,8,0],Ht=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Wt=[];class Gt{constructor(t=!1,e=!1){wt.set(this,void 0),kt.set(this,void 0),St.set(this,void 0),Et.set(this,void 0),Ct.set(this,void 0),$t.set(this,void 0),Tt.set(this,void 0),At.set(this,void 0),Lt.set(this,void 0),Mt.set(this,void 0),Ot.set(this,void 0),zt.set(this,void 0),Pt.set(this,void 0),It.set(this,void 0),Dt.set(this,void 0),Nt.set(this,void 0),Rt.set(this,0),Bt.set(this,void 0),this.init(t,e)}init(t,e){e?(Wt[0]=Wt[16]=Wt[1]=Wt[2]=Wt[3]=Wt[4]=Wt[5]=Wt[6]=Wt[7]=Wt[8]=Wt[9]=Wt[10]=Wt[11]=Wt[12]=Wt[13]=Wt[14]=Wt[15]=0,qt(this,kt,Wt)):qt(this,kt,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(qt(this,$t,3238371032),qt(this,Tt,914150663),qt(this,At,812702999),qt(this,Lt,4144912697),qt(this,Mt,4290775857),qt(this,Ot,1750603025),qt(this,zt,1694076839),qt(this,Pt,3204075428)):(qt(this,$t,1779033703),qt(this,Tt,3144134277),qt(this,At,1013904242),qt(this,Lt,2773480762),qt(this,Mt,1359893119),qt(this,Ot,2600822924),qt(this,zt,528734635),qt(this,Pt,1541459225)),qt(this,wt,qt(this,Bt,qt(this,St,qt(this,Dt,0)))),qt(this,Et,qt(this,It,!1)),qt(this,Ct,!0),qt(this,Nt,t)}update(t){if(Ut(this,Et))return this;let e;e=t instanceof ArrayBuffer?new Uint8Array(t):t;let i=0;const n=e.length,o=Ut(this,kt);for(;i<n;){let t;if(Ut(this,It)&&(qt(this,It,!1),o[0]=Ut(this,wt),o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),"string"!=typeof e)for(t=Ut(this,Bt);i<n&&t<64;++i)o[t>>2]|=e[i]<<jt[3&t++];else for(t=Ut(this,Bt);i<n&&t<64;++i){let n=e.charCodeAt(i);n<128?o[t>>2]|=n<<jt[3&t++]:n<2048?(o[t>>2]|=(192|n>>6)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++]):n<55296||n>=57344?(o[t>>2]|=(224|n>>12)<<jt[3&t++],o[t>>2]|=(128|n>>6&63)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++i)),o[t>>2]|=(240|n>>18)<<jt[3&t++],o[t>>2]|=(128|n>>12&63)<<jt[3&t++],o[t>>2]|=(128|n>>6&63)<<jt[3&t++],o[t>>2]|=(128|63&n)<<jt[3&t++])}qt(this,Rt,t),qt(this,St,Ut(this,St)+(t-Ut(this,Bt))),t>=64?(qt(this,wt,o[16]),qt(this,Bt,t-64),this.hash(),qt(this,It,!0)):qt(this,Bt,t)}return Ut(this,St)>4294967295&&(qt(this,Dt,Ut(this,Dt)+(Ut(this,St)/4294967296<<0)),qt(this,St,Ut(this,St)%4294967296)),this}finalize(){if(Ut(this,Et))return;qt(this,Et,!0);const t=Ut(this,kt),e=Ut(this,Rt);t[16]=Ut(this,wt),t[e>>2]|=Vt[3&e],qt(this,wt,t[16]),e>=56&&(Ut(this,It)||this.hash(),t[0]=Ut(this,wt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=Ut(this,Dt)<<3|Ut(this,St)>>>29,t[15]=Ut(this,St)<<3,this.hash()}hash(){let t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt);const l=Ut(this,kt);let h,c,d,u,p,m,f,g,v,y;for(let t=16;t<64;++t)u=l[t-15],h=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,u=l[t-2],c=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,l[t]=l[t-16]+h+l[t-7]+c<<0;y=e&i;for(let b=0;b<64;b+=4)Ut(this,Ct)?(Ut(this,Nt)?(f=300032,u=l[0]-1413257819,a=u-150054599<<0,n=u+24177077<<0):(f=704751109,u=l[0]-210244248,a=u-1521486534<<0,n=u+143694565<<0),qt(this,Ct,!1)):(h=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),c=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),f=t&e,d=f^t&i^y,m=o&s^~o&r,u=a+c+m+Ht[b]+l[b],p=h+d,a=n+u<<0,n=u+p<<0),h=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),c=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),g=n&t,d=g^n&e^f,m=a&o^~a&s,u=r+c+m+Ht[b+1]+l[b+1],p=h+d,r=i+u<<0,i=u+p<<0,h=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),c=(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7),v=i&n,d=v^i&t^g,m=r&a^~r&o,u=s+c+m+Ht[b+2]+l[b+2],p=h+d,s=e+u<<0,e=u+p<<0,h=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),c=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),y=e&i,d=y^e&n^v,m=s&r^~s&a,u=o+c+m+Ht[b+3]+l[b+3],p=h+d,o=t+u<<0,t=u+p<<0;qt(this,$t,Ut(this,$t)+t<<0),qt(this,Tt,Ut(this,Tt)+e<<0),qt(this,At,Ut(this,At)+i<<0),qt(this,Lt,Ut(this,Lt)+n<<0),qt(this,Mt,Ut(this,Mt)+o<<0),qt(this,Ot,Ut(this,Ot)+s<<0),qt(this,zt,Ut(this,zt)+r<<0),qt(this,Pt,Ut(this,Pt)+a<<0)}hex(){this.finalize();const t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt);let l=Ft[t>>28&15]+Ft[t>>24&15]+Ft[t>>20&15]+Ft[t>>16&15]+Ft[t>>12&15]+Ft[t>>8&15]+Ft[t>>4&15]+Ft[15&t]+Ft[e>>28&15]+Ft[e>>24&15]+Ft[e>>20&15]+Ft[e>>16&15]+Ft[e>>12&15]+Ft[e>>8&15]+Ft[e>>4&15]+Ft[15&e]+Ft[i>>28&15]+Ft[i>>24&15]+Ft[i>>20&15]+Ft[i>>16&15]+Ft[i>>12&15]+Ft[i>>8&15]+Ft[i>>4&15]+Ft[15&i]+Ft[n>>28&15]+Ft[n>>24&15]+Ft[n>>20&15]+Ft[n>>16&15]+Ft[n>>12&15]+Ft[n>>8&15]+Ft[n>>4&15]+Ft[15&n]+Ft[o>>28&15]+Ft[o>>24&15]+Ft[o>>20&15]+Ft[o>>16&15]+Ft[o>>12&15]+Ft[o>>8&15]+Ft[o>>4&15]+Ft[15&o]+Ft[s>>28&15]+Ft[s>>24&15]+Ft[s>>20&15]+Ft[s>>16&15]+Ft[s>>12&15]+Ft[s>>8&15]+Ft[s>>4&15]+Ft[15&s]+Ft[r>>28&15]+Ft[r>>24&15]+Ft[r>>20&15]+Ft[r>>16&15]+Ft[r>>12&15]+Ft[r>>8&15]+Ft[r>>4&15]+Ft[15&r];return Ut(this,Nt)||(l+=Ft[a>>28&15]+Ft[a>>24&15]+Ft[a>>20&15]+Ft[a>>16&15]+Ft[a>>12&15]+Ft[a>>8&15]+Ft[a>>4&15]+Ft[15&a]),l}toString(){return this.hex()}digest(){this.finalize();const t=Ut(this,$t),e=Ut(this,Tt),i=Ut(this,At),n=Ut(this,Lt),o=Ut(this,Mt),s=Ut(this,Ot),r=Ut(this,zt),a=Ut(this,Pt),l=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s,r>>24&255,r>>16&255,r>>8&255,255&r];return Ut(this,Nt)||l.push(a>>24&255,a>>16&255,a>>8&255,255&a),l}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(Ut(this,Nt)?28:32),e=new DataView(t);return e.setUint32(0,Ut(this,$t)),e.setUint32(4,Ut(this,Tt)),e.setUint32(8,Ut(this,At)),e.setUint32(12,Ut(this,Lt)),e.setUint32(16,Ut(this,Mt)),e.setUint32(20,Ut(this,Ot)),e.setUint32(24,Ut(this,zt)),Ut(this,Nt)||e.setUint32(28,Ut(this,Pt)),t}}function Kt(t){const e=new Gt;return e.update(t),parseInt(e.hex().substring(0,8),16)}wt=new WeakMap,kt=new WeakMap,St=new WeakMap,Et=new WeakMap,Ct=new WeakMap,$t=new WeakMap,Tt=new WeakMap,At=new WeakMap,Lt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,zt=new WeakMap,Pt=new WeakMap,It=new WeakMap,Dt=new WeakMap,Nt=new WeakMap,Rt=new WeakMap,Bt=new WeakMap;const Yt=function(t,e,i){var n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;return[(t/=360)+1/3,t,t-1/3].map((function(t){return t<0&&t++,t>1&&t--,t=t<1/6?o+6*(n-o)*t:t<.5?n:t<2/3?o+6*(n-o)*(2/3-t):o,Math.round(255*t)}))};const Jt="/api/v2/media.json",Xt=new class{constructor(t={}){const[e,i]=[t.lightness,t.saturation].map((function(t){return t=void 0!==t?t:[.35,.5,.65],Array.isArray(t)?t.concat():[t]}));this.L=e,this.S=i,"number"==typeof t.hue&&(t.hue={min:t.hue,max:t.hue}),"object"!=typeof t.hue||Array.isArray(t.hue)||(t.hue=[t.hue]),void 0===t.hue&&(t.hue=[]),this.hueRanges=t.hue.map((function(t){return{min:void 0===t.min?0:t.min,max:void 0===t.max?360:t.max}})),this.hash=Kt,"function"==typeof t.hash&&(this.hash=t.hash),"bkdr"===t.hash&&(this.hash=Zt)}hsl(t){var e,i,n=this.hash(t);if(this.hueRanges.length){const t=this.hueRanges[n%this.hueRanges.length];e=n/this.hueRanges.length%727*(t.max-t.min)/727+t.min}else e=n%359;return n=Math.ceil(n/360),i=this.S[n%this.S.length],n=Math.ceil(n/this.S.length),[e,i,this.L[n%this.L.length]]}rgb(t){var e=this.hsl(t);return Yt.apply(this,e)}hex(t){var e,i=this.rgb(t);return e="#",i.forEach((function(t){t<16&&(e+=0),e+=t.toString(16)})),e}},Qt=(t={})=>{const e=(t=>{for(const e of document.cookie.split(";")){const i=e.indexOf("=");let n=e.substr(0,i),o=e.substr(i+1);if(n=n.trim(),o=o.trim(),n===t)return o}return null})("csrftoken"),i=e?{"X-CSRFToken":e}:{};return i["X-Requested-With"]="XMLHttpRequest",Object.keys(t).forEach((e=>{i[e]=t[e]})),i},te=(t,e=null,i={})=>new Promise(((n,o)=>{const s={method:"GET",headers:Qt(i)};e&&(s.signal=e.signal),fetch(t,s).then((t=>{t.text().then((i=>{let o={};try{o=JSON.parse(i)}catch(t){}n({controller:e,body:i,json:o,url:t.url,headers:t.headers,status:t.status})}))})).catch((t=>{o(t)}))})),ee=t=>{const e=[];Object.keys(t).forEach((i=>{t[i]&&e.push(i)}));let i=e.join(" ");return i.trim().length>0&&(i=" "+i),i.trim()},ie=(t,e=null)=>new Promise(((i,n)=>{te(t,e).then((t=>{i({results:t.json.results,next:t.json.next})})).catch((t=>n(t)))})),ne=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await ie(i);t.results&&(e=e.concat(t.results)),i=t.next}return e},oe=t=>new Promise(((e,i)=>{te(t).then((t=>{t.status>=200&&t.status<300?e({assets:t.json.results,next:t.json.next}):i(t)})).catch((t=>i(t)))})),se=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await oe(i);t.assets?(e=e.concat(t.assets),i=t.next):i=null}return e},re=(t,e,i={},n=null)=>{const o=Qt(i);n&&(o["Content-Type"]=n);const s={method:"POST",headers:o,body:e};return new Promise(((e,i)=>{fetch(t,s).then((async t=>{t.text().then((i=>{let n={};try{n=JSON.parse(i)}catch(t){}e({body:i,json:n,headers:t.headers,status:t.status,redirected:t.redirected,url:t.url})}))})).catch((t=>{i(t)}))}))},ae=(t,e)=>re(t,JSON.stringify(e),!1,"application/json"),le=(t,e)=>new Promise(((i,n)=>{re(t,e,!0).then((e=>{e.status>=200&&e.status<400?i(e):n(t===Jt?e:"Server failure")})).catch((t=>{console.error(t),n(t)}))})),he=t=>{const e=t.parentNode||t.host;if(e){const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY,i=t&&!(t.includes("hidden")||t.includes("visible"));return e?i&&e.scrollHeight>=e.clientHeight?e:he(e):null}return null},ce=(t,e,i=!1)=>{let n;return function(...o){const s=this,r=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||t.apply(s,o)}),e),r&&t.apply(s,o)}},de=(t,e)=>{let i=!0;return function(...n){i&&(i=!1,t.apply(this,n),setTimeout((()=>{i=!0}),e))}},ue=(t,e)=>t.length>e?t.substring(0,e)+"...":t,pe=(t,e="and")=>1===t.length?t[0]:2===t.length?"object"==typeof t[0]?D`${t[0]} ${e} ${t[1]}`:t.join(" "+e+" "):"object"==typeof t[0]?t.map(((i,n)=>n<t.length-1?D`${i}, `:D`${e} ${i}`)):t.join(", ")+e+t[t.length-1],me=(t,e,i="and")=>pe(t.map(e),i),fe=t=>{let e=null;if(document.cookie&&""!=document.cookie){const i=document.cookie.split(";");for(let n=0;n<i.length;n++){const o=i[n].trim();if(o.substring(0,t.length+1)==t+"="){e=decodeURIComponent(o.substring(t.length+1));break}}}return e};var ge;!function(t){t.SETTINGS="settings",t.MENU_COLLAPSED="menu-collapsed",t.TICKET_SHOW_DETAILS="tickets.show-details"}(ge||(ge={}));const ve=([t,...e],i=navigator.language)=>void 0===t?"":t.toLocaleUpperCase(i)+e.join(""),ye=(t,e)=>{if(0==t)return"0 KB";const i=e||2,n=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,n)).toFixed(i))+" "+["B","KB","MB","GB"][n]},be=t=>{t&&(t.stopPropagation(),t.preventDefault())},_e=(t,e,i)=>{i/=100;const n=e*Math.min(i,1-i)/100,o=e=>{const o=(e+t/30)%12,s=i-n*Math.max(Math.min(o-3,9-o,1),-1);return Math.round(255*s).toString(16).padStart(2,"0")};return`#${o(0)}${o(8)}${o(4)}`},xe=t=>{if(t.position||(t.position="right"),t.image)return D`<img src="${t.image}">`;let e=t.name;if(t.user&&(e=`${t.user.first_name} ${t.user.last_name}`),!e)return null;const i=Xt.hex(e);let n=e.indexOf(" ")+1;n<1&&(n=e.length>1?1:0);let o=e.substring(0,1)+e.substring(n,n+1);o=o.toUpperCase();const s=D` <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center"> <div class="avatar-circle" style="display:flex;height:2em;width:2em;flex-direction:row;align-items:center;color:#fff;border-radius:100%;font-weight:400;border:.3em solid rgba(0,0,0,.05);background:${i}"> <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center;flex-grow:1"> <div style="border:0 solid #00f">${o}</div> </div> </div> </div> `;return t.tip?D` <temba-tip text="${e}" position="${t.position}"> ${s} </temba-tip> `:s};var we,ke,Se,Ee;!function(t){t.DayFirst="day_first",t.MonthFirst="month_first",t.YearFirst="year_first"}(we||(we={})),function(t){t.CampaignEvent="campaign_event",t.ScheduledBroadcast="scheduled_broadcast",t.ScheduledTrigger="scheduled_trigger"}(ke||(ke={})),function(t){t.Open="open",t.Closed="closed"}(Se||(Se={})),function(t){t.Loaded="temba-loaded",t.Canceled="temba-canceled",t.CursorChanged="temba-cursor-changed",t.Refreshed="temba-refreshed",t.Selection="temba-selection",t.ButtonClicked="temba-button-clicked",t.DialogHidden="temba-dialog-hidden",t.ScrollThreshold="temba-scroll-threshold",t.ContentChanged="temba-content-changed",t.ContextChanged="temba-context-changed",t.FetchComplete="temba-fetch-complete",t.MessageSent="temba-message-sent",t.Submitted="temba-submitted",t.Redirected="temba-redirected",t.NoPath="temba-no-path",t.StoreUpdated="temba-store-updated",t.Ready="temba-ready",t.OrderChanged="temba-order-changed",t.DragStart="temba-drag-start",t.DragStop="temba-drag-stop",t.Resized="temba-resized"}(Ee||(Ee={}));class Ce{constructor(t=0,e=0){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.size=0,this.ttl=e}has(t){return t in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const e=this.items[t];delete this.items[t],this.size--,null!==e.prev&&(e.prev.next=e.next),null!==e.next&&(e.next.prev=e.prev),this.first===e&&(this.first=e.next),this.last===e&&(this.last=e.prev)}return this}evict(t=!1){if(t||this.size>0){const t=this.first;delete this.items[t.key],this.size--,0===this.size?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}return this}get(t){let e;if(this.has(t)){const i=this.items[t];this.ttl>0&&i.expiry<=(new Date).getTime()?this.delete(t):(e=i.value,this.set(t,e,!0))}return e}keys(){return Object.keys(this.items)}set(t,e,i=!1){let n;if(i||this.has(t)){if(n=this.items[t],n.value=e,this.last!==n){const t=this.last,e=n.next,i=n.prev;this.first===n&&(this.first=n.next),n.next=null,n.prev=this.last,t.next=n,null!==i&&(i.next=e),null!==e&&(e.prev=i)}}else this.max>0&&this.size===this.max&&this.evict(!0),n=this.items[t]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:e},1==++this.size?this.first=n:this.last.next=n;return this.last=n,this}}function $e(t=1e3,e=0){if(isNaN(t)||t<0)throw new TypeError("Invalid max value");if(isNaN(e)||e<0)throw new TypeError("Invalid ttl value");return new Ce(t,e)}class Te extends Error{}class Ae extends Te{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Le extends Te{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Me extends Te{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Oe extends Te{}class ze extends Te{constructor(t){super(`Invalid unit ${t}`)}}class Pe extends Te{}class Ie extends Te{constructor(){super("Zone is an abstract class")}}const De="numeric",Ne="short",Re="long",Be={year:De,month:De,day:De},qe={year:De,month:Ne,day:De},Ue={year:De,month:Ne,day:De,weekday:Ne},Ze={year:De,month:Re,day:De},Fe={year:De,month:Re,day:De,weekday:Re},Ve={hour:De,minute:De},je={hour:De,minute:De,second:De},He={hour:De,minute:De,second:De,timeZoneName:Ne},We={hour:De,minute:De,second:De,timeZoneName:Re},Ge={hour:De,minute:De,hourCycle:"h23"},Ke={hour:De,minute:De,second:De,hourCycle:"h23"},Ye={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Ne},Je={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Re},Xe={year:De,month:De,day:De,hour:De,minute:De},Qe={year:De,month:De,day:De,hour:De,minute:De,second:De},ti={year:De,month:Ne,day:De,hour:De,minute:De},ei={year:De,month:Ne,day:De,hour:De,minute:De,second:De},ii={year:De,month:Ne,day:De,weekday:Ne,hour:De,minute:De},ni={year:De,month:Re,day:De,hour:De,minute:De,timeZoneName:Ne},oi={year:De,month:Re,day:De,hour:De,minute:De,second:De,timeZoneName:Ne},si={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,timeZoneName:Re},ri={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,second:De,timeZoneName:Re};function ai(t){return void 0===t}function li(t){return"number"==typeof t}function hi(t){return"number"==typeof t&&t%1==0}function ci(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function di(t,e,i){if(0!==t.length)return t.reduce(((t,n)=>{const o=[e(n),n];return t&&i(t[0],o[0])===t[0]?t:o}),null)[1]}function ui(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function pi(t,e,i){return hi(t)&&t>=e&&t<=i}function mi(t,e=2){let i;return i=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),i}function fi(t){return ai(t)||null===t||""===t?void 0:parseInt(t,10)}function gi(t){return ai(t)||null===t||""===t?void 0:parseFloat(t)}function vi(t){if(!ai(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function yi(t,e,i=!1){const n=10**e;return(i?Math.trunc:Math.round)(t*n)/n}function bi(t){return t%4==0&&(t%100!=0||t%400==0)}function _i(t){return bi(t)?366:365}function xi(t,e){const i=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===i?bi(t+(e-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function wi(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function ki(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,i=t-1,n=(i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400))%7;return 4===e||3===n?53:52}function Si(t){return t>99?t:t>60?1900+t:2e3+t}function Ei(t,e,i,n=null){const o=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);const r={timeZoneName:e,...s},a=new Intl.DateTimeFormat(i,r).formatToParts(o).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function Ci(t,e){let i=parseInt(t,10);Number.isNaN(i)&&(i=0);const n=parseInt(e,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function $i(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new Pe(`Invalid unit value ${t}`);return e}function Ti(t,e){const i={};for(const n in t)if(ui(t,n)){const o=t[n];if(null==o)continue;i[e(n)]=$i(o)}return i}function Ai(t,e){const i=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(e){case"short":return`${o}${mi(i,2)}:${mi(n,2)}`;case"narrow":return`${o}${i}${n>0?`:${n}`:""}`;case"techie":return`${o}${mi(i,2)}${mi(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Li(t){return function(t,e){return e.reduce(((e,i)=>(e[i]=t[i],e)),{})}(t,["hour","minute","second","millisecond"])}const Mi=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],zi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pi=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ii(t){switch(t){case"narrow":return[...Pi];case"short":return[...zi];case"long":return[...Oi];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 Di=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ni=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ri=["M","T","W","T","F","S","S"];function Bi(t){switch(t){case"narrow":return[...Ri];case"short":return[...Ni];case"long":return[...Di];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qi=["AM","PM"],Ui=["Before Christ","Anno Domini"],Zi=["BC","AD"],Fi=["B","A"];function Vi(t){switch(t){case"narrow":return[...Fi];case"short":return[...Zi];case"long":return[...Ui];default:return null}}function ji(t,e){let i="";for(const n of t)n.literal?i+=n.val:i+=e(n.val);return i}const Hi={D:Be,DD:qe,DDD:Ze,DDDD:Fe,t:Ve,tt:je,ttt:He,tttt:We,T:Ge,TT:Ke,TTT:Ye,TTTT:Je,f:Xe,ff:ti,fff:ni,ffff:si,F:Qe,FF:ei,FFF:oi,FFFF:ri};class Wi{static create(t,e={}){return new Wi(t,e)}static parseFormat(t){let e=null,i="",n=!1;const o=[];for(let s=0;s<t.length;s++){const r=t.charAt(s);"'"===r?(i.length>0&&o.push({literal:n,val:i}),e=null,i="",n=!n):n||r===e?i+=r:(i.length>0&&o.push({literal:!1,val:i}),i=r,e=r)}return i.length>0&&o.push({literal:n,val:i}),o}static macroTokenToFormatOpts(t){return Hi[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTime(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTimeParts(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).formatToParts()}resolvedOptions(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return mi(t,e);const i={...this.opts};return e>0&&(i.padTo=e),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,e){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=(e,i)=>this.loc.extract(t,e,i),s=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",r=()=>i?function(t){return qi[t.hour<12?0:1]}(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,n)=>i?function(t,e){return Ii(e)[t.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month"),l=(e,n)=>i?function(t,e){return Bi(e)[t.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),h=e=>{const i=Wi.macroTokenToFormatOpts(e);return i?this.formatWithSystemDefault(t,i):e},c=e=>i?function(t,e){return Vi(e)[t.year<0?0:1]}(t,e):o({era:e},"era");return ji(Wi.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.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 t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return r();case"d":return n?o({day:"numeric"},"day"):this.num(t.day);case"dd":return n?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return n?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return n?o({month:"numeric"},"month"):this.num(t.month);case"MM":return n?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return n?o({year:"numeric"},"year"):this.num(t.year);case"yy":return n?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(e)}}))}formatDurationFromString(t,e){const i=t=>{switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=Wi.parseFormat(e),o=n.reduce(((t,{literal:e,val:i})=>e?t:t.concat(i)),[]),s=t.shiftTo(...o.map(i).filter((t=>t)));return ji(n,(t=>e=>{const n=i(e);return n?this.num(t.get(n),e.length):e})(s))}}class Gi{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ki{get type(){throw new Ie}get name(){throw new Ie}get ianaName(){return this.name}get isUniversal(){throw new Ie}offsetName(t,e){throw new Ie}formatOffset(t,e){throw new Ie}offset(t){throw new Ie}equals(t){throw new Ie}get isValid(){throw new Ie}}let Yi=null;class Ji extends Ki{static get instance(){return null===Yi&&(Yi=new Ji),Yi}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ei(t,e,i)}formatOffset(t,e){return Ai(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let Xi={};const Qi={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let tn={};class en extends Ki{static create(t){return tn[t]||(tn[t]=new en(t)),tn[t]}static resetCache(){tn={},Xi={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=en.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ei(t,e,i,this.name)}formatOffset(t,e){return Ai(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const i=(n=this.name,Xi[n]||(Xi[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Xi[n]);var n;let[o,s,r,a,l,h,c]=i.formatToParts?function(t,e){const i=t.formatToParts(e),n=[];for(let t=0;t<i.length;t++){const{type:e,value:o}=i[t],s=Qi[e];"era"===e?n[s]=o:ai(s)||(n[s]=parseInt(o,10))}return n}(i,e):function(t,e){const i=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,o,s,r,a,l,h,c]=n;return[r,o,s,a,l,h,c]}(i,e);"BC"===a&&(o=1-Math.abs(o));let d=+e;const u=d%1e3;return d-=u>=0?u:1e3+u,(wi({year:o,month:s,day:r,hour:24===l?0:l,minute:h,second:c,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let nn=null;class on extends Ki{static get utcInstance(){return null===nn&&(nn=new on(0)),nn}static instance(t){return 0===t?on.utcInstance:new on(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new on(Ci(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Ai(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Ai(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return Ai(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class sn extends Ki{constructor(t){super(),this.zoneName=t}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 rn(t,e){if(ai(t)||null===t)return e;if(t instanceof Ki)return t;if(function(t){return"string"==typeof t}(t)){const i=t.toLowerCase();return"local"===i||"system"===i?e:"utc"===i||"gmt"===i?on.utcInstance:on.parseSpecifier(i)||en.create(t)}return li(t)?on.instance(t):"object"==typeof t&&t.offset&&"number"==typeof t.offset?t:new sn(t)}let an,ln=()=>Date.now(),hn="system",cn=null,dn=null,un=null;class pn{static get now(){return ln}static set now(t){ln=t}static set defaultZone(t){hn=t}static get defaultZone(){return rn(hn,Ji.instance)}static get defaultLocale(){return cn}static set defaultLocale(t){cn=t}static get defaultNumberingSystem(){return dn}static set defaultNumberingSystem(t){dn=t}static get defaultOutputCalendar(){return un}static set defaultOutputCalendar(t){un=t}static get throwOnInvalid(){return an}static set throwOnInvalid(t){an=t}static resetCaches(){Sn.resetCache(),en.resetCache()}}let mn={};let fn={};function gn(t,e={}){const i=JSON.stringify([t,e]);let n=fn[i];return n||(n=new Intl.DateTimeFormat(t,e),fn[i]=n),n}let vn={};let yn={};let bn=null;function _n(t,e,i,n,o){const s=t.listingMode(i);return"error"===s?null:"en"===s?n(e):o(e)}class xn{constructor(t,e,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:o,...s}=i;if(!e||Object.keys(s).length>0){const e={useGrouping:!1,...i};i.padTo>0&&(e.minimumIntegerDigits=i.padTo),this.inf=function(t,e={}){const i=JSON.stringify([t,e]);let n=vn[i];return n||(n=new Intl.NumberFormat(t,e),vn[i]=n),n}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return mi(this.floor?Math.floor(t):yi(t,3),this.padTo)}}class wn{constructor(t,e,i){let n;if(this.opts=i,t.zone.isUniversal){const e=t.offset/60*-1,o=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&en.create(o).valid?(n=o,this.dt=t):(n="UTC",i.timeZoneName?this.dt=t:this.dt=0===t.offset?t:Ss.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,n=t.zone.name);const o={...this.opts};n&&(o.timeZone=n),this.dtf=gn(e,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class kn{constructor(t,e,i){this.opts={style:"long",...i},!e&&ci()&&(this.rtf=function(t,e={}){const{base:i,...n}=e,o=JSON.stringify([t,n]);let s=yn[o];return s||(s=new Intl.RelativeTimeFormat(t,e),yn[o]=s),s}(t,i))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,i="always",n=!1){const o={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(t);if("auto"===i&&s){const i="days"===t;switch(e){case 1:return i?"tomorrow":`next ${o[t][0]}`;case-1:return i?"yesterday":`last ${o[t][0]}`;case 0:return i?"today":`this ${o[t][0]}`}}const r=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,h=o[t],c=n?l?h[1]:h[2]||h[1]:l?o[t][0]:t;return r?`${a} ${c} ago`:`in ${a} ${c}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}class Sn{static fromOpts(t){return Sn.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,e,i,n=!1){const o=t||pn.defaultLocale,s=o||(n?"en-US":bn||(bn=(new Intl.DateTimeFormat).resolvedOptions().locale,bn)),r=e||pn.defaultNumberingSystem,a=i||pn.defaultOutputCalendar;return new Sn(s,r,a,o)}static resetCache(){bn=null,fn={},vn={},yn={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:i}={}){return Sn.create(t,e,i)}constructor(t,e,i,n){const[o,s,r]=function(t){const e=t.indexOf("-u-");if(-1===e)return[t];{let i;const n=t.substring(0,e);try{i=gn(t).resolvedOptions()}catch(t){i=gn(n).resolvedOptions()}const{numberingSystem:o,calendar:s}=i;return[n,o,s]}}(t);this.locale=o,this.numberingSystem=e||s||null,this.outputCalendar=i||r||null,this.intl=function(t,e,i){return i||e?(t+="-u",i&&(t+=`-ca-${i}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?Sn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1,i=!0){return _n(this,t,i,Ii,(()=>{const i=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=function(t){const e=[];for(let i=1;i<=12;i++){const n=Ss.utc(2016,i,1);e.push(t(n))}return e}((t=>this.extract(t,i,"month")))),this.monthsCache[n][t]}))}weekdays(t,e=!1,i=!0){return _n(this,t,i,Bi,(()=>{const i=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=function(t){const e=[];for(let i=1;i<=7;i++){const n=Ss.utc(2016,11,13+i);e.push(t(n))}return e}((t=>this.extract(t,i,"weekday")))),this.weekdaysCache[n][t]}))}meridiems(t=!0){return _n(this,void 0,t,(()=>qi),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ss.utc(2016,11,13,9),Ss.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t,e=!0){return _n(this,t,e,Vi,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ss.utc(-40,1,1),Ss.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,i){const n=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===i));return n?n.value:null}numberFormatter(t={}){return new xn(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new wn(t,this.intl,e)}relFormatter(t={}){return new kn(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const i=JSON.stringify([t,e]);let n=mn[i];return n||(n=new Intl.ListFormat(t,e),mn[i]=n),n}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}function En(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function Cn(...t){return e=>t.reduce((([t,i,n],o)=>{const[s,r,a]=o(e,n);return[{...t,...s},r||i,a]}),[{},null,1]).slice(0,2)}function $n(t,...e){if(null==t)return[null,null];for(const[i,n]of e){const e=i.exec(t);if(e)return n(e)}return[null,null]}function Tn(...t){return(e,i)=>{const n={};let o;for(o=0;o<t.length;o++)n[t[o]]=fi(e[i+o]);return[n,null,i+o]}}const An=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Ln=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Mn=RegExp(`${Ln.source}${`(?:${An.source}?(?:\\[(${Mi.source})\\])?)?`}`),On=RegExp(`(?:T${Mn.source})?`),zn=Tn("weekYear","weekNumber","weekDay"),Pn=Tn("year","ordinal"),In=RegExp(`${Ln.source} ?(?:${An.source}|(${Mi.source}))?`),Dn=RegExp(`(?: ${In.source})?`);function Nn(t,e,i){const n=t[e];return ai(n)?i:fi(n)}function Rn(t,e){return[{hours:Nn(t,e,0),minutes:Nn(t,e+1,0),seconds:Nn(t,e+2,0),milliseconds:vi(t[e+3])},null,e+4]}function Bn(t,e){const i=!t[e]&&!t[e+1],n=Ci(t[e+1],t[e+2]);return[{},i?null:on.instance(n),e+3]}function qn(t,e){return[{},t[e]?en.create(t[e]):null,e+1]}const Un=RegExp(`^T?${Ln.source}$`),Zn=/^-?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 Fn(t){const[e,i,n,o,s,r,a,l,h]=t,c="-"===e[0],d=l&&"-"===l[0],u=(t,e=!1)=>void 0!==t&&(e||t&&c)?-t:t;return[{years:u(gi(i)),months:u(gi(n)),weeks:u(gi(o)),days:u(gi(s)),hours:u(gi(r)),minutes:u(gi(a)),seconds:u(gi(l),"-0"===l),milliseconds:u(vi(h),d)}]}const Vn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jn(t,e,i,n,o,s,r){const a={year:2===e.length?Si(fi(e)):fi(e),month:zi.indexOf(i)+1,day:fi(n),hour:fi(o),minute:fi(s)};return r&&(a.second=fi(r)),t&&(a.weekday=t.length>3?Di.indexOf(t)+1:Ni.indexOf(t)+1),a}const Hn=/^(?:(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 Wn(t){const[,e,i,n,o,s,r,a,l,h,c,d]=t,u=jn(e,o,n,i,s,r,a);let p;return p=l?Vn[l]:h?0:Ci(c,d),[u,new on(p)]}const Gn=/^(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$/,Kn=/^(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$/,Yn=/^(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 Jn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,o,n,i,s,r,a),on.utcInstance]}function Xn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,a,i,n,o,s,r),on.utcInstance]}const Qn=En(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,On),to=En(/(\d{4})-?W(\d\d)(?:-?(\d))?/,On),eo=En(/(\d{4})-?(\d{3})/,On),io=En(Mn),no=Cn((function(t,e){return[{year:Nn(t,e),month:Nn(t,e+1,1),day:Nn(t,e+2,1)},null,e+3]}),Rn,Bn,qn),oo=Cn(zn,Rn,Bn,qn),so=Cn(Pn,Rn,Bn,qn),ro=Cn(Rn,Bn,qn);const ao=Cn(Rn);const lo=En(/(\d{4})-(\d\d)-(\d\d)/,Dn),ho=En(In),co=Cn(Rn,Bn,qn);const uo={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}},po={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},...uo},mo=365.2425,fo=30.436875,go={years:{quarters:4,months:12,weeks:52.1775,days:mo,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:fo,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...uo},vo=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],yo=vo.slice(0).reverse();function bo(t,e,i=!1){const n={values:i?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new xo(n)}function _o(t,e,i,n,o){const s=t[o][i],r=e[i]/s,a=!(Math.sign(r)===Math.sign(n[o]))&&0!==n[o]&&Math.abs(r)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(r):Math.trunc(r);n[o]+=a,e[i]-=a*s}class xo{constructor(t){const e="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||Sn.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=e?go:po,this.isLuxonDuration=!0}static fromMillis(t,e){return xo.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new Pe("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new xo({values:Ti(t,xo.normalizeUnit),loc:Sn.fromObject(e),conversionAccuracy:e.conversionAccuracy})}static fromDurationLike(t){if(li(t))return xo.fromMillis(t);if(xo.isDuration(t))return t;if("object"==typeof t)return xo.fromObject(t);throw new Pe(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[i]=function(t){return $n(t,[Zn,Fn])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[i]=function(t){return $n(t,[Un,ao])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Duration is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Me(i);return new xo({invalid:i})}static normalizeUnit(t){const e={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"}[t?t.toLowerCase():t];if(!e)throw new ze(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const i={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Wi.create(this.loc,i).formatDurationFromString(this,t):"Invalid Duration"}toHuman(t={}){const e=vo.map((e=>{const i=this.values[e];return ai(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(i)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=yi(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let n="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===i.seconds&&0===i.milliseconds||(n+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===i.milliseconds||(n+=".SSS"));let o=i.toFormat(n);return t.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t),i={};for(const t of vo)(ui(e.values,t)||ui(this.values,t))&&(i[t]=e.get(t)+this.get(t));return bo(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const i of Object.keys(this.values))e[i]=$i(t(this.values[i],i));return bo(this,{values:e},!0)}get(t){return this[xo.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return bo(this,{values:{...this.values,...Ti(t,xo.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:i}={}){const n={loc:this.loc.clone({locale:t,numberingSystem:e})};return i&&(n.conversionAccuracy=i),bo(this,n)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return function(t,e){yo.reduce(((i,n)=>ai(e[n])?i:(i&&_o(t,e,i,e,n),n)),null)}(this.matrix,t),bo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>xo.normalizeUnit(t)));const e={},i={},n=this.toObject();let o;for(const s of vo)if(t.indexOf(s)>=0){o=s;let t=0;for(const e in i)t+=this.matrix[e][s]*i[e],i[e]=0;li(n[s])&&(t+=n[s]);const r=Math.trunc(t);e[s]=r,i[s]=(1e3*t-1e3*r)/1e3;for(const t in n)vo.indexOf(t)>vo.indexOf(s)&&_o(this.matrix,n,t,e,s)}else li(n[s])&&(i[s]=n[s]);for(const t in i)0!==i[t]&&(e[o]+=t===o?i[t]:i[t]/this.matrix[o][t]);return bo(this,{values:e},!0).normalize()}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return bo(this,{values:t},!0)}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(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const n of vo)if(e=this.values[n],i=t.values[n],!(void 0===e||0===e?void 0===i||0===i:e===i))return!1;var e,i;return!0}}const wo="Invalid Interval";class ko{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Interval is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Le(i);return new ko({invalid:i})}static fromDateTimes(t,e){const i=Es(t),n=Es(e),o=function(t,e){return t&&t.isValid?e&&e.isValid?e<t?ko.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null:ko.invalid("missing or invalid end"):ko.invalid("missing or invalid start")}(i,n);return null==o?new ko({start:i,end:n}):o}static after(t,e){const i=xo.fromDurationLike(e),n=Es(t);return ko.fromDateTimes(n,n.plus(i))}static before(t,e){const i=xo.fromDurationLike(e),n=Es(t);return ko.fromDateTimes(n.minus(i),n)}static fromISO(t,e){const[i,n]=(t||"").split("/",2);if(i&&n){let t,o,s,r;try{t=Ss.fromISO(i,e),o=t.isValid}catch(n){o=!1}try{s=Ss.fromISO(n,e),r=s.isValid}catch(n){r=!1}if(o&&r)return ko.fromDateTimes(t,s);if(o){const i=xo.fromISO(n,e);if(i.isValid)return ko.after(t,i)}else if(r){const t=xo.fromISO(i,e);if(t.isValid)return ko.before(s,t)}}return ko.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e: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(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const e=this.start.startOf(t),i=this.end.startOf(t);return Math.floor(i.diff(e,t).get(t))+1}hasSame(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return!!this.isValid&&this.s>t}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?ko.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(Es).filter((t=>this.contains(t))).sort(),i=[];let{s:n}=this,o=0;for(;n<this.e;){const t=e[o]||this.e,s=+t>+this.e?this.e:t;i.push(ko.fromDateTimes(n,s)),n=s,o+=1}return i}splitBy(t){const e=xo.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let i,{s:n}=this,o=1;const s=[];for(;n<this.e;){const t=this.start.plus(e.mapUnits((t=>t*o)));i=+t>+this.e?this.e:t,s.push(ko.fromDateTimes(n,i)),n=i,o+=1}return s}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return!!this.isValid&&+this.e==+t.s}abutsEnd(t){return!!this.isValid&&+t.e==+this.s}engulfs(t){return!!this.isValid&&(this.s<=t.s&&this.e>=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return e>=i?null:ko.fromDateTimes(e,i)}union(t){if(!this.isValid)return this;const e=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return ko.fromDateTimes(e,i)}static merge(t){const[e,i]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],i)=>e?e.overlaps(i)||e.abutsStart(i)?[t,e.union(i)]:[t.concat([e]),i]:[t,i]),[[],null]);return i&&e.push(i),e}static xor(t){let e=null,i=0;const n=[],o=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),s=Array.prototype.concat(...o).sort(((t,e)=>t.time-e.time));for(const t of s)i+="s"===t.type?1:-1,1===i?e=t.time:(e&&+e!=+t.time&&n.push(ko.fromDateTimes(e,t.time)),e=null);return ko.merge(n)}difference(...t){return ko.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:wo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:wo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:wo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:wo}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:wo}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):xo.invalid(this.invalidReason)}mapEndpoints(t){return ko.fromDateTimes(t(this.s),t(this.e))}}class So{static hasDST(t=pn.defaultZone){const e=Ss.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return en.isValidZone(t)}static normalizeZone(t){return rn(t,pn.defaultZone)}static months(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Sn.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return Sn.create(e,null,"gregory").eras(t)}static features(){return{relative:ci()}}}function Eo(t,e){const i=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(e)-i(t);return Math.floor(xo.fromMillis(n).as("days"))}function Co(t,e,i,n){let[o,s,r,a]=function(t,e,i){const n=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const i=Eo(t,e);return(i-i%7)/7}],["days",Eo]],o={};let s,r;for(const[a,l]of n)if(i.indexOf(a)>=0){s=a;let i=l(t,e);r=t.plus({[a]:i}),r>e?(t=t.plus({[a]:i-1}),i-=1):t=r,o[a]=i}return[t,o,r,s]}(t,e,i);const l=e-o,h=i.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===h.length&&(r<e&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const c=xo.fromObject(s,n);return h.length>0?xo.fromMillis(l,n).shiftTo(...h).plus(c):c}const $o={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},To={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]},Ao=$o.hanidec.replace(/[\[|\]]/g,"").split("");function Lo({numberingSystem:t},e=""){return new RegExp(`${$o[t||"latn"]}${e}`)}function Mo(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let i=0;i<t.length;i++){const n=t.charCodeAt(i);if(-1!==t[i].search($o.hanidec))e+=Ao.indexOf(t[i]);else for(const t in To){const[i,o]=To[t];n>=i&&n<=o&&(e+=n-i)}}return parseInt(e,10)}return e}(t))}}const Oo=`[ ${String.fromCharCode(160)}]`,zo=new RegExp(Oo,"g");function Po(t){return t.replace(/\./g,"\\.?").replace(zo,Oo)}function Io(t){return t.replace(/\./g,"").replace(zo," ").toLowerCase()}function Do(t,e){return null===t?null:{regex:RegExp(t.map(Po).join("|")),deser:([i])=>t.findIndex((t=>Io(i)===Io(t)))+e}}function No(t,e){return{regex:t,deser:([,t,e])=>Ci(t,e),groups:e}}function Ro(t){return{regex:t,deser:([t])=>t}}const Bo={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",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};let qo=null;function Uo(t,e){if(t.literal)return t;const i=Wi.macroTokenToFormatOpts(t.val);if(!i)return t;const n=Wi.create(e,i).formatDateTimeParts((qo||(qo=Ss.fromMillis(1555555555555)),qo)).map((t=>function(t,e,i){const{type:n,value:o}=t;if("literal"===n)return{literal:!0,val:o};const s=i[n];let r=Bo[n];return"object"==typeof r&&(r=r[s]),r?{literal:!1,val:r}:void 0}(t,0,i)));return n.includes(void 0)?t:n}function Zo(t,e,i){const n=function(t,e){return Array.prototype.concat(...t.map((t=>Uo(t,e))))}(Wi.parseFormat(i),t),o=n.map((e=>function(t,e){const i=Lo(e),n=Lo(e,"{2}"),o=Lo(e,"{3}"),s=Lo(e,"{4}"),r=Lo(e,"{6}"),a=Lo(e,"{1,2}"),l=Lo(e,"{1,3}"),h=Lo(e,"{1,6}"),c=Lo(e,"{1,9}"),d=Lo(e,"{2,4}"),u=Lo(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Do(e.eras("short",!1),0);case"GG":return Do(e.eras("long",!1),0);case"y":return Mo(h);case"yy":case"kk":return Mo(d,Si);case"yyyy":case"kkkk":return Mo(s);case"yyyyy":return Mo(u);case"yyyyyy":return Mo(r);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Mo(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Mo(n);case"MMM":return Do(e.months("short",!0,!1),1);case"MMMM":return Do(e.months("long",!0,!1),1);case"LLL":return Do(e.months("short",!1,!1),1);case"LLLL":return Do(e.months("long",!1,!1),1);case"o":case"S":return Mo(l);case"ooo":case"SSS":return Mo(o);case"u":return Ro(c);case"uu":return Ro(a);case"uuu":case"E":case"c":return Mo(i);case"a":return Do(e.meridiems(),0);case"EEE":return Do(e.weekdays("short",!1,!1),1);case"EEEE":return Do(e.weekdays("long",!1,!1),1);case"ccc":return Do(e.weekdays("short",!0,!1),1);case"cccc":return Do(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return No(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return No(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ro(/[a-z_+-/]{1,256}?/i);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),s=o.find((t=>t.invalidReason));if(s)return{input:e,tokens:n,invalidReason:s.invalidReason};{const[t,i]=function(t){const e=t.map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"");return[`^${e}$`,t]}(o),s=RegExp(t,"i"),[r,a]=function(t,e,i){const n=t.match(e);if(n){const t={};let e=1;for(const o in i)if(ui(i,o)){const s=i[o],r=s.groups?s.groups+1:1;!s.literal&&s.token&&(t[s.token.val[0]]=s.deser(n.slice(e,e+r))),e+=r}return[n,t]}return[n,{}]}(e,s,i),[l,h,c]=a?function(t){let e,i=null;ai(t.z)||(i=en.create(t.z)),ai(t.Z)||(i||(i=new on(t.Z)),e=t.Z),ai(t.q)||(t.M=3*(t.q-1)+1),ai(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),ai(t.u)||(t.S=vi(t.u));const n=Object.keys(t).reduce(((e,i)=>{const n=(t=>{switch(t){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}})(i);return n&&(e[n]=t[i]),e}),{});return[n,i,e]}(a):[null,null,void 0];if(ui(a,"a")&&ui(a,"H"))throw new Oe("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:s,rawMatches:r,matches:a,result:l,zone:h,specificOffset:c}}}const Fo=[0,31,59,90,120,151,181,212,243,273,304,334],Vo=[0,31,60,91,121,152,182,213,244,274,305,335];function jo(t,e){return new Gi("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ho(t,e,i){const n=new Date(Date.UTC(t,e-1,i));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const o=n.getUTCDay();return 0===o?7:o}function Wo(t,e,i){return i+(bi(t)?Vo:Fo)[e-1]}function Go(t,e){const i=bi(t)?Vo:Fo,n=i.findIndex((t=>t<e));return{month:n+1,day:e-i[n]}}function Ko(t){const{year:e,month:i,day:n}=t,o=Wo(e,i,n),s=Ho(e,i,n);let r,a=Math.floor((o-s+10)/7);return a<1?(r=e-1,a=ki(r)):a>ki(e)?(r=e+1,a=1):r=e,{weekYear:r,weekNumber:a,weekday:s,...Li(t)}}function Yo(t){const{weekYear:e,weekNumber:i,weekday:n}=t,o=Ho(e,1,4),s=_i(e);let r,a=7*i+n-o-3;a<1?(r=e-1,a+=_i(r)):a>s?(r=e+1,a-=_i(e)):r=e;const{month:l,day:h}=Go(r,a);return{year:r,month:l,day:h,...Li(t)}}function Jo(t){const{year:e,month:i,day:n}=t;return{year:e,ordinal:Wo(e,i,n),...Li(t)}}function Xo(t){const{year:e,ordinal:i}=t,{month:n,day:o}=Go(e,i);return{year:e,month:n,day:o,...Li(t)}}function Qo(t){const e=hi(t.year),i=pi(t.month,1,12),n=pi(t.day,1,xi(t.year,t.month));return e?i?!n&&jo("day",t.day):jo("month",t.month):jo("year",t.year)}function ts(t){const{hour:e,minute:i,second:n,millisecond:o}=t,s=pi(e,0,23)||24===e&&0===i&&0===n&&0===o,r=pi(i,0,59),a=pi(n,0,59),l=pi(o,0,999);return s?r?a?!l&&jo("millisecond",o):jo("second",n):jo("minute",i):jo("hour",e)}const es="Invalid DateTime",is=864e13;function ns(t){return new Gi("unsupported zone",`the zone "${t.name}" is not supported`)}function os(t){return null===t.weekData&&(t.weekData=Ko(t.c)),t.weekData}function ss(t,e){const i={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Ss({...i,...e,old:i})}function rs(t,e,i){let n=t-60*e*1e3;const o=i.offset(n);if(e===o)return[n,e];n-=60*(o-e)*1e3;const s=i.offset(n);return o===s?[n,o]:[t-60*Math.min(o,s)*1e3,Math.max(o,s)]}function as(t,e){const i=new Date(t+=60*e*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function ls(t,e,i){return rs(wi(t),e,i)}function hs(t,e){const i=t.o,n=t.c.year+Math.trunc(e.years),o=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),s={...t.c,year:n,month:o,day:Math.min(t.c.day,xi(n,o))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},r=xo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=wi(s);let[l,h]=rs(a,i,t.zone);return 0!==r&&(l+=r,h=t.zone.offset(l)),{ts:l,o:h}}function cs(t,e,i,n,o,s){const{setZone:r,zone:a}=i;if(t&&0!==Object.keys(t).length){const n=e||a,o=Ss.fromObject(t,{...i,zone:n,specificOffset:s});return r?o:o.setZone(a)}return Ss.invalid(new Gi("unparsable",`the input "${o}" can't be parsed as ${n}`))}function ds(t,e,i=!0){return t.isValid?Wi.create(Sn.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(t,e):null}function us(t,e){const i=t.c.year>9999||t.c.year<0;let n="";return i&&t.c.year>=0&&(n+="+"),n+=mi(t.c.year,i?6:4),e?(n+="-",n+=mi(t.c.month),n+="-",n+=mi(t.c.day)):(n+=mi(t.c.month),n+=mi(t.c.day)),n}function ps(t,e,i,n,o,s){let r=mi(t.c.hour);return e?(r+=":",r+=mi(t.c.minute),0===t.c.second&&i||(r+=":")):r+=mi(t.c.minute),0===t.c.second&&i||(r+=mi(t.c.second),0===t.c.millisecond&&n||(r+=".",r+=mi(t.c.millisecond,3))),o&&(t.isOffsetFixed&&0===t.offset&&!s?r+="Z":t.o<0?(r+="-",r+=mi(Math.trunc(-t.o/60)),r+=":",r+=mi(Math.trunc(-t.o%60))):(r+="+",r+=mi(Math.trunc(t.o/60)),r+=":",r+=mi(Math.trunc(t.o%60)))),s&&(r+="["+t.zone.ianaName+"]"),r}const ms={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},fs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},gs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},vs=["year","month","day","hour","minute","second","millisecond"],ys=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],bs=["year","ordinal","hour","minute","second","millisecond"];function _s(t){const e={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"}[t.toLowerCase()];if(!e)throw new ze(t);return e}function xs(t,e){const i=rn(e.zone,pn.defaultZone),n=Sn.fromObject(e),o=pn.now();let s,r;if(ai(t.year))s=o;else{for(const e of vs)ai(t[e])&&(t[e]=ms[e]);const e=Qo(t)||ts(t);if(e)return Ss.invalid(e);const n=i.offset(o);[s,r]=ls(t,n,i)}return new Ss({ts:s,zone:i,loc:n,o:r})}function ws(t,e,i){const n=!!ai(i.round)||i.round,o=(t,o)=>{t=yi(t,n||i.calendary?0:2,!0);return e.loc.clone(i).relFormatter(i).format(t,o)},s=n=>i.calendary?e.hasSame(t,n)?0:e.startOf(n).diff(t.startOf(n),n).get(n):e.diff(t,n).get(n);if(i.unit)return o(s(i.unit),i.unit);for(const t of i.units){const e=s(t);if(Math.abs(e)>=1)return o(e,t)}return o(t>e?-0:0,i.units[i.units.length-1])}function ks(t){let e,i={};return t.length>0&&"object"==typeof t[t.length-1]?(i=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[i,e]}class Ss{constructor(t){const e=t.zone||pn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Gi("invalid input"):null)||(e.isValid?null:ns(e));this.ts=ai(t.ts)?pn.now():t.ts;let n=null,o=null;if(!i){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[n,o]=[t.old.c,t.old.o];else{const t=e.offset(this.ts);n=as(this.ts,t),i=Number.isNaN(n.year)?new Gi("invalid input"):null,n=i?null:n,o=i?null:t}}this._zone=e,this.loc=t.loc||Sn.create(),this.invalid=i,this.weekData=null,this.c=n,this.o=o,this.isLuxonDateTime=!0}static now(){return new Ss({})}static local(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static utc(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return t.zone=on.utcInstance,xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const i=function(t){return"[object Date]"===Object.prototype.toString.call(t)}(t)?t.valueOf():NaN;if(Number.isNaN(i))return Ss.invalid("invalid input");const n=rn(e.zone,pn.defaultZone);return n.isValid?new Ss({ts:i,zone:n,loc:Sn.fromObject(e)}):Ss.invalid(ns(n))}static fromMillis(t,e={}){if(li(t))return t<-is||t>is?Ss.invalid("Timestamp out of range"):new Ss({ts:t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(li(t))return new Ss({ts:1e3*t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const i=rn(e.zone,pn.defaultZone);if(!i.isValid)return Ss.invalid(ns(i));const n=pn.now(),o=ai(e.specificOffset)?i.offset(n):e.specificOffset,s=Ti(t,_s),r=!ai(s.ordinal),a=!ai(s.year),l=!ai(s.month)||!ai(s.day),h=a||l,c=s.weekYear||s.weekNumber,d=Sn.fromObject(e);if((h||r)&&c)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Oe("Can't mix ordinal dates with month/day");const u=c||s.weekday&&!h;let p,m,f=as(n,o);u?(p=ys,m=fs,f=Ko(f)):r?(p=bs,m=gs,f=Jo(f)):(p=vs,m=ms);let g=!1;for(const t of p){ai(s[t])?s[t]=g?m[t]:f[t]:g=!0}const v=u?function(t){const e=hi(t.weekYear),i=pi(t.weekNumber,1,ki(t.weekYear)),n=pi(t.weekday,1,7);return e?i?!n&&jo("weekday",t.weekday):jo("week",t.week):jo("weekYear",t.weekYear)}(s):r?function(t){const e=hi(t.year),i=pi(t.ordinal,1,_i(t.year));return e?!i&&jo("ordinal",t.ordinal):jo("year",t.year)}(s):Qo(s),y=v||ts(s);if(y)return Ss.invalid(y);const b=u?Yo(s):r?Xo(s):s,[_,x]=ls(b,o,i),w=new Ss({ts:_,zone:i,o:x,loc:d});return s.weekday&&h&&t.weekday!==w.weekday?Ss.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${w.toISO()}`):w}static fromISO(t,e={}){const[i,n]=function(t){return $n(t,[Qn,no],[to,oo],[eo,so],[io,ro])}(t);return cs(i,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[i,n]=function(t){return $n(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Hn,Wn])}(t);return cs(i,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[i,n]=function(t){return $n(t,[Gn,Jn],[Kn,Jn],[Yn,Xn])}(t);return cs(i,n,e,"HTTP",e)}static fromFormat(t,e,i={}){if(ai(t)||ai(e))throw new Pe("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:o=null}=i,s=Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),[r,a,l,h]=function(t,e,i){const{result:n,zone:o,specificOffset:s,invalidReason:r}=Zo(t,e,i);return[n,o,s,r]}(s,t,e);return h?Ss.invalid(h):cs(r,a,i,`format ${e}`,t,l)}static fromString(t,e,i={}){return Ss.fromFormat(t,e,i)}static fromSQL(t,e={}){const[i,n]=function(t){return $n(t,[lo,no],[ho,co])}(t);return cs(i,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the DateTime is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Ae(i);return new Ss({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}get(t){return this[t]}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?os(this).weekYear:NaN}get weekNumber(){return this.isValid?os(this).weekNumber:NaN}get weekday(){return this.isValid?os(this).weekday:NaN}get ordinal(){return this.isValid?Jo(this.c).ordinal:NaN}get monthShort(){return this.isValid?So.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?So.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?So.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?So.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)}get isInLeapYear(){return bi(this.year)}get daysInMonth(){return xi(this.year,this.month)}get daysInYear(){return this.isValid?_i(this.year):NaN}get weeksInWeekYear(){return this.isValid?ki(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:i,calendar:n}=Wi.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:i,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(on.instance(t),e)}toLocal(){return this.setZone(pn.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:i=!1}={}){if((t=rn(t,pn.defaultZone)).equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||i){const e=t.offset(this.ts),i=this.toObject();[n]=ls(i,e,t)}return ss(this,{ts:n,zone:t})}return Ss.invalid(ns(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:i}={}){return ss(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:i})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=Ti(t,_s),i=!ai(e.weekYear)||!ai(e.weekNumber)||!ai(e.weekday),n=!ai(e.ordinal),o=!ai(e.year),s=!ai(e.month)||!ai(e.day),r=o||s,a=e.weekYear||e.weekNumber;if((r||n)&&a)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&n)throw new Oe("Can't mix ordinal dates with month/day");let l;i?l=Yo({...Ko(this.c),...e}):ai(e.ordinal)?(l={...this.toObject(),...e},ai(e.day)&&(l.day=Math.min(xi(l.year,l.month),l.day))):l=Xo({...Jo(this.c),...e});const[h,c]=ls(l,this.o,this.zone);return ss(this,{ts:h,o:c})}plus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t).negate()))}startOf(t){if(!this.isValid)return this;const e={},i=xo.normalizeUnit(t);switch(i){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0}if("weeks"===i&&(e.weekday=1),"quarters"===i){const t=Math.ceil(this.month/3);e.month=3*(t-1)+1}return this.set(e)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,e={}){return this.isValid?Wi.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):es}toLocaleString(t=Be,e={}){return this.isValid?Wi.create(this.loc.clone(e),t).formatDateTime(this):es}toLocaleParts(t={}){return this.isValid?Wi.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const s="extended"===t;let r=us(this,s);return r+="T",r+=ps(this,s,e,i,n,o),r}toISODate({format:t="extended"}={}){return this.isValid?us(this,"extended"===t):null}toISOWeekDate(){return ds(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:o=!1,format:s="extended"}={}){if(!this.isValid)return null;return(n?"T":"")+ps(this,"extended"===s,e,t,i,o)}toRFC2822(){return ds(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ds(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?us(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(e||t)&&(i&&(n+=" "),e?n+="z":t&&(n+="ZZ")),ds(this,n,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():es}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(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",i={}){if(!this.isValid||!t.isValid)return xo.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=(a=e,Array.isArray(a)?a:[a]).map(xo.normalizeUnit),s=t.valueOf()>this.valueOf(),r=Co(s?this:t,s?t:this,o,n);var a;return s?r.negate():r}diffNow(t="milliseconds",e={}){return this.diff(Ss.now(),t,e)}until(t){return this.isValid?ko.fromDateTimes(this,t):this}hasSame(t,e){if(!this.isValid)return!1;const i=t.valueOf(),n=this.setZone(t.zone,{keepLocalTime:!0});return n.startOf(e)<=i&&i<=n.endOf(e)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||Ss.fromObject({},{zone:this.zone}),i=t.padding?this<e?-t.padding:t.padding:0;let n=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(n=t.unit,o=void 0),ws(e,this.plus(i),{...t,numeric:"always",units:n,unit:o})}toRelativeCalendar(t={}){return this.isValid?ws(t.base||Ss.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Ss.isDateTime))throw new Pe("min requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.min)}static max(...t){if(!t.every(Ss.isDateTime))throw new Pe("max requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,i={}){const{locale:n=null,numberingSystem:o=null}=i;return Zo(Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,i={}){return Ss.fromFormatExplain(t,e,i)}static get DATE_SHORT(){return Be}static get DATE_MED(){return qe}static get DATE_MED_WITH_WEEKDAY(){return Ue}static get DATE_FULL(){return Ze}static get DATE_HUGE(){return Fe}static get TIME_SIMPLE(){return Ve}static get TIME_WITH_SECONDS(){return je}static get TIME_WITH_SHORT_OFFSET(){return He}static get TIME_WITH_LONG_OFFSET(){return We}static get TIME_24_SIMPLE(){return Ge}static get TIME_24_WITH_SECONDS(){return Ke}static get TIME_24_WITH_SHORT_OFFSET(){return Ye}static get TIME_24_WITH_LONG_OFFSET(){return Je}static get DATETIME_SHORT(){return Xe}static get DATETIME_SHORT_WITH_SECONDS(){return Qe}static get DATETIME_MED(){return ti}static get DATETIME_MED_WITH_SECONDS(){return ei}static get DATETIME_MED_WITH_WEEKDAY(){return ii}static get DATETIME_FULL(){return ni}static get DATETIME_FULL_WITH_SECONDS(){return oi}static get DATETIME_HUGE(){return si}static get DATETIME_HUGE_WITH_SECONDS(){return ri}}function Es(t){if(Ss.isDateTime(t))return t;if(t&&t.valueOf&&li(t.valueOf()))return Ss.fromJSDate(t);if(t&&"object"==typeof t)return Ss.fromObject(t);throw new Pe(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Cs=(t,e,i)=>{let n=t[0];for(let o=1;o<t.length;o++)n+=e[i?i[o-1]:o-1],n+=t[o];return n},$s=t=>{return"string"!=typeof(e=t)&&"strTag"in e?Cs(t.strings,t.values):t;var e};class Ts{constructor(){this.settled=!1,this.promise=new Promise(((t,e)=>{this._resolve=t,this._reject=e}))}resolve(t){this.settled=!0,this._resolve(t)}reject(t){this.settled=!0,this._reject(t)}}const As=[];for(let t=0;t<256;t++)As[t]=(t>>4&15).toString(16)+(15&t).toString(16);function Ls(t,e){return(e?"h":"s")+function(t){let e=0,i=8997,n=0,o=33826,s=0,r=40164,a=0,l=52210;for(let h=0;h<t.length;h++)i^=t.charCodeAt(h),e=435*i,n=435*o,s=435*r,a=435*l,s+=i<<8,a+=o<<8,n+=e>>>16,i=65535&e,s+=n>>>16,o=65535&n,l=a+(s>>>16)&65535,r=65535&s;return As[l>>8]+As[255&l]+As[r>>8]+As[255&r]+As[o>>8]+As[255&o]+As[i>>8]+As[255&i]}("string"==typeof t?t:t.join(""))}const Ms=new WeakMap,Os=new Map;function zs(t,e,i){var n;if(t){const o=null!==(n=null==i?void 0:i.id)&&void 0!==n?n:function(t){const e="string"==typeof t?t:t.strings;let i=Os.get(e);void 0===i&&(i=Ls(e,"string"!=typeof t&&!("strTag"in t)),Os.set(e,i));return i}(e),s=t[o];if(s){if("string"==typeof s)return s;if("strTag"in s)return Cs(s.strings,e.values,s.values);{let t=Ms.get(s);return void 0===t&&(t=s.values,Ms.set(s,t)),{...s,values:t.map((t=>e.values[t]))}}}}return $s(e)}function Ps(t){window.dispatchEvent(new CustomEvent("lit-localize-status",{detail:t}))}let Is,Ds,Ns,Rs,Bs,qs="",Us=new Ts;Us.resolve();let Zs=0;const Fs=()=>qs,Vs=t=>{if(t===(null!=Is?Is:qs))return Us.promise;if(!Ns||!Rs)throw new Error("Internal error");if(!Ns.has(t))throw new Error("Invalid locale code");Zs++;const e=Zs;Is=t,Us.settled&&(Us=new Ts),Ps({status:"loading",loadingLocale:t});return(t===Ds?Promise.resolve({templates:void 0}):Rs(t)).then((i=>{Zs===e&&(qs=t,Is=void 0,Bs=i.templates,Ps({status:"ready",readyLocale:t}),Us.resolve())}),(i=>{Zs===e&&(Ps({status:"error",errorLocale:t,errorMessage:i.toString()}),Us.reject(i))})),Us.promise};let js=$s,Hs=!1;const Ws=["es","fr","pt"],{setLocale:Gs}=(t=>(function(t){if(Hs)throw new Error("lit-localize can only be configured once");js=t,Hs=!0}(((t,e)=>zs(Bs,t,e))),qs=Ds=t.sourceLocale,Ns=new Set(t.targetLocales),Ns.add(t.sourceLocale),Rs=t.loadLocale,{getLocale:Fs,setLocale:Vs}))({sourceLocale:"en",targetLocales:Ws,loadLocale:t=>import(`./locales/${t}.js`)});class Ks extends lt{constructor(){super(...arguments),this.settings={},this.ttl=6e4,this.max=20,this.ready=!1,this.loader=!1,this.keyedAssets={},this.locale=[...navigator.languages],this.fields={},this.groups={},this.languages={},this.featuredFields=[],this.pendingResolves={},this.fetching={}}static get styles(){return r`
228
228
  :host {
229
229
  position: fixed;
230
230
  z-index: 1000;
package/dist/sw.js CHANGED
@@ -1,2 +1,2 @@
1
- if(!self.define){let e,t={};const o=(o,n)=>(o=new URL(o+".js",n).href,t[o]||new Promise((t=>{if("document"in self){const e=document.createElement("script");e.src=o,e.onload=t,document.head.appendChild(e)}else e=o,importScripts(o),t()})).then((()=>{let e=t[o];if(!e)throw new Error(`Module ${o} didn’t register its module`);return e})));self.define=(n,s)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(t[i])return;let r={};const l=e=>o(e,i),c={module:{uri:i},exports:r,require:l};t[i]=Promise.all(n.map((e=>c[e]||l(e)))).then((e=>(s(...e),r)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"5ca3af22.js",revision:"7a64c6765fa1af9fe3c5ce99618b381b"},{url:"templates/components-body.html",revision:"e4801b1ab09d2a3763eb83a75c4f2ac1"},{url:"templates/components-head.html",revision:"5b9f34d113d9af7abfee5540956c4bf4"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")}));
1
+ if(!self.define){let e,t={};const o=(o,n)=>(o=new URL(o+".js",n).href,t[o]||new Promise((t=>{if("document"in self){const e=document.createElement("script");e.src=o,e.onload=t,document.head.appendChild(e)}else e=o,importScripts(o),t()})).then((()=>{let e=t[o];if(!e)throw new Error(`Module ${o} didn’t register its module`);return e})));self.define=(n,s)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(t[i])return;let r={};const c=e=>o(e,i),l={module:{uri:i},exports:r,require:c};t[i]=Promise.all(n.map((e=>l[e]||c(e)))).then((e=>(s(...e),r)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"420b0ee3.js",revision:"def66b91c3c8186112c57a989c277d2e"},{url:"templates/components-body.html",revision:"8fcd994ac0edf4f5a7c78f8efbea8546"},{url:"templates/components-head.html",revision:"2e535e3e376bd4b74f4aa2ce282f0c91"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")}));
2
2
  //# sourceMappingURL=sw.js.map
package/dist/sw.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sw.js","sources":["../../tmp/8c49a83c721a22862579bc82e1db5e97/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/workspaces/temba-components/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/workspaces/temba-components/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/workspaces/temba-components/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/workspaces/temba-components/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/workspaces/temba-components/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/workspaces/temba-components/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"5ca3af22.js\",\n \"revision\": \"7a64c6765fa1af9fe3c5ce99618b381b\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"e4801b1ab09d2a3763eb83a75c4f2ac1\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"5b9f34d113d9af7abfee5540956c4bf4\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"0nBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,aAAiC"}
1
+ {"version":3,"file":"sw.js","sources":["../../tmp/585c4ed47428dd52e2fa6fee1265159a/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/workspaces/temba-components/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/workspaces/temba-components/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/workspaces/temba-components/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/workspaces/temba-components/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/workspaces/temba-components/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/workspaces/temba-components/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"420b0ee3.js\",\n \"revision\": \"def66b91c3c8186112c57a989c277d2e\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"8fcd994ac0edf4f5a7c78f8efbea8546\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"2e535e3e376bd4b74f4aa2ce282f0c91\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"0nBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,aAAiC"}
@@ -1 +1 @@
1
- <script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/5ca3af22.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.62.0"</script>
1
+ <script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/420b0ee3.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.62.1"</script>
@@ -1 +1 @@
1
- <link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/5ca3af22.js" crossorigin="anonymous">
1
+ <link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/420b0ee3.js" crossorigin="anonymous">
@@ -416,13 +416,13 @@ export const oxford = (items, joiner = 'and') => {
416
416
  }
417
417
  if (items.length === 2) {
418
418
  // TemplateResults get a different treatment
419
- if (items[0].type === 'html') {
419
+ if (typeof items[0] === 'object') {
420
420
  return html `${items[0]} ${joiner} ${items[1]}`;
421
421
  }
422
422
  return items.join(' ' + joiner + ' ');
423
423
  }
424
424
  // TemplateResults get a different treatment
425
- if (items[0].type === 'html') {
425
+ if (typeof items[0] === 'object') {
426
426
  return items.map((tr, idx) => {
427
427
  if (idx < items.length - 1) {
428
428
  return html `${tr}, `;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,OAAO,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AAIhD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAE3D,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;AAIlC,MAAM,CAAC,MAAM,WAAW,GACtB,gNAAgN,CAAC;AAenN,uCAAuC;AACvC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAU,EAAE;IACpD,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QAC/C,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAChC,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAEnC,oBAAoB;QACpB,GAAG,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAErB,IAAI,GAAG,KAAK,IAAI,EAAE;YAChB,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAAe,EAAE,EAAE,EAAE;IAC9C,M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AI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACtB,IAAI,KAAK,CAAC,IAAI,EAAE;QACd,IAAI,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;KAC3D;IAED,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,MAAM,GAAG,CAAC,EAAE;QACd,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAClC;IACD,IAAI,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;IACzE,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAElC,MAAM,MAAM,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;yBAgBI,KAAK;;;;;gDAKkB,QAAQ;;;;GAIrD,CAAC;IACF,OAAO,KAAK,CAAC,GAAG;QACd,CAAC,CAAC,IAAI,CAAA;0BACgB,IAAI,aAAa,KAAK,CAAC,QAAQ;YAC7C,MAAM;;OAEX;QACH,CAAC,CAAC,MAAM,CAAC;AACb,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-this-alias */\nimport { html, TemplateResult } from 'lit-html';\nimport { Button } from '../button/Button';\nimport { Dialog } from '../dialog/Dialog';\nimport { ContactField, Ticket, User } from '../interfaces';\nimport ColorHash from 'color-hash';\n\nexport const DEFAULT_MEDIA_ENDPOINT = '/api/v2/media.json';\n\nconst colorHash = new ColorHash();\n\nexport type Asset = KeyedAsset & Ticket & ContactField;\n\nexport const DATE_FORMAT =\n /(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))/;\n\ninterface KeyedAsset {\n key?: string;\n}\n\ninterface AssetPage {\n assets: Asset[];\n next: string;\n}\n\nexport interface ResultsPage {\n results: any[];\n next: string;\n}\n/** Get the value for a named cookie */\nexport const getHTTPCookie = (name: string): string => {\n for (const cookie of document.cookie.split(';')) {\n const idx = cookie.indexOf('=');\n let key = cookie.substr(0, idx);\n let value = cookie.substr(idx + 1);\n\n // no spaces allowed\n key = key.trim();\n value = value.trim();\n\n if (key === name) {\n return value;\n }\n }\n return null;\n};\n\nexport const getHeaders = (headers: any = {}) => {\n const csrf = getHTTPCookie('csrftoken');\n const fetchHeaders: any = csrf ? { 'X-CSRFToken': csrf } : {};\n\n // mark us as ajax\n fetchHeaders['X-Requested-With'] = 'XMLHttpRequest';\n\n Object.keys(headers).forEach(key => {\n fetchHeaders[key] = headers[key];\n });\n\n return fetchHeaders;\n};\n\nexport const getUrl = (\n url: string,\n controller: AbortController = null,\n headers: { [key: string]: string } = {}\n): Promise<WebResponse> => {\n return new Promise<WebResponse>((resolve, reject) => {\n const options = {\n method: 'GET',\n headers: getHeaders(headers),\n };\n\n if (controller) {\n options['signal'] = controller.signal;\n }\n\n fetch(url, options)\n .then(response => {\n response.text().then((body: string) => {\n let json = {};\n try {\n json = JSON.parse(body);\n // eslint-disable-next-line no-empty\n } catch (err) {}\n resolve({\n controller,\n body,\n json,\n url: response.url,\n headers: response.headers,\n status: response.status,\n });\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nexport type ClassMap = {\n [className: string]: boolean;\n};\n\nexport const getClasses = (map: ClassMap): string => {\n const classNames: string[] = [];\n Object.keys(map).forEach((className: string) => {\n if (map[className]) {\n classNames.push(className);\n }\n });\n\n let result = classNames.join(' ');\n if (result.trim().length > 0) {\n result = ' ' + result;\n }\n return result.trim();\n};\n\nexport const fetchResultsPage = (\n url: string,\n controller: AbortController = null\n): Promise<ResultsPage> => {\n return new Promise<ResultsPage>((resolve, reject) => {\n getUrl(url, controller)\n .then((response: WebResponse) => {\n resolve({\n results: response.json.results,\n next: response.json.next,\n });\n })\n .catch(error => reject(error));\n });\n};\n\nexport const fetchResults = async (url: string): Promise<any[]> => {\n if (!url) {\n return new Promise<any[]>(resolve => resolve([]));\n }\n\n let results: any[] = [];\n let pageUrl = url;\n while (pageUrl) {\n const resultsPage = await fetchResultsPage(pageUrl);\n if (resultsPage.results) {\n results = results.concat(resultsPage.results);\n }\n pageUrl = resultsPage.next;\n }\n return results;\n};\n\nexport const getAssetPage = (url: string): Promise<AssetPage> => {\n return new Promise<AssetPage>((resolve, reject) => {\n getUrl(url)\n .then((response: WebResponse) => {\n if (response.status >= 200 && response.status < 300) {\n resolve({\n assets: response.json.results,\n next: response.json.next,\n });\n } else {\n reject(response);\n }\n })\n .catch(error => reject(error));\n });\n};\n\nexport const getAssets = async (url: string): Promise<Asset[]> => {\n if (!url) {\n return new Promise<Asset[]>(resolve => resolve([]));\n }\n\n let assets: Asset[] = [];\n let pageUrl = url;\n while (pageUrl) {\n const assetPage = await getAssetPage(pageUrl);\n if (assetPage.assets) {\n assets = assets.concat(assetPage.assets);\n pageUrl = assetPage.next;\n } else {\n pageUrl = null;\n }\n }\n return assets;\n};\n\nexport interface WebResponse {\n json: any;\n body?: string;\n status: number;\n url?: string;\n headers: Headers;\n controller?: AbortController;\n redirected?: boolean;\n}\n\nexport const postUrl = (\n url: string,\n payload: any,\n headers: any = {},\n contentType = null\n): Promise<WebResponse> => {\n const fetchHeaders = getHeaders(headers);\n\n if (contentType) {\n fetchHeaders['Content-Type'] = contentType;\n }\n\n const options = {\n method: 'POST',\n headers: fetchHeaders,\n body: payload,\n };\n\n return new Promise<WebResponse>((resolve, reject) => {\n fetch(url, options)\n .then(async response => {\n response.text().then((body: string) => {\n let json = {};\n try {\n json = JSON.parse(body);\n // eslint-disable-next-line no-empty\n } catch (err) {}\n resolve({\n body,\n json,\n headers: response.headers,\n status: response.status,\n redirected: response.redirected,\n url: response.url,\n });\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nexport const postJSON = (url: string, payload: any): Promise<WebResponse> => {\n return postUrl(url, JSON.stringify(payload), false, 'application/json');\n};\n\nexport const postFormData = (\n url: string,\n formData: FormData\n): Promise<WebResponse> => {\n return new Promise<WebResponse>((resolve, reject) => {\n postUrl(url, formData, true)\n .then(response => {\n if (response.status >= 200 && response.status < 400) {\n resolve(response);\n } else {\n if (url === DEFAULT_MEDIA_ENDPOINT) {\n reject(response);\n } else {\n reject('Server failure');\n }\n }\n })\n .catch(err => {\n console.error(err);\n reject(err);\n });\n });\n};\n\nexport const postForm = (\n url: string,\n payload: any | FormData\n): Promise<WebResponse> => {\n const formData = new FormData();\n Object.keys(payload).forEach((key: string) => {\n formData.append(key, payload[key]);\n });\n return postFormData(url, formData);\n};\n\n/**\n */\nexport const renderIf =\n (predicate: boolean | any) =>\n (then: () => TemplateResult, otherwise?: () => TemplateResult) => {\n return predicate ? then() : otherwise ? otherwise() : html``;\n };\n\nexport const hexToRgb = (hex: string): { r: number; g: number; b: number } => {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n }\n : null;\n};\n\nexport const getElementOffset = (\n ele: HTMLElement\n): {\n top: number;\n left: number;\n bottom: number;\n right: number;\n width: number;\n height: number;\n} => {\n const rect = ele.getBoundingClientRect();\n const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n return {\n top: rect.top + scrollTop,\n left: rect.left + scrollLeft,\n bottom: rect.top + rect.height,\n right: rect.left + rect.width,\n width: rect.width,\n height: rect.height,\n };\n};\n\nexport const plural = (count: number, singular: string, plural: string) => {\n return count === 1 ? singular : plural;\n};\n\nexport const range = (start: number, end: number) =>\n Array.from({ length: end - start }, (v: number, k: number) => k + start);\n\nexport const fillTemplate = (\n template: string,\n replacements: { [key: string]: string | number }\n): TemplateResult => {\n for (const key in replacements) {\n const className = key + '-replaced';\n replacements[\n key\n ] = `<span class=\"${className}\">${replacements[key]}</span>`;\n }\n\n const templateDiv = document.createElement('div');\n // templateDiv.innerHTML = dynamicTemplate(template, replacements);\n return html` ${templateDiv} `;\n};\n\n/*!\n * Serialize all form data into a query string\n * (c) 2018 Chris Ferdinandi, MIT License, https://gomakethings.com\n * @param {Node} form The form to serialize\n * @return {String} The serialized form data\n */\nexport const serialize = function (form: any) {\n // Setup our serialized data\n const serialized = [];\n\n // Loop through each field in the form\n for (let i = 0; i < form.elements.length; i++) {\n const field = form.elements[i];\n\n // Don't serialize fields without a name, submits, buttons, file and reset inputs, and disabled fields\n if (\n !field.name ||\n field.disabled ||\n field.type === 'file' ||\n field.type === 'reset' ||\n field.type === 'submit' ||\n field.type === 'button'\n )\n continue;\n\n // If a multi-select, get all selections\n if (field.type === 'select-multiple') {\n for (let n = 0; n < field.options.length; n++) {\n if (!field.options[n].selected) continue;\n if (field.options[n].value) {\n serialized.push(\n encodeURIComponent(field.name) +\n '=' +\n encodeURIComponent(field.options[n].value)\n );\n }\n }\n }\n\n // Convert field data to a query string\n else if (\n (field.type !== 'checkbox' && field.type !== 'radio') ||\n field.checked\n ) {\n let value = field.value;\n if (!value && field.checked) {\n value = '1';\n }\n\n if (value) {\n serialized.push(\n encodeURIComponent(field.name) + '=' + encodeURIComponent(value)\n );\n }\n }\n }\n return serialized.join('&');\n};\n\nexport const getScrollParent = (node: any): any => {\n const parent = node.parentNode || node.host;\n if (parent) {\n const isElement = parent instanceof HTMLElement;\n const overflowY = isElement && window.getComputedStyle(parent).overflowY;\n const isScrollable =\n overflowY &&\n !(overflowY.includes('hidden') || overflowY.includes('visible'));\n\n if (!parent) {\n return null;\n } else if (isScrollable && parent.scrollHeight >= parent.clientHeight) {\n return parent;\n }\n\n return getScrollParent(parent);\n }\n return null;\n};\n\nexport const isElementVisible = (el: any, holder: any) => {\n holder = holder || document.body;\n const { top, bottom } = el.getBoundingClientRect();\n const holderRect = holder.getBoundingClientRect();\n\n return top <= holderRect.top\n ? bottom > holderRect.top\n : bottom < holderRect.bottom;\n};\n\nconst HOUR = 3600;\nconst DAY = HOUR * 24;\nconst MONTH = DAY * 30;\n\nexport class Stubbable {\n public getCurrentDate() {\n return new Date();\n }\n}\n\nexport const stubbable = new Stubbable();\n\nexport const timeSince = (\n date: Date,\n options: { compareDate?: Date; hideRecentText?: boolean; suffix?: string } = {\n suffix: '',\n }\n) => {\n const { compareDate, hideRecentText, suffix } = options;\n const now = compareDate || stubbable.getCurrentDate();\n const secondsPast = Math.floor((now.getTime() - date.getTime()) / 1000);\n\n if (secondsPast < 60) {\n if (compareDate) {\n return secondsPast + 's' + suffix;\n }\n\n if (!hideRecentText && suffix) {\n return suffix;\n }\n return 'just now';\n }\n\n if (secondsPast < HOUR) {\n return Math.round(secondsPast / 60) + 'm' + suffix;\n }\n\n if (secondsPast <= DAY) {\n return Math.round(secondsPast / HOUR) + 'h' + suffix;\n }\n\n if (secondsPast <= MONTH) {\n return Math.round(secondsPast / DAY) + 'd' + suffix;\n }\n\n if (secondsPast < MONTH * 6) {\n return Math.round(secondsPast / MONTH) + 'mth' + suffix;\n } else {\n const day = date.getDate();\n const month = date\n .toDateString()\n .match(/ [a-zA-Z]*/)[0]\n .replace(' ', '');\n const year =\n date.getFullYear() == now.getFullYear() ? '' : ' ' + date.getFullYear();\n return day + ' ' + month + year;\n }\n};\n\nexport const isDate = (value: string): boolean => {\n if (toString.call(value) === '[object Date]') {\n return true;\n }\n if (typeof value.replace === 'function') {\n value.replace(/^\\s+|\\s+$/gm, '');\n }\n\n // value = value.split(\"+\")[0];\n return DATE_FORMAT.test(value);\n};\n\nexport const debounce = (fn: any, millis: number, immediate = false) => {\n let timeout: any;\n return function (...args: any) {\n const context = this;\n const later = function () {\n timeout = null;\n if (!immediate) {\n fn.apply(context, args);\n }\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, millis);\n if (callNow) {\n fn.apply(context, args);\n }\n };\n};\n\nexport const throttle = (fn: any, millis: number) => {\n let ready = true;\n return function (...args: any) {\n const context = this;\n if (!ready) {\n return;\n }\n\n ready = false;\n fn.apply(context, args);\n setTimeout(() => {\n ready = true;\n }, millis);\n };\n};\n\nexport interface NamedObject {\n name: string;\n}\n\nexport const truncate = (input: string, max: number): string => {\n if (input.length > max) {\n return input.substring(0, max) + '...';\n }\n\n return input;\n};\n\nexport const oxford = (items: any[], joiner = 'and'): any => {\n if (items.length === 1) {\n return items[0];\n }\n\n if (items.length === 2) {\n // TemplateResults get a different treatment\n if (items[0].type === 'html') {\n return html`${items[0]} ${joiner} ${items[1]}`;\n }\n return items.join(' ' + joiner + ' ');\n }\n\n // TemplateResults get a different treatment\n if (items[0].type === 'html') {\n return items.map((tr: TemplateResult, idx: number) => {\n if (idx < items.length - 1) {\n return html`${tr}, `;\n }\n return html`${joiner} ${tr}`;\n });\n }\n\n return items.join(', ') + joiner + items[items.length - 1];\n};\n\nexport const oxfordFn = (\n items: any[],\n fn: (item: any) => any,\n joiner = 'and'\n): any => {\n return oxford(items.map(fn), joiner);\n};\n\nexport const oxfordNamed = (items: NamedObject[], joiner = 'and'): any => {\n return oxfordFn(items, (value: any) => value.name, joiner);\n};\n\nexport const getDialog = (button: Button): Dialog => {\n return (button.getRootNode() as ShadowRoot).host as Dialog;\n};\n\nexport const setCookie = (name: string, value: any, path = undefined) => {\n if (!path) {\n // default path is the first word in the url\n const url = document.location.pathname;\n path = url.substring(0, url.indexOf('/', 1));\n }\n const now = new Date();\n now.setTime(now.getTime() + 60 * 1000 * 60 * 24 * 30);\n document.cookie = `${name}=${value};expires=${now.toUTCString()};path=${path}`;\n};\n\nexport const getCookie = (name: string) => {\n let cookieValue = null;\n if (document.cookie && document.cookie != '') {\n const cookies = document.cookie.split(';');\n for (let i = 0; i < cookies.length; i++) {\n const cookie = cookies[i].trim();\n // Does this cookie string begin with the name we want?\n if (cookie.substring(0, name.length + 1) == name + '=') {\n cookieValue = decodeURIComponent(cookie.substring(name.length + 1));\n break;\n }\n }\n }\n return cookieValue;\n};\n\nexport const getCookieBoolean = (name: string) => {\n return (getCookie(name) || '') === 'true';\n};\n\nexport enum COOKIE_KEYS {\n SETTINGS = 'settings',\n MENU_COLLAPSED = 'menu-collapsed',\n TICKET_SHOW_DETAILS = 'tickets.show-details',\n}\n\nexport const capitalize = ([first, ...rest], locale = navigator.language) =>\n first === undefined ? '' : first.toLocaleUpperCase(locale) + rest.join('');\n\nexport const formatFileType = (type: string): string => {\n return type.split('/')[1];\n};\nexport const formatFileSize = (bytes: number, decimalPoint: number): string => {\n if (bytes == 0) return '0 KB';\n const k = 1024,\n dm = decimalPoint || 2,\n sizes = ['B', 'KB', 'MB', 'GB'], //, 'TB', 'PB', 'EB', 'ZB', 'YB'],\n i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n};\n\nexport const stopEvent = (event: Event) => {\n if (event) {\n event.stopPropagation();\n event.preventDefault();\n }\n};\n\nexport const getFullName = (user: User) => {\n if (user.first_name && user.last_name) {\n return `${user.first_name} ${user.last_name}`;\n }\n\n return user.email;\n};\n\nexport const hslToHex = (h, s, l) => {\n l /= 100;\n const a = (s * Math.min(l, 1 - l)) / 100;\n const f = n => {\n const k = (n + h / 30) % 12;\n const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return Math.round(255 * color)\n .toString(16)\n .padStart(2, '0'); // convert to Hex and prefix \"0\" if needed\n };\n return `#${f(0)}${f(8)}${f(4)}`;\n};\n\nexport const renderAvatar = (input: {\n name?: string;\n user?: User;\n icon?: string;\n image?: string;\n position?: string;\n tip?: boolean;\n}) => {\n if (!input.position) {\n input.position = 'right';\n }\n\n // just a url\n if (input.image) {\n return html`<img src=\"${input.image}\" />`;\n }\n\n let text = input.name;\n if (input.user) {\n text = `${input.user.first_name} ${input.user.last_name}`;\n }\n\n if (!text) {\n return null;\n }\n\n const color = colorHash.hex(text);\n let second = text.indexOf(' ') + 1;\n if (second < 1) {\n second = text.length > 1 ? 1 : 0;\n }\n let initials = text.substring(0, 1) + text.substring(second, second + 1);\n initials = initials.toUpperCase();\n\n const avatar = html`\n <div\n style=\"border: 0px solid red; display:flex; flex-direction: column; align-items:center;\"\n >\n <div\n class=\"avatar-circle\"\n style=\"\n display: flex;\n height: 2em;\n width: 2em;\n flex-direction: row;\n align-items: center;\n color: #fff;\n border-radius: 100%;\n font-weight: 400;\n border: 0.3em solid rgba(0,0,0,.05);\n background:${color}\"\n >\n <div\n style=\"border: 0px solid red; display:flex; flex-direction: column; align-items:center;flex-grow:1\"\n >\n <div style=\"border:0px solid blue;\">${initials}</div>\n </div>\n </div>\n </div>\n `;\n return input.tip\n ? html`\n <temba-tip text=${text} position=${input.position}>\n ${avatar}\n </temba-tip>\n `\n : avatar;\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,OAAO,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AAIhD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAE3D,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;AAIlC,MAAM,CAAC,MAAM,WAAW,GACtB,gNAAgN,CAAC;AAenN,uCAAuC;AACvC,MAAM,CAAC,MAAM,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G,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;IACzE,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAElC,MAAM,MAAM,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;yBAgBI,KAAK;;;;;gDAKkB,QAAQ;;;;GAIrD,CAAC;IACF,OAAO,KAAK,CAAC,GAAG;QACd,CAAC,CAAC,IAAI,CAAA;0BACgB,IAAI,aAAa,KAAK,CAAC,QAAQ;YAC7C,MAAM;;OAEX;QACH,CAAC,CAAC,MAAM,CAAC;AACb,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-this-alias */\nimport { html, TemplateResult } from 'lit-html';\nimport { Button } from '../button/Button';\nimport { Dialog } from '../dialog/Dialog';\nimport { ContactField, Ticket, User } from '../interfaces';\nimport ColorHash from 'color-hash';\n\nexport const DEFAULT_MEDIA_ENDPOINT = '/api/v2/media.json';\n\nconst colorHash = new ColorHash();\n\nexport type Asset = KeyedAsset & Ticket & ContactField;\n\nexport const DATE_FORMAT =\n /(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))/;\n\ninterface KeyedAsset {\n key?: string;\n}\n\ninterface AssetPage {\n assets: Asset[];\n next: string;\n}\n\nexport interface ResultsPage {\n results: any[];\n next: string;\n}\n/** Get the value for a named cookie */\nexport const getHTTPCookie = (name: string): string => {\n for (const cookie of document.cookie.split(';')) {\n const idx = cookie.indexOf('=');\n let key = cookie.substr(0, idx);\n let value = cookie.substr(idx + 1);\n\n // no spaces allowed\n key = key.trim();\n value = value.trim();\n\n if (key === name) {\n return value;\n }\n }\n return null;\n};\n\nexport const getHeaders = (headers: any = {}) => {\n const csrf = getHTTPCookie('csrftoken');\n const fetchHeaders: any = csrf ? { 'X-CSRFToken': csrf } : {};\n\n // mark us as ajax\n fetchHeaders['X-Requested-With'] = 'XMLHttpRequest';\n\n Object.keys(headers).forEach(key => {\n fetchHeaders[key] = headers[key];\n });\n\n return fetchHeaders;\n};\n\nexport const getUrl = (\n url: string,\n controller: AbortController = null,\n headers: { [key: string]: string } = {}\n): Promise<WebResponse> => {\n return new Promise<WebResponse>((resolve, reject) => {\n const options = {\n method: 'GET',\n headers: getHeaders(headers),\n };\n\n if (controller) {\n options['signal'] = controller.signal;\n }\n\n fetch(url, options)\n .then(response => {\n response.text().then((body: string) => {\n let json = {};\n try {\n json = JSON.parse(body);\n // eslint-disable-next-line no-empty\n } catch (err) {}\n resolve({\n controller,\n body,\n json,\n url: response.url,\n headers: response.headers,\n status: response.status,\n });\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nexport type ClassMap = {\n [className: string]: boolean;\n};\n\nexport const getClasses = (map: ClassMap): string => {\n const classNames: string[] = [];\n Object.keys(map).forEach((className: string) => {\n if (map[className]) {\n classNames.push(className);\n }\n });\n\n let result = classNames.join(' ');\n if (result.trim().length > 0) {\n result = ' ' + result;\n }\n return result.trim();\n};\n\nexport const fetchResultsPage = (\n url: string,\n controller: AbortController = null\n): Promise<ResultsPage> => {\n return new Promise<ResultsPage>((resolve, reject) => {\n getUrl(url, controller)\n .then((response: WebResponse) => {\n resolve({\n results: response.json.results,\n next: response.json.next,\n });\n })\n .catch(error => reject(error));\n });\n};\n\nexport const fetchResults = async (url: string): Promise<any[]> => {\n if (!url) {\n return new Promise<any[]>(resolve => resolve([]));\n }\n\n let results: any[] = [];\n let pageUrl = url;\n while (pageUrl) {\n const resultsPage = await fetchResultsPage(pageUrl);\n if (resultsPage.results) {\n results = results.concat(resultsPage.results);\n }\n pageUrl = resultsPage.next;\n }\n return results;\n};\n\nexport const getAssetPage = (url: string): Promise<AssetPage> => {\n return new Promise<AssetPage>((resolve, reject) => {\n getUrl(url)\n .then((response: WebResponse) => {\n if (response.status >= 200 && response.status < 300) {\n resolve({\n assets: response.json.results,\n next: response.json.next,\n });\n } else {\n reject(response);\n }\n })\n .catch(error => reject(error));\n });\n};\n\nexport const getAssets = async (url: string): Promise<Asset[]> => {\n if (!url) {\n return new Promise<Asset[]>(resolve => resolve([]));\n }\n\n let assets: Asset[] = [];\n let pageUrl = url;\n while (pageUrl) {\n const assetPage = await getAssetPage(pageUrl);\n if (assetPage.assets) {\n assets = assets.concat(assetPage.assets);\n pageUrl = assetPage.next;\n } else {\n pageUrl = null;\n }\n }\n return assets;\n};\n\nexport interface WebResponse {\n json: any;\n body?: string;\n status: number;\n url?: string;\n headers: Headers;\n controller?: AbortController;\n redirected?: boolean;\n}\n\nexport const postUrl = (\n url: string,\n payload: any,\n headers: any = {},\n contentType = null\n): Promise<WebResponse> => {\n const fetchHeaders = getHeaders(headers);\n\n if (contentType) {\n fetchHeaders['Content-Type'] = contentType;\n }\n\n const options = {\n method: 'POST',\n headers: fetchHeaders,\n body: payload,\n };\n\n return new Promise<WebResponse>((resolve, reject) => {\n fetch(url, options)\n .then(async response => {\n response.text().then((body: string) => {\n let json = {};\n try {\n json = JSON.parse(body);\n // eslint-disable-next-line no-empty\n } catch (err) {}\n resolve({\n body,\n json,\n headers: response.headers,\n status: response.status,\n redirected: response.redirected,\n url: response.url,\n });\n });\n })\n .catch(error => {\n reject(error);\n });\n });\n};\n\nexport const postJSON = (url: string, payload: any): Promise<WebResponse> => {\n return postUrl(url, JSON.stringify(payload), false, 'application/json');\n};\n\nexport const postFormData = (\n url: string,\n formData: FormData\n): Promise<WebResponse> => {\n return new Promise<WebResponse>((resolve, reject) => {\n postUrl(url, formData, true)\n .then(response => {\n if (response.status >= 200 && response.status < 400) {\n resolve(response);\n } else {\n if (url === DEFAULT_MEDIA_ENDPOINT) {\n reject(response);\n } else {\n reject('Server failure');\n }\n }\n })\n .catch(err => {\n console.error(err);\n reject(err);\n });\n });\n};\n\nexport const postForm = (\n url: string,\n payload: any | FormData\n): Promise<WebResponse> => {\n const formData = new FormData();\n Object.keys(payload).forEach((key: string) => {\n formData.append(key, payload[key]);\n });\n return postFormData(url, formData);\n};\n\n/**\n */\nexport const renderIf =\n (predicate: boolean | any) =>\n (then: () => TemplateResult, otherwise?: () => TemplateResult) => {\n return predicate ? then() : otherwise ? otherwise() : html``;\n };\n\nexport const hexToRgb = (hex: string): { r: number; g: number; b: number } => {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n }\n : null;\n};\n\nexport const getElementOffset = (\n ele: HTMLElement\n): {\n top: number;\n left: number;\n bottom: number;\n right: number;\n width: number;\n height: number;\n} => {\n const rect = ele.getBoundingClientRect();\n const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;\n const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n return {\n top: rect.top + scrollTop,\n left: rect.left + scrollLeft,\n bottom: rect.top + rect.height,\n right: rect.left + rect.width,\n width: rect.width,\n height: rect.height,\n };\n};\n\nexport const plural = (count: number, singular: string, plural: string) => {\n return count === 1 ? singular : plural;\n};\n\nexport const range = (start: number, end: number) =>\n Array.from({ length: end - start }, (v: number, k: number) => k + start);\n\nexport const fillTemplate = (\n template: string,\n replacements: { [key: string]: string | number }\n): TemplateResult => {\n for (const key in replacements) {\n const className = key + '-replaced';\n replacements[\n key\n ] = `<span class=\"${className}\">${replacements[key]}</span>`;\n }\n\n const templateDiv = document.createElement('div');\n // templateDiv.innerHTML = dynamicTemplate(template, replacements);\n return html` ${templateDiv} `;\n};\n\n/*!\n * Serialize all form data into a query string\n * (c) 2018 Chris Ferdinandi, MIT License, https://gomakethings.com\n * @param {Node} form The form to serialize\n * @return {String} The serialized form data\n */\nexport const serialize = function (form: any) {\n // Setup our serialized data\n const serialized = [];\n\n // Loop through each field in the form\n for (let i = 0; i < form.elements.length; i++) {\n const field = form.elements[i];\n\n // Don't serialize fields without a name, submits, buttons, file and reset inputs, and disabled fields\n if (\n !field.name ||\n field.disabled ||\n field.type === 'file' ||\n field.type === 'reset' ||\n field.type === 'submit' ||\n field.type === 'button'\n )\n continue;\n\n // If a multi-select, get all selections\n if (field.type === 'select-multiple') {\n for (let n = 0; n < field.options.length; n++) {\n if (!field.options[n].selected) continue;\n if (field.options[n].value) {\n serialized.push(\n encodeURIComponent(field.name) +\n '=' +\n encodeURIComponent(field.options[n].value)\n );\n }\n }\n }\n\n // Convert field data to a query string\n else if (\n (field.type !== 'checkbox' && field.type !== 'radio') ||\n field.checked\n ) {\n let value = field.value;\n if (!value && field.checked) {\n value = '1';\n }\n\n if (value) {\n serialized.push(\n encodeURIComponent(field.name) + '=' + encodeURIComponent(value)\n );\n }\n }\n }\n return serialized.join('&');\n};\n\nexport const getScrollParent = (node: any): any => {\n const parent = node.parentNode || node.host;\n if (parent) {\n const isElement = parent instanceof HTMLElement;\n const overflowY = isElement && window.getComputedStyle(parent).overflowY;\n const isScrollable =\n overflowY &&\n !(overflowY.includes('hidden') || overflowY.includes('visible'));\n\n if (!parent) {\n return null;\n } else if (isScrollable && parent.scrollHeight >= parent.clientHeight) {\n return parent;\n }\n\n return getScrollParent(parent);\n }\n return null;\n};\n\nexport const isElementVisible = (el: any, holder: any) => {\n holder = holder || document.body;\n const { top, bottom } = el.getBoundingClientRect();\n const holderRect = holder.getBoundingClientRect();\n\n return top <= holderRect.top\n ? bottom > holderRect.top\n : bottom < holderRect.bottom;\n};\n\nconst HOUR = 3600;\nconst DAY = HOUR * 24;\nconst MONTH = DAY * 30;\n\nexport class Stubbable {\n public getCurrentDate() {\n return new Date();\n }\n}\n\nexport const stubbable = new Stubbable();\n\nexport const timeSince = (\n date: Date,\n options: { compareDate?: Date; hideRecentText?: boolean; suffix?: string } = {\n suffix: '',\n }\n) => {\n const { compareDate, hideRecentText, suffix } = options;\n const now = compareDate || stubbable.getCurrentDate();\n const secondsPast = Math.floor((now.getTime() - date.getTime()) / 1000);\n\n if (secondsPast < 60) {\n if (compareDate) {\n return secondsPast + 's' + suffix;\n }\n\n if (!hideRecentText && suffix) {\n return suffix;\n }\n return 'just now';\n }\n\n if (secondsPast < HOUR) {\n return Math.round(secondsPast / 60) + 'm' + suffix;\n }\n\n if (secondsPast <= DAY) {\n return Math.round(secondsPast / HOUR) + 'h' + suffix;\n }\n\n if (secondsPast <= MONTH) {\n return Math.round(secondsPast / DAY) + 'd' + suffix;\n }\n\n if (secondsPast < MONTH * 6) {\n return Math.round(secondsPast / MONTH) + 'mth' + suffix;\n } else {\n const day = date.getDate();\n const month = date\n .toDateString()\n .match(/ [a-zA-Z]*/)[0]\n .replace(' ', '');\n const year =\n date.getFullYear() == now.getFullYear() ? '' : ' ' + date.getFullYear();\n return day + ' ' + month + year;\n }\n};\n\nexport const isDate = (value: string): boolean => {\n if (toString.call(value) === '[object Date]') {\n return true;\n }\n if (typeof value.replace === 'function') {\n value.replace(/^\\s+|\\s+$/gm, '');\n }\n\n // value = value.split(\"+\")[0];\n return DATE_FORMAT.test(value);\n};\n\nexport const debounce = (fn: any, millis: number, immediate = false) => {\n let timeout: any;\n return function (...args: any) {\n const context = this;\n const later = function () {\n timeout = null;\n if (!immediate) {\n fn.apply(context, args);\n }\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, millis);\n if (callNow) {\n fn.apply(context, args);\n }\n };\n};\n\nexport const throttle = (fn: any, millis: number) => {\n let ready = true;\n return function (...args: any) {\n const context = this;\n if (!ready) {\n return;\n }\n\n ready = false;\n fn.apply(context, args);\n setTimeout(() => {\n ready = true;\n }, millis);\n };\n};\n\nexport interface NamedObject {\n name: string;\n}\n\nexport const truncate = (input: string, max: number): string => {\n if (input.length > max) {\n return input.substring(0, max) + '...';\n }\n\n return input;\n};\n\nexport const oxford = (items: any[], joiner = 'and'): any => {\n if (items.length === 1) {\n return items[0];\n }\n\n if (items.length === 2) {\n // TemplateResults get a different treatment\n if (typeof items[0] === 'object') {\n return html`${items[0]} ${joiner} ${items[1]}`;\n }\n return items.join(' ' + joiner + ' ');\n }\n\n // TemplateResults get a different treatment\n if (typeof items[0] === 'object') {\n return items.map((tr: TemplateResult, idx: number) => {\n if (idx < items.length - 1) {\n return html`${tr}, `;\n }\n return html`${joiner} ${tr}`;\n });\n }\n\n return items.join(', ') + joiner + items[items.length - 1];\n};\n\nexport const oxfordFn = (\n items: any[],\n fn: (item: any) => any,\n joiner = 'and'\n): any => {\n return oxford(items.map(fn), joiner);\n};\n\nexport const oxfordNamed = (items: NamedObject[], joiner = 'and'): any => {\n return oxfordFn(items, (value: any) => value.name, joiner);\n};\n\nexport const getDialog = (button: Button): Dialog => {\n return (button.getRootNode() as ShadowRoot).host as Dialog;\n};\n\nexport const setCookie = (name: string, value: any, path = undefined) => {\n if (!path) {\n // default path is the first word in the url\n const url = document.location.pathname;\n path = url.substring(0, url.indexOf('/', 1));\n }\n const now = new Date();\n now.setTime(now.getTime() + 60 * 1000 * 60 * 24 * 30);\n document.cookie = `${name}=${value};expires=${now.toUTCString()};path=${path}`;\n};\n\nexport const getCookie = (name: string) => {\n let cookieValue = null;\n if (document.cookie && document.cookie != '') {\n const cookies = document.cookie.split(';');\n for (let i = 0; i < cookies.length; i++) {\n const cookie = cookies[i].trim();\n // Does this cookie string begin with the name we want?\n if (cookie.substring(0, name.length + 1) == name + '=') {\n cookieValue = decodeURIComponent(cookie.substring(name.length + 1));\n break;\n }\n }\n }\n return cookieValue;\n};\n\nexport const getCookieBoolean = (name: string) => {\n return (getCookie(name) || '') === 'true';\n};\n\nexport enum COOKIE_KEYS {\n SETTINGS = 'settings',\n MENU_COLLAPSED = 'menu-collapsed',\n TICKET_SHOW_DETAILS = 'tickets.show-details',\n}\n\nexport const capitalize = ([first, ...rest], locale = navigator.language) =>\n first === undefined ? '' : first.toLocaleUpperCase(locale) + rest.join('');\n\nexport const formatFileType = (type: string): string => {\n return type.split('/')[1];\n};\nexport const formatFileSize = (bytes: number, decimalPoint: number): string => {\n if (bytes == 0) return '0 KB';\n const k = 1024,\n dm = decimalPoint || 2,\n sizes = ['B', 'KB', 'MB', 'GB'], //, 'TB', 'PB', 'EB', 'ZB', 'YB'],\n i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n};\n\nexport const stopEvent = (event: Event) => {\n if (event) {\n event.stopPropagation();\n event.preventDefault();\n }\n};\n\nexport const getFullName = (user: User) => {\n if (user.first_name && user.last_name) {\n return `${user.first_name} ${user.last_name}`;\n }\n\n return user.email;\n};\n\nexport const hslToHex = (h, s, l) => {\n l /= 100;\n const a = (s * Math.min(l, 1 - l)) / 100;\n const f = n => {\n const k = (n + h / 30) % 12;\n const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return Math.round(255 * color)\n .toString(16)\n .padStart(2, '0'); // convert to Hex and prefix \"0\" if needed\n };\n return `#${f(0)}${f(8)}${f(4)}`;\n};\n\nexport const renderAvatar = (input: {\n name?: string;\n user?: User;\n icon?: string;\n image?: string;\n position?: string;\n tip?: boolean;\n}) => {\n if (!input.position) {\n input.position = 'right';\n }\n\n // just a url\n if (input.image) {\n return html`<img src=\"${input.image}\" />`;\n }\n\n let text = input.name;\n if (input.user) {\n text = `${input.user.first_name} ${input.user.last_name}`;\n }\n\n if (!text) {\n return null;\n }\n\n const color = colorHash.hex(text);\n let second = text.indexOf(' ') + 1;\n if (second < 1) {\n second = text.length > 1 ? 1 : 0;\n }\n let initials = text.substring(0, 1) + text.substring(second, second + 1);\n initials = initials.toUpperCase();\n\n const avatar = html`\n <div\n style=\"border: 0px solid red; display:flex; flex-direction: column; align-items:center;\"\n >\n <div\n class=\"avatar-circle\"\n style=\"\n display: flex;\n height: 2em;\n width: 2em;\n flex-direction: row;\n align-items: center;\n color: #fff;\n border-radius: 100%;\n font-weight: 400;\n border: 0.3em solid rgba(0,0,0,.05);\n background:${color}\"\n >\n <div\n style=\"border: 0px solid red; display:flex; flex-direction: column; align-items:center;flex-grow:1\"\n >\n <div style=\"border:0px solid blue;\">${initials}</div>\n </div>\n </div>\n </div>\n `;\n return input.tip\n ? html`\n <temba-tip text=${text} position=${input.position}>\n ${avatar}\n </temba-tip>\n `\n : avatar;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyaruka/temba-components",
3
- "version": "0.62.0",
3
+ "version": "0.62.1",
4
4
  "description": "Web components to support rapidpro and related projects",
5
5
  "author": "Nyaruka <code@nyaruka.coim>",
6
6
  "main": "dist/index.js",
@@ -557,14 +557,14 @@ export const oxford = (items: any[], joiner = 'and'): any => {
557
557
 
558
558
  if (items.length === 2) {
559
559
  // TemplateResults get a different treatment
560
- if (items[0].type === 'html') {
560
+ if (typeof items[0] === 'object') {
561
561
  return html`${items[0]} ${joiner} ${items[1]}`;
562
562
  }
563
563
  return items.join(' ' + joiner + ' ');
564
564
  }
565
565
 
566
566
  // TemplateResults get a different treatment
567
- if (items[0].type === 'html') {
567
+ if (typeof items[0] === 'object') {
568
568
  return items.map((tr: TemplateResult, idx: number) => {
569
569
  if (idx < items.length - 1) {
570
570
  return html`${tr}, `;