@nylas/react 1.0.2-canary.0 → 1.0.2-canary.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.
Files changed (124) hide show
  1. package/dist/add-circle-icon_18.entry-b66b6343.cjs +1 -0
  2. package/dist/add-circle-icon_18.entry-f86ae88d.js +1527 -0
  3. package/dist/{archive-icon_7.entry-0deb31c2.cjs → archive-icon_7.entry-052ac074.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-187a3484.js → archive-icon_7.entry-0e34d6e7.js} +17 -17
  5. package/dist/arrow-icon.entry-2afd9ea9.js +15 -0
  6. package/dist/{arrow-icon.entry-fb0ebc89.cjs → arrow-icon.entry-93f21385.cjs} +1 -1
  7. package/dist/{auth-store-764d3768-ce84fc6a.cjs → auth-store-69ac49c7-5a0bbb90.cjs} +1 -1
  8. package/dist/{auth-store-764d3768-3e9c24a0.js → auth-store-69ac49c7-cbfda055.js} +2 -2
  9. package/dist/{bold-icon_3.entry-8aebbbdb.js → bold-icon_3.entry-88ce1d25.js} +8 -8
  10. package/dist/bold-icon_3.entry-8f55a9e7.cjs +1 -0
  11. package/dist/{calendar-cancel-icon.entry-3f4d6cf2.cjs → calendar-cancel-icon.entry-574c8aa4.cjs} +1 -1
  12. package/dist/{calendar-cancel-icon.entry-305c099c.js → calendar-cancel-icon.entry-e9c692fa.js} +5 -5
  13. package/dist/{calendar-check-icon_2.entry-fa7c033a.cjs → calendar-check-icon_2.entry-b0476bca.cjs} +1 -1
  14. package/dist/{calendar-check-icon_2.entry-1bf4163c.js → calendar-check-icon_2.entry-d461c713.js} +7 -7
  15. package/dist/{calendar-icon.entry-b5678535.js → calendar-icon.entry-1ca202a4.js} +4 -4
  16. package/dist/{calendar-icon.entry-78433555.cjs → calendar-icon.entry-98936e6d.cjs} +1 -1
  17. package/dist/chevron-icon_3.entry-830f52c2.js +105 -0
  18. package/dist/chevron-icon_3.entry-f7801467.cjs +1 -0
  19. package/dist/close-icon.entry-37e8361f.js +15 -0
  20. package/dist/close-icon.entry-8d6e9816.cjs +1 -0
  21. package/dist/{constants-d93cf397-e3587f5c.cjs → constants-b6bf6671-27e2557d.cjs} +4 -4
  22. package/dist/{constants-d93cf397-dd67263d.js → constants-b6bf6671-49a0f1f2.js} +464 -442
  23. package/dist/{document-refresh-icon.entry-8791ab16.js → document-refresh-icon.entry-faea08ce.js} +2 -2
  24. package/dist/document-refresh-icon.entry-fcb33921.cjs +1 -0
  25. package/dist/elements/index.d.ts +9 -3
  26. package/dist/{forward-icon_6.entry-cb605bfc.js → forward-icon_6.entry-8da1f65d.js} +10 -10
  27. package/dist/{forward-icon_6.entry-903ccd33.cjs → forward-icon_6.entry-c4b37cb1.cjs} +2 -2
  28. package/dist/globe-icon.entry-4720304b.js +15 -0
  29. package/dist/globe-icon.entry-90a0b9c9.cjs +1 -0
  30. package/dist/{index-10914bc1-1a809477.js → index-10914bc1-346f04fa.js} +3 -3
  31. package/dist/{index-10914bc1-93ff6f46.cjs → index-10914bc1-c8c3a2f3.cjs} +1 -1
  32. package/dist/index-457dcf0b.cjs +30 -0
  33. package/dist/index-ce40ad47.js +1570 -0
  34. package/dist/info-icon_2.entry-81e95048.cjs +1 -0
  35. package/dist/info-icon_2.entry-9307db18.js +34 -0
  36. package/dist/loading-icon.entry-06d37ef0.cjs +1 -0
  37. package/dist/loading-icon.entry-dc518df4.js +15 -0
  38. package/dist/{mailbox-store-6b9425dc-a0366cf2.cjs → mailbox-store-e721b17c-4e97e07d.cjs} +1 -1
  39. package/dist/{mailbox-store-6b9425dc-c249fa99.js → mailbox-store-e721b17c-cf9a43dd.js} +2 -2
  40. package/dist/nylas-additional-participants.entry-1653dec7.js +83 -0
  41. package/dist/nylas-additional-participants.entry-ff8bf378.cjs +1 -0
  42. package/dist/nylas-booked-event-card_10.entry-06bc3c51.cjs +1 -0
  43. package/dist/nylas-booked-event-card_10.entry-aa971e8a.js +784 -0
  44. package/dist/nylas-editor-tabs.entry-49b5a3ab.cjs +1 -0
  45. package/dist/nylas-editor-tabs.entry-9d0959bf.js +181 -0
  46. package/dist/nylas-form-card.entry-69d2095b.cjs +1 -0
  47. package/dist/nylas-form-card.entry-c4e78f88.js +56 -0
  48. package/dist/{nylas-if-state_3.entry-e7b615a1.js → nylas-if-state_3.entry-2eb3f385.js} +8 -8
  49. package/dist/{nylas-if-state_3.entry-2093c593.cjs → nylas-if-state_3.entry-5baf6d6f.cjs} +1 -1
  50. package/dist/{nylas-list-folders.entry-dff7a835.cjs → nylas-list-folders.entry-3b24d92d.cjs} +1 -1
  51. package/dist/{nylas-list-folders.entry-744293ae.js → nylas-list-folders.entry-995fa819.js} +4 -4
  52. package/dist/{nylas-list-threads.entry-85ad1b74.js → nylas-list-threads.entry-21466eb3.js} +6 -6
  53. package/dist/{nylas-list-threads.entry-edb1d265.cjs → nylas-list-threads.entry-fda42ded.cjs} +1 -1
  54. package/dist/{nylas-mailbox-pagination.entry-55ef4b8c.js → nylas-mailbox-pagination.entry-02d40186.js} +3 -3
  55. package/dist/{nylas-mailbox-pagination.entry-5b888a0e.cjs → nylas-mailbox-pagination.entry-9dcd4901.cjs} +1 -1
  56. package/dist/{nylas-mailbox-toolbar-button.entry-bb42156a.cjs → nylas-mailbox-toolbar-button.entry-d1099fab.cjs} +1 -1
  57. package/dist/{nylas-mailbox-toolbar-button.entry-bdcf7d17.js → nylas-mailbox-toolbar-button.entry-dbad44b4.js} +9 -9
  58. package/dist/{nylas-provider.entry-cb1ef04e.cjs → nylas-provider.entry-78e2fa30.cjs} +1 -1
  59. package/dist/{nylas-provider.entry-1dc58829.js → nylas-provider.entry-bbee8c99.js} +8 -8
  60. package/dist/nylas-scheduler-editor.entry-550d3c59.cjs +1 -0
  61. package/dist/{nylas-scheduler-config.entry-2382ac1b.js → nylas-scheduler-editor.entry-8f7ecf3b.js} +32 -35
  62. package/dist/nylas-scheduling.entry-22b5ad07.js +236 -0
  63. package/dist/nylas-scheduling.entry-30a63738.cjs +1 -0
  64. package/dist/{nylas-threads-refresh.entry-b35f1b68.cjs → nylas-threads-refresh.entry-05258b36.cjs} +1 -1
  65. package/dist/{nylas-threads-refresh.entry-ef5d6dfd.js → nylas-threads-refresh.entry-414d8740.js} +12 -12
  66. package/dist/{nylas-threads-search.entry-e570bf8e.js → nylas-threads-search.entry-a19dc90f.js} +8 -8
  67. package/dist/{nylas-threads-search.entry-2dda7524.cjs → nylas-threads-search.entry-ff21fc65.cjs} +1 -1
  68. package/dist/{nylas-view-thread.entry-3939c913.js → nylas-view-thread.entry-38149162.js} +4 -4
  69. package/dist/{nylas-view-thread.entry-1ee0680f.cjs → nylas-view-thread.entry-5da81e99.cjs} +1 -1
  70. package/dist/{people-icon.entry-4a88822e.cjs → people-icon.entry-4b682757.cjs} +1 -1
  71. package/dist/{people-icon.entry-69465395.js → people-icon.entry-5c244c8d.js} +6 -6
  72. package/dist/play-icon_2.entry-ccdc6b9c.cjs +1 -0
  73. package/dist/play-icon_2.entry-f36d6d55.js +25 -0
  74. package/dist/react.cjs +1 -1
  75. package/dist/react.js +70 -64
  76. package/dist/{refresh-icon.entry-678f92e7.cjs → refresh-icon.entry-59fff3d4.cjs} +1 -1
  77. package/dist/{refresh-icon.entry-bd2bf7ce.js → refresh-icon.entry-63456c9a.js} +4 -4
  78. package/dist/{register-component-486ea571-cdfe1ef9.cjs → register-component-d056a880-2be11c56.cjs} +1 -1
  79. package/dist/{register-component-486ea571-1f151779.js → register-component-d056a880-f3003d6c.js} +2 -2
  80. package/dist/{scheduler-config-store-a059f30b-06c1aa21.cjs → scheduler-config-store-4d035001-0256b40c.cjs} +1 -1
  81. package/dist/{scheduler-config-store-a059f30b-ff3efc00.js → scheduler-config-store-4d035001-db9dc78a.js} +1 -1
  82. package/dist/{scheduler-store-81058220-263a5f44.js → scheduler-store-0fbe642c-14466305.js} +85 -89
  83. package/dist/scheduler-store-0fbe642c-410fdbf4.cjs +1 -0
  84. package/dist/{translate-icon.entry-0c0dbba6.cjs → translate-icon.entry-1784c18e.cjs} +1 -1
  85. package/dist/{translate-icon.entry-c1fcd2f8.js → translate-icon.entry-35999e70.js} +2 -2
  86. package/dist/{utils-df5c1963-d9833bcb.js → utils-0cd66d04-89ab163d.js} +98 -101
  87. package/dist/{utils-df5c1963-1c47e21c.cjs → utils-0cd66d04-94b9c3b6.cjs} +5 -5
  88. package/dist/{warning-icon.entry-dbd44cdb.cjs → warning-icon.entry-3a702d1d.cjs} +1 -1
  89. package/dist/warning-icon.entry-73de08c3.js +15 -0
  90. package/package.json +4 -4
  91. package/dist/add-circle-icon_13.entry-6dccb5e5.cjs +0 -1
  92. package/dist/add-circle-icon_13.entry-ab84be80.js +0 -1050
  93. package/dist/arrow-icon.entry-b782e05a.js +0 -15
  94. package/dist/bold-icon_3.entry-49e5a1d0.cjs +0 -1
  95. package/dist/chevron-icon.entry-49b0d3e7.cjs +0 -1
  96. package/dist/chevron-icon.entry-f484c9a3.js +0 -15
  97. package/dist/close-icon.entry-24d5c268.js +0 -15
  98. package/dist/close-icon.entry-37965d55.cjs +0 -1
  99. package/dist/document-refresh-icon.entry-0e8935fa.cjs +0 -1
  100. package/dist/duration-bddc4a13-05d3e3e2.cjs +0 -1
  101. package/dist/duration-bddc4a13-179ce826.js +0 -41
  102. package/dist/globe-icon_3.entry-71d83904.js +0 -109
  103. package/dist/globe-icon_3.entry-c6aefc52.cjs +0 -1
  104. package/dist/index-cee193d2.cjs +0 -30
  105. package/dist/index-e834697b.js +0 -1562
  106. package/dist/info-icon.entry-3774a4e3.js +0 -15
  107. package/dist/info-icon.entry-85bf3fbc.cjs +0 -1
  108. package/dist/loading-icon.entry-8941102c.js +0 -15
  109. package/dist/loading-icon.entry-ae6c7b74.cjs +0 -1
  110. package/dist/nylas-booked-event-card_10.entry-a166d51d.js +0 -739
  111. package/dist/nylas-booked-event-card_10.entry-b181a874.cjs +0 -1
  112. package/dist/nylas-form-card.entry-7173dd4a.js +0 -56
  113. package/dist/nylas-form-card.entry-8fdbefa6.cjs +0 -1
  114. package/dist/nylas-open-hours-picker.entry-0f4f34f6.cjs +0 -1
  115. package/dist/nylas-open-hours-picker.entry-7e7060fe.js +0 -187
  116. package/dist/nylas-scheduler-config.entry-477d2171.cjs +0 -1
  117. package/dist/nylas-scheduler-editor.entry-1a95d313.cjs +0 -1
  118. package/dist/nylas-scheduler-editor.entry-c0479087.js +0 -140
  119. package/dist/nylas-scheduler.entry-69ecc3ae.cjs +0 -1
  120. package/dist/nylas-scheduler.entry-7084c148.js +0 -231
  121. package/dist/play-icon_2.entry-bc24fda7.js +0 -25
  122. package/dist/play-icon_2.entry-bd9f650e.cjs +0 -1
  123. package/dist/scheduler-store-81058220-a20698af.cjs +0 -1
  124. package/dist/warning-icon.entry-9631cd2e.js +0 -15
@@ -1,8 +1,8 @@
1
- "use strict";const be=require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");var se={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(be.commonjsGlobal,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",s="second",o="minute",u="hour",f="day",l="week",m="month",h="quarter",d="year",w="date",M="Invalid Date",D=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,U=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(g){var v=["th","st","nd","rd"],y=g%100;return"["+g+(v[(y-20)%10]||v[y]||v[0])+"]"}},B=function(g,v,y){var T=String(g);return!T||T.length>=v?g:""+Array(v+1-T.length).join(y)+g},ot={s:B,z:function(g){var v=-g.utcOffset(),y=Math.abs(v),T=Math.floor(y/60),p=y%60;return(v<=0?"+":"-")+B(T,2,"0")+":"+B(p,2,"0")},m:function g(v,y){if(v.date()<y.date())return-g(y,v);var T=12*(y.year()-v.year())+(y.month()-v.month()),p=v.clone().add(T,m),E=y-p<0,k=v.clone().add(T+(E?-1:1),m);return+(-(T+(y-p)/(E?p-k:k-p))||0)},a:function(g){return g<0?Math.ceil(g)||0:Math.floor(g)},p:function(g){return{M:m,y:d,w:l,d:f,D:w,h:u,m:o,s,ms:a,Q:h}[g]||String(g||"").toLowerCase().replace(/s$/,"")},u:function(g){return g===void 0}},Q="en",W={};W[Q]=j;var dt=function(g){return g instanceof gt},wt=function g(v,y,T){var p;if(!v)return Q;if(typeof v=="string"){var E=v.toLowerCase();W[E]&&(p=E),y&&(W[E]=y,p=E);var k=v.split("-");if(!p&&k.length>1)return g(k[0])}else{var O=v.name;W[O]=v,p=O}return!T&&p&&(Q=p),p||!T&&Q},N=function(g,v){if(dt(g))return g.clone();var y=typeof v=="object"?v:{};return y.date=g,y.args=arguments,new gt(y)},Y=ot;Y.l=wt,Y.i=dt,Y.w=function(g,v){return N(g,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var gt=function(){function g(y){this.$L=wt(y.locale,null,!0),this.parse(y)}var v=g.prototype;return v.parse=function(y){this.$d=function(T){var p=T.date,E=T.utc;if(p===null)return new Date(NaN);if(Y.u(p))return new Date;if(p instanceof Date)return new Date(p);if(typeof p=="string"&&!/Z$/i.test(p)){var k=p.match(D);if(k){var O=k[2]-1||0,I=(k[7]||"0").substring(0,3);return E?new Date(Date.UTC(k[1],O,k[3]||1,k[4]||0,k[5]||0,k[6]||0,I)):new Date(k[1],O,k[3]||1,k[4]||0,k[5]||0,k[6]||0,I)}}return new Date(p)}(y),this.$x=y.x||{},this.init()},v.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},v.$utils=function(){return Y},v.isValid=function(){return this.$d.toString()!==M},v.isSame=function(y,T){var p=N(y);return this.startOf(T)<=p&&p<=this.endOf(T)},v.isAfter=function(y,T){return N(y)<this.startOf(T)},v.isBefore=function(y,T){return this.endOf(T)<N(y)},v.$g=function(y,T,p){return Y.u(y)?this[T]:this.set(p,y)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(y,T){var p=this,E=!!Y.u(T)||T,k=Y.p(y),O=function(ut,P){var nt=Y.w(p.$u?Date.UTC(p.$y,P,ut):new Date(p.$y,P,ut),p);return E?nt:nt.endOf(f)},I=function(ut,P){return Y.w(p.toDate()[ut].apply(p.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(P)),p)},_=this.$W,C=this.$M,rt=this.$D,V="set"+(this.$u?"UTC":"");switch(k){case d:return E?O(1,0):O(31,11);case m:return E?O(1,C):O(0,C+1);case l:var yt=this.$locale().weekStart||0,mt=(_<yt?_+7:_)-yt;return O(E?rt-mt:rt+(6-mt),C);case f:case w:return I(V+"Hours",0);case u:return I(V+"Minutes",1);case o:return I(V+"Seconds",2);case s:return I(V+"Milliseconds",3);default:return this.clone()}},v.endOf=function(y){return this.startOf(y,!1)},v.$set=function(y,T){var p,E=Y.p(y),k="set"+(this.$u?"UTC":""),O=(p={},p[f]=k+"Date",p[w]=k+"Date",p[m]=k+"Month",p[d]=k+"FullYear",p[u]=k+"Hours",p[o]=k+"Minutes",p[s]=k+"Seconds",p[a]=k+"Milliseconds",p)[E],I=E===f?this.$D+(T-this.$W):T;if(E===m||E===d){var _=this.clone().set(w,1);_.$d[O](I),_.init(),this.$d=_.set(w,Math.min(this.$D,_.daysInMonth())).$d}else O&&this.$d[O](I);return this.init(),this},v.set=function(y,T){return this.clone().$set(y,T)},v.get=function(y){return this[Y.p(y)]()},v.add=function(y,T){var p,E=this;y=Number(y);var k=Y.p(T),O=function(C){var rt=N(E);return Y.w(rt.date(rt.date()+Math.round(C*y)),E)};if(k===m)return this.set(m,this.$M+y);if(k===d)return this.set(d,this.$y+y);if(k===f)return O(1);if(k===l)return O(7);var I=(p={},p[o]=n,p[u]=i,p[s]=r,p)[k]||1,_=this.$d.getTime()+y*I;return Y.w(_,this)},v.subtract=function(y,T){return this.add(-1*y,T)},v.format=function(y){var T=this,p=this.$locale();if(!this.isValid())return p.invalidDate||M;var E=y||"YYYY-MM-DDTHH:mm:ssZ",k=Y.z(this),O=this.$H,I=this.$m,_=this.$M,C=p.weekdays,rt=p.months,V=function(P,nt,St,Tt){return P&&(P[nt]||P(T,E))||St[nt].slice(0,Tt)},yt=function(P){return Y.s(O%12||12,P,"0")},mt=p.meridiem||function(P,nt,St){var Tt=P<12?"AM":"PM";return St?Tt.toLowerCase():Tt},ut={YY:String(this.$y).slice(-2),YYYY:this.$y,M:_+1,MM:Y.s(_+1,2,"0"),MMM:V(p.monthsShort,_,rt,3),MMMM:V(rt,_),D:this.$D,DD:Y.s(this.$D,2,"0"),d:String(this.$W),dd:V(p.weekdaysMin,this.$W,C,2),ddd:V(p.weekdaysShort,this.$W,C,3),dddd:C[this.$W],H:String(O),HH:Y.s(O,2,"0"),h:yt(1),hh:yt(2),a:mt(O,I,!0),A:mt(O,I,!1),m:String(I),mm:Y.s(I,2,"0"),s:String(this.$s),ss:Y.s(this.$s,2,"0"),SSS:Y.s(this.$ms,3,"0"),Z:k};return E.replace(U,function(P,nt){return nt||ut[P]||k.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(y,T,p){var E,k=Y.p(T),O=N(y),I=(O.utcOffset()-this.utcOffset())*n,_=this-O,C=Y.m(this,O);return C=(E={},E[d]=C/12,E[m]=C,E[h]=C/3,E[l]=(_-I)/6048e5,E[f]=(_-I)/864e5,E[u]=_/i,E[o]=_/n,E[s]=_/r,E)[k]||_,p?C:Y.a(C)},v.daysInMonth=function(){return this.endOf(m).$D},v.$locale=function(){return W[this.$L]},v.locale=function(y,T){if(!y)return this.$L;var p=this.clone(),E=wt(y,T,!0);return E&&(p.$L=E),p},v.clone=function(){return Y.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),Ft=gt.prototype;return N.prototype=Ft,[["$ms",a],["$s",s],["$m",o],["$H",u],["$W",f],["$M",m],["$y",d],["$D",w]].forEach(function(g){Ft[g[1]]=function(v){return this.$g(v,g[0],g[1])}}),N.extend=function(g,v){return g.$i||(g(v,gt,N),g.$i=!0),N},N.locale=wt,N.isDayjs=dt,N.unix=function(g){return N(1e3*g)},N.en=W[Q],N.Ls=W,N.p={},N})})(se);const Nt=se.exports;var Yt=["MO","TU","WE","TH","FR","SA","SU"],F=function(){function e(t,r){if(r===0)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=r}return e.fromStr=function(t){return new e(Yt.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},e.prototype.toString=function(){var t=Yt[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},e.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},e}(),A=function(e){return e!=null},G=function(e){return typeof e=="number"},Pt=function(e){return typeof e=="string"&&Yt.includes(e)},z=Array.isArray,X=function(e,t){t===void 0&&(t=e),arguments.length===1&&(t=e,e=0);for(var r=[],n=e;n<t;n++)r.push(n);return r},S=function(e,t){var r=0,n=[];if(z(e))for(;r<t;r++)n[r]=[].concat(e);else for(;r<t;r++)n[r]=e;return n},we=function(e){return z(e)?e:[e]};function ft(e,t,r){r===void 0&&(r=" ");var n=String(e);return t=t>>0,n.length>t?String(n):(t=t-n.length,t>r.length&&(r+=S(r,t/r.length)),r.slice(0,t)+String(n))}var ge=function(e,t,r){var n=e.split(t);return r?n.slice(0,r).concat([n.slice(r).join(t)]):n},q=function(e,t){var r=e%t;return r*t<0?r+t:r},xt=function(e,t){return{div:Math.floor(e/t),mod:q(e,t)}},J=function(e){return!A(e)||e.length===0},$=function(e){return!J(e)},L=function(e,t){return $(e)&&e.indexOf(t)!==-1},st=function(e,t,r,n,i,a){return n===void 0&&(n=0),i===void 0&&(i=0),a===void 0&&(a=0),new Date(Date.UTC(e,t-1,r,n,i,a))},Te=[31,28,31,30,31,30,31,31,30,31,30,31],ue=1e3*60*60*24,fe=9999,he=st(1970,1,1),ke=[6,0,1,2,3,4,5],vt=function(e){return e%4===0&&e%100!==0||e%400===0},ce=function(e){return e instanceof Date},pt=function(e){return ce(e)&&!isNaN(e.getTime())},jt=function(e){return e.getTimezoneOffset()*60*1e3},Ee=function(e,t){var r=e.getTime()-jt(e),n=t.getTime()-jt(t),i=r-n;return Math.round(i/ue)},Lt=function(e){return Ee(e,he)},le=function(e){return new Date(he.getTime()+e*ue)},Me=function(e){var t=e.getUTCMonth();return t===1&&vt(e.getUTCFullYear())?29:Te[t]},ct=function(e){return ke[e.getUTCDay()]},zt=function(e,t){var r=st(e,t+1,1);return[ct(r),Me(r)]},de=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},Ut=function(e){var t=new Date(e.getTime());return t},Kt=function(e){for(var t=[],r=0;r<e.length;r++)t.push(Ut(e[r]));return t},bt=function(e){e.sort(function(t,r){return t.getTime()-r.getTime()})},$t=function(e,t){t===void 0&&(t=!0);var r=new Date(e);return[ft(r.getUTCFullYear().toString(),4,"0"),ft(r.getUTCMonth()+1,2,"0"),ft(r.getUTCDate(),2,"0"),"T",ft(r.getUTCHours(),2,"0"),ft(r.getUTCMinutes(),2,"0"),ft(r.getUTCSeconds(),2,"0"),t?"Z":""].join("")},Ct=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,r=t.exec(e);if(!r)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[5],10)||0,parseInt(r[6],10)||0,parseInt(r[7],10)||0))},qt=function(e,t){var r=e.toLocaleString("sv-SE",{timeZone:t});return r.replace(" ","T")+"Z"},De=function(e,t){var r=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(qt(e,r)),i=new Date(qt(e,t??"UTC")),a=i.getTime()-n.getTime();return new Date(e.getTime()-a)},ht=function(){function e(t,r){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=r,t==="between"?(this.maxDate=r.inc?r.before:new Date(r.before.getTime()-1),this.minDate=r.inc?r.after:new Date(r.after.getTime()+1)):t==="before"?this.maxDate=r.inc?r.dt:new Date(r.dt.getTime()-1):t==="after"&&(this.minDate=r.inc?r.dt:new Date(r.dt.getTime()+1))}return e.prototype.accept=function(t){++this.total;var r=this.minDate&&t<this.minDate,n=this.maxDate&&t>this.maxDate;if(this.method==="between"){if(r)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return r?!0:(this.add(t),!1);return this.add(t)},e.prototype.add=function(t){return this._result.push(t),!0},e.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;case"before":case"after":default:return t.length?t[t.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),_t=function(e,t){return _t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},_t(e,t)};function Rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_t(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var K=function(){return K=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},K.apply(this,arguments)};function c(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Zt=function(e){Rt(t,e);function t(r,n,i){var a=e.call(this,r,n)||this;return a.iterator=i,a}return t.prototype.add=function(r){return this.iterator(r,this._result.length)?(this._result.push(r),!0):!1},t}(ht),kt={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},Bt=function(e,t){return e.indexOf(t)!==-1},Se=function(e){return e.toString()},xe=function(e,t,r){return"".concat(t," ").concat(r,", ").concat(e)},et=function(){function e(t,r,n,i){if(r===void 0&&(r=Se),n===void 0&&(n=kt),i===void 0&&(i=xe),this.text=[],this.language=n||kt,this.gettext=r,this.dateFormatter=i,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),s=[].concat(this.options.bynmonthday);a.sort(function(l,m){return l-m}),s.sort(function(l,m){return m-l}),this.bymonthday=a.concat(s),this.bymonthday.length||(this.bymonthday=null)}if(A(this.origOptions.byweekday)){var o=z(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(l){return!l.n}),someWeeks:o.filter(function(l){return!!l.n}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var f=function(l,m){return l.weekday-m.weekday};this.byweekday.allWeeks.sort(f),this.byweekday.someWeeks.sort(f),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){var r=!0;if(!(t.options.freq in e.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var n in t.origOptions){if(Bt(["dtstart","wkst","freq"],n))return!0;if(!Bt(e.IMPLEMENTED[t.options.freq],n))return!1}return r},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[b.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var r=this.options.until;this.add(this.dateFormatter(r.getUTCFullYear(),this.language.monthNames[r.getUTCMonth()],r.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},e.prototype.HOURLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("hours"):t("hour"))},e.prototype.MINUTELY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("minutes"):t("minute"))},e.prototype.DAILY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("day")):(this.options.interval===1&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},e.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("months"):t("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("years"):t("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(this.plural(this.options.byweekno.length)?t("weeks"):t("week")).add(this.list(this.options.byweekno,void 0,t("and")))},e.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},e.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},e.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},e.prototype.nth=function(t){t=parseInt(t.toString(),10);var r,n=this.gettext;if(t===-1)return n("last");var i=Math.abs(t);switch(i){case 1:case 21:case 31:r=i+n("st");break;case 2:case 22:r=i+n("nd");break;case 3:case 23:r=i+n("rd");break;default:r=i+n("th")}return t<0?r+" "+n("last"):r},e.prototype.monthtext=function(t){return this.language.monthNames[t-1]},e.prototype.weekdaytext=function(t){var r=G(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[r]},e.prototype.plural=function(t){return t%100!==1},e.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},e.prototype.list=function(t,r,n,i){var a=this;i===void 0&&(i=","),z(t)||(t=[t]);var s=function(u,f,l){for(var m="",h=0;h<u.length;h++)h!==0&&(h===u.length-1?m+=" "+l+" ":m+=f+" "),m+=u[h];return m};r=r||function(u){return u.toString()};var o=function(u){return r&&r.call(a,u)};return n?s(t.map(o),i,n):t.map(o).join(i+" ")},e}(),Oe=function(){function e(t){this.done=!0,this.rules=t}return e.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&this.symbol===null},e.prototype.nextSymbol=function(){var t,r;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;t=null;for(var i in this.rules){n=this.rules[i];var a=n.exec(this.text);a&&(t===null||a[0].length>t[0].length)&&(t=a,r=i)}if(t!=null&&(this.text=this.text.substr(t[0].length),this.text===""&&(this.done=!0)),t==null){this.done=!0,this.symbol=null,this.value=null;return}}while(r==="SKIP");return this.symbol=r,this.value=t,!0},e.prototype.accept=function(t){if(this.symbol===t){if(this.value){var r=this.value;return this.nextSymbol(),r}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},e}();function ye(e,t){t===void 0&&(t=kt);var r={},n=new Oe(t.tokens);if(!n.start(e))return null;return i(),r;function i(){n.expect("every");var h=n.acceptNumber();if(h&&(r.interval=parseInt(h[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":r.freq=b.DAILY,n.nextSymbol()&&(s(),m());break;case"weekday(s)":r.freq=b.WEEKLY,r.byweekday=[b.MO,b.TU,b.WE,b.TH,b.FR],n.nextSymbol(),m();break;case"week(s)":r.freq=b.WEEKLY,n.nextSymbol()&&(a(),m());break;case"hour(s)":r.freq=b.HOURLY,n.nextSymbol()&&(a(),m());break;case"minute(s)":r.freq=b.MINUTELY,n.nextSymbol()&&(a(),m());break;case"month(s)":r.freq=b.MONTHLY,n.nextSymbol()&&(a(),m());break;case"year(s)":r.freq=b.YEARLY,n.nextSymbol()&&(a(),m());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":r.freq=b.WEEKLY;var d=n.symbol.substr(0,2).toUpperCase();if(r.byweekday=[b[d]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var w=u();if(!w)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");r.byweekday.push(b[w]),n.nextSymbol()}l(),m();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(r.freq=b.YEARLY,r.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var M=o();if(!M)throw new Error("Unexpected symbol "+n.symbol+", expected month");r.bymonth.push(M),n.nextSymbol()}a(),m();break;default:throw new Error("Unknown symbol")}}function a(){var h=n.accept("on"),d=n.accept("the");if(h||d)do{var w=f(),M=u(),D=o();if(w)M?(n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(b[M].nth(w))):(r.bymonthday||(r.bymonthday=[]),r.bymonthday.push(w),n.accept("day(s)"));else if(M)n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(b[M]);else if(n.symbol==="weekday(s)")n.nextSymbol(),r.byweekday||(r.byweekday=[b.MO,b.TU,b.WE,b.TH,b.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var U=n.acceptNumber();if(!U)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(r.byweekno=[parseInt(U[0],10)];n.accept("comma");){if(U=n.acceptNumber(),!U)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.byweekno.push(parseInt(U[0],10))}}else if(D)n.nextSymbol(),r.bymonth||(r.bymonth=[]),r.bymonth.push(D);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function s(){var h=n.accept("at");if(h)do{var d=n.acceptNumber();if(!d)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(r.byhour=[parseInt(d[0],10)];n.accept("comma");){if(d=n.acceptNumber(),!d)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");r.byhour.push(parseInt(d[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function f(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var h=parseInt(n.value[1],10);if(h<-366||h>366)throw new Error("Nth out of range: "+h);return n.nextSymbol(),n.accept("last")?-h:h;default:return!1}}function l(){n.accept("on"),n.accept("the");var h=f();if(h)for(r.bymonthday=[h],n.nextSymbol();n.accept("comma");){if(h=f(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.bymonthday.push(h),n.nextSymbol()}}function m(){if(n.symbol==="until"){var h=Date.parse(n.text);if(!h)throw new Error("Cannot parse until date:"+n.text);r.until=new Date(h)}else n.accept("for")&&(r.count=parseInt(n.value[0],10),n.expect("number"))}}var x;(function(e){e[e.YEARLY=0]="YEARLY",e[e.MONTHLY=1]="MONTHLY",e[e.WEEKLY=2]="WEEKLY",e[e.DAILY=3]="DAILY",e[e.HOURLY=4]="HOURLY",e[e.MINUTELY=5]="MINUTELY",e[e.SECONDLY=6]="SECONDLY"})(x||(x={}));function Ht(e){return e<x.HOURLY}var Ye=function(e,t){return t===void 0&&(t=kt),new b(ye(e,t)||void 0)},lt=["count","until","interval","byweekday","bymonthday","bymonth"];et.IMPLEMENTED=[];et.IMPLEMENTED[x.HOURLY]=lt;et.IMPLEMENTED[x.MINUTELY]=lt;et.IMPLEMENTED[x.DAILY]=["byhour"].concat(lt);et.IMPLEMENTED[x.WEEKLY]=lt;et.IMPLEMENTED[x.MONTHLY]=lt;et.IMPLEMENTED[x.YEARLY]=["byweekno","byyearday"].concat(lt);var Le=function(e,t,r,n){return new et(e,t,r,n).toString()},Ue=et.isFullyConvertible,Et=function(){function e(t,r,n,i){this.hour=t,this.minute=r,this.second=n,this.millisecond=i||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},e}(),_e=function(e){Rt(t,e);function t(r,n,i,a,s,o,u){var f=e.call(this,a,s,o,u)||this;return f.year=r,f.month=n,f.day=i,f}return t.fromDate=function(r){return new this(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.valueOf()%1e3)},t.prototype.getWeekday=function(){return ct(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(r){this.year+=r},t.prototype.addMonths=function(r){if(this.month+=r,this.month>12){var n=Math.floor(this.month/12),i=q(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(r,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+r*7:this.day+=-(this.getWeekday()-n)+r*7,this.fixDay()},t.prototype.addDaily=function(r){this.day+=r,this.fixDay()},t.prototype.addHours=function(r,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/r)*r);;){this.hour+=r;var a=xt(this.hour,24),s=a.div,o=a.mod;if(s&&(this.hour=o,this.addDaily(s)),J(i)||L(i,this.hour))break}},t.prototype.addMinutes=function(r,n,i,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/r)*r);;){this.minute+=r;var s=xt(this.minute,60),o=s.div,u=s.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(J(i)||L(i,this.hour))&&(J(a)||L(a,this.minute)))break}},t.prototype.addSeconds=function(r,n,i,a,s){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/r)*r);;){this.second+=r;var o=xt(this.second,60),u=o.div,f=o.mod;if(u&&(this.second=f,this.addMinutes(u,!1,i,a)),(J(i)||L(i,this.hour))&&(J(a)||L(a,this.minute))&&(J(s)||L(s,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var r=zt(this.year,this.month-1)[1];if(!(this.day<=r))for(;this.day>r;){if(this.day-=r,++this.month,this.month===13&&(this.month=1,++this.year,this.year>fe))return;r=zt(this.year,this.month-1)[1]}}},t.prototype.add=function(r,n){var i=r.freq,a=r.interval,s=r.wkst,o=r.byhour,u=r.byminute,f=r.bysecond;switch(i){case x.YEARLY:return this.addYears(a);case x.MONTHLY:return this.addMonths(a);case x.WEEKLY:return this.addWeekly(a,s);case x.DAILY:return this.addDaily(a);case x.HOURLY:return this.addHours(a,n,o);case x.MINUTELY:return this.addMinutes(a,n,o,u);case x.SECONDLY:return this.addSeconds(a,n,o,u,f)}},t}(Et);function me(e){for(var t=[],r=Object.keys(e),n=0,i=r;n<i.length;n++){var a=i[n];L(ur,a)||t.push(a),ce(e[a])&&!pt(e[a])&&t.push(a)}if(t.length)throw new Error("Invalid options: "+t.join(", "));return K({},e)}function Ie(e){var t=K(K({},Wt),me(e));if(A(t.byeaster)&&(t.freq=b.YEARLY),!(A(t.freq)&&b.FREQUENCIES[t.freq]))throw new Error("Invalid frequency: ".concat(t.freq," ").concat(e.freq));if(t.dtstart||(t.dtstart=new Date(new Date().setMilliseconds(0))),A(t.wkst)?G(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=b.MO.weekday,A(t.bysetpos)){G(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var r=0;r<t.bysetpos.length;r++){var n=t.bysetpos[r];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(t.byweekno||$(t.byweekno)||$(t.byyearday)||t.bymonthday||$(t.bymonthday)||A(t.byweekday)||A(t.byeaster)))switch(t.freq){case b.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case b.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case b.WEEKLY:t.byweekday=[ct(t.dtstart)];break}if(A(t.bymonth)&&!z(t.bymonth)&&(t.bymonth=[t.bymonth]),A(t.byyearday)&&!z(t.byyearday)&&G(t.byyearday)&&(t.byyearday=[t.byyearday]),!A(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if(z(t.bymonthday)){for(var i=[],a=[],r=0;r<t.bymonthday.length;r++){var n=t.bymonthday[r];n>0?i.push(n):n<0&&a.push(n)}t.bymonthday=i,t.bynmonthday=a}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(A(t.byweekno)&&!z(t.byweekno)&&(t.byweekno=[t.byweekno]),!A(t.byweekday))t.bynweekday=null;else if(G(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(Pt(t.byweekday))t.byweekday=[F.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof F)!t.byweekday.n||t.freq>b.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var s=[],o=[],r=0;r<t.byweekday.length;r++){var u=t.byweekday[r];if(G(u)){s.push(u);continue}else if(Pt(u)){s.push(F.fromStr(u).weekday);continue}!u.n||t.freq>b.MONTHLY?s.push(u.weekday):o.push([u.weekday,u.n])}t.byweekday=$(s)?s:null,t.bynweekday=$(o)?o:null}return A(t.byhour)?G(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<b.HOURLY?[t.dtstart.getUTCHours()]:null,A(t.byminute)?G(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<b.MINUTELY?[t.dtstart.getUTCMinutes()]:null,A(t.bysecond)?G(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<b.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function Ae(e){var t=e.dtstart.getTime()%1e3;if(!Ht(e.freq))return[];var r=[];return e.byhour.forEach(function(n){e.byminute.forEach(function(i){e.bysecond.forEach(function(a){r.push(new Et(n,i,a,t))})})}),r}function It(e){var t=e.split(`
2
- `).map(Ne).filter(function(r){return r!==null});return K(K({},t[0]),t[1])}function Mt(e){var t={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!r)return t;var n=r[1],i=r[2];return n&&(t.tzid=n),t.dtstart=Ct(i),t}function Ne(e){if(e=e.replace(/^\s+|\s+$/,""),!e.length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return Gt(e);var r=t[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return Gt(e);case"DTSTART":return Mt(e);default:throw new Error("Unsupported RFC prop ".concat(r," in ").concat(e))}}function Gt(e){var t=e.replace(/^RRULE:/i,""),r=Mt(t),n=e.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var a=i.split("="),s=a[0],o=a[1];switch(s.toUpperCase()){case"FREQ":r.freq=x[o.toUpperCase()];break;case"WKST":r.wkst=Z[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=$e(o),f=s.toLowerCase();r[f]=u;break;case"BYWEEKDAY":case"BYDAY":r.byweekday=Ce(o);break;case"DTSTART":case"TZID":var l=Mt(e);r.tzid=l.tzid,r.dtstart=l.dtstart;break;case"UNTIL":r.until=Ct(o);break;case"BYEASTER":r.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+s+"'")}}),r}function $e(e){if(e.indexOf(",")!==-1){var t=e.split(",");return t.map(Jt)}return Jt(e)}function Jt(e){return/^[+-]?\d+$/.test(e)?Number(e):e}function Ce(e){var t=e.split(",");return t.map(function(r){if(r.length===2)return Z[r];var n=r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(r));var i=Number(n[1]),a=n[2],s=Z[a].weekday;return new F(s,i)})}var Dt=function(){function e(t,r){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=r}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=$t(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:De(this.date,this.tzid)},e}();function At(e){for(var t=[],r="",n=Object.keys(e),i=Object.keys(Wt),a=0;a<n.length;a++)if(n[a]!=="tzid"&&L(i,n[a])){var s=n[a].toUpperCase(),o=e[n[a]],u="";if(!(!A(o)||z(o)&&!o.length)){switch(s){case"FREQ":u=b.FREQUENCIES[e.freq];break;case"WKST":G(o)?u=new F(o).toString():u=o.toString();break;case"BYWEEKDAY":s="BYDAY",u=we(o).map(function(d){return d instanceof F?d:z(d)?new F(d[0],d[1]):new F(d)}).toString();break;case"DTSTART":r=Re(o,e.tzid);break;case"UNTIL":u=$t(o,!e.tzid);break;default:if(z(o)){for(var f=[],l=0;l<o.length;l++)f[l]=String(o[l]);u=f.toString()}else u=String(o)}u&&t.push([s,u])}}var m=t.map(function(d){var w=d[0],M=d[1];return"".concat(w,"=").concat(M.toString())}).join(";"),h="";return m!==""&&(h="RRULE:".concat(m)),[r,h].filter(function(d){return!!d}).join(`
3
- `)}function Re(e,t){return e?"DTSTART"+new Dt(new Date(e),t).toString():""}function He(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every(function(r,n){return r.getTime()===t[n].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var We=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(t,r,n){r&&(r=r instanceof Date?Ut(r):Kt(r)),t==="all"?this.all=r:(n._value=r,this[t].push(n))},e.prototype._cacheGet=function(t,r){var n=!1,i=r?Object.keys(r):[],a=function(l){for(var m=0;m<i.length;m++){var h=i[m];if(!He(r[h],l[h]))return!0}return!1},s=this[t];if(t==="all")n=this.all;else if(z(s))for(var o=0;o<s.length;o++){var u=s[o];if(!(i.length&&a(u))){n=u._value;break}}if(!n&&this.all){for(var f=new ht(t,r),o=0;o<this.all.length&&f.accept(this.all[o]);o++);n=f.getValue(),this._cacheAdd(t,n,r)}return z(n)?Kt(n):n instanceof Date?Ut(n):n},e}(),Fe=c(c(c(c(c(c(c(c(c(c(c(c(c([],S(1,31),!0),S(2,28),!0),S(3,31),!0),S(4,30),!0),S(5,31),!0),S(6,30),!0),S(7,31),!0),S(8,31),!0),S(9,30),!0),S(10,31),!0),S(11,30),!0),S(12,31),!0),S(1,7),!0),Pe=c(c(c(c(c(c(c(c(c(c(c(c(c([],S(1,31),!0),S(2,29),!0),S(3,31),!0),S(4,30),!0),S(5,31),!0),S(6,30),!0),S(7,31),!0),S(8,31),!0),S(9,30),!0),S(10,31),!0),S(11,30),!0),S(12,31),!0),S(1,7),!0),je=X(1,29),ze=X(1,30),it=X(1,31),R=X(1,32),Ke=c(c(c(c(c(c(c(c(c(c(c(c(c([],R,!0),ze,!0),R,!0),it,!0),R,!0),it,!0),R,!0),R,!0),it,!0),R,!0),it,!0),R,!0),R.slice(0,7),!0),qe=c(c(c(c(c(c(c(c(c(c(c(c(c([],R,!0),je,!0),R,!0),it,!0),R,!0),it,!0),R,!0),R,!0),it,!0),R,!0),it,!0),R,!0),R.slice(0,7),!0),Ze=X(-28,0),Be=X(-29,0),at=X(-30,0),H=X(-31,0),Ge=c(c(c(c(c(c(c(c(c(c(c(c(c([],H,!0),Be,!0),H,!0),at,!0),H,!0),at,!0),H,!0),H,!0),at,!0),H,!0),at,!0),H,!0),H.slice(0,7),!0),Je=c(c(c(c(c(c(c(c(c(c(c(c(c([],H,!0),Ze,!0),H,!0),at,!0),H,!0),at,!0),H,!0),H,!0),at,!0),H,!0),at,!0),H,!0),H.slice(0,7),!0),Xe=[0,31,60,91,121,152,182,213,244,274,305,335,366],Qe=[0,31,59,90,120,151,181,212,243,273,304,334,365],Xt=function(){for(var e=[],t=0;t<55;t++)e=e.concat(X(7));return e}();function Ve(e,t){var r=st(e,1,1),n=vt(e)?366:365,i=vt(e+1)?366:365,a=Lt(r),s=ct(r),o=K(K({yearlen:n,nextyearlen:i,yearordinal:a,yearweekday:s},tr(e)),{wnomask:null});if(J(t.byweekno))return o;o.wnomask=S(0,n+7);var u,f,l=u=q(7-s+t.wkst,7);l>=4?(l=0,f=o.yearlen+q(s-t.wkst,7)):f=n-l;for(var m=Math.floor(f/7),h=q(f,7),d=Math.floor(m+h/4),w=0;w<t.byweekno.length;w++){var M=t.byweekno[w];if(M<0&&(M+=d+1),M>0&&M<=d){var D=void 0;M>1?(D=l+(M-1)*7,l!==u&&(D-=7-u)):D=l;for(var U=0;U<7&&(o.wnomask[D]=1,D++,o.wdaymask[D]!==t.wkst);U++);}}if(L(t.byweekno,1)){var D=l+d*7;if(l!==u&&(D-=7-u),D<n)for(var w=0;w<7&&(o.wnomask[D]=1,D+=1,o.wdaymask[D]!==t.wkst);w++);}if(l){var j=void 0;if(L(t.byweekno,-1))j=-1;else{var B=ct(st(e-1,1,1)),ot=q(7-B.valueOf()+t.wkst,7),Q=vt(e-1)?366:365,W=void 0;ot>=4?(ot=0,W=Q+q(B-t.wkst,7)):W=n-l,j=Math.floor(52+q(W,7)/4)}if(L(t.byweekno,j))for(var D=0;D<l;D++)o.wnomask[D]=1}return o}function tr(e){var t=vt(e)?366:365,r=st(e,1,1),n=ct(r);return t===365?{mmask:Fe,mdaymask:qe,nmdaymask:Je,wdaymask:Xt.slice(n),mrange:Qe}:{mmask:Pe,mdaymask:Ke,nmdaymask:Ge,wdaymask:Xt.slice(n),mrange:Xe}}function er(e,t,r,n,i,a){var s={lastyear:e,lastmonth:t,nwdaymask:[]},o=[];if(a.freq===b.YEARLY)if(J(a.bymonth))o=[[0,r]];else for(var u=0;u<a.bymonth.length;u++)t=a.bymonth[u],o.push(n.slice(t-1,t+1));else a.freq===b.MONTHLY&&(o=[n.slice(t-1,t+1)]);if(J(o))return s;s.nwdaymask=S(0,r);for(var u=0;u<o.length;u++)for(var f=o[u],l=f[0],m=f[1]-1,h=0;h<a.bynweekday.length;h++){var d=void 0,w=a.bynweekday[h],M=w[0],D=w[1];D<0?(d=m+(D+1)*7,d-=q(i[d]-M,7)):(d=l+(D-1)*7,d+=q(7-i[d]+M,7)),l<=d&&d<=m&&(s.nwdaymask[d]=1)}return s}function rr(e,t){t===void 0&&(t=0);var r=e%19,n=Math.floor(e/100),i=e%100,a=Math.floor(n/4),s=n%4,o=Math.floor((n+8)/25),u=Math.floor((n-o+1)/3),f=Math.floor(19*r+n-a-u+15)%30,l=Math.floor(i/4),m=i%4,h=Math.floor(32+2*s+2*l-f-m)%7,d=Math.floor((r+11*f+22*h)/451),w=Math.floor((f+h-7*d+114)/31),M=(f+h-7*d+114)%31+1,D=Date.UTC(e,w-1,M+t),U=Date.UTC(e,0,1);return[Math.ceil((D-U)/(1e3*60*60*24))]}var nr=function(){function e(t){this.options=t}return e.prototype.rebuild=function(t,r){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=Ve(t,n)),$(n.bynweekday)&&(r!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,a=i.yearlen,s=i.mrange,o=i.wdaymask;this.monthinfo=er(t,r,a,s,o,n)}A(n.byeaster)&&(this.eastermask=rr(t,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[X(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(t,r){for(var n=this.mrange[r-1],i=this.mrange[r],a=S(null,this.yearlen),s=n;s<i;s++)a[s]=s;return[a,n,i]},e.prototype.wdayset=function(t,r,n){for(var i=S(null,this.yearlen+7),a=Lt(st(t,r,n))-this.yearordinal,s=a,o=0;o<7&&(i[a]=a,++a,this.wdaymask[a]!==this.options.wkst);o++);return[i,s,a]},e.prototype.ddayset=function(t,r,n){var i=S(null,this.yearlen),a=Lt(st(t,r,n))-this.yearordinal;return i[a]=a,[i,a,a+1]},e.prototype.htimeset=function(t,r,n,i){var a=this,s=[];return this.options.byminute.forEach(function(o){s=s.concat(a.mtimeset(t,o,n,i))}),bt(s),s},e.prototype.mtimeset=function(t,r,n,i){var a=this.options.bysecond.map(function(s){return new Et(t,r,s,i)});return bt(a),a},e.prototype.stimeset=function(t,r,n,i){return[new Et(t,r,n,i)]},e.prototype.getdayset=function(t){switch(t){case x.YEARLY:return this.ydayset.bind(this);case x.MONTHLY:return this.mdayset.bind(this);case x.WEEKLY:return this.wdayset.bind(this);case x.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(t){switch(t){case x.HOURLY:return this.htimeset.bind(this);case x.MINUTELY:return this.mtimeset.bind(this);case x.SECONDLY:return this.stimeset.bind(this)}},e}();function ir(e,t,r,n,i,a){for(var s=[],o=0;o<e.length;o++){var u=void 0,f=void 0,l=e[o];l<0?(u=Math.floor(l/t.length),f=q(l,t.length)):(u=Math.floor((l-1)/t.length),f=q(l-1,t.length));for(var m=[],h=r;h<n;h++){var d=a[h];A(d)&&m.push(d)}var w=void 0;u<0?w=m.slice(u)[0]:w=m[u];var M=t[f],D=le(i.yearordinal+w),U=de(D,M);L(s,U)||s.push(U)}return bt(s),s}function pe(e,t){var r=t.dtstart,n=t.freq,i=t.interval,a=t.until,s=t.bysetpos,o=t.count;if(o===0||i===0)return tt(e);var u=_e.fromDate(r),f=new nr(t);f.rebuild(u.year,u.month);for(var l=sr(f,u,t);;){var m=f.getdayset(n)(u.year,u.month,u.day),h=m[0],d=m[1],w=m[2],M=or(h,d,w,f,t);if($(s))for(var D=ir(s,l,d,w,f,h),U=0;U<D.length;U++){var j=D[U];if(a&&j>a)return tt(e);if(j>=r){var B=Qt(j,t);if(!e.accept(B)||o&&(--o,!o))return tt(e)}}else for(var U=d;U<w;U++){var ot=h[U];if(A(ot))for(var Q=le(f.yearordinal+ot),W=0;W<l.length;W++){var dt=l[W],j=de(Q,dt);if(a&&j>a)return tt(e);if(j>=r){var B=Qt(j,t);if(!e.accept(B)||o&&(--o,!o))return tt(e)}}}if(t.interval===0||(u.add(t,M),u.year>fe))return tt(e);Ht(n)||(l=f.gettimeset(n)(u.hour,u.minute,u.second,0)),f.rebuild(u.year,u.month)}}function ar(e,t,r){var n=r.bymonth,i=r.byweekno,a=r.byweekday,s=r.byeaster,o=r.bymonthday,u=r.bynmonthday,f=r.byyearday;return $(n)&&!L(n,e.mmask[t])||$(i)&&!e.wnomask[t]||$(a)&&!L(a,e.wdaymask[t])||$(e.nwdaymask)&&!e.nwdaymask[t]||s!==null&&!L(e.eastermask,t)||($(o)||$(u))&&!L(o,e.mdaymask[t])&&!L(u,e.nmdaymask[t])||$(f)&&(t<e.yearlen&&!L(f,t+1)&&!L(f,-e.yearlen+t)||t>=e.yearlen&&!L(f,t+1-e.yearlen)&&!L(f,-e.nextyearlen+t-e.yearlen))}function Qt(e,t){return new Dt(e,t.tzid).rezonedDate()}function tt(e){return e.getValue()}function or(e,t,r,n,i){for(var a=!1,s=t;s<r;s++){var o=e[s];a=ar(n,o,i),a&&(e[o]=null)}return a}function sr(e,t,r){var n=r.freq,i=r.byhour,a=r.byminute,s=r.bysecond;return Ht(n)?Ae(r):n>=b.HOURLY&&$(i)&&!L(i,t.hour)||n>=b.MINUTELY&&$(a)&&!L(a,t.minute)||n>=b.SECONDLY&&$(s)&&!L(s,t.second)?[]:e.gettimeset(n)(t.hour,t.minute,t.second,t.millisecond)}var Z={MO:new F(0),TU:new F(1),WE:new F(2),TH:new F(3),FR:new F(4),SA:new F(5),SU:new F(6)},Wt={freq:x.YEARLY,dtstart:null,interval:1,wkst:Z.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},ur=Object.keys(Wt),b=function(){function e(t,r){t===void 0&&(t={}),r===void 0&&(r=!1),this._cache=r?null:new We,this.origOptions=me(t);var n=Ie(t).parsedOptions;this.options=n}return e.parseText=function(t,r){return ye(t,r)},e.fromText=function(t,r){return Ye(t,r)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(t){return pe(t,this.options)},e.prototype._cacheGet=function(t,r){return this._cache?this._cache._cacheGet(t,r):!1},e.prototype._cacheAdd=function(t,r,n){if(this._cache)return this._cache._cacheAdd(t,r,n)},e.prototype.all=function(t){if(t)return this._iter(new Zt("all",{},t));var r=this._cacheGet("all");return r===!1&&(r=this._iter(new ht("all",{})),this._cacheAdd("all",r)),r},e.prototype.between=function(t,r,n,i){if(n===void 0&&(n=!1),!pt(t)||!pt(r))throw new Error("Invalid date passed in to RRule.between");var a={before:r,after:t,inc:n};if(i)return this._iter(new Zt("between",a,i));var s=this._cacheGet("between",a);return s===!1&&(s=this._iter(new ht("between",a)),this._cacheAdd("between",s,a)),s},e.prototype.before=function(t,r){if(r===void 0&&(r=!1),!pt(t))throw new Error("Invalid date passed in to RRule.before");var n={dt:t,inc:r},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new ht("before",n)),this._cacheAdd("before",i,n)),i},e.prototype.after=function(t,r){if(r===void 0&&(r=!1),!pt(t))throw new Error("Invalid date passed in to RRule.after");var n={dt:t,inc:r},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new ht("after",n)),this._cacheAdd("after",i,n)),i},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return At(this.origOptions)},e.prototype.toText=function(t,r,n){return Le(this,t,r,n)},e.prototype.isFullyConvertibleToText=function(){return Ue(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],e.YEARLY=x.YEARLY,e.MONTHLY=x.MONTHLY,e.WEEKLY=x.WEEKLY,e.DAILY=x.DAILY,e.HOURLY=x.HOURLY,e.MINUTELY=x.MINUTELY,e.SECONDLY=x.SECONDLY,e.MO=Z.MO,e.TU=Z.TU,e.WE=Z.WE,e.TH=Z.TH,e.FR=Z.FR,e.SA=Z.SA,e.SU=Z.SU,e.parseString=It,e.optionsToString=At,e}();function fr(e,t,r,n,i,a){var s={},o=e.accept;function u(h,d){r.forEach(function(w){w.between(h,d,!0).forEach(function(M){s[Number(M)]=!0})})}i.forEach(function(h){var d=new Dt(h,a).rezonedDate();s[Number(d)]=!0}),e.accept=function(h){var d=Number(h);return isNaN(d)?o.call(this,h):!s[d]&&(u(new Date(d-1),new Date(d+1)),!s[d])?(s[d]=!0,o.call(this,h)):!0},e.method==="between"&&(u(e.args.after,e.args.before),e.accept=function(h){var d=Number(h);return s[d]?!0:(s[d]=!0,o.call(this,h))});for(var f=0;f<n.length;f++){var l=new Dt(n[f],a).rezonedDate();if(!e.accept(new Date(l.getTime())))break}t.forEach(function(h){pe(e,h.options)});var m=e._result;switch(bt(m),e.method){case"all":case"between":return m;case"before":return m.length&&m[m.length-1]||null;case"after":default:return m.length&&m[0]||null}}var Vt={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function hr(e,t){var r=[],n=[],i=[],a=[],s=Mt(e),o=s.dtstart,u=s.tzid,f=mr(e,t.unfold);return f.forEach(function(l){var m;if(l){var h=yr(l),d=h.name,w=h.parms,M=h.value;switch(d.toUpperCase()){case"RRULE":if(w.length)throw new Error("unsupported RRULE parm: ".concat(w.join(",")));r.push(It(l));break;case"RDATE":var D=(m=/RDATE(?:;TZID=([^:=]+))?/i.exec(l))!==null&&m!==void 0?m:[],U=D[1];U&&!u&&(u=U),n=n.concat(ee(M,w));break;case"EXRULE":if(w.length)throw new Error("unsupported EXRULE parm: ".concat(w.join(",")));i.push(It(M));break;case"EXDATE":a=a.concat(ee(M,w));break;case"DTSTART":break;default:throw new Error("unsupported property: "+d)}}}),{dtstart:o,tzid:u,rrulevals:r,rdatevals:n,exrulevals:i,exdatevals:a}}function cr(e,t){var r=hr(e,t),n=r.rrulevals,i=r.rdatevals,a=r.exrulevals,s=r.exdatevals,o=r.dtstart,u=r.tzid,f=t.cache===!1;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||n.length>1||i.length||a.length||s.length){var l=new vr(f);return l.dtstart(o),l.tzid(u||void 0),n.forEach(function(h){l.rrule(new b(Ot(h,o,u),f))}),i.forEach(function(h){l.rdate(h)}),a.forEach(function(h){l.exrule(new b(Ot(h,o,u),f))}),s.forEach(function(h){l.exdate(h)}),t.compatible&&t.dtstart&&l.rdate(o),l}var m=n[0]||{};return new b(Ot(m,m.dtstart||t.dtstart||o,m.tzid||t.tzid||u),f)}function te(e,t){return t===void 0&&(t={}),cr(e,lr(t))}function Ot(e,t,r){return K(K({},e),{dtstart:t,tzid:r})}function lr(e){var t=[],r=Object.keys(e),n=Object.keys(Vt);if(r.forEach(function(i){L(n,i)||t.push(i)}),t.length)throw new Error("Invalid options: "+t.join(", "));return K(K({},Vt),e)}function dr(e){if(e.indexOf(":")===-1)return{name:"RRULE",value:e};var t=ge(e,":",1),r=t[0],n=t[1];return{name:r,value:n}}function yr(e){var t=dr(e),r=t.name,n=t.value,i=r.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function mr(e,t){if(t===void 0&&(t=!1),e=e&&e.trim(),!e)throw new Error("Invalid empty string");if(!t)return e.split(/\s/);for(var r=e.split(`
1
+ "use strict";const be=require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");var se={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(be.commonjsGlobal,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",s="second",o="minute",u="hour",f="day",l="week",m="month",h="quarter",d="year",w="date",M="Invalid Date",D=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,U=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(g){var v=["th","st","nd","rd"],y=g%100;return"["+g+(v[(y-20)%10]||v[y]||v[0])+"]"}},B=function(g,v,y){var T=String(g);return!T||T.length>=v?g:""+Array(v+1-T.length).join(y)+g},ot={s:B,z:function(g){var v=-g.utcOffset(),y=Math.abs(v),T=Math.floor(y/60),p=y%60;return(v<=0?"+":"-")+B(T,2,"0")+":"+B(p,2,"0")},m:function g(v,y){if(v.date()<y.date())return-g(y,v);var T=12*(y.year()-v.year())+(y.month()-v.month()),p=v.clone().add(T,m),E=y-p<0,k=v.clone().add(T+(E?-1:1),m);return+(-(T+(y-p)/(E?p-k:k-p))||0)},a:function(g){return g<0?Math.ceil(g)||0:Math.floor(g)},p:function(g){return{M:m,y:d,w:l,d:f,D:w,h:u,m:o,s,ms:a,Q:h}[g]||String(g||"").toLowerCase().replace(/s$/,"")},u:function(g){return g===void 0}},Q="en",H={};H[Q]=j;var dt=function(g){return g instanceof gt},wt=function g(v,y,T){var p;if(!v)return Q;if(typeof v=="string"){var E=v.toLowerCase();H[E]&&(p=E),y&&(H[E]=y,p=E);var k=v.split("-");if(!p&&k.length>1)return g(k[0])}else{var O=v.name;H[O]=v,p=O}return!T&&p&&(Q=p),p||!T&&Q},N=function(g,v){if(dt(g))return g.clone();var y=typeof v=="object"?v:{};return y.date=g,y.args=arguments,new gt(y)},Y=ot;Y.l=wt,Y.i=dt,Y.w=function(g,v){return N(g,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var gt=function(){function g(y){this.$L=wt(y.locale,null,!0),this.parse(y)}var v=g.prototype;return v.parse=function(y){this.$d=function(T){var p=T.date,E=T.utc;if(p===null)return new Date(NaN);if(Y.u(p))return new Date;if(p instanceof Date)return new Date(p);if(typeof p=="string"&&!/Z$/i.test(p)){var k=p.match(D);if(k){var O=k[2]-1||0,_=(k[7]||"0").substring(0,3);return E?new Date(Date.UTC(k[1],O,k[3]||1,k[4]||0,k[5]||0,k[6]||0,_)):new Date(k[1],O,k[3]||1,k[4]||0,k[5]||0,k[6]||0,_)}}return new Date(p)}(y),this.$x=y.x||{},this.init()},v.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},v.$utils=function(){return Y},v.isValid=function(){return this.$d.toString()!==M},v.isSame=function(y,T){var p=N(y);return this.startOf(T)<=p&&p<=this.endOf(T)},v.isAfter=function(y,T){return N(y)<this.startOf(T)},v.isBefore=function(y,T){return this.endOf(T)<N(y)},v.$g=function(y,T,p){return Y.u(y)?this[T]:this.set(p,y)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(y,T){var p=this,E=!!Y.u(T)||T,k=Y.p(y),O=function(ut,P){var nt=Y.w(p.$u?Date.UTC(p.$y,P,ut):new Date(p.$y,P,ut),p);return E?nt:nt.endOf(f)},_=function(ut,P){return Y.w(p.toDate()[ut].apply(p.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(P)),p)},I=this.$W,C=this.$M,rt=this.$D,V="set"+(this.$u?"UTC":"");switch(k){case d:return E?O(1,0):O(31,11);case m:return E?O(1,C):O(0,C+1);case l:var yt=this.$locale().weekStart||0,mt=(I<yt?I+7:I)-yt;return O(E?rt-mt:rt+(6-mt),C);case f:case w:return _(V+"Hours",0);case u:return _(V+"Minutes",1);case o:return _(V+"Seconds",2);case s:return _(V+"Milliseconds",3);default:return this.clone()}},v.endOf=function(y){return this.startOf(y,!1)},v.$set=function(y,T){var p,E=Y.p(y),k="set"+(this.$u?"UTC":""),O=(p={},p[f]=k+"Date",p[w]=k+"Date",p[m]=k+"Month",p[d]=k+"FullYear",p[u]=k+"Hours",p[o]=k+"Minutes",p[s]=k+"Seconds",p[a]=k+"Milliseconds",p)[E],_=E===f?this.$D+(T-this.$W):T;if(E===m||E===d){var I=this.clone().set(w,1);I.$d[O](_),I.init(),this.$d=I.set(w,Math.min(this.$D,I.daysInMonth())).$d}else O&&this.$d[O](_);return this.init(),this},v.set=function(y,T){return this.clone().$set(y,T)},v.get=function(y){return this[Y.p(y)]()},v.add=function(y,T){var p,E=this;y=Number(y);var k=Y.p(T),O=function(C){var rt=N(E);return Y.w(rt.date(rt.date()+Math.round(C*y)),E)};if(k===m)return this.set(m,this.$M+y);if(k===d)return this.set(d,this.$y+y);if(k===f)return O(1);if(k===l)return O(7);var _=(p={},p[o]=n,p[u]=i,p[s]=r,p)[k]||1,I=this.$d.getTime()+y*_;return Y.w(I,this)},v.subtract=function(y,T){return this.add(-1*y,T)},v.format=function(y){var T=this,p=this.$locale();if(!this.isValid())return p.invalidDate||M;var E=y||"YYYY-MM-DDTHH:mm:ssZ",k=Y.z(this),O=this.$H,_=this.$m,I=this.$M,C=p.weekdays,rt=p.months,V=function(P,nt,St,Tt){return P&&(P[nt]||P(T,E))||St[nt].slice(0,Tt)},yt=function(P){return Y.s(O%12||12,P,"0")},mt=p.meridiem||function(P,nt,St){var Tt=P<12?"AM":"PM";return St?Tt.toLowerCase():Tt},ut={YY:String(this.$y).slice(-2),YYYY:this.$y,M:I+1,MM:Y.s(I+1,2,"0"),MMM:V(p.monthsShort,I,rt,3),MMMM:V(rt,I),D:this.$D,DD:Y.s(this.$D,2,"0"),d:String(this.$W),dd:V(p.weekdaysMin,this.$W,C,2),ddd:V(p.weekdaysShort,this.$W,C,3),dddd:C[this.$W],H:String(O),HH:Y.s(O,2,"0"),h:yt(1),hh:yt(2),a:mt(O,_,!0),A:mt(O,_,!1),m:String(_),mm:Y.s(_,2,"0"),s:String(this.$s),ss:Y.s(this.$s,2,"0"),SSS:Y.s(this.$ms,3,"0"),Z:k};return E.replace(U,function(P,nt){return nt||ut[P]||k.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(y,T,p){var E,k=Y.p(T),O=N(y),_=(O.utcOffset()-this.utcOffset())*n,I=this-O,C=Y.m(this,O);return C=(E={},E[d]=C/12,E[m]=C,E[h]=C/3,E[l]=(I-_)/6048e5,E[f]=(I-_)/864e5,E[u]=I/i,E[o]=I/n,E[s]=I/r,E)[k]||I,p?C:Y.a(C)},v.daysInMonth=function(){return this.endOf(m).$D},v.$locale=function(){return H[this.$L]},v.locale=function(y,T){if(!y)return this.$L;var p=this.clone(),E=wt(y,T,!0);return E&&(p.$L=E),p},v.clone=function(){return Y.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),Ft=gt.prototype;return N.prototype=Ft,[["$ms",a],["$s",s],["$m",o],["$H",u],["$W",f],["$M",m],["$y",d],["$D",w]].forEach(function(g){Ft[g[1]]=function(v){return this.$g(v,g[0],g[1])}}),N.extend=function(g,v){return g.$i||(g(v,gt,N),g.$i=!0),N},N.locale=wt,N.isDayjs=dt,N.unix=function(g){return N(1e3*g)},N.en=H[Q],N.Ls=H,N.p={},N})})(se);const Nt=se.exports;var Yt=["MO","TU","WE","TH","FR","SA","SU"],F=function(){function e(t,r){if(r===0)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=r}return e.fromStr=function(t){return new e(Yt.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},e.prototype.toString=function(){var t=Yt[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},e.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},e}(),A=function(e){return e!=null},G=function(e){return typeof e=="number"},Pt=function(e){return typeof e=="string"&&Yt.includes(e)},z=Array.isArray,X=function(e,t){t===void 0&&(t=e),arguments.length===1&&(t=e,e=0);for(var r=[],n=e;n<t;n++)r.push(n);return r},S=function(e,t){var r=0,n=[];if(z(e))for(;r<t;r++)n[r]=[].concat(e);else for(;r<t;r++)n[r]=e;return n},we=function(e){return z(e)?e:[e]};function ft(e,t,r){r===void 0&&(r=" ");var n=String(e);return t=t>>0,n.length>t?String(n):(t=t-n.length,t>r.length&&(r+=S(r,t/r.length)),r.slice(0,t)+String(n))}var ge=function(e,t,r){var n=e.split(t);return r?n.slice(0,r).concat([n.slice(r).join(t)]):n},q=function(e,t){var r=e%t;return r*t<0?r+t:r},xt=function(e,t){return{div:Math.floor(e/t),mod:q(e,t)}},J=function(e){return!A(e)||e.length===0},$=function(e){return!J(e)},L=function(e,t){return $(e)&&e.indexOf(t)!==-1},st=function(e,t,r,n,i,a){return n===void 0&&(n=0),i===void 0&&(i=0),a===void 0&&(a=0),new Date(Date.UTC(e,t-1,r,n,i,a))},Te=[31,28,31,30,31,30,31,31,30,31,30,31],ue=1e3*60*60*24,fe=9999,he=st(1970,1,1),ke=[6,0,1,2,3,4,5],vt=function(e){return e%4===0&&e%100!==0||e%400===0},ce=function(e){return e instanceof Date},pt=function(e){return ce(e)&&!isNaN(e.getTime())},jt=function(e){return e.getTimezoneOffset()*60*1e3},Ee=function(e,t){var r=e.getTime()-jt(e),n=t.getTime()-jt(t),i=r-n;return Math.round(i/ue)},Lt=function(e){return Ee(e,he)},le=function(e){return new Date(he.getTime()+e*ue)},Me=function(e){var t=e.getUTCMonth();return t===1&&vt(e.getUTCFullYear())?29:Te[t]},ct=function(e){return ke[e.getUTCDay()]},zt=function(e,t){var r=st(e,t+1,1);return[ct(r),Me(r)]},de=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},Ut=function(e){var t=new Date(e.getTime());return t},Kt=function(e){for(var t=[],r=0;r<e.length;r++)t.push(Ut(e[r]));return t},bt=function(e){e.sort(function(t,r){return t.getTime()-r.getTime()})},$t=function(e,t){t===void 0&&(t=!0);var r=new Date(e);return[ft(r.getUTCFullYear().toString(),4,"0"),ft(r.getUTCMonth()+1,2,"0"),ft(r.getUTCDate(),2,"0"),"T",ft(r.getUTCHours(),2,"0"),ft(r.getUTCMinutes(),2,"0"),ft(r.getUTCSeconds(),2,"0"),t?"Z":""].join("")},Ct=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,r=t.exec(e);if(!r)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[5],10)||0,parseInt(r[6],10)||0,parseInt(r[7],10)||0))},qt=function(e,t){var r=e.toLocaleString("sv-SE",{timeZone:t});return r.replace(" ","T")+"Z"},De=function(e,t){var r=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(qt(e,r)),i=new Date(qt(e,t??"UTC")),a=i.getTime()-n.getTime();return new Date(e.getTime()-a)},ht=function(){function e(t,r){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=r,t==="between"?(this.maxDate=r.inc?r.before:new Date(r.before.getTime()-1),this.minDate=r.inc?r.after:new Date(r.after.getTime()+1)):t==="before"?this.maxDate=r.inc?r.dt:new Date(r.dt.getTime()-1):t==="after"&&(this.minDate=r.inc?r.dt:new Date(r.dt.getTime()+1))}return e.prototype.accept=function(t){++this.total;var r=this.minDate&&t<this.minDate,n=this.maxDate&&t>this.maxDate;if(this.method==="between"){if(r)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return r?!0:(this.add(t),!1);return this.add(t)},e.prototype.add=function(t){return this._result.push(t),!0},e.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;case"before":case"after":default:return t.length?t[t.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),It=function(e,t){return It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},It(e,t)};function Rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");It(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var K=function(){return K=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},K.apply(this,arguments)};function c(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Zt=function(e){Rt(t,e);function t(r,n,i){var a=e.call(this,r,n)||this;return a.iterator=i,a}return t.prototype.add=function(r){return this.iterator(r,this._result.length)?(this._result.push(r),!0):!1},t}(ht),kt={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},Bt=function(e,t){return e.indexOf(t)!==-1},Se=function(e){return e.toString()},xe=function(e,t,r){return"".concat(t," ").concat(r,", ").concat(e)},et=function(){function e(t,r,n,i){if(r===void 0&&(r=Se),n===void 0&&(n=kt),i===void 0&&(i=xe),this.text=[],this.language=n||kt,this.gettext=r,this.dateFormatter=i,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),s=[].concat(this.options.bynmonthday);a.sort(function(l,m){return l-m}),s.sort(function(l,m){return m-l}),this.bymonthday=a.concat(s),this.bymonthday.length||(this.bymonthday=null)}if(A(this.origOptions.byweekday)){var o=z(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(l){return!l.n}),someWeeks:o.filter(function(l){return!!l.n}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var f=function(l,m){return l.weekday-m.weekday};this.byweekday.allWeeks.sort(f),this.byweekday.someWeeks.sort(f),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){var r=!0;if(!(t.options.freq in e.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var n in t.origOptions){if(Bt(["dtstart","wkst","freq"],n))return!0;if(!Bt(e.IMPLEMENTED[t.options.freq],n))return!1}return r},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[b.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var r=this.options.until;this.add(this.dateFormatter(r.getUTCFullYear(),this.language.monthNames[r.getUTCMonth()],r.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},e.prototype.HOURLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("hours"):t("hour"))},e.prototype.MINUTELY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("minutes"):t("minute"))},e.prototype.DAILY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("day")):(this.options.interval===1&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},e.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("months"):t("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("years"):t("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(this.plural(this.options.byweekno.length)?t("weeks"):t("week")).add(this.list(this.options.byweekno,void 0,t("and")))},e.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},e.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},e.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},e.prototype.nth=function(t){t=parseInt(t.toString(),10);var r,n=this.gettext;if(t===-1)return n("last");var i=Math.abs(t);switch(i){case 1:case 21:case 31:r=i+n("st");break;case 2:case 22:r=i+n("nd");break;case 3:case 23:r=i+n("rd");break;default:r=i+n("th")}return t<0?r+" "+n("last"):r},e.prototype.monthtext=function(t){return this.language.monthNames[t-1]},e.prototype.weekdaytext=function(t){var r=G(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[r]},e.prototype.plural=function(t){return t%100!==1},e.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},e.prototype.list=function(t,r,n,i){var a=this;i===void 0&&(i=","),z(t)||(t=[t]);var s=function(u,f,l){for(var m="",h=0;h<u.length;h++)h!==0&&(h===u.length-1?m+=" "+l+" ":m+=f+" "),m+=u[h];return m};r=r||function(u){return u.toString()};var o=function(u){return r&&r.call(a,u)};return n?s(t.map(o),i,n):t.map(o).join(i+" ")},e}(),Oe=function(){function e(t){this.done=!0,this.rules=t}return e.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&this.symbol===null},e.prototype.nextSymbol=function(){var t,r;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;t=null;for(var i in this.rules){n=this.rules[i];var a=n.exec(this.text);a&&(t===null||a[0].length>t[0].length)&&(t=a,r=i)}if(t!=null&&(this.text=this.text.substr(t[0].length),this.text===""&&(this.done=!0)),t==null){this.done=!0,this.symbol=null,this.value=null;return}}while(r==="SKIP");return this.symbol=r,this.value=t,!0},e.prototype.accept=function(t){if(this.symbol===t){if(this.value){var r=this.value;return this.nextSymbol(),r}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},e}();function ye(e,t){t===void 0&&(t=kt);var r={},n=new Oe(t.tokens);if(!n.start(e))return null;return i(),r;function i(){n.expect("every");var h=n.acceptNumber();if(h&&(r.interval=parseInt(h[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":r.freq=b.DAILY,n.nextSymbol()&&(s(),m());break;case"weekday(s)":r.freq=b.WEEKLY,r.byweekday=[b.MO,b.TU,b.WE,b.TH,b.FR],n.nextSymbol(),m();break;case"week(s)":r.freq=b.WEEKLY,n.nextSymbol()&&(a(),m());break;case"hour(s)":r.freq=b.HOURLY,n.nextSymbol()&&(a(),m());break;case"minute(s)":r.freq=b.MINUTELY,n.nextSymbol()&&(a(),m());break;case"month(s)":r.freq=b.MONTHLY,n.nextSymbol()&&(a(),m());break;case"year(s)":r.freq=b.YEARLY,n.nextSymbol()&&(a(),m());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":r.freq=b.WEEKLY;var d=n.symbol.substr(0,2).toUpperCase();if(r.byweekday=[b[d]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var w=u();if(!w)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");r.byweekday.push(b[w]),n.nextSymbol()}l(),m();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(r.freq=b.YEARLY,r.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var M=o();if(!M)throw new Error("Unexpected symbol "+n.symbol+", expected month");r.bymonth.push(M),n.nextSymbol()}a(),m();break;default:throw new Error("Unknown symbol")}}function a(){var h=n.accept("on"),d=n.accept("the");if(h||d)do{var w=f(),M=u(),D=o();if(w)M?(n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(b[M].nth(w))):(r.bymonthday||(r.bymonthday=[]),r.bymonthday.push(w),n.accept("day(s)"));else if(M)n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(b[M]);else if(n.symbol==="weekday(s)")n.nextSymbol(),r.byweekday||(r.byweekday=[b.MO,b.TU,b.WE,b.TH,b.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var U=n.acceptNumber();if(!U)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(r.byweekno=[parseInt(U[0],10)];n.accept("comma");){if(U=n.acceptNumber(),!U)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.byweekno.push(parseInt(U[0],10))}}else if(D)n.nextSymbol(),r.bymonth||(r.bymonth=[]),r.bymonth.push(D);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function s(){var h=n.accept("at");if(h)do{var d=n.acceptNumber();if(!d)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(r.byhour=[parseInt(d[0],10)];n.accept("comma");){if(d=n.acceptNumber(),!d)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");r.byhour.push(parseInt(d[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function f(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var h=parseInt(n.value[1],10);if(h<-366||h>366)throw new Error("Nth out of range: "+h);return n.nextSymbol(),n.accept("last")?-h:h;default:return!1}}function l(){n.accept("on"),n.accept("the");var h=f();if(h)for(r.bymonthday=[h],n.nextSymbol();n.accept("comma");){if(h=f(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.bymonthday.push(h),n.nextSymbol()}}function m(){if(n.symbol==="until"){var h=Date.parse(n.text);if(!h)throw new Error("Cannot parse until date:"+n.text);r.until=new Date(h)}else n.accept("for")&&(r.count=parseInt(n.value[0],10),n.expect("number"))}}var x;(function(e){e[e.YEARLY=0]="YEARLY",e[e.MONTHLY=1]="MONTHLY",e[e.WEEKLY=2]="WEEKLY",e[e.DAILY=3]="DAILY",e[e.HOURLY=4]="HOURLY",e[e.MINUTELY=5]="MINUTELY",e[e.SECONDLY=6]="SECONDLY"})(x||(x={}));function Wt(e){return e<x.HOURLY}var Ye=function(e,t){return t===void 0&&(t=kt),new b(ye(e,t)||void 0)},lt=["count","until","interval","byweekday","bymonthday","bymonth"];et.IMPLEMENTED=[];et.IMPLEMENTED[x.HOURLY]=lt;et.IMPLEMENTED[x.MINUTELY]=lt;et.IMPLEMENTED[x.DAILY]=["byhour"].concat(lt);et.IMPLEMENTED[x.WEEKLY]=lt;et.IMPLEMENTED[x.MONTHLY]=lt;et.IMPLEMENTED[x.YEARLY]=["byweekno","byyearday"].concat(lt);var Le=function(e,t,r,n){return new et(e,t,r,n).toString()},Ue=et.isFullyConvertible,Et=function(){function e(t,r,n,i){this.hour=t,this.minute=r,this.second=n,this.millisecond=i||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},e}(),Ie=function(e){Rt(t,e);function t(r,n,i,a,s,o,u){var f=e.call(this,a,s,o,u)||this;return f.year=r,f.month=n,f.day=i,f}return t.fromDate=function(r){return new this(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.valueOf()%1e3)},t.prototype.getWeekday=function(){return ct(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(r){this.year+=r},t.prototype.addMonths=function(r){if(this.month+=r,this.month>12){var n=Math.floor(this.month/12),i=q(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(r,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+r*7:this.day+=-(this.getWeekday()-n)+r*7,this.fixDay()},t.prototype.addDaily=function(r){this.day+=r,this.fixDay()},t.prototype.addHours=function(r,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/r)*r);;){this.hour+=r;var a=xt(this.hour,24),s=a.div,o=a.mod;if(s&&(this.hour=o,this.addDaily(s)),J(i)||L(i,this.hour))break}},t.prototype.addMinutes=function(r,n,i,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/r)*r);;){this.minute+=r;var s=xt(this.minute,60),o=s.div,u=s.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(J(i)||L(i,this.hour))&&(J(a)||L(a,this.minute)))break}},t.prototype.addSeconds=function(r,n,i,a,s){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/r)*r);;){this.second+=r;var o=xt(this.second,60),u=o.div,f=o.mod;if(u&&(this.second=f,this.addMinutes(u,!1,i,a)),(J(i)||L(i,this.hour))&&(J(a)||L(a,this.minute))&&(J(s)||L(s,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var r=zt(this.year,this.month-1)[1];if(!(this.day<=r))for(;this.day>r;){if(this.day-=r,++this.month,this.month===13&&(this.month=1,++this.year,this.year>fe))return;r=zt(this.year,this.month-1)[1]}}},t.prototype.add=function(r,n){var i=r.freq,a=r.interval,s=r.wkst,o=r.byhour,u=r.byminute,f=r.bysecond;switch(i){case x.YEARLY:return this.addYears(a);case x.MONTHLY:return this.addMonths(a);case x.WEEKLY:return this.addWeekly(a,s);case x.DAILY:return this.addDaily(a);case x.HOURLY:return this.addHours(a,n,o);case x.MINUTELY:return this.addMinutes(a,n,o,u);case x.SECONDLY:return this.addSeconds(a,n,o,u,f)}},t}(Et);function me(e){for(var t=[],r=Object.keys(e),n=0,i=r;n<i.length;n++){var a=i[n];L(ur,a)||t.push(a),ce(e[a])&&!pt(e[a])&&t.push(a)}if(t.length)throw new Error("Invalid options: "+t.join(", "));return K({},e)}function _e(e){var t=K(K({},Ht),me(e));if(A(t.byeaster)&&(t.freq=b.YEARLY),!(A(t.freq)&&b.FREQUENCIES[t.freq]))throw new Error("Invalid frequency: ".concat(t.freq," ").concat(e.freq));if(t.dtstart||(t.dtstart=new Date(new Date().setMilliseconds(0))),A(t.wkst)?G(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=b.MO.weekday,A(t.bysetpos)){G(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var r=0;r<t.bysetpos.length;r++){var n=t.bysetpos[r];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(t.byweekno||$(t.byweekno)||$(t.byyearday)||t.bymonthday||$(t.bymonthday)||A(t.byweekday)||A(t.byeaster)))switch(t.freq){case b.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case b.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case b.WEEKLY:t.byweekday=[ct(t.dtstart)];break}if(A(t.bymonth)&&!z(t.bymonth)&&(t.bymonth=[t.bymonth]),A(t.byyearday)&&!z(t.byyearday)&&G(t.byyearday)&&(t.byyearday=[t.byyearday]),!A(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if(z(t.bymonthday)){for(var i=[],a=[],r=0;r<t.bymonthday.length;r++){var n=t.bymonthday[r];n>0?i.push(n):n<0&&a.push(n)}t.bymonthday=i,t.bynmonthday=a}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(A(t.byweekno)&&!z(t.byweekno)&&(t.byweekno=[t.byweekno]),!A(t.byweekday))t.bynweekday=null;else if(G(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(Pt(t.byweekday))t.byweekday=[F.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof F)!t.byweekday.n||t.freq>b.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var s=[],o=[],r=0;r<t.byweekday.length;r++){var u=t.byweekday[r];if(G(u)){s.push(u);continue}else if(Pt(u)){s.push(F.fromStr(u).weekday);continue}!u.n||t.freq>b.MONTHLY?s.push(u.weekday):o.push([u.weekday,u.n])}t.byweekday=$(s)?s:null,t.bynweekday=$(o)?o:null}return A(t.byhour)?G(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<b.HOURLY?[t.dtstart.getUTCHours()]:null,A(t.byminute)?G(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<b.MINUTELY?[t.dtstart.getUTCMinutes()]:null,A(t.bysecond)?G(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<b.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function Ae(e){var t=e.dtstart.getTime()%1e3;if(!Wt(e.freq))return[];var r=[];return e.byhour.forEach(function(n){e.byminute.forEach(function(i){e.bysecond.forEach(function(a){r.push(new Et(n,i,a,t))})})}),r}function _t(e){var t=e.split(`
2
+ `).map(Ne).filter(function(r){return r!==null});return K(K({},t[0]),t[1])}function Mt(e){var t={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!r)return t;var n=r[1],i=r[2];return n&&(t.tzid=n),t.dtstart=Ct(i),t}function Ne(e){if(e=e.replace(/^\s+|\s+$/,""),!e.length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return Gt(e);var r=t[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return Gt(e);case"DTSTART":return Mt(e);default:throw new Error("Unsupported RFC prop ".concat(r," in ").concat(e))}}function Gt(e){var t=e.replace(/^RRULE:/i,""),r=Mt(t),n=e.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var a=i.split("="),s=a[0],o=a[1];switch(s.toUpperCase()){case"FREQ":r.freq=x[o.toUpperCase()];break;case"WKST":r.wkst=Z[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=$e(o),f=s.toLowerCase();r[f]=u;break;case"BYWEEKDAY":case"BYDAY":r.byweekday=Ce(o);break;case"DTSTART":case"TZID":var l=Mt(e);r.tzid=l.tzid,r.dtstart=l.dtstart;break;case"UNTIL":r.until=Ct(o);break;case"BYEASTER":r.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+s+"'")}}),r}function $e(e){if(e.indexOf(",")!==-1){var t=e.split(",");return t.map(Jt)}return Jt(e)}function Jt(e){return/^[+-]?\d+$/.test(e)?Number(e):e}function Ce(e){var t=e.split(",");return t.map(function(r){if(r.length===2)return Z[r];var n=r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(r));var i=Number(n[1]),a=n[2],s=Z[a].weekday;return new F(s,i)})}var Dt=function(){function e(t,r){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=r}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=$t(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:De(this.date,this.tzid)},e}();function At(e){for(var t=[],r="",n=Object.keys(e),i=Object.keys(Ht),a=0;a<n.length;a++)if(n[a]!=="tzid"&&L(i,n[a])){var s=n[a].toUpperCase(),o=e[n[a]],u="";if(!(!A(o)||z(o)&&!o.length)){switch(s){case"FREQ":u=b.FREQUENCIES[e.freq];break;case"WKST":G(o)?u=new F(o).toString():u=o.toString();break;case"BYWEEKDAY":s="BYDAY",u=we(o).map(function(d){return d instanceof F?d:z(d)?new F(d[0],d[1]):new F(d)}).toString();break;case"DTSTART":r=Re(o,e.tzid);break;case"UNTIL":u=$t(o,!e.tzid);break;default:if(z(o)){for(var f=[],l=0;l<o.length;l++)f[l]=String(o[l]);u=f.toString()}else u=String(o)}u&&t.push([s,u])}}var m=t.map(function(d){var w=d[0],M=d[1];return"".concat(w,"=").concat(M.toString())}).join(";"),h="";return m!==""&&(h="RRULE:".concat(m)),[r,h].filter(function(d){return!!d}).join(`
3
+ `)}function Re(e,t){return e?"DTSTART"+new Dt(new Date(e),t).toString():""}function We(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every(function(r,n){return r.getTime()===t[n].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var He=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(t,r,n){r&&(r=r instanceof Date?Ut(r):Kt(r)),t==="all"?this.all=r:(n._value=r,this[t].push(n))},e.prototype._cacheGet=function(t,r){var n=!1,i=r?Object.keys(r):[],a=function(l){for(var m=0;m<i.length;m++){var h=i[m];if(!We(r[h],l[h]))return!0}return!1},s=this[t];if(t==="all")n=this.all;else if(z(s))for(var o=0;o<s.length;o++){var u=s[o];if(!(i.length&&a(u))){n=u._value;break}}if(!n&&this.all){for(var f=new ht(t,r),o=0;o<this.all.length&&f.accept(this.all[o]);o++);n=f.getValue(),this._cacheAdd(t,n,r)}return z(n)?Kt(n):n instanceof Date?Ut(n):n},e}(),Fe=c(c(c(c(c(c(c(c(c(c(c(c(c([],S(1,31),!0),S(2,28),!0),S(3,31),!0),S(4,30),!0),S(5,31),!0),S(6,30),!0),S(7,31),!0),S(8,31),!0),S(9,30),!0),S(10,31),!0),S(11,30),!0),S(12,31),!0),S(1,7),!0),Pe=c(c(c(c(c(c(c(c(c(c(c(c(c([],S(1,31),!0),S(2,29),!0),S(3,31),!0),S(4,30),!0),S(5,31),!0),S(6,30),!0),S(7,31),!0),S(8,31),!0),S(9,30),!0),S(10,31),!0),S(11,30),!0),S(12,31),!0),S(1,7),!0),je=X(1,29),ze=X(1,30),it=X(1,31),R=X(1,32),Ke=c(c(c(c(c(c(c(c(c(c(c(c(c([],R,!0),ze,!0),R,!0),it,!0),R,!0),it,!0),R,!0),R,!0),it,!0),R,!0),it,!0),R,!0),R.slice(0,7),!0),qe=c(c(c(c(c(c(c(c(c(c(c(c(c([],R,!0),je,!0),R,!0),it,!0),R,!0),it,!0),R,!0),R,!0),it,!0),R,!0),it,!0),R,!0),R.slice(0,7),!0),Ze=X(-28,0),Be=X(-29,0),at=X(-30,0),W=X(-31,0),Ge=c(c(c(c(c(c(c(c(c(c(c(c(c([],W,!0),Be,!0),W,!0),at,!0),W,!0),at,!0),W,!0),W,!0),at,!0),W,!0),at,!0),W,!0),W.slice(0,7),!0),Je=c(c(c(c(c(c(c(c(c(c(c(c(c([],W,!0),Ze,!0),W,!0),at,!0),W,!0),at,!0),W,!0),W,!0),at,!0),W,!0),at,!0),W,!0),W.slice(0,7),!0),Xe=[0,31,60,91,121,152,182,213,244,274,305,335,366],Qe=[0,31,59,90,120,151,181,212,243,273,304,334,365],Xt=function(){for(var e=[],t=0;t<55;t++)e=e.concat(X(7));return e}();function Ve(e,t){var r=st(e,1,1),n=vt(e)?366:365,i=vt(e+1)?366:365,a=Lt(r),s=ct(r),o=K(K({yearlen:n,nextyearlen:i,yearordinal:a,yearweekday:s},tr(e)),{wnomask:null});if(J(t.byweekno))return o;o.wnomask=S(0,n+7);var u,f,l=u=q(7-s+t.wkst,7);l>=4?(l=0,f=o.yearlen+q(s-t.wkst,7)):f=n-l;for(var m=Math.floor(f/7),h=q(f,7),d=Math.floor(m+h/4),w=0;w<t.byweekno.length;w++){var M=t.byweekno[w];if(M<0&&(M+=d+1),M>0&&M<=d){var D=void 0;M>1?(D=l+(M-1)*7,l!==u&&(D-=7-u)):D=l;for(var U=0;U<7&&(o.wnomask[D]=1,D++,o.wdaymask[D]!==t.wkst);U++);}}if(L(t.byweekno,1)){var D=l+d*7;if(l!==u&&(D-=7-u),D<n)for(var w=0;w<7&&(o.wnomask[D]=1,D+=1,o.wdaymask[D]!==t.wkst);w++);}if(l){var j=void 0;if(L(t.byweekno,-1))j=-1;else{var B=ct(st(e-1,1,1)),ot=q(7-B.valueOf()+t.wkst,7),Q=vt(e-1)?366:365,H=void 0;ot>=4?(ot=0,H=Q+q(B-t.wkst,7)):H=n-l,j=Math.floor(52+q(H,7)/4)}if(L(t.byweekno,j))for(var D=0;D<l;D++)o.wnomask[D]=1}return o}function tr(e){var t=vt(e)?366:365,r=st(e,1,1),n=ct(r);return t===365?{mmask:Fe,mdaymask:qe,nmdaymask:Je,wdaymask:Xt.slice(n),mrange:Qe}:{mmask:Pe,mdaymask:Ke,nmdaymask:Ge,wdaymask:Xt.slice(n),mrange:Xe}}function er(e,t,r,n,i,a){var s={lastyear:e,lastmonth:t,nwdaymask:[]},o=[];if(a.freq===b.YEARLY)if(J(a.bymonth))o=[[0,r]];else for(var u=0;u<a.bymonth.length;u++)t=a.bymonth[u],o.push(n.slice(t-1,t+1));else a.freq===b.MONTHLY&&(o=[n.slice(t-1,t+1)]);if(J(o))return s;s.nwdaymask=S(0,r);for(var u=0;u<o.length;u++)for(var f=o[u],l=f[0],m=f[1]-1,h=0;h<a.bynweekday.length;h++){var d=void 0,w=a.bynweekday[h],M=w[0],D=w[1];D<0?(d=m+(D+1)*7,d-=q(i[d]-M,7)):(d=l+(D-1)*7,d+=q(7-i[d]+M,7)),l<=d&&d<=m&&(s.nwdaymask[d]=1)}return s}function rr(e,t){t===void 0&&(t=0);var r=e%19,n=Math.floor(e/100),i=e%100,a=Math.floor(n/4),s=n%4,o=Math.floor((n+8)/25),u=Math.floor((n-o+1)/3),f=Math.floor(19*r+n-a-u+15)%30,l=Math.floor(i/4),m=i%4,h=Math.floor(32+2*s+2*l-f-m)%7,d=Math.floor((r+11*f+22*h)/451),w=Math.floor((f+h-7*d+114)/31),M=(f+h-7*d+114)%31+1,D=Date.UTC(e,w-1,M+t),U=Date.UTC(e,0,1);return[Math.ceil((D-U)/(1e3*60*60*24))]}var nr=function(){function e(t){this.options=t}return e.prototype.rebuild=function(t,r){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=Ve(t,n)),$(n.bynweekday)&&(r!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,a=i.yearlen,s=i.mrange,o=i.wdaymask;this.monthinfo=er(t,r,a,s,o,n)}A(n.byeaster)&&(this.eastermask=rr(t,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[X(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(t,r){for(var n=this.mrange[r-1],i=this.mrange[r],a=S(null,this.yearlen),s=n;s<i;s++)a[s]=s;return[a,n,i]},e.prototype.wdayset=function(t,r,n){for(var i=S(null,this.yearlen+7),a=Lt(st(t,r,n))-this.yearordinal,s=a,o=0;o<7&&(i[a]=a,++a,this.wdaymask[a]!==this.options.wkst);o++);return[i,s,a]},e.prototype.ddayset=function(t,r,n){var i=S(null,this.yearlen),a=Lt(st(t,r,n))-this.yearordinal;return i[a]=a,[i,a,a+1]},e.prototype.htimeset=function(t,r,n,i){var a=this,s=[];return this.options.byminute.forEach(function(o){s=s.concat(a.mtimeset(t,o,n,i))}),bt(s),s},e.prototype.mtimeset=function(t,r,n,i){var a=this.options.bysecond.map(function(s){return new Et(t,r,s,i)});return bt(a),a},e.prototype.stimeset=function(t,r,n,i){return[new Et(t,r,n,i)]},e.prototype.getdayset=function(t){switch(t){case x.YEARLY:return this.ydayset.bind(this);case x.MONTHLY:return this.mdayset.bind(this);case x.WEEKLY:return this.wdayset.bind(this);case x.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(t){switch(t){case x.HOURLY:return this.htimeset.bind(this);case x.MINUTELY:return this.mtimeset.bind(this);case x.SECONDLY:return this.stimeset.bind(this)}},e}();function ir(e,t,r,n,i,a){for(var s=[],o=0;o<e.length;o++){var u=void 0,f=void 0,l=e[o];l<0?(u=Math.floor(l/t.length),f=q(l,t.length)):(u=Math.floor((l-1)/t.length),f=q(l-1,t.length));for(var m=[],h=r;h<n;h++){var d=a[h];A(d)&&m.push(d)}var w=void 0;u<0?w=m.slice(u)[0]:w=m[u];var M=t[f],D=le(i.yearordinal+w),U=de(D,M);L(s,U)||s.push(U)}return bt(s),s}function pe(e,t){var r=t.dtstart,n=t.freq,i=t.interval,a=t.until,s=t.bysetpos,o=t.count;if(o===0||i===0)return tt(e);var u=Ie.fromDate(r),f=new nr(t);f.rebuild(u.year,u.month);for(var l=sr(f,u,t);;){var m=f.getdayset(n)(u.year,u.month,u.day),h=m[0],d=m[1],w=m[2],M=or(h,d,w,f,t);if($(s))for(var D=ir(s,l,d,w,f,h),U=0;U<D.length;U++){var j=D[U];if(a&&j>a)return tt(e);if(j>=r){var B=Qt(j,t);if(!e.accept(B)||o&&(--o,!o))return tt(e)}}else for(var U=d;U<w;U++){var ot=h[U];if(A(ot))for(var Q=le(f.yearordinal+ot),H=0;H<l.length;H++){var dt=l[H],j=de(Q,dt);if(a&&j>a)return tt(e);if(j>=r){var B=Qt(j,t);if(!e.accept(B)||o&&(--o,!o))return tt(e)}}}if(t.interval===0||(u.add(t,M),u.year>fe))return tt(e);Wt(n)||(l=f.gettimeset(n)(u.hour,u.minute,u.second,0)),f.rebuild(u.year,u.month)}}function ar(e,t,r){var n=r.bymonth,i=r.byweekno,a=r.byweekday,s=r.byeaster,o=r.bymonthday,u=r.bynmonthday,f=r.byyearday;return $(n)&&!L(n,e.mmask[t])||$(i)&&!e.wnomask[t]||$(a)&&!L(a,e.wdaymask[t])||$(e.nwdaymask)&&!e.nwdaymask[t]||s!==null&&!L(e.eastermask,t)||($(o)||$(u))&&!L(o,e.mdaymask[t])&&!L(u,e.nmdaymask[t])||$(f)&&(t<e.yearlen&&!L(f,t+1)&&!L(f,-e.yearlen+t)||t>=e.yearlen&&!L(f,t+1-e.yearlen)&&!L(f,-e.nextyearlen+t-e.yearlen))}function Qt(e,t){return new Dt(e,t.tzid).rezonedDate()}function tt(e){return e.getValue()}function or(e,t,r,n,i){for(var a=!1,s=t;s<r;s++){var o=e[s];a=ar(n,o,i),a&&(e[o]=null)}return a}function sr(e,t,r){var n=r.freq,i=r.byhour,a=r.byminute,s=r.bysecond;return Wt(n)?Ae(r):n>=b.HOURLY&&$(i)&&!L(i,t.hour)||n>=b.MINUTELY&&$(a)&&!L(a,t.minute)||n>=b.SECONDLY&&$(s)&&!L(s,t.second)?[]:e.gettimeset(n)(t.hour,t.minute,t.second,t.millisecond)}var Z={MO:new F(0),TU:new F(1),WE:new F(2),TH:new F(3),FR:new F(4),SA:new F(5),SU:new F(6)},Ht={freq:x.YEARLY,dtstart:null,interval:1,wkst:Z.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},ur=Object.keys(Ht),b=function(){function e(t,r){t===void 0&&(t={}),r===void 0&&(r=!1),this._cache=r?null:new He,this.origOptions=me(t);var n=_e(t).parsedOptions;this.options=n}return e.parseText=function(t,r){return ye(t,r)},e.fromText=function(t,r){return Ye(t,r)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(t){return pe(t,this.options)},e.prototype._cacheGet=function(t,r){return this._cache?this._cache._cacheGet(t,r):!1},e.prototype._cacheAdd=function(t,r,n){if(this._cache)return this._cache._cacheAdd(t,r,n)},e.prototype.all=function(t){if(t)return this._iter(new Zt("all",{},t));var r=this._cacheGet("all");return r===!1&&(r=this._iter(new ht("all",{})),this._cacheAdd("all",r)),r},e.prototype.between=function(t,r,n,i){if(n===void 0&&(n=!1),!pt(t)||!pt(r))throw new Error("Invalid date passed in to RRule.between");var a={before:r,after:t,inc:n};if(i)return this._iter(new Zt("between",a,i));var s=this._cacheGet("between",a);return s===!1&&(s=this._iter(new ht("between",a)),this._cacheAdd("between",s,a)),s},e.prototype.before=function(t,r){if(r===void 0&&(r=!1),!pt(t))throw new Error("Invalid date passed in to RRule.before");var n={dt:t,inc:r},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new ht("before",n)),this._cacheAdd("before",i,n)),i},e.prototype.after=function(t,r){if(r===void 0&&(r=!1),!pt(t))throw new Error("Invalid date passed in to RRule.after");var n={dt:t,inc:r},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new ht("after",n)),this._cacheAdd("after",i,n)),i},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return At(this.origOptions)},e.prototype.toText=function(t,r,n){return Le(this,t,r,n)},e.prototype.isFullyConvertibleToText=function(){return Ue(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],e.YEARLY=x.YEARLY,e.MONTHLY=x.MONTHLY,e.WEEKLY=x.WEEKLY,e.DAILY=x.DAILY,e.HOURLY=x.HOURLY,e.MINUTELY=x.MINUTELY,e.SECONDLY=x.SECONDLY,e.MO=Z.MO,e.TU=Z.TU,e.WE=Z.WE,e.TH=Z.TH,e.FR=Z.FR,e.SA=Z.SA,e.SU=Z.SU,e.parseString=_t,e.optionsToString=At,e}();function fr(e,t,r,n,i,a){var s={},o=e.accept;function u(h,d){r.forEach(function(w){w.between(h,d,!0).forEach(function(M){s[Number(M)]=!0})})}i.forEach(function(h){var d=new Dt(h,a).rezonedDate();s[Number(d)]=!0}),e.accept=function(h){var d=Number(h);return isNaN(d)?o.call(this,h):!s[d]&&(u(new Date(d-1),new Date(d+1)),!s[d])?(s[d]=!0,o.call(this,h)):!0},e.method==="between"&&(u(e.args.after,e.args.before),e.accept=function(h){var d=Number(h);return s[d]?!0:(s[d]=!0,o.call(this,h))});for(var f=0;f<n.length;f++){var l=new Dt(n[f],a).rezonedDate();if(!e.accept(new Date(l.getTime())))break}t.forEach(function(h){pe(e,h.options)});var m=e._result;switch(bt(m),e.method){case"all":case"between":return m;case"before":return m.length&&m[m.length-1]||null;case"after":default:return m.length&&m[0]||null}}var Vt={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function hr(e,t){var r=[],n=[],i=[],a=[],s=Mt(e),o=s.dtstart,u=s.tzid,f=mr(e,t.unfold);return f.forEach(function(l){var m;if(l){var h=yr(l),d=h.name,w=h.parms,M=h.value;switch(d.toUpperCase()){case"RRULE":if(w.length)throw new Error("unsupported RRULE parm: ".concat(w.join(",")));r.push(_t(l));break;case"RDATE":var D=(m=/RDATE(?:;TZID=([^:=]+))?/i.exec(l))!==null&&m!==void 0?m:[],U=D[1];U&&!u&&(u=U),n=n.concat(ee(M,w));break;case"EXRULE":if(w.length)throw new Error("unsupported EXRULE parm: ".concat(w.join(",")));i.push(_t(M));break;case"EXDATE":a=a.concat(ee(M,w));break;case"DTSTART":break;default:throw new Error("unsupported property: "+d)}}}),{dtstart:o,tzid:u,rrulevals:r,rdatevals:n,exrulevals:i,exdatevals:a}}function cr(e,t){var r=hr(e,t),n=r.rrulevals,i=r.rdatevals,a=r.exrulevals,s=r.exdatevals,o=r.dtstart,u=r.tzid,f=t.cache===!1;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||n.length>1||i.length||a.length||s.length){var l=new vr(f);return l.dtstart(o),l.tzid(u||void 0),n.forEach(function(h){l.rrule(new b(Ot(h,o,u),f))}),i.forEach(function(h){l.rdate(h)}),a.forEach(function(h){l.exrule(new b(Ot(h,o,u),f))}),s.forEach(function(h){l.exdate(h)}),t.compatible&&t.dtstart&&l.rdate(o),l}var m=n[0]||{};return new b(Ot(m,m.dtstart||t.dtstart||o,m.tzid||t.tzid||u),f)}function te(e,t){return t===void 0&&(t={}),cr(e,lr(t))}function Ot(e,t,r){return K(K({},e),{dtstart:t,tzid:r})}function lr(e){var t=[],r=Object.keys(e),n=Object.keys(Vt);if(r.forEach(function(i){L(n,i)||t.push(i)}),t.length)throw new Error("Invalid options: "+t.join(", "));return K(K({},Vt),e)}function dr(e){if(e.indexOf(":")===-1)return{name:"RRULE",value:e};var t=ge(e,":",1),r=t[0],n=t[1];return{name:r,value:n}}function yr(e){var t=dr(e),r=t.name,n=t.value,i=r.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function mr(e,t){if(t===void 0&&(t=!1),e=e&&e.trim(),!e)throw new Error("Invalid empty string");if(!t)return e.split(/\s/);for(var r=e.split(`
4
4
  `),n=0;n<r.length;){var i=r[n]=r[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(r[n-1]+=i.slice(1),r.splice(n,1)):n+=1:r.splice(n,1)}return r}function pr(e){e.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function ee(e,t){return pr(t),e.split(",").map(function(r){return Ct(r)})}function re(e){var t=this;return function(r){if(r!==void 0&&(t["_".concat(e)]=r),t["_".concat(e)]!==void 0)return t["_".concat(e)];for(var n=0;n<t._rrule.length;n++){var i=t._rrule[n].origOptions[e];if(i)return i}}}var vr=function(e){Rt(t,e);function t(r){r===void 0&&(r=!1);var n=e.call(this,{},r)||this;return n.dtstart=re.apply(n,["dtstart"]),n.tzid=re.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return t.prototype._iter=function(r){return fr(r,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(r){ne(r,this._rrule)},t.prototype.exrule=function(r){ne(r,this._exrule)},t.prototype.rdate=function(r){ie(r,this._rdate)},t.prototype.exdate=function(r){ie(r,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(r){return te(r.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(r){return te(r.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(r){return new Date(r.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(r){return new Date(r.getTime())})},t.prototype.valueOf=function(){var r=[];return!this._rrule.length&&this._dtstart&&(r=r.concat(At({dtstart:this._dtstart}))),this._rrule.forEach(function(n){r=r.concat(n.toString().split(`
5
5
  `))}),this._exrule.forEach(function(n){r=r.concat(n.toString().split(`
6
6
  `).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&r.push(ae("RDATE",this._rdate,this.tzid())),this._exdate.length&&r.push(ae("EXDATE",this._exdate,this.tzid())),r},t.prototype.toString=function(){return this.valueOf().join(`
7
- `)},t.prototype.clone=function(){var r=new t(!!this._cache);return this._rrule.forEach(function(n){return r.rrule(n.clone())}),this._exrule.forEach(function(n){return r.exrule(n.clone())}),this._rdate.forEach(function(n){return r.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return r.exdate(new Date(n.getTime()))}),r},t}(b);function ne(e,t){if(!(e instanceof b))throw new TypeError(String(e)+" is not RRule instance");L(t.map(String),String(e))||t.push(e)}function ie(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");L(t.map(Number),Number(e))||(t.push(e),bt(t))}function ae(e,t,r){var n=!r||r.toUpperCase()==="UTC",i=n?"".concat(e,":"):"".concat(e,";TZID=").concat(r,":"),a=t.map(function(s){return $t(s.valueOf(),n)}).join(",");return"".concat(i).concat(a)}function br(...e){window&&window.localStorage&&window.localStorage.getItem("debug")&&console.debug(...e)}function wr(...e){console.error(...e)}function gr(){return Math.random().toString(36).substr(2,9)}function Tr(e){return e.toString().replace(/^on/,"")}function kr(e){const t=new Date(e*1e3),r=new Date,n=new Date(r.getFullYear(),r.getMonth(),r.getDate());return t>=n?new Intl.DateTimeFormat("default",{hour:"numeric",minute:"numeric",hour12:!0}).format(t):new Intl.DateTimeFormat("default",{month:"short",day:"numeric"}).format(t)}function Er(e){return e.name?`${e.name} - ${e.email}`:e.email}function Mr(e,t="",r=1,n=3){const i=e.find(u=>{var f;return((f=u.email)==null?void 0:f.toLowerCase())===t.toLowerCase()}),a=e.filter(u=>{var f;return((f=u.email)==null?void 0:f.toLowerCase())!==t.toLowerCase()}),s=a.length,o=a.slice(0,n).map(u=>u.name||u.email).join(", ");return s===0?i?"me":"":s===1?i&&r>1?`me, ${o}`:o:s===2?i?`me, ${o}`:`${o}`:i?`me, ${o}, +${s-n}`:`${o}, +${s-n}`}const oe=[{amount:60,name:"seconds"},{amount:60,name:"minutes"},{amount:24,name:"hours"},{amount:7,name:"days"},{amount:4.34524,name:"weeks"},{amount:12,name:"months"},{amount:Number.POSITIVE_INFINITY,name:"years"}],Dr=e=>{const t=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),r=new Date;let n=(e.getTime()-r.getTime())/1e3;for(let i=0;i<=oe.length;i++){const a=oe[i];if(Math.abs(n)<a.amount)return t.format(Math.round(n),a.name);n/=a.amount}};function Sr(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function xr(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Or(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Yr(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function Lr(e){return e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase())}function Ur(e){return e.replace("CATEGORY_","").replace(/_/g," ")}function ve(e){return/<[^>]*>/g.test(e)?"html":"plain"}function _r(e){var i,a;const t=e.headers,r=t&&((i=t.find(s=>s.name==="Content-Type"))==null?void 0:i.value)||"",n=t&&((a=t.find(s=>s.name==="Content-Disposition"))==null?void 0:a.value)||"";return!!(r.includes("text/html")||n.includes("inline")||e.body&&ve(e.body)==="html")}function Ir(e){let n=e.split(`
8
- `).filter(a=>a.trim().length>0).map(a=>`<p>${a}</p>`).join("");const i=/((?:https?|ftp):\/\/[^\s]+)/g;return n=n.replace(i,'<a href="$1">$1</a>'),n}function Ar(e){return new DOMParser().parseFromString(e,"text/html").body.textContent||""}function Nr(e){return`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}function $r(){return Intl.DateTimeFormat().resolvedOptions().timeZone}const Cr=e=>e===""?!0:/^(0[0-9]|1[0-2]|^[0-9])(:[0-5][0-9][ap]m?|:[0-5][0-9]|:[0-5]|:)?$/i.test(e),Rr=e=>/^(0[1-9]|1[0-2]):([0-5][0-9])(am|pm)$/i.test(e);function Hr(e=null){let t=Nt();e&&(t=e);const r=t.minute()%15;let n;return r!==0?n=t.add(15-r,"minute"):n=t,n}function Wr(e){const t=Nt();let r="";const[n,i]=e.split(":");n.length===1?r+="0"+n:n.length===2&&(r+=n),r+=":",i===void 0||i==""?r+="00":i.length===1?r+=i+"0":r+=i;const a=r.slice(-1);return a==="a"&&(r+="m"),a==="p"&&(r+="m"),r.slice(-1)!=="m"&&(r.split(":")[0]=="00"?r+="am":r+=t.format("a")),r}function Fr(e){const[t,r]=e.split(":").map(o=>parseInt(o,10));let n=t;const i=n>=12?"pm":"am";n=n%12,n=n||12;const a=n.toString().padStart(2,"0"),s=r.toString().padStart(2,"0");return`${a}:${s}${i}`}function Pr(e){const[t,r]=e.split(/(am|pm)/i),[n,i]=t.split(":").map(s=>parseInt(s,10));let a=n;return r.toLowerCase()==="pm"&&a<12?a+=12:r.toLowerCase()==="am"&&a===12&&(a=0),`${a.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}function jr(e){const[t,r]=e.match(/(\d+):(\d+)(am|pm)/).slice(1);let n=parseInt(t,10)*60+parseInt(r,10);return e.includes("pm")&&parseInt(t,10)<12&&(n+=12*60),e.includes("am")&&parseInt(t,10)===12&&(n-=12*60),n}function zr(e){const t=Math.floor(e/60),r=e%60;return`${t}:${r<10?"0":""}${r}`}exports.autocompleteTimeFormat=Wr;exports.convertTo12HourFormat=Fr;exports.convertTo24HourFormat=Pr;exports.dayjs=Nt;exports.debug=br;exports.detectHTMLOrPlainText=ve;exports.detectIfMessageIsHTML=_r;exports.error=wr;exports.formatDateTime=kr;exports.formatEventName=Tr;exports.formatFolderName=Ur;exports.formatParticipants=Mr;exports.formatRecipient=Er;exports.formatTimeAgo=Dr;exports.get24HourTime=Nr;exports.getFirstDayOfMonth=xr;exports.getLastDayOfMonth=Sr;exports.getUserTimezone=$r;exports.htmlToPlainText=Ar;exports.isSameDay=Or;exports.isSameMonth=Yr;exports.minutesToTime=zr;exports.parsePlainTextToHTML=Ir;exports.roundToNearest15Minutes=Hr;exports.timeToMinutes=jr;exports.toTitleCase=Lr;exports.uniqueID=gr;exports.validateExactTimeFormat=Rr;exports.validateTimeFormatInput=Cr;
7
+ `)},t.prototype.clone=function(){var r=new t(!!this._cache);return this._rrule.forEach(function(n){return r.rrule(n.clone())}),this._exrule.forEach(function(n){return r.exrule(n.clone())}),this._rdate.forEach(function(n){return r.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return r.exdate(new Date(n.getTime()))}),r},t}(b);function ne(e,t){if(!(e instanceof b))throw new TypeError(String(e)+" is not RRule instance");L(t.map(String),String(e))||t.push(e)}function ie(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");L(t.map(Number),Number(e))||(t.push(e),bt(t))}function ae(e,t,r){var n=!r||r.toUpperCase()==="UTC",i=n?"".concat(e,":"):"".concat(e,";TZID=").concat(r,":"),a=t.map(function(s){return $t(s.valueOf(),n)}).join(",");return"".concat(i).concat(a)}function br(...e){window&&window.localStorage&&window.localStorage.getItem("debug")&&console.debug(...e)}function wr(...e){console.error(...e)}function gr(){return Math.random().toString(36).substr(2,9)}function Tr(e){return e.toString().replace(/^on/,"")}function kr(e){const t=new Date(e*1e3),r=new Date,n=new Date(r.getFullYear(),r.getMonth(),r.getDate());return t>=n?new Intl.DateTimeFormat("default",{hour:"numeric",minute:"numeric",hour12:!0}).format(t):new Intl.DateTimeFormat("default",{month:"short",day:"numeric"}).format(t)}function Er(e){return e.name?`${e.name} - ${e.email}`:e.email}function Mr(e,t="",r=1,n=3){const i=e.find(u=>{var f;return((f=u.email)==null?void 0:f.toLowerCase())===t.toLowerCase()}),a=e.filter(u=>{var f;return((f=u.email)==null?void 0:f.toLowerCase())!==t.toLowerCase()}),s=a.length,o=a.slice(0,n).map(u=>u.name||u.email).join(", ");return s===0?i?"me":"":s===1?i&&r>1?`me, ${o}`:o:s===2?i?`me, ${o}`:`${o}`:i?`me, ${o}, +${s-n}`:`${o}, +${s-n}`}const oe=[{amount:60,name:"seconds"},{amount:60,name:"minutes"},{amount:24,name:"hours"},{amount:7,name:"days"},{amount:4.34524,name:"weeks"},{amount:12,name:"months"},{amount:Number.POSITIVE_INFINITY,name:"years"}],Dr=e=>{const t=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),r=new Date;let n=(e.getTime()-r.getTime())/1e3;for(let i=0;i<=oe.length;i++){const a=oe[i];if(Math.abs(n)<a.amount)return t.format(Math.round(n),a.name);n/=a.amount}};function Sr(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function xr(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Or(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Yr(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function Lr(e){return e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase())}function Ur(e){return e.replace("CATEGORY_","").replace(/_/g," ")}function ve(e){return/<[^>]*>/g.test(e)?"html":"plain"}function Ir(e){var i,a;const t=e.headers,r=t&&((i=t.find(s=>s.name==="Content-Type"))==null?void 0:i.value)||"",n=t&&((a=t.find(s=>s.name==="Content-Disposition"))==null?void 0:a.value)||"";return!!(r.includes("text/html")||n.includes("inline")||e.body&&ve(e.body)==="html")}function _r(e){let n=e.split(`
8
+ `).filter(a=>a.trim().length>0).map(a=>`<p>${a}</p>`).join("");const i=/((?:https?|ftp):\/\/[^\s]+)/g;return n=n.replace(i,'<a href="$1">$1</a>'),n}function Ar(e){return new DOMParser().parseFromString(e,"text/html").body.textContent||""}const Nr=e=>e===""?!0:/^(0[0-9]|1[0-2]|^[0-9])(:[0-5][0-9][ap]m?|:[0-5][0-9]|:[0-5]|:)?$/i.test(e),$r=e=>/^(0[1-9]|1[0-2]):([0-5][0-9])(am|pm)$/i.test(e);function Cr(e=null){let t=Nt();e&&(t=e);const r=t.minute()%15;let n;return r!==0?n=t.add(15-r,"minute"):n=t,n}function Rr(e){const t=Nt();let r="";const[n,i]=e.split(":");n.length===1?r+="0"+n:n.length===2&&(r+=n),r+=":",i===void 0||i==""?r+="00":i.length===1?r+=i+"0":r+=i;const a=r.slice(-1);return a==="a"&&(r+="m"),a==="p"&&(r+="m"),r.slice(-1)!=="m"&&(r.split(":")[0]=="00"?r+="am":r+=t.format("a")),r}function Wr(e){const[t,r]=e.split(":").map(o=>parseInt(o,10));let n=t;const i=n>=12?"pm":"am";n=n%12,n=n||12;const a=n.toString().padStart(2,"0"),s=r.toString().padStart(2,"0");return`${a}:${s}${i}`}function Hr(e){const[t,r]=e.split(/(am|pm)/i),[n,i]=t.split(":").map(s=>parseInt(s,10));let a=n;return r.toLowerCase()==="pm"&&a<12?a+=12:r.toLowerCase()==="am"&&a===12&&(a=0),`${a.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}function Fr(e){const[t,r]=e.match(/(\d+):(\d+)(am|pm)/).slice(1);let n=parseInt(t,10)*60+parseInt(r,10);return e.includes("pm")&&parseInt(t,10)<12&&(n+=12*60),e.includes("am")&&parseInt(t,10)===12&&(n-=12*60),n}function Pr(e){const t=Math.floor(e/60),r=e%60;return`${t}:${r<10?"0":""}${r}`}function jr(){const e=navigator.userAgent,t=/Chrome/.test(e)&&/Google Inc/.test(navigator.vendor),r=/Safari/.test(e)&&/Apple Computer/.test(navigator.vendor),n=/Firefox/.test(e),i=/Trident/.test(e),a=/Edge/.test(e);return t&&/Edg/.test(e)?"Edge (Chromium)":t?"Chrome":r?"Safari":n?"Firefox":i?"Internet Explorer":a?"Edge (Legacy)":"Unknown"}exports.autocompleteTimeFormat=Rr;exports.convertTo12HourFormat=Wr;exports.convertTo24HourFormat=Hr;exports.dayjs=Nt;exports.debug=br;exports.detectHTMLOrPlainText=ve;exports.detectIfMessageIsHTML=Ir;exports.error=wr;exports.formatDateTime=kr;exports.formatEventName=Tr;exports.formatFolderName=Ur;exports.formatParticipants=Mr;exports.formatRecipient=Er;exports.formatTimeAgo=Dr;exports.getBrowser=jr;exports.getFirstDayOfMonth=xr;exports.getLastDayOfMonth=Sr;exports.htmlToPlainText=Ar;exports.isSameDay=Or;exports.isSameMonth=Yr;exports.minutesToTime=Pr;exports.parsePlainTextToHTML=_r;exports.roundToNearest15Minutes=Cr;exports.timeToMinutes=Fr;exports.toTitleCase=Lr;exports.uniqueID=gr;exports.validateExactTimeFormat=$r;exports.validateTimeFormatInput=Nr;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-cee193d2.cjs");require("react");require("react-dom");const r=".sc-warning-icon-h{display:flex}",i=r,n=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"4ecc01f0f2e9342fc00493720c51fea65e85fc17",width:"21",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"432ca7415d9e54797b602b44293e5bc3774801a4",d:"M10.149 7.054a.5.5 0 0 1 .5.5v4a.5.5 0 1 1-1 0v-4a.5.5 0 0 1 .5-.5Zm0 7.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM8.834 2.906a1.5 1.5 0 0 1 2.63 0l6.558 11.925a1.5 1.5 0 0 1-1.314 2.223H3.59a1.5 1.5 0 0 1-1.314-2.223L8.834 2.906Zm1.753.482a.5.5 0 0 0-.876 0L3.15 15.313a.5.5 0 0 0 .439.741h13.117a.5.5 0 0 0 .439-.741l-6.56-11.925Z",fill:"currentColor"}))}};n.style=i;exports.warning_icon=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-457dcf0b.cjs");require("react");require("react-dom");const a=".sc-warning-icon-h{display:flex}",r=a,n=class{constructor(t){e.registerInstance(this,t),this.width="16",this.height="16"}render(){return e.h("svg",{key:"669d0fd1f29767fbb6045a3520e6364d6c614da6",width:"21",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"7eb9ee6c7caac7afea81ccf99f61b68126099a3c",d:"M10.149 7.054a.5.5 0 0 1 .5.5v4a.5.5 0 1 1-1 0v-4a.5.5 0 0 1 .5-.5Zm0 7.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM8.834 2.906a1.5 1.5 0 0 1 2.63 0l6.558 11.925a1.5 1.5 0 0 1-1.314 2.223H3.59a1.5 1.5 0 0 1-1.314-2.223L8.834 2.906Zm1.753.482a.5.5 0 0 0-.876 0L3.15 15.313a.5.5 0 0 0 .439.741h13.117a.5.5 0 0 0 .439-.741l-6.56-11.925Z",fill:"currentColor"}))}};n.style=r;exports.warning_icon=n;
@@ -0,0 +1,15 @@
1
+ import { r as t, h as a } from "./index-ce40ad47.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const r = ".sc-warning-icon-h{display:flex}", c = r, e = class {
5
+ constructor(n) {
6
+ t(this, n), this.width = "16", this.height = "16";
7
+ }
8
+ render() {
9
+ return a("svg", { key: "669d0fd1f29767fbb6045a3520e6364d6c614da6", width: "21", height: "21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("path", { key: "7eb9ee6c7caac7afea81ccf99f61b68126099a3c", d: "M10.149 7.054a.5.5 0 0 1 .5.5v4a.5.5 0 1 1-1 0v-4a.5.5 0 0 1 .5-.5Zm0 7.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM8.834 2.906a1.5 1.5 0 0 1 2.63 0l6.558 11.925a1.5 1.5 0 0 1-1.314 2.223H3.59a1.5 1.5 0 0 1-1.314-2.223L8.834 2.906Zm1.753.482a.5.5 0 0 0-.876 0L3.15 15.313a.5.5 0 0 0 .439.741h13.117a.5.5 0 0 0 .439-.741l-6.56-11.925Z", fill: "currentColor" }));
10
+ }
11
+ };
12
+ e.style = c;
13
+ export {
14
+ e as warning_icon
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylas/react",
3
- "version": "1.0.2-canary.0",
3
+ "version": "1.0.2-canary.1",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,10 +20,10 @@
20
20
  "module": "dist/react.js",
21
21
  "types": "dist/index.d.ts",
22
22
  "dependencies": {
23
- "@nylas/web-elements": "1.0.2-prealpha1",
24
- "@nylas/core": "1.0.2-prealpha1",
25
23
  "react": "^18.2.0",
26
- "react-dom": "^18.2.0"
24
+ "react-dom": "^18.2.0",
25
+ "@nylas/web-elements": "^1.0.2-canary.1",
26
+ "@nylas/core": "^1.0.2-prealpha1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^20.8.10",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-cee193d2.cjs"),l=require("./utils-df5c1963-1c47e21c.cjs"),A=require("./register-component-486ea571-cdfe1ef9.cjs"),oe=require("./constants-d93cf397-e3587f5c.cjs"),Ce=require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");require("react");require("react-dom");const _e=".sc-add-circle-icon-h{display:flex}",Te=_e,de=class{constructor(e){a.registerInstance(this,e),this.width="24",this.height="25"}render(){return a.h("svg",{key:"6ab5f6ef57d754e88589edaca8ef42f074a4bd10",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.h("path",{key:"3454421e4ce131ef5de69738d05737dcbe884a60",d:"M12 2.5c5.523 0 10 4.477 10 10s-4.477 10-10 10-10-4.477-10-10 4.477-10 10-10ZM12 4a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm0 3.5a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 12 7.5Z",fill:"currentColor"}))}};de.style=Te;const Oe=".sc-calendar-info-icon-h{display:flex}",Ee=Oe,ce=class{constructor(e){a.registerInstance(this,e),this.width="20",this.height="20"}render(){return a.h("svg",{key:"01969629dbe43a1e860e200aa18b616924570e57",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.h("path",{key:"5b8279af2bdd3192a11be7738f79a4e5a638d397",d:"M12 0C13.3807 0 14.5 1.11929 14.5 2.5V6.59971C14.1832 6.43777 13.8486 6.30564 13.5 6.20703V4H1.5V11.5C1.5 12.3284 2.17157 13 3 13H6.70703C6.80564 13.3486 6.93777 13.6832 7.09971 14H3C1.61929 14 0.5 12.8807 0.5 11.5V2.5C0.5 1.11929 1.61929 0 3 0H12ZM12 1H3C2.17157 1 1.5 1.67157 1.5 2.5V3H13.5V2.5C13.5 1.67157 12.8284 1 12 1ZM11.375 9.5C11.375 9.15482 11.6548 8.875 12 8.875C12.3452 8.875 12.625 9.15482 12.625 9.5C12.625 9.84518 12.3452 10.125 12 10.125C11.6548 10.125 11.375 9.84518 11.375 9.5ZM12.5 13.5C12.5 13.7761 12.2761 14 12 14C11.7239 14 11.5 13.7761 11.5 13.5V11.5C11.5 11.2239 11.7239 11 12 11C12.2761 11 12.5 11.2239 12.5 11.5V13.5ZM7.5 11.5C7.5 9.01472 9.51472 7 12 7C14.4853 7 16.5 9.01472 16.5 11.5C16.5 13.9853 14.4853 16 12 16C9.51472 16 7.5 13.9853 7.5 11.5ZM8.5 11.5C8.5 13.433 10.067 15 12 15C13.933 15 15.5 13.433 15.5 11.5C15.5 9.567 13.933 8 12 8C10.067 8 8.5 9.567 8.5 11.5Z",fill:"currentColor"}))}};ce.style=Ee;const Ie=".sc-calendar-patterns-icon-h{display:flex}",Se=Ie,he=class{constructor(e){a.registerInstance(this,e),this.width="20",this.height="20"}render(){return a.h("svg",{key:"2eca4ca5315138e61f085e15e15f634f1ba49175",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.h("path",{key:"4ce6b497619836eeb66bd1bf857767c241486008",d:"M3.25 0H11.75C13.2688 0 14.5 1.23122 14.5 2.75V11.25C14.5 12.7688 13.2688 14 11.75 14H3.25C1.73122 14 0.5 12.7688 0.5 11.25V2.75C0.5 1.23122 1.73122 0 3.25 0ZM2 2.75V4H13V2.75C13 2.05964 12.4404 1.5 11.75 1.5H3.25C2.55964 1.5 2 2.05964 2 2.75ZM12.2071 5L8.20711 9H10.7929L13 6.79289V5H12.2071ZM10.7929 5H8.20711L4.20711 9H6.79289L10.7929 5ZM2.79289 9L6.79289 5H4.20711L2 7.20711V9H2.79289ZM2 5.79289L2.79289 5H2V5.79289ZM12.2071 9H13V8.20711L12.2071 9Z",fill:"currentColor"}))}};he.style=Se;const De=":host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropbtn{width:inherit;height:48px;color:black;padding:0.5rem;font-size:1rem;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:transparent}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem;background:var(--nylas-base-0)}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}",$e=De,pe=class{constructor(e){a.registerInstance(this,e),this.selectedOptionsChanged=a.createEvent(this,"selectedOptionsChanged",7),this.name=void 0,this.label=void 0,this.options=[],this.defaultSelectedOptions=void 0,this.availableOptions=this.options,this.isOpen=!1,this.ariaActivedescendant="",this.shouldFocusFirstOption=!1}componentDidRender(){l.debug("multi-select-dropdown","componentDidRender"),this.isOpen&&this.shouldFocusFirstOption&&(this.ariaActivedescendant=this.availableOptions[0].value,this.focusOption(0),this.shouldFocusFirstOption=!1)}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.isOpen&&(this.isOpen=!1)}selectOption(e){this.availableOptions=this.availableOptions.map(n=>(n.value===e.value&&(n.selected=!e.selected),n));const t=this.availableOptions.filter(n=>n.selected).map(n=>n.value);this.selectedOptionsChanged.emit({value:t,name:this.name})}toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen?this.shouldFocusFirstOption=!0:this.ariaActivedescendant=""}handleSelectButtonKeyDown(e){switch(e.key){case"ArrowDown":case"Enter":e.preventDefault(),this.isOpen||this.toggleDropdown();break;case"Escape":this.isOpen=!1;break}}handleListboxKeydown(e){const t=this.availableOptions,n=t.findIndex(i=>i.value===this.ariaActivedescendant);switch(e.key){case"ArrowDown":case"Tab":if(e.shiftKey){e.preventDefault();const r=n-1>=0?n-1:t.length-1;this.ariaActivedescendant=t[r].value,this.focusOption(r)}else{e.preventDefault();const r=n+1<t.length?n+1:0;this.ariaActivedescendant=t[r].value,this.focusOption(r)}break;case"ArrowUp":e.preventDefault();const i=n-1>=0?n-1:t.length-1;this.ariaActivedescendant=t[i].value,this.focusOption(i);break;case"Enter":e.preventDefault(),this.ariaActivedescendant&&this.selectOption(t[n]);break;case"Escape":this.isOpen=!1;break}}focusOption(e){var r;const t=this.availableOptions[e];if(!t)return;const n=t.value,i=(r=this.el.shadowRoot)==null?void 0:r.getElementById(n);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}getSelectedOptions(){return this.availableOptions.filter(e=>e.selected)}renderOption(e){return a.h("li",{key:e.value,id:e.value,role:"option",tabindex:"0","aria-selected":e.selected?"true":"false",onClick:t=>{t.stopImmediatePropagation(),this.selectOption(e)},class:{selected:!!e.selected}},a.h("label",{htmlFor:e.value},a.h("input",{"aria-hidden":"true",id:e.value,type:"checkbox",checked:e.selected}),a.h("span",null,e.label)))}render(){var e;return a.h(a.Host,{key:"8168c8bd2516ee37e44f446d6a4a1b09674a4612"},a.h("div",{key:"a6f0034b3b8fc25a91240230b389d7d01ef8dd9e",class:"dropdown"},a.h("label",{key:"b875970e5a7bcbe1d9e1459f1f608a355307d4a7",class:"dropdown-label"},this.label,a.h("slot",{key:"83db0e22386bd6f1e11083134e6f62228da4f8fd",name:"label-icon","aria-hidden":"true"})),a.h("button",{key:"5bb1558f59a34c67152f74d07b5053112dcb42b6",class:{dropbtn:!0,open:this.isOpen},onClick:()=>this.toggleDropdown(),"aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false","aria-label":this.name,onKeyDown:t=>this.handleSelectButtonKeyDown(t)},a.h("slot",{key:"45a248b288dd90b80b2ba2ca53ee593e7c44da83",name:"select-icon","aria-hidden":"true"}),a.h("span",{key:"14bbc08ed4c500cbba5ff3fb5ce28ad6027a2bc3",class:"selected-option"},this.getSelectedOptions().length>1?`Multiple ${this.name}s selected`:((e=this.availableOptions.filter(t=>t.selected)[0])==null?void 0:e.label)??this.availableOptions[0].label),a.h("span",{key:"a0d4c1ec9ef8b95bd47755a5498a9930838420aa",class:this.isOpen?"open":"closed","aria-hidden":"true"},a.h("chevron-icon",{key:"a9677b3b214dac36184fb8723e8001b80300faf2",width:"16",height:"16"}))),this.isOpen?null:a.h("div",{class:"selected-options"},this.getSelectedOptions().map(t=>a.h("span",{class:"selected-option"},t.label,a.h("button",{key:t.label,onClick:()=>this.selectOption(t)},a.h("close-icon",null))))),this.isOpen?a.h("div",{class:"dropdown-content"},a.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-multiselectable":!0,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:t=>this.handleListboxKeydown(t)},this.availableOptions.map(t=>this.renderOption(t)))):null))}get el(){return a.getElement(this)}};pe.style=$e;const Me=":host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem}.nylas-additional-participants__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;}.nylas-additional-participants__subtitle{color:var(--nylas-base-nylas-base-600-aaa, #3e4784);font-size:14px;font-style:normal;font-weight:400;line-height:20px;}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-additional-participants__block{display:flex;justify-content:space-between;gap:0.5rem}.nylas-additional-participants__input_group{padding-top:8px}.nylas-additional-participants__input_wrapper{display:flex;border-width:1;border-radius:8px;border:1px solid var(--Nylas-base-Nylas-base-300, #b3b8d8)}.nylas-additional-participants__input_wrapper button{padding:12px;border:none;background:none;cursor:pointer}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{background:var(--Nylas-base-Nylas-base-50, #f8f9fc)}.nylas-additional-participants__input{flex:1;padding:12px 16px;border-right:1px solid var(--Nylas-base-Nylas-base-300, #b3b8d8)}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__input_wrapper_invalid{border:1px solid var(--nylas-error, #cc4841);color:var(--Nylas-base-Nylas-base-400, #717bbc)}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}",Ae=Me;var He=function(e,t,n,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},K=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const ee=class{constructor(e){a.registerInstance(this,e),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.name="participants",this.eventParticipants=void 0,this.participants=this.eventParticipants??[],this.participantsValid=!0}elementNameChangedHandler(e){l.debug("nylas-additional-participants","elementNameChangedHandler",e),this.host.setAttribute("name",e)}connectedCallback(){l.debug("nylas-additional-participants","connectedCallback")}componentWillLoad(){l.debug("nylas-additional-participants","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){l.debug("nylas-additional-participants","componentDidLoad"),this.internals.setFormValue(JSON.stringify(this.participants),"participants")}disconnectedCallback(){l.debug("nylas-additional-participants","disconnectedCallback")}onParticipantChange(e,t){l.debug("nylas-additional-participants","onParticipantChange"),this.participants[t].email=e.target.value,this.internals.setFormValue(JSON.stringify(this.participants),"participants")}addParticipant(){l.debug("nylas-additional-participants","addParticipant"),this.participants=[...this.participants,{email:"",is_organizer:!1,availability:{calendar_ids:["primary"]}}],this.internals.setFormValue(JSON.stringify(this.participants),"participants")}removeParticipant(e){l.debug("nylas-additional-participants","addParticipant"),this.participants=this.participants.filter(t=>t.email!==e),this.internals.setFormValue(JSON.stringify(this.participants),"participants")}validate(e,t){l.debug("nylas-additional-participants","validate");const i=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase());this.participants[t].is_valid=i,this.internals.setFormValue(JSON.stringify(this.participants),"participants")}render(){return a.h(a.Host,{key:"a5d05ab5b72814f0cf75df738cd3e0a201edcfb2"},a.h("nylas-form-card",{key:"d43372c684b1da7b823692e09bb2bca99fdcb5b6"},a.h("h3",{key:"7adc0bd80f59d305aaf1d2e11bc24e6bf08222cc",slot:"header-title",class:"nylas-additional-participants__title"},"Additional participants"),a.h("p",{key:"fe9df16a37f967d9423a5deb0dfdedffccc6abdc",slot:"header-subtitle",class:"nylas-additional-participants__subtitle"},"Add anyone else who would be joining for this event."),a.h("div",{key:"057a46756bb908699684ac8af5cad756c79ebe46",slot:"content",class:"nylas-additional-participants__content"},a.h("div",{key:"e69357b5cfd99c17aaaf87e21ae54ed2f2ba2cfa"},this.participants.map((e,t)=>a.h("div",{class:"nblas-additional-participants__input_group"},a.h("label",null,e.is_organizer?"Organizer":`Participant ${t}`),a.h("div",{class:`nylas-additional-participants__input_wrapper ${e.is_organizer&&"nylas-additional-participants__input_wrapper_organizer"} ${e.is_valid===!1&&"nylas-additional-participants__input_wrapper_invalid"}`},a.h("div",{class:"nylas-additional-participants__input"},a.h("input",{type:"text",value:e.email,onInput:n=>{this.onParticipantChange(n,t)},readOnly:e.is_organizer,onBlur:()=>this.validate(e.email,t)})),!e.is_organizer&&a.h("button",{onClick:()=>this.removeParticipant(e.email)},a.h("close-icon",null)))))))))}static get formAssociated(){return!0}get host(){return a.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};He([A.RegisterComponent({name:"nylas-additional-participants",eventToProps:{},fireRegisterEvent:!0}),K("design:type",Function),K("design:paramtypes",[]),K("design:returntype",void 0)],ee.prototype,"render",null);ee.style=Ae;const Fe=":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;width:inherit}.nylas-availability-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-availability-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-availability-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900)}.nylas-availability-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600)}.nylas-availability-picker .content{padding:1rem;color:var(--nylas-base-900)}.nylas-availability-picker .content .select-timezone{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--nylas-base-200);padding-bottom:1rem}.nylas-availability-picker .content .select-timezone h4{display:flex;gap:0.5rem;align-items:center;margin:0;font-size:1rem;font-weight:500;line-height:20px}.nylas-availability-picker .content .select-timezone select-dropdown{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-availability-picker .content .availability{display:flex;flex-direction:column;gap:1rem;padding:0 0.5rem;margin:1rem 0}.nylas-availability-picker .content .availability .availability-day{display:grid;grid-template-columns:minmax(auto, 65px) 1fr minmax(auto, 40px);gap:1rem;align-items:baseline}@media screen and (max-width: 768px){.nylas-availability-picker .content .availability .availability-day{grid-template-columns:auto}}.nylas-availability-picker .content .availability .availability-day .day{display:flex;gap:0.5rem;align-items:center}.nylas-availability-picker .content .availability .availability-day .time-ranges span.unavailable{height:48px;display:flex;align-items:center}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range{display:flex;gap:1.5rem;justify-content:space-between;align-items:baseline}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers{display:flex;gap:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range .pickers span{margin-top:0.75rem}.nylas-availability-picker .content .availability .availability-day .time-ranges .time-range:not(:last-of-type){margin-bottom:1rem}.nylas-availability-picker .content .availability .availability-day .time-ranges p.error{color:var(--nylas-error)}.nylas-availability-picker .content .availability .availability-day button{border:none;background:transparent;height:40px;cursor:pointer;color:var(--nylas-base-800)}.nylas-availability-picker .content .availability .availability-day button:hover,.nylas-availability-picker .content .availability .availability-day button:active{color:var(--nylas-primary)}",Ne=Fe;var ze=function(e,t,n,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},B=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const te=class{constructor(e){a.registerInstance(this,e),this.selectedOpenHoursChanged=a.createEvent(this,"selectedOpenHoursChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.openHours=void 0,this.name="availability",this.schedule={SUN:[],MON:[{start:"09:00am",end:"05:00pm"}],TUE:[{start:"09:00am",end:"05:00pm"}],WED:[{start:"09:00am",end:"05:00pm"}],THU:[{start:"09:00am",end:"05:00pm"}],FRI:[{start:"09:00am",end:"05:00pm"}],SAT:[]},this.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.defaultTimezone=this.timezone,this.overlapDays={}}elementNameChangedHandler(e){l.debug("nylas-calendar-picker","elementNameChangedHandler",e),this.host.setAttribute("name",e)}scheduleChanged(e,t){var n;if(e!==t){this.selectedOpenHoursChanged.emit({value:this.scheduleToOpenHours(e,this.timezone),name:this.name});let i={};if(Object.keys(e).forEach(r=>{const s=e[r];if(s.length>0){const o=this.getOverlaps(s);o.length>0&&(i[r]=o)}}),this.overlapDays=i,Object.keys(i).length>0){const r=(n=this.host.shadowRoot)==null?void 0:n.getElementById(Object.keys(i)[0]);r&&this.internals.setValidity({customError:!0},"Overlapping time ranges found",r)}else this.internals.setValidity({customError:!1}),this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(e,this.timezone)))}}selectedOptionChangedHandler(e){const{name:t,value:n}=e.detail;t==="timezone"&&(this.timezone=n,this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(this.schedule,this.timezone))))}connectedCallback(){l.debug("nylas-availability-picker","connectedCallback")}disconnectedCallback(){l.debug("nylas-availability-picker","disconnectedCallback")}componentWillLoad(){l.debug("nylas-availability-picker","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){l.debug("nylas-availability-picker","componentDidLoad"),this.openHours&&this.openHours.length>0&&this.updateSchedule(this.openHours),this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(this.schedule,this.timezone)))}getOverlaps(e){let t=e.map((i,r)=>({start:l.timeToMinutes(i.start),end:l.timeToMinutes(i.end),originalIndex:r}));t.sort((i,r)=>i.start-r.start);let n=[];for(let i=1;i<t.length;i++)t[i].start<t[i-1].end&&(n.includes(t[i].originalIndex)||n.push(t[i].originalIndex),n.includes(t[i-1].originalIndex)||n.push(t[i-1].originalIndex));return n.sort((i,r)=>i-r)}addTimeRange(e){const t=this.schedule[e],n=0,i=1425;if(t.length===0)this.schedule[e]=[{start:"09:00am",end:"05:00pm"}];else{const r=t.map(o=>({start:l.timeToMinutes(o.start),end:l.timeToMinutes(o.end)})).sort((o,d)=>o.start-d.start),s=r[r.length-1].end;if(s+60<=i)this.schedule[e].push({start:l.convertTo12HourFormat(l.minutesToTime(s)),end:l.convertTo12HourFormat(l.minutesToTime(s+60))});else{let o=!1;if(r[0].start>n+60&&(this.schedule[e].push({start:l.convertTo12HourFormat(l.minutesToTime(n)),end:l.convertTo12HourFormat(l.minutesToTime(n+60))}),o=!0),!o)for(let d=0;d<r.length-1;d++){const m=r[d].end;if(r[d+1].start-m>=60){this.schedule[e].push({start:l.convertTo12HourFormat(l.minutesToTime(m)),end:l.convertTo12HourFormat(l.minutesToTime(m+60))});break}}}}this.schedule[e].sort((r,s)=>l.timeToMinutes(r.start)-l.timeToMinutes(s.start)),this.schedule={...this.schedule}}removeTimeRange(e,t){this.schedule[e].splice(t,1),this.schedule={...this.schedule}}setTime(e,t,n){const[i,r]=e.split("_"),[s,o]=i.split(":");r==="start"?this.schedule[s][o].start=n:r==="end"&&(this.schedule[s][o].end=n),this.internals.setValidity({customError:!1}),this.schedule={...this.schedule}}setFormError(e,t,n){var o;const[i,r]=e.split("_"),s=(o=this.host.shadowRoot)==null?void 0:o.getElementById(e);s&&this.internals.setValidity({customError:!0},`Invalid ${r} time`,s)}updateSchedule(e){const t={SUN:[],MON:[],TUE:[],WED:[],THU:[],FRI:[],SAT:[]};e.forEach(n=>{n.days.forEach(i=>{const r=this.getDayKey(i),s=l.convertTo12HourFormat(n.start),o=l.convertTo12HourFormat(n.end),d={start:s,end:o};let m=!1;t[r]&&(m=t[r].some(p=>p.start===d.start&&p.end===d.end)),m||(t[r]?t[r].push(d):t[r]=[d])})}),e.length===0&&(this.timezone=e[0].timezone),this.defaultTimezone=e[0].timezone,this.timezone=e[0].timezone,this.schedule=t}getDayKey(e){return["SUN","MON","TUE","WED","THU","FRI","SAT"][e]}scheduleToOpenHours(e,t="UTC"){const n=["SUN","MON","TUE","WED","THU","FRI","SAT"];let i=new Map;n.forEach((s,o)=>{e[s]&&e[s].forEach(d=>{const m=l.convertTo24HourFormat(d.start),p=l.convertTo24HourFormat(d.end),v=`${m}-${p}`;if(!i.has(v))i.set(v,{days:[o],start:m,end:p});else{let f=i.get(v);f&&(f.days.push(o),i.set(v,f))}})});let r=[];return i.forEach((s,o)=>{r.push({days:s.days,start:s.start,end:s.end,timezone:t})}),r}render(){const e=Object.keys(oe.TIMEZONE_MAP).map(n=>({label:oe.TIMEZONE_MAP[n],value:n})),t=e.find(n=>n.value===this.defaultTimezone);return a.h(a.Host,{key:"87e05dca330a4e1c97886a0860ed6a8d3e4e6157"},a.h("div",{key:"8db4597b9676e9c9ea0f289781fed798ecc59a1d",class:"nylas-availability-picker"},a.h("div",{key:"8f797bdd2e4c9ecdcbbb1c07414d7a8ed6cff83c",class:"header",part:"ncp__header"},a.h("h3",{key:"676aef337f7a16b1546e3c9767c1ef2cc0439627"},"General availability"),a.h("p",{key:"6cd6625935e4a159c50c40214e374ffeb4ee8007"},"Set your availability for scheduling meetings.")),a.h("div",{key:"7f0d04ecf59411c951c7794981c160a9346859bc",class:"content"},a.h("div",{key:"51bf7684a9bba1bc2c2344c243156f54f278c087",class:"select-timezone"},a.h("h4",{key:"67e5491c4793623f76759e1935214a0793359b59",class:"sub-header"},"Select timezone",a.h("span",{key:"ad75d494f59fc45d4088af710b62862fabf8bac9",class:"icon"},a.h("info-icon",{key:"a75dc274e1067e3be3537a0912072e950deb49dc"}))),a.h("select-dropdown",{key:"3e5f45ee1f06d45f7da02ba01cdc248b5fd56742",name:"timezone",options:e,defaultSelectedOption:t},a.h("span",{key:"8cfcaf9954132a734794d0a2723eaf71eafa3412",slot:"select-icon"},a.h("globe-icon",{key:"7ffa5b0de8b4061269a1257447c9cf8d1e2d7d4a",width:"20",height:"20"})))),a.h("div",{key:"a53a34383d56e1ab24323341856fd2fce0d62d93",class:"availability"},Object.keys(this.schedule).map(n=>{const i=n,r=this.schedule[n];return a.h("div",{class:"availability-day"},a.h("div",{class:"day",part:"ndp__day"},a.h("input",{type:"checkbox",name:i,id:i,checked:r.length>0,onClick:()=>{r.length>0?this.schedule[i]=[]:this.schedule[i]=[{start:"09:00am",end:"05:00pm"}],this.schedule={...this.schedule}}}),a.h("label",{htmlFor:i,"aria-label":"Select day"},i)),a.h("div",{class:"time-ranges"},r.length?null:a.h("span",{class:"unavailable"},"Unavailable"),r.length>0&&r.map((s,o)=>{var p,v;const d=`${n}:${o}_start`,m=`${n}:${o}_end`;return a.h("div",{class:"time-range"},a.h("div",{class:"pickers"},a.h("nylas-time-window-picker",{id:d,hasError:(p=this.overlapDays[i])==null?void 0:p.includes(o),time:s.start,name:d,key:d,setTime:(f,x)=>this.setTime(d,f,x),setFormError:(f,x)=>this.setFormError(d,f,x)}),a.h("span",null," - "),a.h("nylas-time-window-picker",{id:m,hasError:(v=this.overlapDays[i])==null?void 0:v.includes(o),time:s.end,name:m,key:m,minimumStartTime:s.start,setTime:(f,x)=>this.setTime(m,f,x),setFormError:(f,x)=>this.setFormError(m,f,x)})),a.h("button",{onClick:()=>this.removeTimeRange(i,o)},a.h("close-icon",null)))}),a.h("p",{class:"error"},this.overlapDays[i]?"Overlapping time ranges":"")),a.h("div",null,r.length>0?a.h("button",{onClick:()=>this.addTimeRange(i)},a.h("add-circle-icon",null)):null))})))))}static get formAssociated(){return!0}get host(){return a.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"],schedule:["scheduleChanged"]}}};ze([A.RegisterComponent({name:"nylas-availability-picker",fireRegisterEvent:!0}),B("design:type",Function),B("design:paramtypes",[]),B("design:returntype",void 0)],te.prototype,"render",null);te.style=Ne;const Le=":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;width:inherit}.nylas-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-calendar-picker .header h3{margin:0;font-size:1rem;font-weight:600;line-height:20px;color:var(--nylas-base-900)}.nylas-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600)}.nylas-calendar-picker .nylas-calendar-picker__loading{padding-bottom:1rem}.nylas-calendar-picker .nylas-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:black;font-size:1rem;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-calendar-picker .nylas-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-calendar-picker .nylas-calendar-picker__dropdown{padding:1rem}",Pe=Le;var Re=function(e,t,n,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},J=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const ae=class{constructor(e){a.registerInstance(this,e),this.selectedCalendarsChanged=a.createEvent(this,"selectedCalendarsChanged",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.calendars=void 0,this.organizerEmail=void 0,this.name="calendar",this.defaultSelectedCalendars=[],this.selectedCalendars=[]}connectedCallback(){l.debug("nylas-calendar-picker","connectedCallback")}disconnectedCallback(){l.debug("nylas-calendar-picker","disconnectedCallback")}componentWillLoad(){l.debug("nylas-calendar-picker","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){l.debug("nylas-calendar-picker","componentDidLoad"),typeof this.internals.setFormValue=="function"&&this.internals.setFormValue(this.defaultSelectedCalendars.toString(),"calendar")}componentWillUpdate(){l.debug("nylas-calendar-picker","componentWillUpdate")}componentDidUpdate(){l.debug("nylas-calendar-picker","componentDidUpdate")}componentWillRender(){l.debug("nylas-calendar-picker","componentWillRender")}componentDidRender(){l.debug("nylas-calendar-picker","componentDidRender")}elementNameChangedHandler(e){l.debug("nylas-calendar-picker","elementNameChangedHandler",e),this.host.setAttribute("name",e)}selectedOptionsChangedHandler(e){l.debug("nylas-calendar-picker","selectedOptionChangedHandler",e.detail);const t=n=>{const{value:i}=n.detail;this.selectedCalendars=[...i],this.internals.setFormValue(i.toString(),"calendar")};this.selectedCalendarsChanged.emit({...e.detail,selectedCalendarsChangedHandler:t})}render(){var n;const e=((n=this.calendars)==null?void 0:n.map(i=>{var r,s;return{value:i.id,label:i.name,selected:((r=this.defaultSelectedCalendars)==null?void 0:r.includes(i.id))||((s=this.defaultSelectedCalendars)==null?void 0:s.includes("primary"))&&i.id===this.organizerEmail}}))??[],t=this.defaultSelectedCalendars??[e[0].value];return a.h(a.Host,null,a.h("div",{class:"nylas-calendar-picker"},a.h("div",{class:"header",part:"ncp__header"},a.h("h3",null,"Calendar availability"),a.h("p",null,"Select calendars that you’d like to use for checking your availability.")),e.length>0?a.h("div",{class:"nylas-calendar-picker__dropdown"},a.h("multi-select-dropdown",{name:"calendar",label:"Only schedule meetings when I'm available on",options:e,defaultSelectedOptions:t},a.h("span",{slot:"label-icon"},a.h("tooltip-component",null,a.h("info-icon",{slot:"tooltip-icon"}),a.h("span",{slot:"tooltip-content"},"When selecting multiple calendars, the time slot must be open on all chosen calendars for it to be visible to an attendee on the Scheduling page."))))):a.h("div",{class:"nylas-calendar-picker__loading"},a.h("span",{class:"label"},"Select calendars that will be checked for availability ",a.h("info-icon",null)),a.h("div",{class:"loading-button"},a.h("span",null,"Loading...")))))}static get formAssociated(){return!0}get host(){return a.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};Re([A.RegisterComponent({name:"nylas-calendar-picker",eventToProps:{selectedCalendarsChanged:async(e,t)=>{const{selectedCalendarsChangedHandler:n}=e.detail;n&&n(e)}},fireRegisterEvent:!0}),J("design:type",Function),J("design:paramtypes",[]),J("design:returntype",void 0)],ae.prototype,"render",null);ae.style=Pe;const je=":host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem}.nylas-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description span{color:var(--nylas-base-nylas-base-800-aaa, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;border:1px solid var(--Nylas-base-Nylas-base-200, #b3b8d8)}.nylas-event-description textarea::-webkit-resizer{display:none}",Ve=je;var Ye=function(e,t,n,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},q=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const ne=class{constructor(e){a.registerInstance(this,e),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.eventDescription=void 0,this.description=this.eventDescription??"",this.name="description"}elementNameChangedHandler(e){l.debug("nylas-event-description","elementNameChangedHandler",e),this.host.setAttribute("name",e)}connectedCallback(){l.debug("nylas-event-description","connectedCallback")}componentWillLoad(){l.debug("nylas-event-description","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){l.debug("nylas-event-description","componentDidLoad")}disconnectedCallback(){l.debug("nylas-event-description","disconnectedCallback")}handleChange(e){this.description=e.target.value,this.internals.setFormValue(e.target.value,"description")}render(){return a.h(a.Host,{key:"9ce72affc0514ef34d4362566a73127001acbfcf"},a.h("div",{key:"0214ece174d57b5f1b48551d0bf311fd6314e66d",class:"nylas-event-description"},a.h("span",{key:"670039c8d29c953a25d3e7ff9fc8af1136688d39"},"Event description"),a.h("textarea",{key:"80775cb98f237b0415d3f06165ad322cf79d00ff",name:"description",value:this.description,onInput:e=>this.handleChange(e)})))}static get formAssociated(){return!0}get host(){return a.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};Ye([A.RegisterComponent({name:"nylas-event-description",eventToProps:{},fireRegisterEvent:!0}),q("design:type",Function),q("design:paramtypes",[]),q("design:returntype",void 0)],ne.prototype,"render",null);ne.style=Ve;const We=":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem}.nylas-event-duration{display:flex;flex-direction:column;gap:4px}.nylas-event-duration span{color:var(--nylas-base-nylas-base-800-aaa, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-duration span span{color:var(--nylas-error, #cc4841)}.nylas-event-duration__wrapper{display:flex;justify-content:space-between;align-items:center;gap:0.5rem}.nylas-event-duration__wrapper input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--Nylas-base-Nylas-base-200, #b3b8d8)}",Ze=We;var Ue=function(e,t,n,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},X=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const ie=class{constructor(e){a.registerInstance(this,e),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.name="duration",this.eventDurationMinutes=void 0,this.duration=this.eventDurationMinutes?this.eventDurationMinutes>=60?this.eventDurationMinutes/60:this.eventDurationMinutes:10,this.durationMinutes=this.eventDurationMinutes??10,this.durationIncrement=this.eventDurationMinutes&&this.eventDurationMinutes>=60?60:1}elementNameChangedHandler(e){l.debug("nylas-event-duration","elementNameChangedHandler",e),this.host.setAttribute("name",e)}connectedCallback(){l.debug("nylas-event-duration","connectedCallback")}componentWillLoad(){l.debug("nylas-event-duration","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){l.debug("nylas-event-duration","componentDidLoad"),this.internals.setFormValue(this.durationMinutes.toString(),"duration")}disconnectedCallback(){l.debug("nylas-event-duration","disconnectedCallback")}handleChange(e){this.duration=e.target.value,this.durationMinutes=this.duration*this.durationIncrement,this.internals.setFormValue(this.durationMinutes.toString(),"duration")}handleBlur(){console.log("on blur duration"+this.duration,this.duration,this.durationIncrement),(this.duration===null||this.duration===void 0)&&this.durationIncrement===1&&(this.duration=10),(this.duration<=0||this.duration===null||this.duration===void 0)&&this.durationIncrement===60&&(this.duration=1),this.duration<10&&this.durationIncrement===1&&(this.duration=10),this.duration>720&&this.durationIncrement===1&&(this.duration=720),this.duration>12&&this.durationIncrement===60&&(this.duration=12),this.durationMinutes=this.duration*this.durationIncrement,this.internals.setFormValue(this.durationMinutes.toString(),"duration")}selectedOptionChangedHandler(e){l.debug("nylas-calendar-picker","selectedOptionChangedHandler",e.detail);const{value:t}=e.detail;this.durationIncrement=parseInt(t),this.durationIncrement===1?this.duration=10:this.duration=1,this.durationMinutes=this.duration*this.durationIncrement,this.internals.setFormValue(this.durationMinutes.toString(),"duration")}render(){const e=[{value:1,label:"minutes"},{value:60,label:"hours"}];return a.h(a.Host,{key:"865d546fd5a00a80491c87ede2da950fdeebae63"},a.h("div",{key:"04ed91e87c31cf1332003173ff0bcc43a8d44e0b",class:"nylas-event-duration"},a.h("span",{key:"c80ec90827aa06635fe22dc9109f905571fc9668"},"Event duration",a.h("span",{key:"9f6a16d40771a5dffefb2a2dbe74f4f525e9d102"},"*")),a.h("div",{key:"5c0f475c25dab78696a1163bb5db452013cbac21",class:"nylas-event-duration__wrapper"},a.h("input",{key:"695a40294e996cba76c2cb300906a24e73e99497",type:"number",name:"duration",value:this.duration,onBlur:()=>this.handleBlur(),onInput:t=>this.handleChange(t)}),a.h("select-dropdown",{key:"ac2948b82048c9f81bc391c4743bf3148622b054",name:"event-duration",options:e,defaultSelectedOption:e.find(t=>t.value==this.durationIncrement)??e[0],withSearch:!1}))))}static get formAssociated(){return!0}get host(){return a.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};Ue([A.RegisterComponent({name:"nylas-event-duration",eventToProps:{},fireRegisterEvent:!0}),X("design:type",Function),X("design:paramtypes",[]),X("design:returntype",void 0)],ie.prototype,"render",null);ie.style=Ze;const Ke=":host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem}.nylas-event-info__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;}.nylas-event-info__subtitle{color:var(--nylas-base-nylas-base-600-aaa, #3e4784);font-size:14px;font-style:normal;font-weight:400;line-height:20px;}.nylas-event-info__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-event-info__block{display:flex;justify-content:space-between;gap:0.5rem}",Be=Ke;var Je=function(e,t,n,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},G=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const se=class{constructor(e){a.registerInstance(this,e),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals)}connectedCallback(){l.debug("nylas-event-info","connectedCallback")}componentWillLoad(){l.debug("nylas-event-info","componentWillLoad")}componentDidLoad(){l.debug("nylas-event-info","componentDidLoad")}disconnectedCallback(){l.debug("nylas-event-info","disconnectedCallback")}render(){return a.h(a.Host,{key:"51b0b5ee1cb100d81b2e4bc362463e76cf622a7c"},a.h("nylas-form-card",{key:"622f7bd1342930fdd87e58e91c8dc85b8f42c4da"},a.h("h1",{key:"5180817bacbc4a250a818150015486cef6476dab",slot:"header-title",class:"nylas-event-info__title"},"Event information"),a.h("h3",{key:"a78155d0bbf65e30074923fce212ca1ba657eb02",slot:"header-subtitle",class:"nylas-event-info__subtitle"},"Enter all event information."),a.h("div",{key:"51e393b952e7e038f7a79bf0ceca6db94b9e199c",slot:"content",class:"nylas-event-info__content"},a.h("slot",{key:"119b963d96300abd7ed6f65bede1f5e5943a9eb6",name:"inputs"}))))}static get formAssociated(){return!0}};Je([A.RegisterComponent({name:"nylas-event-info",eventToProps:{},fireRegisterEvent:!0}),G("design:type",Function),G("design:paramtypes",[]),G("design:returntype",void 0)],se.prototype,"render",null);se.style=Be;const qe=":host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem}.nylas-event-title{display:flex;flex-direction:column;gap:4px}.nylas-event-title input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--Nylas-base-Nylas-base-200, #b3b8d8)}.nylas-event-title span{color:var(--nylas-base-nylas-base-800-aaa, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-title span span{color:var(--nylas-error, #cc4841)}",Xe=qe;var Ge=function(e,t,n,i){var r=arguments.length,s=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Q=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)};const re=class{constructor(e){a.registerInstance(this,e),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.eventTitle=void 0,this.title=this.eventTitle??"",this.name="availability"}elementNameChangedHandler(e){l.debug("nylas-event-title","elementNameChangedHandler",e),this.host.setAttribute("name",e)}connectedCallback(){l.debug("nylas-event-title","connectedCallback")}componentWillLoad(){l.debug("nylas-event-title","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){l.debug("nylas-event-title","componentDidLoad")}disconnectedCallback(){l.debug("nylas-event-title","disconnectedCallback")}handleChange(e){this.title=e.target.value,this.internals.setFormValue(e.target.value,"title")}render(){return a.h(a.Host,{key:"09c9b2bae4a00656fe226ecf51d3800381cd52da"},a.h("div",{key:"3ffbc5f35edf88831014b18ed4fc719953b344ab",class:"nylas-event-title"},a.h("span",{key:"6fd19b8268c7d5d2a048357bdc03eee1a84ef42c"},"Event title",a.h("span",{key:"5ecccdc80f6ecf1fb7cdcacbbc789c9cc0e61f2a"},"*")),a.h("input",{key:"ec68df2d717858da7562388db96f8c0413afe22c",type:"text",name:"title",value:this.title,onInput:e=>this.handleChange(e)})))}static get formAssociated(){return!0}get host(){return a.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};Ge([A.RegisterComponent({name:"nylas-event-title",eventToProps:{},fireRegisterEvent:!0}),Q("design:type",Function),Q("design:paramtypes",[]),Q("design:returntype",void 0)],re.prototype,"render",null);re.style=Xe;var ue={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(Ce.commonjsGlobal,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,s=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,d={},m=function(c){return(c=+c)+(c>68?1900:2e3)},p=function(c){return function(h){this[c]=+h}},v=[/[+-]\d\d:?(\d\d)?|Z/,function(c){(this.zone||(this.zone={})).offset=function(h){if(!h||h==="Z")return 0;var u=h.match(/([+-]|\d\d)/g),b=60*u[1]+(+u[2]||0);return b===0?0:u[0]==="+"?-b:b}(c)}],f=function(c){var h=d[c];return h&&(h.indexOf?h:h.s.concat(h.f))},x=function(c,h){var u,b=d.meridiem;if(b){for(var w=1;w<=24;w+=1)if(c.indexOf(b(w,0,h))>-1){u=w>12;break}}else u=c===(h?"pm":"PM");return u},fe={A:[o,function(c){this.afternoon=x(c,!1)}],a:[o,function(c){this.afternoon=x(c,!0)}],S:[/\d/,function(c){this.milliseconds=100*+c}],SS:[r,function(c){this.milliseconds=10*+c}],SSS:[/\d{3}/,function(c){this.milliseconds=+c}],s:[s,p("seconds")],ss:[s,p("seconds")],m:[s,p("minutes")],mm:[s,p("minutes")],H:[s,p("hours")],h:[s,p("hours")],HH:[s,p("hours")],hh:[s,p("hours")],D:[s,p("day")],DD:[r,p("day")],Do:[o,function(c){var h=d.ordinal,u=c.match(/\d+/);if(this.day=u[0],h)for(var b=1;b<=31;b+=1)h(b).replace(/\[|\]/g,"")===c&&(this.day=b)}],M:[s,p("month")],MM:[r,p("month")],MMM:[o,function(c){var h=f("months"),u=(f("monthsShort")||h.map(function(b){return b.slice(0,3)})).indexOf(c)+1;if(u<1)throw new Error;this.month=u%12||u}],MMMM:[o,function(c){var h=f("months").indexOf(c)+1;if(h<1)throw new Error;this.month=h%12||h}],Y:[/[+-]?\d+/,p("year")],YY:[r,function(c){this.year=m(c)}],YYYY:[/\d{4}/,p("year")],Z:v,ZZ:v};function ye(c){var h,u;h=c,u=d&&d.formats;for(var b=(c=h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(D,O,k){var y=k&&k.toUpperCase();return O||u[k]||n[k]||u[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(E,I,$){return I||$.slice(1)})})).match(i),w=b.length,C=0;C<w;C+=1){var N=b[C],S=fe[N],_=S&&S[0],T=S&&S[1];b[C]=T?{regex:_,parser:T}:N.replace(/^\[|\]$/g,"")}return function(D){for(var O={},k=0,y=0;k<w;k+=1){var E=b[k];if(typeof E=="string")y+=E.length;else{var I=E.regex,$=E.parser,z=D.slice(y),H=I.exec(z)[0];$.call(O,H),D=D.replace(H,"")}}return function(M){var g=M.afternoon;if(g!==void 0){var F=M.hours;g?F<12&&(M.hours+=12):F===12&&(M.hours=0),delete M.afternoon}}(O),O}}return function(c,h,u){u.p.customParseFormat=!0,c&&c.parseTwoDigitYear&&(m=c.parseTwoDigitYear);var b=h.prototype,w=b.parse;b.parse=function(C){var N=C.date,S=C.utc,_=C.args;this.$u=S;var T=_[1];if(typeof T=="string"){var D=_[2]===!0,O=_[3]===!0,k=D||O,y=_[2];O&&(y=_[2]),d=this.$locale(),!D&&y&&(d=u.Ls[y]),this.$d=function(z,H,M){try{if(["x","X"].indexOf(H)>-1)return new Date((H==="X"?1e3:1)*z);var g=ye(H)(z),F=g.year,L=g.month,ge=g.day,ve=g.hours,xe=g.minutes,ke=g.seconds,we=g.milliseconds,le=g.zone,R=new Date,j=ge||(F||L?1:R.getDate()),V=F||R.getFullYear(),P=0;F&&!L||(P=L>0?L-1:R.getMonth());var Y=ve||0,W=xe||0,Z=ke||0,U=we||0;return le?new Date(Date.UTC(V,P,j,Y,W,Z,U+60*le.offset*1e3)):M?new Date(Date.UTC(V,P,j,Y,W,Z,U)):new Date(V,P,j,Y,W,Z,U)}catch{return new Date("")}}(N,T,S),this.init(),y&&y!==!0&&(this.$L=this.locale(y).$L),k&&N!=this.format(T)&&(this.$d=new Date("")),d={}}else if(T instanceof Array)for(var E=T.length,I=1;I<=E;I+=1){_[1]=T[I-1];var $=u.apply(this,_);if($.isValid()){this.$d=$.$d,this.$L=$.$L,this.init();break}I===E&&(this.$d=new Date(""))}else w.call(this,C)}}})})(ue);const Qe=ue.exports,et=":host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem}.time-picker{display:inline-block;width:150px;position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:1rem;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:98px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}",tt=et;l.dayjs.extend(Qe);const be=class{constructor(e){a.registerInstance(this,e),this.timeChange=a.createEvent(this,"timeChange",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.setTime=void 0,this.name=void 0,this.hasError=!1,this.setFormError=void 0,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=l.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=l.dayjs(this.times[0].value,"hh:mma");l.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.setFormError(null,"Invalid"))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=l.autocompleteTimeFormat(this.time),t=this.times.findIndex(n=>n.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const n=t.split(":");n[0]==="00"&&n[1].slice(-2)=="pm"&&(this.err="Invalid",this.setFormError(e,"Invalid")),l.validateTimeFormatInput(t)?(this.err="",this.setFormError(null)):(this.err="Invalid",this.setFormError(e,"Invalid")),this.setTime(e,t),this.timeChange.emit(t)}handleTimeAutocomplete(e){var n;const t=(n=e.target)==null?void 0:n.value;if(!l.validateTimeFormatInput(t)){this.err="Invalid",this.setFormError(e,"Invalid");return}if(t===""){const i=l.roundToNearest15Minutes().format("hh:mma");this.setTime(e,i);return}if(!l.validateExactTimeFormat(t)){const i=l.autocompleteTimeFormat(t);this.setTime(i);return}this.setTime(e,t)}handleOnInput(e){var n;const t=(n=e.target)==null?void 0:n.value;if(l.validateTimeFormatInput(t)){if(t===""){const i=l.roundToNearest15Minutes().format("hh:mma"),r=this.times.findIndex(s=>s.value===i);r>-1&&this.scrollToViewWithinParent(r);return}if(!l.validateExactTimeFormat(t)){const i=l.autocompleteTimeFormat(t),r=this.times.findIndex(s=>s.value===i);r>-1&&this.scrollToViewWithinParent(r);return}}}generateTimes(){const e=[];let t=l.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=l.dayjs(this.minimumStartTime,"hh:mma"));const n=t.endOf("day").diff(t,"minutes"),i=Math.round(n/15);for(let r=0;r<i+1;r++){const s=t.add(r*15,"minute");if(r==i&&s.format("hh:mma").includes("am"))break;e.push({id:r,value:s.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,n=t.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const i=n+1<t.length?n+1:0;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const i=n-1>=0?n-1:t.length-1;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const i=t[n];this.handleTimeChange(e,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var o;const t=this.times[e],n=(o=this.el.shadowRoot)==null?void 0:o.getElementById(t.id.toString()),i=this.timeMenu;this.ariaActivedescendant=t.id.toString();const r=n.getBoundingClientRect(),s=i.getBoundingClientRect();r.top<s.top?i.scrollTop-=s.top-r.top:r.bottom>s.bottom&&(i.scrollTop+=r.bottom-s.bottom),r.left<s.left?i.scrollLeft-=s.left-r.left:r.right>s.right&&(i.scrollLeft+=r.right-s.right)}focusOption(e){var r;const t=this.times[e];if(!t)return;const n=t.id.toString(),i=(r=this.el.shadowRoot)==null?void 0:r.getElementById(n);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return a.h(a.Host,{key:"a9ca940f0e6ecc5d67ba71e11bdc4ba72b8f9afa"},a.h("div",{key:"c5b8768e687814eba088370dea00cf3c74767769",class:"time-picker"},a.h("input",{key:"5a3e2ee11694647ba3ccb24e5bd8fdced0c804b4",type:"text",name:this.name,id:this.name,class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!0,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&a.h("div",{class:"invalid-time-icon"}),this.showTimes&&a.h("div",{class:"times",ref:e=>this.timeMenu=e},a.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>a.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&a.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return a.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};be.style=tt;const at='.tooltip-container{position:relative;display:inline-block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem}.tooltip-content{visibility:hidden;background-color:var(--nylas-base-800);color:var(--nylas-base-0);text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;opacity:0;transition:opacity 0.3s;padding:0.5rem 1rem;max-width:200px;width:max-content}.tooltip-content.top{bottom:0;left:0;margin-bottom:1.25rem;transform:translateX(-50%)}.tooltip-content.right{top:50%;left:0%;margin-left:1.25rem;transform:translateY(-50%)}.tooltip-content.bottom{top:0;left:0;margin-top:1.25rem;transform:translateX(-50%)}.tooltip-content.left{top:50%;right:0%;margin-right:1.25rem;transform:translateY(-50%)}.tooltip-container:hover .tooltip-content,.tooltip-container:focus-within .tooltip-content{visibility:visible;opacity:1}.tooltip-content::after{content:"";position:absolute;top:-0.75rem;left:50%;transform:rotate(180deg);border-width:6px;border-style:solid;border-color:black transparent transparent transparent}.tooltip-content.top::after{top:100%;left:50%;transform:rotate(0deg)}.tooltip-content.bottom::after{top:-0.75rem;left:50%;transform:rotate(180deg)}.tooltip-content.left::after{top:47.5%;left:100%;transform:rotate(270deg)}.tooltip-content.right::after{top:47.5%;left:-0.75rem;transform:rotate(90deg)}',nt=at,me=class{constructor(e){a.registerInstance(this,e),this.position="bottom"}showTooltip(e){e.target.nextElementSibling.style.visibility="visible",e.target.nextElementSibling.style.opacity="1"}hideTooltip(e){e.target.nextElementSibling.style.visibility="hidden",e.target.nextElementSibling.style.opacity="0"}render(){return a.h("div",{key:"17c8fe0c2bda1b075857ff0d852a9988e954e888",class:"tooltip-container"},a.h("span",{key:"0b77ce5466902f1b65a08d468d4f66405fefe140",class:"info-icon",tabindex:"0",onFocus:this.showTooltip.bind(this),onBlur:this.hideTooltip.bind(this)},a.h("slot",{key:"73c5ddae08da5e0231f5fcbcba453ec0c5167a28",name:"tooltip-icon"},"i")),a.h("span",{key:"b57b0fe4faf74a854ea2b45d665a1814e7419e2e",class:`tooltip-content ${this.position}`},a.h("slot",{key:"f8072d5c5ef07bad1eee82b802b95cd75d865710",name:"tooltip-content"},"This is a help text.")))}get el(){return a.getElement(this)}};me.style=nt;exports.add_circle_icon=de;exports.calendar_info_icon=ce;exports.calendar_patterns_icon=he;exports.multi_select_dropdown=pe;exports.nylas_additional_participants=ee;exports.nylas_availability_picker=te;exports.nylas_calendar_picker=ae;exports.nylas_event_description=ne;exports.nylas_event_duration=ie;exports.nylas_event_info=se;exports.nylas_event_title=re;exports.nylas_time_window_picker=be;exports.tooltip_component=me;