diff --git a/dist/ActivityCommentAction-D_cVu02p.chunk.mjs b/dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs
similarity index 90%
rename from dist/ActivityCommentAction-D_cVu02p.chunk.mjs
rename to dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs
index 6386e461b7b07..f6a25abf6b397 100644
--- a/dist/ActivityCommentAction-D_cVu02p.chunk.mjs
+++ b/dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs
@@ -1,2 +1,2 @@
-import{a as t}from"./index-DL1yHC1K-orb-zzee.chunk.mjs";import{t as m}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{C as e,a as p}from"./CommentView-D_nHPZF0.chunk.mjs";import{l as a}from"./activity-B66lnZYB.chunk.mjs";import{b as i,r as s,o as n,c,m as u}from"./Web-ByHSuvRG.chunk.mjs";import{_ as l}from"./public-C1mLBHT3.chunk.mjs";import"./index-BRuD4Qrz.chunk.mjs";import"./NcModal-DUWLRm_F-C0gD58QY.chunk.mjs";import"./logger-D3RVzcfQ-B261d025.chunk.mjs";import"./createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs";import"./index-C6ey-Mhx.chunk.mjs";import"./TrashCanOutline-CW4_EEhq.chunk.mjs";import"./mdi-Ci0zJ0QG.chunk.mjs";import"./pinia-Bn5aG74F.chunk.mjs";import"./PencilOutline-DJX4SP_q.chunk.mjs";/* empty css */import"./NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs";import"./index-D-iKxf2E.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./ArrowRight-BgQTbtKu.chunk.mjs";import"./colors-BDeMBgfq-D1xNHBAd.chunk.mjs";import"./NcUserStatusIcon-DsviB2Cr-CJ45dJff.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs";import"./NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs";import"./GetComments-PgOpAezt.chunk.mjs";import"./index-CI-5vlTq.chunk.mjs";import"./dav-sq7XGhQT.chunk.mjs";import"./externalStorageUtils-CpkXDsx2.chunk.mjs";const d=i({components:{CommentEntry:p},mixins:[e],props:{reloadCallback:{type:Function,required:!0}},methods:{onNewComment(){try{this.reloadCallback()}catch(o){t(m("comments","Could not reload comments")),a.error("Could not reload comments",{error:o})}}}});function C(o,f,y,b,w,N){const r=s("CommentEntry");return n(),c(r,u(o.editorData,{autoComplete:o.autoComplete,resourceType:o.resourceType,editor:!0,userData:o.userData,resourceId:o.resourceId,class:"comments-action",onNew:o.onNewComment}),null,16,["autoComplete","resourceType","userData","resourceId","onNew"])}const V=l(d,[["render",C],["__scopeId","data-v-099b6b12"]]);export{V as default};
-//# sourceMappingURL=ActivityCommentAction-D_cVu02p.chunk.mjs.map
+import{a as t}from"./index-DL1yHC1K-orb-zzee.chunk.mjs";import{t as m}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{C as e,a as p}from"./CommentView-D3UvwDWa.chunk.mjs";import{l as a}from"./activity-B66lnZYB.chunk.mjs";import{b as i,r as s,o as n,c,m as u}from"./Web-ByHSuvRG.chunk.mjs";import{_ as l}from"./public-C1mLBHT3.chunk.mjs";import"./index-BRuD4Qrz.chunk.mjs";import"./NcModal-DUWLRm_F-C0gD58QY.chunk.mjs";import"./logger-D3RVzcfQ-B261d025.chunk.mjs";import"./createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs";import"./index-C6ey-Mhx.chunk.mjs";import"./TrashCanOutline-CW4_EEhq.chunk.mjs";import"./mdi-Ci0zJ0QG.chunk.mjs";import"./pinia-Bn5aG74F.chunk.mjs";import"./PencilOutline-DJX4SP_q.chunk.mjs";/* empty css */import"./NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs";import"./index-D-iKxf2E.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./ArrowRight-BgQTbtKu.chunk.mjs";import"./colors-BDeMBgfq-D1xNHBAd.chunk.mjs";import"./NcUserStatusIcon-DsviB2Cr-CJ45dJff.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs";import"./NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs";import"./GetComments-DcBPvVJt.chunk.mjs";import"./index-CI-5vlTq.chunk.mjs";import"./dav-sq7XGhQT.chunk.mjs";import"./externalStorageUtils-CpkXDsx2.chunk.mjs";const d=i({components:{CommentEntry:p},mixins:[e],props:{reloadCallback:{type:Function,required:!0}},methods:{onNewComment(){try{this.reloadCallback()}catch(o){t(m("comments","Could not reload comments")),a.error("Could not reload comments",{error:o})}}}});function C(o,f,y,b,w,N){const r=s("CommentEntry");return n(),c(r,u(o.editorData,{autoComplete:o.autoComplete,resourceType:o.resourceType,editor:!0,userData:o.userData,resourceId:o.resourceId,class:"comments-action",onNew:o.onNewComment}),null,16,["autoComplete","resourceType","userData","resourceId","onNew"])}const V=l(d,[["render",C],["__scopeId","data-v-099b6b12"]]);export{V as default};
+//# sourceMappingURL=ActivityCommentAction-BZ7sj6jb.chunk.mjs.map
diff --git a/dist/ActivityCommentAction-D_cVu02p.chunk.mjs.license b/dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs.license
similarity index 100%
rename from dist/ActivityCommentAction-D_cVu02p.chunk.mjs.license
rename to dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs.license
diff --git a/dist/ActivityCommentAction-D_cVu02p.chunk.mjs.map b/dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs.map
similarity index 96%
rename from dist/ActivityCommentAction-D_cVu02p.chunk.mjs.map
rename to dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs.map
index c4e365bd46398..aaed16d05c32f 100644
--- a/dist/ActivityCommentAction-D_cVu02p.chunk.mjs.map
+++ b/dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs.map
@@ -1 +1 @@
-{"version":3,"file":"ActivityCommentAction-D_cVu02p.chunk.mjs","sources":["../build/frontend/apps/comments/src/views/ActivityCommentAction.vue"],"sourcesContent":["\n\n\n\t\n\n\n\n\n\n"],"names":["_sfc_main","defineComponent","CommentEntry","CommentView","error","showError","t","logger","_createBlock","_component_CommentEntry","_mergeProps","_ctx"],"mappings":"0yCAyBA,MAAAA,EAAeC,EAAgB,CAC9B,WAAY,CACX,aAAAC,CAAA,EAGD,OAAQ,CAACC,CAAW,EACpB,MAAO,CACN,eAAgB,CACf,KAAM,SACN,SAAU,EAAA,CACX,EAGD,QAAS,CACR,cAAe,CACd,GAAI,CAEH,KAAK,eAAA,CACN,OAASC,EAAO,CACfC,EAAUC,EAAE,WAAY,2BAA2B,CAAC,EACpDC,EAAO,MAAM,4BAA6B,CAAE,MAAAH,CAAA,CAAO,CACpD,CACD,CAAA,CAEF,CAAC,+DA3CAI,EAQuBC,EARvBC,EAQuBC,EAPd,WAAU,CACjB,aAAcA,EAAA,aACd,aAAcA,EAAA,aACd,OAAQ,GACR,SAAUA,EAAA,SACV,WAAYA,EAAA,WACb,MAAM,kBACL,MAAKA,EAAA,YAAA,CAAA,EAAA,KAAA,GAAA,CAAA,eAAA,eAAA,WAAA,aAAA,OAAA,CAAA"}
\ No newline at end of file
+{"version":3,"file":"ActivityCommentAction-BZ7sj6jb.chunk.mjs","sources":["../build/frontend/apps/comments/src/views/ActivityCommentAction.vue"],"sourcesContent":["\n\n\n\t\n\n\n\n\n\n"],"names":["_sfc_main","defineComponent","CommentEntry","CommentView","error","showError","t","logger","_createBlock","_component_CommentEntry","_mergeProps","_ctx"],"mappings":"0yCAyBA,MAAAA,EAAeC,EAAgB,CAC9B,WAAY,CACX,aAAAC,CAAA,EAGD,OAAQ,CAACC,CAAW,EACpB,MAAO,CACN,eAAgB,CACf,KAAM,SACN,SAAU,EAAA,CACX,EAGD,QAAS,CACR,cAAe,CACd,GAAI,CAEH,KAAK,eAAA,CACN,OAASC,EAAO,CACfC,EAAUC,EAAE,WAAY,2BAA2B,CAAC,EACpDC,EAAO,MAAM,4BAA6B,CAAE,MAAAH,CAAA,CAAO,CACpD,CACD,CAAA,CAEF,CAAC,+DA3CAI,EAQuBC,EARvBC,EAQuBC,EAPd,WAAU,CACjB,aAAcA,EAAA,aACd,aAAcA,EAAA,aACd,OAAQ,GACR,SAAUA,EAAA,SACV,WAAYA,EAAA,WACb,MAAM,kBACL,MAAKA,EAAA,YAAA,CAAA,EAAA,KAAA,GAAA,CAAA,eAAA,eAAA,WAAA,aAAA,OAAA,CAAA"}
\ No newline at end of file
diff --git a/dist/ActivityCommentAction-D_cVu02p.chunk.mjs.map.license b/dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs.map.license
similarity index 100%
rename from dist/ActivityCommentAction-D_cVu02p.chunk.mjs.map.license
rename to dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs.map.license
diff --git a/dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs b/dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs
similarity index 91%
rename from dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs
rename to dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs
index 40f0448e78dd4..62e84e13ac356 100644
--- a/dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs
+++ b/dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs
@@ -1,2 +1,2 @@
-import{t as s}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{C as p,a as i}from"./CommentView-D_nHPZF0.chunk.mjs";import{_ as a}from"./public-C1mLBHT3.chunk.mjs";import{r as n,o as c,c as u,m as d}from"./Web-ByHSuvRG.chunk.mjs";import"./index-C6ey-Mhx.chunk.mjs";import"./pinia-Bn5aG74F.chunk.mjs";import"./PencilOutline-DJX4SP_q.chunk.mjs";import"./logger-D3RVzcfQ-B261d025.chunk.mjs";import"./createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs";import"./NcModal-DUWLRm_F-C0gD58QY.chunk.mjs";/* empty css */import"./NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs";import"./index-D-iKxf2E.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./ArrowRight-BgQTbtKu.chunk.mjs";import"./colors-BDeMBgfq-D1xNHBAd.chunk.mjs";import"./NcUserStatusIcon-DsviB2Cr-CJ45dJff.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs";import"./TrashCanOutline-CW4_EEhq.chunk.mjs";import"./NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs";import"./index-DL1yHC1K-orb-zzee.chunk.mjs";import"./index-BRuD4Qrz.chunk.mjs";import"./mdi-Ci0zJ0QG.chunk.mjs";import"./activity-B66lnZYB.chunk.mjs";import"./GetComments-PgOpAezt.chunk.mjs";import"./index-CI-5vlTq.chunk.mjs";import"./dav-sq7XGhQT.chunk.mjs";import"./externalStorageUtils-CpkXDsx2.chunk.mjs";const l={name:"ActivityCommentEntry",components:{CommentEntry:i},mixins:[p],props:{comment:{type:Object,required:!0},reloadCallback:{type:Function,required:!0}},data(){return{commentMessage:""}},watch:{comment(){this.commentMessage=this.comment.props.message}},mounted(){this.commentMessage=this.comment.props.message},methods:{t:s}};function g(t,e,o,y,m,C){const r=n("CommentEntry");return c(),u(r,d({ref:"comment",tag:"li"},o.comment.props,{autoComplete:t.autoComplete,resourceType:t.resourceType,message:m.commentMessage,resourceId:t.resourceId,userData:t.genMentionsData(o.comment.props.mentions),class:"comments-activity",onDelete:e[0]||(e[0]=f=>o.reloadCallback())}),null,16,["autoComplete","resourceType","message","resourceId","userData"])}const S=a(l,[["render",g],["__scopeId","data-v-2d51dbfd"]]);export{S as default};
-//# sourceMappingURL=ActivityCommentEntry-DpJ3zirU.chunk.mjs.map
+import{t as s}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{C as p,a as i}from"./CommentView-D3UvwDWa.chunk.mjs";import{_ as a}from"./public-C1mLBHT3.chunk.mjs";import{r as n,o as c,c as u,m as d}from"./Web-ByHSuvRG.chunk.mjs";import"./index-C6ey-Mhx.chunk.mjs";import"./pinia-Bn5aG74F.chunk.mjs";import"./PencilOutline-DJX4SP_q.chunk.mjs";import"./logger-D3RVzcfQ-B261d025.chunk.mjs";import"./createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs";import"./NcModal-DUWLRm_F-C0gD58QY.chunk.mjs";/* empty css */import"./NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs";import"./index-D-iKxf2E.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./ArrowRight-BgQTbtKu.chunk.mjs";import"./colors-BDeMBgfq-D1xNHBAd.chunk.mjs";import"./NcUserStatusIcon-DsviB2Cr-CJ45dJff.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs";import"./TrashCanOutline-CW4_EEhq.chunk.mjs";import"./NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs";import"./index-DL1yHC1K-orb-zzee.chunk.mjs";import"./index-BRuD4Qrz.chunk.mjs";import"./mdi-Ci0zJ0QG.chunk.mjs";import"./activity-B66lnZYB.chunk.mjs";import"./GetComments-DcBPvVJt.chunk.mjs";import"./index-CI-5vlTq.chunk.mjs";import"./dav-sq7XGhQT.chunk.mjs";import"./externalStorageUtils-CpkXDsx2.chunk.mjs";const l={name:"ActivityCommentEntry",components:{CommentEntry:i},mixins:[p],props:{comment:{type:Object,required:!0},reloadCallback:{type:Function,required:!0}},data(){return{commentMessage:""}},watch:{comment(){this.commentMessage=this.comment.props.message}},mounted(){this.commentMessage=this.comment.props.message},methods:{t:s}};function g(t,e,o,y,m,C){const r=n("CommentEntry");return c(),u(r,d({ref:"comment",tag:"li"},o.comment.props,{autoComplete:t.autoComplete,resourceType:t.resourceType,message:m.commentMessage,resourceId:t.resourceId,userData:t.genMentionsData(o.comment.props.mentions),class:"comments-activity",onDelete:e[0]||(e[0]=f=>o.reloadCallback())}),null,16,["autoComplete","resourceType","message","resourceId","userData"])}const S=a(l,[["render",g],["__scopeId","data-v-2d51dbfd"]]);export{S as default};
+//# sourceMappingURL=ActivityCommentEntry-Cqdbzlu4.chunk.mjs.map
diff --git a/dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs.license b/dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs.license
similarity index 100%
rename from dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs.license
rename to dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs.license
diff --git a/dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs.map b/dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs.map
similarity index 97%
rename from dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs.map
rename to dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs.map
index bd270f0598217..0b6f0814ec6df 100644
--- a/dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs.map
+++ b/dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs.map
@@ -1 +1 @@
-{"version":3,"file":"ActivityCommentEntry-DpJ3zirU.chunk.mjs","sources":["../build/frontend/apps/comments/src/views/ActivityCommentEntry.vue"],"sourcesContent":["\n\n\n\t\n\n\n\n\n\n"],"names":["_sfc_main","CommentEntry","CommentView","t","_openBlock","_createBlock","_component_CommentEntry","_mergeProps","$props","_ctx","$data","_cache"],"mappings":"gxCA0BA,MAAAA,EAAe,CACd,KAAM,uBAEN,WAAY,CACX,aAAAC,CAAA,EAGD,OAAQ,CAACC,CAAW,EACpB,MAAO,CACN,QAAS,CACR,KAAM,OACN,SAAU,EAAA,EAGX,eAAgB,CACf,KAAM,SACN,SAAU,EAAA,CACX,EAGD,MAAO,CACN,MAAO,CACN,eAAgB,EAAA,CAElB,EAEA,MAAO,CACN,SAAU,CACT,KAAK,eAAiB,KAAK,QAAQ,MAAM,OAC1C,CAAA,EAGD,SAAU,CACT,KAAK,eAAiB,KAAK,QAAQ,MAAM,OAC1C,EAEA,QAAS,CAAA,EACRC,CAAA,CAEF,oDA3DC,OAAAC,EAAA,EAAAC,EAU8BC,EAV9BC,EAU8B,CAT7B,IAAI,UACJ,IAAI,IAAA,EACIC,UAAQ,MAAK,CACpB,aAAcC,EAAA,aACd,aAAcA,EAAA,aACd,QAASC,EAAA,eACT,WAAYD,EAAA,WACZ,SAAUA,EAAA,gBAAgBD,EAAA,QAAQ,MAAM,QAAQ,EACjD,MAAM,oBACL,SAAMG,eAAEH,EAAA,eAAA,EAAc,CAAA,EAAA,KAAA,GAAA,CAAA,eAAA,eAAA,UAAA,aAAA,UAAA,CAAA"}
\ No newline at end of file
+{"version":3,"file":"ActivityCommentEntry-Cqdbzlu4.chunk.mjs","sources":["../build/frontend/apps/comments/src/views/ActivityCommentEntry.vue"],"sourcesContent":["\n\n\n\t\n\n\n\n\n\n"],"names":["_sfc_main","CommentEntry","CommentView","t","_openBlock","_createBlock","_component_CommentEntry","_mergeProps","$props","_ctx","$data","_cache"],"mappings":"gxCA0BA,MAAAA,EAAe,CACd,KAAM,uBAEN,WAAY,CACX,aAAAC,CAAA,EAGD,OAAQ,CAACC,CAAW,EACpB,MAAO,CACN,QAAS,CACR,KAAM,OACN,SAAU,EAAA,EAGX,eAAgB,CACf,KAAM,SACN,SAAU,EAAA,CACX,EAGD,MAAO,CACN,MAAO,CACN,eAAgB,EAAA,CAElB,EAEA,MAAO,CACN,SAAU,CACT,KAAK,eAAiB,KAAK,QAAQ,MAAM,OAC1C,CAAA,EAGD,SAAU,CACT,KAAK,eAAiB,KAAK,QAAQ,MAAM,OAC1C,EAEA,QAAS,CAAA,EACRC,CAAA,CAEF,oDA3DC,OAAAC,EAAA,EAAAC,EAU8BC,EAV9BC,EAU8B,CAT7B,IAAI,UACJ,IAAI,IAAA,EACIC,UAAQ,MAAK,CACpB,aAAcC,EAAA,aACd,aAAcA,EAAA,aACd,QAASC,EAAA,eACT,WAAYD,EAAA,WACZ,SAAUA,EAAA,gBAAgBD,EAAA,QAAQ,MAAM,QAAQ,EACjD,MAAM,oBACL,SAAMG,eAAEH,EAAA,eAAA,EAAc,CAAA,EAAA,KAAA,GAAA,CAAA,eAAA,eAAA,UAAA,aAAA,UAAA,CAAA"}
\ No newline at end of file
diff --git a/dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs.map.license b/dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs.map.license
similarity index 100%
rename from dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs.map.license
rename to dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs.map.license
diff --git a/dist/CommentView-D_nHPZF0.chunk.mjs b/dist/CommentView-D3UvwDWa.chunk.mjs
similarity index 98%
rename from dist/CommentView-D_nHPZF0.chunk.mjs
rename to dist/CommentView-D3UvwDWa.chunk.mjs
index 6d4d18e8d52e4..c31a09ebc8c9e 100644
--- a/dist/CommentView-D_nHPZF0.chunk.mjs
+++ b/dist/CommentView-D3UvwDWa.chunk.mjs
@@ -1,5 +1,5 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/index-B7f4H-mg.chunk.mjs'),window.OC.filePath('', '', 'dist/index-C6ey-Mhx.chunk.mjs'),window.OC.filePath('', '', 'dist/NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs'),window.OC.filePath('', '', 'dist/index-D-iKxf2E.chunk.mjs'),window.OC.filePath('', '', 'dist/Web-ByHSuvRG.chunk.mjs'),window.OC.filePath('', '', 'dist/public-C1mLBHT3.chunk.mjs'),window.OC.filePath('', '', 'dist/util-djQ-4xJ5.chunk.mjs'),window.OC.filePath('', '', 'dist/NcModal-DUWLRm_F-C0gD58QY.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-B261d025.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs'),window.OC.filePath('', '', 'dist/common-createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/common-logger-D3RVzcfQ-BE3lcFW4.chunk.css'),window.OC.filePath('', '', 'dist/common-NcModal-DUWLRm_F-BsKc2RT9.chunk.css'),window.OC.filePath('', '', 'dist/ArrowRight-BgQTbtKu.chunk.mjs'),window.OC.filePath('', '', 'dist/common-ArrowRight-vZpQWIqF.chunk.css'),window.OC.filePath('', '', 'dist/colors-BDeMBgfq-D1xNHBAd.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-DsviB2Cr-CJ45dJff.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcUserStatusIcon-DsviB2Cr-Bq_6hmXG.chunk.css'),window.OC.filePath('', '', 'dist/PencilOutline-DJX4SP_q.chunk.mjs'),window.OC.filePath('', '', 'dist/common-PencilOutline-B3DMd8SU.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcDateTime-b9UhLDij.chunk.css'),window.OC.filePath('', '', 'dist/TrashCanOutline-CW4_EEhq.chunk.mjs'),window.OC.filePath('', '', 'dist/common-TrashCanOutline-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/common-NcAvatar-M3-CbKbq-DTVmI7NO.chunk.css'),window.OC.filePath('', '', 'dist/emoji-C8k9NUlo-D9ZtzMuc.chunk.mjs'),window.OC.filePath('', '', 'dist/index-CwsnDr9r.chunk.mjs'),window.OC.filePath('', '', 'dist/NcCheckboxRadioSwitch-D8Dfv4iw-B_doZ1-m.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcCheckboxRadioSwitch-D8Dfv4iw-CPGkDj-p.chunk.css'),window.OC.filePath('', '', 'dist/index-C13i_MTM.chunk.mjs'),window.OC.filePath('', '', 'dist/common-index-BWhNCeJl.chunk.css'),window.OC.filePath('', '', 'dist/NcEmptyContent-CGAPqk4S-q4HLj68a.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcEmptyContent-CGAPqk4S-Don1d5Bd.chunk.css'),window.OC.filePath('', '', 'dist/NcTextField.vue_vue_type_script_setup_true_lang-BQHjkK8r-Dv0_ThWG.chunk.mjs'),window.OC.filePath('', '', 'dist/NcInputField-B1bGxYHt-DVZQKody.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcInputField-B1bGxYHt-BYHxARP-.chunk.css'),window.OC.filePath('', '', 'dist/common-index-CpSoVYoo.chunk.css'),window.OC.filePath('', '', 'dist/common-index-MZEZ7XGj.chunk.css')])))=>i.map(i=>d[i]);
-import{o as n,f as h,g as u,t as y,h as N,m as V,a as T,_ as v,r as c,L as U,M as W,c as p,w as m,k as d,F as H,j as _,N as Z,y as w,C as G,b as J}from"./Web-ByHSuvRG.chunk.mjs";import{a as f,c as K}from"./index-C6ey-Mhx.chunk.mjs";import{t as Q}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{d as X,m as A}from"./pinia-Bn5aG74F.chunk.mjs";import{N as Y,P as ee}from"./PencilOutline-DJX4SP_q.chunk.mjs";import{a as te}from"./NcModal-DUWLRm_F-C0gD58QY.chunk.mjs";/* empty css */import{_ as oe}from"./createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs";import{N as ie}from"./NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs";import{N as se}from"./logger-D3RVzcfQ-B261d025.chunk.mjs";import{_ as ae}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs";import{N as re,D as ne}from"./TrashCanOutline-CW4_EEhq.chunk.mjs";import{N as ce}from"./NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs";import{A as me}from"./ArrowRight-BgQTbtKu.chunk.mjs";import{_ as S,l as de}from"./public-C1mLBHT3.chunk.mjs";import{a as I,T as le,f as ue}from"./index-DL1yHC1K-orb-zzee.chunk.mjs";import{l as g}from"./activity-B66lnZYB.chunk.mjs";import{c as D,a as pe}from"./GetComments-PgOpAezt.chunk.mjs";import{c as x}from"./index-D-iKxf2E.chunk.mjs";const he={name:"NcActionSeparator"},ge={class:"action action-separator action--disabled",role:"separator"};function ye(e,o,i,a,r,s){return n(),h("li",ge)}const fe=oe(he,[["render",ye],["__scopeId","data-v-3e2324b7"]]),be={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ce=["aria-hidden","aria-label"],_e=["fill","width","height"],Ie={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},Ne={key:0};function De(e,o,i,a,r,s){return n(),h("span",V(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon close-icon",role:"img",onClick:o[0]||(o[0]=b=>e.$emit("click",b))}),[(n(),h("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[u("path",Ie,[i.title?(n(),h("title",Ne,y(i.title),1)):N("",!0)])],8,_e))],16,Ce)}const ke=S(be,[["render",De]]);async function we(e,o,i){const a=["",e,o,i].join("/");await D.deleteFile(a)}async function Le(e,o,i,a){const r=["",e,o,i].join("/");return await D.customRequest(r,{method:"PROPPATCH",data:`
+import{o as n,f as h,g as u,t as y,h as N,m as V,a as T,_ as v,r as c,L as U,M as W,c as p,w as m,k as d,F as H,j as _,N as Z,y as w,C as G,b as J}from"./Web-ByHSuvRG.chunk.mjs";import{a as f,c as K}from"./index-C6ey-Mhx.chunk.mjs";import{t as Q}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{d as X,m as A}from"./pinia-Bn5aG74F.chunk.mjs";import{N as Y,P as ee}from"./PencilOutline-DJX4SP_q.chunk.mjs";import{a as te}from"./NcModal-DUWLRm_F-C0gD58QY.chunk.mjs";/* empty css */import{_ as oe}from"./createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs";import{N as ie}from"./NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs";import{N as se}from"./logger-D3RVzcfQ-B261d025.chunk.mjs";import{_ as ae}from"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs";import{N as re,D as ne}from"./TrashCanOutline-CW4_EEhq.chunk.mjs";import{N as ce}from"./NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs";import{A as me}from"./ArrowRight-BgQTbtKu.chunk.mjs";import{_ as S,l as de}from"./public-C1mLBHT3.chunk.mjs";import{a as I,T as le,f as ue}from"./index-DL1yHC1K-orb-zzee.chunk.mjs";import{l as g}from"./activity-B66lnZYB.chunk.mjs";import{c as D,a as pe}from"./GetComments-DcBPvVJt.chunk.mjs";import{c as x}from"./index-D-iKxf2E.chunk.mjs";const he={name:"NcActionSeparator"},ge={class:"action action-separator action--disabled",role:"separator"};function ye(e,o,i,a,r,s){return n(),h("li",ge)}const fe=oe(he,[["render",ye],["__scopeId","data-v-3e2324b7"]]),be={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ce=["aria-hidden","aria-label"],_e=["fill","width","height"],Ie={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},Ne={key:0};function De(e,o,i,a,r,s){return n(),h("span",V(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon close-icon",role:"img",onClick:o[0]||(o[0]=b=>e.$emit("click",b))}),[(n(),h("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[u("path",Ie,[i.title?(n(),h("title",Ne,y(i.title),1)):N("",!0)])],8,_e))],16,Ce)}const ke=S(be,[["render",De]]);async function we(e,o,i){const a=["",e,o,i].join("/");await D.deleteFile(a)}async function Le(e,o,i,a){const r=["",e,o,i].join("/");return await D.customRequest(r,{method:"PROPPATCH",data:`
@@ -9,4 +9,4 @@ import{o as n,f as h,g as u,t as y,h as N,m as V,a as T,_ as v,r as c,L as U,M a
`})}function L(e,o=1){const i=new DOMParser;let a=e;for(let r=0;r({idsInLimbo:[]}),actions:{addId(e){this.idsInLimbo.push(e)},removeId(e){const o=this.idsInLimbo.indexOf(e);o>-1&&this.idsInLimbo.splice(o,1)},checkForId(e){return this.idsInLimbo.includes(e)}}}),ve={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data(){return{deleted:!1,editing:!1,loading:!1}},computed:{...A(M)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await Le(this.resourceType,this.resourceId,this.id,e),g.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(o){I(t("comments","An error occurred while trying to edit the comment")),g.error("An error occurred while trying to edit the comment",{error:o})}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,le);ue(t("comments","Comment deleted"),()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)})},async onDelete(){try{await we(this.resourceType,this.resourceId,this.id),g.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){I(t("comments","An error occurred while trying to delete the comment")),g.error("An error occurred while trying to delete the comment",{error:e}),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}},async onNewComment(e){this.loading=!0;try{const o=await Te(this.resourceType,this.resourceId,e);g.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:o}),this.$emit("new",o),this.$emit("update:message",""),this.localMessage=""}catch(o){I(t("comments","An error occurred while trying to create the comment")),g.error("An error occurred while trying to create the comment",{error:o})}finally{this.loading=!1}}}},Ae=T(()=>v(()=>import("./index-B7f4H-mg.chunk.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]),import.meta.url)),Se=T(()=>v(()=>import("./index-CwsnDr9r.chunk.mjs").then(e=>e.i),__vite__mapDeps([27,4,5,8,9,10,1,11,12,28,23,24,29,3,6,30,7,13,31,32,33,14,15,34,35,36,37]),import.meta.url)),xe={name:"CommentEntry",components:{IconArrowRight:me,IconClose:ke,IconTrashCanOutline:ne,IconPencilOutline:ee,NcActionButton:Y,NcActions:te,NcActionSeparator:fe,NcAvatar:ie,NcButton:se,NcDateTime:ae,NcLoadingIcon:re,NcRichContenteditable:Ae,NcRichText:Se},mixins:[ve],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},userData:{type:Object,default:()=>({})},tag:{type:String,default:"div"}},data(){return{expanded:!1,localMessage:"",submitted:!1}},computed:{...A(M),isOwnComment(){return f().uid===this.actorId},richContent(){const e={};let o=this.localMessage;return Object.keys(this.userData).forEach((i,a)=>{const r=`mention-${a}`,s=new RegExp(`@${i}|@"${i}"`,"g");o=o.replace(s,`{${r}}`),e[r]={component:ce,props:{user:i,displayName:this.userData[i].label,primary:this.userData[i].primary}}}),{mentions:e,message:o}},isEmptyMessage(){return!this.localMessage||this.localMessage.trim()===""},timestamp(){return Date.parse(this.creationDateTime)},isLimbo(){return this.deletedCommentLimboStore.checkForId(this.id)}},watch:{message(e){this.updateLocalMessage(e)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:Q,updateLocalMessage(e){this.localMessage=e.toString(),this.submitted=!1},onSubmit(){if(this.localMessage.trim()!==""){if(this.editor){this.onNewComment(this.localMessage.trim()),this.$nextTick(()=>{this.$refs.editor.$el.focus()});return}this.onEditComment(this.localMessage.trim())}},onExpand(){this.expanded=!0}}},Me={class:"comment__side"},Ee={class:"comment__body"},Oe={class:"comment__header"},Re={class:"comment__author"},$e={key:1,class:"comment_loading icon-loading-small"},je={class:"comment__editor-group"},Pe={class:"comment__submit"},ze={id:"tab-comments__editor-description",class:"comment__editor-description"};function qe(e,o,i,a,r,s){const b=c("NcAvatar"),C=c("IconPencilOutline"),l=c("NcActionButton"),E=c("NcActionSeparator"),O=c("IconTrashCanOutline"),R=c("IconClose"),$=c("NcActions"),j=c("NcDateTime"),P=c("NcRichContenteditable"),z=c("NcLoadingIcon"),q=c("IconArrowRight"),B=c("NcButton"),F=c("NcRichText");return U((n(),p(G(i.tag),{class:w([{"comment--loading":e.loading},"comment"])},{default:m(()=>[u("div",Me,[d(b,{class:"comment__avatar",displayName:i.actorDisplayName,user:i.actorId,size:32},null,8,["displayName","user"])]),u("div",Ee,[u("div",Oe,[u("span",Re,y(i.actorDisplayName),1),s.isOwnComment&&e.id&&!e.loading?(n(),p($,{key:0,class:"comment__actions"},{default:m(()=>[e.editing?(n(),p(l,{key:1,onClick:e.onEditCancel},{icon:m(()=>[d(R,{size:20})]),default:m(()=>[_(" "+y(s.t("comments","Cancel edit")),1)]),_:1},8,["onClick"])):(n(),h(H,{key:0},[d(l,{closeAfterClick:"",onClick:e.onEdit},{icon:m(()=>[d(C,{size:20})]),default:m(()=>[_(" "+y(s.t("comments","Edit comment")),1)]),_:1},8,["onClick"]),d(E),d(l,{closeAfterClick:"",onClick:e.onDeleteWithUndo},{icon:m(()=>[d(O,{size:20})]),default:m(()=>[_(" "+y(s.t("comments","Delete comment")),1)]),_:1},8,["onClick"])],64))]),_:1})):N("",!0),e.id&&e.loading?(n(),h("div",$e)):i.creationDateTime?(n(),p(j,{key:2,class:"comment__timestamp",timestamp:s.timestamp,ignoreSeconds:!0},null,8,["timestamp"])):N("",!0)]),i.editor||e.editing?(n(),h("form",{key:0,class:"comment__editor",onSubmit:o[2]||(o[2]=Z(()=>{},["prevent"]))},[u("div",je,[d(P,{ref:"editor",modelValue:r.localMessage,"onUpdate:modelValue":[o[0]||(o[0]=k=>r.localMessage=k),o[1]||(o[1]=k=>r.submitted=!1)],autoComplete:i.autoComplete,contenteditable:!e.loading,label:i.editor?s.t("comments","New comment"):s.t("comments","Edit comment"),placeholder:s.t("comments","Write a comment …"),userData:i.userData,"aria-describedby":"tab-comments__editor-description",onSubmit:s.onSubmit},null,8,["modelValue","autoComplete","contenteditable","label","placeholder","userData","onSubmit"]),u("div",Pe,[d(B,{variant:"tertiary-no-background",type:"submit","aria-label":s.t("comments","Post comment"),disabled:s.isEmptyMessage,onClick:s.onSubmit},{icon:m(()=>[e.loading?(n(),p(z,{key:0})):(n(),p(q,{key:1,size:20}))]),_:1},8,["aria-label","disabled","onClick"])])]),u("div",ze,y(s.t("comments","@ for mentions, : for emoji, / for smart picker")),1)],32)):(n(),p(F,{key:1,class:w(["comment__message",{"comment__message--expanded":r.expanded}]),text:s.richContent.message,arguments:s.richContent.mentions,useMarkdown:"",onClick:s.onExpand},null,8,["class","text","arguments","onClick"]))])]),_:1},8,["class"])),[[W,!e.deleted&&!s.isLimbo]])}const rt=S(xe,[["render",qe],["__scopeId","data-v-dd96dd66"]]),nt=J({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data(){return{editorData:{actorDisplayName:f().displayName,actorId:f().uid,key:"editor"},userData:{},currentResourceId:this.resourceId}},methods:{async autoComplete(e,o){const{data:i}=await x.get(K("core/autocomplete/get"),{params:{search:e,itemType:this.resourceType,itemId:this.currentResourceId,sorter:"commenters|share-recipients",limit:de("comments","maxAutoCompleteResults")}});return i.ocs.data.forEach(a=>{this.userData[a.id]=a}),o(Object.values(this.userData))},genMentionsData(e){return Object.values(e).flat().forEach(o=>{this.userData[o.mentionId]={icon:"icon-user",id:o.mentionId,label:o.mentionDisplayName,source:"users",primary:f()?.uid===o.mentionId}}),this.userData}}});export{nt as C,rt as a};
-//# sourceMappingURL=CommentView-D_nHPZF0.chunk.mjs.map
+//# sourceMappingURL=CommentView-D3UvwDWa.chunk.mjs.map
diff --git a/dist/CommentView-D_nHPZF0.chunk.mjs.license b/dist/CommentView-D3UvwDWa.chunk.mjs.license
similarity index 100%
rename from dist/CommentView-D_nHPZF0.chunk.mjs.license
rename to dist/CommentView-D3UvwDWa.chunk.mjs.license
diff --git a/dist/CommentView-D_nHPZF0.chunk.mjs.map b/dist/CommentView-D3UvwDWa.chunk.mjs.map
similarity index 99%
rename from dist/CommentView-D_nHPZF0.chunk.mjs.map
rename to dist/CommentView-D3UvwDWa.chunk.mjs.map
index 0c2fcf21a8731..8c38c2480fbfd 100644
--- a/dist/CommentView-D_nHPZF0.chunk.mjs.map
+++ b/dist/CommentView-D3UvwDWa.chunk.mjs.map
@@ -1 +1 @@
-{"version":3,"mappings":";8vCAGA,MAAMA,GAAY,CAChB,KAAM,mBACR,EACMC,GAAa,CACjB,MAAO,2CACP,KAAM,WACR,EACA,SAASC,GAAYC,EAAMC,EAAQC,EAAQC,EAAQC,EAAOC,EAAU,CAClE,OAAOC,EAAS,EAAIC,EAAmB,KAAMT,EAAU,CACzD,CACA,MAAMU,GAAoCC,GAAYZ,GAAW,CAAC,CAAC,SAAUE,EAAW,EAAG,CAAC,YAAa,iBAAiB,CAAC,CAAC,ECOvHF,GAAU,CACb,KAAM,YACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,+DAxBYa,GAAA,GAAE,+GAA+G,iDAX3HC,EAeO,OAfPC,EAAcZ,EAAA,OAAM,CACb,cAAaE,EAAA,MAAK,YAClB,aAAYA,EAAA,MACb,MAAM,kCACN,KAAK,MACJ,QAAKD,EAAA,KAAAA,EAAA,GAAAY,GAAEb,EAAA,MAAK,QAAUa,CAAM,WACjCF,EAQM,OARA,KAAMT,EAAA,UACP,MAAM,4BACL,MAAOA,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,cACXY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,QACb,EAEF,CAAC","names":["_sfc_main","_hoisted_1","_sfc_render","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","NcActionSeparator","_export_sfc","_hoisted_3","_createElementBlock","_mergeProps","$event","_createElementVNode","_openBlock","DeleteComment","resourceType","resourceId","commentId","commentPath","client","EditComment","message","decodeHtmlEntities","value","passes","parser","decoded","i","NewComment","resourcePath","response","axios","getRootPath","getCurrentUser","comment","props","useDeletedCommentLimbo","defineStore","id","index","CommentMixin","mapStores","logger","error","showError","timeOutDelete","TOAST_UNDO_TIMEOUT","showUndo","newComment","NcRichContenteditable","defineAsyncComponent","NcRichText","n","IconArrowRight","IconClose","IconTrashCanOutline","IconPencilOutline","NcActionButton","NcActions","NcAvatar","NcButton","NcDateTime","NcLoadingIcon","mentions","user","key","regex","NcUserBubble","t","_hoisted_2","_hoisted_4","_hoisted_6","_hoisted_7","_withDirectives","_createBlock","_resolveDynamicComponent","_normalizeClass","_createVNode","_component_NcAvatar","_toDisplayString","_component_NcActions","_component_NcActionButton","_component_IconClose","_createTextVNode","_Fragment","_component_IconPencilOutline","_component_NcActionSeparator","_component_IconTrashCanOutline","_hoisted_5","_component_NcDateTime","_component_NcRichContenteditable","_component_NcButton","_component_NcLoadingIcon","_component_IconArrowRight","_hoisted_8","_component_NcRichText","_vShow","CommentView","defineComponent","search","callback","data","generateOcsUrl","loadState","mention"],"ignoreList":[0,1],"sources":["../node_modules/@nextcloud/vue/dist/chunks/NcActionSeparator-B9pNQaji.mjs","../node_modules/vue-material-design-icons/Close.vue","../build/frontend/apps/comments/src/services/DeleteComment.ts","../build/frontend/apps/comments/src/services/EditComment.ts","../build/frontend/apps/comments/src/utils/decodeHtmlEntities.ts","../build/frontend/apps/comments/src/services/NewComment.ts","../build/frontend/apps/comments/src/store/deletedCommentLimbo.ts","../build/frontend/apps/comments/src/mixins/CommentMixin.ts","../build/frontend/apps/comments/src/components/CommentEntry.vue","../build/frontend/apps/comments/src/mixins/CommentView.ts"],"sourcesContent":["import '../assets/NcActionSeparator-Ct2RnclR.css';\nimport { openBlock, createElementBlock } from \"vue\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _sfc_main = {\n name: \"NcActionSeparator\"\n};\nconst _hoisted_1 = {\n class: \"action action-separator action--disabled\",\n role: \"separator\"\n};\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"li\", _hoisted_1);\n}\nconst NcActionSeparator = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-3e2324b7\"]]);\nexport {\n NcActionSeparator as N\n};\n//# sourceMappingURL=NcActionSeparator-B9pNQaji.mjs.map\n","\n \n \n \n\n\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.ts'\n\n/**\n * Delete a comment\n *\n * @param resourceType the resource type\n * @param resourceId the resource ID\n * @param commentId the comment iD\n */\nexport default async function(resourceType: string, resourceId: number, commentId: number) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\t// Fetch newly created comment data\n\tawait client.deleteFile(commentPath)\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.ts'\n\n/**\n * Edit an existing comment\n *\n * @param resourceType the resource type\n * @param resourceId the resource ID\n * @param commentId the comment iD\n * @param message the message content\n */\nexport default async function(resourceType: string, resourceId: number, commentId: number, message: string) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\treturn await client.customRequest(commentPath, {\n\t\tmethod: 'PROPPATCH',\n\t\tdata: `\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t${message}\n\t\t\t\t\n\t\t\t\n\t\t\t`,\n\t})\n}\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * @param value - the string to decode\n * @param passes - the number of times to decode the string, default is 1\n */\nexport function decodeHtmlEntities(value: string, passes = 1) {\n\tconst parser = new DOMParser()\n\tlet decoded = value\n\tfor (let i = 0; i < passes; i++) {\n\t\tdecoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent\n\t}\n\treturn decoded\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { getRootPath } from '../utils/davUtils.ts'\nimport { decodeHtmlEntities } from '../utils/decodeHtmlEntities.ts'\nimport client from './DavClient.ts'\n\n/**\n * Retrieve the comments list\n *\n * @param resourceType the resource type\n * @param resourceId the resource ID\n * @param message the message\n * @return The new comment\n */\nexport default async function(resourceType: string, resourceId: number, message: string) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\n\tconst response = await axios.post(getRootPath() + resourcePath, {\n\t\tactorDisplayName: getCurrentUser()!.displayName,\n\t\tactorId: getCurrentUser()!.uid,\n\t\tactorType: 'users',\n\t\tcreationDateTime: (new Date()).toUTCString(),\n\t\tmessage,\n\t\tobjectType: resourceType,\n\t\tverb: 'comment',\n\t})\n\n\t// Retrieve comment id from resource location\n\tconst commentId = parseInt(response.headers['content-location'].split('/').pop())\n\tconst commentPath = resourcePath + '/' + commentId\n\n\t// Fetch newly created comment data\n\tconst comment = await client.stat(commentPath, {\n\t\tdetails: true,\n\t})\n\n\tconst props = comment.data.props\n\t// Decode twice to handle potentially double-encoded entities\n\t// FIXME Remove this once https://github.com/nextcloud/server/issues/29306\n\t// is resolved\n\tprops.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2)\n\tprops.message = decodeHtmlEntities(props.message, 2)\n\n\treturn comment.data\n}\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineStore } from 'pinia'\n\nexport const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {\n\tstate: () => ({\n\t\tidsInLimbo: [],\n\t}),\n\tactions: {\n\t\taddId(id) {\n\t\t\tthis.idsInLimbo.push(id)\n\t\t},\n\n\t\tremoveId(id) {\n\t\t\tconst index = this.idsInLimbo.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.idsInLimbo.splice(index, 1)\n\t\t\t}\n\t\t},\n\n\t\tcheckForId(id) {\n\t\t\treturn this.idsInLimbo.includes(id)\n\t\t},\n\t},\n})\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'\nimport { mapStores } from 'pinia'\nimport logger from '../logger.ts'\nimport DeleteComment from '../services/DeleteComment.ts'\nimport EditComment from '../services/EditComment.ts'\nimport NewComment from '../services/NewComment.ts'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.ts'\n\nexport default {\n\tprops: {\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tresourceId: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: 'files',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdeleted: false,\n\t\t\tediting: false,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\t},\n\n\tmethods: {\n\t\t// EDITION\n\t\tonEdit() {\n\t\t\tthis.editing = true\n\t\t},\n\t\tonEditCancel() {\n\t\t\tthis.editing = false\n\t\t\t// Restore original value\n\t\t\tthis.updateLocalMessage(this.message)\n\t\t},\n\t\tasync onEditComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tawait EditComment(this.resourceType, this.resourceId, this.id, message)\n\t\t\t\tlogger.debug('Comment edited', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id, message })\n\t\t\t\tthis.$emit('update:message', message)\n\t\t\t\tthis.editing = false\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to edit the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to edit the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t// DELETION\n\t\tonDeleteWithUndo() {\n\t\t\tthis.$emit('delete')\n\t\t\tthis.deleted = true\n\t\t\tthis.deletedCommentLimboStore.addId(this.id)\n\t\t\tconst timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)\n\t\t\tshowUndo(t('comments', 'Comment deleted'), () => {\n\t\t\t\tclearTimeout(timeOutDelete)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t})\n\t\t},\n\t\tasync onDelete() {\n\t\t\ttry {\n\t\t\t\tawait DeleteComment(this.resourceType, this.resourceId, this.id)\n\t\t\t\tlogger.debug('Comment deleted', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id })\n\t\t\t\tthis.$emit('delete', this.id)\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to delete the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to delete the comment', { error })\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t}\n\t\t},\n\n\t\t// CREATION\n\t\tasync onNewComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst newComment = await NewComment(this.resourceType, this.resourceId, message)\n\t\t\t\tlogger.debug('New comment posted', { resourceType: this.resourceType, resourceId: this.resourceId, newComment })\n\t\t\t\tthis.$emit('new', newComment)\n\n\t\t\t\t// Clear old content\n\t\t\t\tthis.$emit('update:message', '')\n\t\t\t\tthis.localMessage = ''\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to create the comment'))\n\t\t\t\tlogger.error('An error occurred while trying to create the comment', { error })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n","\n\n\t\n\t\t\n\t\t
\n\n\n\n\n\n","\n\n\n\n\n\t\n\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_ctx","$props","_cache","$event","_createElementVNode","_openBlock","markCommentsAsRead","resourceType","resourceId","date","resourcePath","readMarker","client","cancelableRequest","request","controller","signal","url","options","CommentEntry","NcEmptyContent","NcButton","IconRefresh","IconMessageReplyTextOutline","IconAlertCircleOutline","elementVisibility","CommentView","t","isVisible","e","showError","abort","getComments","comments","DEFAULT_LIMIT","comment","error","logger","id","index","_normalizeClass","$options","_createVNode","_component_CommentEntry","$data","_Fragment","_createBlock","_component_NcEmptyContent","_component_IconMessageReplyTextOutline","_hoisted_1","_renderList","_hoisted_2","_toDisplayString","_component_IconAlertCircleOutline","_component_NcButton","_component_IconRefresh","_createTextVNode","props","__props","computed","CommentsApp"],"mappings":"4qBAoBA,MAAKA,EAAU,CACb,KAAM,yBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,6DAxBYC,EAAA,CAAA,EAAE,qLAAqL,+CAXjMC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,iDACN,KAAK,MACJ,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAE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,IAAAP,EAA6E,MAA7EqD,EAA6E,GAE7DV,EAAA,aAAeG,EAAA,UAA/B9C,EAEM,MAFND,GAEMuD,EADFX,EAAA,EAAC,WAAA,kBAAA,CAAA,EAAA,CAAA,GAIgBG,EAAA,WAArB9C,EAYW+C,EAAA,CAAA,IAAA,CAAA,EAAA,CAXVH,EAIiBK,EAAA,CAJD,MAAM,kBAAmB,KAAMH,EAAA,QACnC,OACV,IAA0B,CAA1BF,EAA0BW,CAAA,qBAG5BX,EAKWY,EAAA,CALD,MAAM,kBAAmB,QAAOb,EAAA,cAC9B,OACV,IAAe,CAAfC,EAAea,CAAA,cACL,IACX,CADWC,EAAA,MACRf,EAAA,EAAC,WAAA,OAAA,CAAA,EAAA,CAAA,sDAzDeA,EAAA,kBAAkB,mKCI1C,MAAMgB,EAAQC,EAWRlD,EAAamD,EAAS,IAAMF,EAAM,MAAM,MAAM,eAK5CjD,EAAA,QAAe,YADtBsC,EAIwBc,GAAA,CAFtB,IAAKpD,EAAA,MACL,WAAYA,EAAA,MACb,aAAa,OAAA","x_google_ignoreList":[0,1,2]}
\ No newline at end of file
diff --git a/dist/FilesSidebarTab-B1Mys2Cd.chunk.mjs.map.license b/dist/FilesSidebarTab-B6LBX0YH.chunk.mjs.map.license
similarity index 100%
rename from dist/FilesSidebarTab-B1Mys2Cd.chunk.mjs.map.license
rename to dist/FilesSidebarTab-B6LBX0YH.chunk.mjs.map.license
diff --git a/dist/GetComments-DcBPvVJt.chunk.mjs b/dist/GetComments-DcBPvVJt.chunk.mjs
new file mode 100644
index 0000000000000..a8bd15c3b764e
--- /dev/null
+++ b/dist/GetComments-DcBPvVJt.chunk.mjs
@@ -0,0 +1,11 @@
+import{_ as Et}from"./index-CI-5vlTq.chunk.mjs";import{h as $t,q as yt,t as B}from"./index-C6ey-Mhx.chunk.mjs";import{r as Pt}from"./util-djQ-4xJ5.chunk.mjs";import{g as Mt}from"./dav-sq7XGhQT.chunk.mjs";function At(){return $t("dav/comments")}const Tt=Mt(At());var V,it;function Wt(){if(it)return V;it=1,V=o;function o(n,s,r){n instanceof RegExp&&(n=t(n,r)),s instanceof RegExp&&(s=t(s,r));var i=e(n,s,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+n.length,i[1]),post:r.slice(i[1]+s.length)}}function t(n,s){var r=s.match(n);return r?r[0]:null}o.range=e;function e(n,s,r){var i,h,l,a,u,p=r.indexOf(n),f=r.indexOf(s,p+1),v=p;if(p>=0&&f>0){if(n===s)return[p,f];for(i=[],l=r.length;v>=0&&!u;)v==p?(i.push(v),p=r.indexOf(n,v+1)):i.length==1?u=[i.pop(),f]:(h=i.pop(),h=0?p:f;i.length&&(u=[l,a])}return u}return V}var q,ot;function Nt(){if(ot)return q;ot=1;var o=Wt();q=u;var t="\0SLASH"+Math.random()+"\0",e="\0OPEN"+Math.random()+"\0",n="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",r="\0PERIOD"+Math.random()+"\0";function i(m){return parseInt(m,10)==m?parseInt(m,10):m.charCodeAt(0)}function h(m){return m.split("\\\\").join(t).split("\\{").join(e).split("\\}").join(n).split("\\,").join(s).split("\\.").join(r)}function l(m){return m.split(t).join("\\").split(e).join("{").split(n).join("}").split(s).join(",").split(r).join(".")}function a(m){if(!m)return[""];var b=[],x=o("{","}",m);if(!x)return m.split(",");var T=x.pre,c=x.body,g=x.post,w=T.split(",");w[w.length-1]+="{"+c+"}";var d=a(g);return g.length&&(w[w.length-1]+=d.shift(),w.push.apply(w,d)),b.push.apply(b,w),b}function u(m,b){if(!m)return[];b=b||{};var x=b.max==null?1/0:b.max;return m.substr(0,2)==="{}"&&(m="\\{\\}"+m.substr(2)),y(h(m),x,!0).map(l)}function p(m){return"{"+m+"}"}function f(m){return/^-?0\d/.test(m)}function v(m,b){return m<=b}function S(m,b){return m>=b}function y(m,b,x){var T=[],c=o("{","}",m);if(!c)return[m];var g=c.pre,w=c.post.length?y(c.post,b,!1):[""];if(/\$$/.test(c.pre))for(var d=0;d=0;if(!P&&!W)return c.post.match(/,(?!,).*\}/)?(m=c.pre+"{"+c.body+n+c.post,y(m,b,!0)):[m];var E;if(P)E=c.body.split(/\.\./);else if(E=a(c.body),E.length===1&&(E=y(E[0],b,!1).map(p),E.length===1))return w.map(function(Ot){return c.pre+E[0]+Ot});var L;if(P){var G=i(E[0]),F=i(E[1]),Z=Math.max(E[0].length,E[1].length),et=E.length==3?Math.max(Math.abs(i(E[2])),1):1,nt=v,xt=F0){var rt=new Array(st+1).join("0");C<0?_="-"+rt+_.slice(1):_=rt+_}}L.push(_)}}else{L=[];for(var z=0;z{if(typeof o!="string")throw new TypeError("invalid pattern");if(o.length>_t)throw new TypeError("pattern is too long")},zt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},I=o=>o.replace(/[[\]\\-]/g,"\\$&"),Ct=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ht=o=>o.join(""),It=(o,t)=>{const e=t;if(o.charAt(e)!=="[")throw new Error("not in a brace expression");const n=[],s=[];let r=e+1,i=!1,h=!1,l=!1,a=!1,u=e,p="";t:for(;rp?n.push(I(p)+"-"+I(S)):S===p&&n.push(I(S)),p="",r++;continue}if(o.startsWith("-]",r+1)){n.push(I(S+"-")),r+=2;continue}if(o.startsWith("-",r+1)){p=S,r+=2;continue}n.push(I(S)),r++}if(ut?o.replace(/\[([^\/\\])\]/g,"$1"):o.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var N;const kt=new Set(["!","?","+","*","@"]),Y=o=>kt.has(o),at=o=>Y(o.type),Gt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Ft=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Zt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),lt=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Jt="(?!(?:^|/)\\.\\.?(?:$|/))",J="(?!\\.)",Bt=new Set(["[","."]),Ht=new Set(["..","."]),Ut=new Set("().*{}+?[]^$\\!"),Vt=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),D="[^/]",ct=D+"*?",ut=D+"+?";class tt{type;#n;#s;#r=!1;#t=[];#e;#h;#l;#a=!1;#i;#o;#c=!1;constructor(t,e,n={}){this.type=t,t&&(this.#s=!0),this.#e=e,this.#n=this.#e?this.#e.#n:this,this.#i=this.#n===this?n:this.#n.#i,this.#l=this.#n===this?[]:this.#n.#l,t==="!"&&!this.#n.#a&&this.#l.push(this),this.#h=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#o=this.#t.map(t=>String(t)).join("")}#y(){if(this!==this.#n)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#l.pop();){if(t.type!=="!")continue;let e=t,n=e.#e;for(;n;){for(let s=e.#h+1;!n.type&&stypeof e=="string"?e:e.toJSON()):[this.type,...this.#t.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#e?.isStart())return!1;if(this.#h===0)return!0;const t=this.#e;for(let e=0;e{const[v,S,y,m]=typeof f=="string"?N.#j(f,this.#s,l):f.toRegExpSource(t);return this.#s=this.#s||y,this.#r=this.#r||m,v}).join("");let u="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Ht.has(this.#t[0]))){const f=Bt,v=e&&f.has(a.charAt(0))||a.startsWith("\\.")&&f.has(a.charAt(2))||a.startsWith("\\.\\.")&&f.has(a.charAt(4)),S=!e&&!t&&f.has(a.charAt(0));u=v?Jt:S?J:""}let p="";return this.isEnd()&&this.#n.#a&&this.#e?.type==="!"&&(p="(?:$|\\/)"),[u+a+p,k(a),this.#s=!!this.#s,this.#r]}const n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){const l=this.toString(),a=this;return a.#t=[l],a.type=null,a.#s=void 0,[l,k(this.toString()),!1,!1]}let i=!n||t||e||!J?"":this.#d(!0);i===r&&(i=""),i&&(r=`(?:${r})(?:${i})*?`);let h="";if(this.type==="!"&&this.#c)h=(this.isStart()&&!e?J:"")+ut;else{const l=this.type==="!"?"))"+(this.isStart()&&!e&&!t?J:"")+ct+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?")?":`)${this.type}`;h=s+r+l}return[h,k(r),this.#s=!!this.#s,this.#r]}#d(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[n,s,r,i]=e.toRegExpSource(t);return this.#r=this.#r||i,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#j(t,e,n=!1){let s=!1,r="",i=!1,h=!1;for(let l=0;lt?o.replace(/[?*()[\]]/g,"[$&]"):o.replace(/[?*()[\]\\]/g,"\\$&");var K={};const A=(o,t,e={})=>(H(t),!e.nocomment&&t.charAt(0)==="#"?!1:new U(t,e).match(o)),Kt=/^\*+([^+@!?\*\[\(]*)$/,Qt=o=>t=>!t.startsWith(".")&&t.endsWith(o),Xt=o=>t=>t.endsWith(o),Yt=o=>(o=o.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(o)),Dt=o=>(o=o.toLowerCase(),t=>t.toLowerCase().endsWith(o)),te=/^\*+\.\*+$/,ee=o=>!o.startsWith(".")&&o.includes("."),ne=o=>o!=="."&&o!==".."&&o.includes("."),se=/^\.\*+$/,re=o=>o!=="."&&o!==".."&&o.startsWith("."),ie=/^\*+$/,oe=o=>o.length!==0&&!o.startsWith("."),he=o=>o.length!==0&&o!=="."&&o!=="..",ae=/^\?+([^+@!?\*\[\(]*)?$/,le=([o,t=""])=>{const e=bt([o]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},ce=([o,t=""])=>{const e=wt([o]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},ue=([o,t=""])=>{const e=wt([o]);return t?n=>e(n)&&n.endsWith(t):e},pe=([o,t=""])=>{const e=bt([o]);return t?n=>e(n)&&n.endsWith(t):e},bt=([o])=>{const t=o.length;return e=>e.length===t&&!e.startsWith(".")},wt=([o])=>{const t=o.length;return e=>e.length===t&&e!=="."&&e!==".."},vt=typeof B=="object"&&B?typeof K=="object"&&K&&K.__MINIMATCH_TESTING_PLATFORM__||B.platform:"posix",pt={win32:{sep:"\\"},posix:{sep:"/"}},fe=vt==="win32"?pt.win32.sep:pt.posix.sep;A.sep=fe;const M=Symbol("globstar **");A.GLOBSTAR=M;const ge="[^/]",me=ge+"*?",de="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ye="(?:(?!(?:\\/|^)\\.).)*?",be=(o,t={})=>e=>A(e,o,t);A.filter=be;const R=(o,t={})=>Object.assign({},o,t),we=o=>{if(!o||typeof o!="object"||!Object.keys(o).length)return A;const t=A;return Object.assign((e,n,s={})=>t(e,n,R(o,s)),{Minimatch:class extends t.Minimatch{constructor(e,n={}){super(e,R(o,n))}static defaults(e){return t.defaults(R(o,e)).Minimatch}},AST:class extends t.AST{constructor(e,n,s={}){super(e,n,R(o,s))}static fromGlob(e,n={}){return t.AST.fromGlob(e,R(o,n))}},unescape:(e,n={})=>t.unescape(e,R(o,n)),escape:(e,n={})=>t.escape(e,R(o,n)),filter:(e,n={})=>t.filter(e,R(o,n)),defaults:e=>t.defaults(R(o,e)),makeRe:(e,n={})=>t.makeRe(e,R(o,n)),braceExpand:(e,n={})=>t.braceExpand(e,R(o,n)),match:(e,n,s={})=>t.match(e,n,R(o,s)),sep:t.sep,GLOBSTAR:M})};A.defaults=we;const St=(o,t={})=>(H(o),t.nobrace||!/\{(?:(?!\{).)*\}/.test(o)?[o]:Lt(o));A.braceExpand=St;const ve=(o,t={})=>new U(o,t).makeRe();A.makeRe=ve;const Se=(o,t,e={})=>{const n=new U(t,e);return o=o.filter(s=>n.match(s)),n.options.nonull&&!o.length&&o.push(t),o};A.match=Se;const ft=/[?*]|[+@!]\(.*?\)|\[|\]/,xe=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class U{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,e={}){H(t),e=e||{},this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion??200,this.pattern=t,this.platform=e.platform||vt,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((r,i,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=r[0]===""&&r[1]===""&&(r[2]==="?"||!ft.test(r[2]))&&!ft.test(r[3]),a=/^[a-z]:/i.test(r[0]);if(l)return[...r.slice(0,4),...r.slice(4).map(u=>this.parse(u))];if(a)return[r[0],...r.slice(1).map(u=>this.parse(u))]}return r.map(l=>this.parse(l))});if(this.debug(this.pattern,s),this.set=s.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let n=-1;for(;(n=e.indexOf("**",n+1))!==-1;){let s=n;for(;e[s+1]==="**";)s++;s!==n&&e.splice(n,s-n)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((n,s)=>{const r=n[n.length-1];return s==="**"&&r==="**"?n:s===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(n.pop(),n):(n.push(s),n)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;ss&&n.splice(s+1,i-s);let h=n[s+1];const l=n[s+2],a=n[s+3];if(h!==".."||!l||l==="."||l===".."||!a||a==="."||a==="..")continue;e=!0,n.splice(s,1);const u=n.slice(0);u[s]="**",t.push(u),s--}if(!this.preserveMultipleSlashes){for(let i=1;ie.length)}partsMatch(t,e,n=!1){let s=0,r=0,i=[],h="";for(;s=2&&(t=this.levelTwoFileOptimize(t)),e.includes(M)?this.#n(t,e,n,s,r):this.#r(t,e,n,s,r)}#n(t,e,n,s,r){const i=e.indexOf(M,r),h=e.lastIndexOf(M),[l,a,u]=n?[e.slice(r,i),e.slice(i+1),[]]:[e.slice(r,i),e.slice(i+1,h),e.slice(h+1)];if(l.length){const x=t.slice(s,s+l.length);if(!this.#r(x,l,n,0,0))return!1;s+=l.length}let p=0;if(u.length){if(u.length+s>t.length)return!1;let x=t.length-u.length;if(this.#r(t,u,n,x,0))p=u.length;else{if(t[t.length-1]!==""||s+u.length===t.length||(x--,!this.#r(t,u,n,x,0)))return!1;p=u.length+1}}if(!a.length){let x=!!p;for(let T=s;T{const a=l.map(u=>{if(u instanceof RegExp)for(const p of u.flags.split(""))s.add(p);return typeof u=="string"?xe(u):u===M?M:u._src});return a.forEach((u,p)=>{const f=a[p+1],v=a[p-1];u!==M||v===M||(v===void 0?f!==void 0&&f!==M?a[p+1]="(?:\\/|"+n+"\\/)?"+f:a[p]=n:f===void 0?a[p-1]=v+"(?:\\/|"+n+")?":f!==M&&(a[p-1]=v+"(?:\\/|\\/"+n+"\\/)"+f,a[p+1]=M))}),a.filter(u=>u!==M).join("/")}).join("|");const[i,h]=t.length>1?["(?:",")"]:["",""];r="^"+i+r+h+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const r=this.set;this.debug(this.pattern,"set",r);let i=s[s.length-1];if(!i)for(let h=s.length-2;!i&&h>=0;h--)i=s[h];for(let h=0;h=-1&&!h;l--){var a=l>=0?arguments[l]:B.cwd();if(t(a)){if(!a)continue}else throw new TypeError("Arguments to path.resolve must be strings");i=a+"/"+i,h=a.charAt(0)==="/"}return i=e(i.split("/"),!h).join("/"),(h?"/":"")+i||"."},s.normalize=function(i){var h=s.isAbsolute(i),l=i.substr(-1)==="/";return i=e(i.split("/"),!h).join("/"),!i&&!h&&(i="."),i&&l&&(i+="/"),(h?"/":"")+i},s.isAbsolute=function(i){return i.charAt(0)==="/"},s.join=function(){for(var i="",h=0;h=0&&y[b]==="";b--);return m>b?[]:y.slice(m,b+1)}for(var a=l(i.split("/")),u=l(h.split("/")),p=Math.min(a.length,u.length),f=p,v=0;v
"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function l(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function a(c,g){return a=Object.setPrototypeOf||function(w,d){return w.__proto__=d,w},a(c,g)}function u(c){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(g){return g.__proto__||Object.getPrototypeOf(g)},u(c)}var p="+",f=".",v=(function(c){s(g,c);function g(w){var d;return t(this,g),d=e(this,u(g).call(this,w)),d.name="ObjectPrototypeMutationError",d}return g})(r(Error));X={set:m,get:S,has:y,hasOwn:function(c,g,w){return this.has(c,g,w||{own:!0})},isIn:b,ObjectPrototypeMutationError:v};function S(c,g){if(o(c)!="object"||c===null||typeof g>"u")return c;if(typeof g=="number")return c[g];try{return x(c,g,function(w,d){return w[d]})}catch{return c}}function y(c,g){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(o(c)!="object"||c===null||typeof g>"u")return!1;if(typeof g=="number")return g in c;try{var d=!1;return x(c,g,function(j,$,O,P){if(T(O,P))w.own?d=j.hasOwnProperty($):d=$ in j;else return j&&j[$]}),d}catch{return!1}}function m(c,g,w){if(o(c)!="object"||c===null||typeof g>"u")return c;if(typeof g=="number")return c[g]=w,c[g];try{return x(c,g,function(d,j,$,O){if(d===Reflect.getPrototypeOf({}))throw new v("Attempting to mutate Object.prototype");if(!d[j]){var P=Number.isInteger(Number($[O+1])),W=$[O+1]===p;P||W?d[j]=[]:d[j]={}}return T($,O)&&(d[j]=w),d[j]})}catch(d){if(d instanceof v)throw d;return c}}function b(c,g,w){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(o(c)!="object"||c===null||typeof g>"u")return!1;try{var j=!1,$=!1;return x(c,g,function(O,P,W,E){return j=j||O===w||!!O&&O[P]===w,$=T(W,E)&&o(O)==="object"&&P in O,O&&O[P]}),d.validPath?j&&$:j}catch{return!1}}function x(c,g){for(var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},d=g.split(f),j=d.length,$=function(W){var E=d[W];if(!c)return{v:void 0};if(E===p){if(Array.isArray(c))return{v:c.map(function(G,F){var Z=d.slice(W+1);return Z.length>0?x(G,Z.join(f),w):w(c,F,d,W)})};var L=d.slice(0,W).join(f);throw new Error("Object at wildcard (".concat(L,") is not an array"))}else c=w(c,E,d,W)},O=0;O${e.datetime.toISOString()}`:"",r=await Tt.customRequest(n,{method:"REPORT",data:`
+
+ ${e.limit??Te}
+ ${e.offset||0}
+ ${s}
+ `,...e}),i=await r.text(),h=await Et(i),l=We(h,!0);return Oe(r,l,!0)}function We(o,t=!1){const{multistatus:{response:e}}=o;return e.map(n=>{const s=n.propstat.prop;return Ae(s,s.id.toString(),t)})}export{Te as D,At as a,Tt as c,ze as g};
+//# sourceMappingURL=GetComments-DcBPvVJt.chunk.mjs.map
diff --git a/dist/GetComments-PgOpAezt.chunk.mjs.license b/dist/GetComments-DcBPvVJt.chunk.mjs.license
similarity index 97%
rename from dist/GetComments-PgOpAezt.chunk.mjs.license
rename to dist/GetComments-DcBPvVJt.chunk.mjs.license
index 4e8e629fa441f..f37858651e987 100644
--- a/dist/GetComments-PgOpAezt.chunk.mjs.license
+++ b/dist/GetComments-DcBPvVJt.chunk.mjs.license
@@ -13,7 +13,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.0.2
- license: MIT
- brace-expansion
- - version: 2.0.2
+ - version: 2.1.1
- license: MIT
- minimatch
- version: 9.0.9
diff --git a/dist/GetComments-DcBPvVJt.chunk.mjs.map b/dist/GetComments-DcBPvVJt.chunk.mjs.map
new file mode 100644
index 0000000000000..b0655de75e54b
--- /dev/null
+++ b/dist/GetComments-DcBPvVJt.chunk.mjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"GetComments-DcBPvVJt.chunk.mjs","sources":["../build/frontend/apps/comments/src/utils/davUtils.ts","../build/frontend/apps/comments/src/services/DavClient.ts","../node_modules/balanced-match/index.js","../node_modules/webdav/node_modules/brace-expansion/index.js","../node_modules/webdav/node_modules/minimatch/dist/esm/assert-valid-pattern.js","../node_modules/webdav/node_modules/minimatch/dist/esm/brace-expressions.js","../node_modules/webdav/node_modules/minimatch/dist/esm/unescape.js","../node_modules/webdav/node_modules/minimatch/dist/esm/ast.js","../node_modules/webdav/node_modules/minimatch/dist/esm/escape.js","../node_modules/webdav/node_modules/minimatch/dist/esm/index.js","../node_modules/webdav/dist/node/tools/headers.js","../node_modules/webdav/dist/node/response.js","../node_modules/path-posix/index.js","../node_modules/nested-property/dist/nested-property.js","../node_modules/webdav/dist/node/tools/dav.js","../build/frontend/apps/comments/src/services/GetComments.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n/**\n *\n */\nfunction getRootPath() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getClient } from '@nextcloud/files/dav'\nimport { getRootPath } from '../utils/davUtils.ts'\n\nconst client = getClient(getRootPath())\n\nexport default client\n","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str, options) {\n if (!str)\n return [];\n\n options = options || {};\n var max = options.max == null ? Infinity : options.max;\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), max, true).map(unescapeBraces);\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, max, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m) return [str];\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, max, false)\n : [''];\n\n if (/\\$$/.test(m.pre)) { \n for (var k = 0; k < post.length && k < max; k++) {\n var expansion = pre+ '{' + m.body + '}' + post[k];\n expansions.push(expansion);\n }\n } else {\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str, max, true);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], max, false).map(embrace);\n if (n.length === 1) {\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.max(Math.abs(numeric(n[2])), 1)\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y) && N.length < max; i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = [];\n\n for (var j = 0; j < n.length; j++) {\n N.push.apply(N, expand(n[j], max, false));\n }\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length && expansions.length < max; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n }\n\n return expansions;\n}\n","const MAX_PATTERN_LENGTH = 1024 * 64;\nexport const assertValidPattern = (pattern) => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern');\n }\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long');\n }\n};\n//# sourceMappingURL=assert-valid-pattern.js.map","// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n// { : [, /u flag required, negated]\nconst posixClasses = {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n};\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s) => s.replace(/[[\\]\\\\-]/g, '\\\\$&');\n// escape all regexp magic characters\nconst regexpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges) => ranges.join('');\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (glob, position) => {\n const pos = position;\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression');\n }\n /* c8 ignore stop */\n const ranges = [];\n const negs = [];\n let i = pos + 1;\n let sawStart = false;\n let uflag = false;\n let escaping = false;\n let negate = false;\n let endPos = pos;\n let rangeStart = '';\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i);\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true;\n i++;\n continue;\n }\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1;\n break;\n }\n sawStart = true;\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true;\n i++;\n continue;\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true];\n }\n i += cls.length;\n if (neg)\n negs.push(unip);\n else\n ranges.push(unip);\n uflag = uflag || u;\n continue WHILE;\n }\n }\n }\n // now it's just a normal character, effectively\n escaping = false;\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));\n }\n else if (c === rangeStart) {\n ranges.push(braceEscape(c));\n }\n rangeStart = '';\n i++;\n continue;\n }\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'));\n i += 2;\n continue;\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c;\n i += 2;\n continue;\n }\n // not the start of a range, just a single character\n ranges.push(braceEscape(c));\n i++;\n }\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false];\n }\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true];\n }\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];\n return [regexpEscape(r), false, endPos - pos, false];\n }\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';\n const comb = ranges.length && negs.length\n ? '(' + sranges + '|' + snegs + ')'\n : ranges.length\n ? sranges\n : snegs;\n return [comb, uflag, endPos - pos, true];\n};\n//# sourceMappingURL=brace-expressions.js.map","/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes. For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {\n return windowsPathsNoEscape\n ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1');\n};\n//# sourceMappingURL=unescape.js.map","// parse a single path portion\nvar _a;\nimport { parseClass } from './brace-expressions.js';\nimport { unescape } from './unescape.js';\nconst types = new Set(['!', '?', '+', '*', '@']);\nconst isExtglobType = (c) => types.has(c);\nconst isExtglobAST = (c) => isExtglobType(c.type);\nconst adoptionMap = new Map([\n ['!', ['@']],\n ['?', ['?', '@']],\n ['@', ['@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@']],\n]);\nconst adoptionWithSpaceMap = new Map([\n ['!', ['?']],\n ['@', ['?']],\n ['+', ['?', '*']],\n]);\nconst adoptionAnyMap = new Map([\n ['!', ['?', '@']],\n ['?', ['?', '@']],\n ['@', ['?', '@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@', '?', '*']],\n]);\nconst usurpMap = new Map([\n ['!', new Map([['!', '@']])],\n ['?', new Map([['*', '*'], ['+', '*']])],\n ['@', new Map([['!', '!'], ['?', '?'], ['@', '@'], ['*', '*'], ['+', '+']])],\n ['+', new Map([['?', '*'], ['*', '*']])],\n]);\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))';\nconst startNoDot = '(?!\\\\.)';\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.']);\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.']);\nconst reSpecials = new Set('().*{}+?[]^$\\\\!');\nconst regExpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// any single thing other than /\nconst qmark = '[^/]';\n// * => any number of characters\nconst star = qmark + '*?';\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?';\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\nexport class AST {\n type;\n #root;\n #hasMagic;\n #uflag = false;\n #parts = [];\n #parent;\n #parentIndex;\n #negs;\n #filledNegs = false;\n #options;\n #toString;\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt = false;\n constructor(type, parent, options = {}) {\n this.type = type;\n // extglobs are inherently magical\n if (type)\n this.#hasMagic = true;\n this.#parent = parent;\n this.#root = this.#parent ? this.#parent.#root : this;\n this.#options = this.#root === this ? options : this.#root.#options;\n this.#negs = this.#root === this ? [] : this.#root.#negs;\n if (type === '!' && !this.#root.#filledNegs)\n this.#negs.push(this);\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;\n }\n get hasMagic() {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined)\n return this.#hasMagic;\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string')\n continue;\n if (p.type || p.hasMagic)\n return (this.#hasMagic = true);\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic;\n }\n // reconstructs the pattern\n toString() {\n if (this.#toString !== undefined)\n return this.#toString;\n if (!this.type) {\n return (this.#toString = this.#parts.map(p => String(p)).join(''));\n }\n else {\n return (this.#toString =\n this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');\n }\n }\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root)\n throw new Error('should only call on root');\n if (this.#filledNegs)\n return this;\n /* c8 ignore stop */\n // call toString() once to fill this out\n this.toString();\n this.#filledNegs = true;\n let n;\n while ((n = this.#negs.pop())) {\n if (n.type !== '!')\n continue;\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p = n;\n let pp = p.#parent;\n while (pp) {\n for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??');\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i]);\n }\n }\n p = pp;\n pp = p.#parent;\n }\n }\n return this;\n }\n push(...parts) {\n for (const p of parts) {\n if (p === '')\n continue;\n /* c8 ignore start */\n if (typeof p !== 'string' && !(p instanceof _a && p.#parent === this)) {\n throw new Error('invalid part: ' + p);\n }\n /* c8 ignore stop */\n this.#parts.push(p);\n }\n }\n toJSON() {\n const ret = this.type === null\n ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => p.toJSON())];\n if (this.isStart() && !this.type)\n ret.unshift([]);\n if (this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))) {\n ret.push({});\n }\n return ret;\n }\n isStart() {\n if (this.#root === this)\n return true;\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart())\n return false;\n if (this.#parentIndex === 0)\n return true;\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent;\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i];\n if (!(pp instanceof _a && pp.type === '!')) {\n return false;\n }\n }\n return true;\n }\n isEnd() {\n if (this.#root === this)\n return true;\n if (this.#parent?.type === '!')\n return true;\n if (!this.#parent?.isEnd())\n return false;\n if (!this.type)\n return this.#parent?.isEnd();\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0;\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1;\n }\n copyIn(part) {\n if (typeof part === 'string')\n this.push(part);\n else\n this.push(part.clone(this));\n }\n clone(parent) {\n const c = new _a(this.type, parent);\n for (const p of this.#parts) {\n c.copyIn(p);\n }\n return c;\n }\n static #parseAST(str, ast, pos, opt, extDepth) {\n const maxDepth = opt.maxExtglobRecursion ?? 2;\n let escaping = false;\n let inBrace = false;\n let braceStart = -1;\n let braceNeg = false;\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos;\n let acc = '';\n while (i < str.length) {\n const c = str.charAt(i++);\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping;\n acc += c;\n continue;\n }\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n const doRecurse = !opt.noext &&\n isExtglobType(c) &&\n str.charAt(i) === '(' &&\n extDepth <= maxDepth;\n if (doRecurse) {\n ast.push(acc);\n acc = '';\n const ext = new _a(c, ast);\n i = _a.#parseAST(str, ext, i, opt, extDepth + 1);\n ast.push(ext);\n continue;\n }\n acc += c;\n }\n ast.push(acc);\n return i;\n }\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1;\n let part = new _a(null, ast);\n const parts = [];\n let acc = '';\n while (i < str.length) {\n const c = str.charAt(i++);\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping;\n acc += c;\n continue;\n }\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n const doRecurse = isExtglobType(c) &&\n str.charAt(i) === '(' &&\n /* c8 ignore start - the maxDepth is sufficient here */\n (extDepth <= maxDepth || (ast && ast.#canAdoptType(c)));\n /* c8 ignore stop */\n if (doRecurse) {\n const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;\n part.push(acc);\n acc = '';\n const ext = new _a(c, part);\n part.push(ext);\n i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd);\n continue;\n }\n if (c === '|') {\n part.push(acc);\n acc = '';\n parts.push(part);\n part = new _a(null, ast);\n continue;\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true;\n }\n part.push(acc);\n acc = '';\n ast.push(...parts, part);\n return i;\n }\n acc += c;\n }\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null;\n ast.#hasMagic = undefined;\n ast.#parts = [str.substring(pos - 1)];\n return i;\n }\n #canAdoptWithSpace(child) {\n return this.#canAdopt(child, adoptionWithSpaceMap);\n }\n #canAdopt(child, map = adoptionMap) {\n if (!child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null) {\n return false;\n }\n const gc = child.#parts[0];\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false;\n }\n return this.#canAdoptType(gc.type, map);\n }\n #canAdoptType(c, map = adoptionAnyMap) {\n return !!map.get(this.type)?.includes(c);\n }\n #adoptWithSpace(child, index) {\n const gc = child.#parts[0];\n const blank = new _a(null, gc, this.options);\n blank.#parts.push('');\n gc.push(blank);\n this.#adopt(child, index);\n }\n #adopt(child, index) {\n const gc = child.#parts[0];\n this.#parts.splice(index, 1, ...gc.#parts);\n for (const p of gc.#parts) {\n if (typeof p === 'object')\n p.#parent = this;\n }\n this.#toString = undefined;\n }\n #canUsurpType(c) {\n const m = usurpMap.get(this.type);\n return !!(m?.has(c));\n }\n #canUsurp(child) {\n if (!child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null ||\n this.#parts.length !== 1) {\n return false;\n }\n const gc = child.#parts[0];\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false;\n }\n return this.#canUsurpType(gc.type);\n }\n #usurp(child) {\n const m = usurpMap.get(this.type);\n const gc = child.#parts[0];\n const nt = m?.get(gc.type);\n /* c8 ignore start - impossible */\n if (!nt)\n return false;\n /* c8 ignore stop */\n this.#parts = gc.#parts;\n for (const p of this.#parts) {\n if (typeof p === 'object')\n p.#parent = this;\n }\n this.type = nt;\n this.#toString = undefined;\n this.#emptyExt = false;\n }\n #flatten() {\n if (!isExtglobAST(this)) {\n for (const p of this.#parts) {\n if (typeof p === 'object')\n p.#flatten();\n }\n }\n else {\n let iterations = 0;\n let done = false;\n do {\n done = true;\n for (let i = 0; i < this.#parts.length; i++) {\n const c = this.#parts[i];\n if (typeof c === 'object') {\n c.#flatten();\n if (this.#canAdopt(c)) {\n done = false;\n this.#adopt(c, i);\n }\n else if (this.#canAdoptWithSpace(c)) {\n done = false;\n this.#adoptWithSpace(c, i);\n }\n else if (this.#canUsurp(c)) {\n done = false;\n this.#usurp(c);\n }\n }\n }\n } while (!done && ++iterations < 10);\n }\n this.#toString = undefined;\n }\n static fromGlob(pattern, options = {}) {\n const ast = new _a(null, undefined, options);\n _a.#parseAST(pattern, ast, 0, options, 0);\n return ast;\n }\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern() {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root)\n return this.#root.toMMPattern();\n /* c8 ignore stop */\n const glob = this.toString();\n const [re, body, hasMagic, uflag] = this.toRegExpSource();\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic = hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase());\n if (!anyMagic) {\n return body;\n }\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n });\n }\n get options() {\n return this.#options;\n }\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(allowDot) {\n const dot = allowDot ?? !!this.#options.dot;\n if (this.#root === this) {\n this.#flatten();\n this.#fillNegs();\n }\n if (!isExtglobAST(this)) {\n const noEmpty = this.isStart() && this.isEnd();\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] = typeof p === 'string'\n ? _a.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot);\n this.#hasMagic = this.#hasMagic || hasMagic;\n this.#uflag = this.#uflag || uflag;\n return re;\n })\n .join('');\n let start = '';\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);\n if (!dotTravAllowed) {\n const aps = addPatternStart;\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav = \n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)));\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));\n start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';\n }\n }\n }\n // append the \"end of path portion\" pattern to negation tails\n let end = '';\n if (this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!') {\n end = '(?:$|\\\\/)';\n }\n const final = start + src + end;\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ];\n }\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n const repeated = this.type === '*' || this.type === '+';\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:';\n let body = this.#partsToRegExp(dot);\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString();\n const me = this;\n me.#parts = [s];\n me.type = null;\n me.#hasMagic = undefined;\n return [s, unescape(this.toString()), false, false];\n }\n // XXX abstract out this map method\n let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot\n ? ''\n : this.#partsToRegExp(true);\n if (bodyDotAllowed === body) {\n bodyDotAllowed = '';\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`;\n }\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = '';\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;\n }\n else {\n const close = this.type === '!'\n ? // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@'\n ? ')'\n : this.type === '?'\n ? ')?'\n : this.type === '+' && bodyDotAllowed\n ? ')'\n : this.type === '*' && bodyDotAllowed\n ? `)?`\n : `)${this.type}`;\n final = start + body + close;\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ];\n }\n #partsToRegExp(dot) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??');\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);\n this.#uflag = this.#uflag || uflag;\n return re;\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|');\n }\n static #parseGlob(glob, hasMagic, noEmpty = false) {\n let escaping = false;\n let re = '';\n let uflag = false;\n // multiple stars that aren't globstars coalesce into one *\n let inStar = false;\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i);\n if (escaping) {\n escaping = false;\n re += (reSpecials.has(c) ? '\\\\' : '') + c;\n inStar = false;\n continue;\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\';\n }\n else {\n escaping = true;\n }\n continue;\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i);\n if (consumed) {\n re += src;\n uflag = uflag || needUflag;\n i += consumed - 1;\n hasMagic = hasMagic || magic;\n inStar = false;\n continue;\n }\n }\n if (c === '*') {\n if (inStar)\n continue;\n inStar = true;\n re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;\n hasMagic = true;\n continue;\n }\n else {\n inStar = false;\n }\n if (c === '?') {\n re += qmark;\n hasMagic = true;\n continue;\n }\n re += regExpEscape(c);\n }\n return [re, unescape(glob), !!hasMagic, uflag];\n }\n}\n_a = AST;\n//# sourceMappingURL=ast.js.map","/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (s, { windowsPathsNoEscape = false, } = {}) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&');\n};\n//# sourceMappingURL=escape.js.map","import expand from 'brace-expansion';\nimport { assertValidPattern } from './assert-valid-pattern.js';\nimport { AST } from './ast.js';\nimport { escape } from './escape.js';\nimport { unescape } from './unescape.js';\nexport const minimatch = (p, pattern, options = {}) => {\n assertValidPattern(pattern);\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false;\n }\n return new Minimatch(pattern, options).match(p);\n};\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/;\nconst starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);\nconst starDotExtTestDot = (ext) => (f) => f.endsWith(ext);\nconst starDotExtTestNocase = (ext) => {\n ext = ext.toLowerCase();\n return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);\n};\nconst starDotExtTestNocaseDot = (ext) => {\n ext = ext.toLowerCase();\n return (f) => f.toLowerCase().endsWith(ext);\n};\nconst starDotStarRE = /^\\*+\\.\\*+$/;\nconst starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');\nconst starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');\nconst dotStarRE = /^\\.\\*+$/;\nconst dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');\nconst starRE = /^\\*+$/;\nconst starTest = (f) => f.length !== 0 && !f.startsWith('.');\nconst starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/;\nconst qmarksTestNocase = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestNocaseDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTest = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTestNoExt = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && !f.startsWith('.');\n};\nconst qmarksTestNoExtDot = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && f !== '.' && f !== '..';\n};\n/* c8 ignore start */\nconst defaultPlatform = (typeof process === 'object' && process\n ? (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix');\nconst path = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n};\n/* c8 ignore stop */\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;\nminimatch.sep = sep;\nexport const GLOBSTAR = Symbol('globstar **');\nminimatch.GLOBSTAR = GLOBSTAR;\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]';\n// * => any number of characters\nconst star = qmark + '*?';\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?';\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?';\nexport const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);\nminimatch.filter = filter;\nconst ext = (a, b = {}) => Object.assign({}, a, b);\nexport const defaults = (def) => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch;\n }\n const orig = minimatch;\n const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern, options = {}) {\n super(pattern, ext(def, options));\n }\n static defaults(options) {\n return orig.defaults(ext(def, options)).Minimatch;\n }\n },\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(type, parent, options = {}) {\n super(type, parent, ext(def, options));\n }\n /* c8 ignore stop */\n static fromGlob(pattern, options = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options));\n }\n },\n unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),\n escape: (s, options = {}) => orig.escape(s, ext(def, options)),\n filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),\n defaults: (options) => orig.defaults(ext(def, options)),\n makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),\n braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),\n match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR,\n });\n};\nminimatch.defaults = defaults;\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (pattern, options = {}) => {\n assertValidPattern(pattern);\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern];\n }\n return expand(pattern);\n};\nminimatch.braceExpand = braceExpand;\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nexport const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();\nminimatch.makeRe = makeRe;\nexport const match = (list, pattern, options = {}) => {\n const mm = new Minimatch(pattern, options);\n list = list.filter(f => mm.match(f));\n if (mm.options.nonull && !list.length) {\n list.push(pattern);\n }\n return list;\n};\nminimatch.match = match;\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/;\nconst regExpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\nexport class Minimatch {\n options;\n set;\n pattern;\n windowsPathsNoEscape;\n nonegate;\n negate;\n comment;\n empty;\n preserveMultipleSlashes;\n partial;\n globSet;\n globParts;\n nocase;\n isWindows;\n platform;\n windowsNoMagicRoot;\n maxGlobstarRecursion;\n regexp;\n constructor(pattern, options = {}) {\n assertValidPattern(pattern);\n options = options || {};\n this.options = options;\n this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;\n this.pattern = pattern;\n this.platform = options.platform || defaultPlatform;\n this.isWindows = this.platform === 'win32';\n this.windowsPathsNoEscape =\n !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;\n if (this.windowsPathsNoEscape) {\n this.pattern = this.pattern.replace(/\\\\/g, '/');\n }\n this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;\n this.regexp = null;\n this.negate = false;\n this.nonegate = !!options.nonegate;\n this.comment = false;\n this.empty = false;\n this.partial = !!options.partial;\n this.nocase = !!this.options.nocase;\n this.windowsNoMagicRoot =\n options.windowsNoMagicRoot !== undefined\n ? options.windowsNoMagicRoot\n : !!(this.isWindows && this.nocase);\n this.globSet = [];\n this.globParts = [];\n this.set = [];\n // make the set of regexps etc.\n this.make();\n }\n hasMagic() {\n if (this.options.magicalBraces && this.set.length > 1) {\n return true;\n }\n for (const pattern of this.set) {\n for (const part of pattern) {\n if (typeof part !== 'string')\n return true;\n }\n }\n return false;\n }\n debug(..._) { }\n make() {\n const pattern = this.pattern;\n const options = this.options;\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true;\n return;\n }\n if (!pattern) {\n this.empty = true;\n return;\n }\n // step 1: figure out negation, etc.\n this.parseNegate();\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())];\n if (options.debug) {\n this.debug = (...args) => console.error(...args);\n }\n this.debug(this.pattern, this.globSet);\n // step 3: now we have a set, so turn each one into a series of\n // path-portion matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n //\n // First, we preprocess to make the glob pattern sets a bit simpler\n // and deduped. There are some perf-killing patterns that can cause\n // problems with a glob walk, but we can simplify them down a bit.\n const rawGlobParts = this.globSet.map(s => this.slashSplit(s));\n this.globParts = this.preprocess(rawGlobParts);\n this.debug(this.pattern, this.globParts);\n // glob --> regexps\n let set = this.globParts.map((s, _, __) => {\n if (this.isWindows && this.windowsNoMagicRoot) {\n // check if it's a drive or unc path.\n const isUNC = s[0] === '' &&\n s[1] === '' &&\n (s[2] === '?' || !globMagic.test(s[2])) &&\n !globMagic.test(s[3]);\n const isDrive = /^[a-z]:/i.test(s[0]);\n if (isUNC) {\n return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];\n }\n else if (isDrive) {\n return [s[0], ...s.slice(1).map(ss => this.parse(ss))];\n }\n }\n return s.map(ss => this.parse(ss));\n });\n this.debug(this.pattern, set);\n // filter out everything that didn't compile properly.\n this.set = set.filter(s => s.indexOf(false) === -1);\n // do not treat the ? in UNC paths as magic\n if (this.isWindows) {\n for (let i = 0; i < this.set.length; i++) {\n const p = this.set[i];\n if (p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])) {\n p[2] = '?';\n }\n }\n }\n this.debug(this.pattern, this.set);\n }\n // various transforms to equivalent pattern sets that are\n // faster to process in a filesystem walk. The goal is to\n // eliminate what we can, and push all ** patterns as far\n // to the right as possible, even if it increases the number\n // of patterns that we have to process.\n preprocess(globParts) {\n // if we're not in globstar mode, then turn all ** into *\n if (this.options.noglobstar) {\n for (let i = 0; i < globParts.length; i++) {\n for (let j = 0; j < globParts[i].length; j++) {\n if (globParts[i][j] === '**') {\n globParts[i][j] = '*';\n }\n }\n }\n }\n const { optimizationLevel = 1 } = this.options;\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts);\n globParts = this.secondPhasePreProcess(globParts);\n }\n else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts);\n }\n else {\n // just collapse multiple ** portions into one\n globParts = this.adjascentGlobstarOptimize(globParts);\n }\n return globParts;\n }\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts) {\n return globParts.map(parts => {\n let gs = -1;\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let i = gs;\n while (parts[i + 1] === '**') {\n i++;\n }\n if (i !== gs) {\n parts.splice(gs, i - gs);\n }\n }\n return parts;\n });\n }\n // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts) {\n return globParts.map(parts => {\n parts = parts.reduce((set, part) => {\n const prev = set[set.length - 1];\n if (part === '**' && prev === '**') {\n return set;\n }\n if (part === '..') {\n if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n set.pop();\n return set;\n }\n }\n set.push(part);\n return set;\n }, []);\n return parts.length === 0 ? [''] : parts;\n });\n }\n levelTwoFileOptimize(parts) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts);\n }\n let didSomething = false;\n do {\n didSomething = false;\n //
// ->
/\n if (!this.preserveMultipleSlashes) {\n for (let i = 1; i < parts.length - 1; i++) {\n const p = parts[i];\n // don't squeeze out UNC patterns\n if (i === 1 && p === '' && parts[0] === '')\n continue;\n if (p === '.' || p === '') {\n didSomething = true;\n parts.splice(i, 1);\n i--;\n }\n }\n if (parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')) {\n didSomething = true;\n parts.pop();\n }\n }\n //
/
/../ ->
/\n let dd = 0;\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1];\n if (p && p !== '.' && p !== '..' && p !== '**') {\n didSomething = true;\n parts.splice(dd - 1, 2);\n dd -= 2;\n }\n }\n } while (didSomething);\n return parts.length === 0 ? [''] : parts;\n }\n // First phase: single-pattern processing\n //
is 1 or more portions\n // is 1 or more portions\n //
is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //
/**/../
/
/ -> {
/../
/
/,
/**/
/
/}\n //
// ->
/\n //
/
/../ ->
/\n // **/**/ -> **/\n //\n // **/*/ -> */**/ <== not valid because ** doesn't follow\n // this WOULD be allowed if ** did follow symlinks, or * didn't\n firstPhasePreProcess(globParts) {\n let didSomething = false;\n do {\n didSomething = false;\n //
/**/../
/
/ -> {
/../
/
/,
/**/
/
/}\n for (let parts of globParts) {\n let gs = -1;\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss = gs;\n while (parts[gss + 1] === '**') {\n //
/**/**/ ->
/**/\n gss++;\n }\n // eg, if gs is 2 and gss is 4, that means we have 3 **\n // parts, and can remove 2 of them.\n if (gss > gs) {\n parts.splice(gs + 1, gss - gs);\n }\n let next = parts[gs + 1];\n const p = parts[gs + 2];\n const p2 = parts[gs + 3];\n if (next !== '..')\n continue;\n if (!p ||\n p === '.' ||\n p === '..' ||\n !p2 ||\n p2 === '.' ||\n p2 === '..') {\n continue;\n }\n didSomething = true;\n // edit parts in place, and push the new one\n parts.splice(gs, 1);\n const other = parts.slice(0);\n other[gs] = '**';\n globParts.push(other);\n gs--;\n }\n //
// ->
/\n if (!this.preserveMultipleSlashes) {\n for (let i = 1; i < parts.length - 1; i++) {\n const p = parts[i];\n // don't squeeze out UNC patterns\n if (i === 1 && p === '' && parts[0] === '')\n continue;\n if (p === '.' || p === '') {\n didSomething = true;\n parts.splice(i, 1);\n i--;\n }\n }\n if (parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')) {\n didSomething = true;\n parts.pop();\n }\n }\n //
/
/../ ->
/\n let dd = 0;\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1];\n if (p && p !== '.' && p !== '..' && p !== '**') {\n didSomething = true;\n const needDot = dd === 1 && parts[dd + 1] === '**';\n const splin = needDot ? ['.'] : [];\n parts.splice(dd - 1, 2, ...splin);\n if (parts.length === 0)\n parts.push('');\n dd -= 2;\n }\n }\n }\n } while (didSomething);\n return globParts;\n }\n // second phase: multi-pattern dedupes\n // {
/*/,
/
/} ->
/*/\n // {
/,
/} ->
/\n // {
/**/,
/} ->
/**/\n //\n // {
/**/,
/**/
/} ->
/**/\n // ^-- not valid because ** doens't follow symlinks\n secondPhasePreProcess(globParts) {\n for (let i = 0; i < globParts.length - 1; i++) {\n for (let j = i + 1; j < globParts.length; j++) {\n const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);\n if (matched) {\n globParts[i] = [];\n globParts[j] = matched;\n break;\n }\n }\n }\n return globParts.filter(gs => gs.length);\n }\n partsMatch(a, b, emptyGSMatch = false) {\n let ai = 0;\n let bi = 0;\n let result = [];\n let which = '';\n while (ai < a.length && bi < b.length) {\n if (a[ai] === b[bi]) {\n result.push(which === 'b' ? b[bi] : a[ai]);\n ai++;\n bi++;\n }\n else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n result.push(a[ai]);\n ai++;\n }\n else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n result.push(b[bi]);\n bi++;\n }\n else if (a[ai] === '*' &&\n b[bi] &&\n (this.options.dot || !b[bi].startsWith('.')) &&\n b[bi] !== '**') {\n if (which === 'b')\n return false;\n which = 'a';\n result.push(a[ai]);\n ai++;\n bi++;\n }\n else if (b[bi] === '*' &&\n a[ai] &&\n (this.options.dot || !a[ai].startsWith('.')) &&\n a[ai] !== '**') {\n if (which === 'a')\n return false;\n which = 'b';\n result.push(b[bi]);\n ai++;\n bi++;\n }\n else {\n return false;\n }\n }\n // if we fall out of the loop, it means they two are identical\n // as long as their lengths match\n return a.length === b.length && result;\n }\n parseNegate() {\n if (this.nonegate)\n return;\n const pattern = this.pattern;\n let negate = false;\n let negateOffset = 0;\n for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n negate = !negate;\n negateOffset++;\n }\n if (negateOffset)\n this.pattern = pattern.slice(negateOffset);\n this.negate = negate;\n }\n // set partial to true to test if, for example,\n // \"/a/b\" matches the start of \"/*/b/*/d\"\n // Partial means, if you run out of file before you run\n // out of pattern, then that's fine, as long as all\n // the parts match.\n matchOne(file, pattern, partial = false) {\n let fileStartIndex = 0;\n let patternStartIndex = 0;\n // UNC paths like //?/X:/... can match X:/... and vice versa\n // Drive letters in absolute drive or unc paths are always compared\n // case-insensitively.\n if (this.isWindows) {\n const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);\n const fileUNC = !fileDrive &&\n file[0] === '' &&\n file[1] === '' &&\n file[2] === '?' &&\n /^[a-z]:$/i.test(file[3]);\n const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);\n const patternUNC = !patternDrive &&\n pattern[0] === '' &&\n pattern[1] === '' &&\n pattern[2] === '?' &&\n typeof pattern[3] === 'string' &&\n /^[a-z]:$/i.test(pattern[3]);\n const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;\n const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;\n if (typeof fdi === 'number' && typeof pdi === 'number') {\n const [fd, pd] = [\n file[fdi],\n pattern[pdi],\n ];\n if (fd.toLowerCase() === pd.toLowerCase()) {\n pattern[pdi] = fd;\n patternStartIndex = pdi;\n fileStartIndex = fdi;\n }\n }\n }\n // resolve and reduce . and .. portions in the file as well.\n // dont' need to do the second phase, because it's only one string[]\n const { optimizationLevel = 1 } = this.options;\n if (optimizationLevel >= 2) {\n file = this.levelTwoFileOptimize(file);\n }\n if (pattern.includes(GLOBSTAR)) {\n return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);\n }\n return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);\n }\n #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {\n const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);\n const lastgs = pattern.lastIndexOf(GLOBSTAR);\n const [head, body, tail] = partial ? [\n pattern.slice(patternIndex, firstgs),\n pattern.slice(firstgs + 1),\n [],\n ] : [\n pattern.slice(patternIndex, firstgs),\n pattern.slice(firstgs + 1, lastgs),\n pattern.slice(lastgs + 1),\n ];\n if (head.length) {\n const fileHead = file.slice(fileIndex, fileIndex + head.length);\n if (!this.#matchOne(fileHead, head, partial, 0, 0))\n return false;\n fileIndex += head.length;\n }\n let fileTailMatch = 0;\n if (tail.length) {\n if (tail.length + fileIndex > file.length)\n return false;\n let tailStart = file.length - tail.length;\n if (this.#matchOne(file, tail, partial, tailStart, 0)) {\n fileTailMatch = tail.length;\n }\n else {\n if (file[file.length - 1] !== '' ||\n fileIndex + tail.length === file.length) {\n return false;\n }\n tailStart--;\n if (!this.#matchOne(file, tail, partial, tailStart, 0))\n return false;\n fileTailMatch = tail.length + 1;\n }\n }\n if (!body.length) {\n let sawSome = !!fileTailMatch;\n for (let i = fileIndex; i < file.length - fileTailMatch; i++) {\n const f = String(file[i]);\n sawSome = true;\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n }\n return partial || sawSome;\n }\n const bodySegments = [[[], 0]];\n let currentBody = bodySegments[0];\n let nonGsParts = 0;\n const nonGsPartsSums = [0];\n for (const b of body) {\n if (b === GLOBSTAR) {\n nonGsPartsSums.push(nonGsParts);\n currentBody = [[], 0];\n bodySegments.push(currentBody);\n }\n else {\n currentBody[0].push(b);\n nonGsParts++;\n }\n }\n let i = bodySegments.length - 1;\n const fileLength = file.length - fileTailMatch;\n for (const b of bodySegments) {\n b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);\n }\n return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);\n }\n #matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {\n const bs = bodySegments[bodyIndex];\n if (!bs) {\n for (let i = fileIndex; i < file.length; i++) {\n sawTail = true;\n const f = file[i];\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n }\n return sawTail;\n }\n const [body, after] = bs;\n while (fileIndex <= after) {\n const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);\n if (m && globStarDepth < this.maxGlobstarRecursion) {\n const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);\n if (sub !== false)\n return sub;\n }\n const f = file[fileIndex];\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n fileIndex++;\n }\n return partial || null;\n }\n #matchOne(file, pattern, partial, fileIndex, patternIndex) {\n let fi;\n let pi;\n let pl;\n let fl;\n for (fi = fileIndex, pi = patternIndex,\n fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {\n this.debug('matchOne loop');\n let p = pattern[pi];\n let f = file[fi];\n this.debug(pattern, p, f);\n /* c8 ignore start */\n if (p === false || p === GLOBSTAR)\n return false;\n /* c8 ignore stop */\n let hit;\n if (typeof p === 'string') {\n hit = f === p;\n this.debug('string match', p, f, hit);\n }\n else {\n hit = p.test(f);\n this.debug('pattern match', p, f, hit);\n }\n if (!hit)\n return false;\n }\n if (fi === fl && pi === pl) {\n return true;\n }\n else if (fi === fl) {\n return partial;\n }\n else if (pi === pl) {\n return fi === fl - 1 && file[fi] === '';\n /* c8 ignore start */\n }\n else {\n throw new Error('wtf?');\n }\n /* c8 ignore stop */\n }\n braceExpand() {\n return braceExpand(this.pattern, this.options);\n }\n parse(pattern) {\n assertValidPattern(pattern);\n const options = this.options;\n // shortcuts\n if (pattern === '**')\n return GLOBSTAR;\n if (pattern === '')\n return '';\n // far and away, the most common glob pattern parts are\n // *, *.*, and *. Add a fast check method for those.\n let m;\n let fastTest = null;\n if ((m = pattern.match(starRE))) {\n fastTest = options.dot ? starTestDot : starTest;\n }\n else if ((m = pattern.match(starDotExtRE))) {\n fastTest = (options.nocase\n ? options.dot\n ? starDotExtTestNocaseDot\n : starDotExtTestNocase\n : options.dot\n ? starDotExtTestDot\n : starDotExtTest)(m[1]);\n }\n else if ((m = pattern.match(qmarksRE))) {\n fastTest = (options.nocase\n ? options.dot\n ? qmarksTestNocaseDot\n : qmarksTestNocase\n : options.dot\n ? qmarksTestDot\n : qmarksTest)(m);\n }\n else if ((m = pattern.match(starDotStarRE))) {\n fastTest = options.dot ? starDotStarTestDot : starDotStarTest;\n }\n else if ((m = pattern.match(dotStarRE))) {\n fastTest = dotStarTest;\n }\n const re = AST.fromGlob(pattern, this.options).toMMPattern();\n if (fastTest && typeof re === 'object') {\n // Avoids overriding in frozen environments\n Reflect.defineProperty(re, 'test', { value: fastTest });\n }\n return re;\n }\n makeRe() {\n if (this.regexp || this.regexp === false)\n return this.regexp;\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n const set = this.set;\n if (!set.length) {\n this.regexp = false;\n return this.regexp;\n }\n const options = this.options;\n const twoStar = options.noglobstar\n ? star\n : options.dot\n ? twoStarDot\n : twoStarNoDot;\n const flags = new Set(options.nocase ? ['i'] : []);\n // regexpify non-globstar patterns\n // if ** is only item, then we just do one twoStar\n // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n // if ** is last, append (\\/twoStar|) to previous\n // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n // then filter out GLOBSTAR symbols\n let re = set\n .map(pattern => {\n const pp = pattern.map(p => {\n if (p instanceof RegExp) {\n for (const f of p.flags.split(''))\n flags.add(f);\n }\n return typeof p === 'string'\n ? regExpEscape(p)\n : p === GLOBSTAR\n ? GLOBSTAR\n : p._src;\n });\n pp.forEach((p, i) => {\n const next = pp[i + 1];\n const prev = pp[i - 1];\n if (p !== GLOBSTAR || prev === GLOBSTAR) {\n return;\n }\n if (prev === undefined) {\n if (next !== undefined && next !== GLOBSTAR) {\n pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next;\n }\n else {\n pp[i] = twoStar;\n }\n }\n else if (next === undefined) {\n pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?';\n }\n else if (next !== GLOBSTAR) {\n pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next;\n pp[i + 1] = GLOBSTAR;\n }\n });\n return pp.filter(p => p !== GLOBSTAR).join('/');\n })\n .join('|');\n // need to wrap in parens if we had more than one thing with |,\n // otherwise only the first will be anchored to ^ and the last to $\n const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^' + open + re + close + '$';\n // can match anything, as long as it's not this.\n if (this.negate)\n re = '^(?!' + re + ').+$';\n try {\n this.regexp = new RegExp(re, [...flags].join(''));\n /* c8 ignore start */\n }\n catch (ex) {\n // should be impossible\n this.regexp = false;\n }\n /* c8 ignore stop */\n return this.regexp;\n }\n slashSplit(p) {\n // if p starts with // on windows, we preserve that\n // so that UNC paths aren't broken. Otherwise, any number of\n // / characters are coalesced into one, unless\n // preserveMultipleSlashes is set to true.\n if (this.preserveMultipleSlashes) {\n return p.split('/');\n }\n else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n // add an extra '' for the one we lose\n return ['', ...p.split(/\\/+/)];\n }\n else {\n return p.split(/\\/+/);\n }\n }\n match(f, partial = this.partial) {\n this.debug('match', f, this.pattern);\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) {\n return false;\n }\n if (this.empty) {\n return f === '';\n }\n if (f === '/' && partial) {\n return true;\n }\n const options = this.options;\n // windows: need to use /, not \\\n if (this.isWindows) {\n f = f.split('\\\\').join('/');\n }\n // treat the test path as a set of pathparts.\n const ff = this.slashSplit(f);\n this.debug(this.pattern, 'split', ff);\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n const set = this.set;\n this.debug(this.pattern, 'set', set);\n // Find the basename of the path by looking for the last non-empty segment\n let filename = ff[ff.length - 1];\n if (!filename) {\n for (let i = ff.length - 2; !filename && i >= 0; i--) {\n filename = ff[i];\n }\n }\n for (let i = 0; i < set.length; i++) {\n const pattern = set[i];\n let file = ff;\n if (options.matchBase && pattern.length === 1) {\n file = [filename];\n }\n const hit = this.matchOne(file, pattern, partial);\n if (hit) {\n if (options.flipNegate) {\n return true;\n }\n return !this.negate;\n }\n }\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) {\n return false;\n }\n return this.negate;\n }\n static defaults(def) {\n return minimatch.defaults(def).Minimatch;\n }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js';\nexport { escape } from './escape.js';\nexport { unescape } from './unescape.js';\n/* c8 ignore stop */\nminimatch.AST = AST;\nminimatch.Minimatch = Minimatch;\nminimatch.escape = escape;\nminimatch.unescape = unescape;\n//# sourceMappingURL=index.js.map","export function convertResponseHeaders(headers) {\n const output = {};\n for (const key of headers.keys()) {\n output[key] = headers.get(key);\n }\n return output;\n}\nexport function mergeHeaders(...headerPayloads) {\n if (headerPayloads.length === 0)\n return {};\n const headerKeys = {};\n return headerPayloads.reduce((output, headers) => {\n Object.keys(headers).forEach(header => {\n const lowerHeader = header.toLowerCase();\n if (headerKeys.hasOwnProperty(lowerHeader)) {\n output[headerKeys[lowerHeader]] = headers[header];\n }\n else {\n headerKeys[lowerHeader] = header;\n output[header] = headers[header];\n }\n });\n return output;\n }, {});\n}\n","import { minimatch } from \"minimatch\";\nimport { convertResponseHeaders } from \"./tools/headers.js\";\nexport function createErrorFromResponse(response, prefix = \"\") {\n const err = new Error(`${prefix}Invalid response: ${response.status} ${response.statusText}`);\n err.status = response.status;\n err.response = response;\n return err;\n}\nexport function handleResponseCode(context, response) {\n const { status } = response;\n if (status === 401 && context.digest)\n return response;\n if (status >= 400) {\n const err = createErrorFromResponse(response);\n throw err;\n }\n return response;\n}\nexport function processGlobFilter(files, glob) {\n return files.filter(file => minimatch(file.filename, glob, { matchBase: true }));\n}\n/**\n * Process a response payload (eg. from `customRequest`) and\n * prepare it for further processing. Exposed for custom\n * request handling.\n * @param response The response for a request\n * @param data The data returned\n * @param isDetailed Whether or not a detailed result is\n * requested\n * @returns The response data, or a detailed response object\n * if required\n */\nexport function processResponsePayload(response, data, isDetailed = false) {\n return isDetailed\n ? {\n data,\n headers: response.headers ? convertResponseHeaders(response.headers) : {},\n status: response.status,\n statusText: response.statusText\n }\n : data;\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\nvar util = require('util');\nvar isString = function (x) {\n return typeof x === 'string';\n};\n\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n var res = [];\n for (var i = 0; i < parts.length; i++) {\n var p = parts[i];\n\n // ignore empty parts\n if (!p || p === '.')\n continue;\n\n if (p === '..') {\n if (res.length && res[res.length - 1] !== '..') {\n res.pop();\n } else if (allowAboveRoot) {\n res.push('..');\n }\n } else {\n res.push(p);\n }\n }\n\n return res;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar posix = {};\n\n\nfunction posixSplitPath(filename) {\n return splitPathRe.exec(filename).slice(1);\n}\n\n\n// path.resolve([from ...], to)\n// posix version\nposix.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (!isString(path)) {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/'),\n !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nposix.normalize = function(path) {\n var isAbsolute = posix.isAbsolute(path),\n trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n path = normalizeArray(path.split('/'), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nposix.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nposix.join = function() {\n var path = '';\n for (var i = 0; i < arguments.length; i++) {\n var segment = arguments[i];\n if (!isString(segment)) {\n throw new TypeError('Arguments to path.join must be strings');\n }\n if (segment) {\n if (!path) {\n path += segment;\n } else {\n path += '/' + segment;\n }\n }\n }\n return posix.normalize(path);\n};\n\n\n// path.relative(from, to)\n// posix version\nposix.relative = function(from, to) {\n from = posix.resolve(from).substr(1);\n to = posix.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\n\nposix._makeLong = function(path) {\n return path;\n};\n\n\nposix.dirname = function(path) {\n var result = posixSplitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nposix.basename = function(path, ext) {\n var f = posixSplitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nposix.extname = function(path) {\n return posixSplitPath(path)[3];\n};\n\n\nposix.format = function(pathObject) {\n if (!util.isObject(pathObject)) {\n throw new TypeError(\n \"Parameter 'pathObject' must be an object, not \" + typeof pathObject\n );\n }\n\n var root = pathObject.root || '';\n\n if (!isString(root)) {\n throw new TypeError(\n \"'pathObject.root' must be a string or undefined, not \" +\n typeof pathObject.root\n );\n }\n\n var dir = pathObject.dir ? pathObject.dir + posix.sep : '';\n var base = pathObject.base || '';\n return dir + base;\n};\n\n\nposix.parse = function(pathString) {\n if (!isString(pathString)) {\n throw new TypeError(\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\n );\n }\n var allParts = posixSplitPath(pathString);\n if (!allParts || allParts.length !== 4) {\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\n }\n allParts[1] = allParts[1] || '';\n allParts[2] = allParts[2] || '';\n allParts[3] = allParts[3] || '';\n\n return {\n root: allParts[0],\n dir: allParts[0] + allParts[1].slice(0, allParts[1].length - 1),\n base: allParts[2],\n ext: allParts[3],\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\n };\n};\n\n\nposix.sep = '/';\nposix.delimiter = ':';\n\n module.exports = posix;\n","/**\n* @license nested-property https://github.com/cosmosio/nested-property\n*\n* The MIT License (MIT)\n*\n* Copyright (c) 2014-2020 Olivier Scherrer \n*/\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ARRAY_WILDCARD = \"+\";\nvar PATH_DELIMITER = \".\";\n\nvar ObjectPrototypeMutationError = /*#__PURE__*/function (_Error) {\n _inherits(ObjectPrototypeMutationError, _Error);\n\n function ObjectPrototypeMutationError(params) {\n var _this;\n\n _classCallCheck(this, ObjectPrototypeMutationError);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ObjectPrototypeMutationError).call(this, params));\n _this.name = \"ObjectPrototypeMutationError\";\n return _this;\n }\n\n return ObjectPrototypeMutationError;\n}(_wrapNativeSuper(Error));\n\nmodule.exports = {\n set: setNestedProperty,\n get: getNestedProperty,\n has: hasNestedProperty,\n hasOwn: function hasOwn(object, property, options) {\n return this.has(object, property, options || {\n own: true\n });\n },\n isIn: isInNestedProperty,\n ObjectPrototypeMutationError: ObjectPrototypeMutationError\n};\n/**\n * Get the property of an object nested in one or more objects or array\n * Given an object such as a.b.c.d = 5, getNestedProperty(a, \"b.c.d\") will return 5.\n * It also works through arrays. Given a nested array such as a[0].b = 5, getNestedProperty(a, \"0.b\") will return 5.\n * For accessing nested properties through all items in an array, you may use the array wildcard \"+\".\n * For instance, getNestedProperty([{a:1}, {a:2}, {a:3}], \"+.a\") will return [1, 2, 3]\n * @param {Object} object the object to get the property from\n * @param {String} property the path to the property as a string\n * @returns the object or the the property value if found\n */\n\nfunction getNestedProperty(object, property) {\n if (_typeof(object) != \"object\" || object === null) {\n return object;\n }\n\n if (typeof property == \"undefined\") {\n return object;\n }\n\n if (typeof property == \"number\") {\n return object[property];\n }\n\n try {\n return traverse(object, property, function _getNestedProperty(currentObject, currentProperty) {\n return currentObject[currentProperty];\n });\n } catch (err) {\n return object;\n }\n}\n/**\n * Tell if a nested object has a given property (or array a given index)\n * given an object such as a.b.c.d = 5, hasNestedProperty(a, \"b.c.d\") will return true.\n * It also returns true if the property is in the prototype chain.\n * @param {Object} object the object to get the property from\n * @param {String} property the path to the property as a string\n * @param {Object} options:\n * - own: set to reject properties from the prototype\n * @returns true if has (property in object), false otherwise\n */\n\n\nfunction hasNestedProperty(object, property) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (_typeof(object) != \"object\" || object === null) {\n return false;\n }\n\n if (typeof property == \"undefined\") {\n return false;\n }\n\n if (typeof property == \"number\") {\n return property in object;\n }\n\n try {\n var has = false;\n traverse(object, property, function _hasNestedProperty(currentObject, currentProperty, segments, index) {\n if (isLastSegment(segments, index)) {\n if (options.own) {\n has = currentObject.hasOwnProperty(currentProperty);\n } else {\n has = currentProperty in currentObject;\n }\n } else {\n return currentObject && currentObject[currentProperty];\n }\n });\n return has;\n } catch (err) {\n return false;\n }\n}\n/**\n * Set the property of an object nested in one or more objects\n * If the property doesn't exist, it gets created.\n * @param {Object} object\n * @param {String} property\n * @param value the value to set\n * @returns object if no assignment was made or the value if the assignment was made\n */\n\n\nfunction setNestedProperty(object, property, value) {\n if (_typeof(object) != \"object\" || object === null) {\n return object;\n }\n\n if (typeof property == \"undefined\") {\n return object;\n }\n\n if (typeof property == \"number\") {\n object[property] = value;\n return object[property];\n }\n\n try {\n return traverse(object, property, function _setNestedProperty(currentObject, currentProperty, segments, index) {\n if (currentObject === Reflect.getPrototypeOf({})) {\n throw new ObjectPrototypeMutationError(\"Attempting to mutate Object.prototype\");\n }\n\n if (!currentObject[currentProperty]) {\n var nextPropIsNumber = Number.isInteger(Number(segments[index + 1]));\n var nextPropIsArrayWildcard = segments[index + 1] === ARRAY_WILDCARD;\n\n if (nextPropIsNumber || nextPropIsArrayWildcard) {\n currentObject[currentProperty] = [];\n } else {\n currentObject[currentProperty] = {};\n }\n }\n\n if (isLastSegment(segments, index)) {\n currentObject[currentProperty] = value;\n }\n\n return currentObject[currentProperty];\n });\n } catch (err) {\n if (err instanceof ObjectPrototypeMutationError) {\n // rethrow\n throw err;\n } else {\n return object;\n }\n }\n}\n/**\n * Tell if an object is on the path to a nested property\n * If the object is on the path, and the path exists, it returns true, and false otherwise.\n * @param {Object} object to get the nested property from\n * @param {String} property name of the nested property\n * @param {Object} objectInPath the object to check\n * @param {Object} options:\n * - validPath: return false if the path is invalid, even if the object is in the path\n * @returns {boolean} true if the object is on the path\n */\n\n\nfunction isInNestedProperty(object, property, objectInPath) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n if (_typeof(object) != \"object\" || object === null) {\n return false;\n }\n\n if (typeof property == \"undefined\") {\n return false;\n }\n\n try {\n var isIn = false,\n pathExists = false;\n traverse(object, property, function _isInNestedProperty(currentObject, currentProperty, segments, index) {\n isIn = isIn || currentObject === objectInPath || !!currentObject && currentObject[currentProperty] === objectInPath;\n pathExists = isLastSegment(segments, index) && _typeof(currentObject) === \"object\" && currentProperty in currentObject;\n return currentObject && currentObject[currentProperty];\n });\n\n if (options.validPath) {\n return isIn && pathExists;\n } else {\n return isIn;\n }\n } catch (err) {\n return false;\n }\n}\n\nfunction traverse(object, path) {\n var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};\n var segments = path.split(PATH_DELIMITER);\n var length = segments.length;\n\n var _loop = function _loop(idx) {\n var currentSegment = segments[idx];\n\n if (!object) {\n return {\n v: void 0\n };\n }\n\n if (currentSegment === ARRAY_WILDCARD) {\n if (Array.isArray(object)) {\n return {\n v: object.map(function (value, index) {\n var remainingSegments = segments.slice(idx + 1);\n\n if (remainingSegments.length > 0) {\n return traverse(value, remainingSegments.join(PATH_DELIMITER), callback);\n } else {\n return callback(object, index, segments, idx);\n }\n })\n };\n } else {\n var pathToHere = segments.slice(0, idx).join(PATH_DELIMITER);\n throw new Error(\"Object at wildcard (\".concat(pathToHere, \") is not an array\"));\n }\n } else {\n object = callback(object, currentSegment, segments, idx);\n }\n };\n\n for (var idx = 0; idx < length; idx++) {\n var _ret = _loop(idx);\n\n if (_typeof(_ret) === \"object\") return _ret.v;\n }\n\n return object;\n}\n\nfunction isLastSegment(segments, index) {\n return segments.length === index + 1;\n}\n","import path from \"path-posix\";\nimport { XMLParser } from \"fast-xml-parser\";\n// @ts-expect-error Types declare default export but runtime provides named export\nimport { EntityDecoder } from \"@nodable/entities\";\nimport nestedProp from \"nested-property\";\nimport { encodePath, normalisePath } from \"./path.js\";\nvar PropertyType;\n(function (PropertyType) {\n PropertyType[\"Array\"] = \"array\";\n PropertyType[\"Object\"] = \"object\";\n PropertyType[\"Original\"] = \"original\";\n})(PropertyType || (PropertyType = {}));\nfunction toJPathString(jPath) {\n if (typeof jPath === \"string\") {\n return jPath;\n }\n return jPath.toString(\".\", false);\n}\nfunction getParser({ attributeNamePrefix, attributeParsers, entityDecoder: entityDecoderOptions, tagParsers }) {\n const parserOptions = {\n allowBooleanAttributes: true,\n attributeNamePrefix,\n textNodeName: \"text\",\n ignoreAttributes: false,\n removeNSPrefix: true,\n jPath: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: false\n },\n attributeValueProcessor(_, attrValue, jPath) {\n const pathStr = toJPathString(jPath);\n for (const processor of attributeParsers) {\n try {\n const value = processor(pathStr, attrValue);\n if (value !== attrValue) {\n return value;\n }\n }\n catch (error) {\n // skipping this invalid processor\n }\n }\n return attrValue;\n },\n tagValueProcessor(tagName, tagValue, jPath) {\n const pathStr = toJPathString(jPath);\n for (const processor of tagParsers) {\n try {\n const value = processor(pathStr, tagValue);\n if (value !== tagValue) {\n return value;\n }\n }\n catch (error) {\n // skipping this invalid processor\n }\n }\n return tagValue;\n }\n };\n if (entityDecoderOptions) {\n parserOptions.entityDecoder = new EntityDecoder({\n limit: {\n maxTotalExpansions: entityDecoderOptions.limit?.maxTotalExpansions ?? 0,\n maxExpandedLength: entityDecoderOptions.limit?.maxExpandedLength ?? 0\n }\n });\n }\n return new XMLParser(parserOptions);\n}\n/**\n * Tag parser for the displayname prop.\n * Ensure that the displayname is not parsed and always handled as is.\n * @param path The jPath of the tag\n * @param value The text value of the tag\n */\nexport function displaynameTagParser(path, value) {\n if (path.endsWith(\"propstat.prop.displayname\")) {\n // Do not parse the displayname, because this causes e.g. '2024.10' to result in number 2024.1\n return;\n }\n return value;\n}\nfunction getPropertyOfType(obj, prop, type = PropertyType.Original) {\n const val = nestedProp.get(obj, prop);\n if (type === \"array\" && Array.isArray(val) === false) {\n return [val];\n }\n else if (type === \"object\" && Array.isArray(val)) {\n return val[0];\n }\n return val;\n}\nfunction normaliseResponse(response) {\n const output = Object.assign({}, response);\n // Only either status OR propstat is allowed\n if (output.status) {\n nestedProp.set(output, \"status\", getPropertyOfType(output, \"status\", PropertyType.Object));\n }\n else {\n nestedProp.set(output, \"propstat\", getPropertyOfType(output, \"propstat\", PropertyType.Object));\n nestedProp.set(output, \"propstat.prop\", getPropertyOfType(output, \"propstat.prop\", PropertyType.Object));\n }\n return output;\n}\nfunction normaliseResult(result) {\n const { multistatus } = result;\n if (multistatus === \"\") {\n return {\n multistatus: {\n response: []\n }\n };\n }\n if (!multistatus) {\n throw new Error(\"Invalid response: No root multistatus found\");\n }\n const output = {\n multistatus: Array.isArray(multistatus) ? multistatus[0] : multistatus\n };\n nestedProp.set(output, \"multistatus.response\", getPropertyOfType(output, \"multistatus.response\", PropertyType.Array));\n nestedProp.set(output, \"multistatus.response\", nestedProp.get(output, \"multistatus.response\").map(response => normaliseResponse(response)));\n return output;\n}\n/**\n * Parse an XML response from a WebDAV service,\n * converting it to an internal DAV result\n * @param xml The raw XML string\n * @param context The current client context\n * @returns A parsed and processed DAV result\n */\nexport function parseXML(xml, context) {\n // backwards compatibility as this method is exported from the package\n context = context ?? {\n attributeNamePrefix: \"@\",\n attributeParsers: [],\n tagParsers: [displaynameTagParser]\n };\n return new Promise(resolve => {\n const result = getParser(context).parse(xml);\n resolve(normaliseResult(result));\n });\n}\n/**\n * Get a file stat result from given DAV properties\n * @param props DAV properties\n * @param filename The filename for the file stat\n * @param isDetailed Whether or not the raw props of the resource should be returned\n * @returns A file stat result\n */\nexport function prepareFileFromProps(props, filename, isDetailed = false) {\n // Last modified time, raw size, item type and mime\n const { getlastmodified: lastMod = null, getcontentlength: rawSize = \"0\", resourcetype: resourceType = null, getcontenttype: mimeType = null, getetag: etag = null } = props;\n const type = resourceType &&\n typeof resourceType === \"object\" &&\n typeof resourceType.collection !== \"undefined\"\n ? \"directory\"\n : \"file\";\n const stat = {\n filename,\n basename: path.basename(filename),\n lastmod: lastMod,\n size: parseInt(rawSize, 10),\n type,\n etag: typeof etag === \"string\" ? etag.replace(/\"/g, \"\") : null\n };\n if (type === \"file\") {\n stat.mime = mimeType && typeof mimeType === \"string\" ? mimeType.split(\";\")[0] : \"\";\n }\n if (isDetailed) {\n // The XML parser tries to interpret values, but the display name is required to be a string\n if (typeof props.displayname !== \"undefined\") {\n props.displayname = String(props.displayname);\n }\n stat.props = props;\n }\n return stat;\n}\n/**\n * Parse a DAV result for file stats\n * @param result The resulting DAV response\n * @param filename The filename that was stat'd\n * @param isDetailed Whether or not the raw props of\n * the resource should be returned\n * @returns A file stat result\n */\nexport function parseStat(result, filename, isDetailed = false) {\n let responseItem = null;\n try {\n // should be a propstat response, if not the if below will throw an error\n if (result.multistatus.response[0].propstat) {\n responseItem = result.multistatus.response[0];\n }\n }\n catch (e) {\n /* ignore */\n }\n if (!responseItem) {\n throw new Error(\"Failed getting item stat: bad response\");\n }\n const { propstat: { prop: props, status: statusLine } } = responseItem;\n // As defined in https://tools.ietf.org/html/rfc2068#section-6.1\n const [_, statusCodeStr, statusText] = statusLine.split(\" \", 3);\n const statusCode = parseInt(statusCodeStr, 10);\n if (statusCode >= 400) {\n const err = new Error(`Invalid response: ${statusCode} ${statusText}`);\n err.status = statusCode;\n throw err;\n }\n const filePath = normalisePath(filename);\n return prepareFileFromProps(props, filePath, isDetailed);\n}\n/**\n * Parse a DAV result for a search request\n *\n * @param result The resulting DAV response\n * @param searchArbiter The collection path that was searched\n * @param isDetailed Whether or not the raw props of the resource should be returned\n */\nexport function parseSearch(result, searchArbiter, isDetailed) {\n const response = {\n truncated: false,\n results: []\n };\n response.truncated = result.multistatus.response.some(v => {\n return ((v.status || v.propstat?.status).split(\" \", 3)?.[1] === \"507\" &&\n v.href.replace(/\\/$/, \"\").endsWith(encodePath(searchArbiter).replace(/\\/$/, \"\")));\n });\n result.multistatus.response.forEach(result => {\n if (result.propstat === undefined) {\n return;\n }\n const filename = result.href.split(\"/\").map(decodeURIComponent).join(\"/\");\n response.results.push(prepareFileFromProps(result.propstat.prop, filename, isDetailed));\n });\n return response;\n}\n/**\n * Translate a disk quota indicator to a recognised\n * value (includes \"unlimited\" and \"unknown\")\n * @param value The quota indicator, eg. \"-3\"\n * @returns The value in bytes, or another indicator\n */\nexport function translateDiskSpace(value) {\n switch (String(value)) {\n case \"-3\":\n return \"unlimited\";\n case \"-2\":\n /* falls-through */\n case \"-1\":\n // -1 is non-computed\n return \"unknown\";\n default:\n return parseInt(String(value), 10);\n }\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { DAVResult, FileStat, ResponseDataDetailed } from 'webdav'\n\nimport { parseXML } from 'webdav'\nimport { processResponsePayload } from 'webdav/dist/node/response.js'\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js'\nimport client from './DavClient.ts'\n\nexport const DEFAULT_LIMIT = 20\n\n/**\n * Retrieve the comments list\n *\n * @param data destructuring object\n * @param data.resourceType the resource type\n * @param data.resourceId the resource ID\n * @param [options] optional options for axios\n * @param [options.offset] the pagination offset\n * @param [options.limit] the pagination limit, defaults to 20\n * @param [options.datetime] optional date to query\n * @return the comments list\n */\nexport async function getComments({ resourceType, resourceId }, options: { offset: number, limit?: number, datetime?: Date }) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\tconst datetime = options.datetime ? `${options.datetime.toISOString()}` : ''\n\tconst response = await client.customRequest(resourcePath, {\n\t\tmethod: 'REPORT',\n\t\tdata: `\n\t\t\t\n\t\t\t\t${options.limit ?? DEFAULT_LIMIT}\n\t\t\t\t${options.offset || 0}\n\t\t\t\t${datetime}\n\t\t\t`,\n\t\t...options,\n\t})\n\n\tconst responseData = await response.text()\n\tconst result = await parseXML(responseData)\n\tconst stat = getDirectoryFiles(result, true)\n\t// https://github.com/perry-mitchell/webdav-client/issues/339\n\treturn processResponsePayload(response, stat, true) as ResponseDataDetailed\n}\n\n/**\n * https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\n *\n * @param result - the DAV response result\n * @param isDetailed - whether to return detailed file information\n */\nfunction getDirectoryFiles(\n\tresult: DAVResult,\n\tisDetailed = false,\n): Array {\n\t// Extract the response items (directory contents)\n\tconst {\n\t\tmultistatus: { response: responseItems },\n\t} = result\n\n\t// Map all items to a consistent output structure (results)\n\treturn responseItems.map((item) => {\n\t\t// Each item should contain a stat object\n\t\tconst props = item.propstat!.prop!\n\n\t\treturn prepareFileFromProps(props, props.id!.toString(), isDetailed)\n\t})\n}\n"],"names":["getRootPath","generateRemoteUrl","client","getClient","balancedMatch","balanced","a","b","str","maybeMatch","r","range","reg","m","begs","beg","left","right","result","ai","bi","i","require$$0","braceExpansion","expandTop","escSlash","escOpen","escClose","escComma","escPeriod","numeric","escapeBraces","unescapeBraces","parseCommaParts","parts","pre","body","post","p","postParts","options","max","expand","embrace","isPadded","el","lte","y","gte","isTop","expansions","k","expansion","isNumericSequence","isAlphaSequence","isSequence","isOptions","n","N","x","width","incr","test","reverse","pad","c","need","z","j","MAX_PATTERN_LENGTH","assertValidPattern","pattern","posixClasses","braceEscape","s","regexpEscape","rangesToString","ranges","parseClass","glob","position","pos","negs","sawStart","uflag","escaping","negate","endPos","rangeStart","WHILE","cls","unip","u","neg","sranges","snegs","unescape","windowsPathsNoEscape","_a","types","isExtglobType","isExtglobAST","adoptionMap","adoptionWithSpaceMap","adoptionAnyMap","usurpMap","startNoTraversal","startNoDot","addPatternStart","justDots","reSpecials","regExpEscape","qmark","star","starNoEmpty","AST","#root","#hasMagic","#uflag","#parts","#parent","#parentIndex","#negs","#filledNegs","#options","#toString","#emptyExt","type","parent","#fillNegs","pp","part","ret","pl","#parseAST","ast","opt","extDepth","maxDepth","inBrace","braceStart","braceNeg","acc","ext","#canAdoptType","depthAdd","#canAdoptWithSpace","child","#canAdopt","map","gc","#adoptWithSpace","index","blank","#adopt","#canUsurpType","#canUsurp","#usurp","nt","#flatten","iterations","done","re","hasMagic","flags","allowDot","dot","noEmpty","src","_","#parseGlob","start","aps","needNoTrav","needNoDot","end","repeated","#partsToRegExp","me","bodyDotAllowed","final","close","_hasMagic","inStar","needUflag","consumed","magic","escape","minimatch","Minimatch","starDotExtRE","starDotExtTest","f","starDotExtTestDot","starDotExtTestNocase","starDotExtTestNocaseDot","starDotStarRE","starDotStarTest","starDotStarTestDot","dotStarRE","dotStarTest","starRE","starTest","starTestDot","qmarksRE","qmarksTestNocase","$0","noext","qmarksTestNoExt","qmarksTestNocaseDot","qmarksTestNoExtDot","qmarksTestDot","qmarksTest","len","defaultPlatform","process","define_process_env_default","path","sep","GLOBSTAR","twoStarDot","twoStarNoDot","filter","defaults","def","orig","list","braceExpand","makeRe","match","mm","globMagic","args","rawGlobParts","set","__","isUNC","isDrive","ss","globParts","optimizationLevel","gs","prev","didSomething","dd","gss","next","p2","other","splin","matched","emptyGSMatch","which","negateOffset","file","partial","fileStartIndex","patternStartIndex","fileDrive","fileUNC","patternDrive","patternUNC","fdi","pdi","fd","pd","#matchGlobstar","#matchOne","fileIndex","patternIndex","firstgs","lastgs","head","tail","fileHead","fileTailMatch","tailStart","sawSome","bodySegments","currentBody","nonGsParts","nonGsPartsSums","fileLength","#matchGlobStarBodySections","bodyIndex","globStarDepth","sawTail","bs","after","sub","fi","pi","fl","hit","fastTest","twoStar","open","ff","filename","convertResponseHeaders","headers","output","key","processResponsePayload","response","data","isDetailed","util","isString","normalizeArray","allowAboveRoot","res","splitPathRe","posix","posixSplitPath","resolvedPath","resolvedAbsolute","isAbsolute","trailingSlash","segment","from","to","trim","arr","fromParts","toParts","length","samePartsLength","outputParts","root","dir","pathObject","base","pathString","allParts","pathPosix","_typeof","obj","_classCallCheck","instance","Constructor","_possibleConstructorReturn","self","call","_assertThisInitialized","_inherits","subClass","superClass","_setPrototypeOf","_wrapNativeSuper","Class","_cache","_isNativeFunction","Wrapper","_construct","_getPrototypeOf","Parent","_isNativeReflectConstruct","fn","o","ARRAY_WILDCARD","PATH_DELIMITER","ObjectPrototypeMutationError","_Error","params","_this","nestedProperty","setNestedProperty","getNestedProperty","hasNestedProperty","object","property","isInNestedProperty","traverse","currentObject","currentProperty","has","segments","isLastSegment","value","nextPropIsNumber","nextPropIsArrayWildcard","err","objectInPath","isIn","pathExists","callback","_loop","idx","currentSegment","remainingSegments","pathToHere","_ret","PropertyType","prepareFileFromProps","props","lastMod","rawSize","resourceType","mimeType","etag","stat","DEFAULT_LIMIT","getComments","resourceId","resourcePath","datetime","responseData","parseXML","getDirectoryFiles","responseItems","item"],"mappings":"4MAUA,SAASA,IAAc,CACtB,OAAOC,GAAkB,cAAc,CACxC,CCJA,MAAMC,GAASC,GAAUH,GAAA,CAAa,6CCPtCI,EAAiBC,EACjB,SAASA,EAASC,EAAGC,EAAGC,EAAK,CACvBF,aAAa,SAAQA,EAAIG,EAAWH,EAAGE,CAAG,GAC1CD,aAAa,SAAQA,EAAIE,EAAWF,EAAGC,CAAG,GAE9C,IAAIE,EAAIC,EAAML,EAAGC,EAAGC,CAAG,EAEvB,OAAOE,GAAK,CACV,MAAOA,EAAE,CAAC,EACV,IAAKA,EAAE,CAAC,EACR,IAAKF,EAAI,MAAM,EAAGE,EAAE,CAAC,CAAC,EACtB,KAAMF,EAAI,MAAME,EAAE,CAAC,EAAIJ,EAAE,OAAQI,EAAE,CAAC,CAAC,EACrC,KAAMF,EAAI,MAAME,EAAE,CAAC,EAAIH,EAAE,MAAM,EAEnC,CAEA,SAASE,EAAWG,EAAKJ,EAAK,CAC5B,IAAIK,EAAIL,EAAI,MAAMI,CAAG,EACrB,OAAOC,EAAIA,EAAE,CAAC,EAAI,IACpB,CAEAR,EAAS,MAAQM,EACjB,SAASA,EAAML,EAAG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AG,EAAE,CAAC,EAAI,IAEhF7F,IAEI,OAAOyF,EAAM,YAAgB,MAC7BA,EAAM,YAAc,OAAOA,EAAM,WAAW,GAEhDM,EAAK,MAAQN,GAEVM,CACX,CCtKO,MAAMC,GAAgB,GAc7B,eAAsBC,GAAY,CAAE,aAAAL,EAAc,WAAAM,CAAA,EAAc5W,EAA8D,CAC7H,MAAM6W,EAAe,CAAC,GAAIP,EAAcM,CAAU,EAAE,KAAK,GAAG,EACtDE,EAAW9W,EAAQ,SAAW,gBAAgBA,EAAQ,SAAS,YAAA,CAAa,iBAAmB,GAC/FwQ,EAAW,MAAM9S,GAAO,cAAcmZ,EAAc,CACzD,OAAQ,SACR,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMQ7W,EAAQ,OAAS0W,EAAa;AAAA,iBAC7B1W,EAAQ,QAAU,CAAC;AAAA,MAC9B8W,CAAQ;AAAA,0BAEZ,GAAG9W,CAAA,CACH,EAEK+W,EAAe,MAAMvG,EAAS,KAAA,EAC9B9R,EAAS,MAAMsY,GAASD,CAAY,EACpCN,EAAOQ,GAAkBvY,EAAQ,EAAI,EAE3C,OAAO6R,GAAuBC,EAAUiG,EAAM,EAAI,CACnD,CAQA,SAASQ,GACRvY,EACAgS,EAAa,GACK,CAElB,KAAM,CACL,YAAa,CAAE,SAAUwG,CAAA,CAAc,EACpCxY,EAGJ,OAAOwY,EAAc,IAAKC,GAAS,CAElC,MAAMhB,EAAQgB,EAAK,SAAU,KAE7B,OAAOjB,GAAqBC,EAAOA,EAAM,GAAI,SAAA,EAAYzF,CAAU,CACpE,CAAC,CACF","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13,14]}
\ No newline at end of file
diff --git a/dist/GetComments-PgOpAezt.chunk.mjs.map.license b/dist/GetComments-DcBPvVJt.chunk.mjs.map.license
similarity index 97%
rename from dist/GetComments-PgOpAezt.chunk.mjs.map.license
rename to dist/GetComments-DcBPvVJt.chunk.mjs.map.license
index 4e8e629fa441f..f37858651e987 100644
--- a/dist/GetComments-PgOpAezt.chunk.mjs.map.license
+++ b/dist/GetComments-DcBPvVJt.chunk.mjs.map.license
@@ -13,7 +13,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.0.2
- license: MIT
- brace-expansion
- - version: 2.0.2
+ - version: 2.1.1
- license: MIT
- minimatch
- version: 9.0.9
diff --git a/dist/GetComments-PgOpAezt.chunk.mjs b/dist/GetComments-PgOpAezt.chunk.mjs
deleted file mode 100644
index 9af39083132e9..0000000000000
--- a/dist/GetComments-PgOpAezt.chunk.mjs
+++ /dev/null
@@ -1,11 +0,0 @@
-import{_ as Ot}from"./index-CI-5vlTq.chunk.mjs";import{h as Et,q as yt,t as Z}from"./index-C6ey-Mhx.chunk.mjs";import{r as $t}from"./util-djQ-4xJ5.chunk.mjs";import{g as Mt}from"./dav-sq7XGhQT.chunk.mjs";function Pt(){return Et("dav/comments")}const Wt=Mt(Pt());var U,rt;function At(){if(rt)return U;rt=1,U=o;function o(n,s,r){n instanceof RegExp&&(n=t(n,r)),s instanceof RegExp&&(s=t(s,r));var i=e(n,s,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+n.length,i[1]),post:r.slice(i[1]+s.length)}}function t(n,s){var r=s.match(n);return r?r[0]:null}o.range=e;function e(n,s,r){var i,h,l,a,u,c=r.indexOf(n),p=r.indexOf(s,c+1),b=c;if(c>=0&&p>0){if(n===s)return[c,p];for(i=[],l=r.length;b>=0&&!u;)b==c?(i.push(b),c=r.indexOf(n,b+1)):i.length==1?u=[i.pop(),p]:(h=i.pop(),h=0?c:p;i.length&&(u=[l,a])}return u}return U}var V,it;function Nt(){if(it)return V;it=1;var o=At();V=u;var t="\0SLASH"+Math.random()+"\0",e="\0OPEN"+Math.random()+"\0",n="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",r="\0PERIOD"+Math.random()+"\0";function i(d){return parseInt(d,10)==d?parseInt(d,10):d.charCodeAt(0)}function h(d){return d.split("\\\\").join(t).split("\\{").join(e).split("\\}").join(n).split("\\,").join(s).split("\\.").join(r)}function l(d){return d.split(t).join("\\").split(e).join("{").split(n).join("}").split(s).join(",").split(r).join(".")}function a(d){if(!d)return[""];var x=[],S=o("{","}",d);if(!S)return d.split(",");var O=S.pre,g=S.body,f=S.post,y=O.split(",");y[y.length-1]+="{"+g+"}";var w=a(f);return f.length&&(y[y.length-1]+=w.shift(),y.push.apply(y,w)),x.push.apply(x,y),x}function u(d){return d?(d.substr(0,2)==="{}"&&(d="\\{\\}"+d.substr(2)),m(h(d),!0).map(l)):[]}function c(d){return"{"+d+"}"}function p(d){return/^-?0\d/.test(d)}function b(d,x){return d<=x}function v(d,x){return d>=x}function m(d,x){var S=[],O=o("{","}",d);if(!O)return[d];var g=O.pre,f=O.post.length?m(O.post,!1):[""];if(/\$$/.test(O.pre))for(var y=0;y=0;if(!E&&!A)return O.post.match(/,(?!,).*\}/)?(d=O.pre+"{"+O.body+n+O.post,m(d)):[d];var j;if(E)j=O.body.split(/\.\./);else if(j=a(O.body),j.length===1&&(j=m(j[0],!1).map(c),j.length===1))return f.map(function(jt){return O.pre+j[0]+jt});var R;if(E){var _=i(j[0]),F=i(j[1]),H=Math.max(j[0].length,j[1].length),I=j.length==3?Math.abs(i(j[2])):1,et=b,xt=F<_;xt&&(I*=-1,et=v);var St=j.some(p);R=[];for(var L=_;et(L,F);L+=I){var T;if(M)T=String.fromCharCode(L),T==="\\"&&(T="");else if(T=String(L),St){var nt=H-T.length;if(nt>0){var st=new Array(nt+1).join("0");L<0?T="-"+st+T.slice(1):T=st+T}}R.push(T)}}else{R=[];for(var C=0;C{if(typeof o!="string")throw new TypeError("invalid pattern");if(o.length>Tt)throw new TypeError("pattern is too long")},Ct={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},G=o=>o.replace(/[[\]\\-]/g,"\\$&"),It=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ot=o=>o.join(""),Lt=(o,t)=>{const e=t;if(o.charAt(e)!=="[")throw new Error("not in a brace expression");const n=[],s=[];let r=e+1,i=!1,h=!1,l=!1,a=!1,u=e,c="";t:for(;rc?n.push(G(c)+"-"+G(v)):v===c&&n.push(G(v)),c="",r++;continue}if(o.startsWith("-]",r+1)){n.push(G(v+"-")),r+=2;continue}if(o.startsWith("-",r+1)){c=v,r+=2;continue}n.push(G(v)),r++}if(ut?o.replace(/\[([^\/\\])\]/g,"$1"):o.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var N;const Gt=new Set(["!","?","+","*","@"]),X=o=>Gt.has(o),ht=o=>X(o.type),kt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),_t=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Ft=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),at=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Dt="(?!(?:^|/)\\.\\.?(?:$|/))",D="(?!\\.)",Zt=new Set(["[","."]),Jt=new Set(["..","."]),Bt=new Set("().*{}+?[]^$\\!"),Ht=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Y="[^/]",lt=Y+"*?",ut=Y+"+?";class tt{type;#n;#s;#r=!1;#t=[];#e;#h;#l;#a=!1;#i;#o;#u=!1;constructor(t,e,n={}){this.type=t,t&&(this.#s=!0),this.#e=e,this.#n=this.#e?this.#e.#n:this,this.#i=this.#n===this?n:this.#n.#i,this.#l=this.#n===this?[]:this.#n.#l,t==="!"&&!this.#n.#a&&this.#l.push(this),this.#h=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#o=this.#t.map(t=>String(t)).join("")}#m(){if(this!==this.#n)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#l.pop();){if(t.type!=="!")continue;let e=t,n=e.#e;for(;n;){for(let s=e.#h+1;!n.type&&stypeof e=="string"?e:e.toJSON()):[this.type,...this.#t.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#e?.isStart())return!1;if(this.#h===0)return!0;const t=this.#e;for(let e=0;e{const[b,v,m,d]=typeof p=="string"?N.#j(p,this.#s,l):p.toRegExpSource(t);return this.#s=this.#s||m,this.#r=this.#r||d,b}).join("");let u="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Jt.has(this.#t[0]))){const p=Zt,b=e&&p.has(a.charAt(0))||a.startsWith("\\.")&&p.has(a.charAt(2))||a.startsWith("\\.\\.")&&p.has(a.charAt(4)),v=!e&&!t&&p.has(a.charAt(0));u=b?Dt:v?D:""}let c="";return this.isEnd()&&this.#n.#a&&this.#e?.type==="!"&&(c="(?:$|\\/)"),[u+a+c,k(a),this.#s=!!this.#s,this.#r]}const n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let r=this.#y(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){const l=this.toString(),a=this;return a.#t=[l],a.type=null,a.#s=void 0,[l,k(this.toString()),!1,!1]}let i=!n||t||e||!D?"":this.#y(!0);i===r&&(i=""),i&&(r=`(?:${r})(?:${i})*?`);let h="";if(this.type==="!"&&this.#u)h=(this.isStart()&&!e?D:"")+ut;else{const l=this.type==="!"?"))"+(this.isStart()&&!e&&!t?D:"")+lt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?")?":`)${this.type}`;h=s+r+l}return[h,k(r),this.#s=!!this.#s,this.#r]}#y(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[n,s,r,i]=e.toRegExpSource(t);return this.#r=this.#r||i,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#j(t,e,n=!1){let s=!1,r="",i=!1,h=!1;for(let l=0;lt?o.replace(/[?*()[\]]/g,"[$&]"):o.replace(/[?*()[\]\\]/g,"\\$&");var q={};const W=(o,t,e={})=>(J(t),!e.nocomment&&t.charAt(0)==="#"?!1:new B(t,e).match(o)),Vt=/^\*+([^+@!?\*\[\(]*)$/,qt=o=>t=>!t.startsWith(".")&&t.endsWith(o),Kt=o=>t=>t.endsWith(o),Qt=o=>(o=o.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(o)),Xt=o=>(o=o.toLowerCase(),t=>t.toLowerCase().endsWith(o)),Yt=/^\*+\.\*+$/,te=o=>!o.startsWith(".")&&o.includes("."),ee=o=>o!=="."&&o!==".."&&o.includes("."),ne=/^\.\*+$/,se=o=>o!=="."&&o!==".."&&o.startsWith("."),re=/^\*+$/,ie=o=>o.length!==0&&!o.startsWith("."),oe=o=>o.length!==0&&o!=="."&&o!=="..",he=/^\?+([^+@!?\*\[\(]*)?$/,ae=([o,t=""])=>{const e=mt([o]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},le=([o,t=""])=>{const e=bt([o]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},ue=([o,t=""])=>{const e=bt([o]);return t?n=>e(n)&&n.endsWith(t):e},ce=([o,t=""])=>{const e=mt([o]);return t?n=>e(n)&&n.endsWith(t):e},mt=([o])=>{const t=o.length;return e=>e.length===t&&!e.startsWith(".")},bt=([o])=>{const t=o.length;return e=>e.length===t&&e!=="."&&e!==".."},wt=typeof Z=="object"&&Z?typeof q=="object"&&q&&q.__MINIMATCH_TESTING_PLATFORM__||Z.platform:"posix",ct={win32:{sep:"\\"},posix:{sep:"/"}},pe=wt==="win32"?ct.win32.sep:ct.posix.sep;W.sep=pe;const P=Symbol("globstar **");W.GLOBSTAR=P;const fe="[^/]",ge=fe+"*?",de="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ye="(?:(?!(?:\\/|^)\\.).)*?",me=(o,t={})=>e=>W(e,o,t);W.filter=me;const z=(o,t={})=>Object.assign({},o,t),be=o=>{if(!o||typeof o!="object"||!Object.keys(o).length)return W;const t=W;return Object.assign((e,n,s={})=>t(e,n,z(o,s)),{Minimatch:class extends t.Minimatch{constructor(e,n={}){super(e,z(o,n))}static defaults(e){return t.defaults(z(o,e)).Minimatch}},AST:class extends t.AST{constructor(e,n,s={}){super(e,n,z(o,s))}static fromGlob(e,n={}){return t.AST.fromGlob(e,z(o,n))}},unescape:(e,n={})=>t.unescape(e,z(o,n)),escape:(e,n={})=>t.escape(e,z(o,n)),filter:(e,n={})=>t.filter(e,z(o,n)),defaults:e=>t.defaults(z(o,e)),makeRe:(e,n={})=>t.makeRe(e,z(o,n)),braceExpand:(e,n={})=>t.braceExpand(e,z(o,n)),match:(e,n,s={})=>t.match(e,n,z(o,s)),sep:t.sep,GLOBSTAR:P})};W.defaults=be;const vt=(o,t={})=>(J(o),t.nobrace||!/\{(?:(?!\{).)*\}/.test(o)?[o]:zt(o));W.braceExpand=vt;const we=(o,t={})=>new B(o,t).makeRe();W.makeRe=we;const ve=(o,t,e={})=>{const n=new B(t,e);return o=o.filter(s=>n.match(s)),n.options.nonull&&!o.length&&o.push(t),o};W.match=ve;const pt=/[?*]|[+@!]\(.*?\)|\[|\]/,xe=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class B{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,e={}){J(t),e=e||{},this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion??200,this.pattern=t,this.platform=e.platform||wt,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((r,i,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=r[0]===""&&r[1]===""&&(r[2]==="?"||!pt.test(r[2]))&&!pt.test(r[3]),a=/^[a-z]:/i.test(r[0]);if(l)return[...r.slice(0,4),...r.slice(4).map(u=>this.parse(u))];if(a)return[r[0],...r.slice(1).map(u=>this.parse(u))]}return r.map(l=>this.parse(l))});if(this.debug(this.pattern,s),this.set=s.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let n=-1;for(;(n=e.indexOf("**",n+1))!==-1;){let s=n;for(;e[s+1]==="**";)s++;s!==n&&e.splice(n,s-n)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((n,s)=>{const r=n[n.length-1];return s==="**"&&r==="**"?n:s===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(n.pop(),n):(n.push(s),n)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;ss&&n.splice(s+1,i-s);let h=n[s+1];const l=n[s+2],a=n[s+3];if(h!==".."||!l||l==="."||l===".."||!a||a==="."||a==="..")continue;e=!0,n.splice(s,1);const u=n.slice(0);u[s]="**",t.push(u),s--}if(!this.preserveMultipleSlashes){for(let i=1;ie.length)}partsMatch(t,e,n=!1){let s=0,r=0,i=[],h="";for(;s=2&&(t=this.levelTwoFileOptimize(t)),e.includes(P)?this.#n(t,e,n,s,r):this.#r(t,e,n,s,r)}#n(t,e,n,s,r){const i=e.indexOf(P,r),h=e.lastIndexOf(P),[l,a,u]=n?[e.slice(r,i),e.slice(i+1),[]]:[e.slice(r,i),e.slice(i+1,h),e.slice(h+1)];if(l.length){const S=t.slice(s,s+l.length);if(!this.#r(S,l,n,0,0))return!1;s+=l.length}let c=0;if(u.length){if(u.length+s>t.length)return!1;let S=t.length-u.length;if(this.#r(t,u,n,S,0))c=u.length;else{if(t[t.length-1]!==""||s+u.length===t.length||(S--,!this.#r(t,u,n,S,0)))return!1;c=u.length+1}}if(!a.length){let S=!!c;for(let O=s;O{const a=l.map(u=>{if(u instanceof RegExp)for(const c of u.flags.split(""))s.add(c);return typeof u=="string"?xe(u):u===P?P:u._src});return a.forEach((u,c)=>{const p=a[c+1],b=a[c-1];u!==P||b===P||(b===void 0?p!==void 0&&p!==P?a[c+1]="(?:\\/|"+n+"\\/)?"+p:a[c]=n:p===void 0?a[c-1]=b+"(?:\\/|"+n+")?":p!==P&&(a[c-1]=b+"(?:\\/|\\/"+n+"\\/)"+p,a[c+1]=P))}),a.filter(u=>u!==P).join("/")}).join("|");const[i,h]=t.length>1?["(?:",")"]:["",""];r="^"+i+r+h+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const r=this.set;this.debug(this.pattern,"set",r);let i=s[s.length-1];if(!i)for(let h=s.length-2;!i&&h>=0;h--)i=s[h];for(let h=0;h=-1&&!h;l--){var a=l>=0?arguments[l]:Z.cwd();if(t(a)){if(!a)continue}else throw new TypeError("Arguments to path.resolve must be strings");i=a+"/"+i,h=a.charAt(0)==="/"}return i=e(i.split("/"),!h).join("/"),(h?"/":"")+i||"."},s.normalize=function(i){var h=s.isAbsolute(i),l=i.substr(-1)==="/";return i=e(i.split("/"),!h).join("/"),!i&&!h&&(i="."),i&&l&&(i+="/"),(h?"/":"")+i},s.isAbsolute=function(i){return i.charAt(0)==="/"},s.join=function(){for(var i="",h=0;h=0&&m[x]==="";x--);return d>x?[]:m.slice(d,x+1)}for(var a=l(i.split("/")),u=l(h.split("/")),c=Math.min(a.length,u.length),p=c,b=0;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function l(g){return Function.toString.call(g).indexOf("[native code]")!==-1}function a(g,f){return a=Object.setPrototypeOf||function(y,w){return y.__proto__=w,y},a(g,f)}function u(g){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(f){return f.__proto__||Object.getPrototypeOf(f)},u(g)}var c="+",p=".",b=(function(g){s(f,g);function f(y){var w;return t(this,f),w=e(this,u(f).call(this,y)),w.name="ObjectPrototypeMutationError",w}return f})(r(Error));Q={set:d,get:v,has:m,hasOwn:function(g,f,y){return this.has(g,f,y||{own:!0})},isIn:x,ObjectPrototypeMutationError:b};function v(g,f){if(o(g)!="object"||g===null||typeof f>"u")return g;if(typeof f=="number")return g[f];try{return S(g,f,function(y,w){return y[w]})}catch{return g}}function m(g,f){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(o(g)!="object"||g===null||typeof f>"u")return!1;if(typeof f=="number")return f in g;try{var w=!1;return S(g,f,function($,M,E,A){if(O(E,A))y.own?w=$.hasOwnProperty(M):w=M in $;else return $&&$[M]}),w}catch{return!1}}function d(g,f,y){if(o(g)!="object"||g===null||typeof f>"u")return g;if(typeof f=="number")return g[f]=y,g[f];try{return S(g,f,function(w,$,M,E){if(w===Reflect.getPrototypeOf({}))throw new b("Attempting to mutate Object.prototype");if(!w[$]){var A=Number.isInteger(Number(M[E+1])),j=M[E+1]===c;A||j?w[$]=[]:w[$]={}}return O(M,E)&&(w[$]=y),w[$]})}catch(w){if(w instanceof b)throw w;return g}}function x(g,f,y){var w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(o(g)!="object"||g===null||typeof f>"u")return!1;try{var $=!1,M=!1;return S(g,f,function(E,A,j,R){return $=$||E===y||!!E&&E[A]===y,M=O(j,R)&&o(E)==="object"&&A in E,E&&E[A]}),w.validPath?$&&M:$}catch{return!1}}function S(g,f){for(var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},w=f.split(p),$=w.length,M=function(j){var R=w[j];if(!g)return{v:void 0};if(R===c){if(Array.isArray(g))return{v:g.map(function(F,H){var I=w.slice(j+1);return I.length>0?S(F,I.join(p),y):y(g,H,w,j)})};var _=w.slice(0,j).join(p);throw new Error("Object at wildcard (".concat(_,") is not an array"))}else g=y(g,R,w,j)},E=0;E<$;E++){var A=M(E);if(o(A)==="object")return A.v}return g}function O(g,f){return g.length===f+1}return Q}Me();var dt;(function(o){o.Array="array",o.Object="object",o.Original="original"})(dt||(dt={}));function Pe(o,t,e=!1){const{getlastmodified:n=null,getcontentlength:s="0",resourcetype:r=null,getcontenttype:i=null,getetag:h=null}=o,l=r&&typeof r=="object"&&typeof r.collection<"u"?"directory":"file",a={filename:t,basename:$e.basename(t),lastmod:n,size:parseInt(s,10),type:l,etag:typeof h=="string"?h.replace(/"/g,""):null};return l==="file"&&(a.mime=i&&typeof i=="string"?i.split(";")[0]:""),e&&(typeof o.displayname<"u"&&(o.displayname=String(o.displayname)),a.props=o),a}const We=20;async function Ce({resourceType:o,resourceId:t},e){const n=["",o,t].join("/"),s=e.datetime?`${e.datetime.toISOString()}`:"",r=await Wt.customRequest(n,{method:"REPORT",data:`
-
- ${e.limit??We}
- ${e.offset||0}
- ${s}
- `,...e}),i=await r.text(),h=await Ot(i),l=Ae(h,!0);return je(r,l,!0)}function Ae(o,t=!1){const{multistatus:{response:e}}=o;return e.map(n=>{const s=n.propstat.prop;return Pe(s,s.id.toString(),t)})}export{We as D,Pt as a,Wt as c,Ce as g};
-//# sourceMappingURL=GetComments-PgOpAezt.chunk.mjs.map
diff --git a/dist/GetComments-PgOpAezt.chunk.mjs.map b/dist/GetComments-PgOpAezt.chunk.mjs.map
deleted file mode 100644
index 00a9c8d4f5a17..0000000000000
--- a/dist/GetComments-PgOpAezt.chunk.mjs.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"GetComments-PgOpAezt.chunk.mjs","sources":["../build/frontend/apps/comments/src/utils/davUtils.ts","../build/frontend/apps/comments/src/services/DavClient.ts","../node_modules/balanced-match/index.js","../node_modules/webdav/node_modules/brace-expansion/index.js","../node_modules/webdav/node_modules/minimatch/dist/esm/assert-valid-pattern.js","../node_modules/webdav/node_modules/minimatch/dist/esm/brace-expressions.js","../node_modules/webdav/node_modules/minimatch/dist/esm/unescape.js","../node_modules/webdav/node_modules/minimatch/dist/esm/ast.js","../node_modules/webdav/node_modules/minimatch/dist/esm/escape.js","../node_modules/webdav/node_modules/minimatch/dist/esm/index.js","../node_modules/webdav/dist/node/tools/headers.js","../node_modules/webdav/dist/node/response.js","../node_modules/path-posix/index.js","../node_modules/nested-property/dist/nested-property.js","../node_modules/webdav/dist/node/tools/dav.js","../build/frontend/apps/comments/src/services/GetComments.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n/**\n *\n */\nfunction getRootPath() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getClient } from '@nextcloud/files/dav'\nimport { getRootPath } from '../utils/davUtils.ts'\n\nconst client = getClient(getRootPath())\n\nexport default client\n","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m) return [str];\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n if (/\\$$/.test(m.pre)) { \n for (var k = 0; k < post.length; k++) {\n var expansion = pre+ '{' + m.body + '}' + post[k];\n expansions.push(expansion);\n }\n } else {\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = [];\n\n for (var j = 0; j < n.length; j++) {\n N.push.apply(N, expand(n[j], false));\n }\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n }\n\n return expansions;\n}\n\n","const MAX_PATTERN_LENGTH = 1024 * 64;\nexport const assertValidPattern = (pattern) => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern');\n }\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long');\n }\n};\n//# sourceMappingURL=assert-valid-pattern.js.map","// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n// { : [, /u flag required, negated]\nconst posixClasses = {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n};\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s) => s.replace(/[[\\]\\\\-]/g, '\\\\$&');\n// escape all regexp magic characters\nconst regexpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges) => ranges.join('');\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (glob, position) => {\n const pos = position;\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression');\n }\n /* c8 ignore stop */\n const ranges = [];\n const negs = [];\n let i = pos + 1;\n let sawStart = false;\n let uflag = false;\n let escaping = false;\n let negate = false;\n let endPos = pos;\n let rangeStart = '';\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i);\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true;\n i++;\n continue;\n }\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1;\n break;\n }\n sawStart = true;\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true;\n i++;\n continue;\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true];\n }\n i += cls.length;\n if (neg)\n negs.push(unip);\n else\n ranges.push(unip);\n uflag = uflag || u;\n continue WHILE;\n }\n }\n }\n // now it's just a normal character, effectively\n escaping = false;\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));\n }\n else if (c === rangeStart) {\n ranges.push(braceEscape(c));\n }\n rangeStart = '';\n i++;\n continue;\n }\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'));\n i += 2;\n continue;\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c;\n i += 2;\n continue;\n }\n // not the start of a range, just a single character\n ranges.push(braceEscape(c));\n i++;\n }\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false];\n }\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true];\n }\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];\n return [regexpEscape(r), false, endPos - pos, false];\n }\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';\n const comb = ranges.length && negs.length\n ? '(' + sranges + '|' + snegs + ')'\n : ranges.length\n ? sranges\n : snegs;\n return [comb, uflag, endPos - pos, true];\n};\n//# sourceMappingURL=brace-expressions.js.map","/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes. For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {\n return windowsPathsNoEscape\n ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1');\n};\n//# sourceMappingURL=unescape.js.map","// parse a single path portion\nvar _a;\nimport { parseClass } from './brace-expressions.js';\nimport { unescape } from './unescape.js';\nconst types = new Set(['!', '?', '+', '*', '@']);\nconst isExtglobType = (c) => types.has(c);\nconst isExtglobAST = (c) => isExtglobType(c.type);\nconst adoptionMap = new Map([\n ['!', ['@']],\n ['?', ['?', '@']],\n ['@', ['@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@']],\n]);\nconst adoptionWithSpaceMap = new Map([\n ['!', ['?']],\n ['@', ['?']],\n ['+', ['?', '*']],\n]);\nconst adoptionAnyMap = new Map([\n ['!', ['?', '@']],\n ['?', ['?', '@']],\n ['@', ['?', '@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@', '?', '*']],\n]);\nconst usurpMap = new Map([\n ['!', new Map([['!', '@']])],\n ['?', new Map([['*', '*'], ['+', '*']])],\n ['@', new Map([['!', '!'], ['?', '?'], ['@', '@'], ['*', '*'], ['+', '+']])],\n ['+', new Map([['?', '*'], ['*', '*']])],\n]);\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))';\nconst startNoDot = '(?!\\\\.)';\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.']);\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.']);\nconst reSpecials = new Set('().*{}+?[]^$\\\\!');\nconst regExpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// any single thing other than /\nconst qmark = '[^/]';\n// * => any number of characters\nconst star = qmark + '*?';\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?';\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\nexport class AST {\n type;\n #root;\n #hasMagic;\n #uflag = false;\n #parts = [];\n #parent;\n #parentIndex;\n #negs;\n #filledNegs = false;\n #options;\n #toString;\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt = false;\n constructor(type, parent, options = {}) {\n this.type = type;\n // extglobs are inherently magical\n if (type)\n this.#hasMagic = true;\n this.#parent = parent;\n this.#root = this.#parent ? this.#parent.#root : this;\n this.#options = this.#root === this ? options : this.#root.#options;\n this.#negs = this.#root === this ? [] : this.#root.#negs;\n if (type === '!' && !this.#root.#filledNegs)\n this.#negs.push(this);\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;\n }\n get hasMagic() {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined)\n return this.#hasMagic;\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string')\n continue;\n if (p.type || p.hasMagic)\n return (this.#hasMagic = true);\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic;\n }\n // reconstructs the pattern\n toString() {\n if (this.#toString !== undefined)\n return this.#toString;\n if (!this.type) {\n return (this.#toString = this.#parts.map(p => String(p)).join(''));\n }\n else {\n return (this.#toString =\n this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');\n }\n }\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root)\n throw new Error('should only call on root');\n if (this.#filledNegs)\n return this;\n /* c8 ignore stop */\n // call toString() once to fill this out\n this.toString();\n this.#filledNegs = true;\n let n;\n while ((n = this.#negs.pop())) {\n if (n.type !== '!')\n continue;\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p = n;\n let pp = p.#parent;\n while (pp) {\n for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??');\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i]);\n }\n }\n p = pp;\n pp = p.#parent;\n }\n }\n return this;\n }\n push(...parts) {\n for (const p of parts) {\n if (p === '')\n continue;\n /* c8 ignore start */\n if (typeof p !== 'string' && !(p instanceof _a && p.#parent === this)) {\n throw new Error('invalid part: ' + p);\n }\n /* c8 ignore stop */\n this.#parts.push(p);\n }\n }\n toJSON() {\n const ret = this.type === null\n ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => p.toJSON())];\n if (this.isStart() && !this.type)\n ret.unshift([]);\n if (this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))) {\n ret.push({});\n }\n return ret;\n }\n isStart() {\n if (this.#root === this)\n return true;\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart())\n return false;\n if (this.#parentIndex === 0)\n return true;\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent;\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i];\n if (!(pp instanceof _a && pp.type === '!')) {\n return false;\n }\n }\n return true;\n }\n isEnd() {\n if (this.#root === this)\n return true;\n if (this.#parent?.type === '!')\n return true;\n if (!this.#parent?.isEnd())\n return false;\n if (!this.type)\n return this.#parent?.isEnd();\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0;\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1;\n }\n copyIn(part) {\n if (typeof part === 'string')\n this.push(part);\n else\n this.push(part.clone(this));\n }\n clone(parent) {\n const c = new _a(this.type, parent);\n for (const p of this.#parts) {\n c.copyIn(p);\n }\n return c;\n }\n static #parseAST(str, ast, pos, opt, extDepth) {\n const maxDepth = opt.maxExtglobRecursion ?? 2;\n let escaping = false;\n let inBrace = false;\n let braceStart = -1;\n let braceNeg = false;\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos;\n let acc = '';\n while (i < str.length) {\n const c = str.charAt(i++);\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping;\n acc += c;\n continue;\n }\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n const doRecurse = !opt.noext &&\n isExtglobType(c) &&\n str.charAt(i) === '(' &&\n extDepth <= maxDepth;\n if (doRecurse) {\n ast.push(acc);\n acc = '';\n const ext = new _a(c, ast);\n i = _a.#parseAST(str, ext, i, opt, extDepth + 1);\n ast.push(ext);\n continue;\n }\n acc += c;\n }\n ast.push(acc);\n return i;\n }\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1;\n let part = new _a(null, ast);\n const parts = [];\n let acc = '';\n while (i < str.length) {\n const c = str.charAt(i++);\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping;\n acc += c;\n continue;\n }\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n const doRecurse = isExtglobType(c) &&\n str.charAt(i) === '(' &&\n /* c8 ignore start - the maxDepth is sufficient here */\n (extDepth <= maxDepth || (ast && ast.#canAdoptType(c)));\n /* c8 ignore stop */\n if (doRecurse) {\n const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;\n part.push(acc);\n acc = '';\n const ext = new _a(c, part);\n part.push(ext);\n i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd);\n continue;\n }\n if (c === '|') {\n part.push(acc);\n acc = '';\n parts.push(part);\n part = new _a(null, ast);\n continue;\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true;\n }\n part.push(acc);\n acc = '';\n ast.push(...parts, part);\n return i;\n }\n acc += c;\n }\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null;\n ast.#hasMagic = undefined;\n ast.#parts = [str.substring(pos - 1)];\n return i;\n }\n #canAdoptWithSpace(child) {\n return this.#canAdopt(child, adoptionWithSpaceMap);\n }\n #canAdopt(child, map = adoptionMap) {\n if (!child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null) {\n return false;\n }\n const gc = child.#parts[0];\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false;\n }\n return this.#canAdoptType(gc.type, map);\n }\n #canAdoptType(c, map = adoptionAnyMap) {\n return !!map.get(this.type)?.includes(c);\n }\n #adoptWithSpace(child, index) {\n const gc = child.#parts[0];\n const blank = new _a(null, gc, this.options);\n blank.#parts.push('');\n gc.push(blank);\n this.#adopt(child, index);\n }\n #adopt(child, index) {\n const gc = child.#parts[0];\n this.#parts.splice(index, 1, ...gc.#parts);\n for (const p of gc.#parts) {\n if (typeof p === 'object')\n p.#parent = this;\n }\n this.#toString = undefined;\n }\n #canUsurpType(c) {\n const m = usurpMap.get(this.type);\n return !!(m?.has(c));\n }\n #canUsurp(child) {\n if (!child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null ||\n this.#parts.length !== 1) {\n return false;\n }\n const gc = child.#parts[0];\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false;\n }\n return this.#canUsurpType(gc.type);\n }\n #usurp(child) {\n const m = usurpMap.get(this.type);\n const gc = child.#parts[0];\n const nt = m?.get(gc.type);\n /* c8 ignore start - impossible */\n if (!nt)\n return false;\n /* c8 ignore stop */\n this.#parts = gc.#parts;\n for (const p of this.#parts) {\n if (typeof p === 'object')\n p.#parent = this;\n }\n this.type = nt;\n this.#toString = undefined;\n this.#emptyExt = false;\n }\n #flatten() {\n if (!isExtglobAST(this)) {\n for (const p of this.#parts) {\n if (typeof p === 'object')\n p.#flatten();\n }\n }\n else {\n let iterations = 0;\n let done = false;\n do {\n done = true;\n for (let i = 0; i < this.#parts.length; i++) {\n const c = this.#parts[i];\n if (typeof c === 'object') {\n c.#flatten();\n if (this.#canAdopt(c)) {\n done = false;\n this.#adopt(c, i);\n }\n else if (this.#canAdoptWithSpace(c)) {\n done = false;\n this.#adoptWithSpace(c, i);\n }\n else if (this.#canUsurp(c)) {\n done = false;\n this.#usurp(c);\n }\n }\n }\n } while (!done && ++iterations < 10);\n }\n this.#toString = undefined;\n }\n static fromGlob(pattern, options = {}) {\n const ast = new _a(null, undefined, options);\n _a.#parseAST(pattern, ast, 0, options, 0);\n return ast;\n }\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern() {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root)\n return this.#root.toMMPattern();\n /* c8 ignore stop */\n const glob = this.toString();\n const [re, body, hasMagic, uflag] = this.toRegExpSource();\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic = hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase());\n if (!anyMagic) {\n return body;\n }\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n });\n }\n get options() {\n return this.#options;\n }\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(allowDot) {\n const dot = allowDot ?? !!this.#options.dot;\n if (this.#root === this) {\n this.#flatten();\n this.#fillNegs();\n }\n if (!isExtglobAST(this)) {\n const noEmpty = this.isStart() && this.isEnd();\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] = typeof p === 'string'\n ? _a.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot);\n this.#hasMagic = this.#hasMagic || hasMagic;\n this.#uflag = this.#uflag || uflag;\n return re;\n })\n .join('');\n let start = '';\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);\n if (!dotTravAllowed) {\n const aps = addPatternStart;\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav = \n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)));\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));\n start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';\n }\n }\n }\n // append the \"end of path portion\" pattern to negation tails\n let end = '';\n if (this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!') {\n end = '(?:$|\\\\/)';\n }\n const final = start + src + end;\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ];\n }\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n const repeated = this.type === '*' || this.type === '+';\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:';\n let body = this.#partsToRegExp(dot);\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString();\n const me = this;\n me.#parts = [s];\n me.type = null;\n me.#hasMagic = undefined;\n return [s, unescape(this.toString()), false, false];\n }\n // XXX abstract out this map method\n let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot\n ? ''\n : this.#partsToRegExp(true);\n if (bodyDotAllowed === body) {\n bodyDotAllowed = '';\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`;\n }\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = '';\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;\n }\n else {\n const close = this.type === '!'\n ? // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@'\n ? ')'\n : this.type === '?'\n ? ')?'\n : this.type === '+' && bodyDotAllowed\n ? ')'\n : this.type === '*' && bodyDotAllowed\n ? `)?`\n : `)${this.type}`;\n final = start + body + close;\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ];\n }\n #partsToRegExp(dot) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??');\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);\n this.#uflag = this.#uflag || uflag;\n return re;\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|');\n }\n static #parseGlob(glob, hasMagic, noEmpty = false) {\n let escaping = false;\n let re = '';\n let uflag = false;\n // multiple stars that aren't globstars coalesce into one *\n let inStar = false;\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i);\n if (escaping) {\n escaping = false;\n re += (reSpecials.has(c) ? '\\\\' : '') + c;\n inStar = false;\n continue;\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\';\n }\n else {\n escaping = true;\n }\n continue;\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i);\n if (consumed) {\n re += src;\n uflag = uflag || needUflag;\n i += consumed - 1;\n hasMagic = hasMagic || magic;\n inStar = false;\n continue;\n }\n }\n if (c === '*') {\n if (inStar)\n continue;\n inStar = true;\n re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;\n hasMagic = true;\n continue;\n }\n else {\n inStar = false;\n }\n if (c === '?') {\n re += qmark;\n hasMagic = true;\n continue;\n }\n re += regExpEscape(c);\n }\n return [re, unescape(glob), !!hasMagic, uflag];\n }\n}\n_a = AST;\n//# sourceMappingURL=ast.js.map","/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (s, { windowsPathsNoEscape = false, } = {}) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&');\n};\n//# sourceMappingURL=escape.js.map","import expand from 'brace-expansion';\nimport { assertValidPattern } from './assert-valid-pattern.js';\nimport { AST } from './ast.js';\nimport { escape } from './escape.js';\nimport { unescape } from './unescape.js';\nexport const minimatch = (p, pattern, options = {}) => {\n assertValidPattern(pattern);\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false;\n }\n return new Minimatch(pattern, options).match(p);\n};\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/;\nconst starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);\nconst starDotExtTestDot = (ext) => (f) => f.endsWith(ext);\nconst starDotExtTestNocase = (ext) => {\n ext = ext.toLowerCase();\n return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);\n};\nconst starDotExtTestNocaseDot = (ext) => {\n ext = ext.toLowerCase();\n return (f) => f.toLowerCase().endsWith(ext);\n};\nconst starDotStarRE = /^\\*+\\.\\*+$/;\nconst starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');\nconst starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');\nconst dotStarRE = /^\\.\\*+$/;\nconst dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');\nconst starRE = /^\\*+$/;\nconst starTest = (f) => f.length !== 0 && !f.startsWith('.');\nconst starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/;\nconst qmarksTestNocase = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestNocaseDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTest = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTestNoExt = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && !f.startsWith('.');\n};\nconst qmarksTestNoExtDot = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && f !== '.' && f !== '..';\n};\n/* c8 ignore start */\nconst defaultPlatform = (typeof process === 'object' && process\n ? (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix');\nconst path = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n};\n/* c8 ignore stop */\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;\nminimatch.sep = sep;\nexport const GLOBSTAR = Symbol('globstar **');\nminimatch.GLOBSTAR = GLOBSTAR;\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]';\n// * => any number of characters\nconst star = qmark + '*?';\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?';\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?';\nexport const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);\nminimatch.filter = filter;\nconst ext = (a, b = {}) => Object.assign({}, a, b);\nexport const defaults = (def) => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch;\n }\n const orig = minimatch;\n const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern, options = {}) {\n super(pattern, ext(def, options));\n }\n static defaults(options) {\n return orig.defaults(ext(def, options)).Minimatch;\n }\n },\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(type, parent, options = {}) {\n super(type, parent, ext(def, options));\n }\n /* c8 ignore stop */\n static fromGlob(pattern, options = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options));\n }\n },\n unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),\n escape: (s, options = {}) => orig.escape(s, ext(def, options)),\n filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),\n defaults: (options) => orig.defaults(ext(def, options)),\n makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),\n braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),\n match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR,\n });\n};\nminimatch.defaults = defaults;\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (pattern, options = {}) => {\n assertValidPattern(pattern);\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern];\n }\n return expand(pattern);\n};\nminimatch.braceExpand = braceExpand;\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nexport const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();\nminimatch.makeRe = makeRe;\nexport const match = (list, pattern, options = {}) => {\n const mm = new Minimatch(pattern, options);\n list = list.filter(f => mm.match(f));\n if (mm.options.nonull && !list.length) {\n list.push(pattern);\n }\n return list;\n};\nminimatch.match = match;\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/;\nconst regExpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\nexport class Minimatch {\n options;\n set;\n pattern;\n windowsPathsNoEscape;\n nonegate;\n negate;\n comment;\n empty;\n preserveMultipleSlashes;\n partial;\n globSet;\n globParts;\n nocase;\n isWindows;\n platform;\n windowsNoMagicRoot;\n maxGlobstarRecursion;\n regexp;\n constructor(pattern, options = {}) {\n assertValidPattern(pattern);\n options = options || {};\n this.options = options;\n this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;\n this.pattern = pattern;\n this.platform = options.platform || defaultPlatform;\n this.isWindows = this.platform === 'win32';\n this.windowsPathsNoEscape =\n !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;\n if (this.windowsPathsNoEscape) {\n this.pattern = this.pattern.replace(/\\\\/g, '/');\n }\n this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;\n this.regexp = null;\n this.negate = false;\n this.nonegate = !!options.nonegate;\n this.comment = false;\n this.empty = false;\n this.partial = !!options.partial;\n this.nocase = !!this.options.nocase;\n this.windowsNoMagicRoot =\n options.windowsNoMagicRoot !== undefined\n ? options.windowsNoMagicRoot\n : !!(this.isWindows && this.nocase);\n this.globSet = [];\n this.globParts = [];\n this.set = [];\n // make the set of regexps etc.\n this.make();\n }\n hasMagic() {\n if (this.options.magicalBraces && this.set.length > 1) {\n return true;\n }\n for (const pattern of this.set) {\n for (const part of pattern) {\n if (typeof part !== 'string')\n return true;\n }\n }\n return false;\n }\n debug(..._) { }\n make() {\n const pattern = this.pattern;\n const options = this.options;\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true;\n return;\n }\n if (!pattern) {\n this.empty = true;\n return;\n }\n // step 1: figure out negation, etc.\n this.parseNegate();\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())];\n if (options.debug) {\n this.debug = (...args) => console.error(...args);\n }\n this.debug(this.pattern, this.globSet);\n // step 3: now we have a set, so turn each one into a series of\n // path-portion matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n //\n // First, we preprocess to make the glob pattern sets a bit simpler\n // and deduped. There are some perf-killing patterns that can cause\n // problems with a glob walk, but we can simplify them down a bit.\n const rawGlobParts = this.globSet.map(s => this.slashSplit(s));\n this.globParts = this.preprocess(rawGlobParts);\n this.debug(this.pattern, this.globParts);\n // glob --> regexps\n let set = this.globParts.map((s, _, __) => {\n if (this.isWindows && this.windowsNoMagicRoot) {\n // check if it's a drive or unc path.\n const isUNC = s[0] === '' &&\n s[1] === '' &&\n (s[2] === '?' || !globMagic.test(s[2])) &&\n !globMagic.test(s[3]);\n const isDrive = /^[a-z]:/i.test(s[0]);\n if (isUNC) {\n return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];\n }\n else if (isDrive) {\n return [s[0], ...s.slice(1).map(ss => this.parse(ss))];\n }\n }\n return s.map(ss => this.parse(ss));\n });\n this.debug(this.pattern, set);\n // filter out everything that didn't compile properly.\n this.set = set.filter(s => s.indexOf(false) === -1);\n // do not treat the ? in UNC paths as magic\n if (this.isWindows) {\n for (let i = 0; i < this.set.length; i++) {\n const p = this.set[i];\n if (p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])) {\n p[2] = '?';\n }\n }\n }\n this.debug(this.pattern, this.set);\n }\n // various transforms to equivalent pattern sets that are\n // faster to process in a filesystem walk. The goal is to\n // eliminate what we can, and push all ** patterns as far\n // to the right as possible, even if it increases the number\n // of patterns that we have to process.\n preprocess(globParts) {\n // if we're not in globstar mode, then turn all ** into *\n if (this.options.noglobstar) {\n for (let i = 0; i < globParts.length; i++) {\n for (let j = 0; j < globParts[i].length; j++) {\n if (globParts[i][j] === '**') {\n globParts[i][j] = '*';\n }\n }\n }\n }\n const { optimizationLevel = 1 } = this.options;\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts);\n globParts = this.secondPhasePreProcess(globParts);\n }\n else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts);\n }\n else {\n // just collapse multiple ** portions into one\n globParts = this.adjascentGlobstarOptimize(globParts);\n }\n return globParts;\n }\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts) {\n return globParts.map(parts => {\n let gs = -1;\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let i = gs;\n while (parts[i + 1] === '**') {\n i++;\n }\n if (i !== gs) {\n parts.splice(gs, i - gs);\n }\n }\n return parts;\n });\n }\n // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts) {\n return globParts.map(parts => {\n parts = parts.reduce((set, part) => {\n const prev = set[set.length - 1];\n if (part === '**' && prev === '**') {\n return set;\n }\n if (part === '..') {\n if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n set.pop();\n return set;\n }\n }\n set.push(part);\n return set;\n }, []);\n return parts.length === 0 ? [''] : parts;\n });\n }\n levelTwoFileOptimize(parts) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts);\n }\n let didSomething = false;\n do {\n didSomething = false;\n //
// ->
/\n if (!this.preserveMultipleSlashes) {\n for (let i = 1; i < parts.length - 1; i++) {\n const p = parts[i];\n // don't squeeze out UNC patterns\n if (i === 1 && p === '' && parts[0] === '')\n continue;\n if (p === '.' || p === '') {\n didSomething = true;\n parts.splice(i, 1);\n i--;\n }\n }\n if (parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')) {\n didSomething = true;\n parts.pop();\n }\n }\n //
/
/../ ->
/\n let dd = 0;\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1];\n if (p && p !== '.' && p !== '..' && p !== '**') {\n didSomething = true;\n parts.splice(dd - 1, 2);\n dd -= 2;\n }\n }\n } while (didSomething);\n return parts.length === 0 ? [''] : parts;\n }\n // First phase: single-pattern processing\n //
is 1 or more portions\n // is 1 or more portions\n //
is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //
/**/../
/
/ -> {
/../
/
/,
/**/
/
/}\n //
// ->
/\n //
/
/../ ->
/\n // **/**/ -> **/\n //\n // **/*/ -> */**/ <== not valid because ** doesn't follow\n // this WOULD be allowed if ** did follow symlinks, or * didn't\n firstPhasePreProcess(globParts) {\n let didSomething = false;\n do {\n didSomething = false;\n //
/**/../
/
/ -> {
/../
/
/,
/**/
/
/}\n for (let parts of globParts) {\n let gs = -1;\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss = gs;\n while (parts[gss + 1] === '**') {\n //
/**/**/ ->
/**/\n gss++;\n }\n // eg, if gs is 2 and gss is 4, that means we have 3 **\n // parts, and can remove 2 of them.\n if (gss > gs) {\n parts.splice(gs + 1, gss - gs);\n }\n let next = parts[gs + 1];\n const p = parts[gs + 2];\n const p2 = parts[gs + 3];\n if (next !== '..')\n continue;\n if (!p ||\n p === '.' ||\n p === '..' ||\n !p2 ||\n p2 === '.' ||\n p2 === '..') {\n continue;\n }\n didSomething = true;\n // edit parts in place, and push the new one\n parts.splice(gs, 1);\n const other = parts.slice(0);\n other[gs] = '**';\n globParts.push(other);\n gs--;\n }\n //
// ->
/\n if (!this.preserveMultipleSlashes) {\n for (let i = 1; i < parts.length - 1; i++) {\n const p = parts[i];\n // don't squeeze out UNC patterns\n if (i === 1 && p === '' && parts[0] === '')\n continue;\n if (p === '.' || p === '') {\n didSomething = true;\n parts.splice(i, 1);\n i--;\n }\n }\n if (parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')) {\n didSomething = true;\n parts.pop();\n }\n }\n //
/
/../ ->
/\n let dd = 0;\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1];\n if (p && p !== '.' && p !== '..' && p !== '**') {\n didSomething = true;\n const needDot = dd === 1 && parts[dd + 1] === '**';\n const splin = needDot ? ['.'] : [];\n parts.splice(dd - 1, 2, ...splin);\n if (parts.length === 0)\n parts.push('');\n dd -= 2;\n }\n }\n }\n } while (didSomething);\n return globParts;\n }\n // second phase: multi-pattern dedupes\n // {
/*/,
/
/} ->
/*/\n // {
/,
/} ->
/\n // {
/**/,
/} ->
/**/\n //\n // {
/**/,
/**/
/} ->
/**/\n // ^-- not valid because ** doens't follow symlinks\n secondPhasePreProcess(globParts) {\n for (let i = 0; i < globParts.length - 1; i++) {\n for (let j = i + 1; j < globParts.length; j++) {\n const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);\n if (matched) {\n globParts[i] = [];\n globParts[j] = matched;\n break;\n }\n }\n }\n return globParts.filter(gs => gs.length);\n }\n partsMatch(a, b, emptyGSMatch = false) {\n let ai = 0;\n let bi = 0;\n let result = [];\n let which = '';\n while (ai < a.length && bi < b.length) {\n if (a[ai] === b[bi]) {\n result.push(which === 'b' ? b[bi] : a[ai]);\n ai++;\n bi++;\n }\n else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n result.push(a[ai]);\n ai++;\n }\n else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n result.push(b[bi]);\n bi++;\n }\n else if (a[ai] === '*' &&\n b[bi] &&\n (this.options.dot || !b[bi].startsWith('.')) &&\n b[bi] !== '**') {\n if (which === 'b')\n return false;\n which = 'a';\n result.push(a[ai]);\n ai++;\n bi++;\n }\n else if (b[bi] === '*' &&\n a[ai] &&\n (this.options.dot || !a[ai].startsWith('.')) &&\n a[ai] !== '**') {\n if (which === 'a')\n return false;\n which = 'b';\n result.push(b[bi]);\n ai++;\n bi++;\n }\n else {\n return false;\n }\n }\n // if we fall out of the loop, it means they two are identical\n // as long as their lengths match\n return a.length === b.length && result;\n }\n parseNegate() {\n if (this.nonegate)\n return;\n const pattern = this.pattern;\n let negate = false;\n let negateOffset = 0;\n for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n negate = !negate;\n negateOffset++;\n }\n if (negateOffset)\n this.pattern = pattern.slice(negateOffset);\n this.negate = negate;\n }\n // set partial to true to test if, for example,\n // \"/a/b\" matches the start of \"/*/b/*/d\"\n // Partial means, if you run out of file before you run\n // out of pattern, then that's fine, as long as all\n // the parts match.\n matchOne(file, pattern, partial = false) {\n let fileStartIndex = 0;\n let patternStartIndex = 0;\n // UNC paths like //?/X:/... can match X:/... and vice versa\n // Drive letters in absolute drive or unc paths are always compared\n // case-insensitively.\n if (this.isWindows) {\n const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);\n const fileUNC = !fileDrive &&\n file[0] === '' &&\n file[1] === '' &&\n file[2] === '?' &&\n /^[a-z]:$/i.test(file[3]);\n const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);\n const patternUNC = !patternDrive &&\n pattern[0] === '' &&\n pattern[1] === '' &&\n pattern[2] === '?' &&\n typeof pattern[3] === 'string' &&\n /^[a-z]:$/i.test(pattern[3]);\n const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;\n const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;\n if (typeof fdi === 'number' && typeof pdi === 'number') {\n const [fd, pd] = [\n file[fdi],\n pattern[pdi],\n ];\n if (fd.toLowerCase() === pd.toLowerCase()) {\n pattern[pdi] = fd;\n patternStartIndex = pdi;\n fileStartIndex = fdi;\n }\n }\n }\n // resolve and reduce . and .. portions in the file as well.\n // dont' need to do the second phase, because it's only one string[]\n const { optimizationLevel = 1 } = this.options;\n if (optimizationLevel >= 2) {\n file = this.levelTwoFileOptimize(file);\n }\n if (pattern.includes(GLOBSTAR)) {\n return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);\n }\n return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);\n }\n #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {\n const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);\n const lastgs = pattern.lastIndexOf(GLOBSTAR);\n const [head, body, tail] = partial ? [\n pattern.slice(patternIndex, firstgs),\n pattern.slice(firstgs + 1),\n [],\n ] : [\n pattern.slice(patternIndex, firstgs),\n pattern.slice(firstgs + 1, lastgs),\n pattern.slice(lastgs + 1),\n ];\n if (head.length) {\n const fileHead = file.slice(fileIndex, fileIndex + head.length);\n if (!this.#matchOne(fileHead, head, partial, 0, 0))\n return false;\n fileIndex += head.length;\n }\n let fileTailMatch = 0;\n if (tail.length) {\n if (tail.length + fileIndex > file.length)\n return false;\n let tailStart = file.length - tail.length;\n if (this.#matchOne(file, tail, partial, tailStart, 0)) {\n fileTailMatch = tail.length;\n }\n else {\n if (file[file.length - 1] !== '' ||\n fileIndex + tail.length === file.length) {\n return false;\n }\n tailStart--;\n if (!this.#matchOne(file, tail, partial, tailStart, 0))\n return false;\n fileTailMatch = tail.length + 1;\n }\n }\n if (!body.length) {\n let sawSome = !!fileTailMatch;\n for (let i = fileIndex; i < file.length - fileTailMatch; i++) {\n const f = String(file[i]);\n sawSome = true;\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n }\n return partial || sawSome;\n }\n const bodySegments = [[[], 0]];\n let currentBody = bodySegments[0];\n let nonGsParts = 0;\n const nonGsPartsSums = [0];\n for (const b of body) {\n if (b === GLOBSTAR) {\n nonGsPartsSums.push(nonGsParts);\n currentBody = [[], 0];\n bodySegments.push(currentBody);\n }\n else {\n currentBody[0].push(b);\n nonGsParts++;\n }\n }\n let i = bodySegments.length - 1;\n const fileLength = file.length - fileTailMatch;\n for (const b of bodySegments) {\n b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);\n }\n return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);\n }\n #matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {\n const bs = bodySegments[bodyIndex];\n if (!bs) {\n for (let i = fileIndex; i < file.length; i++) {\n sawTail = true;\n const f = file[i];\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n }\n return sawTail;\n }\n const [body, after] = bs;\n while (fileIndex <= after) {\n const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);\n if (m && globStarDepth < this.maxGlobstarRecursion) {\n const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);\n if (sub !== false)\n return sub;\n }\n const f = file[fileIndex];\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n fileIndex++;\n }\n return partial || null;\n }\n #matchOne(file, pattern, partial, fileIndex, patternIndex) {\n let fi;\n let pi;\n let pl;\n let fl;\n for (fi = fileIndex, pi = patternIndex,\n fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {\n this.debug('matchOne loop');\n let p = pattern[pi];\n let f = file[fi];\n this.debug(pattern, p, f);\n /* c8 ignore start */\n if (p === false || p === GLOBSTAR)\n return false;\n /* c8 ignore stop */\n let hit;\n if (typeof p === 'string') {\n hit = f === p;\n this.debug('string match', p, f, hit);\n }\n else {\n hit = p.test(f);\n this.debug('pattern match', p, f, hit);\n }\n if (!hit)\n return false;\n }\n if (fi === fl && pi === pl) {\n return true;\n }\n else if (fi === fl) {\n return partial;\n }\n else if (pi === pl) {\n return fi === fl - 1 && file[fi] === '';\n /* c8 ignore start */\n }\n else {\n throw new Error('wtf?');\n }\n /* c8 ignore stop */\n }\n braceExpand() {\n return braceExpand(this.pattern, this.options);\n }\n parse(pattern) {\n assertValidPattern(pattern);\n const options = this.options;\n // shortcuts\n if (pattern === '**')\n return GLOBSTAR;\n if (pattern === '')\n return '';\n // far and away, the most common glob pattern parts are\n // *, *.*, and *. Add a fast check method for those.\n let m;\n let fastTest = null;\n if ((m = pattern.match(starRE))) {\n fastTest = options.dot ? starTestDot : starTest;\n }\n else if ((m = pattern.match(starDotExtRE))) {\n fastTest = (options.nocase\n ? options.dot\n ? starDotExtTestNocaseDot\n : starDotExtTestNocase\n : options.dot\n ? starDotExtTestDot\n : starDotExtTest)(m[1]);\n }\n else if ((m = pattern.match(qmarksRE))) {\n fastTest = (options.nocase\n ? options.dot\n ? qmarksTestNocaseDot\n : qmarksTestNocase\n : options.dot\n ? qmarksTestDot\n : qmarksTest)(m);\n }\n else if ((m = pattern.match(starDotStarRE))) {\n fastTest = options.dot ? starDotStarTestDot : starDotStarTest;\n }\n else if ((m = pattern.match(dotStarRE))) {\n fastTest = dotStarTest;\n }\n const re = AST.fromGlob(pattern, this.options).toMMPattern();\n if (fastTest && typeof re === 'object') {\n // Avoids overriding in frozen environments\n Reflect.defineProperty(re, 'test', { value: fastTest });\n }\n return re;\n }\n makeRe() {\n if (this.regexp || this.regexp === false)\n return this.regexp;\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n const set = this.set;\n if (!set.length) {\n this.regexp = false;\n return this.regexp;\n }\n const options = this.options;\n const twoStar = options.noglobstar\n ? star\n : options.dot\n ? twoStarDot\n : twoStarNoDot;\n const flags = new Set(options.nocase ? ['i'] : []);\n // regexpify non-globstar patterns\n // if ** is only item, then we just do one twoStar\n // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n // if ** is last, append (\\/twoStar|) to previous\n // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n // then filter out GLOBSTAR symbols\n let re = set\n .map(pattern => {\n const pp = pattern.map(p => {\n if (p instanceof RegExp) {\n for (const f of p.flags.split(''))\n flags.add(f);\n }\n return typeof p === 'string'\n ? regExpEscape(p)\n : p === GLOBSTAR\n ? GLOBSTAR\n : p._src;\n });\n pp.forEach((p, i) => {\n const next = pp[i + 1];\n const prev = pp[i - 1];\n if (p !== GLOBSTAR || prev === GLOBSTAR) {\n return;\n }\n if (prev === undefined) {\n if (next !== undefined && next !== GLOBSTAR) {\n pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next;\n }\n else {\n pp[i] = twoStar;\n }\n }\n else if (next === undefined) {\n pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?';\n }\n else if (next !== GLOBSTAR) {\n pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next;\n pp[i + 1] = GLOBSTAR;\n }\n });\n return pp.filter(p => p !== GLOBSTAR).join('/');\n })\n .join('|');\n // need to wrap in parens if we had more than one thing with |,\n // otherwise only the first will be anchored to ^ and the last to $\n const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^' + open + re + close + '$';\n // can match anything, as long as it's not this.\n if (this.negate)\n re = '^(?!' + re + ').+$';\n try {\n this.regexp = new RegExp(re, [...flags].join(''));\n /* c8 ignore start */\n }\n catch (ex) {\n // should be impossible\n this.regexp = false;\n }\n /* c8 ignore stop */\n return this.regexp;\n }\n slashSplit(p) {\n // if p starts with // on windows, we preserve that\n // so that UNC paths aren't broken. Otherwise, any number of\n // / characters are coalesced into one, unless\n // preserveMultipleSlashes is set to true.\n if (this.preserveMultipleSlashes) {\n return p.split('/');\n }\n else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n // add an extra '' for the one we lose\n return ['', ...p.split(/\\/+/)];\n }\n else {\n return p.split(/\\/+/);\n }\n }\n match(f, partial = this.partial) {\n this.debug('match', f, this.pattern);\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) {\n return false;\n }\n if (this.empty) {\n return f === '';\n }\n if (f === '/' && partial) {\n return true;\n }\n const options = this.options;\n // windows: need to use /, not \\\n if (this.isWindows) {\n f = f.split('\\\\').join('/');\n }\n // treat the test path as a set of pathparts.\n const ff = this.slashSplit(f);\n this.debug(this.pattern, 'split', ff);\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n const set = this.set;\n this.debug(this.pattern, 'set', set);\n // Find the basename of the path by looking for the last non-empty segment\n let filename = ff[ff.length - 1];\n if (!filename) {\n for (let i = ff.length - 2; !filename && i >= 0; i--) {\n filename = ff[i];\n }\n }\n for (let i = 0; i < set.length; i++) {\n const pattern = set[i];\n let file = ff;\n if (options.matchBase && pattern.length === 1) {\n file = [filename];\n }\n const hit = this.matchOne(file, pattern, partial);\n if (hit) {\n if (options.flipNegate) {\n return true;\n }\n return !this.negate;\n }\n }\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) {\n return false;\n }\n return this.negate;\n }\n static defaults(def) {\n return minimatch.defaults(def).Minimatch;\n }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js';\nexport { escape } from './escape.js';\nexport { unescape } from './unescape.js';\n/* c8 ignore stop */\nminimatch.AST = AST;\nminimatch.Minimatch = Minimatch;\nminimatch.escape = escape;\nminimatch.unescape = unescape;\n//# sourceMappingURL=index.js.map","export function convertResponseHeaders(headers) {\n const output = {};\n for (const key of headers.keys()) {\n output[key] = headers.get(key);\n }\n return output;\n}\nexport function mergeHeaders(...headerPayloads) {\n if (headerPayloads.length === 0)\n return {};\n const headerKeys = {};\n return headerPayloads.reduce((output, headers) => {\n Object.keys(headers).forEach(header => {\n const lowerHeader = header.toLowerCase();\n if (headerKeys.hasOwnProperty(lowerHeader)) {\n output[headerKeys[lowerHeader]] = headers[header];\n }\n else {\n headerKeys[lowerHeader] = header;\n output[header] = headers[header];\n }\n });\n return output;\n }, {});\n}\n","import { minimatch } from \"minimatch\";\nimport { convertResponseHeaders } from \"./tools/headers.js\";\nexport function createErrorFromResponse(response, prefix = \"\") {\n const err = new Error(`${prefix}Invalid response: ${response.status} ${response.statusText}`);\n err.status = response.status;\n err.response = response;\n return err;\n}\nexport function handleResponseCode(context, response) {\n const { status } = response;\n if (status === 401 && context.digest)\n return response;\n if (status >= 400) {\n const err = createErrorFromResponse(response);\n throw err;\n }\n return response;\n}\nexport function processGlobFilter(files, glob) {\n return files.filter(file => minimatch(file.filename, glob, { matchBase: true }));\n}\n/**\n * Process a response payload (eg. from `customRequest`) and\n * prepare it for further processing. Exposed for custom\n * request handling.\n * @param response The response for a request\n * @param data The data returned\n * @param isDetailed Whether or not a detailed result is\n * requested\n * @returns The response data, or a detailed response object\n * if required\n */\nexport function processResponsePayload(response, data, isDetailed = false) {\n return isDetailed\n ? {\n data,\n headers: response.headers ? convertResponseHeaders(response.headers) : {},\n status: response.status,\n statusText: response.statusText\n }\n : data;\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\nvar util = require('util');\nvar isString = function (x) {\n return typeof x === 'string';\n};\n\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n var res = [];\n for (var i = 0; i < parts.length; i++) {\n var p = parts[i];\n\n // ignore empty parts\n if (!p || p === '.')\n continue;\n\n if (p === '..') {\n if (res.length && res[res.length - 1] !== '..') {\n res.pop();\n } else if (allowAboveRoot) {\n res.push('..');\n }\n } else {\n res.push(p);\n }\n }\n\n return res;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar posix = {};\n\n\nfunction posixSplitPath(filename) {\n return splitPathRe.exec(filename).slice(1);\n}\n\n\n// path.resolve([from ...], to)\n// posix version\nposix.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (!isString(path)) {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/'),\n !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nposix.normalize = function(path) {\n var isAbsolute = posix.isAbsolute(path),\n trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n path = normalizeArray(path.split('/'), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nposix.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nposix.join = function() {\n var path = '';\n for (var i = 0; i < arguments.length; i++) {\n var segment = arguments[i];\n if (!isString(segment)) {\n throw new TypeError('Arguments to path.join must be strings');\n }\n if (segment) {\n if (!path) {\n path += segment;\n } else {\n path += '/' + segment;\n }\n }\n }\n return posix.normalize(path);\n};\n\n\n// path.relative(from, to)\n// posix version\nposix.relative = function(from, to) {\n from = posix.resolve(from).substr(1);\n to = posix.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\n\nposix._makeLong = function(path) {\n return path;\n};\n\n\nposix.dirname = function(path) {\n var result = posixSplitPath(path),\n root = result[0],\n dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n};\n\n\nposix.basename = function(path, ext) {\n var f = posixSplitPath(path)[2];\n // TODO: make this comparison case-insensitive on windows?\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\n\nposix.extname = function(path) {\n return posixSplitPath(path)[3];\n};\n\n\nposix.format = function(pathObject) {\n if (!util.isObject(pathObject)) {\n throw new TypeError(\n \"Parameter 'pathObject' must be an object, not \" + typeof pathObject\n );\n }\n\n var root = pathObject.root || '';\n\n if (!isString(root)) {\n throw new TypeError(\n \"'pathObject.root' must be a string or undefined, not \" +\n typeof pathObject.root\n );\n }\n\n var dir = pathObject.dir ? pathObject.dir + posix.sep : '';\n var base = pathObject.base || '';\n return dir + base;\n};\n\n\nposix.parse = function(pathString) {\n if (!isString(pathString)) {\n throw new TypeError(\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\n );\n }\n var allParts = posixSplitPath(pathString);\n if (!allParts || allParts.length !== 4) {\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\n }\n allParts[1] = allParts[1] || '';\n allParts[2] = allParts[2] || '';\n allParts[3] = allParts[3] || '';\n\n return {\n root: allParts[0],\n dir: allParts[0] + allParts[1].slice(0, allParts[1].length - 1),\n base: allParts[2],\n ext: allParts[3],\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\n };\n};\n\n\nposix.sep = '/';\nposix.delimiter = ':';\n\n module.exports = posix;\n","/**\n* @license nested-property https://github.com/cosmosio/nested-property\n*\n* The MIT License (MIT)\n*\n* Copyright (c) 2014-2020 Olivier Scherrer \n*/\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ARRAY_WILDCARD = \"+\";\nvar PATH_DELIMITER = \".\";\n\nvar ObjectPrototypeMutationError = /*#__PURE__*/function (_Error) {\n _inherits(ObjectPrototypeMutationError, _Error);\n\n function ObjectPrototypeMutationError(params) {\n var _this;\n\n _classCallCheck(this, ObjectPrototypeMutationError);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ObjectPrototypeMutationError).call(this, params));\n _this.name = \"ObjectPrototypeMutationError\";\n return _this;\n }\n\n return ObjectPrototypeMutationError;\n}(_wrapNativeSuper(Error));\n\nmodule.exports = {\n set: setNestedProperty,\n get: getNestedProperty,\n has: hasNestedProperty,\n hasOwn: function hasOwn(object, property, options) {\n return this.has(object, property, options || {\n own: true\n });\n },\n isIn: isInNestedProperty,\n ObjectPrototypeMutationError: ObjectPrototypeMutationError\n};\n/**\n * Get the property of an object nested in one or more objects or array\n * Given an object such as a.b.c.d = 5, getNestedProperty(a, \"b.c.d\") will return 5.\n * It also works through arrays. Given a nested array such as a[0].b = 5, getNestedProperty(a, \"0.b\") will return 5.\n * For accessing nested properties through all items in an array, you may use the array wildcard \"+\".\n * For instance, getNestedProperty([{a:1}, {a:2}, {a:3}], \"+.a\") will return [1, 2, 3]\n * @param {Object} object the object to get the property from\n * @param {String} property the path to the property as a string\n * @returns the object or the the property value if found\n */\n\nfunction getNestedProperty(object, property) {\n if (_typeof(object) != \"object\" || object === null) {\n return object;\n }\n\n if (typeof property == \"undefined\") {\n return object;\n }\n\n if (typeof property == \"number\") {\n return object[property];\n }\n\n try {\n return traverse(object, property, function _getNestedProperty(currentObject, currentProperty) {\n return currentObject[currentProperty];\n });\n } catch (err) {\n return object;\n }\n}\n/**\n * Tell if a nested object has a given property (or array a given index)\n * given an object such as a.b.c.d = 5, hasNestedProperty(a, \"b.c.d\") will return true.\n * It also returns true if the property is in the prototype chain.\n * @param {Object} object the object to get the property from\n * @param {String} property the path to the property as a string\n * @param {Object} options:\n * - own: set to reject properties from the prototype\n * @returns true if has (property in object), false otherwise\n */\n\n\nfunction hasNestedProperty(object, property) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (_typeof(object) != \"object\" || object === null) {\n return false;\n }\n\n if (typeof property == \"undefined\") {\n return false;\n }\n\n if (typeof property == \"number\") {\n return property in object;\n }\n\n try {\n var has = false;\n traverse(object, property, function _hasNestedProperty(currentObject, currentProperty, segments, index) {\n if (isLastSegment(segments, index)) {\n if (options.own) {\n has = currentObject.hasOwnProperty(currentProperty);\n } else {\n has = currentProperty in currentObject;\n }\n } else {\n return currentObject && currentObject[currentProperty];\n }\n });\n return has;\n } catch (err) {\n return false;\n }\n}\n/**\n * Set the property of an object nested in one or more objects\n * If the property doesn't exist, it gets created.\n * @param {Object} object\n * @param {String} property\n * @param value the value to set\n * @returns object if no assignment was made or the value if the assignment was made\n */\n\n\nfunction setNestedProperty(object, property, value) {\n if (_typeof(object) != \"object\" || object === null) {\n return object;\n }\n\n if (typeof property == \"undefined\") {\n return object;\n }\n\n if (typeof property == \"number\") {\n object[property] = value;\n return object[property];\n }\n\n try {\n return traverse(object, property, function _setNestedProperty(currentObject, currentProperty, segments, index) {\n if (currentObject === Reflect.getPrototypeOf({})) {\n throw new ObjectPrototypeMutationError(\"Attempting to mutate Object.prototype\");\n }\n\n if (!currentObject[currentProperty]) {\n var nextPropIsNumber = Number.isInteger(Number(segments[index + 1]));\n var nextPropIsArrayWildcard = segments[index + 1] === ARRAY_WILDCARD;\n\n if (nextPropIsNumber || nextPropIsArrayWildcard) {\n currentObject[currentProperty] = [];\n } else {\n currentObject[currentProperty] = {};\n }\n }\n\n if (isLastSegment(segments, index)) {\n currentObject[currentProperty] = value;\n }\n\n return currentObject[currentProperty];\n });\n } catch (err) {\n if (err instanceof ObjectPrototypeMutationError) {\n // rethrow\n throw err;\n } else {\n return object;\n }\n }\n}\n/**\n * Tell if an object is on the path to a nested property\n * If the object is on the path, and the path exists, it returns true, and false otherwise.\n * @param {Object} object to get the nested property from\n * @param {String} property name of the nested property\n * @param {Object} objectInPath the object to check\n * @param {Object} options:\n * - validPath: return false if the path is invalid, even if the object is in the path\n * @returns {boolean} true if the object is on the path\n */\n\n\nfunction isInNestedProperty(object, property, objectInPath) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n if (_typeof(object) != \"object\" || object === null) {\n return false;\n }\n\n if (typeof property == \"undefined\") {\n return false;\n }\n\n try {\n var isIn = false,\n pathExists = false;\n traverse(object, property, function _isInNestedProperty(currentObject, currentProperty, segments, index) {\n isIn = isIn || currentObject === objectInPath || !!currentObject && currentObject[currentProperty] === objectInPath;\n pathExists = isLastSegment(segments, index) && _typeof(currentObject) === \"object\" && currentProperty in currentObject;\n return currentObject && currentObject[currentProperty];\n });\n\n if (options.validPath) {\n return isIn && pathExists;\n } else {\n return isIn;\n }\n } catch (err) {\n return false;\n }\n}\n\nfunction traverse(object, path) {\n var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};\n var segments = path.split(PATH_DELIMITER);\n var length = segments.length;\n\n var _loop = function _loop(idx) {\n var currentSegment = segments[idx];\n\n if (!object) {\n return {\n v: void 0\n };\n }\n\n if (currentSegment === ARRAY_WILDCARD) {\n if (Array.isArray(object)) {\n return {\n v: object.map(function (value, index) {\n var remainingSegments = segments.slice(idx + 1);\n\n if (remainingSegments.length > 0) {\n return traverse(value, remainingSegments.join(PATH_DELIMITER), callback);\n } else {\n return callback(object, index, segments, idx);\n }\n })\n };\n } else {\n var pathToHere = segments.slice(0, idx).join(PATH_DELIMITER);\n throw new Error(\"Object at wildcard (\".concat(pathToHere, \") is not an array\"));\n }\n } else {\n object = callback(object, currentSegment, segments, idx);\n }\n };\n\n for (var idx = 0; idx < length; idx++) {\n var _ret = _loop(idx);\n\n if (_typeof(_ret) === \"object\") return _ret.v;\n }\n\n return object;\n}\n\nfunction isLastSegment(segments, index) {\n return segments.length === index + 1;\n}\n","import path from \"path-posix\";\nimport { XMLParser } from \"fast-xml-parser\";\n// @ts-expect-error Types declare default export but runtime provides named export\nimport { EntityDecoder } from \"@nodable/entities\";\nimport nestedProp from \"nested-property\";\nimport { encodePath, normalisePath } from \"./path.js\";\nvar PropertyType;\n(function (PropertyType) {\n PropertyType[\"Array\"] = \"array\";\n PropertyType[\"Object\"] = \"object\";\n PropertyType[\"Original\"] = \"original\";\n})(PropertyType || (PropertyType = {}));\nfunction toJPathString(jPath) {\n if (typeof jPath === \"string\") {\n return jPath;\n }\n return jPath.toString(\".\", false);\n}\nfunction getParser({ attributeNamePrefix, attributeParsers, entityDecoder: entityDecoderOptions, tagParsers }) {\n const parserOptions = {\n allowBooleanAttributes: true,\n attributeNamePrefix,\n textNodeName: \"text\",\n ignoreAttributes: false,\n removeNSPrefix: true,\n jPath: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: false\n },\n attributeValueProcessor(_, attrValue, jPath) {\n const pathStr = toJPathString(jPath);\n for (const processor of attributeParsers) {\n try {\n const value = processor(pathStr, attrValue);\n if (value !== attrValue) {\n return value;\n }\n }\n catch (error) {\n // skipping this invalid processor\n }\n }\n return attrValue;\n },\n tagValueProcessor(tagName, tagValue, jPath) {\n const pathStr = toJPathString(jPath);\n for (const processor of tagParsers) {\n try {\n const value = processor(pathStr, tagValue);\n if (value !== tagValue) {\n return value;\n }\n }\n catch (error) {\n // skipping this invalid processor\n }\n }\n return tagValue;\n }\n };\n if (entityDecoderOptions) {\n parserOptions.entityDecoder = new EntityDecoder({\n limit: {\n maxTotalExpansions: entityDecoderOptions.limit?.maxTotalExpansions ?? 0,\n maxExpandedLength: entityDecoderOptions.limit?.maxExpandedLength ?? 0\n }\n });\n }\n return new XMLParser(parserOptions);\n}\n/**\n * Tag parser for the displayname prop.\n * Ensure that the displayname is not parsed and always handled as is.\n * @param path The jPath of the tag\n * @param value The text value of the tag\n */\nexport function displaynameTagParser(path, value) {\n if (path.endsWith(\"propstat.prop.displayname\")) {\n // Do not parse the displayname, because this causes e.g. '2024.10' to result in number 2024.1\n return;\n }\n return value;\n}\nfunction getPropertyOfType(obj, prop, type = PropertyType.Original) {\n const val = nestedProp.get(obj, prop);\n if (type === \"array\" && Array.isArray(val) === false) {\n return [val];\n }\n else if (type === \"object\" && Array.isArray(val)) {\n return val[0];\n }\n return val;\n}\nfunction normaliseResponse(response) {\n const output = Object.assign({}, response);\n // Only either status OR propstat is allowed\n if (output.status) {\n nestedProp.set(output, \"status\", getPropertyOfType(output, \"status\", PropertyType.Object));\n }\n else {\n nestedProp.set(output, \"propstat\", getPropertyOfType(output, \"propstat\", PropertyType.Object));\n nestedProp.set(output, \"propstat.prop\", getPropertyOfType(output, \"propstat.prop\", PropertyType.Object));\n }\n return output;\n}\nfunction normaliseResult(result) {\n const { multistatus } = result;\n if (multistatus === \"\") {\n return {\n multistatus: {\n response: []\n }\n };\n }\n if (!multistatus) {\n throw new Error(\"Invalid response: No root multistatus found\");\n }\n const output = {\n multistatus: Array.isArray(multistatus) ? multistatus[0] : multistatus\n };\n nestedProp.set(output, \"multistatus.response\", getPropertyOfType(output, \"multistatus.response\", PropertyType.Array));\n nestedProp.set(output, \"multistatus.response\", nestedProp.get(output, \"multistatus.response\").map(response => normaliseResponse(response)));\n return output;\n}\n/**\n * Parse an XML response from a WebDAV service,\n * converting it to an internal DAV result\n * @param xml The raw XML string\n * @param context The current client context\n * @returns A parsed and processed DAV result\n */\nexport function parseXML(xml, context) {\n // backwards compatibility as this method is exported from the package\n context = context ?? {\n attributeNamePrefix: \"@\",\n attributeParsers: [],\n tagParsers: [displaynameTagParser]\n };\n return new Promise(resolve => {\n const result = getParser(context).parse(xml);\n resolve(normaliseResult(result));\n });\n}\n/**\n * Get a file stat result from given DAV properties\n * @param props DAV properties\n * @param filename The filename for the file stat\n * @param isDetailed Whether or not the raw props of the resource should be returned\n * @returns A file stat result\n */\nexport function prepareFileFromProps(props, filename, isDetailed = false) {\n // Last modified time, raw size, item type and mime\n const { getlastmodified: lastMod = null, getcontentlength: rawSize = \"0\", resourcetype: resourceType = null, getcontenttype: mimeType = null, getetag: etag = null } = props;\n const type = resourceType &&\n typeof resourceType === \"object\" &&\n typeof resourceType.collection !== \"undefined\"\n ? \"directory\"\n : \"file\";\n const stat = {\n filename,\n basename: path.basename(filename),\n lastmod: lastMod,\n size: parseInt(rawSize, 10),\n type,\n etag: typeof etag === \"string\" ? etag.replace(/\"/g, \"\") : null\n };\n if (type === \"file\") {\n stat.mime = mimeType && typeof mimeType === \"string\" ? mimeType.split(\";\")[0] : \"\";\n }\n if (isDetailed) {\n // The XML parser tries to interpret values, but the display name is required to be a string\n if (typeof props.displayname !== \"undefined\") {\n props.displayname = String(props.displayname);\n }\n stat.props = props;\n }\n return stat;\n}\n/**\n * Parse a DAV result for file stats\n * @param result The resulting DAV response\n * @param filename The filename that was stat'd\n * @param isDetailed Whether or not the raw props of\n * the resource should be returned\n * @returns A file stat result\n */\nexport function parseStat(result, filename, isDetailed = false) {\n let responseItem = null;\n try {\n // should be a propstat response, if not the if below will throw an error\n if (result.multistatus.response[0].propstat) {\n responseItem = result.multistatus.response[0];\n }\n }\n catch (e) {\n /* ignore */\n }\n if (!responseItem) {\n throw new Error(\"Failed getting item stat: bad response\");\n }\n const { propstat: { prop: props, status: statusLine } } = responseItem;\n // As defined in https://tools.ietf.org/html/rfc2068#section-6.1\n const [_, statusCodeStr, statusText] = statusLine.split(\" \", 3);\n const statusCode = parseInt(statusCodeStr, 10);\n if (statusCode >= 400) {\n const err = new Error(`Invalid response: ${statusCode} ${statusText}`);\n err.status = statusCode;\n throw err;\n }\n const filePath = normalisePath(filename);\n return prepareFileFromProps(props, filePath, isDetailed);\n}\n/**\n * Parse a DAV result for a search request\n *\n * @param result The resulting DAV response\n * @param searchArbiter The collection path that was searched\n * @param isDetailed Whether or not the raw props of the resource should be returned\n */\nexport function parseSearch(result, searchArbiter, isDetailed) {\n const response = {\n truncated: false,\n results: []\n };\n response.truncated = result.multistatus.response.some(v => {\n return ((v.status || v.propstat?.status).split(\" \", 3)?.[1] === \"507\" &&\n v.href.replace(/\\/$/, \"\").endsWith(encodePath(searchArbiter).replace(/\\/$/, \"\")));\n });\n result.multistatus.response.forEach(result => {\n if (result.propstat === undefined) {\n return;\n }\n const filename = result.href.split(\"/\").map(decodeURIComponent).join(\"/\");\n response.results.push(prepareFileFromProps(result.propstat.prop, filename, isDetailed));\n });\n return response;\n}\n/**\n * Translate a disk quota indicator to a recognised\n * value (includes \"unlimited\" and \"unknown\")\n * @param value The quota indicator, eg. \"-3\"\n * @returns The value in bytes, or another indicator\n */\nexport function translateDiskSpace(value) {\n switch (String(value)) {\n case \"-3\":\n return \"unlimited\";\n case \"-2\":\n /* falls-through */\n case \"-1\":\n // -1 is non-computed\n return \"unknown\";\n default:\n return parseInt(String(value), 10);\n }\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { DAVResult, FileStat, ResponseDataDetailed } from 'webdav'\n\nimport { parseXML } from 'webdav'\nimport { processResponsePayload } from 'webdav/dist/node/response.js'\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js'\nimport client from './DavClient.ts'\n\nexport const DEFAULT_LIMIT = 20\n\n/**\n * Retrieve the comments list\n *\n * @param data destructuring object\n * @param data.resourceType the resource type\n * @param data.resourceId the resource ID\n * @param [options] optional options for axios\n * @param [options.offset] the pagination offset\n * @param [options.limit] the pagination limit, defaults to 20\n * @param [options.datetime] optional date to query\n * @return the comments list\n */\nexport async function getComments({ resourceType, resourceId }, options: { offset: number, limit?: number, datetime?: Date }) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\tconst datetime = options.datetime ? `${options.datetime.toISOString()}` : ''\n\tconst response = await client.customRequest(resourcePath, {\n\t\tmethod: 'REPORT',\n\t\tdata: `\n\t\t\t\n\t\t\t\t${options.limit ?? DEFAULT_LIMIT}\n\t\t\t\t${options.offset || 0}\n\t\t\t\t${datetime}\n\t\t\t`,\n\t\t...options,\n\t})\n\n\tconst responseData = await response.text()\n\tconst result = await parseXML(responseData)\n\tconst stat = getDirectoryFiles(result, true)\n\t// https://github.com/perry-mitchell/webdav-client/issues/339\n\treturn processResponsePayload(response, stat, true) as ResponseDataDetailed\n}\n\n/**\n * https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\n *\n * @param result - the DAV response result\n * @param isDetailed - whether to return detailed file information\n */\nfunction getDirectoryFiles(\n\tresult: DAVResult,\n\tisDetailed = false,\n): Array {\n\t// Extract the response items (directory contents)\n\tconst {\n\t\tmultistatus: { response: responseItems },\n\t} = result\n\n\t// Map all items to a consistent output structure (results)\n\treturn responseItems.map((item) => {\n\t\t// Each item should contain a stat object\n\t\tconst props = item.propstat!.prop!\n\n\t\treturn prepareFileFromProps(props, props.id!.toString(), isDetailed)\n\t})\n}\n"],"names":["getRootPath","generateRemoteUrl","client","getClient","balancedMatch","balanced","a","b","str","maybeMatch","r","range","reg","m","begs","beg","left","right","result","ai","bi","i","require$$0","braceExpansion","expandTop","escSlash","escOpen","escClose","escComma","escPeriod","numeric","escapeBraces","unescapeBraces","parseCommaParts","parts","pre","body","post","p","postParts","expand","embrace","isPadded","el","lte","y","gte","isTop","expansions","k","expansion","isNumericSequence","isAlphaSequence","isSequence","isOptions","n","N","x","width","incr","test","reverse","pad","c","need","z","j","MAX_PATTERN_LENGTH","assertValidPattern","pattern","posixClasses","braceEscape","s","regexpEscape","rangesToString","ranges","parseClass","glob","position","pos","negs","sawStart","uflag","escaping","negate","endPos","rangeStart","WHILE","cls","unip","u","neg","sranges","snegs","unescape","windowsPathsNoEscape","_a","types","isExtglobType","isExtglobAST","adoptionMap","adoptionWithSpaceMap","adoptionAnyMap","usurpMap","startNoTraversal","startNoDot","addPatternStart","justDots","reSpecials","regExpEscape","qmark","star","starNoEmpty","AST","#root","#hasMagic","#uflag","#parts","#parent","#parentIndex","#negs","#filledNegs","#options","#toString","#emptyExt","type","parent","options","#fillNegs","pp","part","ret","pl","#parseAST","ast","opt","extDepth","maxDepth","inBrace","braceStart","braceNeg","acc","ext","#canAdoptType","depthAdd","#canAdoptWithSpace","child","#canAdopt","map","gc","#adoptWithSpace","index","blank","#adopt","#canUsurpType","#canUsurp","#usurp","nt","#flatten","iterations","done","re","hasMagic","flags","allowDot","dot","noEmpty","src","_","#parseGlob","start","aps","needNoTrav","needNoDot","end","repeated","#partsToRegExp","me","bodyDotAllowed","final","close","_hasMagic","inStar","needUflag","consumed","magic","escape","minimatch","Minimatch","starDotExtRE","starDotExtTest","f","starDotExtTestDot","starDotExtTestNocase","starDotExtTestNocaseDot","starDotStarRE","starDotStarTest","starDotStarTestDot","dotStarRE","dotStarTest","starRE","starTest","starTestDot","qmarksRE","qmarksTestNocase","$0","noext","qmarksTestNoExt","qmarksTestNocaseDot","qmarksTestNoExtDot","qmarksTestDot","qmarksTest","len","defaultPlatform","process","define_process_env_default","path","sep","GLOBSTAR","twoStarDot","twoStarNoDot","filter","defaults","def","orig","list","braceExpand","makeRe","match","mm","globMagic","args","rawGlobParts","set","__","isUNC","isDrive","ss","globParts","optimizationLevel","gs","prev","didSomething","dd","gss","next","p2","other","splin","matched","emptyGSMatch","which","negateOffset","file","partial","fileStartIndex","patternStartIndex","fileDrive","fileUNC","patternDrive","patternUNC","fdi","pdi","fd","pd","#matchGlobstar","#matchOne","fileIndex","patternIndex","firstgs","lastgs","head","tail","fileHead","fileTailMatch","tailStart","sawSome","bodySegments","currentBody","nonGsParts","nonGsPartsSums","fileLength","#matchGlobStarBodySections","bodyIndex","globStarDepth","sawTail","bs","after","sub","fi","pi","fl","hit","fastTest","twoStar","open","ff","filename","convertResponseHeaders","headers","output","key","processResponsePayload","response","data","isDetailed","util","isString","normalizeArray","allowAboveRoot","res","splitPathRe","posix","posixSplitPath","resolvedPath","resolvedAbsolute","isAbsolute","trailingSlash","segment","from","to","trim","arr","fromParts","toParts","length","samePartsLength","outputParts","root","dir","pathObject","base","pathString","allParts","pathPosix","_typeof","obj","_classCallCheck","instance","Constructor","_possibleConstructorReturn","self","call","_assertThisInitialized","_inherits","subClass","superClass","_setPrototypeOf","_wrapNativeSuper","Class","_cache","_isNativeFunction","Wrapper","_construct","_getPrototypeOf","Parent","_isNativeReflectConstruct","fn","o","ARRAY_WILDCARD","PATH_DELIMITER","ObjectPrototypeMutationError","_Error","params","_this","nestedProperty","setNestedProperty","getNestedProperty","hasNestedProperty","object","property","isInNestedProperty","traverse","currentObject","currentProperty","has","segments","isLastSegment","value","nextPropIsNumber","nextPropIsArrayWildcard","err","objectInPath","isIn","pathExists","callback","_loop","idx","currentSegment","remainingSegments","pathToHere","_ret","PropertyType","prepareFileFromProps","props","lastMod","rawSize","resourceType","mimeType","etag","stat","DEFAULT_LIMIT","getComments","resourceId","resourcePath","datetime","responseData","parseXML","getDirectoryFiles","responseItems","item"],"mappings":"4MAUA,SAASA,IAAc,CACtB,OAAOC,GAAkB,cAAc,CACxC,CCJA,MAAMC,GA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AAc,EACpCvY,EAGJ,OAAOuY,EAAc,IAAKC,GAAS,CAElC,MAAMhB,EAAQgB,EAAK,SAAU,KAE7B,OAAOjB,GAAqBC,EAAOA,EAAM,GAAI,SAAA,EAAYzF,CAAU,CACpE,CAAC,CACF","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13,14]}
\ No newline at end of file
diff --git a/dist/comments-comments-app.mjs b/dist/comments-comments-app.mjs
index c62a727b5852e..3c5ac7b81718b 100644
--- a/dist/comments-comments-app.mjs
+++ b/dist/comments-comments-app.mjs
@@ -1,2 +1,2 @@
-import{l as o}from"./activity-B66lnZYB.chunk.mjs";import{a as m,t as s}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{c as r}from"./pinia-Bn5aG74F.chunk.mjs";import{e as n}from"./Web-ByHSuvRG.chunk.mjs";import{C as a}from"./FilesSidebarTab-B1Mys2Cd.chunk.mjs";import"./index-C6ey-Mhx.chunk.mjs";import"./public-C1mLBHT3.chunk.mjs";import"./index-DL1yHC1K-orb-zzee.chunk.mjs";import"./index-BRuD4Qrz.chunk.mjs";import"./NcModal-DUWLRm_F-C0gD58QY.chunk.mjs";import"./logger-D3RVzcfQ-B261d025.chunk.mjs";import"./createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs";import"./TrashCanOutline-CW4_EEhq.chunk.mjs";import"./mdi-Ci0zJ0QG.chunk.mjs";import"./NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs";import"./index-D-iKxf2E.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./ArrowRight-BgQTbtKu.chunk.mjs";import"./colors-BDeMBgfq-D1xNHBAd.chunk.mjs";import"./NcUserStatusIcon-DsviB2Cr-CJ45dJff.chunk.mjs";import"./PencilOutline-DJX4SP_q.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs";import"./NcEmptyContent-CGAPqk4S-q4HLj68a.chunk.mjs";import"./CommentView-D_nHPZF0.chunk.mjs";/* empty css */import"./NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs";import"./GetComments-PgOpAezt.chunk.mjs";import"./index-CI-5vlTq.chunk.mjs";import"./dav-sq7XGhQT.chunk.mjs";import"./externalStorageUtils-CpkXDsx2.chunk.mjs";class e{app;instance;constructor(t="files",i={}){const p=r();this.app=n(a,{...i.propsData??{},...i.props??{},resourceType:t}),this.app.mixin({data(){return{logger:o}},methods:{t:s,n:m}}),this.app.use(p),i.el&&(this.instance=this.app.mount(i.el))}$mount(t){this.instance&&this.app.unmount(),this.instance=this.app.mount(t)}$unmount(){this.app.unmount(),this.instance=void 0}update(t){this.instance&&this.instance.update(t)}}window.OCA&&!window.OCA.Comments&&Object.assign(window.OCA,{Comments:{}}),Object.assign(window.OCA.Comments,{View:e}),o.debug("OCA.Comments.View initialized");
+import{l as o}from"./activity-B66lnZYB.chunk.mjs";import{a as m,t as s}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{c as r}from"./pinia-Bn5aG74F.chunk.mjs";import{e as n}from"./Web-ByHSuvRG.chunk.mjs";import{C as a}from"./FilesSidebarTab-B6LBX0YH.chunk.mjs";import"./index-C6ey-Mhx.chunk.mjs";import"./public-C1mLBHT3.chunk.mjs";import"./index-DL1yHC1K-orb-zzee.chunk.mjs";import"./index-BRuD4Qrz.chunk.mjs";import"./NcModal-DUWLRm_F-C0gD58QY.chunk.mjs";import"./logger-D3RVzcfQ-B261d025.chunk.mjs";import"./createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs";import"./TrashCanOutline-CW4_EEhq.chunk.mjs";import"./mdi-Ci0zJ0QG.chunk.mjs";import"./NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs";import"./index-D-iKxf2E.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./ArrowRight-BgQTbtKu.chunk.mjs";import"./colors-BDeMBgfq-D1xNHBAd.chunk.mjs";import"./NcUserStatusIcon-DsviB2Cr-CJ45dJff.chunk.mjs";import"./PencilOutline-DJX4SP_q.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs";import"./NcEmptyContent-CGAPqk4S-q4HLj68a.chunk.mjs";import"./CommentView-D3UvwDWa.chunk.mjs";/* empty css */import"./NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs";import"./GetComments-DcBPvVJt.chunk.mjs";import"./index-CI-5vlTq.chunk.mjs";import"./dav-sq7XGhQT.chunk.mjs";import"./externalStorageUtils-CpkXDsx2.chunk.mjs";class e{app;instance;constructor(t="files",i={}){const p=r();this.app=n(a,{...i.propsData??{},...i.props??{},resourceType:t}),this.app.mixin({data(){return{logger:o}},methods:{t:s,n:m}}),this.app.use(p),i.el&&(this.instance=this.app.mount(i.el))}$mount(t){this.instance&&this.app.unmount(),this.instance=this.app.mount(t)}$unmount(){this.app.unmount(),this.instance=void 0}update(t){this.instance&&this.instance.update(t)}}window.OCA&&!window.OCA.Comments&&Object.assign(window.OCA,{Comments:{}}),Object.assign(window.OCA.Comments,{View:e}),o.debug("OCA.Comments.View initialized");
//# sourceMappingURL=comments-comments-app.mjs.map
diff --git a/dist/comments-comments-tab.mjs b/dist/comments-comments-tab.mjs
index dd683f345efd3..20fbfe423c9ae 100644
--- a/dist/comments-comments-tab.mjs
+++ b/dist/comments-comments-tab.mjs
@@ -1,3 +1,3 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/ActivityCommentAction-D_cVu02p.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DL1yHC1K-orb-zzee.chunk.mjs'),window.OC.filePath('', '', 'dist/Web-ByHSuvRG.chunk.mjs'),window.OC.filePath('', '', 'dist/public-C1mLBHT3.chunk.mjs'),window.OC.filePath('', '', 'dist/index-BRuD4Qrz.chunk.mjs'),window.OC.filePath('', '', 'dist/NcModal-DUWLRm_F-C0gD58QY.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-B261d025.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs'),window.OC.filePath('', '', 'dist/index-C6ey-Mhx.chunk.mjs'),window.OC.filePath('', '', 'dist/common-createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/common-logger-D3RVzcfQ-BE3lcFW4.chunk.css'),window.OC.filePath('', '', 'dist/common-NcModal-DUWLRm_F-BsKc2RT9.chunk.css'),window.OC.filePath('', '', 'dist/TrashCanOutline-CW4_EEhq.chunk.mjs'),window.OC.filePath('', '', 'dist/common-TrashCanOutline-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/common-index-DYA_tnKg.chunk.css'),window.OC.filePath('', '', 'dist/mdi-Ci0zJ0QG.chunk.mjs'),window.OC.filePath('', '', 'dist/common-mdi-BWNFKLbC.chunk.css'),window.OC.filePath('', '', 'dist/CommentView-D_nHPZF0.chunk.mjs'),window.OC.filePath('', '', 'dist/pinia-Bn5aG74F.chunk.mjs'),window.OC.filePath('', '', 'dist/PencilOutline-DJX4SP_q.chunk.mjs'),window.OC.filePath('', '', 'dist/common-PencilOutline-B3DMd8SU.chunk.css'),window.OC.filePath('', '', 'dist/NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs'),window.OC.filePath('', '', 'dist/index-D-iKxf2E.chunk.mjs'),window.OC.filePath('', '', 'dist/util-djQ-4xJ5.chunk.mjs'),window.OC.filePath('', '', 'dist/ArrowRight-BgQTbtKu.chunk.mjs'),window.OC.filePath('', '', 'dist/common-ArrowRight-vZpQWIqF.chunk.css'),window.OC.filePath('', '', 'dist/colors-BDeMBgfq-D1xNHBAd.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-DsviB2Cr-CJ45dJff.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcUserStatusIcon-DsviB2Cr-Bq_6hmXG.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcDateTime-b9UhLDij.chunk.css'),window.OC.filePath('', '', 'dist/common-NcAvatar-M3-CbKbq-DTVmI7NO.chunk.css'),window.OC.filePath('', '', 'dist/NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcUserBubble-CDQa0hGy-f2DD9EAL.chunk.css'),window.OC.filePath('', '', 'dist/activity-B66lnZYB.chunk.mjs'),window.OC.filePath('', '', 'dist/GetComments-PgOpAezt.chunk.mjs'),window.OC.filePath('', '', 'dist/index-CI-5vlTq.chunk.mjs'),window.OC.filePath('', '', 'dist/dav-sq7XGhQT.chunk.mjs'),window.OC.filePath('', '', 'dist/externalStorageUtils-CpkXDsx2.chunk.mjs'),window.OC.filePath('', '', 'dist/common-CommentView-f1JWd1O0.chunk.css'),window.OC.filePath('', '', 'dist/common-NcActionSeparator-Ct2RnclR-pXJ_-D_I.chunk.css'),window.OC.filePath('', '', 'dist/comments-ActivityCommentAction-BNcHFi_U.chunk.css'),window.OC.filePath('', '', 'dist/ActivityCommentEntry-DpJ3zirU.chunk.mjs'),window.OC.filePath('', '', 'dist/comments-ActivityCommentEntry-DkLG8AtJ.chunk.css'),window.OC.filePath('', '', 'dist/FilesSidebarTab-B1Mys2Cd.chunk.mjs'),window.OC.filePath('', '', 'dist/NcEmptyContent-CGAPqk4S-q4HLj68a.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcEmptyContent-CGAPqk4S-Don1d5Bd.chunk.css'),window.OC.filePath('', '', 'dist/common-FilesSidebarTab-Dk-ISsTg.chunk.css')])))=>i.map(i=>d[i]);
-import{_ as m,e as c,d as w}from"./Web-ByHSuvRG.chunk.mjs";import{r as _}from"./index-Cza7fYcZ.chunk.mjs";import{t as g}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{c as l}from"./pinia-Bn5aG74F.chunk.mjs";import{l as r,i as A}from"./activity-B66lnZYB.chunk.mjs";import{g as v}from"./GetComments-PgOpAezt.chunk.mjs";import"./public-C1mLBHT3.chunk.mjs";import"./externalStorageUtils-CpkXDsx2.chunk.mjs";import"./index-C6ey-Mhx.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./index-CI-5vlTq.chunk.mjs";import"./dav-sq7XGhQT.chunk.mjs";const y='';function V(){let o;window.OCA.Activity.registerSidebarAction({mount:async(t,{node:e,reload:i})=>{const a=l();if(!o){const{default:s}=await m(async()=>{const{default:n}=await import("./ActivityCommentAction-D_cVu02p.chunk.mjs");return{default:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42]),import.meta.url);o=c(s,{reloadCallback:i,resourceId:e.fileid})}o.use(a),o.mount(t),r.info("Comments plugin mounted in Activity sidebar action",{node:e})},unmount:()=>{o?.unmount()}}),window.OCA.Activity.registerSidebarEntries(async({node:t,limit:e,offset:i})=>{const{data:a}=await v({resourceType:"files",resourceId:t.fileid},{limit:e,offset:i??0});r.debug("Loaded comments",{node:t,comments:a});const{default:s}=await m(async()=>{const{default:n}=await import("./ActivityCommentEntry-DpJ3zirU.chunk.mjs");return{default:n}},__vite__mapDeps([43,8,9,18,2,3,19,20,6,7,10,11,5,12,21,22,23,24,25,26,27,28,29,30,31,13,14,32,33,34,1,4,15,16,17,35,36,37,38,39,40,41,44]),import.meta.url);return a.map(n=>({_CommentsViewInstance:void 0,timestamp:Date.parse(n.props?.creationDateTime??""),mount(p,{reload:f}){const d=c(s,{comment:n,resourceId:t.fileid,reloadCallback:f});d.mount(p),this._CommentsViewInstance=d},unmount(){this._CommentsViewInstance?.unmount()}}))}),window.OCA.Activity.registerSidebarFilter(t=>t.type!=="comments"),r.info("Comments plugin registered for Activity sidebar action")}const u="comments_files-sidebar-tab";A()?window.addEventListener("DOMContentLoaded",function(){V()}):_({id:"comments",displayName:g("comments","Comments"),iconSvgInline:y,order:50,tagName:u,async onInit(){const{default:o}=await m(async()=>{const{default:e}=await import("./FilesSidebarTab-B1Mys2Cd.chunk.mjs").then(i=>i.F);return{default:e}},__vite__mapDeps([45,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,22,23,24,25,26,27,28,29,20,21,30,31,32,46,47,18,19,33,34,35,36,37,38,39,40,41,48]),import.meta.url),t=w(o,{configureApp(e){const i=l();e.use(i)},shadowRoot:!1});window.customElements.define(u,t)}});
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('', '', 'dist/ActivityCommentAction-BZ7sj6jb.chunk.mjs'),window.OC.filePath('', '', 'dist/index-DL1yHC1K-orb-zzee.chunk.mjs'),window.OC.filePath('', '', 'dist/Web-ByHSuvRG.chunk.mjs'),window.OC.filePath('', '', 'dist/public-C1mLBHT3.chunk.mjs'),window.OC.filePath('', '', 'dist/index-BRuD4Qrz.chunk.mjs'),window.OC.filePath('', '', 'dist/NcModal-DUWLRm_F-C0gD58QY.chunk.mjs'),window.OC.filePath('', '', 'dist/logger-D3RVzcfQ-B261d025.chunk.mjs'),window.OC.filePath('', '', 'dist/createElementId-DhjFt1I9-CZ2eH1SD.chunk.mjs'),window.OC.filePath('', '', 'dist/translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs'),window.OC.filePath('', '', 'dist/index-C6ey-Mhx.chunk.mjs'),window.OC.filePath('', '', 'dist/common-createElementId-DhjFt1I9-C_oBIsvc.chunk.css'),window.OC.filePath('', '', 'dist/common-logger-D3RVzcfQ-BE3lcFW4.chunk.css'),window.OC.filePath('', '', 'dist/common-NcModal-DUWLRm_F-BsKc2RT9.chunk.css'),window.OC.filePath('', '', 'dist/TrashCanOutline-CW4_EEhq.chunk.mjs'),window.OC.filePath('', '', 'dist/common-TrashCanOutline-BYHcrfvW.chunk.css'),window.OC.filePath('', '', 'dist/common-index-DYA_tnKg.chunk.css'),window.OC.filePath('', '', 'dist/mdi-Ci0zJ0QG.chunk.mjs'),window.OC.filePath('', '', 'dist/common-mdi-BWNFKLbC.chunk.css'),window.OC.filePath('', '', 'dist/CommentView-D3UvwDWa.chunk.mjs'),window.OC.filePath('', '', 'dist/pinia-Bn5aG74F.chunk.mjs'),window.OC.filePath('', '', 'dist/PencilOutline-DJX4SP_q.chunk.mjs'),window.OC.filePath('', '', 'dist/common-PencilOutline-B3DMd8SU.chunk.css'),window.OC.filePath('', '', 'dist/NcAvatar-M3-CbKbq-DbNpmr-b.chunk.mjs'),window.OC.filePath('', '', 'dist/index-D-iKxf2E.chunk.mjs'),window.OC.filePath('', '', 'dist/util-djQ-4xJ5.chunk.mjs'),window.OC.filePath('', '', 'dist/ArrowRight-BgQTbtKu.chunk.mjs'),window.OC.filePath('', '', 'dist/common-ArrowRight-vZpQWIqF.chunk.css'),window.OC.filePath('', '', 'dist/colors-BDeMBgfq-D1xNHBAd.chunk.mjs'),window.OC.filePath('', '', 'dist/NcUserStatusIcon-DsviB2Cr-CJ45dJff.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcUserStatusIcon-DsviB2Cr-Bq_6hmXG.chunk.css'),window.OC.filePath('', '', 'dist/NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-BRczm9CK.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcDateTime-b9UhLDij.chunk.css'),window.OC.filePath('', '', 'dist/common-NcAvatar-M3-CbKbq-DTVmI7NO.chunk.css'),window.OC.filePath('', '', 'dist/NcUserBubble-CDQa0hGy-DMYvkftD.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcUserBubble-CDQa0hGy-f2DD9EAL.chunk.css'),window.OC.filePath('', '', 'dist/activity-B66lnZYB.chunk.mjs'),window.OC.filePath('', '', 'dist/GetComments-DcBPvVJt.chunk.mjs'),window.OC.filePath('', '', 'dist/index-CI-5vlTq.chunk.mjs'),window.OC.filePath('', '', 'dist/dav-sq7XGhQT.chunk.mjs'),window.OC.filePath('', '', 'dist/externalStorageUtils-CpkXDsx2.chunk.mjs'),window.OC.filePath('', '', 'dist/common-CommentView-f1JWd1O0.chunk.css'),window.OC.filePath('', '', 'dist/common-NcActionSeparator-Ct2RnclR-pXJ_-D_I.chunk.css'),window.OC.filePath('', '', 'dist/comments-ActivityCommentAction-BNcHFi_U.chunk.css'),window.OC.filePath('', '', 'dist/ActivityCommentEntry-Cqdbzlu4.chunk.mjs'),window.OC.filePath('', '', 'dist/comments-ActivityCommentEntry-DkLG8AtJ.chunk.css'),window.OC.filePath('', '', 'dist/FilesSidebarTab-B6LBX0YH.chunk.mjs'),window.OC.filePath('', '', 'dist/NcEmptyContent-CGAPqk4S-q4HLj68a.chunk.mjs'),window.OC.filePath('', '', 'dist/common-NcEmptyContent-CGAPqk4S-Don1d5Bd.chunk.css'),window.OC.filePath('', '', 'dist/common-FilesSidebarTab-Dk-ISsTg.chunk.css')])))=>i.map(i=>d[i]);
+import{_ as m,e as c,d as w}from"./Web-ByHSuvRG.chunk.mjs";import{r as _}from"./index-Cza7fYcZ.chunk.mjs";import{t as g}from"./translation-DoG5ZELJ-C5oC8Tcn.chunk.mjs";import{c as l}from"./pinia-Bn5aG74F.chunk.mjs";import{l as r,i as A}from"./activity-B66lnZYB.chunk.mjs";import{g as v}from"./GetComments-DcBPvVJt.chunk.mjs";import"./public-C1mLBHT3.chunk.mjs";import"./externalStorageUtils-CpkXDsx2.chunk.mjs";import"./index-C6ey-Mhx.chunk.mjs";import"./util-djQ-4xJ5.chunk.mjs";import"./index-CI-5vlTq.chunk.mjs";import"./dav-sq7XGhQT.chunk.mjs";const y='';function V(){let o;window.OCA.Activity.registerSidebarAction({mount:async(t,{node:e,reload:i})=>{const a=l();if(!o){const{default:s}=await m(async()=>{const{default:n}=await import("./ActivityCommentAction-BZ7sj6jb.chunk.mjs");return{default:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42]),import.meta.url);o=c(s,{reloadCallback:i,resourceId:e.fileid})}o.use(a),o.mount(t),r.info("Comments plugin mounted in Activity sidebar action",{node:e})},unmount:()=>{o?.unmount()}}),window.OCA.Activity.registerSidebarEntries(async({node:t,limit:e,offset:i})=>{const{data:a}=await v({resourceType:"files",resourceId:t.fileid},{limit:e,offset:i??0});r.debug("Loaded comments",{node:t,comments:a});const{default:s}=await m(async()=>{const{default:n}=await import("./ActivityCommentEntry-Cqdbzlu4.chunk.mjs");return{default:n}},__vite__mapDeps([43,8,9,18,2,3,19,20,6,7,10,11,5,12,21,22,23,24,25,26,27,28,29,30,31,13,14,32,33,34,1,4,15,16,17,35,36,37,38,39,40,41,44]),import.meta.url);return a.map(n=>({_CommentsViewInstance:void 0,timestamp:Date.parse(n.props?.creationDateTime??""),mount(p,{reload:f}){const d=c(s,{comment:n,resourceId:t.fileid,reloadCallback:f});d.mount(p),this._CommentsViewInstance=d},unmount(){this._CommentsViewInstance?.unmount()}}))}),window.OCA.Activity.registerSidebarFilter(t=>t.type!=="comments"),r.info("Comments plugin registered for Activity sidebar action")}const u="comments_files-sidebar-tab";A()?window.addEventListener("DOMContentLoaded",function(){V()}):_({id:"comments",displayName:g("comments","Comments"),iconSvgInline:y,order:50,tagName:u,async onInit(){const{default:o}=await m(async()=>{const{default:e}=await import("./FilesSidebarTab-B6LBX0YH.chunk.mjs").then(i=>i.F);return{default:e}},__vite__mapDeps([45,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,22,23,24,25,26,27,28,29,20,21,30,31,32,46,47,18,19,33,34,35,36,37,38,39,40,41,48]),import.meta.url),t=w(o,{configureApp(e){const i=l();e.use(i)},shadowRoot:!1});window.customElements.define(u,t)}});
//# sourceMappingURL=comments-comments-tab.mjs.map
diff --git a/dist/dav-settings-personal-availability.mjs.license b/dist/dav-settings-personal-availability.mjs.license
index 48f6eb497ee62..0d17548b4abfe 100644
--- a/dist/dav-settings-personal-availability.mjs.license
+++ b/dist/dav-settings-personal-availability.mjs.license
@@ -22,5 +22,5 @@ This file is generated from multiple sources. Included packages:
- version: 1.0.0
- license: AGPL-3.0-or-later
- uuid
- - version: 12.0.0
+ - version: 12.0.1
- license: MIT
diff --git a/dist/dav-settings-personal-availability.mjs.map b/dist/dav-settings-personal-availability.mjs.map
index 1698c8120390a..51d15222e13d4 100644
--- a/dist/dav-settings-personal-availability.mjs.map
+++ b/dist/dav-settings-personal-availability.mjs.map
@@ -1 +1 @@
-{"version":3,"file":"dav-settings-personal-availability.mjs","sources":["../build/frontend/apps/dav/src/utils/date.ts","../build/frontend/apps/dav/src/components/AbsenceForm.vue","../node_modules/icalzone/dist/zones.js","../node_modules/icalzone/dist/index.js","../node_modules/ical.js/dist/ical.js","../node_modules/@nextcloud/calendar-availability-vue/node_modules/uuid/dist-browser/stringify.js","../node_modules/@nextcloud/calendar-availability-vue/node_modules/uuid/dist-browser/rng.js","../node_modules/@nextcloud/calendar-availability-vue/node_modules/uuid/dist-browser/native.js","../node_modules/@nextcloud/calendar-availability-vue/node_modules/uuid/dist-browser/v4.js","../node_modules/@nextcloud/calendar-availability-vue/dist/index.mjs","../build/frontend/apps/dav/src/dav/client.ts","../build/frontend/apps/dav/src/service/CalendarService.ts","../build/frontend/apps/dav/src/service/PreferenceService.ts","../build/frontend/apps/dav/src/components/AvailabilityForm.vue","../build/frontend/apps/dav/src/views/UserAvailability.vue","../build/frontend/apps/dav/src/settings-personal-availability.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * Format a date as 'YYYY-MM-DD'.\n *\n * @param date - A date instance to format.\n */\nexport function formatDateAsYMD(date: Date): `${number}-${number}-${number}` {\n\tconst year = date.getFullYear()\n\tconst month = (date.getMonth() + 1).toString().padStart(2, '0') as `${number}`\n\tconst day = date.getDate().toString().padStart(2, '0') as `${number}`\n\treturn `${year}-${month}-${day}`\n}\n","\n\n\n\t\n\n\n\n\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.zonesMap = exports.defaultStart = void 0;\nexports.defaultStart = \"19700101T000000\";\nexports.zonesMap = new Map([\n [\n \"Africa/Abidjan\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Accra\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Addis_Ababa\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Africa/Algiers\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"CET\"\n }\n }\n ],\n [\n \"Africa/Asmara\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Africa/Bamako\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Bangui\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Banjul\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Bissau\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Blantyre\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"Africa/Brazzaville\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Bujumbura\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"Africa/Cairo\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"EET\"\n }\n }\n ],\n [\n \"Africa/Casablanca\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"+01\"\n }\n }\n ],\n [\n \"Africa/Ceuta\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Africa/Conakry\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Dakar\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Dar_es_Salaam\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Africa/Djibouti\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Africa/Douala\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/El_Aaiun\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"+01\"\n }\n }\n ],\n [\n \"Africa/Freetown\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Gaborone\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"Africa/Harare\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"Africa/Johannesburg\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"SAST\"\n }\n }\n ],\n [\n \"Africa/Juba\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Africa/Kampala\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Africa/Khartoum\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"Africa/Kigali\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"Africa/Kinshasa\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Lagos\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Libreville\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Lome\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Luanda\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Lubumbashi\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"Africa/Lusaka\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"Africa/Malabo\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Maputo\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"Africa/Maseru\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"SAST\"\n }\n }\n ],\n [\n \"Africa/Mbabane\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"SAST\"\n }\n }\n ],\n [\n \"Africa/Mogadishu\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Africa/Monrovia\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Nairobi\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Africa/Ndjamena\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Niamey\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Nouakchott\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Ouagadougou\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Africa/Porto-Novo\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Sao_Tome\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"WAT\"\n }\n }\n ],\n [\n \"Africa/Tripoli\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"EET\"\n }\n }\n ],\n [\n \"Africa/Tunis\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"CET\"\n }\n }\n ],\n [\n \"Africa/Windhoek\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"CAT\"\n }\n }\n ],\n [\n \"America/Adak\",\n {\n \"s\": {\n \"f\": \"-0900\",\n \"t\": \"-1000\",\n \"n\": \"HST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-1000\",\n \"t\": \"-0900\",\n \"n\": \"HDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Anchorage\",\n {\n \"s\": {\n \"f\": \"-0800\",\n \"t\": \"-0900\",\n \"n\": \"AKST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0900\",\n \"t\": \"-0800\",\n \"n\": \"AKDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Anguilla\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Antigua\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Araguaina\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/Buenos_Aires\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/Catamarca\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/Cordoba\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/Jujuy\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/La_Rioja\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/Mendoza\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/Rio_Gallegos\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/Salta\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/San_Juan\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/San_Luis\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/Tucuman\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Argentina/Ushuaia\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Aruba\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Asuncion\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"t\": \"-0400\",\n \"n\": \"-04\",\n \"s\": \"19700322T000000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"4SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"-03\",\n \"s\": \"19701004T000000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Atikokan\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"EST\"\n }\n }\n ],\n [\n \"America/Bahia_Banderas\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700405T020000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Bahia\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Barbados\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Belem\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Belize\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"America/Blanc-Sablon\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Boa_Vista\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"-04\"\n }\n }\n ],\n [\n \"America/Bogota\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"-05\"\n }\n }\n ],\n [\n \"America/Boise\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"t\": \"-0700\",\n \"n\": \"MST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0700\",\n \"t\": \"-0600\",\n \"n\": \"MDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Cambridge_Bay\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"t\": \"-0700\",\n \"n\": \"MST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0700\",\n \"t\": \"-0600\",\n \"n\": \"MDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Campo_Grande\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"-04\",\n \"s\": \"19700215T000000\",\n \"r\": {\n \"m\": 2,\n \"d\": \"3SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"-03\",\n \"s\": \"19701101T000000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Cancun\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"EST\"\n }\n }\n ],\n [\n \"America/Caracas\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"-04\"\n }\n }\n ],\n [\n \"America/Cayenne\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Cayman\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"EST\"\n }\n }\n ],\n [\n \"America/Chicago\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Chihuahua\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"t\": \"-0700\",\n \"n\": \"MST\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0700\",\n \"t\": \"-0600\",\n \"n\": \"MDT\",\n \"s\": \"19700405T020000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Costa_Rica\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"America/Creston\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"n\": \"MST\"\n }\n }\n ],\n [\n \"America/Cuiaba\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"-04\",\n \"s\": \"19700215T000000\",\n \"r\": {\n \"m\": 2,\n \"d\": \"3SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"-03\",\n \"s\": \"19701101T000000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Curacao\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Danmarkshavn\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"America/Dawson_Creek\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"n\": \"MST\"\n }\n }\n ],\n [\n \"America/Dawson\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"t\": \"-0800\",\n \"n\": \"PST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0800\",\n \"t\": \"-0700\",\n \"n\": \"PDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Denver\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"t\": \"-0700\",\n \"n\": \"MST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0700\",\n \"t\": \"-0600\",\n \"n\": \"MDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Detroit\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Dominica\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Edmonton\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"t\": \"-0700\",\n \"n\": \"MST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0700\",\n \"t\": \"-0600\",\n \"n\": \"MDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Eirunepe\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"-05\"\n }\n }\n ],\n [\n \"America/El_Salvador\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"America/Fort_Nelson\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"n\": \"MST\"\n }\n }\n ],\n [\n \"America/Fortaleza\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Glace_Bay\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"t\": \"-0400\",\n \"n\": \"AST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"ADT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Godthab\",\n {\n \"s\": {\n \"f\": \"-0200\",\n \"t\": \"-0300\",\n \"n\": \"-03\",\n \"s\": \"19701024T230000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SA\"\n }\n },\n \"d\": {\n \"f\": \"-0300\",\n \"t\": \"-0200\",\n \"n\": \"-02\",\n \"s\": \"19700328T220000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SA\"\n }\n }\n }\n ],\n [\n \"America/Goose_Bay\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"t\": \"-0400\",\n \"n\": \"AST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"ADT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Grand_Turk\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Grenada\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Guadeloupe\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Guatemala\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"America/Guayaquil\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"-05\"\n }\n }\n ],\n [\n \"America/Guyana\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"-04\"\n }\n }\n ],\n [\n \"America/Halifax\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"t\": \"-0400\",\n \"n\": \"AST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"ADT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Havana\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"CST\",\n \"s\": \"19701101T010000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"CDT\",\n \"s\": \"19700308T000000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Hermosillo\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"n\": \"MST\"\n }\n }\n ],\n [\n \"America/Indiana/Indianapolis\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Indiana/Knox\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Indiana/Marengo\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Indiana/Petersburg\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Indiana/Tell_City\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Indiana/Vevay\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Indiana/Vincennes\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Indiana/Winamac\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Inuvik\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"t\": \"-0700\",\n \"n\": \"MST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0700\",\n \"t\": \"-0600\",\n \"n\": \"MDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Iqaluit\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Jamaica\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"EST\"\n }\n }\n ],\n [\n \"America/Juneau\",\n {\n \"s\": {\n \"f\": \"-0800\",\n \"t\": \"-0900\",\n \"n\": \"AKST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0900\",\n \"t\": \"-0800\",\n \"n\": \"AKDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Kentucky/Louisville\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Kentucky/Monticello\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Kralendijk\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/La_Paz\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"-04\"\n }\n }\n ],\n [\n \"America/Lima\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"-05\"\n }\n }\n ],\n [\n \"America/Los_Angeles\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"t\": \"-0800\",\n \"n\": \"PST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0800\",\n \"t\": \"-0700\",\n \"n\": \"PDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Lower_Princes\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Maceio\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Managua\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"America/Manaus\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"-04\"\n }\n }\n ],\n [\n \"America/Marigot\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Martinique\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Matamoros\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Mazatlan\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"t\": \"-0700\",\n \"n\": \"MST\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0700\",\n \"t\": \"-0600\",\n \"n\": \"MDT\",\n \"s\": \"19700405T020000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Menominee\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Merida\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700405T020000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Metlakatla\",\n {\n \"s\": {\n \"f\": \"-0800\",\n \"t\": \"-0900\",\n \"n\": \"AKST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0900\",\n \"t\": \"-0800\",\n \"n\": \"AKDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Mexico_City\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700405T020000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Miquelon\",\n {\n \"s\": {\n \"f\": \"-0200\",\n \"t\": \"-0300\",\n \"n\": \"-03\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0300\",\n \"t\": \"-0200\",\n \"n\": \"-02\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Moncton\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"t\": \"-0400\",\n \"n\": \"AST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"ADT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Monterrey\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700405T020000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Montevideo\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Montserrat\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Nassau\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/New_York\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Nipigon\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Nome\",\n {\n \"s\": {\n \"f\": \"-0800\",\n \"t\": \"-0900\",\n \"n\": \"AKST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0900\",\n \"t\": \"-0800\",\n \"n\": \"AKDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Noronha\",\n {\n \"s\": {\n \"f\": \"-0200\",\n \"n\": \"-02\"\n }\n }\n ],\n [\n \"America/North_Dakota/Beulah\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/North_Dakota/Center\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/North_Dakota/New_Salem\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Ojinaga\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"t\": \"-0700\",\n \"n\": \"MST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0700\",\n \"t\": \"-0600\",\n \"n\": \"MDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Panama\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"EST\"\n }\n }\n ],\n [\n \"America/Pangnirtung\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Paramaribo\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Phoenix\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"n\": \"MST\"\n }\n }\n ],\n [\n \"America/Port_of_Spain\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Port-au-Prince\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Porto_Velho\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"-04\"\n }\n }\n ],\n [\n \"America/Puerto_Rico\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Punta_Arenas\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Rainy_River\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Rankin_Inlet\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Recife\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Regina\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"America/Resolute\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Rio_Branco\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"-05\"\n }\n }\n ],\n [\n \"America/Santarem\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"America/Santiago\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"t\": \"-0400\",\n \"n\": \"-04\",\n \"s\": \"19700405T000000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"-03\",\n \"s\": \"19700906T000000\",\n \"r\": {\n \"m\": 9,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Santo_Domingo\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Sao_Paulo\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\",\n \"s\": \"19700215T000000\",\n \"r\": {\n \"m\": 2,\n \"d\": \"3SU\"\n }\n },\n \"d\": {\n \"f\": \"-0300\",\n \"t\": \"-0200\",\n \"n\": \"-02\",\n \"s\": \"19701101T000000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"America/Scoresbysund\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"t\": \"-0100\",\n \"n\": \"-01\",\n \"s\": \"19701025T010000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0100\",\n \"t\": \"+0000\",\n \"n\": \"+00\",\n \"s\": \"19700329T000000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"America/Sitka\",\n {\n \"s\": {\n \"f\": \"-0800\",\n \"t\": \"-0900\",\n \"n\": \"AKST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0900\",\n \"t\": \"-0800\",\n \"n\": \"AKDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/St_Barthelemy\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/St_Johns\",\n {\n \"s\": {\n \"f\": \"-0230\",\n \"t\": \"-0330\",\n \"n\": \"NST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0330\",\n \"t\": \"-0230\",\n \"n\": \"NDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/St_Kitts\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/St_Lucia\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/St_Thomas\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/St_Vincent\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Swift_Current\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"America/Tegucigalpa\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"America/Thule\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"t\": \"-0400\",\n \"n\": \"AST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"ADT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Thunder_Bay\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Tijuana\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"t\": \"-0800\",\n \"n\": \"PST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0800\",\n \"t\": \"-0700\",\n \"n\": \"PDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Toronto\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"t\": \"-0500\",\n \"n\": \"EST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0500\",\n \"t\": \"-0400\",\n \"n\": \"EDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Tortola\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"AST\"\n }\n }\n ],\n [\n \"America/Vancouver\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"t\": \"-0800\",\n \"n\": \"PST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0800\",\n \"t\": \"-0700\",\n \"n\": \"PDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Whitehorse\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"t\": \"-0800\",\n \"n\": \"PST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0800\",\n \"t\": \"-0700\",\n \"n\": \"PDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Winnipeg\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"CST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"CDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Yakutat\",\n {\n \"s\": {\n \"f\": \"-0800\",\n \"t\": \"-0900\",\n \"n\": \"AKST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0900\",\n \"t\": \"-0800\",\n \"n\": \"AKDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"America/Yellowknife\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"t\": \"-0700\",\n \"n\": \"MST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0700\",\n \"t\": \"-0600\",\n \"n\": \"MDT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"Antarctica/Casey\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"+08\"\n }\n }\n ],\n [\n \"Antarctica/Davis\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Antarctica/DumontDUrville\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"+10\"\n }\n }\n ],\n [\n \"Antarctica/Macquarie\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Antarctica/Mawson\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Antarctica/McMurdo\",\n {\n \"s\": {\n \"f\": \"+1300\",\n \"t\": \"+1200\",\n \"n\": \"NZST\",\n \"s\": \"19700405T030000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+1200\",\n \"t\": \"+1300\",\n \"n\": \"NZDT\",\n \"s\": \"19700927T020000\",\n \"r\": {\n \"m\": 9,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Antarctica/Palmer\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"Antarctica/Rothera\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"Antarctica/Syowa\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Antarctica/Troll\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0000\",\n \"n\": \"+00\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0200\",\n \"n\": \"+02\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Antarctica/Vostok\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Arctic/Longyearbyen\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Asia/Aden\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Asia/Almaty\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Asia/Amman\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701030T010000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1FR\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700326T235959\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1TH\"\n }\n }\n }\n ],\n [\n \"Asia/Anadyr\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ],\n [\n \"Asia/Aqtau\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Asia/Aqtobe\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Asia/Ashgabat\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Asia/Atyrau\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Asia/Baghdad\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Asia/Bahrain\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Asia/Baku\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Asia/Bangkok\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Barnaul\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Beirut\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T000000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T000000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Asia/Bishkek\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Asia/Brunei\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"+08\"\n }\n }\n ],\n [\n \"Asia/Chita\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"+09\"\n }\n }\n ],\n [\n \"Asia/Choibalsan\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"+08\"\n }\n }\n ],\n [\n \"Asia/Colombo\",\n {\n \"s\": {\n \"f\": \"+0530\",\n \"n\": \"+0530\"\n }\n }\n ],\n [\n \"Asia/Damascus\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701030T000000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1FR\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700327T000000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1FR\"\n }\n }\n }\n ],\n [\n \"Asia/Dhaka\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Asia/Dili\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"+09\"\n }\n }\n ],\n [\n \"Asia/Dubai\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Asia/Dushanbe\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Asia/Famagusta\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Asia/Gaza\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701031T010000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SA\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700328T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"4SA\"\n }\n }\n }\n ],\n [\n \"Asia/Hebron\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701031T010000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SA\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700328T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"4SA\"\n }\n }\n }\n ],\n [\n \"Asia/Ho_Chi_Minh\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Hong_Kong\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"HKT\"\n }\n }\n ],\n [\n \"Asia/Hovd\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Irkutsk\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"+08\"\n }\n }\n ],\n [\n \"Asia/Istanbul\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Asia/Jakarta\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"WIB\"\n }\n }\n ],\n [\n \"Asia/Jayapura\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"WIT\"\n }\n }\n ],\n [\n \"Asia/Jerusalem\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"IST\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"IDT\",\n \"s\": \"19700327T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1FR\"\n }\n }\n }\n ],\n [\n \"Asia/Kabul\",\n {\n \"s\": {\n \"f\": \"+0430\",\n \"n\": \"+0430\"\n }\n }\n ],\n [\n \"Asia/Kamchatka\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ],\n [\n \"Asia/Karachi\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"PKT\"\n }\n }\n ],\n [\n \"Asia/Kathmandu\",\n {\n \"s\": {\n \"f\": \"+0545\",\n \"n\": \"+0545\"\n }\n }\n ],\n [\n \"Asia/Khandyga\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"+09\"\n }\n }\n ],\n [\n \"Asia/Kolkata\",\n {\n \"s\": {\n \"f\": \"+0530\",\n \"n\": \"IST\"\n }\n }\n ],\n [\n \"Asia/Krasnoyarsk\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Kuala_Lumpur\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"+08\"\n }\n }\n ],\n [\n \"Asia/Kuching\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"+08\"\n }\n }\n ],\n [\n \"Asia/Kuwait\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Asia/Macau\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"Asia/Magadan\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Asia/Makassar\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"WITA\"\n }\n }\n ],\n [\n \"Asia/Manila\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"PST\"\n }\n }\n ],\n [\n \"Asia/Muscat\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Asia/Nicosia\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Asia/Novokuznetsk\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Novosibirsk\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Omsk\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Asia/Oral\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Asia/Phnom_Penh\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Pontianak\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"WIB\"\n }\n }\n ],\n [\n \"Asia/Pyongyang\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"KST\"\n }\n }\n ],\n [\n \"Asia/Qatar\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Asia/Qyzylorda\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Asia/Riyadh\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Asia/Sakhalin\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Asia/Samarkand\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Asia/Seoul\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"KST\"\n }\n }\n ],\n [\n \"Asia/Shanghai\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"Asia/Singapore\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"+08\"\n }\n }\n ],\n [\n \"Asia/Srednekolymsk\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Asia/Taipei\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"CST\"\n }\n }\n ],\n [\n \"Asia/Tashkent\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Asia/Tbilisi\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Asia/Tehran\",\n {\n \"s\": {\n \"f\": \"+0430\",\n \"t\": \"+0330\",\n \"n\": \"+0330\",\n \"s\": \"19700921T000000\",\n \"r\": {\n \"m\": 9,\n \"d\": \"3SU\"\n }\n },\n \"d\": {\n \"f\": \"+0330\",\n \"t\": \"+0430\",\n \"n\": \"+0430\",\n \"s\": \"19700321T000000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"3SU\"\n }\n }\n }\n ],\n [\n \"Asia/Thimphu\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Asia/Tokyo\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"JST\"\n }\n }\n ],\n [\n \"Asia/Tomsk\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Ulaanbaatar\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"+08\"\n }\n }\n ],\n [\n \"Asia/Urumqi\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Asia/Ust-Nera\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"+10\"\n }\n }\n ],\n [\n \"Asia/Vientiane\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Asia/Vladivostok\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"+10\"\n }\n }\n ],\n [\n \"Asia/Yakutsk\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"+09\"\n }\n }\n ],\n [\n \"Asia/Yangon\",\n {\n \"s\": {\n \"f\": \"+0630\",\n \"n\": \"+0630\"\n }\n }\n ],\n [\n \"Asia/Yekaterinburg\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Asia/Yerevan\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Atlantic/Azores\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"t\": \"-0100\",\n \"n\": \"-01\",\n \"s\": \"19701025T010000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0100\",\n \"t\": \"+0000\",\n \"n\": \"+00\",\n \"s\": \"19700329T000000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Atlantic/Bermuda\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"t\": \"-0400\",\n \"n\": \"AST\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"-0400\",\n \"t\": \"-0300\",\n \"n\": \"ADT\",\n \"s\": \"19700308T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"2SU\"\n }\n }\n }\n ],\n [\n \"Atlantic/Canary\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"t\": \"+0000\",\n \"n\": \"WET\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0100\",\n \"n\": \"WEST\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Atlantic/Cape_Verde\",\n {\n \"s\": {\n \"f\": \"-0100\",\n \"n\": \"-01\"\n }\n }\n ],\n [\n \"Atlantic/Faroe\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"t\": \"+0000\",\n \"n\": \"WET\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0100\",\n \"n\": \"WEST\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Atlantic/Madeira\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"t\": \"+0000\",\n \"n\": \"WET\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0100\",\n \"n\": \"WEST\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Atlantic/Reykjavik\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Atlantic/South_Georgia\",\n {\n \"s\": {\n \"f\": \"-0200\",\n \"n\": \"-02\"\n }\n }\n ],\n [\n \"Atlantic/St_Helena\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Atlantic/Stanley\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"Australia/Adelaide\",\n {\n \"s\": {\n \"f\": \"+1030\",\n \"t\": \"+0930\",\n \"n\": \"ACST\",\n \"s\": \"19700405T030000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0930\",\n \"t\": \"+1030\",\n \"n\": \"ACDT\",\n \"s\": \"19701004T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"Australia/Brisbane\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"AEST\"\n }\n }\n ],\n [\n \"Australia/Broken_Hill\",\n {\n \"s\": {\n \"f\": \"+1030\",\n \"t\": \"+0930\",\n \"n\": \"ACST\",\n \"s\": \"19700405T030000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0930\",\n \"t\": \"+1030\",\n \"n\": \"ACDT\",\n \"s\": \"19701004T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"Australia/Currie\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"t\": \"+1000\",\n \"n\": \"AEST\",\n \"s\": \"19700405T030000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+1000\",\n \"t\": \"+1100\",\n \"n\": \"AEDT\",\n \"s\": \"19701004T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"Australia/Darwin\",\n {\n \"s\": {\n \"f\": \"+0930\",\n \"n\": \"ACST\"\n }\n }\n ],\n [\n \"Australia/Eucla\",\n {\n \"s\": {\n \"f\": \"+0845\",\n \"n\": \"+0845\"\n }\n }\n ],\n [\n \"Australia/Hobart\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"t\": \"+1000\",\n \"n\": \"AEST\",\n \"s\": \"19700405T030000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+1000\",\n \"t\": \"+1100\",\n \"n\": \"AEDT\",\n \"s\": \"19701004T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"Australia/Lindeman\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"AEST\"\n }\n }\n ],\n [\n \"Australia/Lord_Howe\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"t\": \"+1030\",\n \"n\": \"+1030\",\n \"s\": \"19700405T020000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+1030\",\n \"t\": \"+1100\",\n \"n\": \"+11\",\n \"s\": \"19701004T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"Australia/Melbourne\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"t\": \"+1000\",\n \"n\": \"AEST\",\n \"s\": \"19700405T030000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+1000\",\n \"t\": \"+1100\",\n \"n\": \"AEDT\",\n \"s\": \"19701004T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"Australia/Perth\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"AWST\"\n }\n }\n ],\n [\n \"Australia/Sydney\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"t\": \"+1000\",\n \"n\": \"AEST\",\n \"s\": \"19700405T030000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+1000\",\n \"t\": \"+1100\",\n \"n\": \"AEDT\",\n \"s\": \"19701004T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"Etc/GMT-0\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Etc/GMT-1\",\n {\n \"s\": {\n \"f\": \"-0100\",\n \"n\": \"-01\"\n }\n }\n ],\n [\n \"Etc/GMT-10\",\n {\n \"s\": {\n \"f\": \"-1000\",\n \"n\": \"-10\"\n }\n }\n ],\n [\n \"Etc/GMT-11\",\n {\n \"s\": {\n \"f\": \"-1100\",\n \"n\": \"-11\"\n }\n }\n ],\n [\n \"Etc/GMT-12\",\n {\n \"s\": {\n \"f\": \"-1200\",\n \"n\": \"-12\"\n }\n }\n ],\n [\n \"Etc/GMT-2\",\n {\n \"s\": {\n \"f\": \"-0200\",\n \"n\": \"-02\"\n }\n }\n ],\n [\n \"Etc/GMT-3\",\n {\n \"s\": {\n \"f\": \"-0300\",\n \"n\": \"-03\"\n }\n }\n ],\n [\n \"Etc/GMT-4\",\n {\n \"s\": {\n \"f\": \"-0400\",\n \"n\": \"-04\"\n }\n }\n ],\n [\n \"Etc/GMT-5\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"n\": \"-05\"\n }\n }\n ],\n [\n \"Etc/GMT-6\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"-06\"\n }\n }\n ],\n [\n \"Etc/GMT-7\",\n {\n \"s\": {\n \"f\": \"-0700\",\n \"n\": \"-07\"\n }\n }\n ],\n [\n \"Etc/GMT-8\",\n {\n \"s\": {\n \"f\": \"-0800\",\n \"n\": \"-08\"\n }\n }\n ],\n [\n \"Etc/GMT-9\",\n {\n \"s\": {\n \"f\": \"-0900\",\n \"n\": \"-09\"\n }\n }\n ],\n [\n \"Etc/GMT\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Etc/GMT+0\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Etc/GMT+1\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"n\": \"+01\"\n }\n }\n ],\n [\n \"Etc/GMT+10\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"+10\"\n }\n }\n ],\n [\n \"Etc/GMT+11\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Etc/GMT+12\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ],\n [\n \"Etc/GMT+13\",\n {\n \"s\": {\n \"f\": \"+1300\",\n \"n\": \"+13\"\n }\n }\n ],\n [\n \"Etc/GMT+14\",\n {\n \"s\": {\n \"f\": \"+1400\",\n \"n\": \"+14\"\n }\n }\n ],\n [\n \"Etc/GMT+2\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"+02\"\n }\n }\n ],\n [\n \"Etc/GMT+3\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Etc/GMT+4\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Etc/GMT+5\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Etc/GMT+6\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Etc/GMT+7\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Etc/GMT+8\",\n {\n \"s\": {\n \"f\": \"+0800\",\n \"n\": \"+08\"\n }\n }\n ],\n [\n \"Etc/GMT+9\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"+09\"\n }\n }\n ],\n [\n \"Etc/GMT0\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Etc/Greenwich\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"GMT\"\n }\n }\n ],\n [\n \"Etc/UCT\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"UCT\"\n }\n }\n ],\n [\n \"Etc/Universal\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"UTC\"\n }\n }\n ],\n [\n \"Etc/UTC\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"UTC\"\n }\n }\n ],\n [\n \"Etc/Zulu\",\n {\n \"s\": {\n \"f\": \"+0000\",\n \"n\": \"UTC\"\n }\n }\n ],\n [\n \"Europe/Amsterdam\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Andorra\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Astrakhan\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Europe/Athens\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Belgrade\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Berlin\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Bratislava\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Brussels\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Bucharest\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Budapest\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Busingen\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Chisinau\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Copenhagen\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Dublin\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"t\": \"+0000\",\n \"n\": \"GMT\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0100\",\n \"n\": \"IST\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Gibraltar\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Guernsey\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"t\": \"+0000\",\n \"n\": \"GMT\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0100\",\n \"n\": \"BST\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Helsinki\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Isle_of_Man\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"t\": \"+0000\",\n \"n\": \"GMT\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0100\",\n \"n\": \"BST\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Istanbul\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Europe/Jersey\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"t\": \"+0000\",\n \"n\": \"GMT\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0100\",\n \"n\": \"BST\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Kaliningrad\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"n\": \"EET\"\n }\n }\n ],\n [\n \"Europe/Kiev\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Kirov\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Europe/Lisbon\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"t\": \"+0000\",\n \"n\": \"WET\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0100\",\n \"n\": \"WEST\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Ljubljana\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/London\",\n {\n \"s\": {\n \"f\": \"+0100\",\n \"t\": \"+0000\",\n \"n\": \"GMT\",\n \"s\": \"19701025T020000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0000\",\n \"t\": \"+0100\",\n \"n\": \"BST\",\n \"s\": \"19700329T010000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Luxembourg\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Madrid\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Malta\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Mariehamn\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Minsk\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"+03\"\n }\n }\n ],\n [\n \"Europe/Monaco\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Moscow\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"MSK\"\n }\n }\n ],\n [\n \"Europe/Nicosia\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Oslo\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Paris\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Podgorica\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Prague\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Riga\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Rome\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Samara\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Europe/San_Marino\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Sarajevo\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Saratov\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Europe/Simferopol\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"MSK\"\n }\n }\n ],\n [\n \"Europe/Skopje\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Sofia\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Stockholm\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Tallinn\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Tirane\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Ulyanovsk\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Europe/Uzhgorod\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Vaduz\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Vatican\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Vienna\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Vilnius\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Volgograd\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Europe/Warsaw\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Zagreb\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Zaporozhye\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"t\": \"+0200\",\n \"n\": \"EET\",\n \"s\": \"19701025T040000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0200\",\n \"t\": \"+0300\",\n \"n\": \"EEST\",\n \"s\": \"19700329T030000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Europe/Zurich\",\n {\n \"s\": {\n \"f\": \"+0200\",\n \"t\": \"+0100\",\n \"n\": \"CET\",\n \"s\": \"19701025T030000\",\n \"r\": {\n \"m\": 10,\n \"d\": \"-1SU\"\n }\n },\n \"d\": {\n \"f\": \"+0100\",\n \"t\": \"+0200\",\n \"n\": \"CEST\",\n \"s\": \"19700329T020000\",\n \"r\": {\n \"m\": 3,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Indian/Antananarivo\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Indian/Chagos\",\n {\n \"s\": {\n \"f\": \"+0600\",\n \"n\": \"+06\"\n }\n }\n ],\n [\n \"Indian/Christmas\",\n {\n \"s\": {\n \"f\": \"+0700\",\n \"n\": \"+07\"\n }\n }\n ],\n [\n \"Indian/Cocos\",\n {\n \"s\": {\n \"f\": \"+0630\",\n \"n\": \"+0630\"\n }\n }\n ],\n [\n \"Indian/Comoro\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Indian/Kerguelen\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Indian/Mahe\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Indian/Maldives\",\n {\n \"s\": {\n \"f\": \"+0500\",\n \"n\": \"+05\"\n }\n }\n ],\n [\n \"Indian/Mauritius\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Indian/Mayotte\",\n {\n \"s\": {\n \"f\": \"+0300\",\n \"n\": \"EAT\"\n }\n }\n ],\n [\n \"Indian/Reunion\",\n {\n \"s\": {\n \"f\": \"+0400\",\n \"n\": \"+04\"\n }\n }\n ],\n [\n \"Pacific/Apia\",\n {\n \"s\": {\n \"f\": \"+1400\",\n \"t\": \"+1300\",\n \"n\": \"+13\",\n \"s\": \"19700405T040000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+1300\",\n \"t\": \"+1400\",\n \"n\": \"+14\",\n \"s\": \"19700927T030000\",\n \"r\": {\n \"m\": 9,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Pacific/Auckland\",\n {\n \"s\": {\n \"f\": \"+1300\",\n \"t\": \"+1200\",\n \"n\": \"NZST\",\n \"s\": \"19700405T030000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+1200\",\n \"t\": \"+1300\",\n \"n\": \"NZDT\",\n \"s\": \"19700927T020000\",\n \"r\": {\n \"m\": 9,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Pacific/Bougainville\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Pacific/Chatham\",\n {\n \"s\": {\n \"f\": \"+1345\",\n \"t\": \"+1245\",\n \"n\": \"+1245\",\n \"s\": \"19700405T034500\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SU\"\n }\n },\n \"d\": {\n \"f\": \"+1245\",\n \"t\": \"+1345\",\n \"n\": \"+1345\",\n \"s\": \"19700927T024500\",\n \"r\": {\n \"m\": 9,\n \"d\": \"-1SU\"\n }\n }\n }\n ],\n [\n \"Pacific/Chuuk\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"+10\"\n }\n }\n ],\n [\n \"Pacific/Easter\",\n {\n \"s\": {\n \"f\": \"-0500\",\n \"t\": \"-0600\",\n \"n\": \"-06\",\n \"s\": \"19700404T220000\",\n \"r\": {\n \"m\": 4,\n \"d\": \"1SA\"\n }\n },\n \"d\": {\n \"f\": \"-0600\",\n \"t\": \"-0500\",\n \"n\": \"-05\",\n \"s\": \"19700905T220000\",\n \"r\": {\n \"m\": 9,\n \"d\": \"1SA\"\n }\n }\n }\n ],\n [\n \"Pacific/Efate\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Pacific/Enderbury\",\n {\n \"s\": {\n \"f\": \"+1300\",\n \"n\": \"+13\"\n }\n }\n ],\n [\n \"Pacific/Fakaofo\",\n {\n \"s\": {\n \"f\": \"+1300\",\n \"n\": \"+13\"\n }\n }\n ],\n [\n \"Pacific/Fiji\",\n {\n \"s\": {\n \"f\": \"+1300\",\n \"t\": \"+1200\",\n \"n\": \"+12\",\n \"s\": \"19700118T030000\",\n \"r\": {\n \"m\": 1,\n \"d\": \"-2SU\"\n }\n },\n \"d\": {\n \"f\": \"+1200\",\n \"t\": \"+1300\",\n \"n\": \"+13\",\n \"s\": \"19701101T020000\",\n \"r\": {\n \"m\": 11,\n \"d\": \"1SU\"\n }\n }\n }\n ],\n [\n \"Pacific/Funafuti\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ],\n [\n \"Pacific/Galapagos\",\n {\n \"s\": {\n \"f\": \"-0600\",\n \"n\": \"-06\"\n }\n }\n ],\n [\n \"Pacific/Gambier\",\n {\n \"s\": {\n \"f\": \"-0900\",\n \"n\": \"-09\"\n }\n }\n ],\n [\n \"Pacific/Guadalcanal\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Pacific/Guam\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"ChST\"\n }\n }\n ],\n [\n \"Pacific/Honolulu\",\n {\n \"s\": {\n \"f\": \"-1000\",\n \"n\": \"HST\"\n }\n }\n ],\n [\n \"Pacific/Kiritimati\",\n {\n \"s\": {\n \"f\": \"+1400\",\n \"n\": \"+14\"\n }\n }\n ],\n [\n \"Pacific/Kosrae\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Pacific/Kwajalein\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ],\n [\n \"Pacific/Majuro\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ],\n [\n \"Pacific/Marquesas\",\n {\n \"s\": {\n \"f\": \"-0930\",\n \"n\": \"-0930\"\n }\n }\n ],\n [\n \"Pacific/Midway\",\n {\n \"s\": {\n \"f\": \"-1100\",\n \"n\": \"SST\"\n }\n }\n ],\n [\n \"Pacific/Nauru\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ],\n [\n \"Pacific/Niue\",\n {\n \"s\": {\n \"f\": \"-1100\",\n \"n\": \"-11\"\n }\n }\n ],\n [\n \"Pacific/Norfolk\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Pacific/Noumea\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Pacific/Pago_Pago\",\n {\n \"s\": {\n \"f\": \"-1100\",\n \"n\": \"SST\"\n }\n }\n ],\n [\n \"Pacific/Palau\",\n {\n \"s\": {\n \"f\": \"+0900\",\n \"n\": \"+09\"\n }\n }\n ],\n [\n \"Pacific/Pitcairn\",\n {\n \"s\": {\n \"f\": \"-0800\",\n \"n\": \"-08\"\n }\n }\n ],\n [\n \"Pacific/Pohnpei\",\n {\n \"s\": {\n \"f\": \"+1100\",\n \"n\": \"+11\"\n }\n }\n ],\n [\n \"Pacific/Port_Moresby\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"+10\"\n }\n }\n ],\n [\n \"Pacific/Rarotonga\",\n {\n \"s\": {\n \"f\": \"-1000\",\n \"n\": \"-10\"\n }\n }\n ],\n [\n \"Pacific/Saipan\",\n {\n \"s\": {\n \"f\": \"+1000\",\n \"n\": \"ChST\"\n }\n }\n ],\n [\n \"Pacific/Tahiti\",\n {\n \"s\": {\n \"f\": \"-1000\",\n \"n\": \"-10\"\n }\n }\n ],\n [\n \"Pacific/Tarawa\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ],\n [\n \"Pacific/Tongatapu\",\n {\n \"s\": {\n \"f\": \"+1300\",\n \"n\": \"+13\"\n }\n }\n ],\n [\n \"Pacific/Wake\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ],\n [\n \"Pacific/Wallis\",\n {\n \"s\": {\n \"f\": \"+1200\",\n \"n\": \"+12\"\n }\n }\n ]\n]);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getZoneString = exports.getZoneLines = void 0;\nconst zones_1 = require(\"./zones\"); // This module must be generated with `yarn run build-zones`.\nfunction renderZoneSub(data) {\n const { n, f, t, r, s } = data;\n return [\n `TZNAME:${n}`,\n `TZOFFSETFROM:${f}`,\n `TZOFFSETTO:${t || f}`,\n `DTSTART:${s || zones_1.defaultStart}`,\n ...(r ? [`RRULE:FREQ=${r.f || 'YEARLY'};BYMONTH=${r.m};BYDAY=${r.d}`] : []),\n ];\n}\n/**\n * Tries to resolve a given time zone to iCalendar time zone component\n * (`VTIMEZONE`) as string array (usually for further processing).\n * @param zoneName Time zone name (e.g. `America/Los_Angeles`)\n * @param includeWrapper Set to `false` to avoid including lines for\n * `BEGIN:VTIMEZONE` and `END:VTIMEZONE`.\n * @returns Lines of the iCalendar time zone component (`VTIMEZONE`), each line\n * individually as an array of strings.\n */\nfunction getZoneLines(zoneName, includeWrapper = true) {\n const zoneData = zones_1.zonesMap.get(zoneName);\n if (zoneData) {\n const { s, d } = zoneData;\n const lines = [\n ...(includeWrapper ? ['BEGIN:VTIMEZONE'] : []),\n `TZID:${zoneName}`,\n // `X-LIC-LOCATION:${zoneName}`, // Who uses this?\n 'BEGIN:STANDARD',\n ...renderZoneSub(s),\n 'END:STANDARD',\n ...(d ? [\n 'BEGIN:DAYLIGHT',\n ...renderZoneSub(d),\n 'END:DAYLIGHT',\n ] : []),\n ...(includeWrapper ? ['END:VTIMEZONE'] : []),\n ];\n return lines;\n }\n}\nexports.getZoneLines = getZoneLines;\n/**\n * Tries to resolve a given time zone to iCalendar time zone component\n * (`VTIMEZONE`) as string.\n * @param zoneName Time zone name (e.g. `America/Los_Angeles`)\n * @param includeWrapper Set to `false` to avoid including lines for\n * `BEGIN:VTIMEZONE` and `END:VTIMEZONE`.\n * @returns The iCalendar time zone component (`VTIMEZONE`) as string\n * with `\\r\\n` line breaks.\n */\nfunction getZoneString(zoneName, includeWrapper = true) {\n const lines = getZoneLines(zoneName, includeWrapper);\n return lines === null || lines === void 0 ? void 0 : lines.join('\\r\\n');\n}\nexports.getZoneString = getZoneString;\n","/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n/**\n * Represents the BINARY value type, which contains extra methods for encoding and decoding.\n *\n * @memberof ICAL\n */\nclass Binary {\n /**\n * Creates a binary value from the given string.\n *\n * @param {String} aString The binary value string\n * @return {Binary} The binary value instance\n */\n static fromString(aString) {\n return new Binary(aString);\n }\n\n /**\n * Creates a new ICAL.Binary instance\n *\n * @param {String} aValue The binary data for this value\n */\n constructor(aValue) {\n this.value = aValue;\n }\n\n /**\n * The type name, to be used in the jCal object.\n * @default \"binary\"\n * @constant\n */\n icaltype = \"binary\";\n\n /**\n * Base64 decode the current value\n *\n * @return {String} The base64-decoded value\n */\n decodeValue() {\n return this._b64_decode(this.value);\n }\n\n /**\n * Encodes the passed parameter with base64 and sets the internal\n * value to the result.\n *\n * @param {String} aValue The raw binary value to encode\n */\n setEncodedValue(aValue) {\n this.value = this._b64_encode(aValue);\n }\n\n _b64_encode(data) {\n // http://kevin.vanzonneveld.net\n // + original by: Tyler Akins (http://rumkin.com)\n // + improved by: Bayron Guevara\n // + improved by: Thunder.m\n // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + bugfixed by: Pellentesque Malesuada\n // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + improved by: Rafał Kukawski (http://kukawski.pl)\n // * example 1: base64_encode('Kevin van Zonneveld');\n // * returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='\n // mozilla has this native\n // - but breaks in 2.0.0.12!\n //if (typeof this.window['atob'] == 'function') {\n // return atob(data);\n //}\n let b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" +\n \"abcdefghijklmnopqrstuvwxyz0123456789+/=\";\n let o1, o2, o3, h1, h2, h3, h4, bits, i = 0,\n ac = 0,\n enc = \"\",\n tmp_arr = [];\n\n if (!data) {\n return data;\n }\n\n do { // pack three octets into four hexets\n o1 = data.charCodeAt(i++);\n o2 = data.charCodeAt(i++);\n o3 = data.charCodeAt(i++);\n\n bits = o1 << 16 | o2 << 8 | o3;\n\n h1 = bits >> 18 & 0x3f;\n h2 = bits >> 12 & 0x3f;\n h3 = bits >> 6 & 0x3f;\n h4 = bits & 0x3f;\n\n // use hexets to index into b64, and append result to encoded string\n tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);\n } while (i < data.length);\n\n enc = tmp_arr.join('');\n\n let r = data.length % 3;\n\n return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);\n\n }\n\n _b64_decode(data) {\n // http://kevin.vanzonneveld.net\n // + original by: Tyler Akins (http://rumkin.com)\n // + improved by: Thunder.m\n // + input by: Aman Gupta\n // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + bugfixed by: Onno Marsman\n // + bugfixed by: Pellentesque Malesuada\n // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + input by: Brett Zamir (http://brett-zamir.me)\n // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // * example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==');\n // * returns 1: 'Kevin van Zonneveld'\n // mozilla has this native\n // - but breaks in 2.0.0.12!\n //if (typeof this.window['btoa'] == 'function') {\n // return btoa(data);\n //}\n let b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" +\n \"abcdefghijklmnopqrstuvwxyz0123456789+/=\";\n let o1, o2, o3, h1, h2, h3, h4, bits, i = 0,\n ac = 0,\n dec = \"\",\n tmp_arr = [];\n\n if (!data) {\n return data;\n }\n\n data += '';\n\n do { // unpack four hexets into three octets using index points in b64\n h1 = b64.indexOf(data.charAt(i++));\n h2 = b64.indexOf(data.charAt(i++));\n h3 = b64.indexOf(data.charAt(i++));\n h4 = b64.indexOf(data.charAt(i++));\n\n bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;\n\n o1 = bits >> 16 & 0xff;\n o2 = bits >> 8 & 0xff;\n o3 = bits & 0xff;\n\n if (h3 == 64) {\n tmp_arr[ac++] = String.fromCharCode(o1);\n } else if (h4 == 64) {\n tmp_arr[ac++] = String.fromCharCode(o1, o2);\n } else {\n tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);\n }\n } while (i < data.length);\n\n dec = tmp_arr.join('');\n\n return dec;\n }\n\n /**\n * The string representation of this value\n * @return {String}\n */\n toString() {\n return this.value;\n }\n}\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\nconst DURATION_LETTERS = /([PDWHMTS]{1,1})/;\nconst DATA_PROPS_TO_COPY = [\"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"isNegative\"];\n\n/**\n * This class represents the \"duration\" value type, with various calculation\n * and manipulation methods.\n *\n * @memberof ICAL\n */\nclass Duration {\n /**\n * Returns a new ICAL.Duration instance from the passed seconds value.\n *\n * @param {Number} aSeconds The seconds to create the instance from\n * @return {Duration} The newly created duration instance\n */\n static fromSeconds(aSeconds) {\n return (new Duration()).fromSeconds(aSeconds);\n }\n\n /**\n * Checks if the given string is an iCalendar duration value.\n *\n * @param {String} value The raw ical value\n * @return {Boolean} True, if the given value is of the\n * duration ical type\n */\n static isValueString(string) {\n return (string[0] === 'P' || string[1] === 'P');\n }\n\n /**\n * Creates a new {@link ICAL.Duration} instance from the passed string.\n *\n * @param {String} aStr The string to parse\n * @return {Duration} The created duration instance\n */\n static fromString(aStr) {\n let pos = 0;\n let dict = Object.create(null);\n let chunks = 0;\n\n while ((pos = aStr.search(DURATION_LETTERS)) !== -1) {\n let type = aStr[pos];\n let numeric = aStr.slice(0, Math.max(0, pos));\n aStr = aStr.slice(pos + 1);\n\n chunks += parseDurationChunk(type, numeric, dict);\n }\n\n if (chunks < 2) {\n // There must be at least a chunk with \"P\" and some unit chunk\n throw new Error(\n 'invalid duration value: Not enough duration components in \"' + aStr + '\"'\n );\n }\n\n return new Duration(dict);\n }\n\n /**\n * Creates a new ICAL.Duration instance from the given data object.\n *\n * @param {Object} aData An object with members of the duration\n * @param {Number=} aData.weeks Duration in weeks\n * @param {Number=} aData.days Duration in days\n * @param {Number=} aData.hours Duration in hours\n * @param {Number=} aData.minutes Duration in minutes\n * @param {Number=} aData.seconds Duration in seconds\n * @param {Boolean=} aData.isNegative If true, the duration is negative\n * @return {Duration} The createad duration instance\n */\n static fromData(aData) {\n return new Duration(aData);\n }\n\n /**\n * Creates a new ICAL.Duration instance.\n *\n * @param {Object} data An object with members of the duration\n * @param {Number=} data.weeks Duration in weeks\n * @param {Number=} data.days Duration in days\n * @param {Number=} data.hours Duration in hours\n * @param {Number=} data.minutes Duration in minutes\n * @param {Number=} data.seconds Duration in seconds\n * @param {Boolean=} data.isNegative If true, the duration is negative\n */\n constructor(data) {\n this.wrappedJSObject = this;\n this.fromData(data);\n }\n\n /**\n * The weeks in this duration\n * @type {Number}\n * @default 0\n */\n weeks = 0;\n\n /**\n * The days in this duration\n * @type {Number}\n * @default 0\n */\n days = 0;\n\n /**\n * The days in this duration\n * @type {Number}\n * @default 0\n */\n hours = 0;\n\n /**\n * The minutes in this duration\n * @type {Number}\n * @default 0\n */\n minutes = 0;\n\n /**\n * The seconds in this duration\n * @type {Number}\n * @default 0\n */\n seconds = 0;\n\n /**\n * The seconds in this duration\n * @type {Boolean}\n * @default false\n */\n isNegative = false;\n\n /**\n * The class identifier.\n * @constant\n * @type {String}\n * @default \"icalduration\"\n */\n icalclass = \"icalduration\";\n\n /**\n * The type name, to be used in the jCal object.\n * @constant\n * @type {String}\n * @default \"duration\"\n */\n icaltype = \"duration\";\n\n /**\n * Returns a clone of the duration object.\n *\n * @return {Duration} The cloned object\n */\n clone() {\n return Duration.fromData(this);\n }\n\n /**\n * The duration value expressed as a number of seconds.\n *\n * @return {Number} The duration value in seconds\n */\n toSeconds() {\n let seconds = this.seconds + 60 * this.minutes + 3600 * this.hours +\n 86400 * this.days + 7 * 86400 * this.weeks;\n return (this.isNegative ? -seconds : seconds);\n }\n\n /**\n * Reads the passed seconds value into this duration object. Afterwards,\n * members like {@link ICAL.Duration#days days} and {@link ICAL.Duration#weeks weeks} will be set up\n * accordingly.\n *\n * @param {Number} aSeconds The duration value in seconds\n * @return {Duration} Returns this instance\n */\n fromSeconds(aSeconds) {\n let secs = Math.abs(aSeconds);\n\n this.isNegative = (aSeconds < 0);\n this.days = trunc(secs / 86400);\n\n // If we have a flat number of weeks, use them.\n if (this.days % 7 == 0) {\n this.weeks = this.days / 7;\n this.days = 0;\n } else {\n this.weeks = 0;\n }\n\n secs -= (this.days + 7 * this.weeks) * 86400;\n\n this.hours = trunc(secs / 3600);\n secs -= this.hours * 3600;\n\n this.minutes = trunc(secs / 60);\n secs -= this.minutes * 60;\n\n this.seconds = secs;\n return this;\n }\n\n /**\n * Sets up the current instance using members from the passed data object.\n *\n * @param {Object} aData An object with members of the duration\n * @param {Number=} aData.weeks Duration in weeks\n * @param {Number=} aData.days Duration in days\n * @param {Number=} aData.hours Duration in hours\n * @param {Number=} aData.minutes Duration in minutes\n * @param {Number=} aData.seconds Duration in seconds\n * @param {Boolean=} aData.isNegative If true, the duration is negative\n */\n fromData(aData) {\n for (let prop of DATA_PROPS_TO_COPY) {\n if (aData && prop in aData) {\n this[prop] = aData[prop];\n } else {\n this[prop] = 0;\n }\n }\n }\n\n /**\n * Resets the duration instance to the default values, i.e. PT0S\n */\n reset() {\n this.isNegative = false;\n this.weeks = 0;\n this.days = 0;\n this.hours = 0;\n this.minutes = 0;\n this.seconds = 0;\n }\n\n /**\n * Compares the duration instance with another one.\n *\n * @param {Duration} aOther The instance to compare with\n * @return {Number} -1, 0 or 1 for less/equal/greater\n */\n compare(aOther) {\n let thisSeconds = this.toSeconds();\n let otherSeconds = aOther.toSeconds();\n return (thisSeconds > otherSeconds) - (thisSeconds < otherSeconds);\n }\n\n /**\n * Normalizes the duration instance. For example, a duration with a value\n * of 61 seconds will be normalized to 1 minute and 1 second.\n */\n normalize() {\n this.fromSeconds(this.toSeconds());\n }\n\n /**\n * The string representation of this duration.\n * @return {String}\n */\n toString() {\n if (this.toSeconds() == 0) {\n return \"PT0S\";\n } else {\n let str = \"\";\n if (this.isNegative) str += \"-\";\n str += \"P\";\n let hasWeeks = false;\n if (this.weeks) {\n if (this.days || this.hours || this.minutes || this.seconds) {\n str += (this.weeks * 7 + this.days) + \"D\";\n } else {\n str += (this.weeks + \"W\");\n hasWeeks = true;\n }\n } else if (this.days) {\n str += (this.days + \"D\");\n }\n\n if (!hasWeeks) {\n if (this.hours || this.minutes || this.seconds) {\n str += \"T\";\n if (this.hours) {\n str += this.hours + \"H\";\n }\n\n if (this.minutes) {\n str += this.minutes + \"M\";\n }\n\n if (this.seconds) {\n str += this.seconds + \"S\";\n }\n }\n }\n\n return str;\n }\n }\n\n /**\n * The iCalendar string representation of this duration.\n * @return {String}\n */\n toICALString() {\n return this.toString();\n }\n}\n\n/**\n * Internal helper function to handle a chunk of a duration.\n *\n * @private\n * @param {String} letter type of duration chunk\n * @param {String} number numeric value or -/+\n * @param {Object} dict target to assign values to\n */\nfunction parseDurationChunk(letter, number, object) {\n let type;\n switch (letter) {\n case 'P':\n if (number && number === '-') {\n object.isNegative = true;\n } else {\n object.isNegative = false;\n }\n // period\n break;\n case 'D':\n type = 'days';\n break;\n case 'W':\n type = 'weeks';\n break;\n case 'H':\n type = 'hours';\n break;\n case 'M':\n type = 'minutes';\n break;\n case 'S':\n type = 'seconds';\n break;\n default:\n // Not a valid chunk\n return 0;\n }\n\n if (type) {\n if (!number && number !== 0) {\n throw new Error(\n 'invalid duration value: Missing number before \"' + letter + '\"'\n );\n }\n let num = parseInt(number, 10);\n if (isStrictlyNaN(num)) {\n throw new Error(\n 'invalid duration value: Invalid number \"' + number + '\" before \"' + letter + '\"'\n );\n }\n object[type] = num;\n }\n\n return 1;\n}\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\n/**\n * This lets typescript resolve our custom types in the\n * generated d.ts files (jsdoc typedefs are converted to typescript types).\n * Ignore prevents the typedefs from being documented more than once.\n * @ignore\n * @typedef {import(\"./types.js\").jCalComponent} jCalComponent\n * Imports the 'occurrenceDetails' type from the \"types.js\" module\n */\n\n/**\n * This class represents the \"period\" value type, with various calculation and manipulation methods.\n *\n * @memberof ICAL\n */\nclass Period {\n /**\n * Creates a new {@link ICAL.Period} instance from the passed string.\n *\n * @param {String} str The string to parse\n * @param {Property} prop The property this period will be on\n * @return {Period} The created period instance\n */\n static fromString(str, prop) {\n let parts = str.split('/');\n\n if (parts.length !== 2) {\n throw new Error(\n 'Invalid string value: \"' + str + '\" must contain a \"/\" char.'\n );\n }\n\n let options = {\n start: Time.fromDateTimeString(parts[0], prop)\n };\n\n let end = parts[1];\n\n if (Duration.isValueString(end)) {\n options.duration = Duration.fromString(end);\n } else {\n options.end = Time.fromDateTimeString(end, prop);\n }\n\n return new Period(options);\n }\n\n /**\n * Creates a new {@link ICAL.Period} instance from the given data object.\n * The passed data object cannot contain both and end date and a duration.\n *\n * @param {Object} aData An object with members of the period\n * @param {Time=} aData.start The start of the period\n * @param {Time=} aData.end The end of the period\n * @param {Duration=} aData.duration The duration of the period\n * @return {Period} The period instance\n */\n static fromData(aData) {\n return new Period(aData);\n }\n\n /**\n * Returns a new period instance from the given jCal data array. The first\n * member is always the start date string, the second member is either a\n * duration or end date string.\n *\n * @param {jCalComponent} aData The jCal data array\n * @param {Property} aProp The property this jCal data is on\n * @param {Boolean} aLenient If true, data value can be both date and date-time\n * @return {Period} The period instance\n */\n static fromJSON(aData, aProp, aLenient) {\n function fromDateOrDateTimeString(aValue, dateProp) {\n if (aLenient) {\n return Time.fromString(aValue, dateProp);\n } else {\n return Time.fromDateTimeString(aValue, dateProp);\n }\n }\n\n if (Duration.isValueString(aData[1])) {\n return Period.fromData({\n start: fromDateOrDateTimeString(aData[0], aProp),\n duration: Duration.fromString(aData[1])\n });\n } else {\n return Period.fromData({\n start: fromDateOrDateTimeString(aData[0], aProp),\n end: fromDateOrDateTimeString(aData[1], aProp)\n });\n }\n }\n\n /**\n * Creates a new ICAL.Period instance. The passed data object cannot contain both and end date and\n * a duration.\n *\n * @param {Object} aData An object with members of the period\n * @param {Time=} aData.start The start of the period\n * @param {Time=} aData.end The end of the period\n * @param {Duration=} aData.duration The duration of the period\n */\n constructor(aData) {\n this.wrappedJSObject = this;\n\n if (aData && 'start' in aData) {\n if (aData.start && !(aData.start instanceof Time)) {\n throw new TypeError('.start must be an instance of ICAL.Time');\n }\n this.start = aData.start;\n }\n\n if (aData && aData.end && aData.duration) {\n throw new Error('cannot accept both end and duration');\n }\n\n if (aData && 'end' in aData) {\n if (aData.end && !(aData.end instanceof Time)) {\n throw new TypeError('.end must be an instance of ICAL.Time');\n }\n this.end = aData.end;\n }\n\n if (aData && 'duration' in aData) {\n if (aData.duration && !(aData.duration instanceof Duration)) {\n throw new TypeError('.duration must be an instance of ICAL.Duration');\n }\n this.duration = aData.duration;\n }\n }\n\n\n /**\n * The start of the period\n * @type {Time}\n */\n start = null;\n\n /**\n * The end of the period\n * @type {Time}\n */\n end = null;\n\n /**\n * The duration of the period\n * @type {Duration}\n */\n duration = null;\n\n /**\n * The class identifier.\n * @constant\n * @type {String}\n * @default \"icalperiod\"\n */\n icalclass = \"icalperiod\";\n\n /**\n * The type name, to be used in the jCal object.\n * @constant\n * @type {String}\n * @default \"period\"\n */\n icaltype = \"period\";\n\n /**\n * Returns a clone of the duration object.\n *\n * @return {Period} The cloned object\n */\n clone() {\n return Period.fromData({\n start: this.start ? this.start.clone() : null,\n end: this.end ? this.end.clone() : null,\n duration: this.duration ? this.duration.clone() : null\n });\n }\n\n /**\n * Calculates the duration of the period, either directly or by subtracting\n * start from end date.\n *\n * @return {Duration} The calculated duration\n */\n getDuration() {\n if (this.duration) {\n return this.duration;\n } else {\n return this.end.subtractDate(this.start);\n }\n }\n\n /**\n * Calculates the end date of the period, either directly or by adding\n * duration to start date.\n *\n * @return {Time} The calculated end date\n */\n getEnd() {\n if (this.end) {\n return this.end;\n } else {\n let end = this.start.clone();\n end.addDuration(this.duration);\n return end;\n }\n }\n\n /**\n * Compare this period with a date or other period. To maintain the logic where a.compare(b)\n * returns 1 when a > b, this function will return 1 when the period is after the date, 0 when the\n * date is within the period, and -1 when the period is before the date. When comparing two\n * periods, as soon as they overlap in any way this will return 0.\n *\n * @param {Time|Period} dt The date or other period to compare with\n */\n compare(dt) {\n if (dt.compare(this.start) < 0) {\n return 1;\n } else if (dt.compare(this.getEnd()) > 0) {\n return -1;\n } else {\n return 0;\n }\n }\n\n /**\n * The string representation of this period.\n * @return {String}\n */\n toString() {\n return this.start + \"/\" + (this.end || this.duration);\n }\n\n /**\n * The jCal representation of this period type.\n * @return {Object}\n */\n toJSON() {\n return [this.start.toString(), (this.end || this.duration).toString()];\n }\n\n /**\n * The iCalendar string representation of this period.\n * @return {String}\n */\n toICALString() {\n return this.start.toICALString() + \"/\" +\n (this.end || this.duration).toICALString();\n }\n}\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\n/**\n * This lets typescript resolve our custom types in the\n * generated d.ts files (jsdoc typedefs are converted to typescript types).\n * Ignore prevents the typedefs from being documented more than once.\n *\n * @ignore\n * @typedef {import(\"./types.js\").weekDay} weekDay\n * Imports the 'weekDay' type from the \"types.js\" module\n *\n * @ignore\n * @typedef {import(\"./types.js\").timeInit} timeInit\n * Imports the 'timeInit' type from the \"types.js\" module\n */\n\n/**\n * @classdesc\n * iCalendar Time representation (similar to JS Date object). Fully\n * independent of system (OS) timezone / time. Unlike JS Date, the month\n * January is 1, not zero.\n *\n * @example\n * var time = new ICAL.Time({\n * year: 2012,\n * month: 10,\n * day: 11\n * minute: 0,\n * second: 0,\n * isDate: false\n * });\n *\n *\n * @memberof ICAL\n*/\nclass Time {\n static _dowCache = {};\n static _wnCache = {};\n\n /**\n * Returns the days in the given month\n *\n * @param {Number} month The month to check\n * @param {Number} year The year to check\n * @return {Number} The number of days in the month\n */\n static daysInMonth(month, year) {\n let _daysInMonth = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n let days = 30;\n\n if (month < 1 || month > 12) return days;\n\n days = _daysInMonth[month];\n\n if (month == 2) {\n days += Time.isLeapYear(year);\n }\n\n return days;\n }\n\n /**\n * Checks if the year is a leap year\n *\n * @param {Number} year The year to check\n * @return {Boolean} True, if the year is a leap year\n */\n static isLeapYear(year) {\n if (year <= 1752) {\n return ((year % 4) == 0);\n } else {\n return (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0));\n }\n }\n\n /**\n * Create a new ICAL.Time from the day of year and year. The date is returned\n * in floating timezone.\n *\n * @param {Number} aDayOfYear The day of year\n * @param {Number} aYear The year to create the instance in\n * @return {Time} The created instance with the calculated date\n */\n static fromDayOfYear(aDayOfYear, aYear) {\n let year = aYear;\n let doy = aDayOfYear;\n let tt = new Time();\n tt.auto_normalize = false;\n let is_leap = (Time.isLeapYear(year) ? 1 : 0);\n\n if (doy < 1) {\n year--;\n is_leap = (Time.isLeapYear(year) ? 1 : 0);\n doy += Time.daysInYearPassedMonth[is_leap][12];\n return Time.fromDayOfYear(doy, year);\n } else if (doy > Time.daysInYearPassedMonth[is_leap][12]) {\n is_leap = (Time.isLeapYear(year) ? 1 : 0);\n doy -= Time.daysInYearPassedMonth[is_leap][12];\n year++;\n return Time.fromDayOfYear(doy, year);\n }\n\n tt.year = year;\n tt.isDate = true;\n\n for (let month = 11; month >= 0; month--) {\n if (doy > Time.daysInYearPassedMonth[is_leap][month]) {\n tt.month = month + 1;\n tt.day = doy - Time.daysInYearPassedMonth[is_leap][month];\n break;\n }\n }\n\n tt.auto_normalize = true;\n return tt;\n }\n\n /**\n * Returns a new ICAL.Time instance from a date string, e.g 2015-01-02.\n *\n * @deprecated Use {@link ICAL.Time.fromDateString} instead\n * @param {String} str The string to create from\n * @return {Time} The date/time instance\n */\n static fromStringv2(str) {\n return new Time({\n year: parseInt(str.slice(0, 4), 10),\n month: parseInt(str.slice(5, 7), 10),\n day: parseInt(str.slice(8, 10), 10),\n isDate: true\n });\n }\n\n /**\n * Returns a new ICAL.Time instance from a date string, e.g 2015-01-02.\n *\n * @param {String} aValue The string to create from\n * @return {Time} The date/time instance\n */\n static fromDateString(aValue) {\n // Dates should have no timezone.\n // Google likes to sometimes specify Z on dates\n // we specifically ignore that to avoid issues.\n\n // YYYY-MM-DD\n // 2012-10-10\n return new Time({\n year: strictParseInt(aValue.slice(0, 4)),\n month: strictParseInt(aValue.slice(5, 7)),\n day: strictParseInt(aValue.slice(8, 10)),\n isDate: true\n });\n }\n\n /**\n * Returns a new ICAL.Time instance from a date-time string, e.g\n * 2015-01-02T03:04:05. If a property is specified, the timezone is set up\n * from the property's TZID parameter.\n *\n * @param {String} aValue The string to create from\n * @param {Property=} prop The property the date belongs to\n * @return {Time} The date/time instance\n */\n static fromDateTimeString(aValue, prop) {\n if (aValue.length < 19) {\n throw new Error(\n 'invalid date-time value: \"' + aValue + '\"'\n );\n }\n\n let zone;\n let zoneId;\n\n if (aValue.slice(-1) === 'Z') {\n zone = Timezone.utcTimezone;\n } else if (prop) {\n zoneId = prop.getParameter('tzid');\n\n if (prop.parent) {\n if (prop.parent.name === 'standard' || prop.parent.name === 'daylight') {\n // Per RFC 5545 3.8.2.4 and 3.8.2.2, start/end date-times within\n // these components MUST be specified in local time.\n zone = Timezone.localTimezone;\n } else if (zoneId) {\n // If the desired time zone is defined within the component tree,\n // fetch its definition and prefer that.\n zone = prop.parent.getTimeZoneByID(zoneId);\n }\n }\n }\n\n const timeData = {\n year: strictParseInt(aValue.slice(0, 4)),\n month: strictParseInt(aValue.slice(5, 7)),\n day: strictParseInt(aValue.slice(8, 10)),\n hour: strictParseInt(aValue.slice(11, 13)),\n minute: strictParseInt(aValue.slice(14, 16)),\n second: strictParseInt(aValue.slice(17, 19)),\n };\n\n // Although RFC 5545 requires that all TZIDs used within a file have a\n // corresponding time zone definition, we may not be parsing the full file\n // or we may be dealing with a non-compliant file; in either case, we can\n // check our own time zone service for the TZID in a last-ditch effort.\n if (zoneId && !zone) {\n timeData.timezone = zoneId;\n }\n\n // 2012-10-10T10:10:10(Z)?\n return new Time(timeData, zone);\n }\n\n /**\n * Returns a new ICAL.Time instance from a date or date-time string,\n *\n * @param {String} aValue The string to create from\n * @param {Property=} prop The property the date belongs to\n * @return {Time} The date/time instance\n */\n static fromString(aValue, aProperty) {\n if (aValue.length > 10) {\n return Time.fromDateTimeString(aValue, aProperty);\n } else {\n return Time.fromDateString(aValue);\n }\n }\n\n /**\n * Creates a new ICAL.Time instance from the given Javascript Date.\n *\n * @param {?Date} aDate The Javascript Date to read, or null to reset\n * @param {Boolean} [useUTC=false] If true, the UTC values of the date will be used\n */\n static fromJSDate(aDate, useUTC) {\n let tt = new Time();\n return tt.fromJSDate(aDate, useUTC);\n }\n\n /**\n * Creates a new ICAL.Time instance from the the passed data object.\n *\n * @param {timeInit} aData Time initialization\n * @param {Timezone=} aZone Timezone this position occurs in\n */\n static fromData = function fromData(aData, aZone) {\n let t = new Time();\n return t.fromData(aData, aZone);\n };\n\n /**\n * Creates a new ICAL.Time instance from the current moment.\n * The instance is “floating” - has no timezone relation.\n * To create an instance considering the time zone, call\n * ICAL.Time.fromJSDate(new Date(), true)\n * @return {Time}\n */\n static now() {\n return Time.fromJSDate(new Date(), false);\n }\n\n /**\n * Returns the date on which ISO week number 1 starts.\n *\n * @see Time#weekNumber\n * @param {Number} aYear The year to search in\n * @param {weekDay=} aWeekStart The week start weekday, used for calculation.\n * @return {Time} The date on which week number 1 starts\n */\n static weekOneStarts(aYear, aWeekStart) {\n let t = Time.fromData({\n year: aYear,\n month: 1,\n day: 1,\n isDate: true\n });\n\n let dow = t.dayOfWeek();\n let wkst = aWeekStart || Time.DEFAULT_WEEK_START;\n if (dow > Time.THURSDAY) {\n t.day += 7;\n }\n if (wkst > Time.THURSDAY) {\n t.day -= 7;\n }\n\n t.day -= dow - wkst;\n\n return t;\n }\n\n /**\n * Get the dominical letter for the given year. Letters range from A - G for\n * common years, and AG to GF for leap years.\n *\n * @param {Number} yr The year to retrieve the letter for\n * @return {String} The dominical letter.\n */\n static getDominicalLetter(yr) {\n let LTRS = \"GFEDCBA\";\n let dom = (yr + (yr / 4 | 0) + (yr / 400 | 0) - (yr / 100 | 0) - 1) % 7;\n let isLeap = Time.isLeapYear(yr);\n if (isLeap) {\n return LTRS[(dom + 6) % 7] + LTRS[dom];\n } else {\n return LTRS[dom];\n }\n }\n\n static #epochTime = null;\n /**\n * January 1st, 1970 as an ICAL.Time.\n * @type {Time}\n * @constant\n * @instance\n */\n static get epochTime() {\n if (!this.#epochTime) {\n this.#epochTime = Time.fromData({\n year: 1970,\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n isDate: false,\n timezone: \"Z\"\n });\n }\n return this.#epochTime;\n }\n\n static _cmp_attr(a, b, attr) {\n if (a[attr] > b[attr]) return 1;\n if (a[attr] < b[attr]) return -1;\n return 0;\n }\n\n /**\n * The days that have passed in the year after a given month. The array has\n * two members, one being an array of passed days for non-leap years, the\n * other analog for leap years.\n * @example\n * var isLeapYear = ICAL.Time.isLeapYear(year);\n * var passedDays = ICAL.Time.daysInYearPassedMonth[isLeapYear][month];\n * @type {Array.>}\n */\n static daysInYearPassedMonth = [\n [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365],\n [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366]\n ];\n\n static SUNDAY = 1;\n static MONDAY = 2;\n static TUESDAY = 3;\n static WEDNESDAY = 4;\n static THURSDAY = 5;\n static FRIDAY = 6;\n static SATURDAY = 7;\n\n /**\n * The default weekday for the WKST part.\n * @constant\n * @default ICAL.Time.MONDAY\n */\n static DEFAULT_WEEK_START = 2; // MONDAY\n\n /**\n * Creates a new ICAL.Time instance.\n *\n * @param {timeInit} data Time initialization\n * @param {Timezone} zone timezone this position occurs in\n */\n constructor(data, zone) {\n this.wrappedJSObject = this;\n\n /**\n * @type {timeInit}\n * @private\n */\n this._time = Object.create(null);\n\n /* time defaults */\n this._time.year = 0;\n this._time.month = 1;\n this._time.day = 1;\n this._time.hour = 0;\n this._time.minute = 0;\n this._time.second = 0;\n this._time.isDate = false;\n\n this.fromData(data, zone);\n }\n\n /**\n * The class identifier.\n * @constant\n * @type {String}\n * @default \"icaltime\"\n */\n icalclass = \"icaltime\";\n _cachedUnixTime = null;\n\n /**\n * The type name, to be used in the jCal object. This value may change and\n * is strictly defined by the {@link ICAL.Time#isDate isDate} member.\n * @type {String}\n * @default \"date-time\"\n */\n get icaltype() {\n return this.isDate ? 'date' : 'date-time';\n }\n\n /**\n * The timezone for this time.\n * @type {Timezone}\n */\n zone = null;\n\n /**\n * Internal uses to indicate that a change has been made and the next read\n * operation must attempt to normalize the value (for example changing the\n * day to 33).\n *\n * @type {Boolean}\n * @private\n */\n _pendingNormalization = false;\n\n /**\n * The year of this date.\n * @type {Number}\n */\n get year() {\n return this._getTimeAttr('year');\n }\n\n set year(val) {\n this._setTimeAttr('year', val);\n }\n\n /**\n * The month of this date.\n * @type {Number}\n */\n get month() {\n return this._getTimeAttr('month');\n }\n\n set month(val) {\n this._setTimeAttr('month', val);\n }\n\n /**\n * The day of this date.\n * @type {Number}\n */\n get day() {\n return this._getTimeAttr('day');\n }\n\n set day(val) {\n this._setTimeAttr('day', val);\n }\n\n /**\n * The hour of this date-time.\n * @type {Number}\n */\n get hour() {\n return this._getTimeAttr('hour');\n }\n\n set hour(val) {\n this._setTimeAttr('hour', val);\n }\n\n /**\n * The minute of this date-time.\n * @type {Number}\n */\n get minute() {\n return this._getTimeAttr('minute');\n }\n\n set minute(val) {\n this._setTimeAttr('minute', val);\n }\n\n /**\n * The second of this date-time.\n * @type {Number}\n */\n get second() {\n return this._getTimeAttr('second');\n }\n\n set second(val) {\n this._setTimeAttr('second', val);\n }\n\n /**\n * If true, the instance represents a date (as opposed to a date-time)\n * @type {Boolean}\n */\n get isDate() {\n return this._getTimeAttr('isDate');\n }\n\n set isDate(val) {\n this._setTimeAttr('isDate', val);\n }\n\n /**\n * @private\n * @param {String} attr Attribute to get (one of: year, month,\n * day, hour, minute, second, isDate)\n * @return {Number|Boolean} Current value for the attribute\n */\n _getTimeAttr(attr) {\n if (this._pendingNormalization) {\n this._normalize();\n this._pendingNormalization = false;\n }\n\n return this._time[attr];\n }\n\n /**\n * @private\n * @param {String} attr Attribute to set (one of: year, month,\n * day, hour, minute, second, isDate)\n * @param {Number|Boolean} val New value for the attribute\n */\n _setTimeAttr(attr, val) {\n // Check if isDate will be set and if was not set to normalize date.\n // This avoids losing days when seconds, minutes and hours are zeroed\n // what normalize will do when time is a date.\n if (attr === \"isDate\" && val && !this._time.isDate) {\n this.adjust(0, 0, 0, 0);\n }\n this._cachedUnixTime = null;\n this._pendingNormalization = true;\n this._time[attr] = val;\n }\n\n /**\n * Returns a clone of the time object.\n *\n * @return {Time} The cloned object\n */\n clone() {\n return new Time(this._time, this.zone);\n }\n\n /**\n * Reset the time instance to epoch time\n */\n reset() {\n this.fromData(Time.epochTime);\n this.zone = Timezone.utcTimezone;\n }\n\n /**\n * Reset the time instance to the given date/time values.\n *\n * @param {Number} year The year to set\n * @param {Number} month The month to set\n * @param {Number} day The day to set\n * @param {Number} hour The hour to set\n * @param {Number} minute The minute to set\n * @param {Number} second The second to set\n * @param {Timezone} timezone The timezone to set\n */\n resetTo(year, month, day, hour, minute, second, timezone) {\n this.fromData({\n year: year,\n month: month,\n day: day,\n hour: hour,\n minute: minute,\n second: second,\n zone: timezone\n });\n }\n\n /**\n * Set up the current instance from the Javascript date value.\n *\n * @param {?Date} aDate The Javascript Date to read, or null to reset\n * @param {Boolean} [useUTC=false] If true, the UTC values of the date will be used\n */\n fromJSDate(aDate, useUTC) {\n if (!aDate) {\n this.reset();\n } else {\n if (useUTC) {\n this.zone = Timezone.utcTimezone;\n this.year = aDate.getUTCFullYear();\n this.month = aDate.getUTCMonth() + 1;\n this.day = aDate.getUTCDate();\n this.hour = aDate.getUTCHours();\n this.minute = aDate.getUTCMinutes();\n this.second = aDate.getUTCSeconds();\n } else {\n this.zone = Timezone.localTimezone;\n this.year = aDate.getFullYear();\n this.month = aDate.getMonth() + 1;\n this.day = aDate.getDate();\n this.hour = aDate.getHours();\n this.minute = aDate.getMinutes();\n this.second = aDate.getSeconds();\n }\n }\n this._cachedUnixTime = null;\n return this;\n }\n\n /**\n * Sets up the current instance using members from the passed data object.\n *\n * @param {timeInit} aData Time initialization\n * @param {Timezone=} aZone Timezone this position occurs in\n */\n fromData(aData, aZone) {\n if (aData) {\n for (let [key, value] of Object.entries(aData)) {\n // ical type cannot be set\n if (key === 'icaltype') continue;\n this[key] = value;\n }\n }\n\n if (aZone) {\n this.zone = aZone;\n }\n\n if (aData && !(\"isDate\" in aData)) {\n this.isDate = !(\"hour\" in aData);\n } else if (aData && (\"isDate\" in aData)) {\n this.isDate = aData.isDate;\n }\n\n if (aData && \"timezone\" in aData) {\n let zone = TimezoneService.get(\n aData.timezone\n );\n\n this.zone = zone || Timezone.localTimezone;\n }\n\n if (aData && \"zone\" in aData) {\n this.zone = aData.zone;\n }\n\n if (!this.zone) {\n this.zone = Timezone.localTimezone;\n }\n\n this._cachedUnixTime = null;\n return this;\n }\n\n /**\n * Calculate the day of week.\n * @param {weekDay=} aWeekStart\n * The week start weekday, defaults to SUNDAY\n * @return {weekDay}\n */\n dayOfWeek(aWeekStart) {\n let firstDow = aWeekStart || Time.SUNDAY;\n let dowCacheKey = (this.year << 12) + (this.month << 8) + (this.day << 3) + firstDow;\n if (dowCacheKey in Time._dowCache) {\n return Time._dowCache[dowCacheKey];\n }\n\n // Using Zeller's algorithm\n let q = this.day;\n let m = this.month + (this.month < 3 ? 12 : 0);\n let Y = this.year - (this.month < 3 ? 1 : 0);\n\n let h = (q + Y + trunc(((m + 1) * 26) / 10) + trunc(Y / 4));\n { // eslint-disable-line no-constant-condition\n h += trunc(Y / 100) * 6 + trunc(Y / 400);\n }\n\n // Normalize to 1 = wkst\n h = ((h + 7 - firstDow) % 7) + 1;\n Time._dowCache[dowCacheKey] = h;\n return h;\n }\n\n /**\n * Calculate the day of year.\n * @return {Number}\n */\n dayOfYear() {\n let is_leap = (Time.isLeapYear(this.year) ? 1 : 0);\n let diypm = Time.daysInYearPassedMonth;\n return diypm[is_leap][this.month - 1] + this.day;\n }\n\n /**\n * Returns a copy of the current date/time, rewound to the start of the\n * week. The resulting ICAL.Time instance is of icaltype date, even if this\n * is a date-time.\n *\n * @param {weekDay=} aWeekStart\n * The week start weekday, defaults to SUNDAY\n * @return {Time} The start of the week (cloned)\n */\n startOfWeek(aWeekStart) {\n let firstDow = aWeekStart || Time.SUNDAY;\n let result = this.clone();\n result.day -= ((this.dayOfWeek() + 7 - firstDow) % 7);\n result.isDate = true;\n result.hour = 0;\n result.minute = 0;\n result.second = 0;\n return result;\n }\n\n /**\n * Returns a copy of the current date/time, shifted to the end of the week.\n * The resulting ICAL.Time instance is of icaltype date, even if this is a\n * date-time.\n *\n * @param {weekDay=} aWeekStart\n * The week start weekday, defaults to SUNDAY\n * @return {Time} The end of the week (cloned)\n */\n endOfWeek(aWeekStart) {\n let firstDow = aWeekStart || Time.SUNDAY;\n let result = this.clone();\n result.day += (7 - this.dayOfWeek() + firstDow - Time.SUNDAY) % 7;\n result.isDate = true;\n result.hour = 0;\n result.minute = 0;\n result.second = 0;\n return result;\n }\n\n /**\n * Returns a copy of the current date/time, rewound to the start of the\n * month. The resulting ICAL.Time instance is of icaltype date, even if\n * this is a date-time.\n *\n * @return {Time} The start of the month (cloned)\n */\n startOfMonth() {\n let result = this.clone();\n result.day = 1;\n result.isDate = true;\n result.hour = 0;\n result.minute = 0;\n result.second = 0;\n return result;\n }\n\n /**\n * Returns a copy of the current date/time, shifted to the end of the\n * month. The resulting ICAL.Time instance is of icaltype date, even if\n * this is a date-time.\n *\n * @return {Time} The end of the month (cloned)\n */\n endOfMonth() {\n let result = this.clone();\n result.day = Time.daysInMonth(result.month, result.year);\n result.isDate = true;\n result.hour = 0;\n result.minute = 0;\n result.second = 0;\n return result;\n }\n\n /**\n * Returns a copy of the current date/time, rewound to the start of the\n * year. The resulting ICAL.Time instance is of icaltype date, even if\n * this is a date-time.\n *\n * @return {Time} The start of the year (cloned)\n */\n startOfYear() {\n let result = this.clone();\n result.day = 1;\n result.month = 1;\n result.isDate = true;\n result.hour = 0;\n result.minute = 0;\n result.second = 0;\n return result;\n }\n\n /**\n * Returns a copy of the current date/time, shifted to the end of the\n * year. The resulting ICAL.Time instance is of icaltype date, even if\n * this is a date-time.\n *\n * @return {Time} The end of the year (cloned)\n */\n endOfYear() {\n let result = this.clone();\n result.day = 31;\n result.month = 12;\n result.isDate = true;\n result.hour = 0;\n result.minute = 0;\n result.second = 0;\n return result;\n }\n\n /**\n * First calculates the start of the week, then returns the day of year for\n * this date. If the day falls into the previous year, the day is zero or negative.\n *\n * @param {weekDay=} aFirstDayOfWeek\n * The week start weekday, defaults to SUNDAY\n * @return {Number} The calculated day of year\n */\n startDoyWeek(aFirstDayOfWeek) {\n let firstDow = aFirstDayOfWeek || Time.SUNDAY;\n let delta = this.dayOfWeek() - firstDow;\n if (delta < 0) delta += 7;\n return this.dayOfYear() - delta;\n }\n\n /**\n * Get the dominical letter for the current year. Letters range from A - G\n * for common years, and AG to GF for leap years.\n *\n * @param {Number} yr The year to retrieve the letter for\n * @return {String} The dominical letter.\n */\n getDominicalLetter() {\n return Time.getDominicalLetter(this.year);\n }\n\n /**\n * Finds the nthWeekDay relative to the current month (not day). The\n * returned value is a day relative the month that this month belongs to so\n * 1 would indicate the first of the month and 40 would indicate a day in\n * the following month.\n *\n * @param {Number} aDayOfWeek Day of the week see the day name constants\n * @param {Number} aPos Nth occurrence of a given week day values\n * of 1 and 0 both indicate the first weekday of that type. aPos may\n * be either positive or negative\n *\n * @return {Number} numeric value indicating a day relative\n * to the current month of this time object\n */\n nthWeekDay(aDayOfWeek, aPos) {\n let daysInMonth = Time.daysInMonth(this.month, this.year);\n let weekday;\n let pos = aPos;\n\n let start = 0;\n\n let otherDay = this.clone();\n\n if (pos >= 0) {\n otherDay.day = 1;\n\n // because 0 means no position has been given\n // 1 and 0 indicate the same day.\n if (pos != 0) {\n // remove the extra numeric value\n pos--;\n }\n\n // set current start offset to current day.\n start = otherDay.day;\n\n // find the current day of week\n let startDow = otherDay.dayOfWeek();\n\n // calculate the difference between current\n // day of the week and desired day of the week\n let offset = aDayOfWeek - startDow;\n\n\n // if the offset goes into the past\n // week we add 7 so it goes into the next\n // week. We only want to go forward in time here.\n if (offset < 0)\n // this is really important otherwise we would\n // end up with dates from in the past.\n offset += 7;\n\n // add offset to start so start is the same\n // day of the week as the desired day of week.\n start += offset;\n\n // because we are going to add (and multiply)\n // the numeric value of the day we subtract it\n // from the start position so not to add it twice.\n start -= aDayOfWeek;\n\n // set week day\n weekday = aDayOfWeek;\n } else {\n\n // then we set it to the last day in the current month\n otherDay.day = daysInMonth;\n\n // find the ends weekday\n let endDow = otherDay.dayOfWeek();\n\n pos++;\n\n weekday = (endDow - aDayOfWeek);\n\n if (weekday < 0) {\n weekday += 7;\n }\n\n weekday = daysInMonth - weekday;\n }\n\n weekday += pos * 7;\n\n return start + weekday;\n }\n\n /**\n * Checks if current time is the nth weekday, relative to the current\n * month. Will always return false when rule resolves outside of current\n * month.\n *\n * @param {weekDay} aDayOfWeek Day of week to check\n * @param {Number} aPos Relative position\n * @return {Boolean} True, if it is the nth weekday\n */\n isNthWeekDay(aDayOfWeek, aPos) {\n let dow = this.dayOfWeek();\n\n if (aPos === 0 && dow === aDayOfWeek) {\n return true;\n }\n\n // get pos\n let day = this.nthWeekDay(aDayOfWeek, aPos);\n\n if (day === this.day) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Calculates the ISO 8601 week number. The first week of a year is the\n * week that contains the first Thursday. The year can have 53 weeks, if\n * January 1st is a Friday.\n *\n * Note there are regions where the first week of the year is the one that\n * starts on January 1st, which may offset the week number. Also, if a\n * different week start is specified, this will also affect the week\n * number.\n *\n * @see Time.weekOneStarts\n * @param {weekDay} aWeekStart The weekday the week starts with\n * @return {Number} The ISO week number\n */\n weekNumber(aWeekStart) {\n let wnCacheKey = (this.year << 12) + (this.month << 8) + (this.day << 3) + aWeekStart;\n if (wnCacheKey in Time._wnCache) {\n return Time._wnCache[wnCacheKey];\n }\n // This function courtesty of Julian Bucknall, published under the MIT license\n // http://www.boyet.com/articles/publishedarticles/calculatingtheisoweeknumb.html\n // plus some fixes to be able to use different week starts.\n let week1;\n\n let dt = this.clone();\n dt.isDate = true;\n let isoyear = this.year;\n\n if (dt.month == 12 && dt.day > 25) {\n week1 = Time.weekOneStarts(isoyear + 1, aWeekStart);\n if (dt.compare(week1) < 0) {\n week1 = Time.weekOneStarts(isoyear, aWeekStart);\n } else {\n isoyear++;\n }\n } else {\n week1 = Time.weekOneStarts(isoyear, aWeekStart);\n if (dt.compare(week1) < 0) {\n week1 = Time.weekOneStarts(--isoyear, aWeekStart);\n }\n }\n\n let daysBetween = (dt.subtractDate(week1).toSeconds() / 86400);\n let answer = trunc(daysBetween / 7) + 1;\n Time._wnCache[wnCacheKey] = answer;\n return answer;\n }\n\n /**\n * Adds the duration to the current time. The instance is modified in\n * place.\n *\n * @param {Duration} aDuration The duration to add\n */\n addDuration(aDuration) {\n let mult = (aDuration.isNegative ? -1 : 1);\n\n // because of the duration optimizations it is much\n // more efficient to grab all the values up front\n // then set them directly (which will avoid a normalization call).\n // So we don't actually normalize until we need it.\n let second = this.second;\n let minute = this.minute;\n let hour = this.hour;\n let day = this.day;\n\n second += mult * aDuration.seconds;\n minute += mult * aDuration.minutes;\n hour += mult * aDuration.hours;\n day += mult * aDuration.days;\n day += mult * 7 * aDuration.weeks;\n\n this.second = second;\n this.minute = minute;\n this.hour = hour;\n this.day = day;\n\n this._cachedUnixTime = null;\n }\n\n /**\n * Subtract the date details (_excluding_ timezone). Useful for finding\n * the relative difference between two time objects excluding their\n * timezone differences.\n *\n * @param {Time} aDate The date to subtract\n * @return {Duration} The difference as a duration\n */\n subtractDate(aDate) {\n let unixTime = this.toUnixTime() + this.utcOffset();\n let other = aDate.toUnixTime() + aDate.utcOffset();\n return Duration.fromSeconds(unixTime - other);\n }\n\n /**\n * Subtract the date details, taking timezones into account.\n *\n * @param {Time} aDate The date to subtract\n * @return {Duration} The difference in duration\n */\n subtractDateTz(aDate) {\n let unixTime = this.toUnixTime();\n let other = aDate.toUnixTime();\n return Duration.fromSeconds(unixTime - other);\n }\n\n /**\n * Compares the ICAL.Time instance with another one, or a period.\n *\n * @param {Time|Period} aOther The instance to compare with\n * @return {Number} -1, 0 or 1 for less/equal/greater\n */\n compare(other) {\n if (other instanceof Period) {\n return -1 * other.compare(this);\n } else {\n let a = this.toUnixTime();\n let b = other.toUnixTime();\n\n if (a > b) return 1;\n if (b > a) return -1;\n return 0;\n }\n }\n\n /**\n * Compares only the date part of this instance with another one.\n *\n * @param {Time} other The instance to compare with\n * @param {Timezone} tz The timezone to compare in\n * @return {Number} -1, 0 or 1 for less/equal/greater\n */\n compareDateOnlyTz(other, tz) {\n let a = this.convertToZone(tz);\n let b = other.convertToZone(tz);\n let rc = 0;\n\n if ((rc = Time._cmp_attr(a, b, \"year\")) != 0) return rc;\n if ((rc = Time._cmp_attr(a, b, \"month\")) != 0) return rc;\n if ((rc = Time._cmp_attr(a, b, \"day\")) != 0) return rc;\n\n return rc;\n }\n\n /**\n * Convert the instance into another timezone. The returned ICAL.Time\n * instance is always a copy.\n *\n * @param {Timezone} zone The zone to convert to\n * @return {Time} The copy, converted to the zone\n */\n convertToZone(zone) {\n let copy = this.clone();\n let zone_equals = (this.zone.tzid == zone.tzid);\n\n if (!this.isDate && !zone_equals) {\n Timezone.convert_time(copy, this.zone, zone);\n }\n\n copy.zone = zone;\n return copy;\n }\n\n /**\n * Calculates the UTC offset of the current date/time in the timezone it is\n * in.\n *\n * @return {Number} UTC offset in seconds\n */\n utcOffset() {\n if (this.zone == Timezone.localTimezone ||\n this.zone == Timezone.utcTimezone) {\n return 0;\n } else {\n return this.zone.utcOffset(this);\n }\n }\n\n /**\n * Returns an RFC 5545 compliant ical representation of this object.\n *\n * @return {String} ical date/date-time\n */\n toICALString() {\n let string = this.toString();\n\n if (string.length > 10) {\n return design.icalendar.value['date-time'].toICAL(string);\n } else {\n return design.icalendar.value.date.toICAL(string);\n }\n }\n\n /**\n * The string representation of this date/time, in jCal form\n * (including : and - separators).\n * @return {String}\n */\n toString() {\n let result = this.year + '-' +\n pad2(this.month) + '-' +\n pad2(this.day);\n\n if (!this.isDate) {\n result += 'T' + pad2(this.hour) + ':' +\n pad2(this.minute) + ':' +\n pad2(this.second);\n\n if (this.zone === Timezone.utcTimezone) {\n result += 'Z';\n }\n }\n\n return result;\n }\n\n /**\n * Converts the current instance to a Javascript date\n * @return {Date}\n */\n toJSDate() {\n if (this.zone == Timezone.localTimezone) {\n if (this.isDate) {\n return new Date(this.year, this.month - 1, this.day);\n } else {\n return new Date(this.year, this.month - 1, this.day,\n this.hour, this.minute, this.second, 0);\n }\n } else {\n return new Date(this.toUnixTime() * 1000);\n }\n }\n\n _normalize() {\n if (this._time.isDate) {\n this._time.hour = 0;\n this._time.minute = 0;\n this._time.second = 0;\n }\n this.adjust(0, 0, 0, 0);\n\n return this;\n }\n\n /**\n * Adjust the date/time by the given offset\n *\n * @param {Number} aExtraDays The extra amount of days\n * @param {Number} aExtraHours The extra amount of hours\n * @param {Number} aExtraMinutes The extra amount of minutes\n * @param {Number} aExtraSeconds The extra amount of seconds\n * @param {Number=} aTime The time to adjust, defaults to the\n * current instance.\n */\n adjust(aExtraDays, aExtraHours, aExtraMinutes, aExtraSeconds, aTime) {\n\n let minutesOverflow, hoursOverflow,\n daysOverflow = 0, yearsOverflow = 0;\n\n let second, minute, hour, day;\n let daysInMonth;\n\n let time = aTime || this._time;\n\n if (!time.isDate) {\n second = time.second + aExtraSeconds;\n time.second = second % 60;\n minutesOverflow = trunc(second / 60);\n if (time.second < 0) {\n time.second += 60;\n minutesOverflow--;\n }\n\n minute = time.minute + aExtraMinutes + minutesOverflow;\n time.minute = minute % 60;\n hoursOverflow = trunc(minute / 60);\n if (time.minute < 0) {\n time.minute += 60;\n hoursOverflow--;\n }\n\n hour = time.hour + aExtraHours + hoursOverflow;\n\n time.hour = hour % 24;\n daysOverflow = trunc(hour / 24);\n if (time.hour < 0) {\n time.hour += 24;\n daysOverflow--;\n }\n }\n\n\n // Adjust month and year first, because we need to know what month the day\n // is in before adjusting it.\n if (time.month > 12) {\n yearsOverflow = trunc((time.month - 1) / 12);\n } else if (time.month < 1) {\n yearsOverflow = trunc(time.month / 12) - 1;\n }\n\n time.year += yearsOverflow;\n time.month -= 12 * yearsOverflow;\n\n // Now take care of the days (and adjust month if needed)\n day = time.day + aExtraDays + daysOverflow;\n\n if (day > 0) {\n for (;;) {\n daysInMonth = Time.daysInMonth(time.month, time.year);\n if (day <= daysInMonth) {\n break;\n }\n\n time.month++;\n if (time.month > 12) {\n time.year++;\n time.month = 1;\n }\n\n day -= daysInMonth;\n }\n } else {\n while (day <= 0) {\n if (time.month == 1) {\n time.year--;\n time.month = 12;\n } else {\n time.month--;\n }\n\n day += Time.daysInMonth(time.month, time.year);\n }\n }\n\n time.day = day;\n\n this._cachedUnixTime = null;\n return this;\n }\n\n /**\n * Sets up the current instance from unix time, the number of seconds since\n * January 1st, 1970.\n *\n * @param {Number} seconds The seconds to set up with\n */\n fromUnixTime(seconds) {\n this.zone = Timezone.utcTimezone;\n // We could use `fromJSDate` here, but this is about twice as fast.\n // We could also clone `epochTime` and use `adjust` for a more\n // ical.js-centric approach, but this is about 100 times as fast.\n let date = new Date(seconds * 1000);\n this.year = date.getUTCFullYear();\n this.month = date.getUTCMonth() + 1;\n this.day = date.getUTCDate();\n if (this._time.isDate) {\n this.hour = 0;\n this.minute = 0;\n this.second = 0;\n } else {\n this.hour = date.getUTCHours();\n this.minute = date.getUTCMinutes();\n this.second = date.getUTCSeconds();\n }\n\n this._cachedUnixTime = null;\n }\n\n /**\n * Converts the current instance to seconds since January 1st 1970.\n *\n * @return {Number} Seconds since 1970\n */\n toUnixTime() {\n if (this._cachedUnixTime !== null) {\n return this._cachedUnixTime;\n }\n let offset = this.utcOffset();\n\n // we use the offset trick to ensure\n // that we are getting the actual UTC time\n let ms = Date.UTC(\n this.year,\n this.month - 1,\n this.day,\n this.hour,\n this.minute,\n this.second - offset\n );\n\n // seconds\n this._cachedUnixTime = ms / 1000;\n return this._cachedUnixTime;\n }\n\n /**\n * Converts time to into Object which can be serialized then re-created\n * using the constructor.\n *\n * @example\n * // toJSON will automatically be called\n * var json = JSON.stringify(mytime);\n *\n * var deserialized = JSON.parse(json);\n *\n * var time = new ICAL.Time(deserialized);\n *\n * @return {Object}\n */\n toJSON() {\n let copy = [\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'isDate'\n ];\n\n let result = Object.create(null);\n\n let i = 0;\n let len = copy.length;\n let prop;\n\n for (; i < len; i++) {\n prop = copy[i];\n result[prop] = this[prop];\n }\n\n if (this.zone) {\n result.timezone = this.zone.tzid;\n }\n\n return result;\n }\n}\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\n/**\n * This lets typescript resolve our custom types in the\n * generated d.ts files (jsdoc typedefs are converted to typescript types).\n * Ignore prevents the typedefs from being documented more than once.\n *\n * @ignore\n * @typedef {import(\"./types.js\").parserState} parserState\n * Imports the 'parserState' type from the \"types.js\" module\n * @typedef {import(\"./types.js\").designSet} designSet\n * Imports the 'designSet' type from the \"types.js\" module\n */\n\nconst CHAR = /[^ \\t]/;\nconst VALUE_DELIMITER = ':';\nconst PARAM_DELIMITER = ';';\nconst PARAM_NAME_DELIMITER = '=';\nconst DEFAULT_VALUE_TYPE$1 = 'unknown';\nconst DEFAULT_PARAM_TYPE = 'text';\nconst RFC6868_REPLACE_MAP$1 = { \"^'\": '\"', \"^n\": \"\\n\", \"^^\": \"^\" };\n\n/**\n * Parses iCalendar or vCard data into a raw jCal object. Consult\n * documentation on the {@tutorial layers|layers of parsing} for more\n * details.\n *\n * @function ICAL.parse\n * @memberof ICAL\n * @variation function\n * @todo Fix the API to be more clear on the return type\n * @param {String} input The string data to parse\n * @return {Object|Object[]} A single jCal object, or an array thereof\n */\nfunction parse(input) {\n let state = {};\n let root = state.component = [];\n\n state.stack = [root];\n\n parse._eachLine(input, function(err, line) {\n parse._handleContentLine(line, state);\n });\n\n\n // when there are still items on the stack\n // throw a fatal error, a component was not closed\n // correctly in that case.\n if (state.stack.length > 1) {\n throw new ParserError(\n 'invalid ical body. component began but did not end'\n );\n }\n\n state = null;\n\n return (root.length == 1 ? root[0] : root);\n}\n\n/**\n * Parse an iCalendar property value into the jCal for a single property\n *\n * @function ICAL.parse.property\n * @param {String} str\n * The iCalendar property string to parse\n * @param {designSet=} designSet\n * The design data to use for this property\n * @return {Object}\n * The jCal Object containing the property\n */\nparse.property = function(str, designSet) {\n let state = {\n component: [[], []],\n designSet: designSet || design.defaultSet\n };\n parse._handleContentLine(str, state);\n return state.component[1][0];\n};\n\n/**\n * Convenience method to parse a component. You can use ICAL.parse() directly\n * instead.\n *\n * @function ICAL.parse.component\n * @see ICAL.parse(function)\n * @param {String} str The iCalendar component string to parse\n * @return {Object} The jCal Object containing the component\n */\nparse.component = function(str) {\n return parse(str);\n};\n\n\n/**\n * An error that occurred during parsing.\n *\n * @param {String} message The error message\n * @memberof ICAL.parse\n * @extends {Error}\n */\nclass ParserError extends Error {\n name = this.constructor.name;\n}\n\n// classes & constants\nparse.ParserError = ParserError;\n\n\n/**\n * Handles a single line of iCalendar/vCard, updating the state.\n *\n * @private\n * @function ICAL.parse._handleContentLine\n * @param {String} line The content line to process\n * @param {parserState} state The current state of the line parsing\n */\nparse._handleContentLine = function(line, state) {\n // break up the parts of the line\n let valuePos = line.indexOf(VALUE_DELIMITER);\n let paramPos = line.indexOf(PARAM_DELIMITER);\n\n let lastParamIndex;\n let lastValuePos;\n\n // name of property or begin/end\n let name;\n let value;\n // params is only overridden if paramPos !== -1.\n // we can't do params = params || {} later on\n // because it sacrifices ops.\n let params = {};\n\n /**\n * Different property cases\n *\n *\n * 1. RRULE:FREQ=foo\n * // FREQ= is not a param but the value\n *\n * 2. ATTENDEE;ROLE=REQ-PARTICIPANT;\n * // ROLE= is a param because : has not happened yet\n */\n // when the parameter delimiter is after the\n // value delimiter then it is not a parameter.\n\n if ((paramPos !== -1 && valuePos !== -1)) {\n // when the parameter delimiter is after the\n // value delimiter then it is not a parameter.\n if (paramPos > valuePos) {\n paramPos = -1;\n }\n }\n\n let parsedParams;\n if (paramPos !== -1) {\n name = line.slice(0, Math.max(0, paramPos)).toLowerCase();\n parsedParams = parse._parseParameters(line.slice(Math.max(0, paramPos)), 0, state.designSet);\n if (parsedParams[2] == -1) {\n throw new ParserError(\"Invalid parameters in '\" + line + \"'\");\n }\n params = parsedParams[0];\n // Handle parameter values with multiple entries\n let parsedParamLength;\n if (typeof parsedParams[1] === 'string') {\n parsedParamLength = parsedParams[1].length;\n } else {\n parsedParamLength = parsedParams[1].reduce((accumulator, currentValue) => {\n return accumulator + currentValue.length;\n }, 0);\n }\n lastParamIndex = parsedParamLength + parsedParams[2] + paramPos;\n if ((lastValuePos =\n line.slice(Math.max(0, lastParamIndex)).indexOf(VALUE_DELIMITER)) !== -1) {\n value = line.slice(Math.max(0, lastParamIndex + lastValuePos + 1));\n } else {\n throw new ParserError(\"Missing parameter value in '\" + line + \"'\");\n }\n } else if (valuePos !== -1) {\n // without parmeters (BEGIN:VCAENDAR, CLASS:PUBLIC)\n name = line.slice(0, Math.max(0, valuePos)).toLowerCase();\n value = line.slice(Math.max(0, valuePos + 1));\n\n if (name === 'begin') {\n let newComponent = [value.toLowerCase(), [], []];\n if (state.stack.length === 1) {\n state.component.push(newComponent);\n } else {\n state.component[2].push(newComponent);\n }\n state.stack.push(state.component);\n state.component = newComponent;\n if (!state.designSet) {\n state.designSet = design.getDesignSet(state.component[0]);\n }\n return;\n } else if (name === 'end') {\n state.component = state.stack.pop();\n return;\n }\n // If it is not begin/end, then this is a property with an empty value,\n // which should be considered valid.\n } else {\n /**\n * Invalid line.\n * The rational to throw an error is we will\n * never be certain that the rest of the file\n * is sane and it is unlikely that we can serialize\n * the result correctly either.\n */\n throw new ParserError(\n 'invalid line (no token \";\" or \":\") \"' + line + '\"'\n );\n }\n\n let valueType;\n let multiValue = false;\n let structuredValue = false;\n let propertyDetails;\n let splitName;\n let ungroupedName;\n\n // fetch the ungrouped part of the name\n if (state.designSet.propertyGroups && name.indexOf('.') !== -1) {\n splitName = name.split('.');\n params.group = splitName[0];\n ungroupedName = splitName[1];\n } else {\n ungroupedName = name;\n }\n\n if (ungroupedName in state.designSet.property) {\n propertyDetails = state.designSet.property[ungroupedName];\n\n if ('multiValue' in propertyDetails) {\n multiValue = propertyDetails.multiValue;\n }\n\n if ('structuredValue' in propertyDetails) {\n structuredValue = propertyDetails.structuredValue;\n }\n\n if (value && 'detectType' in propertyDetails) {\n valueType = propertyDetails.detectType(value);\n }\n }\n\n // attempt to determine value\n if (!valueType) {\n if (!('value' in params)) {\n if (propertyDetails) {\n valueType = propertyDetails.defaultType;\n } else {\n valueType = DEFAULT_VALUE_TYPE$1;\n }\n } else {\n // possible to avoid this?\n valueType = params.value.toLowerCase();\n }\n }\n\n delete params.value;\n\n /**\n * Note on `var result` juggling:\n *\n * I observed that building the array in pieces has adverse\n * effects on performance, so where possible we inline the creation.\n * It is a little ugly but resulted in ~2000 additional ops/sec.\n */\n\n let result;\n if (multiValue && structuredValue) {\n value = parse._parseMultiValue(value, structuredValue, valueType, [], multiValue, state.designSet, structuredValue);\n result = [ungroupedName, params, valueType, value];\n } else if (multiValue) {\n result = [ungroupedName, params, valueType];\n parse._parseMultiValue(value, multiValue, valueType, result, null, state.designSet, false);\n } else if (structuredValue) {\n value = parse._parseMultiValue(value, structuredValue, valueType, [], null, state.designSet, structuredValue);\n result = [ungroupedName, params, valueType, value];\n } else {\n value = parse._parseValue(value, valueType, state.designSet, false);\n result = [ungroupedName, params, valueType, value];\n }\n // rfc6350 requires that in vCard 4.0 the first component is the VERSION\n // component with as value 4.0, note that 3.0 does not have this requirement.\n if (state.component[0] === 'vcard' && state.component[1].length === 0 &&\n !(name === 'version' && value === '4.0')) {\n state.designSet = design.getDesignSet(\"vcard3\");\n }\n state.component[1].push(result);\n};\n\n/**\n * Parse a value from the raw value into the jCard/jCal value.\n *\n * @private\n * @function ICAL.parse._parseValue\n * @param {String} value Original value\n * @param {String} type Type of value\n * @param {Object} designSet The design data to use for this value\n * @return {Object} varies on type\n */\nparse._parseValue = function(value, type, designSet, structuredValue) {\n if (type in designSet.value && 'fromICAL' in designSet.value[type]) {\n return designSet.value[type].fromICAL(value, structuredValue);\n }\n return value;\n};\n\n/**\n * Parse parameters from a string to object.\n *\n * @function ICAL.parse._parseParameters\n * @private\n * @param {String} line A single unfolded line\n * @param {Number} start Position to start looking for properties\n * @param {Object} designSet The design data to use for this property\n * @return {Array} Array containing key/valye pairs of parsed parameters, the\n * parsed value, and the position of the last parameter found\n */\nparse._parseParameters = function(line, start, designSet) {\n let lastParam = start;\n let pos = 0;\n let delim = PARAM_NAME_DELIMITER;\n let result = {};\n let name, lcname;\n let value, valuePos = -1;\n let type, multiValue, mvdelim;\n\n // find the next '=' sign\n // use lastParam and pos to find name\n // check if \" is used if so get value from \"->\"\n // then increment pos to find next ;\n\n while ((pos !== false) &&\n (pos = line.indexOf(delim, pos + 1)) !== -1) {\n\n name = line.slice(lastParam + 1, pos);\n if (name.length == 0) {\n throw new ParserError(\"Empty parameter name in '\" + line + \"'\");\n }\n lcname = name.toLowerCase();\n mvdelim = false;\n multiValue = false;\n\n if (lcname in designSet.param && designSet.param[lcname].valueType) {\n type = designSet.param[lcname].valueType;\n } else {\n type = DEFAULT_PARAM_TYPE;\n }\n\n if (lcname in designSet.param) {\n multiValue = designSet.param[lcname].multiValue;\n if (designSet.param[lcname].multiValueSeparateDQuote) {\n mvdelim = parse._rfc6868Escape('\"' + multiValue + '\"');\n }\n }\n\n let nextChar = line[pos + 1];\n if (nextChar === '\"') {\n valuePos = pos + 2;\n pos = line.indexOf('\"', valuePos);\n if (multiValue && pos != -1) {\n let extendedValue = true;\n while (extendedValue) {\n if (line[pos + 1] == multiValue && line[pos + 2] == '\"') {\n pos = line.indexOf('\"', pos + 3);\n } else {\n extendedValue = false;\n }\n }\n }\n if (pos === -1) {\n throw new ParserError(\n 'invalid line (no matching double quote) \"' + line + '\"'\n );\n }\n value = line.slice(valuePos, pos);\n lastParam = line.indexOf(PARAM_DELIMITER, pos);\n let propValuePos = line.indexOf(VALUE_DELIMITER, pos);\n // if either no next parameter or delimeter in property value, let's stop here\n if (lastParam === -1 || (propValuePos !== -1 && lastParam > propValuePos)) {\n pos = false;\n }\n } else {\n valuePos = pos + 1;\n\n // move to next \";\"\n let nextPos = line.indexOf(PARAM_DELIMITER, valuePos);\n let propValuePos = line.indexOf(VALUE_DELIMITER, valuePos);\n if (propValuePos !== -1 && nextPos > propValuePos) {\n // this is a delimiter in the property value, let's stop here\n nextPos = propValuePos;\n pos = false;\n } else if (nextPos === -1) {\n // no \";\"\n if (propValuePos === -1) {\n nextPos = line.length;\n } else {\n nextPos = propValuePos;\n }\n pos = false;\n } else {\n lastParam = nextPos;\n pos = nextPos;\n }\n\n value = line.slice(valuePos, nextPos);\n }\n\n const length_before = value.length;\n value = parse._rfc6868Escape(value);\n valuePos += length_before - value.length;\n if (multiValue) {\n let delimiter = mvdelim || multiValue;\n value = parse._parseMultiValue(value, delimiter, type, [], null, designSet);\n } else {\n value = parse._parseValue(value, type, designSet);\n }\n\n if (multiValue && (lcname in result)) {\n if (Array.isArray(result[lcname])) {\n result[lcname].push(value);\n } else {\n result[lcname] = [\n result[lcname],\n value\n ];\n }\n } else {\n result[lcname] = value;\n }\n }\n return [result, value, valuePos];\n};\n\n/**\n * Internal helper for rfc6868. Exposing this on ICAL.parse so that\n * hackers can disable the rfc6868 parsing if the really need to.\n *\n * @function ICAL.parse._rfc6868Escape\n * @param {String} val The value to escape\n * @return {String} The escaped value\n */\nparse._rfc6868Escape = function(val) {\n return val.replace(/\\^['n^]/g, function(x) {\n return RFC6868_REPLACE_MAP$1[x];\n });\n};\n\n/**\n * Parse a multi value string. This function is used either for parsing\n * actual multi-value property's values, or for handling parameter values. It\n * can be used for both multi-value properties and structured value properties.\n *\n * @private\n * @function ICAL.parse._parseMultiValue\n * @param {String} buffer The buffer containing the full value\n * @param {String} delim The multi-value delimiter\n * @param {String} type The value type to be parsed\n * @param {Array.>} result The array to append results to, varies on value type\n * @param {String} innerMulti The inner delimiter to split each value with\n * @param {designSet} designSet The design data for this value\n * @return {?|Array.>} Either an array of results, or the first result\n */\nparse._parseMultiValue = function(buffer, delim, type, result, innerMulti, designSet, structuredValue) {\n let pos = 0;\n let lastPos = 0;\n let value;\n if (delim.length === 0) {\n return buffer;\n }\n\n // split each piece\n while ((pos = unescapedIndexOf(buffer, delim, lastPos)) !== -1) {\n value = buffer.slice(lastPos, pos);\n if (innerMulti) {\n value = parse._parseMultiValue(value, innerMulti, type, [], null, designSet, structuredValue);\n } else {\n value = parse._parseValue(value, type, designSet, structuredValue);\n }\n result.push(value);\n lastPos = pos + delim.length;\n }\n\n // on the last piece take the rest of string\n value = buffer.slice(lastPos);\n if (innerMulti) {\n value = parse._parseMultiValue(value, innerMulti, type, [], null, designSet, structuredValue);\n } else {\n value = parse._parseValue(value, type, designSet, structuredValue);\n }\n result.push(value);\n\n return result.length == 1 ? result[0] : result;\n};\n\n/**\n * Process a complete buffer of iCalendar/vCard data line by line, correctly\n * unfolding content. Each line will be processed with the given callback\n *\n * @private\n * @function ICAL.parse._eachLine\n * @param {String} buffer The buffer to process\n * @param {function(?String, String)} callback The callback for each line\n */\nparse._eachLine = function(buffer, callback) {\n let len = buffer.length;\n let lastPos = buffer.search(CHAR);\n let pos = lastPos;\n let line;\n let firstChar;\n\n let newlineOffset;\n\n do {\n pos = buffer.indexOf('\\n', lastPos) + 1;\n\n if (pos > 1 && buffer[pos - 2] === '\\r') {\n newlineOffset = 2;\n } else {\n newlineOffset = 1;\n }\n\n if (pos === 0) {\n pos = len;\n newlineOffset = 0;\n }\n\n firstChar = buffer[lastPos];\n\n if (firstChar === ' ' || firstChar === '\\t') {\n // add to line\n line += buffer.slice(lastPos + 1, pos - newlineOffset);\n } else {\n if (line)\n callback(null, line);\n // push line\n line = buffer.slice(lastPos, pos - newlineOffset);\n }\n\n lastPos = pos;\n } while (pos !== len);\n\n // extra ending line\n line = line.trim();\n\n if (line.length)\n callback(null, line);\n};\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\nconst OPTIONS = [\"tzid\", \"location\", \"tznames\", \"latitude\", \"longitude\"];\n\n/**\n * Timezone representation.\n *\n * @example\n * var vcalendar;\n * var timezoneComp = vcalendar.getFirstSubcomponent('vtimezone');\n * var tzid = timezoneComp.getFirstPropertyValue('tzid');\n *\n * var timezone = new ICAL.Timezone({\n * component: timezoneComp,\n * tzid\n * });\n *\n * @memberof ICAL\n */\nclass Timezone {\n static _compare_change_fn(a, b) {\n if (a.year < b.year) return -1;\n else if (a.year > b.year) return 1;\n\n if (a.month < b.month) return -1;\n else if (a.month > b.month) return 1;\n\n if (a.day < b.day) return -1;\n else if (a.day > b.day) return 1;\n\n if (a.hour < b.hour) return -1;\n else if (a.hour > b.hour) return 1;\n\n if (a.minute < b.minute) return -1;\n else if (a.minute > b.minute) return 1;\n\n if (a.second < b.second) return -1;\n else if (a.second > b.second) return 1;\n\n return 0;\n }\n\n /**\n * Convert the date/time from one zone to the next.\n *\n * @param {Time} tt The time to convert\n * @param {Timezone} from_zone The source zone to convert from\n * @param {Timezone} to_zone The target zone to convert to\n * @return {Time} The converted date/time object\n */\n static convert_time(tt, from_zone, to_zone) {\n if (tt.isDate ||\n from_zone.tzid == to_zone.tzid ||\n from_zone == Timezone.localTimezone ||\n to_zone == Timezone.localTimezone) {\n tt.zone = to_zone;\n return tt;\n }\n\n let utcOffset = from_zone.utcOffset(tt);\n tt.adjust(0, 0, 0, - utcOffset);\n\n utcOffset = to_zone.utcOffset(tt);\n tt.adjust(0, 0, 0, utcOffset);\n\n return null;\n }\n\n /**\n * Creates a new ICAL.Timezone instance from the passed data object.\n *\n * @param {Component|Object} aData options for class\n * @param {String|Component} aData.component\n * If aData is a simple object, then this member can be set to either a\n * string containing the component data, or an already parsed\n * ICAL.Component\n * @param {String} aData.tzid The timezone identifier\n * @param {String} aData.location The timezone locationw\n * @param {String} aData.tznames An alternative string representation of the\n * timezone\n * @param {Number} aData.latitude The latitude of the timezone\n * @param {Number} aData.longitude The longitude of the timezone\n */\n static fromData(aData) {\n let tt = new Timezone();\n return tt.fromData(aData);\n }\n\n /**\n * The instance describing the UTC timezone\n * @type {Timezone}\n * @constant\n * @instance\n */\n static #utcTimezone = null;\n static get utcTimezone() {\n if (!this.#utcTimezone) {\n this.#utcTimezone = Timezone.fromData({\n tzid: \"UTC\"\n });\n }\n return this.#utcTimezone;\n }\n\n /**\n * The instance describing the local timezone\n * @type {Timezone}\n * @constant\n * @instance\n */\n static #localTimezone = null;\n static get localTimezone() {\n if (!this.#localTimezone) {\n this.#localTimezone = Timezone.fromData({\n tzid: \"floating\"\n });\n }\n return this.#localTimezone;\n }\n\n /**\n * Adjust a timezone change object.\n * @private\n * @param {Object} change The timezone change object\n * @param {Number} days The extra amount of days\n * @param {Number} hours The extra amount of hours\n * @param {Number} minutes The extra amount of minutes\n * @param {Number} seconds The extra amount of seconds\n */\n static adjust_change(change, days, hours, minutes, seconds) {\n return Time.prototype.adjust.call(\n change,\n days,\n hours,\n minutes,\n seconds,\n change\n );\n }\n\n static _minimumExpansionYear = -1;\n static EXTRA_COVERAGE = 5;\n\n /**\n * Creates a new ICAL.Timezone instance, by passing in a tzid and component.\n *\n * @param {Component|Object} data options for class\n * @param {String|Component} data.component\n * If data is a simple object, then this member can be set to either a\n * string containing the component data, or an already parsed\n * ICAL.Component\n * @param {String} data.tzid The timezone identifier\n * @param {String} data.location The timezone locationw\n * @param {String} data.tznames An alternative string representation of the\n * timezone\n * @param {Number} data.latitude The latitude of the timezone\n * @param {Number} data.longitude The longitude of the timezone\n */\n constructor(data) {\n this.wrappedJSObject = this;\n this.fromData(data);\n }\n\n\n /**\n * Timezone identifier\n * @type {String}\n */\n tzid = \"\";\n\n /**\n * Timezone location\n * @type {String}\n */\n location = \"\";\n\n /**\n * Alternative timezone name, for the string representation\n * @type {String}\n */\n tznames = \"\";\n\n /**\n * The primary latitude for the timezone.\n * @type {Number}\n */\n latitude = 0.0;\n\n /**\n * The primary longitude for the timezone.\n * @type {Number}\n */\n longitude = 0.0;\n\n /**\n * The vtimezone component for this timezone.\n * @type {Component}\n */\n component = null;\n\n /**\n * The year this timezone has been expanded to. All timezone transition\n * dates until this year are known and can be used for calculation\n *\n * @private\n * @type {Number}\n */\n expandedUntilYear = 0;\n\n /**\n * The class identifier.\n * @constant\n * @type {String}\n * @default \"icaltimezone\"\n */\n icalclass = \"icaltimezone\";\n\n /**\n * Sets up the current instance using members from the passed data object.\n *\n * @param {Component|Object} aData options for class\n * @param {String|Component} aData.component\n * If aData is a simple object, then this member can be set to either a\n * string containing the component data, or an already parsed\n * ICAL.Component\n * @param {String} aData.tzid The timezone identifier\n * @param {String} aData.location The timezone locationw\n * @param {String} aData.tznames An alternative string representation of the\n * timezone\n * @param {Number} aData.latitude The latitude of the timezone\n * @param {Number} aData.longitude The longitude of the timezone\n */\n fromData(aData) {\n this.expandedUntilYear = 0;\n this.changes = [];\n\n if (aData instanceof Component) {\n // Either a component is passed directly\n this.component = aData;\n } else {\n // Otherwise the component may be in the data object\n if (aData && \"component\" in aData) {\n if (typeof aData.component == \"string\") {\n // If a string was passed, parse it as a component\n let jCal = parse(aData.component);\n this.component = new Component(jCal);\n } else if (aData.component instanceof Component) {\n // If it was a component already, then just set it\n this.component = aData.component;\n } else {\n // Otherwise just null out the component\n this.component = null;\n }\n }\n\n // Copy remaining passed properties\n for (let prop of OPTIONS) {\n if (aData && prop in aData) {\n this[prop] = aData[prop];\n }\n }\n }\n\n // If we have a component but no TZID, attempt to get it from the\n // component's properties.\n if (this.component instanceof Component && !this.tzid) {\n this.tzid = this.component.getFirstPropertyValue('tzid');\n }\n\n return this;\n }\n\n /**\n * Finds the utcOffset the given time would occur in this timezone.\n *\n * @param {Time} tt The time to check for\n * @return {Number} utc offset in seconds\n */\n utcOffset(tt) {\n if (this == Timezone.utcTimezone || this == Timezone.localTimezone) {\n return 0;\n }\n\n this._ensureCoverage(tt.year);\n\n if (!this.changes.length) {\n return 0;\n }\n\n let tt_change = {\n year: tt.year,\n month: tt.month,\n day: tt.day,\n hour: tt.hour,\n minute: tt.minute,\n second: tt.second\n };\n\n let change_num = this._findNearbyChange(tt_change);\n let change_num_to_use = -1;\n let step = 1;\n\n // TODO: replace with bin search?\n for (;;) {\n let change = clone(this.changes[change_num], true);\n if (change.utcOffset < change.prevUtcOffset) {\n Timezone.adjust_change(change, 0, 0, 0, change.utcOffset);\n } else {\n Timezone.adjust_change(change, 0, 0, 0,\n change.prevUtcOffset);\n }\n\n let cmp = Timezone._compare_change_fn(tt_change, change);\n\n if (cmp >= 0) {\n change_num_to_use = change_num;\n } else {\n step = -1;\n }\n\n if (step == -1 && change_num_to_use != -1) {\n break;\n }\n\n change_num += step;\n\n if (change_num < 0) {\n return 0;\n }\n\n if (change_num >= this.changes.length) {\n break;\n }\n }\n\n let zone_change = this.changes[change_num_to_use];\n let utcOffset_change = zone_change.utcOffset - zone_change.prevUtcOffset;\n\n if (utcOffset_change < 0 && change_num_to_use > 0) {\n let tmp_change = clone(zone_change, true);\n Timezone.adjust_change(tmp_change, 0, 0, 0, tmp_change.prevUtcOffset);\n\n if (Timezone._compare_change_fn(tt_change, tmp_change) < 0) {\n let prev_zone_change = this.changes[change_num_to_use - 1];\n\n let want_daylight = false; // TODO\n\n if (zone_change.is_daylight != want_daylight &&\n prev_zone_change.is_daylight == want_daylight) {\n zone_change = prev_zone_change;\n }\n }\n }\n\n // TODO return is_daylight?\n return zone_change.utcOffset;\n }\n\n _findNearbyChange(change) {\n // find the closest match\n let idx = binsearchInsert(\n this.changes,\n change,\n Timezone._compare_change_fn\n );\n\n if (idx >= this.changes.length) {\n return this.changes.length - 1;\n }\n\n return idx;\n }\n\n _ensureCoverage(aYear) {\n if (Timezone._minimumExpansionYear == -1) {\n let today = Time.now();\n Timezone._minimumExpansionYear = today.year;\n }\n\n let changesEndYear = aYear;\n if (changesEndYear < Timezone._minimumExpansionYear) {\n changesEndYear = Timezone._minimumExpansionYear;\n }\n\n changesEndYear += Timezone.EXTRA_COVERAGE;\n\n if (!this.changes.length || this.expandedUntilYear < aYear) {\n let subcomps = this.component.getAllSubcomponents();\n let compLen = subcomps.length;\n let compIdx = 0;\n\n for (; compIdx < compLen; compIdx++) {\n this._expandComponent(\n subcomps[compIdx], changesEndYear, this.changes\n );\n }\n\n this.changes.sort(Timezone._compare_change_fn);\n this.expandedUntilYear = changesEndYear;\n }\n }\n\n _expandComponent(aComponent, aYear, changes) {\n if (!aComponent.hasProperty(\"dtstart\") ||\n !aComponent.hasProperty(\"tzoffsetto\") ||\n !aComponent.hasProperty(\"tzoffsetfrom\")) {\n return null;\n }\n\n let dtstart = aComponent.getFirstProperty(\"dtstart\").getFirstValue();\n let change;\n\n function convert_tzoffset(offset) {\n return offset.factor * (offset.hours * 3600 + offset.minutes * 60);\n }\n\n function init_changes() {\n let changebase = {};\n changebase.is_daylight = (aComponent.name == \"daylight\");\n changebase.utcOffset = convert_tzoffset(\n aComponent.getFirstProperty(\"tzoffsetto\").getFirstValue()\n );\n\n changebase.prevUtcOffset = convert_tzoffset(\n aComponent.getFirstProperty(\"tzoffsetfrom\").getFirstValue()\n );\n\n return changebase;\n }\n\n if (!aComponent.hasProperty(\"rrule\") && !aComponent.hasProperty(\"rdate\")) {\n change = init_changes();\n change.year = dtstart.year;\n change.month = dtstart.month;\n change.day = dtstart.day;\n change.hour = dtstart.hour;\n change.minute = dtstart.minute;\n change.second = dtstart.second;\n\n Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset);\n changes.push(change);\n } else {\n let props = aComponent.getAllProperties(\"rdate\");\n for (let rdate of props) {\n let time = rdate.getFirstValue();\n change = init_changes();\n\n change.year = time.year;\n change.month = time.month;\n change.day = time.day;\n\n if (time.isDate) {\n change.hour = dtstart.hour;\n change.minute = dtstart.minute;\n change.second = dtstart.second;\n\n if (dtstart.zone != Timezone.utcTimezone) {\n Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset);\n }\n } else {\n change.hour = time.hour;\n change.minute = time.minute;\n change.second = time.second;\n\n if (time.zone != Timezone.utcTimezone) {\n Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset);\n }\n }\n\n changes.push(change);\n }\n\n let rrule = aComponent.getFirstProperty(\"rrule\");\n\n if (rrule) {\n rrule = rrule.getFirstValue();\n change = init_changes();\n\n if (rrule.until && rrule.until.zone == Timezone.utcTimezone) {\n rrule.until.adjust(0, 0, 0, change.prevUtcOffset);\n rrule.until.zone = Timezone.localTimezone;\n }\n\n let iterator = rrule.iterator(dtstart);\n\n let occ;\n while ((occ = iterator.next())) {\n change = init_changes();\n if (occ.year > aYear || !occ) {\n break;\n }\n\n change.year = occ.year;\n change.month = occ.month;\n change.day = occ.day;\n change.hour = occ.hour;\n change.minute = occ.minute;\n change.second = occ.second;\n change.isDate = occ.isDate;\n\n Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset);\n changes.push(change);\n }\n }\n }\n\n return changes;\n }\n\n /**\n * The string representation of this timezone.\n * @return {String}\n */\n toString() {\n return (this.tznames ? this.tznames : this.tzid);\n }\n}\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\nlet zones = null;\n\n/**\n * @classdesc\n * Singleton class to contain timezones. Right now it is all manual registry in\n * the future we may use this class to download timezone information or handle\n * loading pre-expanded timezones.\n *\n * @exports module:ICAL.TimezoneService\n * @memberof ICAL\n */\nconst TimezoneService = {\n get count() {\n if (zones === null) {\n return 0;\n }\n\n return Object.keys(zones).length;\n },\n\n reset: function() {\n zones = Object.create(null);\n let utc = Timezone.utcTimezone;\n\n zones.Z = utc;\n zones.UTC = utc;\n zones.GMT = utc;\n },\n _hard_reset: function() {\n zones = null;\n },\n\n /**\n * Checks if timezone id has been registered.\n *\n * @param {String} tzid Timezone identifier (e.g. America/Los_Angeles)\n * @return {Boolean} False, when not present\n */\n has: function(tzid) {\n if (zones === null) {\n return false;\n }\n\n return !!zones[tzid];\n },\n\n /**\n * Returns a timezone by its tzid if present.\n *\n * @param {String} tzid Timezone identifier (e.g. America/Los_Angeles)\n * @return {Timezone | undefined} The timezone, or undefined if not found\n */\n get: function(tzid) {\n if (zones === null) {\n this.reset();\n }\n\n return zones[tzid];\n },\n\n /**\n * Registers a timezone object or component.\n *\n * @param {Component|Timezone} timezone\n * The initialized zone or vtimezone.\n *\n * @param {String=} name\n * The name of the timezone. Defaults to the component's TZID if not\n * passed.\n */\n register: function(timezone, name) {\n if (zones === null) {\n this.reset();\n }\n\n // This avoids a breaking change by the change of argument order\n // TODO remove in v3\n if (typeof timezone === \"string\" && name instanceof Timezone) {\n [timezone, name] = [name, timezone];\n }\n\n if (!name) {\n if (timezone instanceof Timezone) {\n name = timezone.tzid;\n } else {\n if (timezone.name === 'vtimezone') {\n timezone = new Timezone(timezone);\n name = timezone.tzid;\n }\n }\n }\n\n if (!name) {\n throw new TypeError(\"Neither a timezone nor a name was passed\");\n }\n\n if (timezone instanceof Timezone) {\n zones[name] = timezone;\n } else {\n throw new TypeError('timezone must be ICAL.Timezone or ICAL.Component');\n }\n },\n\n /**\n * Removes a timezone by its tzid from the list.\n *\n * @param {String} tzid Timezone identifier (e.g. America/Los_Angeles)\n * @return {?Timezone} The removed timezone, or null if not registered\n */\n remove: function(tzid) {\n if (zones === null) {\n return null;\n }\n\n return (delete zones[tzid]);\n }\n};\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\n/**\n * Helper functions used in various places within ical.js\n * @module ICAL.helpers\n */\n\n/**\n * Compiles a list of all referenced TZIDs in all subcomponents and\n * removes any extra VTIMEZONE subcomponents. In addition, if any TZIDs\n * are referenced by a component, but a VTIMEZONE does not exist,\n * an attempt will be made to generate a VTIMEZONE using ICAL.TimezoneService.\n *\n * @param {Component} vcal The top-level VCALENDAR component.\n * @return {Component} The ICAL.Component that was passed in.\n */\nfunction updateTimezones(vcal) {\n let allsubs, properties, vtimezones, reqTzid, i;\n\n if (!vcal || vcal.name !== \"vcalendar\") {\n //not a top-level vcalendar component\n return vcal;\n }\n\n //Store vtimezone subcomponents in an object reference by tzid.\n //Store properties from everything else in another array\n allsubs = vcal.getAllSubcomponents();\n properties = [];\n vtimezones = {};\n for (i = 0; i < allsubs.length; i++) {\n if (allsubs[i].name === \"vtimezone\") {\n let tzid = allsubs[i].getFirstProperty(\"tzid\").getFirstValue();\n vtimezones[tzid] = allsubs[i];\n } else {\n properties = properties.concat(allsubs[i].getAllProperties());\n }\n }\n\n //create an object with one entry for each required tz\n reqTzid = {};\n for (i = 0; i < properties.length; i++) {\n let tzid = properties[i].getParameter(\"tzid\");\n if (tzid) {\n reqTzid[tzid] = true;\n }\n }\n\n //delete any vtimezones that are not on the reqTzid list.\n for (let [tzid, comp] of Object.entries(vtimezones)) {\n if (!reqTzid[tzid]) {\n vcal.removeSubcomponent(comp);\n }\n }\n\n //create any missing, but registered timezones\n for (let tzid of Object.keys(reqTzid)) {\n if (!vtimezones[tzid] && TimezoneService.has(tzid)) {\n vcal.addSubcomponent(TimezoneService.get(tzid).component);\n }\n }\n\n return vcal;\n}\n\n/**\n * Checks if the given type is of the number type and also NaN.\n *\n * @param {Number} number The number to check\n * @return {Boolean} True, if the number is strictly NaN\n */\nfunction isStrictlyNaN(number) {\n return typeof(number) === 'number' && isNaN(number);\n}\n\n/**\n * Parses a string value that is expected to be an integer, when the valid is\n * not an integer throws a decoration error.\n *\n * @param {String} string Raw string input\n * @return {Number} Parsed integer\n */\nfunction strictParseInt(string) {\n let result = parseInt(string, 10);\n\n if (isStrictlyNaN(result)) {\n throw new Error(\n 'Could not extract integer from \"' + string + '\"'\n );\n }\n\n return result;\n}\n\n/**\n * Creates or returns a class instance of a given type with the initialization\n * data if the data is not already an instance of the given type.\n *\n * @example\n * var time = new ICAL.Time(...);\n * var result = ICAL.helpers.formatClassType(time, ICAL.Time);\n *\n * (result instanceof ICAL.Time)\n * // => true\n *\n * result = ICAL.helpers.formatClassType({}, ICAL.Time);\n * (result isntanceof ICAL.Time)\n * // => true\n *\n *\n * @param {Object} data object initialization data\n * @param {Object} type object type (like ICAL.Time)\n * @return {?} An instance of the found type.\n */\nfunction formatClassType(data, type) {\n if (typeof(data) === 'undefined') {\n return undefined;\n }\n\n if (data instanceof type) {\n return data;\n }\n return new type(data);\n}\n\n/**\n * Identical to indexOf but will only match values when they are not preceded\n * by a backslash character.\n *\n * @param {String} buffer String to search\n * @param {String} search Value to look for\n * @param {Number} pos Start position\n * @return {Number} The position, or -1 if not found\n */\nfunction unescapedIndexOf(buffer, search, pos) {\n while ((pos = buffer.indexOf(search, pos)) !== -1) {\n if (pos > 0 && buffer[pos - 1] === '\\\\') {\n pos += 1;\n } else {\n return pos;\n }\n }\n return -1;\n}\n\n/**\n * Find the index for insertion using binary search.\n *\n * @param {Array} list The list to search\n * @param {?} seekVal The value to insert\n * @param {function(?,?)} cmpfunc The comparison func, that can\n * compare two seekVals\n * @return {Number} The insert position\n */\nfunction binsearchInsert(list, seekVal, cmpfunc) {\n if (!list.length)\n return 0;\n\n let low = 0, high = list.length - 1,\n mid, cmpval;\n\n while (low <= high) {\n mid = low + Math.floor((high - low) / 2);\n cmpval = cmpfunc(seekVal, list[mid]);\n\n if (cmpval < 0)\n high = mid - 1;\n else if (cmpval > 0)\n low = mid + 1;\n else\n break;\n }\n\n if (cmpval < 0)\n return mid; // insertion is displacing, so use mid outright.\n else if (cmpval > 0)\n return mid + 1;\n else\n return mid;\n}\n\n/**\n * Clone the passed object or primitive. By default a shallow clone will be\n * executed.\n *\n * @param {*} aSrc The thing to clone\n * @param {Boolean=} aDeep If true, a deep clone will be performed\n * @return {*} The copy of the thing\n */\nfunction clone(aSrc, aDeep) {\n if (!aSrc || typeof aSrc != \"object\") {\n return aSrc;\n } else if (aSrc instanceof Date) {\n return new Date(aSrc.getTime());\n } else if (\"clone\" in aSrc) {\n return aSrc.clone();\n } else if (Array.isArray(aSrc)) {\n let arr = [];\n for (let i = 0; i < aSrc.length; i++) {\n arr.push(aDeep ? clone(aSrc[i], true) : aSrc[i]);\n }\n return arr;\n } else {\n let obj = {};\n for (let [name, value] of Object.entries(aSrc)) {\n if (aDeep) {\n obj[name] = clone(value, true);\n } else {\n obj[name] = value;\n }\n }\n return obj;\n }\n}\n\n/**\n * Performs iCalendar line folding. A line ending character is inserted and\n * the next line begins with a whitespace.\n *\n * @example\n * SUMMARY:This line will be fold\n * ed right in the middle of a word.\n *\n * @param {String} aLine The line to fold\n * @return {String} The folded line\n */\nfunction foldline(aLine) {\n let result = \"\";\n let line = aLine || \"\", pos = 0, line_length = 0;\n //pos counts position in line for the UTF-16 presentation\n //line_length counts the bytes for the UTF-8 presentation\n while (line.length) {\n let cp = line.codePointAt(pos);\n if (cp < 128) ++line_length;\n else if (cp < 2048) line_length += 2;//needs 2 UTF-8 bytes\n else if (cp < 65536) line_length += 3;\n else line_length += 4; //cp is less than 1114112\n if (line_length < ICALmodule.foldLength + 1)\n pos += cp > 65535 ? 2 : 1;\n else {\n result += ICALmodule.newLineChar + \" \" + line.slice(0, Math.max(0, pos));\n line = line.slice(Math.max(0, pos));\n pos = line_length = 0;\n }\n }\n return result.slice(ICALmodule.newLineChar.length + 1);\n}\n\n/**\n * Pads the given string or number with zeros so it will have at least two\n * characters.\n *\n * @param {String|Number} data The string or number to pad\n * @return {String} The number padded as a string\n */\nfunction pad2(data) {\n if (typeof(data) !== 'string') {\n // handle fractions.\n if (typeof(data) === 'number') {\n data = parseInt(data);\n }\n data = String(data);\n }\n\n let len = data.length;\n\n switch (len) {\n case 0:\n return '00';\n case 1:\n return '0' + data;\n default:\n return data;\n }\n}\n\n/**\n * Truncates the given number, correctly handling negative numbers.\n *\n * @param {Number} number The number to truncate\n * @return {Number} The truncated number\n */\nfunction trunc(number) {\n return (number < 0 ? Math.ceil(number) : Math.floor(number));\n}\n\n/**\n * Poor-man's cross-browser object extension. Doesn't support all the\n * features, but enough for our usage. Note that the target's properties are\n * not overwritten with the source properties.\n *\n * @example\n * var child = ICAL.helpers.extend(parent, {\n * \"bar\": 123\n * });\n *\n * @param {Object} source The object to extend\n * @param {Object} target The object to extend with\n * @return {Object} Returns the target.\n */\nfunction extend(source, target) {\n for (let key in source) {\n let descr = Object.getOwnPropertyDescriptor(source, key);\n if (descr && !Object.getOwnPropertyDescriptor(target, key)) {\n Object.defineProperty(target, key, descr);\n }\n }\n return target;\n}\n\nvar helpers = /*#__PURE__*/Object.freeze({\n __proto__: null,\n binsearchInsert: binsearchInsert,\n clone: clone,\n extend: extend,\n foldline: foldline,\n formatClassType: formatClassType,\n isStrictlyNaN: isStrictlyNaN,\n pad2: pad2,\n strictParseInt: strictParseInt,\n trunc: trunc,\n unescapedIndexOf: unescapedIndexOf,\n updateTimezones: updateTimezones\n});\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\n/**\n * This class represents the \"utc-offset\" value type, with various calculation and manipulation\n * methods.\n *\n * @memberof ICAL\n */\nclass UtcOffset {\n /**\n * Creates a new {@link ICAL.UtcOffset} instance from the passed string.\n *\n * @param {String} aString The string to parse\n * @return {Duration} The created utc-offset instance\n */\n static fromString(aString) {\n // -05:00\n let options = {};\n //TODO: support seconds per rfc5545 ?\n options.factor = (aString[0] === '+') ? 1 : -1;\n options.hours = strictParseInt(aString.slice(1, 3));\n options.minutes = strictParseInt(aString.slice(4, 6));\n\n return new UtcOffset(options);\n }\n\n /**\n * Creates a new {@link ICAL.UtcOffset} instance from the passed seconds\n * value.\n *\n * @param {Number} aSeconds The number of seconds to convert\n */\n static fromSeconds(aSeconds) {\n let instance = new UtcOffset();\n instance.fromSeconds(aSeconds);\n return instance;\n }\n\n /**\n * Creates a new ICAL.UtcOffset instance.\n *\n * @param {Object} aData An object with members of the utc offset\n * @param {Number=} aData.hours The hours for the utc offset\n * @param {Number=} aData.minutes The minutes in the utc offset\n * @param {Number=} aData.factor The factor for the utc-offset, either -1 or 1\n */\n constructor(aData) {\n this.fromData(aData);\n }\n\n /**\n * The hours in the utc-offset\n * @type {Number}\n */\n hours = 0;\n\n /**\n * The minutes in the utc-offset\n * @type {Number}\n */\n minutes = 0;\n\n /**\n * The sign of the utc offset, 1 for positive offset, -1 for negative\n * offsets.\n * @type {Number}\n */\n factor = 1;\n\n /**\n * The type name, to be used in the jCal object.\n * @constant\n * @type {String}\n * @default \"utc-offset\"\n */\n icaltype = \"utc-offset\";\n\n /**\n * Returns a clone of the utc offset object.\n *\n * @return {UtcOffset} The cloned object\n */\n clone() {\n return UtcOffset.fromSeconds(this.toSeconds());\n }\n\n /**\n * Sets up the current instance using members from the passed data object.\n *\n * @param {Object} aData An object with members of the utc offset\n * @param {Number=} aData.hours The hours for the utc offset\n * @param {Number=} aData.minutes The minutes in the utc offset\n * @param {Number=} aData.factor The factor for the utc-offset, either -1 or 1\n */\n fromData(aData) {\n if (aData) {\n for (let [key, value] of Object.entries(aData)) {\n this[key] = value;\n }\n }\n this._normalize();\n }\n\n /**\n * Sets up the current instance from the given seconds value. The seconds\n * value is truncated to the minute. Offsets are wrapped when the world\n * ends, the hour after UTC+14:00 is UTC-12:00.\n *\n * @param {Number} aSeconds The seconds to convert into an offset\n */\n fromSeconds(aSeconds) {\n let secs = Math.abs(aSeconds);\n\n this.factor = aSeconds < 0 ? -1 : 1;\n this.hours = trunc(secs / 3600);\n\n secs -= (this.hours * 3600);\n this.minutes = trunc(secs / 60);\n return this;\n }\n\n /**\n * Convert the current offset to a value in seconds\n *\n * @return {Number} The offset in seconds\n */\n toSeconds() {\n return this.factor * (60 * this.minutes + 3600 * this.hours);\n }\n\n /**\n * Compare this utc offset with another one.\n *\n * @param {UtcOffset} other The other offset to compare with\n * @return {Number} -1, 0 or 1 for less/equal/greater\n */\n compare(other) {\n let a = this.toSeconds();\n let b = other.toSeconds();\n return (a > b) - (b > a);\n }\n\n _normalize() {\n // Range: 97200 seconds (with 1 hour inbetween)\n let secs = this.toSeconds();\n let factor = this.factor;\n while (secs < -43200) { // = UTC-12:00\n secs += 97200;\n }\n while (secs > 50400) { // = UTC+14:00\n secs -= 97200;\n }\n\n this.fromSeconds(secs);\n\n // Avoid changing the factor when on zero seconds\n if (secs == 0) {\n this.factor = factor;\n }\n }\n\n /**\n * The iCalendar string representation of this utc-offset.\n * @return {String}\n */\n toICALString() {\n return design.icalendar.value['utc-offset'].toICAL(this.toString());\n }\n\n /**\n * The string representation of this utc-offset.\n * @return {String}\n */\n toString() {\n return (this.factor == 1 ? \"+\" : \"-\") + pad2(this.hours) + ':' + pad2(this.minutes);\n }\n}\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\n/**\n * Describes a vCard time, which has slight differences to the ICAL.Time.\n * Properties can be null if not specified, for example for dates with\n * reduced accuracy or truncation.\n *\n * Note that currently not all methods are correctly re-implemented for\n * VCardTime. For example, comparison will have undefined results when some\n * members are null.\n *\n * Also, normalization is not yet implemented for this class!\n *\n * @memberof ICAL\n * @extends {Time}\n */\nclass VCardTime extends Time {\n /**\n * Returns a new ICAL.VCardTime instance from a date and/or time string.\n *\n * @param {String} aValue The string to create from\n * @param {String} aIcalType The type for this instance, e.g. date-and-or-time\n * @return {VCardTime} The date/time instance\n */\n static fromDateAndOrTimeString(aValue, aIcalType) {\n function part(v, s, e) {\n return v ? strictParseInt(v.slice(s, s + e)) : null;\n }\n let parts = aValue.split('T');\n let dt = parts[0], tmz = parts[1];\n let splitzone = tmz ? design.vcard.value.time._splitZone(tmz) : [];\n let zone = splitzone[0], tm = splitzone[1];\n\n let dtlen = dt ? dt.length : 0;\n let tmlen = tm ? tm.length : 0;\n\n let hasDashDate = dt && dt[0] == '-' && dt[1] == '-';\n let hasDashTime = tm && tm[0] == '-';\n\n let o = {\n year: hasDashDate ? null : part(dt, 0, 4),\n month: hasDashDate && (dtlen == 4 || dtlen == 7) ? part(dt, 2, 2) : dtlen == 7 ? part(dt, 5, 2) : dtlen == 10 ? part(dt, 5, 2) : null,\n day: dtlen == 5 ? part(dt, 3, 2) : dtlen == 7 && hasDashDate ? part(dt, 5, 2) : dtlen == 10 ? part(dt, 8, 2) : null,\n\n hour: hasDashTime ? null : part(tm, 0, 2),\n minute: hasDashTime && tmlen == 3 ? part(tm, 1, 2) : tmlen > 4 ? hasDashTime ? part(tm, 1, 2) : part(tm, 3, 2) : null,\n second: tmlen == 4 ? part(tm, 2, 2) : tmlen == 6 ? part(tm, 4, 2) : tmlen == 8 ? part(tm, 6, 2) : null\n };\n\n if (zone == 'Z') {\n zone = Timezone.utcTimezone;\n } else if (zone && zone[3] == ':') {\n zone = UtcOffset.fromString(zone);\n } else {\n zone = null;\n }\n\n return new VCardTime(o, zone, aIcalType);\n }\n\n\n /**\n * Creates a new ICAL.VCardTime instance.\n *\n * @param {Object} data The data for the time instance\n * @param {Number=} data.year The year for this date\n * @param {Number=} data.month The month for this date\n * @param {Number=} data.day The day for this date\n * @param {Number=} data.hour The hour for this date\n * @param {Number=} data.minute The minute for this date\n * @param {Number=} data.second The second for this date\n * @param {Timezone|UtcOffset} zone The timezone to use\n * @param {String} icaltype The type for this date/time object\n */\n constructor(data, zone, icaltype) {\n super(data, zone);\n this.icaltype = icaltype || \"date-and-or-time\";\n }\n\n /**\n * The class identifier.\n * @constant\n * @type {String}\n * @default \"vcardtime\"\n */\n icalclass = \"vcardtime\";\n\n /**\n * The type name, to be used in the jCal object.\n * @type {String}\n * @default \"date-and-or-time\"\n */\n icaltype = \"date-and-or-time\";\n\n /**\n * Returns a clone of the vcard date/time object.\n *\n * @return {VCardTime} The cloned object\n */\n clone() {\n return new VCardTime(this._time, this.zone, this.icaltype);\n }\n\n _normalize() {\n return this;\n }\n\n /**\n * @inheritdoc\n */\n utcOffset() {\n if (this.zone instanceof UtcOffset) {\n return this.zone.toSeconds();\n } else {\n return Time.prototype.utcOffset.apply(this, arguments);\n }\n }\n\n /**\n * Returns an RFC 6350 compliant representation of this object.\n *\n * @return {String} vcard date/time string\n */\n toICALString() {\n return design.vcard.value[this.icaltype].toICAL(this.toString());\n }\n\n /**\n * The string representation of this date/time, in jCard form\n * (including : and - separators).\n * @return {String}\n */\n toString() {\n let y = this.year, m = this.month, d = this.day;\n let h = this.hour, mm = this.minute, s = this.second;\n\n let hasYear = y !== null, hasMonth = m !== null, hasDay = d !== null;\n let hasHour = h !== null, hasMinute = mm !== null, hasSecond = s !== null;\n\n let datepart = (hasYear ? pad2(y) + (hasMonth || hasDay ? '-' : '') : (hasMonth || hasDay ? '--' : '')) +\n (hasMonth ? pad2(m) : '') +\n (hasDay ? '-' + pad2(d) : '');\n let timepart = (hasHour ? pad2(h) : '-') + (hasHour && hasMinute ? ':' : '') +\n (hasMinute ? pad2(mm) : '') + (!hasHour && !hasMinute ? '-' : '') +\n (hasMinute && hasSecond ? ':' : '') +\n (hasSecond ? pad2(s) : '');\n\n let zone;\n if (this.zone === Timezone.utcTimezone) {\n zone = 'Z';\n } else if (this.zone instanceof UtcOffset) {\n zone = this.zone.toString();\n } else if (this.zone === Timezone.localTimezone) {\n zone = '';\n } else if (this.zone instanceof Timezone) {\n let offset = UtcOffset.fromSeconds(this.zone.utcOffset(this));\n zone = offset.toString();\n } else {\n zone = '';\n }\n\n switch (this.icaltype) {\n case \"time\":\n return timepart + zone;\n case \"date-and-or-time\":\n case \"date-time\":\n return datepart + (timepart == '--' ? '' : 'T' + timepart + zone);\n case \"date\":\n return datepart;\n }\n return null;\n }\n}\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\n/**\n * This lets typescript resolve our custom types in the\n * generated d.ts files (jsdoc typedefs are converted to typescript types).\n * Ignore prevents the typedefs from being documented more than once.\n *\n * @ignore\n * @typedef {import(\"./types.js\").weekDay} weekDay\n * Imports the 'weekDay' type from the \"types.js\" module\n */\n\n/**\n * An iterator for a single recurrence rule. This class usually doesn't have to be instanciated\n * directly, the convenience method {@link ICAL.Recur#iterator} can be used.\n *\n * @memberof ICAL\n */\nclass RecurIterator {\n static _indexMap = {\n \"BYSECOND\": 0,\n \"BYMINUTE\": 1,\n \"BYHOUR\": 2,\n \"BYDAY\": 3,\n \"BYMONTHDAY\": 4,\n \"BYYEARDAY\": 5,\n \"BYWEEKNO\": 6,\n \"BYMONTH\": 7,\n \"BYSETPOS\": 8\n };\n\n static _expandMap = {\n \"SECONDLY\": [1, 1, 1, 1, 1, 1, 1, 1],\n \"MINUTELY\": [2, 1, 1, 1, 1, 1, 1, 1],\n \"HOURLY\": [2, 2, 1, 1, 1, 1, 1, 1],\n \"DAILY\": [2, 2, 2, 1, 1, 1, 1, 1],\n \"WEEKLY\": [2, 2, 2, 2, 3, 3, 1, 1],\n \"MONTHLY\": [2, 2, 2, 2, 2, 3, 3, 1],\n \"YEARLY\": [2, 2, 2, 2, 2, 2, 2, 2]\n };\n\n static UNKNOWN = 0;\n static CONTRACT = 1;\n static EXPAND = 2;\n static ILLEGAL = 3;\n\n /**\n * Creates a new ICAL.RecurIterator instance. The options object may contain additional members\n * when resuming iteration from a previous run.\n *\n * @param {Object} options The iterator options\n * @param {Recur} options.rule The rule to iterate.\n * @param {Time} options.dtstart The start date of the event.\n * @param {Boolean=} options.initialized When true, assume that options are\n * from a previously constructed iterator. Initialization will not be\n * repeated.\n */\n constructor(options) {\n this.fromData(options);\n }\n\n /**\n * True when iteration is finished.\n * @type {Boolean}\n */\n completed = false;\n\n /**\n * The rule that is being iterated\n * @type {Recur}\n */\n rule = null;\n\n /**\n * The start date of the event being iterated.\n * @type {Time}\n */\n dtstart = null;\n\n /**\n * The last occurrence that was returned from the\n * {@link RecurIterator#next} method.\n * @type {Time}\n */\n last = null;\n\n /**\n * The sequence number from the occurrence\n * @type {Number}\n */\n occurrence_number = 0;\n\n /**\n * The indices used for the {@link ICAL.RecurIterator#by_data} object.\n * @type {Object}\n * @private\n */\n by_indices = null;\n\n /**\n * If true, the iterator has already been initialized\n * @type {Boolean}\n * @private\n */\n initialized = false;\n\n /**\n * The initializd by-data.\n * @type {Object}\n * @private\n */\n by_data = null;\n\n /**\n * The expanded yeardays\n * @type {Array}\n * @private\n */\n days = null;\n\n /**\n * The index in the {@link ICAL.RecurIterator#days} array.\n * @type {Number}\n * @private\n */\n days_index = 0;\n\n /**\n * Initialize the recurrence iterator from the passed data object. This\n * method is usually not called directly, you can initialize the iterator\n * through the constructor.\n *\n * @param {Object} options The iterator options\n * @param {Recur} options.rule The rule to iterate.\n * @param {Time} options.dtstart The start date of the event.\n * @param {Boolean=} options.initialized When true, assume that options are\n * from a previously constructed iterator. Initialization will not be\n * repeated.\n */\n fromData(options) {\n this.rule = formatClassType(options.rule, Recur);\n\n if (!this.rule) {\n throw new Error('iterator requires a (ICAL.Recur) rule');\n }\n\n this.dtstart = formatClassType(options.dtstart, Time);\n\n if (!this.dtstart) {\n throw new Error('iterator requires a (ICAL.Time) dtstart');\n }\n\n if (options.by_data) {\n this.by_data = options.by_data;\n } else {\n this.by_data = clone(this.rule.parts, true);\n }\n\n if (options.occurrence_number)\n this.occurrence_number = options.occurrence_number;\n\n this.days = options.days || [];\n if (options.last) {\n this.last = formatClassType(options.last, Time);\n }\n\n this.by_indices = options.by_indices;\n\n if (!this.by_indices) {\n this.by_indices = {\n \"BYSECOND\": 0,\n \"BYMINUTE\": 0,\n \"BYHOUR\": 0,\n \"BYDAY\": 0,\n \"BYMONTH\": 0,\n \"BYWEEKNO\": 0,\n \"BYMONTHDAY\": 0\n };\n }\n\n this.initialized = options.initialized || false;\n\n if (!this.initialized) {\n try {\n this.init();\n } catch (e) {\n if (e instanceof InvalidRecurrenceRuleError) {\n // Init may error if there are no possible recurrence instances from\n // the rule, but we don't want to bubble this error up. Instead, we\n // create an empty iterator.\n this.completed = true;\n } else {\n // Propagate other errors to consumers.\n throw e;\n }\n }\n }\n }\n\n /**\n * Initialize the iterator\n * @private\n */\n init() {\n this.initialized = true;\n this.last = this.dtstart.clone();\n let parts = this.by_data;\n\n if (\"BYDAY\" in parts) {\n // libical does this earlier when the rule is loaded, but we postpone to\n // now so we can preserve the original order.\n this.sort_byday_rules(parts.BYDAY);\n }\n\n // The BYYEARDAY may only appear with BYDAY\n if (\"BYYEARDAY\" in parts) {\n if (\"BYMONTH\" in parts || \"BYWEEKNO\" in parts ||\n \"BYMONTHDAY\" in parts) {\n throw new Error(\"Invalid BYYEARDAY rule\");\n }\n }\n\n // BYWEEKNO and BYMONTHDAY rule parts may not both appear\n if (\"BYWEEKNO\" in parts && \"BYMONTHDAY\" in parts) {\n throw new Error(\"BYWEEKNO does not fit to BYMONTHDAY\");\n }\n\n // For MONTHLY recurrences (FREQ=MONTHLY) neither BYYEARDAY nor\n // BYWEEKNO may appear.\n if (this.rule.freq == \"MONTHLY\" &&\n (\"BYYEARDAY\" in parts || \"BYWEEKNO\" in parts)) {\n throw new Error(\"For MONTHLY recurrences neither BYYEARDAY nor BYWEEKNO may appear\");\n }\n\n // For WEEKLY recurrences (FREQ=WEEKLY) neither BYMONTHDAY nor\n // BYYEARDAY may appear.\n if (this.rule.freq == \"WEEKLY\" &&\n (\"BYYEARDAY\" in parts || \"BYMONTHDAY\" in parts)) {\n throw new Error(\"For WEEKLY recurrences neither BYMONTHDAY nor BYYEARDAY may appear\");\n }\n\n // BYYEARDAY may only appear in YEARLY rules\n if (this.rule.freq != \"YEARLY\" && \"BYYEARDAY\" in parts) {\n throw new Error(\"BYYEARDAY may only appear in YEARLY rules\");\n }\n\n this.last.second = this.setup_defaults(\"BYSECOND\", \"SECONDLY\", this.dtstart.second);\n this.last.minute = this.setup_defaults(\"BYMINUTE\", \"MINUTELY\", this.dtstart.minute);\n this.last.hour = this.setup_defaults(\"BYHOUR\", \"HOURLY\", this.dtstart.hour);\n this.last.day = this.setup_defaults(\"BYMONTHDAY\", \"DAILY\", this.dtstart.day);\n this.last.month = this.setup_defaults(\"BYMONTH\", \"MONTHLY\", this.dtstart.month);\n\n if (this.rule.freq == \"WEEKLY\") {\n if (\"BYDAY\" in parts) {\n let [, dow] = this.ruleDayOfWeek(parts.BYDAY[0], this.rule.wkst);\n let wkdy = dow - this.last.dayOfWeek(this.rule.wkst);\n if ((this.last.dayOfWeek(this.rule.wkst) < dow && wkdy >= 0) || wkdy < 0) {\n // Initial time is after first day of BYDAY data\n this.last.day += wkdy;\n }\n } else {\n let dayName = Recur.numericDayToIcalDay(this.dtstart.dayOfWeek());\n parts.BYDAY = [dayName];\n }\n }\n\n if (this.rule.freq == \"YEARLY\") {\n // Some yearly recurrence rules may be specific enough to not actually\n // occur on a yearly basis, e.g. the 29th day of February or the fifth\n // Monday of a given month. The standard isn't clear on the intended\n // behavior in these cases, but `libical` at least will iterate until it\n // finds a matching year.\n // CAREFUL: Some rules may specify an occurrence that can never happen,\n // e.g. the first Monday of April so long as it falls on the 15th\n // through the 21st. Detecting these is non-trivial, so ensure that we\n // stop iterating at some point.\n const untilYear = this.rule.until ? this.rule.until.year : 20000;\n while (this.last.year <= untilYear) {\n this.expand_year_days(this.last.year);\n if (this.days.length > 0) {\n break;\n }\n this.increment_year(this.rule.interval);\n }\n\n if (this.days.length == 0) {\n throw new InvalidRecurrenceRuleError();\n }\n\n // If there's no occurrence in this year, try the following years. This\n // would only happen looking for day 366 or -366.\n if (!this._nextByYearDay() && !this.next_year() && !this.next_year() && !this.next_year()) {\n // This should not be possible, but just in case it is, stop.\n throw new InvalidRecurrenceRuleError();\n }\n }\n\n if (this.rule.freq == \"MONTHLY\") {\n if (this.has_by_data(\"BYDAY\")) {\n let tempLast = null;\n let initLast = this.last.clone();\n let daysInMonth = Time.daysInMonth(this.last.month, this.last.year);\n\n // Check every weekday in BYDAY with relative dow and pos.\n for (let bydow of this.by_data.BYDAY) {\n this.last = initLast.clone();\n let [pos, dow] = this.ruleDayOfWeek(bydow);\n let dayOfMonth = this.last.nthWeekDay(dow, pos);\n\n // If |pos| >= 6, the byday is invalid for a monthly rule.\n if (pos >= 6 || pos <= -6) {\n throw new Error(\"Malformed values in BYDAY part\");\n }\n\n // If a Byday with pos=+/-5 is not in the current month it\n // must be searched in the next months.\n if (dayOfMonth > daysInMonth || dayOfMonth <= 0) {\n // Skip if we have already found a \"last\" in this month.\n if (tempLast && tempLast.month == initLast.month) {\n continue;\n }\n while (dayOfMonth > daysInMonth || dayOfMonth <= 0) {\n this.increment_month();\n daysInMonth = Time.daysInMonth(this.last.month, this.last.year);\n dayOfMonth = this.last.nthWeekDay(dow, pos);\n }\n }\n\n this.last.day = dayOfMonth;\n if (!tempLast || this.last.compare(tempLast) < 0) {\n tempLast = this.last.clone();\n }\n }\n this.last = tempLast.clone();\n\n //XXX: This feels like a hack, but we need to initialize\n // the BYMONTHDAY case correctly and byDayAndMonthDay handles\n // this case. It accepts a special flag which will avoid incrementing\n // the initial value without the flag days that match the start time\n // would be missed.\n if (this.has_by_data('BYMONTHDAY')) {\n this._byDayAndMonthDay(true);\n }\n\n if (this.last.day > daysInMonth || this.last.day == 0) {\n throw new Error(\"Malformed values in BYDAY part\");\n }\n } else if (this.has_by_data(\"BYMONTHDAY\")) {\n // Change the day value so that normalisation won't change the month.\n this.last.day = 1;\n\n // Get a sorted list of days in the starting month that match the rule.\n let normalized = this.normalizeByMonthDayRules(\n this.last.year,\n this.last.month,\n this.rule.parts.BYMONTHDAY\n ).filter(d => d >= this.last.day);\n\n if (normalized.length) {\n // There's at least one valid day, use it.\n this.last.day = normalized[0];\n this.by_data.BYMONTHDAY = normalized;\n } else {\n // There's no occurrence in this month, find the next valid month.\n // The longest possible sequence of skipped months is February-April-June,\n // so we might need to call next_month up to three times.\n if (!this.next_month() && !this.next_month() && !this.next_month()) {\n throw new InvalidRecurrenceRuleError();\n }\n }\n }\n }\n }\n\n /**\n * Retrieve the next occurrence from the iterator.\n * @return {Time}\n */\n next(again = false) {\n let before = (this.last ? this.last.clone() : null);\n\n if ((this.rule.count && this.occurrence_number >= this.rule.count) ||\n (this.rule.until && this.last.compare(this.rule.until) > 0)) {\n this.completed = true;\n }\n\n if (this.completed) {\n return null;\n }\n\n if (this.occurrence_number == 0 && this.last.compare(this.dtstart) >= 0) {\n // First of all, give the instance that was initialized\n this.occurrence_number++;\n return this.last;\n }\n\n let valid;\n let invalid_count = 0;\n do {\n valid = 1;\n\n switch (this.rule.freq) {\n case \"SECONDLY\":\n this.next_second();\n break;\n case \"MINUTELY\":\n this.next_minute();\n break;\n case \"HOURLY\":\n this.next_hour();\n break;\n case \"DAILY\":\n this.next_day();\n break;\n case \"WEEKLY\":\n this.next_week();\n break;\n case \"MONTHLY\":\n valid = this.next_month();\n if (valid) {\n invalid_count = 0;\n } else if (++invalid_count == 336) {\n // We've been through all 91 month variations and not found a recurrence. Stop.\n // (12 months and 29-day February × 7 starting days.)\n this.completed = true;\n return null;\n }\n break;\n case \"YEARLY\":\n valid = this.next_year();\n if (valid) {\n invalid_count = 0;\n } else if (++invalid_count == 28) {\n // We've been through all 14 year variations and not found a recurrence. Stop.\n // (365-day and 366-day years × 7 starting days.)\n this.completed = true;\n return null;\n }\n break;\n\n default:\n return null;\n }\n } while (!this.check_contracting_rules() ||\n this.last.compare(this.dtstart) < 0 ||\n !valid);\n\n if (this.last.compare(before) == 0) {\n if (again) {\n throw new Error(\"Same occurrence found twice, protecting you from death by recursion\");\n }\n this.next(true);\n }\n\n if (this.rule.until && this.last.compare(this.rule.until) > 0) {\n this.completed = true;\n return null;\n } else {\n this.occurrence_number++;\n return this.last;\n }\n }\n\n next_second() {\n return this.next_generic(\"BYSECOND\", \"SECONDLY\", \"second\", \"minute\");\n }\n\n increment_second(inc) {\n return this.increment_generic(inc, \"second\", 60, \"minute\");\n }\n\n next_minute() {\n return this.next_generic(\"BYMINUTE\", \"MINUTELY\",\n \"minute\", \"hour\", \"next_second\");\n }\n\n increment_minute(inc) {\n return this.increment_generic(inc, \"minute\", 60, \"hour\");\n }\n\n next_hour() {\n return this.next_generic(\"BYHOUR\", \"HOURLY\", \"hour\",\n \"monthday\", \"next_minute\");\n }\n\n increment_hour(inc) {\n this.increment_generic(inc, \"hour\", 24, \"monthday\");\n }\n\n next_day() {\n let this_freq = (this.rule.freq == \"DAILY\");\n\n if (this.next_hour() == 0) {\n return 0;\n }\n\n if (this_freq) {\n this.increment_monthday(this.rule.interval);\n } else {\n this.increment_monthday(1);\n }\n\n return 0;\n }\n\n next_week() {\n let end_of_data = 0;\n\n if (this.next_weekday_by_week() == 0) {\n return end_of_data;\n }\n\n if (this.has_by_data(\"BYWEEKNO\")) {\n this.by_indices.BYWEEKNO++;\n\n if (this.by_indices.BYWEEKNO == this.by_data.BYWEEKNO.length) {\n this.by_indices.BYWEEKNO = 0;\n end_of_data = 1;\n }\n\n // HACK should be first month of the year\n this.last.month = 1;\n this.last.day = 1;\n\n let week_no = this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];\n\n this.last.day += 7 * week_no;\n\n if (end_of_data) {\n this.increment_year(1);\n }\n } else {\n // Jump to the next week\n this.increment_monthday(7 * this.rule.interval);\n }\n\n return end_of_data;\n }\n\n /**\n * Normalize each by day rule for a given year/month.\n * Takes into account ordering and negative rules\n *\n * @private\n * @param {Number} year Current year.\n * @param {Number} month Current month.\n * @param {Array} rules Array of rules.\n *\n * @return {Array} sorted and normalized rules.\n * Negative rules will be expanded to their\n * correct positive values for easier processing.\n */\n normalizeByMonthDayRules(year, month, rules) {\n let daysInMonth = Time.daysInMonth(month, year);\n\n // XXX: This is probably bad for performance to allocate\n // a new array for each month we scan, if possible\n // we should try to optimize this...\n let newRules = [];\n\n let ruleIdx = 0;\n let len = rules.length;\n let rule;\n\n for (; ruleIdx < len; ruleIdx++) {\n rule = parseInt(rules[ruleIdx], 10);\n if (isNaN(rule)) {\n throw new Error('Invalid BYMONTHDAY value');\n }\n\n // if this rule falls outside of given\n // month discard it.\n if (Math.abs(rule) > daysInMonth) {\n continue;\n }\n\n // negative case\n if (rule < 0) {\n // we add (not subtract it is a negative number)\n // one from the rule because 1 === last day of month\n rule = daysInMonth + (rule + 1);\n } else if (rule === 0) {\n // skip zero: it is invalid.\n continue;\n }\n\n // only add unique items...\n if (newRules.indexOf(rule) === -1) {\n newRules.push(rule);\n }\n\n }\n\n // unique and sort\n return newRules.sort(function(a, b) { return a - b; });\n }\n\n /**\n * NOTES:\n * We are given a list of dates in the month (BYMONTHDAY) (23, etc..)\n * Also we are given a list of days (BYDAY) (MO, 2SU, etc..) when\n * both conditions match a given date (this.last.day) iteration stops.\n *\n * @private\n * @param {Boolean=} isInit When given true will not increment the\n * current day (this.last).\n */\n _byDayAndMonthDay(isInit) {\n let byMonthDay; // setup in initMonth\n let byDay = this.by_data.BYDAY;\n\n let date;\n let dateIdx = 0;\n let dateLen; // setup in initMonth\n let dayLen = byDay.length;\n\n // we are not valid by default\n let dataIsValid = 0;\n\n let daysInMonth;\n let self = this;\n // we need a copy of this, because a DateTime gets normalized\n // automatically if the day is out of range. At some points we\n // set the last day to 0 to start counting.\n let lastDay = this.last.day;\n\n function initMonth() {\n daysInMonth = Time.daysInMonth(\n self.last.month, self.last.year\n );\n\n byMonthDay = self.normalizeByMonthDayRules(\n self.last.year,\n self.last.month,\n self.by_data.BYMONTHDAY\n );\n\n dateLen = byMonthDay.length;\n\n // For the case of more than one occurrence in one month\n // we have to be sure to start searching after the last\n // found date or at the last BYMONTHDAY, unless we are\n // initializing the iterator because in this case we have\n // to consider the last found date too.\n while (byMonthDay[dateIdx] <= lastDay &&\n !(isInit && byMonthDay[dateIdx] == lastDay) &&\n dateIdx < dateLen - 1) {\n dateIdx++;\n }\n }\n\n function nextMonth() {\n // since the day is incremented at the start\n // of the loop below, we need to start at 0\n lastDay = 0;\n self.increment_month();\n dateIdx = 0;\n initMonth();\n }\n\n initMonth();\n\n // should come after initMonth\n if (isInit) {\n lastDay -= 1;\n }\n\n // Use a counter to avoid an infinite loop with malformed rules.\n // Stop checking after 4 years so we consider also a leap year.\n let monthsCounter = 48;\n\n while (!dataIsValid && monthsCounter) {\n monthsCounter--;\n // increment the current date. This is really\n // important otherwise we may fall into the infinite\n // loop trap. The initial date takes care of the case\n // where the current date is the date we are looking\n // for.\n date = lastDay + 1;\n\n if (date > daysInMonth) {\n nextMonth();\n continue;\n }\n\n // find next date\n let next = byMonthDay[dateIdx++];\n\n // this logic is dependent on the BYMONTHDAYS\n // being in order (which is done by #normalizeByMonthDayRules)\n if (next >= date) {\n // if the next month day is in the future jump to it.\n lastDay = next;\n } else {\n // in this case the 'next' monthday has past\n // we must move to the month.\n nextMonth();\n continue;\n }\n\n // Now we can loop through the day rules to see\n // if one matches the current month date.\n for (let dayIdx = 0; dayIdx < dayLen; dayIdx++) {\n let parts = this.ruleDayOfWeek(byDay[dayIdx]);\n let pos = parts[0];\n let dow = parts[1];\n\n this.last.day = lastDay;\n if (this.last.isNthWeekDay(dow, pos)) {\n // when we find the valid one we can mark\n // the conditions as met and break the loop.\n // (Because we have this condition above\n // it will also break the parent loop).\n dataIsValid = 1;\n break;\n }\n }\n\n // It is completely possible that the combination\n // cannot be matched in the current month.\n // When we reach the end of possible combinations\n // in the current month we iterate to the next one.\n // since dateIdx is incremented right after getting\n // \"next\", we don't need dateLen -1 here.\n if (!dataIsValid && dateIdx === dateLen) {\n nextMonth();\n continue;\n }\n }\n\n if (monthsCounter <= 0) {\n // Checked 4 years without finding a Byday that matches\n // a Bymonthday. Maybe the rule is not correct.\n throw new Error(\"Malformed values in BYDAY combined with BYMONTHDAY parts\");\n }\n\n\n return dataIsValid;\n }\n\n next_month() {\n let data_valid = 1;\n\n if (this.next_hour() == 0) {\n return data_valid;\n }\n\n if (this.has_by_data(\"BYDAY\") && this.has_by_data(\"BYMONTHDAY\")) {\n data_valid = this._byDayAndMonthDay();\n } else if (this.has_by_data(\"BYDAY\")) {\n let daysInMonth = Time.daysInMonth(this.last.month, this.last.year);\n let setpos = 0;\n let setpos_total = 0;\n\n if (this.has_by_data(\"BYSETPOS\")) {\n let last_day = this.last.day;\n for (let day = 1; day <= daysInMonth; day++) {\n this.last.day = day;\n if (this.is_day_in_byday(this.last)) {\n setpos_total++;\n if (day <= last_day) {\n setpos++;\n }\n }\n }\n this.last.day = last_day;\n }\n\n data_valid = 0;\n let day;\n for (day = this.last.day + 1; day <= daysInMonth; day++) {\n this.last.day = day;\n\n if (this.is_day_in_byday(this.last)) {\n if (!this.has_by_data(\"BYSETPOS\") ||\n this.check_set_position(++setpos) ||\n this.check_set_position(setpos - setpos_total - 1)) {\n\n data_valid = 1;\n break;\n }\n }\n }\n\n if (day > daysInMonth) {\n this.last.day = 1;\n this.increment_month();\n\n if (this.is_day_in_byday(this.last)) {\n if (!this.has_by_data(\"BYSETPOS\") || this.check_set_position(1)) {\n data_valid = 1;\n }\n } else {\n data_valid = 0;\n }\n }\n } else if (this.has_by_data(\"BYMONTHDAY\")) {\n this.by_indices.BYMONTHDAY++;\n\n if (this.by_indices.BYMONTHDAY >= this.by_data.BYMONTHDAY.length) {\n this.by_indices.BYMONTHDAY = 0;\n this.increment_month();\n if (this.by_indices.BYMONTHDAY >= this.by_data.BYMONTHDAY.length) {\n return 0;\n }\n }\n\n let daysInMonth = Time.daysInMonth(this.last.month, this.last.year);\n let day = this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY];\n\n if (day < 0) {\n day = daysInMonth + day + 1;\n }\n\n if (day > daysInMonth) {\n this.last.day = 1;\n data_valid = this.is_day_in_byday(this.last);\n } else {\n this.last.day = day;\n }\n } else {\n this.increment_month();\n let daysInMonth = Time.daysInMonth(this.last.month, this.last.year);\n if (this.by_data.BYMONTHDAY[0] > daysInMonth) {\n data_valid = 0;\n } else {\n this.last.day = this.by_data.BYMONTHDAY[0];\n }\n }\n\n return data_valid;\n }\n\n next_weekday_by_week() {\n let end_of_data = 0;\n\n if (this.next_hour() == 0) {\n return end_of_data;\n }\n\n if (!this.has_by_data(\"BYDAY\")) {\n return 1;\n }\n\n for (;;) {\n let tt = new Time();\n this.by_indices.BYDAY++;\n\n if (this.by_indices.BYDAY == Object.keys(this.by_data.BYDAY).length) {\n this.by_indices.BYDAY = 0;\n end_of_data = 1;\n }\n\n let coded_day = this.by_data.BYDAY[this.by_indices.BYDAY];\n let parts = this.ruleDayOfWeek(coded_day);\n let dow = parts[1];\n\n dow -= this.rule.wkst;\n\n if (dow < 0) {\n dow += 7;\n }\n\n tt.year = this.last.year;\n tt.month = this.last.month;\n tt.day = this.last.day;\n\n let startOfWeek = tt.startDoyWeek(this.rule.wkst);\n\n if (dow + startOfWeek < 1) {\n // The selected date is in the previous year\n if (!end_of_data) {\n continue;\n }\n }\n\n let next = Time.fromDayOfYear(startOfWeek + dow, this.last.year);\n\n /**\n * The normalization horrors below are due to\n * the fact that when the year/month/day changes\n * it can effect the other operations that come after.\n */\n this.last.year = next.year;\n this.last.month = next.month;\n this.last.day = next.day;\n\n return end_of_data;\n }\n }\n\n next_year() {\n if (this.next_hour() == 0) {\n return 0;\n }\n\n if (this.days.length == 0 || ++this.days_index == this.days.length) {\n this.days_index = 0;\n this.increment_year(this.rule.interval);\n if (this.has_by_data(\"BYMONTHDAY\")) {\n this.by_data.BYMONTHDAY = this.normalizeByMonthDayRules(\n this.last.year,\n this.last.month,\n this.rule.parts.BYMONTHDAY\n );\n }\n this.expand_year_days(this.last.year);\n if (this.days.length == 0) {\n return 0;\n }\n }\n\n return this._nextByYearDay();\n }\n\n _nextByYearDay() {\n let doy = this.days[this.days_index];\n let year = this.last.year;\n\n if (Math.abs(doy) == 366 && !Time.isLeapYear(this.last.year)) {\n return 0;\n }\n\n if (doy < 1) {\n // Time.fromDayOfYear(doy, year) indexes relative to the\n // start of the given year. That is different from the\n // semantics of BYYEARDAY where negative indexes are an\n // offset from the end of the given year.\n doy += 1;\n year += 1;\n }\n let next = Time.fromDayOfYear(doy, year);\n this.last.day = next.day;\n this.last.month = next.month;\n\n return 1;\n }\n\n /**\n * @param dow (eg: '1TU', '-1MO')\n * @param {weekDay=} aWeekStart The week start weekday\n * @return [pos, numericDow] (eg: [1, 3]) numericDow is relative to aWeekStart\n */\n ruleDayOfWeek(dow, aWeekStart) {\n let matches = dow.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);\n if (matches) {\n let pos = parseInt(matches[1] || 0, 10);\n dow = Recur.icalDayToNumericDay(matches[2], aWeekStart);\n return [pos, dow];\n } else {\n return [0, 0];\n }\n }\n\n next_generic(aRuleType, aInterval, aDateAttr, aFollowingAttr, aPreviousIncr) {\n let has_by_rule = (aRuleType in this.by_data);\n let this_freq = (this.rule.freq == aInterval);\n let end_of_data = 0;\n\n if (aPreviousIncr && this[aPreviousIncr]() == 0) {\n return end_of_data;\n }\n\n if (has_by_rule) {\n this.by_indices[aRuleType]++;\n let dta = this.by_data[aRuleType];\n\n if (this.by_indices[aRuleType] == dta.length) {\n this.by_indices[aRuleType] = 0;\n end_of_data = 1;\n }\n this.last[aDateAttr] = dta[this.by_indices[aRuleType]];\n } else if (this_freq) {\n this[\"increment_\" + aDateAttr](this.rule.interval);\n }\n\n if (has_by_rule && end_of_data && this_freq) {\n this[\"increment_\" + aFollowingAttr](1);\n }\n\n return end_of_data;\n }\n\n increment_monthday(inc) {\n for (let i = 0; i < inc; i++) {\n let daysInMonth = Time.daysInMonth(this.last.month, this.last.year);\n this.last.day++;\n\n if (this.last.day > daysInMonth) {\n this.last.day -= daysInMonth;\n this.increment_month();\n }\n }\n }\n\n increment_month() {\n this.last.day = 1;\n if (this.has_by_data(\"BYMONTH\")) {\n this.by_indices.BYMONTH++;\n\n if (this.by_indices.BYMONTH == this.by_data.BYMONTH.length) {\n this.by_indices.BYMONTH = 0;\n this.increment_year(1);\n }\n\n this.last.month = this.by_data.BYMONTH[this.by_indices.BYMONTH];\n } else {\n if (this.rule.freq == \"MONTHLY\") {\n this.last.month += this.rule.interval;\n } else {\n this.last.month++;\n }\n\n this.last.month--;\n let years = trunc(this.last.month / 12);\n this.last.month %= 12;\n this.last.month++;\n\n if (years != 0) {\n this.increment_year(years);\n }\n }\n\n if (this.has_by_data(\"BYMONTHDAY\")) {\n this.by_data.BYMONTHDAY = this.normalizeByMonthDayRules(\n this.last.year,\n this.last.month,\n this.rule.parts.BYMONTHDAY\n );\n }\n }\n\n increment_year(inc) {\n // Don't jump into the next month if this.last is Feb 29.\n this.last.day = 1;\n this.last.year += inc;\n }\n\n increment_generic(inc, aDateAttr, aFactor, aNextIncrement) {\n this.last[aDateAttr] += inc;\n let nextunit = trunc(this.last[aDateAttr] / aFactor);\n this.last[aDateAttr] %= aFactor;\n if (nextunit != 0) {\n this[\"increment_\" + aNextIncrement](nextunit);\n }\n }\n\n has_by_data(aRuleType) {\n return (aRuleType in this.rule.parts);\n }\n\n expand_year_days(aYear) {\n let t = new Time();\n this.days = [];\n\n // We need our own copy with a few keys set\n let parts = {};\n let rules = [\"BYDAY\", \"BYWEEKNO\", \"BYMONTHDAY\", \"BYMONTH\", \"BYYEARDAY\"];\n for (let part of rules) {\n if (part in this.rule.parts) {\n parts[part] = this.rule.parts[part];\n }\n }\n\n if (\"BYMONTH\" in parts && \"BYWEEKNO\" in parts) {\n let valid = 1;\n let validWeeks = {};\n t.year = aYear;\n t.isDate = true;\n\n for (let monthIdx = 0; monthIdx < this.by_data.BYMONTH.length; monthIdx++) {\n let month = this.by_data.BYMONTH[monthIdx];\n t.month = month;\n t.day = 1;\n let first_week = t.weekNumber(this.rule.wkst);\n t.day = Time.daysInMonth(month, aYear);\n let last_week = t.weekNumber(this.rule.wkst);\n for (monthIdx = first_week; monthIdx < last_week; monthIdx++) {\n validWeeks[monthIdx] = 1;\n }\n }\n\n for (let weekIdx = 0; weekIdx < this.by_data.BYWEEKNO.length && valid; weekIdx++) {\n let weekno = this.by_data.BYWEEKNO[weekIdx];\n if (weekno < 52) {\n valid &= validWeeks[weekIdx];\n } else {\n valid = 0;\n }\n }\n\n if (valid) {\n delete parts.BYMONTH;\n } else {\n delete parts.BYWEEKNO;\n }\n }\n\n let partCount = Object.keys(parts).length;\n\n if (partCount == 0) {\n let t1 = this.dtstart.clone();\n t1.year = this.last.year;\n this.days.push(t1.dayOfYear());\n } else if (partCount == 1 && \"BYMONTH\" in parts) {\n for (let month of this.by_data.BYMONTH) {\n let t2 = this.dtstart.clone();\n t2.year = aYear;\n t2.month = month;\n t2.isDate = true;\n this.days.push(t2.dayOfYear());\n }\n } else if (partCount == 1 && \"BYMONTHDAY\" in parts) {\n for (let monthday of this.by_data.BYMONTHDAY) {\n let t3 = this.dtstart.clone();\n if (monthday < 0) {\n let daysInMonth = Time.daysInMonth(t3.month, aYear);\n monthday = monthday + daysInMonth + 1;\n }\n t3.day = monthday;\n t3.year = aYear;\n t3.isDate = true;\n this.days.push(t3.dayOfYear());\n }\n } else if (partCount == 2 &&\n \"BYMONTHDAY\" in parts &&\n \"BYMONTH\" in parts) {\n for (let month of this.by_data.BYMONTH) {\n let daysInMonth = Time.daysInMonth(month, aYear);\n for (let monthday of this.by_data.BYMONTHDAY) {\n if (monthday < 0) {\n monthday = monthday + daysInMonth + 1;\n }\n t.day = monthday;\n t.month = month;\n t.year = aYear;\n t.isDate = true;\n\n this.days.push(t.dayOfYear());\n }\n }\n } else if (partCount == 1 && \"BYWEEKNO\" in parts) ; else if (partCount == 2 &&\n \"BYWEEKNO\" in parts &&\n \"BYMONTHDAY\" in parts) ; else if (partCount == 1 && \"BYDAY\" in parts) {\n this.days = this.days.concat(this.expand_by_day(aYear));\n } else if (partCount == 2 && \"BYDAY\" in parts && \"BYMONTH\" in parts) {\n for (let month of this.by_data.BYMONTH) {\n let daysInMonth = Time.daysInMonth(month, aYear);\n\n t.year = aYear;\n t.month = month;\n t.day = 1;\n t.isDate = true;\n\n let first_dow = t.dayOfWeek();\n let doy_offset = t.dayOfYear() - 1;\n\n t.day = daysInMonth;\n let last_dow = t.dayOfWeek();\n\n if (this.has_by_data(\"BYSETPOS\")) {\n let by_month_day = [];\n for (let day = 1; day <= daysInMonth; day++) {\n t.day = day;\n if (this.is_day_in_byday(t)) {\n by_month_day.push(day);\n }\n }\n\n for (let spIndex = 0; spIndex < by_month_day.length; spIndex++) {\n if (this.check_set_position(spIndex + 1) ||\n this.check_set_position(spIndex - by_month_day.length)) {\n this.days.push(doy_offset + by_month_day[spIndex]);\n }\n }\n } else {\n for (let coded_day of this.by_data.BYDAY) {\n let bydayParts = this.ruleDayOfWeek(coded_day);\n let pos = bydayParts[0];\n let dow = bydayParts[1];\n let month_day;\n\n let first_matching_day = ((dow + 7 - first_dow) % 7) + 1;\n let last_matching_day = daysInMonth - ((last_dow + 7 - dow) % 7);\n\n if (pos == 0) {\n for (let day = first_matching_day; day <= daysInMonth; day += 7) {\n this.days.push(doy_offset + day);\n }\n } else if (pos > 0) {\n month_day = first_matching_day + (pos - 1) * 7;\n\n if (month_day <= daysInMonth) {\n this.days.push(doy_offset + month_day);\n }\n } else {\n month_day = last_matching_day + (pos + 1) * 7;\n\n if (month_day > 0) {\n this.days.push(doy_offset + month_day);\n }\n }\n }\n }\n }\n // Return dates in order of occurrence (1,2,3,...) instead\n // of by groups of weekdays (1,8,15,...,2,9,16,...).\n this.days.sort(function(a, b) { return a - b; }); // Comparator function allows to sort numbers.\n } else if (partCount == 2 && \"BYDAY\" in parts && \"BYMONTHDAY\" in parts) {\n let expandedDays = this.expand_by_day(aYear);\n\n for (let day of expandedDays) {\n let tt = Time.fromDayOfYear(day, aYear);\n if (this.by_data.BYMONTHDAY.indexOf(tt.day) >= 0) {\n this.days.push(day);\n }\n }\n } else if (partCount == 3 &&\n \"BYDAY\" in parts &&\n \"BYMONTHDAY\" in parts &&\n \"BYMONTH\" in parts) {\n let expandedDays = this.expand_by_day(aYear);\n\n for (let day of expandedDays) {\n let tt = Time.fromDayOfYear(day, aYear);\n\n if (this.by_data.BYMONTH.indexOf(tt.month) >= 0 &&\n this.by_data.BYMONTHDAY.indexOf(tt.day) >= 0) {\n this.days.push(day);\n }\n }\n } else if (partCount == 2 && \"BYDAY\" in parts && \"BYWEEKNO\" in parts) {\n let expandedDays = this.expand_by_day(aYear);\n\n for (let day of expandedDays) {\n let tt = Time.fromDayOfYear(day, aYear);\n let weekno = tt.weekNumber(this.rule.wkst);\n\n if (this.by_data.BYWEEKNO.indexOf(weekno)) {\n this.days.push(day);\n }\n }\n } else if (partCount == 3 &&\n \"BYDAY\" in parts &&\n \"BYWEEKNO\" in parts &&\n \"BYMONTHDAY\" in parts) ; else if (partCount == 1 && \"BYYEARDAY\" in parts) {\n this.days = this.days.concat(this.by_data.BYYEARDAY);\n } else if (partCount == 2 && \"BYYEARDAY\" in parts && \"BYDAY\" in parts) {\n let daysInYear = Time.isLeapYear(aYear) ? 366 : 365;\n let expandedDays = new Set(this.expand_by_day(aYear));\n\n for (let doy of this.by_data.BYYEARDAY) {\n if (doy < 0) {\n doy += daysInYear + 1;\n }\n\n if (expandedDays.has(doy)) {\n this.days.push(doy);\n }\n }\n } else {\n this.days = [];\n }\n\n let daysInYear = Time.isLeapYear(aYear) ? 366 : 365;\n this.days.sort((a, b) => {\n if (a < 0) a += daysInYear + 1;\n if (b < 0) b += daysInYear + 1;\n return a - b;\n });\n\n return 0;\n }\n\n expand_by_day(aYear) {\n\n let days_list = [];\n let tmp = this.last.clone();\n\n tmp.year = aYear;\n tmp.month = 1;\n tmp.day = 1;\n tmp.isDate = true;\n\n let start_dow = tmp.dayOfWeek();\n\n tmp.month = 12;\n tmp.day = 31;\n tmp.isDate = true;\n\n let end_dow = tmp.dayOfWeek();\n let end_year_day = tmp.dayOfYear();\n\n for (let day of this.by_data.BYDAY) {\n let parts = this.ruleDayOfWeek(day);\n let pos = parts[0];\n let dow = parts[1];\n\n if (pos == 0) {\n let tmp_start_doy = ((dow + 7 - start_dow) % 7) + 1;\n\n for (let doy = tmp_start_doy; doy <= end_year_day; doy += 7) {\n days_list.push(doy);\n }\n\n } else if (pos > 0) {\n let first;\n if (dow >= start_dow) {\n first = dow - start_dow + 1;\n } else {\n first = dow - start_dow + 8;\n }\n\n days_list.push(first + (pos - 1) * 7);\n } else {\n let last;\n pos = -pos;\n\n if (dow <= end_dow) {\n last = end_year_day - end_dow + dow;\n } else {\n last = end_year_day - end_dow + dow - 7;\n }\n\n days_list.push(last - (pos - 1) * 7);\n }\n }\n return days_list;\n }\n\n is_day_in_byday(tt) {\n if (this.by_data.BYDAY) {\n for (let day of this.by_data.BYDAY) {\n let parts = this.ruleDayOfWeek(day);\n let pos = parts[0];\n let dow = parts[1];\n let this_dow = tt.dayOfWeek();\n\n if ((pos == 0 && dow == this_dow) ||\n (tt.nthWeekDay(dow, pos) == tt.day)) {\n return 1;\n }\n }\n }\n\n return 0;\n }\n\n /**\n * Checks if given value is in BYSETPOS.\n *\n * @private\n * @param {Numeric} aPos position to check for.\n * @return {Boolean} false unless BYSETPOS rules exist\n * and the given value is present in rules.\n */\n check_set_position(aPos) {\n if (this.has_by_data('BYSETPOS')) {\n let idx = this.by_data.BYSETPOS.indexOf(aPos);\n // negative numbers are not false-y\n return idx !== -1;\n }\n return false;\n }\n\n sort_byday_rules(aRules) {\n for (let i = 0; i < aRules.length; i++) {\n for (let j = 0; j < i; j++) {\n let one = this.ruleDayOfWeek(aRules[j], this.rule.wkst)[1];\n let two = this.ruleDayOfWeek(aRules[i], this.rule.wkst)[1];\n\n if (one > two) {\n let tmp = aRules[i];\n aRules[i] = aRules[j];\n aRules[j] = tmp;\n }\n }\n }\n }\n\n check_contract_restriction(aRuleType, v) {\n let indexMapValue = RecurIterator._indexMap[aRuleType];\n let ruleMapValue = RecurIterator._expandMap[this.rule.freq][indexMapValue];\n let pass = false;\n\n if (aRuleType in this.by_data &&\n ruleMapValue == RecurIterator.CONTRACT) {\n\n let ruleType = this.by_data[aRuleType];\n\n for (let bydata of ruleType) {\n if (bydata == v) {\n pass = true;\n break;\n }\n }\n } else {\n // Not a contracting byrule or has no data, test passes\n pass = true;\n }\n return pass;\n }\n\n check_contracting_rules() {\n let dow = this.last.dayOfWeek();\n let weekNo = this.last.weekNumber(this.rule.wkst);\n let doy = this.last.dayOfYear();\n\n return (this.check_contract_restriction(\"BYSECOND\", this.last.second) &&\n this.check_contract_restriction(\"BYMINUTE\", this.last.minute) &&\n this.check_contract_restriction(\"BYHOUR\", this.last.hour) &&\n this.check_contract_restriction(\"BYDAY\", Recur.numericDayToIcalDay(dow)) &&\n this.check_contract_restriction(\"BYWEEKNO\", weekNo) &&\n this.check_contract_restriction(\"BYMONTHDAY\", this.last.day) &&\n this.check_contract_restriction(\"BYMONTH\", this.last.month) &&\n this.check_contract_restriction(\"BYYEARDAY\", doy));\n }\n\n setup_defaults(aRuleType, req, deftime) {\n let indexMapValue = RecurIterator._indexMap[aRuleType];\n let ruleMapValue = RecurIterator._expandMap[this.rule.freq][indexMapValue];\n\n if (ruleMapValue != RecurIterator.CONTRACT) {\n if (!(aRuleType in this.by_data)) {\n this.by_data[aRuleType] = [deftime];\n }\n if (this.rule.freq != req) {\n return this.by_data[aRuleType][0];\n }\n }\n return deftime;\n }\n\n /**\n * Convert iterator into a serialize-able object. Will preserve current\n * iteration sequence to ensure the seamless continuation of the recurrence\n * rule.\n * @return {Object}\n */\n toJSON() {\n let result = Object.create(null);\n\n result.initialized = this.initialized;\n result.rule = this.rule.toJSON();\n result.dtstart = this.dtstart.toJSON();\n result.by_data = this.by_data;\n result.days = this.days;\n result.last = this.last.toJSON();\n result.by_indices = this.by_indices;\n result.occurrence_number = this.occurrence_number;\n\n return result;\n }\n}\n\n/**\n * An error indicating that a recurrence rule is invalid and produces no\n * occurrences.\n *\n * @extends {Error}\n * @class\n */\nclass InvalidRecurrenceRuleError extends Error {\n constructor() {\n super(\"Recurrence rule has no valid occurrences\");\n }\n}\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\n\n\n/**\n * This lets typescript resolve our custom types in the\n * generated d.ts files (jsdoc typedefs are converted to typescript types).\n * Ignore prevents the typedefs from being documented more than once.\n *\n * @ignore\n * @typedef {import(\"./types.js\").weekDay} weekDay\n * Imports the 'weekDay' type from the \"types.js\" module\n * @typedef {import(\"./types.js\").frequencyValues} frequencyValues\n * Imports the 'frequencyValues' type from the \"types.js\" module\n */\n\nconst VALID_DAY_NAMES = /^(SU|MO|TU|WE|TH|FR|SA)$/;\nconst VALID_BYDAY_PART = /^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/;\nconst DOW_MAP = {\n SU: Time.SUNDAY,\n MO: Time.MONDAY,\n TU: Time.TUESDAY,\n WE: Time.WEDNESDAY,\n TH: Time.THURSDAY,\n FR: Time.FRIDAY,\n SA: Time.SATURDAY\n};\n\nconst REVERSE_DOW_MAP = Object.fromEntries(Object.entries(DOW_MAP).map(entry => entry.reverse()));\n\nconst ALLOWED_FREQ = ['SECONDLY', 'MINUTELY', 'HOURLY',\n 'DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY'];\n\n/**\n * This class represents the \"recur\" value type, used for example by RRULE. It provides methods to\n * calculate occurrences among others.\n *\n * @memberof ICAL\n */\nclass Recur {\n /**\n * Creates a new {@link ICAL.Recur} instance from the passed string.\n *\n * @param {String} string The string to parse\n * @return {Recur} The created recurrence instance\n */\n static fromString(string) {\n let data = this._stringToData(string, false);\n return new Recur(data);\n }\n\n /**\n * Creates a new {@link ICAL.Recur} instance using members from the passed\n * data object.\n *\n * @param {Object} aData An object with members of the recurrence\n * @param {frequencyValues=} aData.freq The frequency value\n * @param {Number=} aData.interval The INTERVAL value\n * @param {weekDay=} aData.wkst The week start value\n * @param {Time=} aData.until The end of the recurrence set\n * @param {Number=} aData.count The number of occurrences\n * @param {Array.=} aData.bysecond The seconds for the BYSECOND part\n * @param {Array.=} aData.byminute The minutes for the BYMINUTE part\n * @param {Array.=} aData.byhour The hours for the BYHOUR part\n * @param {Array.=} aData.byday The BYDAY values\n * @param {Array.=} aData.bymonthday The days for the BYMONTHDAY part\n * @param {Array.=} aData.byyearday The days for the BYYEARDAY part\n * @param {Array.=} aData.byweekno The weeks for the BYWEEKNO part\n * @param {Array.=} aData.bymonth The month for the BYMONTH part\n * @param {Array.=} aData.bysetpos The positionals for the BYSETPOS part\n */\n static fromData(aData) {\n return new Recur(aData);\n }\n\n /**\n * Converts a recurrence string to a data object, suitable for the fromData\n * method.\n *\n * @private\n * @param {String} string The string to parse\n * @param {Boolean} fmtIcal If true, the string is considered to be an\n * iCalendar string\n * @return {Recur} The recurrence instance\n */\n static _stringToData(string, fmtIcal) {\n let dict = Object.create(null);\n\n // split is slower in FF but fast enough.\n // v8 however this is faster then manual split?\n let values = string.split(';');\n let len = values.length;\n\n for (let i = 0; i < len; i++) {\n let parts = values[i].split('=');\n let ucname = parts[0].toUpperCase();\n let lcname = parts[0].toLowerCase();\n let name = (fmtIcal ? lcname : ucname);\n let value = parts[1];\n\n if (ucname in partDesign) {\n let partArr = value.split(',');\n let partSet = new Set();\n\n for (let part of partArr) {\n partSet.add(partDesign[ucname](part));\n }\n partArr = [...partSet];\n\n dict[name] = (partArr.length == 1 ? partArr[0] : partArr);\n } else if (ucname in optionDesign) {\n optionDesign[ucname](value, dict, fmtIcal);\n } else {\n // Don't swallow unknown values. Just set them as they are.\n dict[lcname] = value;\n }\n }\n\n return dict;\n }\n\n /**\n * Convert an ical representation of a day (SU, MO, etc..)\n * into a numeric value of that day.\n *\n * @param {String} string The iCalendar day name\n * @param {weekDay=} aWeekStart\n * The week start weekday, defaults to SUNDAY\n * @return {Number} Numeric value of given day\n */\n static icalDayToNumericDay(string, aWeekStart) {\n //XXX: this is here so we can deal\n // with possibly invalid string values.\n let firstDow = aWeekStart || Time.SUNDAY;\n return ((DOW_MAP[string] - firstDow + 7) % 7) + 1;\n }\n\n /**\n * Convert a numeric day value into its ical representation (SU, MO, etc..)\n *\n * @param {Number} num Numeric value of given day\n * @param {weekDay=} aWeekStart\n * The week start weekday, defaults to SUNDAY\n * @return {String} The ICAL day value, e.g SU,MO,...\n */\n static numericDayToIcalDay(num, aWeekStart) {\n //XXX: this is here so we can deal with possibly invalid number values.\n // Also, this allows consistent mapping between day numbers and day\n // names for external users.\n let firstDow = aWeekStart || Time.SUNDAY;\n let dow = (num + firstDow - Time.SUNDAY);\n if (dow > 7) {\n dow -= 7;\n }\n return REVERSE_DOW_MAP[dow];\n }\n\n /**\n * Create a new instance of the Recur class.\n *\n * @param {Object} data An object with members of the recurrence\n * @param {frequencyValues=} data.freq The frequency value\n * @param {Number=} data.interval The INTERVAL value\n * @param {weekDay=} data.wkst The week start value\n * @param {Time=} data.until The end of the recurrence set\n * @param {Number=} data.count The number of occurrences\n * @param {Array.=} data.bysecond The seconds for the BYSECOND part\n * @param {Array.=} data.byminute The minutes for the BYMINUTE part\n * @param {Array.=} data.byhour The hours for the BYHOUR part\n * @param {Array.=} data.byday The BYDAY values\n * @param {Array.=} data.bymonthday The days for the BYMONTHDAY part\n * @param {Array.=} data.byyearday The days for the BYYEARDAY part\n * @param {Array.=} data.byweekno The weeks for the BYWEEKNO part\n * @param {Array.=} data.bymonth The month for the BYMONTH part\n * @param {Array.=} data.bysetpos The positionals for the BYSETPOS part\n */\n constructor(data) {\n this.wrappedJSObject = this;\n this.parts = {};\n\n if (data && typeof(data) === 'object') {\n this.fromData(data);\n }\n }\n\n /**\n * An object holding the BY-parts of the recurrence rule\n * @memberof ICAL.Recur\n * @typedef {Object} byParts\n * @property {Array.=} BYSECOND The seconds for the BYSECOND part\n * @property {Array.