nextcloud-server/dist/dav-settings-personal-avail...

32 lines
237 KiB
JavaScript

import{A as hr,r as Et,j as W,o as B,f as G,e as pt,p as zn,m as Wt,c as zt,k as Yt,h as gt,B as De,C as Vn,n as ke,D as tr,E as fn,F as re,G as mn,w as Nt,u as Y,H as $n,I as Fn,J as Dr,g as oe,K as Wn,_ as Be,s as Hn,b as se,z as ie,L as er,t as j,l as dr,M as wr,O as xr,P as Ee,Q as fe,U as Gn,R as Kn,S as qn,T as Zn,a as Jn,N as Cr,i as Xn}from"./_plugin-vue_export-helper-DvKvVMbC.chunk.mjs";import{u as Qn,d as rr,_ as ts,e as es,f as rs,i as Re,l as ns,m as ss,h as is,j as as,k as pn,n as os,N as fr,s as nr,b as we,g as ls,o as us,p as cs}from"./index-hZPKu-D6-DGE8lsH0.chunk.mjs";import{l as Ct}from"./logger-Cbb8pkmX.chunk.mjs";const hs=8,Nr=32,ds={name:"NcListItemIcon",components:{NcAvatar:es,NcHighlight:ts,NcIconSvgWrapper:rr},mixins:[Qn],props:{name:{type:String,required:!0},subname:{type:String,default:""},icon:{type:String,default:""},iconSvg:{type:String,default:""},iconName:{type:String,default:""},search:{type:String,default:""},avatarSize:{type:Number,default:Nr},noMargin:{type:Boolean,default:!1},displayName:{type:String,default:null},isNoUser:{type:Boolean,default:!1},id:{type:String,default:null}},setup(){return{margin:hs,defaultSize:Nr}},computed:{hasIcon(){return this.icon!==""},hasIconSvg(){return this.iconSvg!==""},isValidSubname(){return this.subname?.trim?.()!==""},isSizeBigEnough(){return this.avatarSize>=26},cssVars(){const n=this.noMargin?0:this.margin;return{"--height":this.avatarSize+2*n+"px","--margin":this.margin+"px"}},searchParts(){const n=/^([^<]*)<([^>]+)>?$/,t=this.search.match(n);return this.isNoUser||!t?[this.search,this.search]:[t[1].trim(),t[2]]}},beforeMount(){!this.isNoUser&&!this.subname&&this.fetchUserStatus(this.user)}},fs=["id"],ms={class:"option__details"},ps={key:1},gs=["aria-label"];function ys(n,t,e,r,s,i){const o=Et("NcAvatar"),a=Et("NcHighlight"),h=Et("NcIconSvgWrapper");return B(),W("span",{id:e.id,class:De(["option",{"option--compact":e.avatarSize<r.defaultSize}]),style:Vn(i.cssVars)},[G(o,Wt(n.$attrs,{"disable-menu":!0,"disable-tooltip":!0,"display-name":e.displayName||e.name,"is-no-user":e.isNoUser,size:e.avatarSize,class:"option__avatar"}),null,16,["display-name","is-no-user","size"]),pt("div",ms,[G(a,{class:"option__lineone",text:e.name,search:i.searchParts[0]},null,8,["text","search"]),i.isValidSubname&&i.isSizeBigEnough?(B(),zt(a,{key:0,class:"option__linetwo",text:e.subname,search:i.searchParts[1]},null,8,["text","search"])):n.hasStatus?(B(),W("span",ps,[pt("span",null,gt(n.userStatus.icon),1),pt("span",null,gt(n.userStatus.message),1)])):Yt("",!0)]),zn(n.$slots,"default",{},()=>[i.hasIconSvg?(B(),zt(h,{key:0,class:"option__icon",svg:e.iconSvg,name:e.iconName},null,8,["svg","name"])):i.hasIcon?(B(),W("span",{key:1,class:De(["icon option__icon",e.icon]),"aria-label":e.iconName},null,10,gs)):Yt("",!0)],!0)],14,fs)}const Or=hr(ds,[["render",ys],["__scopeId","data-v-1355c4c1"]]),Ts=ke({__name:"NcSelectUsers",props:tr({ariaLabelClearSelected:{},ariaLabelListbox:{},ariaLabelDeselectOption:{type:Function},disabled:{type:Boolean},inputId:{},inputLabel:{},labelOutside:{type:Boolean},keepOpen:{type:Boolean},loading:{type:Boolean},multiple:{type:Boolean},noWrap:{type:Boolean},options:{},placeholder:{},required:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:tr(["search"],["update:modelValue"]),setup(n,{emit:t}){const e=fn(n,"modelValue"),r=t,s=re("");mn(s,()=>r("search",s.value));const i=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),o=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),a=i-2*o;function h(c,l,u){const d=/[^<]*<([^>]+)/,m=u.match(d),p=c.subname?.toLocaleLowerCase()??"";return m&&p.indexOf(m[1].toLocaleLowerCase())>-1||`${l} ${c.subname}`.toLocaleLowerCase().indexOf(u.toLocaleLowerCase())>-1}return(c,l)=>(B(),zt(Y(rs),Wt({modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=u=>e.value=u),class:"nc-select-users"},c.$props,{"filter-by":h,label:"displayName",onSearch:l[1]||(l[1]=u=>s.value=u)}),{option:Nt(u=>[G(Y(Or),Wt(u,{"avatar-size":32,name:u.displayName,search:s.value}),null,16,["name","search"])]),"selected-option":Nt(u=>[G(Y(Or),Wt(u,{"avatar-size":a,name:u.displayName,"no-margin":"",search:s.value}),null,16,["name","search"])]),_:1},16,["modelValue"]))}}),Ss=hr(Ts,[["__scopeId","data-v-4fbb6472"]]),As={class:"textarea__main-wrapper"},bs=["id","aria-describedby","disabled","placeholder","value"],vs=["for"],Es=["id"],_s=ke({inheritAttrs:!1,__name:"NcTextArea",props:tr({disabled:{type:Boolean},error:{type:Boolean},helperText:{default:void 0},id:{default:()=>Wn()},inputClass:{default:""},label:{default:void 0},labelOutside:{type:Boolean},placeholder:{default:void 0},resize:{default:"both"},success:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:t}){const e=fn(n,"modelValue"),r=n;t({focus:c,select:l});const s=$n("input"),i=Fn(),o=Dr(()=>r.placeholder||(Re?r.label:void 0));mn(()=>r.labelOutside,()=>{!r.labelOutside&&!r.label&&ns.warn("[NcTextArea] You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation.")});const a=Dr(()=>{const u=[];return r.helperText&&u.push(`${r.id}-helper-text`),typeof i["aria-describedby"]=="string"&&u.push(i["aria-describedby"]),u.join(" ")||void 0});function h(u){const{value:d}=u.target;e.value=d}function c(u){s.value.focus(u)}function l(){s.value.select()}return(u,d)=>(B(),W("div",{class:De(["textarea",[u.$attrs.class,{"textarea--disabled":u.disabled,"textarea--legacy":Y(Re)}]])},[pt("div",As,[pt("textarea",Wt({...u.$attrs,class:void 0},{id:u.id,ref:"input","aria-describedby":a.value,"aria-live":"polite",class:["textarea__input",[u.inputClass,{"textarea__input--label-outside":u.labelOutside,"textarea__input--legacy":Y(Re),"textarea__input--success":u.success,"textarea__input--error":u.error}]],disabled:u.disabled,placeholder:o.value,style:{resize:u.resize},value:e.value,onInput:h}),null,16,bs),u.labelOutside?Yt("",!0):(B(),W("label",{key:0,class:"textarea__label",for:u.id},gt(u.label),9,vs))]),u.helperText?(B(),W("p",{key:0,id:`${u.id}-helper-text`,class:De(["textarea__helper-text-message",{"textarea__helper-text-message--error":u.error,"textarea__helper-text-message--success":u.success}])},[u.success?(B(),zt(rr,{key:0,class:"textarea__helper-text-message__icon",path:Y(ss)},null,8,["path"])):u.error?(B(),zt(rr,{key:1,class:"textarea__helper-text-message__icon",path:Y(is)},null,8,["path"])):Yt("",!0),oe(" "+gt(u.helperText),1)],10,Es)):Yt("",!0)],2))}}),Ds=hr(_s,[["__scopeId","data-v-808cdfc6"]]);var sr;(function(n){n[n.User=0]="User",n[n.Group=1]="Group",n[n.Link=3]="Link",n[n.Email=4]="Email",n[n.Remote=6]="Remote",n[n.Team=7]="Team",n[n.Guest=8]="Guest",n[n.RemoteGroup=9]="RemoteGroup",n[n.Room=10]="Room",n[n.Deck=12]="Deck",n[n.FederatedGroup=14]="FederatedGroup",n[n.ScienceMesh=15]="ScienceMesh"})(sr||(sr={}));function Ur(n){const t=n.getFullYear(),e=(n.getMonth()+1).toString().padStart(2,"0"),r=n.getDate().toString().padStart(2,"0");return`${t}-${e}-${r}`}const ws={name:"AbsenceForm",components:{NcButton:fr,NcTextField:os,NcTextArea:Ds,NcDateTimePickerNative:pn,NcSelectUsers:Ss},setup(){return{t:j}},data(){const{firstDay:n,lastDay:t,status:e,message:r,replacementUserId:s,replacementUserDisplayName:i}=dr("dav","absence",{});return{loading:!1,status:e??"",message:r??"",firstDay:n?new Date(n):new Date,lastDay:t?new Date(t):null,replacementUserId:s,replacementUser:s?{user:s,displayName:i}:null,searchLoading:!1,options:[]}},computed:{valid(){const n=new Date(this.firstDay?.getTime()),t=new Date(this.lastDay?.getTime());return n?.setHours(0,0,0,0),t?.setHours(0,0,0,0),!!this.firstDay&&!!this.lastDay&&!!this.status&&!!this.message&&t>=n}},methods:{resetForm(){this.status="",this.message="",this.firstDay=new Date,this.lastDay=null},formatForMultiselect(n){return{user:n.uuid||n.value.shareWith,displayName:n.name||n.label,subtitle:n.dsc|""}},async asyncFind(n){this.searchLoading=!0,await this.debounceGetSuggestions(n.trim())},async getSuggestions(n){const t=[sr.User];let e=null;try{e=await se.get(ie("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"file",search:n,shareType:t}})}catch(u){Ct.error("Error fetching suggestions",{error:u});return}const r=e.data.ocs.data,s=e.data.ocs.data.exact;r.exact=[];const i=s.users,o=r.users;Ct.info("AbsenceForm raw suggestions",{rawExactSuggestions:i,rawSuggestions:o});const a=i.map(u=>this.formatForMultiselect(u)),h=o.map(u=>this.formatForMultiselect(u)),c=a.concat(h),l=c.reduce((u,d)=>(d.displayName&&(u[d.displayName]||(u[d.displayName]=0),u[d.displayName]++),u),{});this.options=c.map(u=>l[u.displayName]>1&&!u.desc?{...u,desc:u.shareWithDisplayNameUnique}:u),this.searchLoading=!1,Ct.info("AbsenseForm suggestions",{options:this.options})},debounceGetSuggestions:as(function(...n){this.getSuggestions(...n)},300),async saveForm(){if(this.valid){this.loading=!0;try{await se.post(ie("/apps/dav/api/v1/outOfOffice/{userId}",{userId:er().uid}),{firstDay:Ur(this.firstDay),lastDay:Ur(this.lastDay),status:this.status,message:this.message,replacementUserId:this.replacementUser?.user??null}),nr(j("dav","Absence saved"))}catch(n){we(j("dav","Failed to save your absence settings")),Ct.error("Could not save absence",{error:n})}finally{this.loading=!1}}},async clearAbsence(){this.loading=!0;try{await se.delete(ie("/apps/dav/api/v1/outOfOffice/{userId}",{userId:er().uid})),this.resetForm(),nr(j("dav","Absence cleared"))}catch(n){we(j("dav","Failed to clear your absence settings")),Ct.error("Could not clear absence",{error:n})}finally{this.loading=!1}}}},xs={class:"absence__dates"},Cs={for:"replacement-search-input"},Ns={class:"absence__buttons"};function Os(n,t,e,r,s,i){const o=Et("NcDateTimePickerNative"),a=Et("NcSelectUsers"),h=Et("NcTextField"),c=Et("NcTextArea"),l=Et("NcButton");return B(),W("form",{class:"absence",onSubmit:t[5]||(t[5]=Hn((...u)=>i.saveForm&&i.saveForm(...u),["prevent"]))},[pt("div",xs,[G(o,{id:"absence-first-day",modelValue:s.firstDay,"onUpdate:modelValue":t[0]||(t[0]=u=>s.firstDay=u),label:r.t("dav","First day"),class:"absence__dates__picker",required:!0},null,8,["modelValue","label"]),G(o,{id:"absence-last-day",modelValue:s.lastDay,"onUpdate:modelValue":t[1]||(t[1]=u=>s.lastDay=u),label:r.t("dav","Last day (inclusive)"),class:"absence__dates__picker",required:!0},null,8,["modelValue","label"])]),pt("label",Cs,gt(r.t("dav","Out of office replacement (optional)")),1),G(a,{modelValue:s.replacementUser,"onUpdate:modelValue":t[2]||(t[2]=u=>s.replacementUser=u),"input-id":"replacement-search-input",loading:s.searchLoading,placeholder:r.t("dav","Name of the replacement"),options:s.options,onSearch:i.asyncFind},null,8,["modelValue","loading","placeholder","options","onSearch"]),G(h,{modelValue:s.status,"onUpdate:modelValue":t[3]||(t[3]=u=>s.status=u),label:r.t("dav","Short absence status"),required:!0},null,8,["modelValue","label"]),G(c,{modelValue:s.message,"onUpdate:modelValue":t[4]||(t[4]=u=>s.message=u),label:r.t("dav","Long absence Message"),required:!0},null,8,["modelValue","label"]),pt("div",Ns,[G(l,{disabled:s.loading||!i.valid,variant:"primary",type:"submit"},{default:Nt(()=>[oe(gt(r.t("dav","Save")),1)]),_:1},8,["disabled"]),G(l,{disabled:s.loading||!i.valid,variant:"error",onClick:i.clearAbsence},{default:Nt(()=>[oe(gt(r.t("dav","Disable absence")),1)]),_:1},8,["disabled","onClick"])])],32)}const Us=Be(ws,[["render",Os],["__scopeId","data-v-95f1c6f1"]]),Ps={name:"TrashCanOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Is=["aria-hidden","aria-label"],Ys=["fill","width","height"],Ms={d:"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"},ks={key:0};function Bs(n,t,e,r,s,i){return B(),W("span",Wt(n.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon trash-can-outline-icon",role:"img",onClick:t[0]||(t[0]=o=>n.$emit("click",o))}),[(B(),W("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[pt("path",Ms,[e.title?(B(),W("title",ks,gt(e.title),1)):Yt("",!0)])],8,Ys))],16,Is)}const js=Be(Ps,[["render",Bs]]),Ls={name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Rs=["aria-hidden","aria-label"],zs=["fill","width","height"],Vs={d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"},$s={key:0};function Fs(n,t,e,r,s,i){return B(),W("span",Wt(n.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon plus-icon",role:"img",onClick:t[0]||(t[0]=o=>n.$emit("click",o))}),[(B(),W("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[pt("path",Vs,[e.title?(B(),W("title",$s,gt(e.title),1)):Yt("",!0)])],8,zs))],16,Rs)}const Ws=Be(Ls,[["render",Fs]]);var $t={},Jt={},Pr;function Hs(){return Pr||(Pr=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.zonesMap=Jt.defaultStart=void 0,Jt.defaultStart="19700101T000000",Jt.zonesMap=new Map([["Africa/Abidjan",{s:{f:"+0000",n:"GMT"}}],["Africa/Accra",{s:{f:"+0000",n:"GMT"}}],["Africa/Addis_Ababa",{s:{f:"+0300",n:"EAT"}}],["Africa/Algiers",{s:{f:"+0100",n:"CET"}}],["Africa/Asmara",{s:{f:"+0300",n:"EAT"}}],["Africa/Bamako",{s:{f:"+0000",n:"GMT"}}],["Africa/Bangui",{s:{f:"+0100",n:"WAT"}}],["Africa/Banjul",{s:{f:"+0000",n:"GMT"}}],["Africa/Bissau",{s:{f:"+0000",n:"GMT"}}],["Africa/Blantyre",{s:{f:"+0200",n:"CAT"}}],["Africa/Brazzaville",{s:{f:"+0100",n:"WAT"}}],["Africa/Bujumbura",{s:{f:"+0200",n:"CAT"}}],["Africa/Cairo",{s:{f:"+0200",n:"EET"}}],["Africa/Casablanca",{s:{f:"+0100",n:"+01"}}],["Africa/Ceuta",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Africa/Conakry",{s:{f:"+0000",n:"GMT"}}],["Africa/Dakar",{s:{f:"+0000",n:"GMT"}}],["Africa/Dar_es_Salaam",{s:{f:"+0300",n:"EAT"}}],["Africa/Djibouti",{s:{f:"+0300",n:"EAT"}}],["Africa/Douala",{s:{f:"+0100",n:"WAT"}}],["Africa/El_Aaiun",{s:{f:"+0100",n:"+01"}}],["Africa/Freetown",{s:{f:"+0000",n:"GMT"}}],["Africa/Gaborone",{s:{f:"+0200",n:"CAT"}}],["Africa/Harare",{s:{f:"+0200",n:"CAT"}}],["Africa/Johannesburg",{s:{f:"+0200",n:"SAST"}}],["Africa/Juba",{s:{f:"+0300",n:"EAT"}}],["Africa/Kampala",{s:{f:"+0300",n:"EAT"}}],["Africa/Khartoum",{s:{f:"+0200",n:"CAT"}}],["Africa/Kigali",{s:{f:"+0200",n:"CAT"}}],["Africa/Kinshasa",{s:{f:"+0100",n:"WAT"}}],["Africa/Lagos",{s:{f:"+0100",n:"WAT"}}],["Africa/Libreville",{s:{f:"+0100",n:"WAT"}}],["Africa/Lome",{s:{f:"+0000",n:"GMT"}}],["Africa/Luanda",{s:{f:"+0100",n:"WAT"}}],["Africa/Lubumbashi",{s:{f:"+0200",n:"CAT"}}],["Africa/Lusaka",{s:{f:"+0200",n:"CAT"}}],["Africa/Malabo",{s:{f:"+0100",n:"WAT"}}],["Africa/Maputo",{s:{f:"+0200",n:"CAT"}}],["Africa/Maseru",{s:{f:"+0200",n:"SAST"}}],["Africa/Mbabane",{s:{f:"+0200",n:"SAST"}}],["Africa/Mogadishu",{s:{f:"+0300",n:"EAT"}}],["Africa/Monrovia",{s:{f:"+0000",n:"GMT"}}],["Africa/Nairobi",{s:{f:"+0300",n:"EAT"}}],["Africa/Ndjamena",{s:{f:"+0100",n:"WAT"}}],["Africa/Niamey",{s:{f:"+0100",n:"WAT"}}],["Africa/Nouakchott",{s:{f:"+0000",n:"GMT"}}],["Africa/Ouagadougou",{s:{f:"+0000",n:"GMT"}}],["Africa/Porto-Novo",{s:{f:"+0100",n:"WAT"}}],["Africa/Sao_Tome",{s:{f:"+0100",n:"WAT"}}],["Africa/Tripoli",{s:{f:"+0200",n:"EET"}}],["Africa/Tunis",{s:{f:"+0100",n:"CET"}}],["Africa/Windhoek",{s:{f:"+0200",n:"CAT"}}],["America/Adak",{s:{f:"-0900",t:"-1000",n:"HST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-1000",t:"-0900",n:"HDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Anchorage",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Anguilla",{s:{f:"-0400",n:"AST"}}],["America/Antigua",{s:{f:"-0400",n:"AST"}}],["America/Araguaina",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Buenos_Aires",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Catamarca",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Cordoba",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Jujuy",{s:{f:"-0300",n:"-03"}}],["America/Argentina/La_Rioja",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Mendoza",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Rio_Gallegos",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Salta",{s:{f:"-0300",n:"-03"}}],["America/Argentina/San_Juan",{s:{f:"-0300",n:"-03"}}],["America/Argentina/San_Luis",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Tucuman",{s:{f:"-0300",n:"-03"}}],["America/Argentina/Ushuaia",{s:{f:"-0300",n:"-03"}}],["America/Aruba",{s:{f:"-0400",n:"AST"}}],["America/Asuncion",{s:{f:"-0300",t:"-0400",n:"-04",s:"19700322T000000",r:{m:3,d:"4SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19701004T000000",r:{m:10,d:"1SU"}}}],["America/Atikokan",{s:{f:"-0500",n:"EST"}}],["America/Bahia_Banderas",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Bahia",{s:{f:"-0300",n:"-03"}}],["America/Barbados",{s:{f:"-0400",n:"AST"}}],["America/Belem",{s:{f:"-0300",n:"-03"}}],["America/Belize",{s:{f:"-0600",n:"CST"}}],["America/Blanc-Sablon",{s:{f:"-0400",n:"AST"}}],["America/Boa_Vista",{s:{f:"-0400",n:"-04"}}],["America/Bogota",{s:{f:"-0500",n:"-05"}}],["America/Boise",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Cambridge_Bay",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Campo_Grande",{s:{f:"-0400",n:"-04",s:"19700215T000000",r:{m:2,d:"3SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19701101T000000",r:{m:11,d:"1SU"}}}],["America/Cancun",{s:{f:"-0500",n:"EST"}}],["America/Caracas",{s:{f:"-0400",n:"-04"}}],["America/Cayenne",{s:{f:"-0300",n:"-03"}}],["America/Cayman",{s:{f:"-0500",n:"EST"}}],["America/Chicago",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Chihuahua",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Costa_Rica",{s:{f:"-0600",n:"CST"}}],["America/Creston",{s:{f:"-0700",n:"MST"}}],["America/Cuiaba",{s:{f:"-0400",n:"-04",s:"19700215T000000",r:{m:2,d:"3SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19701101T000000",r:{m:11,d:"1SU"}}}],["America/Curacao",{s:{f:"-0400",n:"AST"}}],["America/Danmarkshavn",{s:{f:"+0000",n:"GMT"}}],["America/Dawson_Creek",{s:{f:"-0700",n:"MST"}}],["America/Dawson",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Denver",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Detroit",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Dominica",{s:{f:"-0400",n:"AST"}}],["America/Edmonton",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Eirunepe",{s:{f:"-0500",n:"-05"}}],["America/El_Salvador",{s:{f:"-0600",n:"CST"}}],["America/Fort_Nelson",{s:{f:"-0700",n:"MST"}}],["America/Fortaleza",{s:{f:"-0300",n:"-03"}}],["America/Glace_Bay",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Godthab",{s:{f:"-0200",t:"-0300",n:"-03",s:"19701024T230000",r:{m:10,d:"-1SA"}},d:{f:"-0300",t:"-0200",n:"-02",s:"19700328T220000",r:{m:3,d:"-1SA"}}}],["America/Goose_Bay",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Grand_Turk",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Grenada",{s:{f:"-0400",n:"AST"}}],["America/Guadeloupe",{s:{f:"-0400",n:"AST"}}],["America/Guatemala",{s:{f:"-0600",n:"CST"}}],["America/Guayaquil",{s:{f:"-0500",n:"-05"}}],["America/Guyana",{s:{f:"-0400",n:"-04"}}],["America/Halifax",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Havana",{s:{f:"-0400",t:"-0500",n:"CST",s:"19701101T010000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"CDT",s:"19700308T000000",r:{m:3,d:"2SU"}}}],["America/Hermosillo",{s:{f:"-0700",n:"MST"}}],["America/Indiana/Indianapolis",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Knox",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Marengo",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Petersburg",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Tell_City",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Vevay",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Vincennes",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Indiana/Winamac",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Inuvik",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Iqaluit",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Jamaica",{s:{f:"-0500",n:"EST"}}],["America/Juneau",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Kentucky/Louisville",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Kentucky/Monticello",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Kralendijk",{s:{f:"-0400",n:"AST"}}],["America/La_Paz",{s:{f:"-0400",n:"-04"}}],["America/Lima",{s:{f:"-0500",n:"-05"}}],["America/Los_Angeles",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Lower_Princes",{s:{f:"-0400",n:"AST"}}],["America/Maceio",{s:{f:"-0300",n:"-03"}}],["America/Managua",{s:{f:"-0600",n:"CST"}}],["America/Manaus",{s:{f:"-0400",n:"-04"}}],["America/Marigot",{s:{f:"-0400",n:"AST"}}],["America/Martinique",{s:{f:"-0400",n:"AST"}}],["America/Matamoros",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Mazatlan",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Menominee",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Merida",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Metlakatla",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Mexico_City",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Miquelon",{s:{f:"-0200",t:"-0300",n:"-03",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0300",t:"-0200",n:"-02",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Moncton",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Monterrey",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700405T020000",r:{m:4,d:"1SU"}}}],["America/Montevideo",{s:{f:"-0300",n:"-03"}}],["America/Montserrat",{s:{f:"-0400",n:"AST"}}],["America/Nassau",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/New_York",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Nipigon",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Nome",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Noronha",{s:{f:"-0200",n:"-02"}}],["America/North_Dakota/Beulah",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/North_Dakota/Center",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/North_Dakota/New_Salem",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Ojinaga",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Panama",{s:{f:"-0500",n:"EST"}}],["America/Pangnirtung",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Paramaribo",{s:{f:"-0300",n:"-03"}}],["America/Phoenix",{s:{f:"-0700",n:"MST"}}],["America/Port_of_Spain",{s:{f:"-0400",n:"AST"}}],["America/Port-au-Prince",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Porto_Velho",{s:{f:"-0400",n:"-04"}}],["America/Puerto_Rico",{s:{f:"-0400",n:"AST"}}],["America/Punta_Arenas",{s:{f:"-0300",n:"-03"}}],["America/Rainy_River",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Rankin_Inlet",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Recife",{s:{f:"-0300",n:"-03"}}],["America/Regina",{s:{f:"-0600",n:"CST"}}],["America/Resolute",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Rio_Branco",{s:{f:"-0500",n:"-05"}}],["America/Santarem",{s:{f:"-0300",n:"-03"}}],["America/Santiago",{s:{f:"-0300",t:"-0400",n:"-04",s:"19700405T000000",r:{m:4,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"-03",s:"19700906T000000",r:{m:9,d:"1SU"}}}],["America/Santo_Domingo",{s:{f:"-0400",n:"AST"}}],["America/Sao_Paulo",{s:{f:"-0300",n:"-03",s:"19700215T000000",r:{m:2,d:"3SU"}},d:{f:"-0300",t:"-0200",n:"-02",s:"19701101T000000",r:{m:11,d:"1SU"}}}],["America/Scoresbysund",{s:{f:"+0000",t:"-0100",n:"-01",s:"19701025T010000",r:{m:10,d:"-1SU"}},d:{f:"-0100",t:"+0000",n:"+00",s:"19700329T000000",r:{m:3,d:"-1SU"}}}],["America/Sitka",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/St_Barthelemy",{s:{f:"-0400",n:"AST"}}],["America/St_Johns",{s:{f:"-0230",t:"-0330",n:"NST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0330",t:"-0230",n:"NDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/St_Kitts",{s:{f:"-0400",n:"AST"}}],["America/St_Lucia",{s:{f:"-0400",n:"AST"}}],["America/St_Thomas",{s:{f:"-0400",n:"AST"}}],["America/St_Vincent",{s:{f:"-0400",n:"AST"}}],["America/Swift_Current",{s:{f:"-0600",n:"CST"}}],["America/Tegucigalpa",{s:{f:"-0600",n:"CST"}}],["America/Thule",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Thunder_Bay",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Tijuana",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Toronto",{s:{f:"-0400",t:"-0500",n:"EST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0500",t:"-0400",n:"EDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Tortola",{s:{f:"-0400",n:"AST"}}],["America/Vancouver",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Whitehorse",{s:{f:"-0700",t:"-0800",n:"PST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0800",t:"-0700",n:"PDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Winnipeg",{s:{f:"-0500",t:"-0600",n:"CST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0600",t:"-0500",n:"CDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Yakutat",{s:{f:"-0800",t:"-0900",n:"AKST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0900",t:"-0800",n:"AKDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["America/Yellowknife",{s:{f:"-0600",t:"-0700",n:"MST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0700",t:"-0600",n:"MDT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["Antarctica/Casey",{s:{f:"+0800",n:"+08"}}],["Antarctica/Davis",{s:{f:"+0700",n:"+07"}}],["Antarctica/DumontDUrville",{s:{f:"+1000",n:"+10"}}],["Antarctica/Macquarie",{s:{f:"+1100",n:"+11"}}],["Antarctica/Mawson",{s:{f:"+0500",n:"+05"}}],["Antarctica/McMurdo",{s:{f:"+1300",t:"+1200",n:"NZST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1200",t:"+1300",n:"NZDT",s:"19700927T020000",r:{m:9,d:"-1SU"}}}],["Antarctica/Palmer",{s:{f:"-0300",n:"-03"}}],["Antarctica/Rothera",{s:{f:"-0300",n:"-03"}}],["Antarctica/Syowa",{s:{f:"+0300",n:"+03"}}],["Antarctica/Troll",{s:{f:"+0200",t:"+0000",n:"+00",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0200",n:"+02",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Antarctica/Vostok",{s:{f:"+0600",n:"+06"}}],["Arctic/Longyearbyen",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Asia/Aden",{s:{f:"+0300",n:"+03"}}],["Asia/Almaty",{s:{f:"+0600",n:"+06"}}],["Asia/Amman",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701030T010000",r:{m:10,d:"-1FR"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700326T235959",r:{m:3,d:"-1TH"}}}],["Asia/Anadyr",{s:{f:"+1200",n:"+12"}}],["Asia/Aqtau",{s:{f:"+0500",n:"+05"}}],["Asia/Aqtobe",{s:{f:"+0500",n:"+05"}}],["Asia/Ashgabat",{s:{f:"+0500",n:"+05"}}],["Asia/Atyrau",{s:{f:"+0500",n:"+05"}}],["Asia/Baghdad",{s:{f:"+0300",n:"+03"}}],["Asia/Bahrain",{s:{f:"+0300",n:"+03"}}],["Asia/Baku",{s:{f:"+0400",n:"+04"}}],["Asia/Bangkok",{s:{f:"+0700",n:"+07"}}],["Asia/Barnaul",{s:{f:"+0700",n:"+07"}}],["Asia/Beirut",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T000000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T000000",r:{m:3,d:"-1SU"}}}],["Asia/Bishkek",{s:{f:"+0600",n:"+06"}}],["Asia/Brunei",{s:{f:"+0800",n:"+08"}}],["Asia/Chita",{s:{f:"+0900",n:"+09"}}],["Asia/Choibalsan",{s:{f:"+0800",n:"+08"}}],["Asia/Colombo",{s:{f:"+0530",n:"+0530"}}],["Asia/Damascus",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701030T000000",r:{m:10,d:"-1FR"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700327T000000",r:{m:3,d:"-1FR"}}}],["Asia/Dhaka",{s:{f:"+0600",n:"+06"}}],["Asia/Dili",{s:{f:"+0900",n:"+09"}}],["Asia/Dubai",{s:{f:"+0400",n:"+04"}}],["Asia/Dushanbe",{s:{f:"+0500",n:"+05"}}],["Asia/Famagusta",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Asia/Gaza",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701031T010000",r:{m:10,d:"-1SA"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700328T010000",r:{m:3,d:"4SA"}}}],["Asia/Hebron",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701031T010000",r:{m:10,d:"-1SA"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700328T010000",r:{m:3,d:"4SA"}}}],["Asia/Ho_Chi_Minh",{s:{f:"+0700",n:"+07"}}],["Asia/Hong_Kong",{s:{f:"+0800",n:"HKT"}}],["Asia/Hovd",{s:{f:"+0700",n:"+07"}}],["Asia/Irkutsk",{s:{f:"+0800",n:"+08"}}],["Asia/Istanbul",{s:{f:"+0300",n:"+03"}}],["Asia/Jakarta",{s:{f:"+0700",n:"WIB"}}],["Asia/Jayapura",{s:{f:"+0900",n:"WIT"}}],["Asia/Jerusalem",{s:{f:"+0300",t:"+0200",n:"IST",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"IDT",s:"19700327T020000",r:{m:3,d:"-1FR"}}}],["Asia/Kabul",{s:{f:"+0430",n:"+0430"}}],["Asia/Kamchatka",{s:{f:"+1200",n:"+12"}}],["Asia/Karachi",{s:{f:"+0500",n:"PKT"}}],["Asia/Kathmandu",{s:{f:"+0545",n:"+0545"}}],["Asia/Khandyga",{s:{f:"+0900",n:"+09"}}],["Asia/Kolkata",{s:{f:"+0530",n:"IST"}}],["Asia/Krasnoyarsk",{s:{f:"+0700",n:"+07"}}],["Asia/Kuala_Lumpur",{s:{f:"+0800",n:"+08"}}],["Asia/Kuching",{s:{f:"+0800",n:"+08"}}],["Asia/Kuwait",{s:{f:"+0300",n:"+03"}}],["Asia/Macau",{s:{f:"+0800",n:"CST"}}],["Asia/Magadan",{s:{f:"+1100",n:"+11"}}],["Asia/Makassar",{s:{f:"+0800",n:"WITA"}}],["Asia/Manila",{s:{f:"+0800",n:"PST"}}],["Asia/Muscat",{s:{f:"+0400",n:"+04"}}],["Asia/Nicosia",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Asia/Novokuznetsk",{s:{f:"+0700",n:"+07"}}],["Asia/Novosibirsk",{s:{f:"+0700",n:"+07"}}],["Asia/Omsk",{s:{f:"+0600",n:"+06"}}],["Asia/Oral",{s:{f:"+0500",n:"+05"}}],["Asia/Phnom_Penh",{s:{f:"+0700",n:"+07"}}],["Asia/Pontianak",{s:{f:"+0700",n:"WIB"}}],["Asia/Pyongyang",{s:{f:"+0900",n:"KST"}}],["Asia/Qatar",{s:{f:"+0300",n:"+03"}}],["Asia/Qyzylorda",{s:{f:"+0600",n:"+06"}}],["Asia/Riyadh",{s:{f:"+0300",n:"+03"}}],["Asia/Sakhalin",{s:{f:"+1100",n:"+11"}}],["Asia/Samarkand",{s:{f:"+0500",n:"+05"}}],["Asia/Seoul",{s:{f:"+0900",n:"KST"}}],["Asia/Shanghai",{s:{f:"+0800",n:"CST"}}],["Asia/Singapore",{s:{f:"+0800",n:"+08"}}],["Asia/Srednekolymsk",{s:{f:"+1100",n:"+11"}}],["Asia/Taipei",{s:{f:"+0800",n:"CST"}}],["Asia/Tashkent",{s:{f:"+0500",n:"+05"}}],["Asia/Tbilisi",{s:{f:"+0400",n:"+04"}}],["Asia/Tehran",{s:{f:"+0430",t:"+0330",n:"+0330",s:"19700921T000000",r:{m:9,d:"3SU"}},d:{f:"+0330",t:"+0430",n:"+0430",s:"19700321T000000",r:{m:3,d:"3SU"}}}],["Asia/Thimphu",{s:{f:"+0600",n:"+06"}}],["Asia/Tokyo",{s:{f:"+0900",n:"JST"}}],["Asia/Tomsk",{s:{f:"+0700",n:"+07"}}],["Asia/Ulaanbaatar",{s:{f:"+0800",n:"+08"}}],["Asia/Urumqi",{s:{f:"+0600",n:"+06"}}],["Asia/Ust-Nera",{s:{f:"+1000",n:"+10"}}],["Asia/Vientiane",{s:{f:"+0700",n:"+07"}}],["Asia/Vladivostok",{s:{f:"+1000",n:"+10"}}],["Asia/Yakutsk",{s:{f:"+0900",n:"+09"}}],["Asia/Yangon",{s:{f:"+0630",n:"+0630"}}],["Asia/Yekaterinburg",{s:{f:"+0500",n:"+05"}}],["Asia/Yerevan",{s:{f:"+0400",n:"+04"}}],["Atlantic/Azores",{s:{f:"+0000",t:"-0100",n:"-01",s:"19701025T010000",r:{m:10,d:"-1SU"}},d:{f:"-0100",t:"+0000",n:"+00",s:"19700329T000000",r:{m:3,d:"-1SU"}}}],["Atlantic/Bermuda",{s:{f:"-0300",t:"-0400",n:"AST",s:"19701101T020000",r:{m:11,d:"1SU"}},d:{f:"-0400",t:"-0300",n:"ADT",s:"19700308T020000",r:{m:3,d:"2SU"}}}],["Atlantic/Canary",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Atlantic/Cape_Verde",{s:{f:"-0100",n:"-01"}}],["Atlantic/Faroe",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Atlantic/Madeira",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Atlantic/Reykjavik",{s:{f:"+0000",n:"GMT"}}],["Atlantic/South_Georgia",{s:{f:"-0200",n:"-02"}}],["Atlantic/St_Helena",{s:{f:"+0000",n:"GMT"}}],["Atlantic/Stanley",{s:{f:"-0300",n:"-03"}}],["Australia/Adelaide",{s:{f:"+1030",t:"+0930",n:"ACST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+0930",t:"+1030",n:"ACDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Brisbane",{s:{f:"+1000",n:"AEST"}}],["Australia/Broken_Hill",{s:{f:"+1030",t:"+0930",n:"ACST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+0930",t:"+1030",n:"ACDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Currie",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Darwin",{s:{f:"+0930",n:"ACST"}}],["Australia/Eucla",{s:{f:"+0845",n:"+0845"}}],["Australia/Hobart",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Lindeman",{s:{f:"+1000",n:"AEST"}}],["Australia/Lord_Howe",{s:{f:"+1100",t:"+1030",n:"+1030",s:"19700405T020000",r:{m:4,d:"1SU"}},d:{f:"+1030",t:"+1100",n:"+11",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Melbourne",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Australia/Perth",{s:{f:"+0800",n:"AWST"}}],["Australia/Sydney",{s:{f:"+1100",t:"+1000",n:"AEST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1000",t:"+1100",n:"AEDT",s:"19701004T020000",r:{m:10,d:"1SU"}}}],["Etc/GMT-0",{s:{f:"+0000",n:"GMT"}}],["Etc/GMT-1",{s:{f:"-0100",n:"-01"}}],["Etc/GMT-10",{s:{f:"-1000",n:"-10"}}],["Etc/GMT-11",{s:{f:"-1100",n:"-11"}}],["Etc/GMT-12",{s:{f:"-1200",n:"-12"}}],["Etc/GMT-2",{s:{f:"-0200",n:"-02"}}],["Etc/GMT-3",{s:{f:"-0300",n:"-03"}}],["Etc/GMT-4",{s:{f:"-0400",n:"-04"}}],["Etc/GMT-5",{s:{f:"-0500",n:"-05"}}],["Etc/GMT-6",{s:{f:"-0600",n:"-06"}}],["Etc/GMT-7",{s:{f:"-0700",n:"-07"}}],["Etc/GMT-8",{s:{f:"-0800",n:"-08"}}],["Etc/GMT-9",{s:{f:"-0900",n:"-09"}}],["Etc/GMT",{s:{f:"+0000",n:"GMT"}}],["Etc/GMT+0",{s:{f:"+0000",n:"GMT"}}],["Etc/GMT+1",{s:{f:"+0100",n:"+01"}}],["Etc/GMT+10",{s:{f:"+1000",n:"+10"}}],["Etc/GMT+11",{s:{f:"+1100",n:"+11"}}],["Etc/GMT+12",{s:{f:"+1200",n:"+12"}}],["Etc/GMT+13",{s:{f:"+1300",n:"+13"}}],["Etc/GMT+14",{s:{f:"+1400",n:"+14"}}],["Etc/GMT+2",{s:{f:"+0200",n:"+02"}}],["Etc/GMT+3",{s:{f:"+0300",n:"+03"}}],["Etc/GMT+4",{s:{f:"+0400",n:"+04"}}],["Etc/GMT+5",{s:{f:"+0500",n:"+05"}}],["Etc/GMT+6",{s:{f:"+0600",n:"+06"}}],["Etc/GMT+7",{s:{f:"+0700",n:"+07"}}],["Etc/GMT+8",{s:{f:"+0800",n:"+08"}}],["Etc/GMT+9",{s:{f:"+0900",n:"+09"}}],["Etc/GMT0",{s:{f:"+0000",n:"GMT"}}],["Etc/Greenwich",{s:{f:"+0000",n:"GMT"}}],["Etc/UCT",{s:{f:"+0000",n:"UCT"}}],["Etc/Universal",{s:{f:"+0000",n:"UTC"}}],["Etc/UTC",{s:{f:"+0000",n:"UTC"}}],["Etc/Zulu",{s:{f:"+0000",n:"UTC"}}],["Europe/Amsterdam",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Andorra",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Astrakhan",{s:{f:"+0400",n:"+04"}}],["Europe/Athens",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Belgrade",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Berlin",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Bratislava",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Brussels",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Bucharest",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Budapest",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Busingen",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Chisinau",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Copenhagen",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Dublin",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"IST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Gibraltar",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Guernsey",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Helsinki",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Isle_of_Man",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Istanbul",{s:{f:"+0300",n:"+03"}}],["Europe/Jersey",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Kaliningrad",{s:{f:"+0200",n:"EET"}}],["Europe/Kiev",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Kirov",{s:{f:"+0300",n:"+03"}}],["Europe/Lisbon",{s:{f:"+0100",t:"+0000",n:"WET",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"WEST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Ljubljana",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/London",{s:{f:"+0100",t:"+0000",n:"GMT",s:"19701025T020000",r:{m:10,d:"-1SU"}},d:{f:"+0000",t:"+0100",n:"BST",s:"19700329T010000",r:{m:3,d:"-1SU"}}}],["Europe/Luxembourg",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Madrid",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Malta",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Mariehamn",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Minsk",{s:{f:"+0300",n:"+03"}}],["Europe/Monaco",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Moscow",{s:{f:"+0300",n:"MSK"}}],["Europe/Nicosia",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Oslo",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Paris",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Podgorica",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Prague",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Riga",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Rome",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Samara",{s:{f:"+0400",n:"+04"}}],["Europe/San_Marino",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Sarajevo",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Saratov",{s:{f:"+0400",n:"+04"}}],["Europe/Simferopol",{s:{f:"+0300",n:"MSK"}}],["Europe/Skopje",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Sofia",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Stockholm",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Tallinn",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Tirane",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Ulyanovsk",{s:{f:"+0400",n:"+04"}}],["Europe/Uzhgorod",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Vaduz",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Vatican",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Vienna",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Vilnius",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Volgograd",{s:{f:"+0400",n:"+04"}}],["Europe/Warsaw",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Zagreb",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Europe/Zaporozhye",{s:{f:"+0300",t:"+0200",n:"EET",s:"19701025T040000",r:{m:10,d:"-1SU"}},d:{f:"+0200",t:"+0300",n:"EEST",s:"19700329T030000",r:{m:3,d:"-1SU"}}}],["Europe/Zurich",{s:{f:"+0200",t:"+0100",n:"CET",s:"19701025T030000",r:{m:10,d:"-1SU"}},d:{f:"+0100",t:"+0200",n:"CEST",s:"19700329T020000",r:{m:3,d:"-1SU"}}}],["Indian/Antananarivo",{s:{f:"+0300",n:"EAT"}}],["Indian/Chagos",{s:{f:"+0600",n:"+06"}}],["Indian/Christmas",{s:{f:"+0700",n:"+07"}}],["Indian/Cocos",{s:{f:"+0630",n:"+0630"}}],["Indian/Comoro",{s:{f:"+0300",n:"EAT"}}],["Indian/Kerguelen",{s:{f:"+0500",n:"+05"}}],["Indian/Mahe",{s:{f:"+0400",n:"+04"}}],["Indian/Maldives",{s:{f:"+0500",n:"+05"}}],["Indian/Mauritius",{s:{f:"+0400",n:"+04"}}],["Indian/Mayotte",{s:{f:"+0300",n:"EAT"}}],["Indian/Reunion",{s:{f:"+0400",n:"+04"}}],["Pacific/Apia",{s:{f:"+1400",t:"+1300",n:"+13",s:"19700405T040000",r:{m:4,d:"1SU"}},d:{f:"+1300",t:"+1400",n:"+14",s:"19700927T030000",r:{m:9,d:"-1SU"}}}],["Pacific/Auckland",{s:{f:"+1300",t:"+1200",n:"NZST",s:"19700405T030000",r:{m:4,d:"1SU"}},d:{f:"+1200",t:"+1300",n:"NZDT",s:"19700927T020000",r:{m:9,d:"-1SU"}}}],["Pacific/Bougainville",{s:{f:"+1100",n:"+11"}}],["Pacific/Chatham",{s:{f:"+1345",t:"+1245",n:"+1245",s:"19700405T034500",r:{m:4,d:"1SU"}},d:{f:"+1245",t:"+1345",n:"+1345",s:"19700927T024500",r:{m:9,d:"-1SU"}}}],["Pacific/Chuuk",{s:{f:"+1000",n:"+10"}}],["Pacific/Easter",{s:{f:"-0500",t:"-0600",n:"-06",s:"19700404T220000",r:{m:4,d:"1SA"}},d:{f:"-0600",t:"-0500",n:"-05",s:"19700905T220000",r:{m:9,d:"1SA"}}}],["Pacific/Efate",{s:{f:"+1100",n:"+11"}}],["Pacific/Enderbury",{s:{f:"+1300",n:"+13"}}],["Pacific/Fakaofo",{s:{f:"+1300",n:"+13"}}],["Pacific/Fiji",{s:{f:"+1300",t:"+1200",n:"+12",s:"19700118T030000",r:{m:1,d:"-2SU"}},d:{f:"+1200",t:"+1300",n:"+13",s:"19701101T020000",r:{m:11,d:"1SU"}}}],["Pacific/Funafuti",{s:{f:"+1200",n:"+12"}}],["Pacific/Galapagos",{s:{f:"-0600",n:"-06"}}],["Pacific/Gambier",{s:{f:"-0900",n:"-09"}}],["Pacific/Guadalcanal",{s:{f:"+1100",n:"+11"}}],["Pacific/Guam",{s:{f:"+1000",n:"ChST"}}],["Pacific/Honolulu",{s:{f:"-1000",n:"HST"}}],["Pacific/Kiritimati",{s:{f:"+1400",n:"+14"}}],["Pacific/Kosrae",{s:{f:"+1100",n:"+11"}}],["Pacific/Kwajalein",{s:{f:"+1200",n:"+12"}}],["Pacific/Majuro",{s:{f:"+1200",n:"+12"}}],["Pacific/Marquesas",{s:{f:"-0930",n:"-0930"}}],["Pacific/Midway",{s:{f:"-1100",n:"SST"}}],["Pacific/Nauru",{s:{f:"+1200",n:"+12"}}],["Pacific/Niue",{s:{f:"-1100",n:"-11"}}],["Pacific/Norfolk",{s:{f:"+1100",n:"+11"}}],["Pacific/Noumea",{s:{f:"+1100",n:"+11"}}],["Pacific/Pago_Pago",{s:{f:"-1100",n:"SST"}}],["Pacific/Palau",{s:{f:"+0900",n:"+09"}}],["Pacific/Pitcairn",{s:{f:"-0800",n:"-08"}}],["Pacific/Pohnpei",{s:{f:"+1100",n:"+11"}}],["Pacific/Port_Moresby",{s:{f:"+1000",n:"+10"}}],["Pacific/Rarotonga",{s:{f:"-1000",n:"-10"}}],["Pacific/Saipan",{s:{f:"+1000",n:"ChST"}}],["Pacific/Tahiti",{s:{f:"-1000",n:"-10"}}],["Pacific/Tarawa",{s:{f:"+1200",n:"+12"}}],["Pacific/Tongatapu",{s:{f:"+1300",n:"+13"}}],["Pacific/Wake",{s:{f:"+1200",n:"+12"}}],["Pacific/Wallis",{s:{f:"+1200",n:"+12"}}]])),Jt}var Ir;function Gs(){if(Ir)return $t;Ir=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.getZoneString=$t.getZoneLines=void 0;const n=Hs();function t(s){const{n:i,f:o,t:a,r:h,s:c}=s;return[`TZNAME:${i}`,`TZOFFSETFROM:${o}`,`TZOFFSETTO:${a||o}`,`DTSTART:${c||n.defaultStart}`,...h?[`RRULE:FREQ=${h.f||"YEARLY"};BYMONTH=${h.m};BYDAY=${h.d}`]:[]]}function e(s,i=!0){const o=n.zonesMap.get(s);if(o){const{s:a,d:h}=o;return[...i?["BEGIN:VTIMEZONE"]:[],`TZID:${s}`,"BEGIN:STANDARD",...t(a),"END:STANDARD",...h?["BEGIN:DAYLIGHT",...t(h),"END:DAYLIGHT"]:[],...i?["END:VTIMEZONE"]:[]]}}$t.getZoneLines=e;function r(s,i=!0){return e(s,i)?.join(`\r
`)}return $t.getZoneString=r,$t}var Ks=Gs();class je{static fromString(t){return new je(t)}constructor(t){this.value=t}icaltype="binary";decodeValue(){return this._b64_decode(this.value)}setEncodedValue(t){this.value=this._b64_encode(t)}_b64_encode(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,s,i,o,a,h,c,l,u=0,d=0,m="",p=[];if(!t)return t;do r=t.charCodeAt(u++),s=t.charCodeAt(u++),i=t.charCodeAt(u++),l=r<<16|s<<8|i,o=l>>18&63,a=l>>12&63,h=l>>6&63,c=l&63,p[d++]=e.charAt(o)+e.charAt(a)+e.charAt(h)+e.charAt(c);while(u<t.length);m=p.join("");let f=t.length%3;return(f?m.slice(0,f-3):m)+"===".slice(f||3)}_b64_decode(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,s,i,o,a,h,c,l,u=0,d=0,m="",p=[];if(!t)return t;t+="";do o=e.indexOf(t.charAt(u++)),a=e.indexOf(t.charAt(u++)),h=e.indexOf(t.charAt(u++)),c=e.indexOf(t.charAt(u++)),l=o<<18|a<<12|h<<6|c,r=l>>16&255,s=l>>8&255,i=l&255,h==64?p[d++]=String.fromCharCode(r):c==64?p[d++]=String.fromCharCode(r,s):p[d++]=String.fromCharCode(r,s,i);while(u<t.length);return m=p.join(""),m}toString(){return this.value}}const qs=/([PDWHMTS]{1,1})/,Zs=["weeks","days","hours","minutes","seconds","isNegative"];class it{static fromSeconds(t){return new it().fromSeconds(t)}static isValueString(t){return t[0]==="P"||t[1]==="P"}static fromString(t){let e=0,r=Object.create(null),s=0;for(;(e=t.search(qs))!==-1;){let i=t[e],o=t.slice(0,Math.max(0,e));t=t.slice(e+1),s+=Js(i,o,r)}if(s<2)throw new Error('invalid duration value: Not enough duration components in "'+t+'"');return new it(r)}static fromData(t){return new it(t)}constructor(t){this.wrappedJSObject=this,this.fromData(t)}weeks=0;days=0;hours=0;minutes=0;seconds=0;isNegative=!1;icalclass="icalduration";icaltype="duration";clone(){return it.fromData(this)}toSeconds(){let t=this.seconds+60*this.minutes+3600*this.hours+86400*this.days+604800*this.weeks;return this.isNegative?-t:t}fromSeconds(t){let e=Math.abs(t);return this.isNegative=t<0,this.days=Q(e/86400),this.days%7==0?(this.weeks=this.days/7,this.days=0):this.weeks=0,e-=(this.days+7*this.weeks)*86400,this.hours=Q(e/3600),e-=this.hours*3600,this.minutes=Q(e/60),e-=this.minutes*60,this.seconds=e,this}fromData(t){for(let e of Zs)t&&e in t?this[e]=t[e]:this[e]=0}reset(){this.isNegative=!1,this.weeks=0,this.days=0,this.hours=0,this.minutes=0,this.seconds=0}compare(t){let e=this.toSeconds(),r=t.toSeconds();return(e>r)-(e<r)}normalize(){this.fromSeconds(this.toSeconds())}toString(){if(this.toSeconds()==0)return"PT0S";{let t="";this.isNegative&&(t+="-"),t+="P";let e=!1;return this.weeks?this.days||this.hours||this.minutes||this.seconds?t+=this.weeks*7+this.days+"D":(t+=this.weeks+"W",e=!0):this.days&&(t+=this.days+"D"),e||(this.hours||this.minutes||this.seconds)&&(t+="T",this.hours&&(t+=this.hours+"H"),this.minutes&&(t+=this.minutes+"M"),this.seconds&&(t+=this.seconds+"S")),t}}toICALString(){return this.toString()}}function Js(n,t,e){let r;switch(n){case"P":t&&t==="-"?e.isNegative=!0:e.isNegative=!1;break;case"D":r="days";break;case"W":r="weeks";break;case"H":r="hours";break;case"M":r="minutes";break;case"S":r="seconds";break;default:return 0}if(r){if(!t&&t!==0)throw new Error('invalid duration value: Missing number before "'+n+'"');let s=parseInt(t,10);if(le(s))throw new Error('invalid duration value: Invalid number "'+t+'" before "'+n+'"');e[r]=s}return 1}class Pt{static fromString(t,e){let r=t.split("/");if(r.length!==2)throw new Error('Invalid string value: "'+t+'" must contain a "/" char.');let s={start:D.fromDateTimeString(r[0],e)},i=r[1];return it.isValueString(i)?s.duration=it.fromString(i):s.end=D.fromDateTimeString(i,e),new Pt(s)}static fromData(t){return new Pt(t)}static fromJSON(t,e,r){function s(i,o){return r?D.fromString(i,o):D.fromDateTimeString(i,o)}return it.isValueString(t[1])?Pt.fromData({start:s(t[0],e),duration:it.fromString(t[1])}):Pt.fromData({start:s(t[0],e),end:s(t[1],e)})}constructor(t){if(this.wrappedJSObject=this,t&&"start"in t){if(t.start&&!(t.start instanceof D))throw new TypeError(".start must be an instance of ICAL.Time");this.start=t.start}if(t&&t.end&&t.duration)throw new Error("cannot accept both end and duration");if(t&&"end"in t){if(t.end&&!(t.end instanceof D))throw new TypeError(".end must be an instance of ICAL.Time");this.end=t.end}if(t&&"duration"in t){if(t.duration&&!(t.duration instanceof it))throw new TypeError(".duration must be an instance of ICAL.Duration");this.duration=t.duration}}start=null;end=null;duration=null;icalclass="icalperiod";icaltype="period";clone(){return Pt.fromData({start:this.start?this.start.clone():null,end:this.end?this.end.clone():null,duration:this.duration?this.duration.clone():null})}getDuration(){return this.duration?this.duration:this.end.subtractDate(this.start)}getEnd(){if(this.end)return this.end;{let t=this.start.clone();return t.addDuration(this.duration),t}}compare(t){return t.compare(this.start)<0?1:t.compare(this.getEnd())>0?-1:0}toString(){return this.start+"/"+(this.end||this.duration)}toJSON(){return[this.start.toString(),(this.end||this.duration).toString()]}toICALString(){return this.start.toICALString()+"/"+(this.end||this.duration).toICALString()}}class D{static _dowCache={};static _wnCache={};static daysInMonth(t,e){let r=[0,31,28,31,30,31,30,31,31,30,31,30,31],s=30;return t<1||t>12||(s=r[t],t==2&&(s+=D.isLeapYear(e))),s}static isLeapYear(t){return t<=1752?t%4==0:t%4==0&&t%100!=0||t%400==0}static fromDayOfYear(t,e){let r=e,s=t,i=new D;i.auto_normalize=!1;let o=D.isLeapYear(r)?1:0;if(s<1)return r--,o=D.isLeapYear(r)?1:0,s+=D.daysInYearPassedMonth[o][12],D.fromDayOfYear(s,r);if(s>D.daysInYearPassedMonth[o][12])return o=D.isLeapYear(r)?1:0,s-=D.daysInYearPassedMonth[o][12],r++,D.fromDayOfYear(s,r);i.year=r,i.isDate=!0;for(let a=11;a>=0;a--)if(s>D.daysInYearPassedMonth[o][a]){i.month=a+1,i.day=s-D.daysInYearPassedMonth[o][a];break}return i.auto_normalize=!0,i}static fromStringv2(t){return new D({year:parseInt(t.slice(0,4),10),month:parseInt(t.slice(5,7),10),day:parseInt(t.slice(8,10),10),isDate:!0})}static fromDateString(t){return new D({year:nt(t.slice(0,4)),month:nt(t.slice(5,7)),day:nt(t.slice(8,10)),isDate:!0})}static fromDateTimeString(t,e){if(t.length<19)throw new Error('invalid date-time value: "'+t+'"');let r,s;t.slice(-1)==="Z"?r=O.utcTimezone:e&&(s=e.getParameter("tzid"),e.parent&&(e.parent.name==="standard"||e.parent.name==="daylight"?r=O.localTimezone:s&&(r=e.parent.getTimeZoneByID(s))));const i={year:nt(t.slice(0,4)),month:nt(t.slice(5,7)),day:nt(t.slice(8,10)),hour:nt(t.slice(11,13)),minute:nt(t.slice(14,16)),second:nt(t.slice(17,19))};return s&&!r&&(i.timezone=s),new D(i,r)}static fromString(t,e){return t.length>10?D.fromDateTimeString(t,e):D.fromDateString(t)}static fromJSDate(t,e){return new D().fromJSDate(t,e)}static fromData=function(t,e){return new D().fromData(t,e)};static now(){return D.fromJSDate(new Date,!1)}static weekOneStarts(t,e){let r=D.fromData({year:t,month:1,day:1,isDate:!0}),s=r.dayOfWeek(),i=e||D.DEFAULT_WEEK_START;return s>D.THURSDAY&&(r.day+=7),i>D.THURSDAY&&(r.day-=7),r.day-=s-i,r}static getDominicalLetter(t){let e="GFEDCBA",r=(t+(t/4|0)+(t/400|0)-(t/100|0)-1)%7;return D.isLeapYear(t)?e[(r+6)%7]+e[r]:e[r]}static#t=null;static get epochTime(){return this.#t||(this.#t=D.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:"Z"})),this.#t}static _cmp_attr(t,e,r){return t[r]>e[r]?1:t[r]<e[r]?-1:0}static daysInYearPassedMonth=[[0,31,59,90,120,151,181,212,243,273,304,334,365],[0,31,60,91,121,152,182,213,244,274,305,335,366]];static SUNDAY=1;static MONDAY=2;static TUESDAY=3;static WEDNESDAY=4;static THURSDAY=5;static FRIDAY=6;static SATURDAY=7;static DEFAULT_WEEK_START=2;constructor(t,e){this.wrappedJSObject=this,this._time=Object.create(null),this._time.year=0,this._time.month=1,this._time.day=1,this._time.hour=0,this._time.minute=0,this._time.second=0,this._time.isDate=!1,this.fromData(t,e)}icalclass="icaltime";_cachedUnixTime=null;get icaltype(){return this.isDate?"date":"date-time"}zone=null;_pendingNormalization=!1;get year(){return this._getTimeAttr("year")}set year(t){this._setTimeAttr("year",t)}get month(){return this._getTimeAttr("month")}set month(t){this._setTimeAttr("month",t)}get day(){return this._getTimeAttr("day")}set day(t){this._setTimeAttr("day",t)}get hour(){return this._getTimeAttr("hour")}set hour(t){this._setTimeAttr("hour",t)}get minute(){return this._getTimeAttr("minute")}set minute(t){this._setTimeAttr("minute",t)}get second(){return this._getTimeAttr("second")}set second(t){this._setTimeAttr("second",t)}get isDate(){return this._getTimeAttr("isDate")}set isDate(t){this._setTimeAttr("isDate",t)}_getTimeAttr(t){return this._pendingNormalization&&(this._normalize(),this._pendingNormalization=!1),this._time[t]}_setTimeAttr(t,e){t==="isDate"&&e&&!this._time.isDate&&this.adjust(0,0,0,0),this._cachedUnixTime=null,this._pendingNormalization=!0,this._time[t]=e}clone(){return new D(this._time,this.zone)}reset(){this.fromData(D.epochTime),this.zone=O.utcTimezone}resetTo(t,e,r,s,i,o,a){this.fromData({year:t,month:e,day:r,hour:s,minute:i,second:o,zone:a})}fromJSDate(t,e){return t?e?(this.zone=O.utcTimezone,this.year=t.getUTCFullYear(),this.month=t.getUTCMonth()+1,this.day=t.getUTCDate(),this.hour=t.getUTCHours(),this.minute=t.getUTCMinutes(),this.second=t.getUTCSeconds()):(this.zone=O.localTimezone,this.year=t.getFullYear(),this.month=t.getMonth()+1,this.day=t.getDate(),this.hour=t.getHours(),this.minute=t.getMinutes(),this.second=t.getSeconds()):this.reset(),this._cachedUnixTime=null,this}fromData(t,e){if(t)for(let[r,s]of Object.entries(t))r!=="icaltype"&&(this[r]=s);if(e&&(this.zone=e),t&&!("isDate"in t)?this.isDate=!("hour"in t):t&&"isDate"in t&&(this.isDate=t.isDate),t&&"timezone"in t){let r=xe.get(t.timezone);this.zone=r||O.localTimezone}return t&&"zone"in t&&(this.zone=t.zone),this.zone||(this.zone=O.localTimezone),this._cachedUnixTime=null,this}dayOfWeek(t){let e=t||D.SUNDAY,r=(this.year<<12)+(this.month<<8)+(this.day<<3)+e;if(r in D._dowCache)return D._dowCache[r];let s=this.day,i=this.month+(this.month<3?12:0),o=this.year-(this.month<3?1:0),a=s+o+Q((i+1)*26/10)+Q(o/4);return a+=Q(o/100)*6+Q(o/400),a=(a+7-e)%7+1,D._dowCache[r]=a,a}dayOfYear(){let t=D.isLeapYear(this.year)?1:0;return D.daysInYearPassedMonth[t][this.month-1]+this.day}startOfWeek(t){let e=t||D.SUNDAY,r=this.clone();return r.day-=(this.dayOfWeek()+7-e)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r}endOfWeek(t){let e=t||D.SUNDAY,r=this.clone();return r.day+=(7-this.dayOfWeek()+e-D.SUNDAY)%7,r.isDate=!0,r.hour=0,r.minute=0,r.second=0,r}startOfMonth(){let t=this.clone();return t.day=1,t.isDate=!0,t.hour=0,t.minute=0,t.second=0,t}endOfMonth(){let t=this.clone();return t.day=D.daysInMonth(t.month,t.year),t.isDate=!0,t.hour=0,t.minute=0,t.second=0,t}startOfYear(){let t=this.clone();return t.day=1,t.month=1,t.isDate=!0,t.hour=0,t.minute=0,t.second=0,t}endOfYear(){let t=this.clone();return t.day=31,t.month=12,t.isDate=!0,t.hour=0,t.minute=0,t.second=0,t}startDoyWeek(t){let e=t||D.SUNDAY,r=this.dayOfWeek()-e;return r<0&&(r+=7),this.dayOfYear()-r}getDominicalLetter(){return D.getDominicalLetter(this.year)}nthWeekDay(t,e){let r=D.daysInMonth(this.month,this.year),s,i=e,o=0,a=this.clone();if(i>=0){a.day=1,i!=0&&i--,o=a.day;let h=a.dayOfWeek(),c=t-h;c<0&&(c+=7),o+=c,o-=t,s=t}else{a.day=r;let h=a.dayOfWeek();i++,s=h-t,s<0&&(s+=7),s=r-s}return s+=i*7,o+s}isNthWeekDay(t,e){let r=this.dayOfWeek();return e===0&&r===t||this.nthWeekDay(t,e)===this.day}weekNumber(t){let e=(this.year<<12)+(this.month<<8)+(this.day<<3)+t;if(e in D._wnCache)return D._wnCache[e];let r,s=this.clone();s.isDate=!0;let i=this.year;s.month==12&&s.day>25?(r=D.weekOneStarts(i+1,t),s.compare(r)<0?r=D.weekOneStarts(i,t):i++):(r=D.weekOneStarts(i,t),s.compare(r)<0&&(r=D.weekOneStarts(--i,t)));let o=s.subtractDate(r).toSeconds()/86400,a=Q(o/7)+1;return D._wnCache[e]=a,a}addDuration(t){let e=t.isNegative?-1:1,r=this.second,s=this.minute,i=this.hour,o=this.day;r+=e*t.seconds,s+=e*t.minutes,i+=e*t.hours,o+=e*t.days,o+=e*7*t.weeks,this.second=r,this.minute=s,this.hour=i,this.day=o,this._cachedUnixTime=null}subtractDate(t){let e=this.toUnixTime()+this.utcOffset(),r=t.toUnixTime()+t.utcOffset();return it.fromSeconds(e-r)}subtractDateTz(t){let e=this.toUnixTime(),r=t.toUnixTime();return it.fromSeconds(e-r)}compare(t){if(t instanceof Pt)return-1*t.compare(this);{let e=this.toUnixTime(),r=t.toUnixTime();return e>r?1:r>e?-1:0}}compareDateOnlyTz(t,e){let r=this.convertToZone(e),s=t.convertToZone(e),i=0;return(i=D._cmp_attr(r,s,"year"))!=0||(i=D._cmp_attr(r,s,"month"))!=0||(i=D._cmp_attr(r,s,"day"))!=0,i}convertToZone(t){let e=this.clone(),r=this.zone.tzid==t.tzid;return!this.isDate&&!r&&O.convert_time(e,this.zone,t),e.zone=t,e}utcOffset(){return this.zone==O.localTimezone||this.zone==O.utcTimezone?0:this.zone.utcOffset(this)}toICALString(){let t=this.toString();return t.length>10?H.icalendar.value["date-time"].toICAL(t):H.icalendar.value.date.toICAL(t)}toString(){let t=this.year+"-"+mt(this.month)+"-"+mt(this.day);return this.isDate||(t+="T"+mt(this.hour)+":"+mt(this.minute)+":"+mt(this.second),this.zone===O.utcTimezone&&(t+="Z")),t}toJSDate(){return this.zone==O.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(this.toUnixTime()*1e3)}_normalize(){return this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this}adjust(t,e,r,s,i){let o,a,h=0,c=0,l,u,d,m,p,f=i||this._time;if(f.isDate||(l=f.second+s,f.second=l%60,o=Q(l/60),f.second<0&&(f.second+=60,o--),u=f.minute+r+o,f.minute=u%60,a=Q(u/60),f.minute<0&&(f.minute+=60,a--),d=f.hour+e+a,f.hour=d%24,h=Q(d/24),f.hour<0&&(f.hour+=24,h--)),f.month>12?c=Q((f.month-1)/12):f.month<1&&(c=Q(f.month/12)-1),f.year+=c,f.month-=12*c,m=f.day+t+h,m>0)for(;p=D.daysInMonth(f.month,f.year),!(m<=p);)f.month++,f.month>12&&(f.year++,f.month=1),m-=p;else for(;m<=0;)f.month==1?(f.year--,f.month=12):f.month--,m+=D.daysInMonth(f.month,f.year);return f.day=m,this._cachedUnixTime=null,this}fromUnixTime(t){this.zone=O.utcTimezone;let e=new Date(t*1e3);this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this._time.isDate?(this.hour=0,this.minute=0,this.second=0):(this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()),this._cachedUnixTime=null}toUnixTime(){if(this._cachedUnixTime!==null)return this._cachedUnixTime;let t=this.utcOffset(),e=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-t);return this._cachedUnixTime=e/1e3,this._cachedUnixTime}toJSON(){let t=["year","month","day","hour","minute","second","isDate"],e=Object.create(null),r=0,s=t.length,i;for(;r<s;r++)i=t[r],e[i]=this[i];return this.zone&&(e.timezone=this.zone.tzid),e}}const Xs=/[^ \t]/,me=":",ze=";",Qs="=",ti="unknown",ei="text",ri={"^'":'"',"^n":`
`,"^^":"^"};function k(n){let t={},e=t.component=[];if(t.stack=[e],k._eachLine(n,function(r,s){k._handleContentLine(s,t)}),t.stack.length>1)throw new Ft("invalid ical body. component began but did not end");return t=null,e.length==1?e[0]:e}k.property=function(n,t){let e={component:[[],[]],designSet:t||H.defaultSet};return k._handleContentLine(n,e),e.component[1][0]},k.component=function(n){return k(n)};class Ft extends Error{name=this.constructor.name}k.ParserError=Ft,k._handleContentLine=function(n,t){let e=n.indexOf(me),r=n.indexOf(ze),s,i,o,a,h={};r!==-1&&e!==-1&&r>e&&(r=-1);let c;if(r!==-1){if(o=n.slice(0,Math.max(0,r)).toLowerCase(),c=k._parseParameters(n.slice(Math.max(0,r)),0,t.designSet),c[2]==-1)throw new Ft("Invalid parameters in '"+n+"'");h=c[0];let A;if(typeof c[1]=="string"?A=c[1].length:A=c[1].reduce((g,T)=>g+T.length,0),s=A+c[2]+r,(i=n.slice(Math.max(0,s)).indexOf(me))!==-1)a=n.slice(Math.max(0,s+i+1));else throw new Ft("Missing parameter value in '"+n+"'")}else if(e!==-1){if(o=n.slice(0,Math.max(0,e)).toLowerCase(),a=n.slice(Math.max(0,e+1)),o==="begin"){let A=[a.toLowerCase(),[],[]];t.stack.length===1?t.component.push(A):t.component[2].push(A),t.stack.push(t.component),t.component=A,t.designSet||(t.designSet=H.getDesignSet(t.component[0]));return}else if(o==="end"){t.component=t.stack.pop();return}}else throw new Ft('invalid line (no token ";" or ":") "'+n+'"');let l,u=!1,d=!1,m,p,f;t.designSet.propertyGroups&&o.indexOf(".")!==-1?(p=o.split("."),h.group=p[0],f=p[1]):f=o,f in t.designSet.property&&(m=t.designSet.property[f],"multiValue"in m&&(u=m.multiValue),"structuredValue"in m&&(d=m.structuredValue),a&&"detectType"in m&&(l=m.detectType(a))),l||("value"in h?l=h.value.toLowerCase():m?l=m.defaultType:l=ti),delete h.value;let y;u&&d?(a=k._parseMultiValue(a,d,l,[],u,t.designSet,d),y=[f,h,l,a]):u?(y=[f,h,l],k._parseMultiValue(a,u,l,y,null,t.designSet,!1)):d?(a=k._parseMultiValue(a,d,l,[],null,t.designSet,d),y=[f,h,l,a]):(a=k._parseValue(a,l,t.designSet,!1),y=[f,h,l,a]),t.component[0]==="vcard"&&t.component[1].length===0&&!(o==="version"&&a==="4.0")&&(t.designSet=H.getDesignSet("vcard3")),t.component[1].push(y)},k._parseValue=function(n,t,e,r){return t in e.value&&"fromICAL"in e.value[t]?e.value[t].fromICAL(n,r):n},k._parseParameters=function(n,t,e){let r=t,s=0,i=Qs,o={},a,h,c,l=-1,u,d,m;for(;s!==!1&&(s=n.indexOf(i,s+1))!==-1;){if(a=n.slice(r+1,s),a.length==0)throw new Ft("Empty parameter name in '"+n+"'");if(h=a.toLowerCase(),m=!1,d=!1,h in e.param&&e.param[h].valueType?u=e.param[h].valueType:u=ei,h in e.param&&(d=e.param[h].multiValue,e.param[h].multiValueSeparateDQuote&&(m=k._rfc6868Escape('"'+d+'"'))),n[s+1]==='"'){if(l=s+2,s=n.indexOf('"',l),d&&s!=-1){let y=!0;for(;y;)n[s+1]==d&&n[s+2]=='"'?s=n.indexOf('"',s+3):y=!1}if(s===-1)throw new Ft('invalid line (no matching double quote) "'+n+'"');c=n.slice(l,s),r=n.indexOf(ze,s);let f=n.indexOf(me,s);(r===-1||f!==-1&&r>f)&&(s=!1)}else{l=s+1;let f=n.indexOf(ze,l),y=n.indexOf(me,l);y!==-1&&f>y?(f=y,s=!1):f===-1?(y===-1?f=n.length:f=y,s=!1):(r=f,s=f),c=n.slice(l,f)}const p=c.length;if(c=k._rfc6868Escape(c),l+=p-c.length,d){let f=m||d;c=k._parseMultiValue(c,f,u,[],null,e)}else c=k._parseValue(c,u,e);d&&h in o?Array.isArray(o[h])?o[h].push(c):o[h]=[o[h],c]:o[h]=c}return[o,c,l]},k._rfc6868Escape=function(n){return n.replace(/\^['n^]/g,function(t){return ri[t]})},k._parseMultiValue=function(n,t,e,r,s,i,o){let a=0,h=0,c;if(t.length===0)return n;for(;(a=gn(n,t,h))!==-1;)c=n.slice(h,a),s?c=k._parseMultiValue(c,s,e,[],null,i,o):c=k._parseValue(c,e,i,o),r.push(c),h=a+t.length;return c=n.slice(h),s?c=k._parseMultiValue(c,s,e,[],null,i,o):c=k._parseValue(c,e,i,o),r.push(c),r.length==1?r[0]:r},k._eachLine=function(n,t){let e=n.length,r=n.search(Xs),s=r,i,o,a;do s=n.indexOf(`
`,r)+1,s>1&&n[s-2]==="\r"?a=2:a=1,s===0&&(s=e,a=0),o=n[r],o===" "||o===" "?i+=n.slice(r+1,s-a):(i&&t(null,i),i=n.slice(r,s-a)),r=s;while(s!==e);i=i.trim(),i.length&&t(null,i)};const ni=["tzid","location","tznames","latitude","longitude"];class O{static _compare_change_fn(t,e){return t.year<e.year?-1:t.year>e.year?1:t.month<e.month?-1:t.month>e.month?1:t.day<e.day?-1:t.day>e.day?1:t.hour<e.hour?-1:t.hour>e.hour?1:t.minute<e.minute?-1:t.minute>e.minute?1:t.second<e.second?-1:t.second>e.second?1:0}static convert_time(t,e,r){if(t.isDate||e.tzid==r.tzid||e==O.localTimezone||r==O.localTimezone)return t.zone=r,t;let s=e.utcOffset(t);return t.adjust(0,0,0,-s),s=r.utcOffset(t),t.adjust(0,0,0,s),null}static fromData(t){return new O().fromData(t)}static#t=null;static get utcTimezone(){return this.#t||(this.#t=O.fromData({tzid:"UTC"})),this.#t}static#r=null;static get localTimezone(){return this.#r||(this.#r=O.fromData({tzid:"floating"})),this.#r}static adjust_change(t,e,r,s,i){return D.prototype.adjust.call(t,e,r,s,i,t)}static _minimumExpansionYear=-1;static EXTRA_COVERAGE=5;constructor(t){this.wrappedJSObject=this,this.fromData(t)}tzid="";location="";tznames="";latitude=0;longitude=0;component=null;expandedUntilYear=0;icalclass="icaltimezone";fromData(t){if(this.expandedUntilYear=0,this.changes=[],t instanceof St)this.component=t;else{if(t&&"component"in t)if(typeof t.component=="string"){let e=k(t.component);this.component=new St(e)}else t.component instanceof St?this.component=t.component:this.component=null;for(let e of ni)t&&e in t&&(this[e]=t[e])}return this.component instanceof St&&!this.tzid&&(this.tzid=this.component.getFirstPropertyValue("tzid")),this}utcOffset(t){if(this==O.utcTimezone||this==O.localTimezone||(this._ensureCoverage(t.year),!this.changes.length))return 0;let e={year:t.year,month:t.month,day:t.day,hour:t.hour,minute:t.minute,second:t.second},r=this._findNearbyChange(e),s=-1,i=1;for(;;){let a=Kt(this.changes[r],!0);if(a.utcOffset<a.prevUtcOffset?O.adjust_change(a,0,0,0,a.utcOffset):O.adjust_change(a,0,0,0,a.prevUtcOffset),O._compare_change_fn(e,a)>=0?s=r:i=-1,i==-1&&s!=-1)break;if(r+=i,r<0)return 0;if(r>=this.changes.length)break}let o=this.changes[s];if(o.utcOffset-o.prevUtcOffset<0&&s>0){let a=Kt(o,!0);if(O.adjust_change(a,0,0,0,a.prevUtcOffset),O._compare_change_fn(e,a)<0){let h=this.changes[s-1],c=!1;o.is_daylight!=c&&h.is_daylight==c&&(o=h)}}return o.utcOffset}_findNearbyChange(t){let e=Ht(this.changes,t,O._compare_change_fn);return e>=this.changes.length?this.changes.length-1:e}_ensureCoverage(t){if(O._minimumExpansionYear==-1){let r=D.now();O._minimumExpansionYear=r.year}let e=t;if(e<O._minimumExpansionYear&&(e=O._minimumExpansionYear),e+=O.EXTRA_COVERAGE,!this.changes.length||this.expandedUntilYear<t){let r=this.component.getAllSubcomponents(),s=r.length,i=0;for(;i<s;i++)this._expandComponent(r[i],e,this.changes);this.changes.sort(O._compare_change_fn),this.expandedUntilYear=e}}_expandComponent(t,e,r){if(!t.hasProperty("dtstart")||!t.hasProperty("tzoffsetto")||!t.hasProperty("tzoffsetfrom"))return null;let s=t.getFirstProperty("dtstart").getFirstValue(),i;function o(h){return h.factor*(h.hours*3600+h.minutes*60)}function a(){let h={};return h.is_daylight=t.name=="daylight",h.utcOffset=o(t.getFirstProperty("tzoffsetto").getFirstValue()),h.prevUtcOffset=o(t.getFirstProperty("tzoffsetfrom").getFirstValue()),h}if(!t.hasProperty("rrule")&&!t.hasProperty("rdate"))i=a(),i.year=s.year,i.month=s.month,i.day=s.day,i.hour=s.hour,i.minute=s.minute,i.second=s.second,O.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i);else{let h=t.getAllProperties("rdate");for(let l of h){let u=l.getFirstValue();i=a(),i.year=u.year,i.month=u.month,i.day=u.day,u.isDate?(i.hour=s.hour,i.minute=s.minute,i.second=s.second,s.zone!=O.utcTimezone&&O.adjust_change(i,0,0,0,-i.prevUtcOffset)):(i.hour=u.hour,i.minute=u.minute,i.second=u.second,u.zone!=O.utcTimezone&&O.adjust_change(i,0,0,0,-i.prevUtcOffset)),r.push(i)}let c=t.getFirstProperty("rrule");if(c){c=c.getFirstValue(),i=a(),c.until&&c.until.zone==O.utcTimezone&&(c.until.adjust(0,0,0,i.prevUtcOffset),c.until.zone=O.localTimezone);let l=c.iterator(s),u;for(;(u=l.next())&&(i=a(),!(u.year>e||!u));)i.year=u.year,i.month=u.month,i.day=u.day,i.hour=u.hour,i.minute=u.minute,i.second=u.second,i.isDate=u.isDate,O.adjust_change(i,0,0,0,-i.prevUtcOffset),r.push(i)}}return r}toString(){return this.tznames?this.tznames:this.tzid}}let ot=null;const xe={get count(){return ot===null?0:Object.keys(ot).length},reset:function(){ot=Object.create(null);let n=O.utcTimezone;ot.Z=n,ot.UTC=n,ot.GMT=n},_hard_reset:function(){ot=null},has:function(n){return ot===null?!1:!!ot[n]},get:function(n){return ot===null&&this.reset(),ot[n]},register:function(n,t){if(ot===null&&this.reset(),typeof n=="string"&&t instanceof O&&([n,t]=[t,n]),t||(n instanceof O?t=n.tzid:n.name==="vtimezone"&&(n=new O(n),t=n.tzid)),!t)throw new TypeError("Neither a timezone nor a name was passed");if(n instanceof O)ot[t]=n;else throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component")},remove:function(n){return ot===null?null:delete ot[n]}};function si(n){let t,e,r,s,i;if(!n||n.name!=="vcalendar")return n;for(t=n.getAllSubcomponents(),e=[],r={},i=0;i<t.length;i++)if(t[i].name==="vtimezone"){let o=t[i].getFirstProperty("tzid").getFirstValue();r[o]=t[i]}else e=e.concat(t[i].getAllProperties());for(s={},i=0;i<e.length;i++){let o=e[i].getParameter("tzid");o&&(s[o]=!0)}for(let[o,a]of Object.entries(r))s[o]||n.removeSubcomponent(a);for(let o of Object.keys(s))!r[o]&&xe.has(o)&&n.addSubcomponent(xe.get(o).component);return n}function le(n){return typeof n=="number"&&isNaN(n)}function nt(n){let t=parseInt(n,10);if(le(t))throw new Error('Could not extract integer from "'+n+'"');return t}function It(n,t){if(!(typeof n>"u"))return n instanceof t?n:new t(n)}function gn(n,t,e){for(;(e=n.indexOf(t,e))!==-1;)if(e>0&&n[e-1]==="\\")e+=1;else return e;return-1}function Ht(n,t,e){if(!n.length)return 0;let r=0,s=n.length-1,i,o;for(;r<=s;)if(i=r+Math.floor((s-r)/2),o=e(t,n[i]),o<0)s=i-1;else if(o>0)r=i+1;else break;return o<0?i:o>0?i+1:i}function Kt(n,t){if(!n||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if("clone"in n)return n.clone();if(Array.isArray(n)){let e=[];for(let r=0;r<n.length;r++)e.push(t?Kt(n[r],!0):n[r]);return e}else{let e={};for(let[r,s]of Object.entries(n))t?e[r]=Kt(s,!0):e[r]=s;return e}}function yn(n){let t="",e=n||"",r=0,s=0;for(;e.length;){let i=e.codePointAt(r);i<128?++s:i<2048?s+=2:i<65536?s+=3:s+=4,s<Tt.foldLength+1?r+=i>65535?2:1:(t+=Tt.newLineChar+" "+e.slice(0,Math.max(0,r)),e=e.slice(Math.max(0,r)),r=s=0)}return t.slice(Tt.newLineChar.length+1)}function mt(n){switch(typeof n!="string"&&(typeof n=="number"&&(n=parseInt(n)),n=String(n)),n.length){case 0:return"00";case 1:return"0"+n;default:return n}}function Q(n){return n<0?Math.ceil(n):Math.floor(n)}function qt(n,t){for(let e in n){let r=Object.getOwnPropertyDescriptor(n,e);r&&!Object.getOwnPropertyDescriptor(t,e)&&Object.defineProperty(t,e,r)}return t}var ii=Object.freeze({__proto__:null,binsearchInsert:Ht,clone:Kt,extend:qt,foldline:yn,formatClassType:It,isStrictlyNaN:le,pad2:mt,strictParseInt:nt,trunc:Q,unescapedIndexOf:gn,updateTimezones:si});class Dt{static fromString(t){let e={};return e.factor=t[0]==="+"?1:-1,e.hours=nt(t.slice(1,3)),e.minutes=nt(t.slice(4,6)),new Dt(e)}static fromSeconds(t){let e=new Dt;return e.fromSeconds(t),e}constructor(t){this.fromData(t)}hours=0;minutes=0;factor=1;icaltype="utc-offset";clone(){return Dt.fromSeconds(this.toSeconds())}fromData(t){if(t)for(let[e,r]of Object.entries(t))this[e]=r;this._normalize()}fromSeconds(t){let e=Math.abs(t);return this.factor=t<0?-1:1,this.hours=Q(e/3600),e-=this.hours*3600,this.minutes=Q(e/60),this}toSeconds(){return this.factor*(60*this.minutes+3600*this.hours)}compare(t){let e=this.toSeconds(),r=t.toSeconds();return(e>r)-(r>e)}_normalize(){let t=this.toSeconds(),e=this.factor;for(;t<-43200;)t+=97200;for(;t>50400;)t-=97200;this.fromSeconds(t),t==0&&(this.factor=e)}toICALString(){return H.icalendar.value["utc-offset"].toICAL(this.toString())}toString(){return(this.factor==1?"+":"-")+mt(this.hours)+":"+mt(this.minutes)}}class Rt extends D{static fromDateAndOrTimeString(t,e){function r(f,y,A){return f?nt(f.slice(y,y+A)):null}let s=t.split("T"),i=s[0],o=s[1],a=o?H.vcard.value.time._splitZone(o):[],h=a[0],c=a[1],l=i?i.length:0,u=c?c.length:0,d=i&&i[0]=="-"&&i[1]=="-",m=c&&c[0]=="-",p={year:d?null:r(i,0,4),month:d&&(l==4||l==7)?r(i,2,2):l==7||l==10?r(i,5,2):null,day:l==5?r(i,3,2):l==7&&d?r(i,5,2):l==10?r(i,8,2):null,hour:m?null:r(c,0,2),minute:m&&u==3?r(c,1,2):u>4?m?r(c,1,2):r(c,3,2):null,second:u==4?r(c,2,2):u==6?r(c,4,2):u==8?r(c,6,2):null};return h=="Z"?h=O.utcTimezone:h&&h[3]==":"?h=Dt.fromString(h):h=null,new Rt(p,h,e)}constructor(t,e,r){super(t,e),this.icaltype=r||"date-and-or-time"}icalclass="vcardtime";icaltype="date-and-or-time";clone(){return new Rt(this._time,this.zone,this.icaltype)}_normalize(){return this}utcOffset(){return this.zone instanceof Dt?this.zone.toSeconds():D.prototype.utcOffset.apply(this,arguments)}toICALString(){return H.vcard.value[this.icaltype].toICAL(this.toString())}toString(){let t=this.year,e=this.month,r=this.day,s=this.hour,i=this.minute,o=this.second,a=t!==null,h=e!==null,c=r!==null,l=s!==null,u=i!==null,d=o!==null,m=(a?mt(t)+(h||c?"-":""):h||c?"--":"")+(h?mt(e):"")+(c?"-"+mt(r):""),p=(l?mt(s):"-")+(l&&u?":":"")+(u?mt(i):"")+(!l&&!u?"-":"")+(u&&d?":":"")+(d?mt(o):""),f;switch(this.zone===O.utcTimezone?f="Z":this.zone instanceof Dt?f=this.zone.toString():this.zone===O.localTimezone?f="":this.zone instanceof O?f=Dt.fromSeconds(this.zone.utcOffset(this)).toString():f="",this.icaltype){case"time":return p+f;case"date-and-or-time":case"date-time":return m+(p=="--"?"":"T"+p+f);case"date":return m}return null}}class xt{static _indexMap={BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8};static _expandMap={SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]};static UNKNOWN=0;static CONTRACT=1;static EXPAND=2;static ILLEGAL=3;constructor(t){this.fromData(t)}completed=!1;rule=null;dtstart=null;last=null;occurrence_number=0;by_indices=null;initialized=!1;by_data=null;days=null;days_index=0;fromData(t){if(this.rule=It(t.rule,st),!this.rule)throw new Error("iterator requires a (ICAL.Recur) rule");if(this.dtstart=It(t.dtstart,D),!this.dtstart)throw new Error("iterator requires a (ICAL.Time) dtstart");if(t.by_data?this.by_data=t.by_data:this.by_data=Kt(this.rule.parts,!0),t.occurrence_number&&(this.occurrence_number=t.occurrence_number),this.days=t.days||[],t.last&&(this.last=It(t.last,D)),this.by_indices=t.by_indices,this.by_indices||(this.by_indices={BYSECOND:0,BYMINUTE:0,BYHOUR:0,BYDAY:0,BYMONTH:0,BYWEEKNO:0,BYMONTHDAY:0}),this.initialized=t.initialized||!1,!this.initialized)try{this.init()}catch(e){if(e instanceof pe)this.completed=!0;else throw e}}init(){this.initialized=!0,this.last=this.dtstart.clone();let t=this.by_data;if("BYDAY"in t&&this.sort_byday_rules(t.BYDAY),"BYYEARDAY"in t&&("BYMONTH"in t||"BYWEEKNO"in t||"BYMONTHDAY"in t))throw new Error("Invalid BYYEARDAY rule");if("BYWEEKNO"in t&&"BYMONTHDAY"in t)throw new Error("BYWEEKNO does not fit to BYMONTHDAY");if(this.rule.freq=="MONTHLY"&&("BYYEARDAY"in t||"BYWEEKNO"in t))throw new Error("For MONTHLY recurrences neither BYYEARDAY nor BYWEEKNO may appear");if(this.rule.freq=="WEEKLY"&&("BYYEARDAY"in t||"BYMONTHDAY"in t))throw new Error("For WEEKLY recurrences neither BYMONTHDAY nor BYYEARDAY may appear");if(this.rule.freq!="YEARLY"&&"BYYEARDAY"in t)throw new Error("BYYEARDAY may only appear in YEARLY rules");if(this.last.second=this.setup_defaults("BYSECOND","SECONDLY",this.dtstart.second),this.last.minute=this.setup_defaults("BYMINUTE","MINUTELY",this.dtstart.minute),this.last.hour=this.setup_defaults("BYHOUR","HOURLY",this.dtstart.hour),this.last.day=this.setup_defaults("BYMONTHDAY","DAILY",this.dtstart.day),this.last.month=this.setup_defaults("BYMONTH","MONTHLY",this.dtstart.month),this.rule.freq=="WEEKLY")if("BYDAY"in t){let[,e]=this.ruleDayOfWeek(t.BYDAY[0],this.rule.wkst),r=e-this.last.dayOfWeek(this.rule.wkst);(this.last.dayOfWeek(this.rule.wkst)<e&&r>=0||r<0)&&(this.last.day+=r)}else{let e=st.numericDayToIcalDay(this.dtstart.dayOfWeek());t.BYDAY=[e]}if(this.rule.freq=="YEARLY"){const e=this.rule.until?this.rule.until.year:2e4;for(;this.last.year<=e&&(this.expand_year_days(this.last.year),!(this.days.length>0));)this.increment_year(this.rule.interval);if(this.days.length==0)throw new pe;if(!this._nextByYearDay()&&!this.next_year()&&!this.next_year()&&!this.next_year())throw new pe}if(this.rule.freq=="MONTHLY"){if(this.has_by_data("BYDAY")){let e=null,r=this.last.clone(),s=D.daysInMonth(this.last.month,this.last.year);for(let i of this.by_data.BYDAY){this.last=r.clone();let[o,a]=this.ruleDayOfWeek(i),h=this.last.nthWeekDay(a,o);if(o>=6||o<=-6)throw new Error("Malformed values in BYDAY part");if(h>s||h<=0){if(e&&e.month==r.month)continue;for(;h>s||h<=0;)this.increment_month(),s=D.daysInMonth(this.last.month,this.last.year),h=this.last.nthWeekDay(a,o)}this.last.day=h,(!e||this.last.compare(e)<0)&&(e=this.last.clone())}if(this.last=e.clone(),this.has_by_data("BYMONTHDAY")&&this._byDayAndMonthDay(!0),this.last.day>s||this.last.day==0)throw new Error("Malformed values in BYDAY part")}else if(this.has_by_data("BYMONTHDAY")){this.last.day=1;let e=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY).filter(r=>r>=this.last.day);if(e.length)this.last.day=e[0],this.by_data.BYMONTHDAY=e;else if(!this.next_month()&&!this.next_month()&&!this.next_month())throw new pe}}}next(t=!1){let e=this.last?this.last.clone():null;if((this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)&&(this.completed=!0),this.completed)return null;if(this.occurrence_number==0&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;let r,s=0;do switch(r=1,this.rule.freq){case"SECONDLY":this.next_second();break;case"MINUTELY":this.next_minute();break;case"HOURLY":this.next_hour();break;case"DAILY":this.next_day();break;case"WEEKLY":this.next_week();break;case"MONTHLY":if(r=this.next_month(),r)s=0;else if(++s==336)return this.completed=!0,null;break;case"YEARLY":if(r=this.next_year(),r)s=0;else if(++s==28)return this.completed=!0,null;break;default:return null}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!r);if(this.last.compare(e)==0){if(t)throw new Error("Same occurrence found twice, protecting you from death by recursion");this.next(!0)}return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)}next_second(){return this.next_generic("BYSECOND","SECONDLY","second","minute")}increment_second(t){return this.increment_generic(t,"second",60,"minute")}next_minute(){return this.next_generic("BYMINUTE","MINUTELY","minute","hour","next_second")}increment_minute(t){return this.increment_generic(t,"minute",60,"hour")}next_hour(){return this.next_generic("BYHOUR","HOURLY","hour","monthday","next_minute")}increment_hour(t){this.increment_generic(t,"hour",24,"monthday")}next_day(){let t=this.rule.freq=="DAILY";return this.next_hour()==0||(t?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0}next_week(){let t=0;if(this.next_weekday_by_week()==0)return t;if(this.has_by_data("BYWEEKNO")){this.by_indices.BYWEEKNO++,this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,t=1),this.last.month=1,this.last.day=1;let e=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*e,t&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return t}normalizeByMonthDayRules(t,e,r){let s=D.daysInMonth(e,t),i=[],o=0,a=r.length,h;for(;o<a;o++){if(h=parseInt(r[o],10),isNaN(h))throw new Error("Invalid BYMONTHDAY value");if(!(Math.abs(h)>s)){if(h<0)h=s+(h+1);else if(h===0)continue;i.indexOf(h)===-1&&i.push(h)}}return i.sort(function(c,l){return c-l})}_byDayAndMonthDay(t){let e,r=this.by_data.BYDAY,s,i=0,o,a=r.length,h=0,c,l=this,u=this.last.day;function d(){for(c=D.daysInMonth(l.last.month,l.last.year),e=l.normalizeByMonthDayRules(l.last.year,l.last.month,l.by_data.BYMONTHDAY),o=e.length;e[i]<=u&&!(t&&e[i]==u)&&i<o-1;)i++}function m(){u=0,l.increment_month(),i=0,d()}d(),t&&(u-=1);let p=48;for(;!h&&p;){if(p--,s=u+1,s>c){m();continue}let f=e[i++];if(f>=s)u=f;else{m();continue}for(let y=0;y<a;y++){let A=this.ruleDayOfWeek(r[y]),g=A[0],T=A[1];if(this.last.day=u,this.last.isNthWeekDay(T,g)){h=1;break}}if(!h&&i===o){m();continue}}if(p<=0)throw new Error("Malformed values in BYDAY combined with BYMONTHDAY parts");return h}next_month(){let t=1;if(this.next_hour()==0)return t;if(this.has_by_data("BYDAY")&&this.has_by_data("BYMONTHDAY"))t=this._byDayAndMonthDay();else if(this.has_by_data("BYDAY")){let e=D.daysInMonth(this.last.month,this.last.year),r=0,s=0;if(this.has_by_data("BYSETPOS")){let o=this.last.day;for(let a=1;a<=e;a++)this.last.day=a,this.is_day_in_byday(this.last)&&(s++,a<=o&&r++);this.last.day=o}t=0;let i;for(i=this.last.day+1;i<=e;i++)if(this.last.day=i,this.is_day_in_byday(this.last)&&(!this.has_by_data("BYSETPOS")||this.check_set_position(++r)||this.check_set_position(r-s-1))){t=1;break}i>e&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?(!this.has_by_data("BYSETPOS")||this.check_set_position(1))&&(t=1):t=0)}else if(this.has_by_data("BYMONTHDAY")){if(this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month(),this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length))return 0;let e=D.daysInMonth(this.last.month,this.last.year),r=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY];r<0&&(r=e+r+1),r>e?(this.last.day=1,t=this.is_day_in_byday(this.last)):this.last.day=r}else{this.increment_month();let e=D.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>e?t=0:this.last.day=this.by_data.BYMONTHDAY[0]}return t}next_weekday_by_week(){let t=0;if(this.next_hour()==0)return t;if(!this.has_by_data("BYDAY"))return 1;for(;;){let e=new D;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,t=1);let r=this.by_data.BYDAY[this.by_indices.BYDAY],s=this.ruleDayOfWeek(r)[1];s-=this.rule.wkst,s<0&&(s+=7),e.year=this.last.year,e.month=this.last.month,e.day=this.last.day;let i=e.startDoyWeek(this.rule.wkst);if(s+i<1&&!t)continue;let o=D.fromDayOfYear(i+s,this.last.year);return this.last.year=o.year,this.last.month=o.month,this.last.day=o.day,t}}next_year(){return this.next_hour()==0||(this.days.length==0||++this.days_index==this.days.length)&&(this.days_index=0,this.increment_year(this.rule.interval),this.has_by_data("BYMONTHDAY")&&(this.by_data.BYMONTHDAY=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY)),this.expand_year_days(this.last.year),this.days.length==0)?0:this._nextByYearDay()}_nextByYearDay(){let t=this.days[this.days_index],e=this.last.year;if(Math.abs(t)==366&&!D.isLeapYear(this.last.year))return 0;t<1&&(t+=1,e+=1);let r=D.fromDayOfYear(t,e);return this.last.day=r.day,this.last.month=r.month,1}ruleDayOfWeek(t,e){let r=t.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);if(r){let s=parseInt(r[1]||0,10);return t=st.icalDayToNumericDay(r[2],e),[s,t]}else return[0,0]}next_generic(t,e,r,s,i){let o=t in this.by_data,a=this.rule.freq==e,h=0;if(i&&this[i]()==0)return h;if(o){this.by_indices[t]++;let c=this.by_data[t];this.by_indices[t]==c.length&&(this.by_indices[t]=0,h=1),this.last[r]=c[this.by_indices[t]]}else a&&this["increment_"+r](this.rule.interval);return o&&h&&a&&this["increment_"+s](1),h}increment_monthday(t){for(let e=0;e<t;e++){let r=D.daysInMonth(this.last.month,this.last.year);this.last.day++,this.last.day>r&&(this.last.day-=r,this.increment_month())}}increment_month(){if(this.last.day=1,this.has_by_data("BYMONTH"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{this.rule.freq=="MONTHLY"?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;let t=Q(this.last.month/12);this.last.month%=12,this.last.month++,t!=0&&this.increment_year(t)}this.has_by_data("BYMONTHDAY")&&(this.by_data.BYMONTHDAY=this.normalizeByMonthDayRules(this.last.year,this.last.month,this.rule.parts.BYMONTHDAY))}increment_year(t){this.last.day=1,this.last.year+=t}increment_generic(t,e,r,s){this.last[e]+=t;let i=Q(this.last[e]/r);this.last[e]%=r,i!=0&&this["increment_"+s](i)}has_by_data(t){return t in this.rule.parts}expand_year_days(t){let e=new D;this.days=[];let r={},s=["BYDAY","BYWEEKNO","BYMONTHDAY","BYMONTH","BYYEARDAY"];for(let a of s)a in this.rule.parts&&(r[a]=this.rule.parts[a]);if("BYMONTH"in r&&"BYWEEKNO"in r){let a=1,h={};e.year=t,e.isDate=!0;for(let c=0;c<this.by_data.BYMONTH.length;c++){let l=this.by_data.BYMONTH[c];e.month=l,e.day=1;let u=e.weekNumber(this.rule.wkst);e.day=D.daysInMonth(l,t);let d=e.weekNumber(this.rule.wkst);for(c=u;c<d;c++)h[c]=1}for(let c=0;c<this.by_data.BYWEEKNO.length&&a;c++)this.by_data.BYWEEKNO[c]<52?a&=h[c]:a=0;a?delete r.BYMONTH:delete r.BYWEEKNO}let i=Object.keys(r).length;if(i==0){let a=this.dtstart.clone();a.year=this.last.year,this.days.push(a.dayOfYear())}else if(i==1&&"BYMONTH"in r)for(let a of this.by_data.BYMONTH){let h=this.dtstart.clone();h.year=t,h.month=a,h.isDate=!0,this.days.push(h.dayOfYear())}else if(i==1&&"BYMONTHDAY"in r)for(let a of this.by_data.BYMONTHDAY){let h=this.dtstart.clone();if(a<0){let c=D.daysInMonth(h.month,t);a=a+c+1}h.day=a,h.year=t,h.isDate=!0,this.days.push(h.dayOfYear())}else if(i==2&&"BYMONTHDAY"in r&&"BYMONTH"in r)for(let a of this.by_data.BYMONTH){let h=D.daysInMonth(a,t);for(let c of this.by_data.BYMONTHDAY)c<0&&(c=c+h+1),e.day=c,e.month=a,e.year=t,e.isDate=!0,this.days.push(e.dayOfYear())}else if(!(i==1&&"BYWEEKNO"in r)&&!(i==2&&"BYWEEKNO"in r&&"BYMONTHDAY"in r)){if(i==1&&"BYDAY"in r)this.days=this.days.concat(this.expand_by_day(t));else if(i==2&&"BYDAY"in r&&"BYMONTH"in r){for(let a of this.by_data.BYMONTH){let h=D.daysInMonth(a,t);e.year=t,e.month=a,e.day=1,e.isDate=!0;let c=e.dayOfWeek(),l=e.dayOfYear()-1;e.day=h;let u=e.dayOfWeek();if(this.has_by_data("BYSETPOS")){let d=[];for(let m=1;m<=h;m++)e.day=m,this.is_day_in_byday(e)&&d.push(m);for(let m=0;m<d.length;m++)(this.check_set_position(m+1)||this.check_set_position(m-d.length))&&this.days.push(l+d[m])}else for(let d of this.by_data.BYDAY){let m=this.ruleDayOfWeek(d),p=m[0],f=m[1],y,A=(f+7-c)%7+1,g=h-(u+7-f)%7;if(p==0)for(let T=A;T<=h;T+=7)this.days.push(l+T);else p>0?(y=A+(p-1)*7,y<=h&&this.days.push(l+y)):(y=g+(p+1)*7,y>0&&this.days.push(l+y))}}this.days.sort(function(a,h){return a-h})}else if(i==2&&"BYDAY"in r&&"BYMONTHDAY"in r){let a=this.expand_by_day(t);for(let h of a){let c=D.fromDayOfYear(h,t);this.by_data.BYMONTHDAY.indexOf(c.day)>=0&&this.days.push(h)}}else if(i==3&&"BYDAY"in r&&"BYMONTHDAY"in r&&"BYMONTH"in r){let a=this.expand_by_day(t);for(let h of a){let c=D.fromDayOfYear(h,t);this.by_data.BYMONTH.indexOf(c.month)>=0&&this.by_data.BYMONTHDAY.indexOf(c.day)>=0&&this.days.push(h)}}else if(i==2&&"BYDAY"in r&&"BYWEEKNO"in r){let a=this.expand_by_day(t);for(let h of a){let c=D.fromDayOfYear(h,t).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(c)&&this.days.push(h)}}else if(!(i==3&&"BYDAY"in r&&"BYWEEKNO"in r&&"BYMONTHDAY"in r))if(i==1&&"BYYEARDAY"in r)this.days=this.days.concat(this.by_data.BYYEARDAY);else if(i==2&&"BYYEARDAY"in r&&"BYDAY"in r){let a=D.isLeapYear(t)?366:365,h=new Set(this.expand_by_day(t));for(let c of this.by_data.BYYEARDAY)c<0&&(c+=a+1),h.has(c)&&this.days.push(c)}else this.days=[]}let o=D.isLeapYear(t)?366:365;return this.days.sort((a,h)=>(a<0&&(a+=o+1),h<0&&(h+=o+1),a-h)),0}expand_by_day(t){let e=[],r=this.last.clone();r.year=t,r.month=1,r.day=1,r.isDate=!0;let s=r.dayOfWeek();r.month=12,r.day=31,r.isDate=!0;let i=r.dayOfWeek(),o=r.dayOfYear();for(let a of this.by_data.BYDAY){let h=this.ruleDayOfWeek(a),c=h[0],l=h[1];if(c==0){let u=(l+7-s)%7+1;for(let d=u;d<=o;d+=7)e.push(d)}else if(c>0){let u;l>=s?u=l-s+1:u=l-s+8,e.push(u+(c-1)*7)}else{let u;c=-c,l<=i?u=o-i+l:u=o-i+l-7,e.push(u-(c-1)*7)}}return e}is_day_in_byday(t){if(this.by_data.BYDAY)for(let e of this.by_data.BYDAY){let r=this.ruleDayOfWeek(e),s=r[0],i=r[1],o=t.dayOfWeek();if(s==0&&i==o||t.nthWeekDay(i,s)==t.day)return 1}return 0}check_set_position(t){return this.has_by_data("BYSETPOS")?this.by_data.BYSETPOS.indexOf(t)!==-1:!1}sort_byday_rules(t){for(let e=0;e<t.length;e++)for(let r=0;r<e;r++){let s=this.ruleDayOfWeek(t[r],this.rule.wkst)[1],i=this.ruleDayOfWeek(t[e],this.rule.wkst)[1];if(s>i){let o=t[e];t[e]=t[r],t[r]=o}}}check_contract_restriction(t,e){let r=xt._indexMap[t],s=xt._expandMap[this.rule.freq][r],i=!1;if(t in this.by_data&&s==xt.CONTRACT){let o=this.by_data[t];for(let a of o)if(a==e){i=!0;break}}else i=!0;return i}check_contracting_rules(){let t=this.last.dayOfWeek(),e=this.last.weekNumber(this.rule.wkst),r=this.last.dayOfYear();return this.check_contract_restriction("BYSECOND",this.last.second)&&this.check_contract_restriction("BYMINUTE",this.last.minute)&&this.check_contract_restriction("BYHOUR",this.last.hour)&&this.check_contract_restriction("BYDAY",st.numericDayToIcalDay(t))&&this.check_contract_restriction("BYWEEKNO",e)&&this.check_contract_restriction("BYMONTHDAY",this.last.day)&&this.check_contract_restriction("BYMONTH",this.last.month)&&this.check_contract_restriction("BYYEARDAY",r)}setup_defaults(t,e,r){let s=xt._indexMap[t];return xt._expandMap[this.rule.freq][s]!=xt.CONTRACT&&(t in this.by_data||(this.by_data[t]=[r]),this.rule.freq!=e)?this.by_data[t][0]:r}toJSON(){let t=Object.create(null);return t.initialized=this.initialized,t.rule=this.rule.toJSON(),t.dtstart=this.dtstart.toJSON(),t.by_data=this.by_data,t.days=this.days,t.last=this.last.toJSON(),t.by_indices=this.by_indices,t.occurrence_number=this.occurrence_number,t}}class pe extends Error{constructor(){super("Recurrence rule has no valid occurrences")}}const ai=/^(SU|MO|TU|WE|TH|FR|SA)$/,oi=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,Tn={SU:D.SUNDAY,MO:D.MONDAY,TU:D.TUESDAY,WE:D.WEDNESDAY,TH:D.THURSDAY,FR:D.FRIDAY,SA:D.SATURDAY},li=Object.fromEntries(Object.entries(Tn).map(n=>n.reverse())),Yr=["SECONDLY","MINUTELY","HOURLY","DAILY","WEEKLY","MONTHLY","YEARLY"];class st{static fromString(t){let e=this._stringToData(t,!1);return new st(e)}static fromData(t){return new st(t)}static _stringToData(t,e){let r=Object.create(null),s=t.split(";"),i=s.length;for(let o=0;o<i;o++){let a=s[o].split("="),h=a[0].toUpperCase(),c=a[0].toLowerCase(),l=e?c:h,u=a[1];if(h in $e){let d=u.split(","),m=new Set;for(let p of d)m.add($e[h](p));d=[...m],r[l]=d.length==1?d[0]:d}else h in Ve?Ve[h](u,r,e):r[c]=u}return r}static icalDayToNumericDay(t,e){let r=e||D.SUNDAY;return(Tn[t]-r+7)%7+1}static numericDayToIcalDay(t,e){let r=e||D.SUNDAY,s=t+r-D.SUNDAY;return s>7&&(s-=7),li[s]}constructor(t){this.wrappedJSObject=this,this.parts={},t&&typeof t=="object"&&this.fromData(t)}parts=null;interval=1;wkst=D.MONDAY;until=null;count=null;freq=null;icalclass="icalrecur";icaltype="recur";iterator(t){return new xt({rule:this,dtstart:t})}clone(){return new st(this.toJSON())}isFinite(){return!!(this.count||this.until)}isByCount(){return!!(this.count&&!this.until)}addComponent(t,e){let r=t.toUpperCase();r in this.parts?this.parts[r].push(e):this.parts[r]=[e]}setComponent(t,e){this.parts[t.toUpperCase()]=e.slice()}getComponent(t){let e=t.toUpperCase();return e in this.parts?this.parts[e].slice():[]}getNextOccurrence(t,e){let r=this.iterator(t),s;do s=r.next();while(s&&s.compare(e)<=0);return s&&e.zone&&(s.zone=e.zone),s}fromData(t){for(let e in t){let r=e.toUpperCase();r in $e?Array.isArray(t[e])?this.parts[r]=t[e]:this.parts[r]=[t[e]]:this[e]=t[e]}this.interval&&typeof this.interval!="number"&&Ve.INTERVAL(this.interval,this),this.wkst&&typeof this.wkst!="number"&&(this.wkst=st.icalDayToNumericDay(this.wkst)),this.until&&!(this.until instanceof D)&&(this.until=D.fromString(this.until))}toJSON(){let t=Object.create(null);t.freq=this.freq,this.count&&(t.count=this.count),this.interval>1&&(t.interval=this.interval);for(let[e,r]of Object.entries(this.parts))Array.isArray(r)&&r.length==1?t[e.toLowerCase()]=r[0]:t[e.toLowerCase()]=Kt(r);return this.until&&(t.until=this.until.toString()),"wkst"in this&&this.wkst!==D.DEFAULT_WEEK_START&&(t.wkst=st.numericDayToIcalDay(this.wkst)),t}toString(){let t="FREQ="+this.freq;this.count&&(t+=";COUNT="+this.count),this.interval>1&&(t+=";INTERVAL="+this.interval);for(let[e,r]of Object.entries(this.parts))t+=";"+e+"="+r;return this.until&&(t+=";UNTIL="+this.until.toICALString()),"wkst"in this&&this.wkst!==D.DEFAULT_WEEK_START&&(t+=";WKST="+st.numericDayToIcalDay(this.wkst)),t}}function kt(n,t,e,r){let s=r;if(r[0]==="+"&&(s=r.slice(1)),s=nt(s),t!==void 0&&r<t)throw new Error(n+': invalid value "'+r+'" must be > '+t);if(e!==void 0&&r>e)throw new Error(n+': invalid value "'+r+'" must be < '+t);return s}const Ve={FREQ:function(n,t,e){if(Yr.indexOf(n)!==-1)t.freq=n;else throw new Error('invalid frequency "'+n+'" expected: "'+Yr.join(", ")+'"')},COUNT:function(n,t,e){t.count=nt(n)},INTERVAL:function(n,t,e){t.interval=nt(n),t.interval<1&&(t.interval=1)},UNTIL:function(n,t,e){n.length>10?t.until=H.icalendar.value["date-time"].fromICAL(n):t.until=H.icalendar.value.date.fromICAL(n),e||(t.until=D.fromString(t.until))},WKST:function(n,t,e){if(ai.test(n))t.wkst=st.icalDayToNumericDay(n);else throw new Error('invalid WKST value "'+n+'"')}},$e={BYSECOND:kt.bind(void 0,"BYSECOND",0,60),BYMINUTE:kt.bind(void 0,"BYMINUTE",0,59),BYHOUR:kt.bind(void 0,"BYHOUR",0,23),BYDAY:function(n){if(oi.test(n))return n;throw new Error('invalid BYDAY value "'+n+'"')},BYMONTHDAY:kt.bind(void 0,"BYMONTHDAY",-31,31),BYYEARDAY:kt.bind(void 0,"BYYEARDAY",-366,366),BYWEEKNO:kt.bind(void 0,"BYWEEKNO",-53,53),BYMONTH:kt.bind(void 0,"BYMONTH",1,12),BYSETPOS:kt.bind(void 0,"BYSETPOS",-366,366)},ui=/\\\\|\\;|\\,|\\[Nn]/g,ci=/\\|;|,|\n/g,Mr=/\\\\|\\,|\\[Nn]/g,kr=/\\|,|\n/g;function ir(n,t){return{matches:/.*/,fromICAL:function(e,r){return di(e,n,r)},toICAL:function(e,r){let s=t;return r&&(s=new RegExp(s.source+"|"+r,s.flags)),e.replace(s,function(i){switch(i){case"\\":return"\\\\";case";":return"\\;";case",":return"\\,";case`
`:return"\\n";default:return i}})}}}const M={defaultType:"text"},ue={defaultType:"text",multiValue:","},Ce={defaultType:"text",structuredValue:";"},ge={defaultType:"integer"},ye={defaultType:"date-time",allowedTypes:["date-time","date"]},Te={defaultType:"date-time"},ft={defaultType:"uri"},Br={defaultType:"utc-offset"},jr={defaultType:"recur"},Lr={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};function hi(n){switch(n){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return`
`;default:return n}}function di(n,t,e){return n.indexOf("\\")===-1?n:(e&&(t=new RegExp(t.source+"|\\\\"+e,t.flags)),n.replace(t,hi))}let mr={categories:ue,url:ft,version:M,uid:M},pr={boolean:{values:["TRUE","FALSE"],fromICAL:function(n){switch(n){case"TRUE":return!0;case"FALSE":return!1;default:return!1}},toICAL:function(n){return n?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(n){let t=parseFloat(n);return le(t)?0:t},toICAL:function(n){return String(n)}},integer:{fromICAL:function(n){let t=parseInt(n);return le(t)?0:t},toICAL:function(n){return String(n)}},"utc-offset":{toICAL:function(n){return n.length<7?n.slice(0,3)+n.slice(4,6):n.slice(0,3)+n.slice(4,6)+n.slice(7,9)},fromICAL:function(n){return n.length<6?n.slice(0,3)+":"+n.slice(3,5):n.slice(0,3)+":"+n.slice(3,5)+":"+n.slice(5,7)},decorate:function(n){return Dt.fromString(n)},undecorate:function(n){return n.toString()}}},fi={cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}};const ut=qt(pr,{text:ir(ui,ci),uri:{},binary:{decorate:function(n){return je.fromString(n)},undecorate:function(n){return n.toString()}},"cal-address":{},date:{decorate:function(n,t){return D.fromDateString(n,t)},undecorate:function(n){return n.toString()},fromICAL:function(n){return n.slice(0,4)+"-"+n.slice(4,6)+"-"+n.slice(6,8)},toICAL:function(n){let t=n.length;return t==10?n.slice(0,4)+n.slice(5,7)+n.slice(8,10):t>=19?ut["date-time"].toICAL(n):n}},"date-time":{fromICAL:function(n){{let t=n.slice(0,4)+"-"+n.slice(4,6)+"-"+n.slice(6,8)+"T"+n.slice(9,11)+":"+n.slice(11,13)+":"+n.slice(13,15);return n[15]&&n[15]==="Z"&&(t+="Z"),t}},toICAL:function(n){if(n.length>=19){let t=n.slice(0,4)+n.slice(5,7)+n.slice(8,13)+n.slice(14,16)+n.slice(17,19);return n[19]&&n[19]==="Z"&&(t+="Z"),t}else return n},decorate:function(n,t){return D.fromDateTimeString(n,t)},undecorate:function(n){return n.toString()}},duration:{decorate:function(n){return it.fromString(n)},undecorate:function(n){return n.toString()}},period:{fromICAL:function(n){let t=n.split("/");return t[0]=ut["date-time"].fromICAL(t[0]),it.isValueString(t[1])||(t[1]=ut["date-time"].fromICAL(t[1])),t},toICAL:function(n){return n=n.slice(),n[0]=ut["date-time"].toICAL(n[0]),it.isValueString(n[1])||(n[1]=ut["date-time"].toICAL(n[1])),n.join("/")},decorate:function(n,t){return Pt.fromJSON(n,t,!1)},undecorate:function(n){return n.toJSON()}},recur:{fromICAL:function(n){return st._stringToData(n,!0)},toICAL:function(n){let t="";for(let[e,r]of Object.entries(n))e=="until"?r.length>10?r=ut["date-time"].toICAL(r):r=ut.date.toICAL(r):e=="wkst"?typeof r=="number"&&(r=st.numericDayToIcalDay(r)):Array.isArray(r)&&(r=r.join(",")),t+=e.toUpperCase()+"="+r+";";return t.slice(0,Math.max(0,t.length-1))},decorate:function(n){return st.fromData(n)},undecorate:function(n){return n.toJSON()}},time:{fromICAL:function(n){if(n.length<6)return n;let t=n.slice(0,2)+":"+n.slice(2,4)+":"+n.slice(4,6);return n[6]==="Z"&&(t+="Z"),t},toICAL:function(n){if(n.length<8)return n;let t=n.slice(0,2)+n.slice(3,5)+n.slice(6,8);return n[8]==="Z"&&(t+="Z"),t}}});let mi=qt(mr,{action:M,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:M,class:M,comment:M,completed:Te,contact:M,created:Te,description:M,dtend:ye,dtstamp:Te,dtstart:ye,due:ye,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:jr,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":Te,location:M,method:M,organizer:{defaultType:"cal-address"},"percent-complete":ge,priority:ge,prodid:M,"related-to":M,repeat:ge,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(n){return n.indexOf("/")!==-1?"period":n.indexOf("T")===-1?"date":"date-time"}},"recurrence-id":ye,resources:ue,"request-status":Ce,rrule:jr,sequence:ge,status:M,summary:M,transp:M,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:Br,tzoffsetto:Br,tzurl:ft,tzid:M,tzname:M});const yt=qt(pr,{text:ir(Mr,kr),uri:ir(Mr,kr),date:{decorate:function(n){return Rt.fromDateAndOrTimeString(n,"date")},undecorate:function(n){return n.toString()},fromICAL:function(n){return n.length==8?ut.date.fromICAL(n):n[0]=="-"&&n.length==6?n.slice(0,4)+"-"+n.slice(4):n},toICAL:function(n){return n.length==10?ut.date.toICAL(n):n[0]=="-"&&n.length==7?n.slice(0,4)+n.slice(5):n}},time:{decorate:function(n){return Rt.fromDateAndOrTimeString("T"+n,"time")},undecorate:function(n){return n.toString()},fromICAL:function(n){let t=yt.time._splitZone(n,!0),e=t[0],r=t[1];return r.length==6?r=r.slice(0,2)+":"+r.slice(2,4)+":"+r.slice(4,6):r.length==4&&r[0]!="-"?r=r.slice(0,2)+":"+r.slice(2,4):r.length==5&&(r=r.slice(0,3)+":"+r.slice(3,5)),e.length==5&&(e[0]=="-"||e[0]=="+")&&(e=e.slice(0,3)+":"+e.slice(3)),r+e},toICAL:function(n){let t=yt.time._splitZone(n),e=t[0],r=t[1];return r.length==8?r=r.slice(0,2)+r.slice(3,5)+r.slice(6,8):r.length==5&&r[0]!="-"?r=r.slice(0,2)+r.slice(3,5):r.length==6&&(r=r.slice(0,3)+r.slice(4,6)),e.length==6&&(e[0]=="-"||e[0]=="+")&&(e=e.slice(0,3)+e.slice(4)),r+e},_splitZone:function(n,t){let e=n.length-1,r=n.length-(t?5:6),s=n[r],i,o;return n[e]=="Z"?(i=n[e],o=n.slice(0,Math.max(0,e))):n.length>6&&(s=="-"||s=="+")?(i=n.slice(r),o=n.slice(0,Math.max(0,r))):(i="",o=n),[i,o]}},"date-time":{decorate:function(n){return Rt.fromDateAndOrTimeString(n,"date-time")},undecorate:function(n){return n.toString()},fromICAL:function(n){return yt["date-and-or-time"].fromICAL(n)},toICAL:function(n){return yt["date-and-or-time"].toICAL(n)}},"date-and-or-time":{decorate:function(n){return Rt.fromDateAndOrTimeString(n,"date-and-or-time")},undecorate:function(n){return n.toString()},fromICAL:function(n){let t=n.split("T");return(t[0]?yt.date.fromICAL(t[0]):"")+(t[1]?"T"+yt.time.fromICAL(t[1]):"")},toICAL:function(n){let t=n.split("T");return yt.date.toICAL(t[0])+(t[1]?"T"+yt.time.toICAL(t[1]):"")}},timestamp:ut["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/},"phone-number":{fromICAL:function(n){return Array.from(n).filter(function(t){return t==="\\"?void 0:t}).join("")},toICAL:function(n){return Array.from(n).map(function(t){return t===","||t===";"?"\\"+t:t}).join("")}}});let pi={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},gi=qt(mr,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:Lr,bday:Lr,caladruri:ft,caluri:ft,clientpidmap:Ce,email:M,fburl:ft,fn:M,gender:Ce,geo:ft,impp:ft,key:ft,kind:M,lang:{defaultType:"language-tag"},logo:ft,member:ft,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:ue,note:M,org:{defaultType:"text",structuredValue:";"},photo:ft,related:ft,rev:{defaultType:"timestamp"},role:M,sound:ft,source:ft,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:M,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:M}),yi=qt(pr,{binary:ut.binary,date:yt.date,"date-time":yt["date-time"],"phone-number":yt["phone-number"],uri:ut.uri,text:yt.text,time:ut.time,vcard:ut.text,"utc-offset":{toICAL:function(n){return n.slice(0,7)},fromICAL:function(n){return n.slice(0,7)},decorate:function(n){return Dt.fromString(n)},undecorate:function(n){return n.toString()}}}),Ti={type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},Si=qt(mr,{fn:M,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:ue,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(n){return n.indexOf("T")===-1?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:M,tel:{defaultType:"phone-number"},email:M,mailer:M,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:M,role:M,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:Ce,note:ue,prodid:M,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(n){return n.indexOf("T")===-1?"date":"date-time"}},"sort-string":M,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:M,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),Ot={name:"ical",value:ut,param:fi,property:mi,propertyGroups:!1},Rr={name:"vcard4",value:yt,param:pi,property:gi,propertyGroups:!0},zr={name:"vcard3",value:yi,param:Ti,property:Si,propertyGroups:!0};const H={strict:!0,defaultSet:Ot,defaultType:"unknown",components:{vcard:Rr,vcard3:zr,vevent:Ot,vtodo:Ot,vjournal:Ot,valarm:Ot,vtimezone:Ot,daylight:Ot,standard:Ot},icalendar:Ot,vcard:Rr,vcard3:zr,getDesignSet:function(n){return n&&n in H.components?H.components[n]:H.defaultSet}},_e=`\r
`,Vr="unknown",Ai={'"':"^'","\n":"^n","^":"^^"};function z(n){typeof n[0]=="string"&&(n=[n]);let t=0,e=n.length,r="";for(;t<e;t++)r+=z.component(n[t])+_e;return r}z.component=function(n,t){let e=n[0].toUpperCase(),r="BEGIN:"+e+_e,s=n[1],i=0,o=s.length,a=n[0];for(a==="vcard"&&n[1].length>0&&!(n[1][0][0]==="version"&&n[1][0][3]==="4.0")&&(a="vcard3"),t=t||H.getDesignSet(a);i<o;i++)r+=z.property(s[i],t)+_e;let h=n[2]||[],c=0,l=h.length;for(;c<l;c++)r+=z.component(h[c],t)+_e;return r+="END:"+e,r},z.property=function(n,t,e){let r=n[0].toUpperCase(),s=n[0],i=n[1];t||(t=H.defaultSet);let o=i.group,a;t.propertyGroups&&o?a=o.toUpperCase()+"."+r:a=r;for(let[m,p]of Object.entries(i)){if(t.propertyGroups&&m=="group")continue;let f=t.param[m],y=f&&f.multiValue;y&&Array.isArray(p)?(p=p.map(function(A){return A=z._rfc6868Unescape(A),A=z.paramPropertyValue(A,f.multiValueSeparateDQuote),A}),p=z.multiValue(p,y,"unknown",null,t)):(p=z._rfc6868Unescape(p),p=z.paramPropertyValue(p)),a+=";"+m.toUpperCase()+"="+p}if(n.length===3)return a+":";let h=n[2],c,l=!1,u=!1,d=!1;return s in t.property?(c=t.property[s],"multiValue"in c&&(l=c.multiValue),"structuredValue"in c&&Array.isArray(n[3])&&(u=c.structuredValue),"defaultType"in c?h===c.defaultType&&(d=!0):h===Vr&&(d=!0)):h===Vr&&(d=!0),d||(a+=";VALUE="+h.toUpperCase()),a+=":",l&&u?a+=z.multiValue(n[3],u,h,l,t,u):l?a+=z.multiValue(n.slice(3),l,h,null,t,!1):u?a+=z.multiValue(n[3],u,h,null,t,u):a+=z.value(n[3],h,t,!1),e?a:yn(a)},z.paramPropertyValue=function(n,t){return!t&&n.indexOf(",")===-1&&n.indexOf(":")===-1&&n.indexOf(";")===-1?n:'"'+n+'"'},z.multiValue=function(n,t,e,r,s,i){let o="",a=n.length,h=0;for(;h<a;h++)r&&Array.isArray(n[h])?o+=z.multiValue(n[h],r,e,null,s,i):o+=z.value(n[h],e,s,i),h!==a-1&&(o+=t);return o},z.value=function(n,t,e,r){return t in e.value&&"toICAL"in e.value[t]?e.value[t].toICAL(n,r):n},z._rfc6868Unescape=function(n){return n.replace(/[\n^"]/g,function(t){return Ai[t]})};const $r=0,Se=1,Ae=2,Bt=3;class Gt{static fromString(t,e){return new Gt(k.property(t,e))}constructor(t,e){this._parent=e||null,typeof t=="string"?(this.jCal=[t,{},H.defaultType],this.jCal[Ae]=this.getDefaultType()):this.jCal=t,this._updateType()}get type(){return this.jCal[Ae]}get name(){return this.jCal[$r]}get parent(){return this._parent}set parent(t){let e=!this._parent||t&&t._designSet!=this._parent._designSet;this._parent=t,this.type==H.defaultType&&e&&(this.jCal[Ae]=this.getDefaultType(),this._updateType())}get _designSet(){return this.parent?this.parent._designSet:H.defaultSet}_updateType(){let t=this._designSet;this.type in t.value&&("decorate"in t.value[this.type]?this.isDecorated=!0:this.isDecorated=!1,this.name in t.property&&(this.isMultiValue="multiValue"in t.property[this.name],this.isStructuredValue="structuredValue"in t.property[this.name]))}_hydrateValue(t){return this._values&&this._values[t]?this._values[t]:this.jCal.length<=Bt+t?null:this.isDecorated?(this._values||(this._values=[]),this._values[t]=this._decorate(this.jCal[Bt+t])):this.jCal[Bt+t]}_decorate(t){return this._designSet.value[this.type].decorate(t,this)}_undecorate(t){return this._designSet.value[this.type].undecorate(t,this)}_setDecoratedValue(t,e){this._values||(this._values=[]),typeof t=="object"&&"icaltype"in t?(this.jCal[Bt+e]=this._undecorate(t),this._values[e]=t):(this.jCal[Bt+e]=t,this._values[e]=this._decorate(t))}getParameter(t){if(t in this.jCal[Se])return this.jCal[Se][t]}getFirstParameter(t){let e=this.getParameter(t);return Array.isArray(e)?e[0]:e}setParameter(t,e){let r=t.toLowerCase();typeof e=="string"&&r in this._designSet.param&&"multiValue"in this._designSet.param[r]&&(e=[e]),this.jCal[Se][t]=e}removeParameter(t){delete this.jCal[Se][t]}getDefaultType(){let t=this.jCal[$r],e=this._designSet;if(t in e.property){let r=e.property[t];if("defaultType"in r)return r.defaultType}return H.defaultType}resetType(t){this.removeAllValues(),this.jCal[Ae]=t,this._updateType()}getFirstValue(){return this._hydrateValue(0)}getValues(){let t=this.jCal.length-Bt;if(t<1)return[];let e=0,r=[];for(;e<t;e++)r[e]=this._hydrateValue(e);return r}removeAllValues(){this._values&&(this._values.length=0),this.jCal.length=3}setValues(t){if(!this.isMultiValue)throw new Error(this.name+`: does not not support mulitValue.
override isMultiValue`);let e=t.length,r=0;if(this.removeAllValues(),e>0&&typeof t[0]=="object"&&"icaltype"in t[0]&&this.resetType(t[0].icaltype),this.isDecorated)for(;r<e;r++)this._setDecoratedValue(t[r],r);else for(;r<e;r++)this.jCal[Bt+r]=t[r]}setValue(t){this.removeAllValues(),typeof t=="object"&&"icaltype"in t&&this.resetType(t.icaltype),this.isDecorated?this._setDecoratedValue(t,0):this.jCal[Bt]=t}toJSON(){return this.jCal}toICALString(){return z.property(this.jCal,this._designSet,!0)}}const jt=0,wt=1,Lt=2,bi=0,vi=3;class St{static fromString(t){return new St(k.component(t))}constructor(t,e){typeof t=="string"&&(t=[t,[],[]]),this.jCal=t,this.parent=e||null,!this.parent&&this.name==="vcalendar"&&(this._timezoneCache=new Map)}_hydratedPropertyCount=0;_hydratedComponentCount=0;_timezoneCache=null;_components=null;_properties=null;get name(){return this.jCal[jt]}get _designSet(){let t=this.parent&&this.parent._designSet;if(!t&&this.name=="vcard"){let e=this.jCal[wt]?.[0];if(e&&e[bi]=="version"&&e[vi]=="3.0")return H.getDesignSet("vcard3")}return t||H.getDesignSet(this.name)}_hydrateComponent(t){if(this._components||(this._components=[],this._hydratedComponentCount=0),this._components[t])return this._components[t];let e=new St(this.jCal[Lt][t],this);return this._hydratedComponentCount++,this._components[t]=e}_hydrateProperty(t){if(this._properties||(this._properties=[],this._hydratedPropertyCount=0),this._properties[t])return this._properties[t];let e=new Gt(this.jCal[wt][t],this);return this._hydratedPropertyCount++,this._properties[t]=e}getFirstSubcomponent(t){if(t){let e=0,r=this.jCal[Lt],s=r.length;for(;e<s;e++)if(r[e][jt]===t)return this._hydrateComponent(e)}else if(this.jCal[Lt].length)return this._hydrateComponent(0);return null}getAllSubcomponents(t){let e=this.jCal[Lt].length,r=0;if(t){let s=this.jCal[Lt],i=[];for(;r<e;r++)t===s[r][jt]&&i.push(this._hydrateComponent(r));return i}else{if(!this._components||this._hydratedComponentCount!==e)for(;r<e;r++)this._hydrateComponent(r);return this._components||[]}}hasProperty(t){let e=this.jCal[wt],r=e.length,s=0;for(;s<r;s++)if(e[s][jt]===t)return!0;return!1}getFirstProperty(t){if(t){let e=0,r=this.jCal[wt],s=r.length;for(;e<s;e++)if(r[e][jt]===t)return this._hydrateProperty(e)}else if(this.jCal[wt].length)return this._hydrateProperty(0);return null}getFirstPropertyValue(t){let e=this.getFirstProperty(t);return e?e.getFirstValue():null}getAllProperties(t){let e=this.jCal[wt].length,r=0;if(t){let s=this.jCal[wt],i=[];for(;r<e;r++)t===s[r][jt]&&i.push(this._hydrateProperty(r));return i}else{if(!this._properties||this._hydratedPropertyCount!==e)for(;r<e;r++)this._hydrateProperty(r);return this._properties||[]}}_removeObjectByIndex(t,e,r){if(e=e||[],e[r]){let s=e[r];"parent"in s&&(s.parent=null)}e.splice(r,1),this.jCal[t].splice(r,1)}_removeObject(t,e,r){let s=0,i=this.jCal[t],o=i.length,a=this[e];if(typeof r=="string"){for(;s<o;s++)if(i[s][jt]===r)return this._removeObjectByIndex(t,a,s),!0}else if(a){for(;s<o;s++)if(a[s]&&a[s]===r)return this._removeObjectByIndex(t,a,s),!0}return!1}_removeAllObjects(t,e,r){let s=this[e],i=this.jCal[t],o=i.length-1;for(;o>=0;o--)(!r||i[o][jt]===r)&&this._removeObjectByIndex(t,s,o)}addSubcomponent(t){this._components||(this._components=[],this._hydratedComponentCount=0),t.parent&&t.parent.removeSubcomponent(t);let e=this.jCal[Lt].push(t.jCal);return this._components[e-1]=t,this._hydratedComponentCount++,t.parent=this,t}removeSubcomponent(t){let e=this._removeObject(Lt,"_components",t);return e&&this._hydratedComponentCount--,e}removeAllSubcomponents(t){let e=this._removeAllObjects(Lt,"_components",t);return this._hydratedComponentCount=0,e}addProperty(t){if(!(t instanceof Gt))throw new TypeError("must be instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),t.parent&&t.parent.removeProperty(t);let e=this.jCal[wt].push(t.jCal);return this._properties[e-1]=t,this._hydratedPropertyCount++,t.parent=this,t}addPropertyWithValue(t,e){let r=new Gt(t);return r.setValue(e),this.addProperty(r),r}updatePropertyWithValue(t,e){let r=this.getFirstProperty(t);return r?r.setValue(e):r=this.addPropertyWithValue(t,e),r}removeProperty(t){let e=this._removeObject(wt,"_properties",t);return e&&this._hydratedPropertyCount--,e}removeAllProperties(t){let e=this._removeAllObjects(wt,"_properties",t);return this._hydratedPropertyCount=0,e}toJSON(){return this.jCal}toString(){return z.component(this.jCal,this._designSet)}getTimeZoneByID(t){if(this.parent)return this.parent.getTimeZoneByID(t);if(!this._timezoneCache)return null;if(this._timezoneCache.has(t))return this._timezoneCache.get(t);const e=this.getAllSubcomponents("vtimezone");for(const r of e)if(r.getFirstProperty("tzid").getFirstValue()===t){const s=new O({component:r,tzid:t});return this._timezoneCache.set(t,s),s}return null}}class Sn{constructor(t){this.ruleDates=[],this.exDates=[],this.fromData(t)}complete=!1;ruleIterators=null;ruleDates=null;exDates=null;ruleDateInc=0;exDateInc=0;exDate=null;ruleDate=null;dtstart=null;last=null;fromData(t){let e=It(t.dtstart,D);if(e)this.dtstart=e;else throw new Error(".dtstart (ICAL.Time) must be given");if(t.component)this._init(t.component);else{if(this.last=It(t.last,D)||e.clone(),!t.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=t.ruleIterators.map(function(r){return It(r,xt)}),this.ruleDateInc=t.ruleDateInc,this.exDateInc=t.exDateInc,t.ruleDates&&(this.ruleDates=t.ruleDates.map(r=>It(r,D)),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.exDates&&(this.exDates=t.exDates.map(r=>It(r,D)),this.exDate=this.exDates[this.exDateInc]),typeof t.complete<"u"&&(this.complete=t.complete)}}_compare_special(t,e){return!t.isDate&&e.isDate?new D({year:t.year,month:t.month,day:t.day}).compare(e):t.compare(e)}next(){let t,e,r,s=500,i=0;for(;;){if(i++>s)throw new Error("max tries have occurred, rule may be impossible to fulfill.");if(e=this.ruleDate,t=this._nextRecurrenceIter(this.last),!e&&!t){this.complete=!0;break}if((!e||t&&e.compare(t.last)>0)&&(e=t.last.clone(),t.next()),this.ruleDate===e&&this._nextRuleDay(),this.last=e,this.exDate&&(r=this._compare_special(this.last,this.exDate),r>0&&this._nextExDay(),r===0)){this._nextExDay();continue}return this.last}}toJSON(){function t(r){return r.toJSON()}let e=Object.create(null);return e.ruleIterators=this.ruleIterators.map(t),this.ruleDates&&(e.ruleDates=this.ruleDates.map(t)),this.exDates&&(e.exDates=this.exDates.map(t)),e.ruleDateInc=this.ruleDateInc,e.exDateInc=this.exDateInc,e.last=this.last.toJSON(),e.dtstart=this.dtstart.toJSON(),e.complete=this.complete,e}_extractDates(t,e){let r=[],s=t.getAllProperties(e);for(let i=0,o=s.length;i<o;i++)for(let a of s[i].getValues()){let h=Ht(r,a,(c,l)=>c.compare(l));r.splice(h,0,a)}return r}_init(t){if(this.ruleIterators=[],this.last=this.dtstart.clone(),!t.hasProperty("rdate")&&!t.hasProperty("rrule")&&!t.hasProperty("recurrence-id")){this.ruleDate=this.last.clone(),this.complete=!0;return}if(t.hasProperty("rdate")&&(this.ruleDates=this._extractDates(t,"rdate"),this.ruleDates[0]&&this.ruleDates[0].compare(this.dtstart)<0?(this.ruleDateInc=0,this.last=this.ruleDates[0].clone()):this.ruleDateInc=Ht(this.ruleDates,this.last,(e,r)=>e.compare(r)),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.hasProperty("rrule")){let e=t.getAllProperties("rrule"),r=0,s=e.length,i,o;for(;r<s;r++)i=e[r].getFirstValue(),o=i.iterator(this.dtstart),this.ruleIterators.push(o),o.next()}t.hasProperty("exdate")&&(this.exDates=this._extractDates(t,"exdate"),this.exDateInc=Ht(this.exDates,this.last,this._compare_special),this.exDate=this.exDates[this.exDateInc])}_nextExDay(){this.exDate=this.exDates[++this.exDateInc]}_nextRuleDay(){this.ruleDate=this.ruleDates[++this.ruleDateInc]}_nextRecurrenceIter(){let t=this.ruleIterators;if(t.length===0)return null;let e=t.length,r,s,i=0,o;for(;i<e;i++){if(r=t[i],s=r.last,r.completed){e--,i!==0&&i--,t.splice(i,1);continue}(!o||o.last.compare(s)>0)&&(o=r)}return o}}class ce{constructor(t,e){t instanceof St||(e=t,t=null),t?this.component=t:this.component=new St("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],e&&e.strictExceptions&&(this.strictExceptions=e.strictExceptions),e&&e.exceptions?e.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach(function(r){r.hasProperty("recurrence-id")&&this.relateException(r)},this)}static THISANDFUTURE="THISANDFUTURE";exceptions=null;strictExceptions=!1;relateException(t){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(t instanceof St&&(t=new ce(t)),this.strictExceptions&&t.uid!==this.uid)throw new Error("attempted to relate unrelated exception");let e=t.recurrenceId.toString();if(this.exceptions[e]=t,t.modifiesFuture()){let r=[t.recurrenceId.toUnixTime(),e],s=Ht(this.rangeExceptions,r,Fr);this.rangeExceptions.splice(s,0,r)}}modifiesFuture(){return this.component.hasProperty("recurrence-id")?this.component.getFirstProperty("recurrence-id").getParameter("range")===ce.THISANDFUTURE:!1}findRangeException(t){if(!this.rangeExceptions.length)return null;let e=t.toUnixTime(),r=Ht(this.rangeExceptions,[e],Fr);if(r-=1,r<0)return null;let s=this.rangeExceptions[r];return e<s[0]?null:s[1]}getOccurrenceDetails(t){let e=t.toString(),r=t.convertToZone(O.utcTimezone).toString(),s,i={recurrenceId:t};if(e in this.exceptions)s=i.item=this.exceptions[e],i.startDate=s.startDate,i.endDate=s.endDate,i.item=s;else if(r in this.exceptions)s=this.exceptions[r],i.startDate=s.startDate,i.endDate=s.endDate,i.item=s;else{let o=this.findRangeException(t),a;if(o){let h=this.exceptions[o];i.item=h;let c=this._rangeExceptionCache[o];if(!c){let u=h.recurrenceId.clone(),d=h.startDate.clone();u.zone=d.zone,c=d.subtractDate(u),this._rangeExceptionCache[o]=c}let l=t.clone();l.zone=h.startDate.zone,l.addDuration(c),a=l.clone(),a.addDuration(h.duration),i.startDate=l,i.endDate=a}else a=t.clone(),a.addDuration(this.duration),i.endDate=a,i.startDate=t,i.item=this}return i}iterator(t){return new Sn({component:this.component,dtstart:t||this.startDate})}isRecurring(){let t=this.component;return t.hasProperty("rrule")||t.hasProperty("rdate")}isRecurrenceException(){return this.component.hasProperty("recurrence-id")}getRecurrenceTypes(){let t=this.component.getAllProperties("rrule"),e=0,r=t.length,s=Object.create(null);for(;e<r;e++){let i=t[e].getFirstValue();s[i.freq]=!0}return s}get uid(){return this._firstProp("uid")}set uid(t){this._setProp("uid",t)}get startDate(){return this._firstProp("dtstart")}set startDate(t){this._setTime("dtstart",t)}get endDate(){let t=this._firstProp("dtend");if(!t){let e=this._firstProp("duration");t=this.startDate.clone(),e?t.addDuration(e):t.isDate&&(t.day+=1)}return t}set endDate(t){this.component.hasProperty("duration")&&this.component.removeProperty("duration"),this._setTime("dtend",t)}get duration(){return this._firstProp("duration")||this.endDate.subtractDateTz(this.startDate)}set duration(t){this.component.hasProperty("dtend")&&this.component.removeProperty("dtend"),this._setProp("duration",t)}get location(){return this._firstProp("location")}set location(t){this._setProp("location",t)}get attendees(){return this.component.getAllProperties("attendee")}get summary(){return this._firstProp("summary")}set summary(t){this._setProp("summary",t)}get description(){return this._firstProp("description")}set description(t){this._setProp("description",t)}get color(){return this._firstProp("color")}set color(t){this._setProp("color",t)}get organizer(){return this._firstProp("organizer")}set organizer(t){this._setProp("organizer",t)}get sequence(){return this._firstProp("sequence")}set sequence(t){this._setProp("sequence",t)}get recurrenceId(){return this._firstProp("recurrence-id")}set recurrenceId(t){this._setTime("recurrence-id",t)}_setTime(t,e){let r=this.component.getFirstProperty(t);r||(r=new Gt(t),this.component.addProperty(r)),e.zone===O.localTimezone||e.zone===O.utcTimezone?r.removeParameter("tzid"):r.setParameter("tzid",e.zone.tzid),r.setValue(e)}_setProp(t,e){this.component.updatePropertyWithValue(t,e)}_firstProp(t){return this.component.getFirstPropertyValue(t)}toString(){return this.component.toString()}}function Fr(n,t){return n[0]>t[0]?1:t[0]>n[0]?-1:0}class Ei{constructor(t){typeof t>"u"&&(t={});for(let[e,r]of Object.entries(t))this[e]=r}parseEvent=!0;parseTimezone=!0;oncomplete=function(){};onerror=function(t){};ontimezone=function(t){};onevent=function(t){};process(t){typeof t=="string"&&(t=k(t)),t instanceof St||(t=new St(t));let e=t.getAllSubcomponents(),r=0,s=e.length,i;for(;r<s;r++)switch(i=e[r],i.name){case"vtimezone":if(this.parseTimezone){let o=i.getFirstPropertyValue("tzid");o&&this.ontimezone(new O({tzid:o,component:i}))}break;case"vevent":this.parseEvent&&this.onevent(new ce(i));break;default:continue}this.oncomplete()}}var Tt={foldLength:75,debug:!1,newLineChar:`\r
`,Binary:je,Component:St,ComponentParser:Ei,Duration:it,Event:ce,Period:Pt,Property:Gt,Recur:st,RecurExpansion:Sn,RecurIterator:xt,Time:D,Timezone:O,TimezoneService:xe,UtcOffset:Dt,VCardTime:Rt,parse:k,stringify:z,design:H,helpers:ii};const rt=[];for(let n=0;n<256;++n)rt.push((n+256).toString(16).slice(1));function _i(n,t=0){return(rt[n[t+0]]+rt[n[t+1]]+rt[n[t+2]]+rt[n[t+3]]+"-"+rt[n[t+4]]+rt[n[t+5]]+"-"+rt[n[t+6]]+rt[n[t+7]]+"-"+rt[n[t+8]]+rt[n[t+9]]+"-"+rt[n[t+10]]+rt[n[t+11]]+rt[n[t+12]]+rt[n[t+13]]+rt[n[t+14]]+rt[n[t+15]]).toLowerCase()}let Fe;const Di=new Uint8Array(16);function wi(){if(!Fe){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Fe=crypto.getRandomValues.bind(crypto)}return Fe(Di)}const xi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Wr={randomUUID:xi};function Ci(n,t,e){n=n||{};const r=n.random??n.rng?.()??wi();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,_i(r)}function Ni(n,t,e){return Wr.randomUUID&&!n?Wr.randomUUID():Ci(n)}const Oi=(n,t)=>{const e=n.__vccOpts||n;for(const[r,s]of t)e[r]=s;return e},Ui={name:"CalendarAvailability",components:{NcDateTimePickerNative:pn,NcButton:fr,IconAdd:Ws,IconDelete:js},props:{slots:{type:Object,required:!0},loading:{type:Boolean,default:!1},l10nTo:{type:String,required:!0},l10nDeleteSlot:{type:String,required:!0},l10nEmptyDay:{type:String,required:!0},l10nAddSlot:{type:String,required:!0},l10nWeekDayListLabel:{type:String,default:"Weekdays"},l10nMonday:{type:String,required:!0},l10nTuesday:{type:String,required:!0},l10nWednesday:{type:String,required:!0},l10nThursday:{type:String,required:!0},l10nFriday:{type:String,required:!0},l10nSaturday:{type:String,required:!0},l10nSunday:{type:String,required:!0},l10nStartPickerLabel:{type:Function,default:n=>`Pick a start time for ${n}`},l10nEndPickerLabel:{type:Function,default:n=>`Pick a end time for ${n}`}},data(){return{internalSlots:this.slotsToInternalData(this.slots)}},watch:{slots(){this.internalSlots=this.slotsToInternalData(this.slots)}},methods:{timeStampSlotsToDateObjectSlots(n){return n.map(t=>({start:new Date(t.start*1e3),end:new Date(t.end*1e3)}))},slotsToInternalData(){const n=[{id:"MO",displayName:this.l10nMonday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.MO)},{id:"TU",displayName:this.l10nTuesday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.TU)},{id:"WE",displayName:this.l10nWednesday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.WE)},{id:"TH",displayName:this.l10nThursday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.TH)},{id:"FR",displayName:this.l10nFriday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.FR)},{id:"SA",displayName:this.l10nSaturday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.SA)}],t={id:"SU",displayName:this.l10nSunday,slots:this.timeStampSlotsToDateObjectSlots(this.slots.SU)};return us()===1?[...n,t]:[t,...n]},internalDataToSlots(){const n={};return this.internalSlots.forEach(({id:t,slots:e})=>{n[t]=e.map(r=>({start:Math.round(r.start.getTime()/1e3),end:Math.round(r.end.getTime()/1e3)}))}),n},addSlot(n){const t=new Date;t.setHours(9,0,0,0);const e=new Date;e.setHours(17,0,0,0),n.slots.push({start:t,end:e}),this.onChangeSlots()},removeSlot(n,t){n.slots.splice(t,1),this.onChangeSlots()},onChangeSlots(){this.$emit("update:slots",this.internalDataToSlots())}}},Pi=["aria-label"],Ii={class:"label-weekday"},Yi=["id"],Mi={class:"availability-slot-group"},ki={class:"to-text"},Bi={key:0,class:"empty-content"};function ji(n,t,e,r,s,i){const o=Et("NcDateTimePickerNative"),a=Et("IconDelete"),h=Et("NcButton"),c=Et("IconAdd");return B(),W("ul",{class:"week-day-container","aria-label":e.l10nWeekDayListLabel},[(B(!0),W(wr,null,xr(s.internalSlots,l=>(B(),W("li",{key:`day-label-${l.id}`,class:"day-container"},[pt("div",Ii,[pt("span",{id:l.displayName+"-label"},gt(l.displayName),9,Yi)]),(B(),W("div",{key:`day-slots-${l.id}`,class:"availability-slots"},[pt("div",Mi,[(B(!0),W(wr,null,xr(l.slots,(u,d)=>(B(),W("div",{key:`slot-${l.id}-${d}`,class:"availability-slot"},[G(o,{id:`start-${l.id}-${d}`,modelValue:u.start,"onUpdate:modelValue":m=>u.start=m,type:"time",label:e.l10nStartPickerLabel?.(l.displayName),"hide-label":!0,class:"start-date",onChange:i.onChangeSlots},null,8,["id","modelValue","onUpdate:modelValue","label","onChange"]),pt("span",ki,gt(e.l10nTo),1),G(o,{id:`end-${l.id}-${d}`,modelValue:u.end,"onUpdate:modelValue":m=>u.end=m,type:"time",label:e.l10nEndPickerLabel?.(l.displayName),"hide-label":!0,class:"end-date",onChange:i.onChangeSlots},null,8,["id","modelValue","onUpdate:modelValue","label","onChange"]),(B(),zt(h,{key:`slot-${l.id}-${d}-btn`,type:"tertiary",class:"button","aria-label":e.l10nDeleteSlot,title:e.l10nDeleteSlot,onClick:m=>i.removeSlot(l,d)},{icon:Nt(()=>[G(a,{size:20})]),_:2},1032,["aria-label","title","onClick"]))]))),128))]),l.slots.length===0?(B(),W("span",Bi,gt(e.l10nEmptyDay),1)):Yt("",!0)])),(B(),zt(h,{key:`add-slot-${l.id}`,disabled:e.loading,class:"add-another button",title:e.l10nAddSlot,"aria-label":e.l10nAddSlot,onClick:u=>i.addSlot(l)},{icon:Nt(()=>[G(c,{size:20})]),_:2},1032,["disabled","title","aria-label","onClick"]))]))),128))],8,Pi)}const Li=Oi(Ui,[["render",ji],["__scopeId","data-v-3ef03e87"]]),Ri=ls().detectUser().setApp("@nextcloud/calendar-availability-vue").build();function zi(){return{MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]}}function Vi(n){const t=Tt.parse(n),e=new Tt.Component(t),r=e.getFirstSubcomponent("vavailability");let s;const i=e.getFirstSubcomponent("vtimezone");i&&(s=i.getFirstProperty("tzid").getFirstValue());const o=r.getAllSubcomponents("available"),a=zi();return o.forEach(h=>{const c=h.getFirstProperty("dtstart").getFirstValue(),l=h.getFirstProperty("dtend").getFirstValue(),u=h.getFirstProperty("rrule"),d=new Date;d.setHours(c.hour,c.minute,0,0);const m=new Date;if(m.setHours(l.hour,l.minute,0,0),u.getFirstValue().freq!=="WEEKLY"){Ri.warn("rrule not supported",{rrule:u.toICALString()});return}u.getFirstValue().getComponent("BYDAY").forEach(p=>{a[p].push({start:d.getTime()/1e3,end:m.getTime()/1e3})})}),{slots:a,timezoneId:s}}function $i(n,t){const e=new Tt.Component("vcalendar");e.addPropertyWithValue("prodid","Nextcloud DAV app");const r=Ks.getZoneString(t);if(r){const o=new Tt.Component(Tt.parse(r));e.addSubcomponent(o)}else{const o=new Tt.Component("vtimezone");o.addPropertyWithValue("tzid",t),e.addSubcomponent(o)}const s=new Tt.Component("vavailability"),i=n.reduce((o,a)=>{const h=new Date(a.start*1e3),c=new Date(a.end*1e3),l=[h.getHours(),h.getMinutes(),c.getHours(),c.getMinutes()].join("-");return{...o,[l]:[...o[l]??[],a]}},{});return Object.keys(i).map(o=>{const a=i[o],h=a[0].start,c=a[0].end,l=a.map(d=>d.day).filter((d,m,p)=>p.indexOf(d)===m),u=new Tt.Component("available");return u.addPropertyWithValue("dtstart",Tt.Time.fromJSDate(new Date(h*1e3),!1)).setParameter("tzid",t),u.addPropertyWithValue("dtend",Tt.Time.fromJSDate(new Date(c*1e3),!1)).setParameter("tzid",t),u.addPropertyWithValue("uid",Ni()),u.addPropertyWithValue("rrule",{freq:"WEEKLY",byday:l}),u}).map(s.addSubcomponent.bind(s)),e.addSubcomponent(s),e.toString()}var We={},Fi={2:n=>{function t(s,i,o){s instanceof RegExp&&(s=e(s,o)),i instanceof RegExp&&(i=e(i,o));var a=r(s,i,o);return a&&{start:a[0],end:a[1],pre:o.slice(0,a[0]),body:o.slice(a[0]+s.length,a[1]),post:o.slice(a[1]+i.length)}}function e(s,i){var o=i.match(s);return o?o[0]:null}function r(s,i,o){var a,h,c,l,u,d=o.indexOf(s),m=o.indexOf(i,d+1),p=d;if(d>=0&&m>0){for(a=[],c=o.length;p>=0&&!u;)p==d?(a.push(p),d=o.indexOf(s,p+1)):a.length==1?u=[a.pop(),m]:((h=a.pop())<c&&(c=h,l=m),m=o.indexOf(i,p+1)),p=d<m&&d>=0?d:m;a.length&&(u=[c,l])}return u}n.exports=t,t.range=r},101:function(n,t,e){var r;n=e.nmd(n),(function(s){var i=(n&&n.exports,typeof fe=="object"&&fe);i.global!==i&&i.window;var o=function(u){this.message=u};(o.prototype=new Error).name="InvalidCharacterError";var a=function(u){throw new o(u)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,l={encode:function(u){u=String(u),/[^\0-\xFF]/.test(u)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var d,m,p,f,y=u.length%3,A="",g=-1,T=u.length-y;++g<T;)d=u.charCodeAt(g)<<16,m=u.charCodeAt(++g)<<8,p=u.charCodeAt(++g),A+=h.charAt((f=d+m+p)>>18&63)+h.charAt(f>>12&63)+h.charAt(f>>6&63)+h.charAt(63&f);return y==2?(d=u.charCodeAt(g)<<8,m=u.charCodeAt(++g),A+=h.charAt((f=d+m)>>10)+h.charAt(f>>4&63)+h.charAt(f<<2&63)+"="):y==1&&(f=u.charCodeAt(g),A+=h.charAt(f>>2)+h.charAt(f<<4&63)+"=="),A},decode:function(u){var d=(u=String(u).replace(c,"")).length;d%4==0&&(d=(u=u.replace(/==?$/,"")).length),(d%4==1||/[^+a-zA-Z0-9/]/.test(u))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var m,p,f=0,y="",A=-1;++A<d;)p=h.indexOf(u.charAt(A)),m=f%4?64*m+p:p,f++%4&&(y+=String.fromCharCode(255&m>>(-2*f&6)));return y},version:"1.0.0"};(r=function(){return l}.call(t,e,t,n))===void 0||(n.exports=r)})()},172:(n,t)=>{t.d=function(e){if(!e)return 0;for(var r=(e=e.toString()).length,s=e.length;s--;){var i=e.charCodeAt(s);56320<=i&&i<=57343&&s--,127<i&&i<=2047?r++:2047<i&&i<=65535&&(r+=2)}return r}},526:n=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var r=[],s=0;s<e.length;s++)r.push(255&e.charCodeAt(s));return r},bytesToString:function(e){for(var r=[],s=0;s<e.length;s++)r.push(String.fromCharCode(e[s]));return r.join("")}}};n.exports=t},298:n=>{var t,e;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(r,s){return r<<s|r>>>32-s},rotr:function(r,s){return r<<32-s|r>>>s},endian:function(r){if(r.constructor==Number)return 16711935&e.rotl(r,8)|4278255360&e.rotl(r,24);for(var s=0;s<r.length;s++)r[s]=e.endian(r[s]);return r},randomBytes:function(r){for(var s=[];r>0;r--)s.push(Math.floor(256*Math.random()));return s},bytesToWords:function(r){for(var s=[],i=0,o=0;i<r.length;i++,o+=8)s[o>>>5]|=r[i]<<24-o%32;return s},wordsToBytes:function(r){for(var s=[],i=0;i<32*r.length;i+=8)s.push(r[i>>>5]>>>24-i%32&255);return s},bytesToHex:function(r){for(var s=[],i=0;i<r.length;i++)s.push((r[i]>>>4).toString(16)),s.push((15&r[i]).toString(16));return s.join("")},hexToBytes:function(r){for(var s=[],i=0;i<r.length;i+=2)s.push(parseInt(r.substr(i,2),16));return s},bytesToBase64:function(r){for(var s=[],i=0;i<r.length;i+=3)for(var o=r[i]<<16|r[i+1]<<8|r[i+2],a=0;a<4;a++)8*i+6*a<=8*r.length?s.push(t.charAt(o>>>6*(3-a)&63)):s.push("=");return s.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var s=[],i=0,o=0;i<r.length;o=++i%4)o!=0&&s.push((t.indexOf(r.charAt(i-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(r.charAt(i))>>>6-2*o);return s}},n.exports=e},635:(n,t,e)=>{const r=e(31),s=e(338),i=e(221);n.exports={XMLParser:s,XMLValidator:r,XMLBuilder:i}},118:n=>{n.exports=function(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}},705:(n,t)=>{const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",s=new RegExp("^"+r+"$");t.isExist=function(i){return i!==void 0},t.isEmptyObject=function(i){return Object.keys(i).length===0},t.merge=function(i,o,a){if(o){const h=Object.keys(o),c=h.length;for(let l=0;l<c;l++)i[h[l]]=a==="strict"?[o[h[l]]]:o[h[l]]}},t.getValue=function(i){return t.isExist(i)?i:""},t.isName=function(i){return s.exec(i)!=null},t.getAllMatches=function(i,o){const a=[];let h=o.exec(i);for(;h;){const c=[];c.startIndex=o.lastIndex-h[0].length;const l=h.length;for(let u=0;u<l;u++)c.push(h[u]);a.push(c),h=o.exec(i)}return a},t.nameRegexp=r},31:(n,t,e)=>{const r=e(705),s={allowBooleanAttributes:!1,unpairedTags:[]};function i(g){return g===" "||g===" "||g===`
`||g==="\r"}function o(g,T){const v=T;for(;T<g.length;T++)if(!(g[T]!="?"&&g[T]!=" ")){const E=g.substr(v,T-v);if(T>5&&E==="xml")return p("InvalidXml","XML declaration allowed only at the start of the document.",y(g,T));if(g[T]=="?"&&g[T+1]==">"){T++;break}}return T}function a(g,T){if(g.length>T+5&&g[T+1]==="-"&&g[T+2]==="-"){for(T+=3;T<g.length;T++)if(g[T]==="-"&&g[T+1]==="-"&&g[T+2]===">"){T+=2;break}}else if(g.length>T+8&&g[T+1]==="D"&&g[T+2]==="O"&&g[T+3]==="C"&&g[T+4]==="T"&&g[T+5]==="Y"&&g[T+6]==="P"&&g[T+7]==="E"){let v=1;for(T+=8;T<g.length;T++)if(g[T]==="<")v++;else if(g[T]===">"&&(v--,v===0))break}else if(g.length>T+9&&g[T+1]==="["&&g[T+2]==="C"&&g[T+3]==="D"&&g[T+4]==="A"&&g[T+5]==="T"&&g[T+6]==="A"&&g[T+7]==="["){for(T+=8;T<g.length;T++)if(g[T]==="]"&&g[T+1]==="]"&&g[T+2]===">"){T+=2;break}}return T}t.validate=function(g,T){T=Object.assign({},s,T);const v=[];let E=!1,S=!1;g[0]==="\uFEFF"&&(g=g.substr(1));for(let b=0;b<g.length;b++)if(g[b]==="<"&&g[b+1]==="?"){if(b+=2,b=o(g,b),b.err)return b}else{if(g[b]!=="<"){if(i(g[b]))continue;return p("InvalidChar","char '"+g[b]+"' is not expected.",y(g,b))}{let x=b;if(b++,g[b]==="!"){b=a(g,b);continue}{let C=!1;g[b]==="/"&&(C=!0,b++);let N="";for(;b<g.length&&g[b]!==">"&&g[b]!==" "&&g[b]!==" "&&g[b]!==`
`&&g[b]!=="\r";b++)N+=g[b];if(N=N.trim(),N[N.length-1]==="/"&&(N=N.substring(0,N.length-1),b--),w=N,!r.isName(w)){let I;return I=N.trim().length===0?"Invalid space after '<'.":"Tag '"+N+"' is an invalid name.",p("InvalidTag",I,y(g,b))}const U=l(g,b);if(U===!1)return p("InvalidAttr","Attributes for '"+N+"' have open quote.",y(g,b));let _=U.value;if(b=U.index,_[_.length-1]==="/"){const I=b-_.length;_=_.substring(0,_.length-1);const P=d(_,T);if(P!==!0)return p(P.err.code,P.err.msg,y(g,I+P.err.line));E=!0}else if(C){if(!U.tagClosed)return p("InvalidTag","Closing tag '"+N+"' doesn't have proper closing.",y(g,b));if(_.trim().length>0)return p("InvalidTag","Closing tag '"+N+"' can't have attributes or invalid starting.",y(g,x));if(v.length===0)return p("InvalidTag","Closing tag '"+N+"' has not been opened.",y(g,x));{const I=v.pop();if(N!==I.tagName){let P=y(g,I.tagStartPos);return p("InvalidTag","Expected closing tag '"+I.tagName+"' (opened in line "+P.line+", col "+P.col+") instead of closing tag '"+N+"'.",y(g,x))}v.length==0&&(S=!0)}}else{const I=d(_,T);if(I!==!0)return p(I.err.code,I.err.msg,y(g,b-_.length+I.err.line));if(S===!0)return p("InvalidXml","Multiple possible root nodes found.",y(g,b));T.unpairedTags.indexOf(N)!==-1||v.push({tagName:N,tagStartPos:x}),E=!0}for(b++;b<g.length;b++)if(g[b]==="<"){if(g[b+1]==="!"){b++,b=a(g,b);continue}if(g[b+1]!=="?")break;if(b=o(g,++b),b.err)return b}else if(g[b]==="&"){const I=m(g,b);if(I==-1)return p("InvalidChar","char '&' is not expected.",y(g,b));b=I}else if(S===!0&&!i(g[b]))return p("InvalidXml","Extra text at the end",y(g,b));g[b]==="<"&&b--}}}var w;return E?v.length==1?p("InvalidTag","Unclosed tag '"+v[0].tagName+"'.",y(g,v[0].tagStartPos)):!(v.length>0)||p("InvalidXml","Invalid '"+JSON.stringify(v.map((b=>b.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):p("InvalidXml","Start tag expected.",1)};const h='"',c="'";function l(g,T){let v="",E="",S=!1;for(;T<g.length;T++){if(g[T]===h||g[T]===c)E===""?E=g[T]:E!==g[T]||(E="");else if(g[T]===">"&&E===""){S=!0;break}v+=g[T]}return E===""&&{value:v,index:T,tagClosed:S}}const u=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function d(g,T){const v=r.getAllMatches(g,u),E={};for(let S=0;S<v.length;S++){if(v[S][1].length===0)return p("InvalidAttr","Attribute '"+v[S][2]+"' has no space in starting.",A(v[S]));if(v[S][3]!==void 0&&v[S][4]===void 0)return p("InvalidAttr","Attribute '"+v[S][2]+"' is without value.",A(v[S]));if(v[S][3]===void 0&&!T.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+v[S][2]+"' is not allowed.",A(v[S]));const w=v[S][2];if(!f(w))return p("InvalidAttr","Attribute '"+w+"' is an invalid name.",A(v[S]));if(E.hasOwnProperty(w))return p("InvalidAttr","Attribute '"+w+"' is repeated.",A(v[S]));E[w]=1}return!0}function m(g,T){if(g[++T]===";")return-1;if(g[T]==="#")return(function(E,S){let w=/\d/;for(E[S]==="x"&&(S++,w=/[\da-fA-F]/);S<E.length;S++){if(E[S]===";")return S;if(!E[S].match(w))break}return-1})(g,++T);let v=0;for(;T<g.length;T++,v++)if(!(g[T].match(/\w/)&&v<20)){if(g[T]===";")break;return-1}return T}function p(g,T,v){return{err:{code:g,msg:T,line:v.line||v,col:v.col}}}function f(g){return r.isName(g)}function y(g,T){const v=g.substring(0,T).split(/\r?\n/);return{line:v.length,col:v[v.length-1].length+1}}function A(g){return g.startIndex+g[1].length}},221:(n,t,e)=>{const r=e(87),s=e(118),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(l,u){return u},attributeValueProcessor:function(l,u){return u},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function o(l){this.options=Object.assign({},i,l),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=s(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=a,this.options.format?(this.indentate=h,this.tagEndChar=`>
`,this.newLine=`
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function a(l,u,d,m){const p=this.j2x(l,d+1,m.concat(u));return l[this.options.textNodeName]!==void 0&&Object.keys(l).length===1?this.buildTextValNode(l[this.options.textNodeName],u,p.attrStr,d):this.buildObjectNode(p.val,u,p.attrStr,d)}function h(l){return this.options.indentBy.repeat(l)}function c(l){return!(!l.startsWith(this.options.attributeNamePrefix)||l===this.options.textNodeName)&&l.substr(this.attrPrefixLen)}o.prototype.build=function(l){return this.options.preserveOrder?r(l,this.options):(Array.isArray(l)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(l={[this.options.arrayNodeName]:l}),this.j2x(l,0,[]).val)},o.prototype.j2x=function(l,u,d){let m="",p="";const f=d.join(".");for(let y in l)if(Object.prototype.hasOwnProperty.call(l,y))if(l[y]===void 0)this.isAttribute(y)&&(p+="");else if(l[y]===null)this.isAttribute(y)?p+="":y[0]==="?"?p+=this.indentate(u)+"<"+y+"?"+this.tagEndChar:p+=this.indentate(u)+"<"+y+"/"+this.tagEndChar;else if(l[y]instanceof Date)p+=this.buildTextValNode(l[y],y,"",u);else if(typeof l[y]!="object"){const A=this.isAttribute(y);if(A&&!this.ignoreAttributesFn(A,f))m+=this.buildAttrPairStr(A,""+l[y]);else if(!A)if(y===this.options.textNodeName){let g=this.options.tagValueProcessor(y,""+l[y]);p+=this.replaceEntitiesValue(g)}else p+=this.buildTextValNode(l[y],y,"",u)}else if(Array.isArray(l[y])){const A=l[y].length;let g="",T="";for(let v=0;v<A;v++){const E=l[y][v];if(E!==void 0)if(E===null)y[0]==="?"?p+=this.indentate(u)+"<"+y+"?"+this.tagEndChar:p+=this.indentate(u)+"<"+y+"/"+this.tagEndChar;else if(typeof E=="object")if(this.options.oneListGroup){const S=this.j2x(E,u+1,d.concat(y));g+=S.val,this.options.attributesGroupName&&E.hasOwnProperty(this.options.attributesGroupName)&&(T+=S.attrStr)}else g+=this.processTextOrObjNode(E,y,u,d);else if(this.options.oneListGroup){let S=this.options.tagValueProcessor(y,E);S=this.replaceEntitiesValue(S),g+=S}else g+=this.buildTextValNode(E,y,"",u)}this.options.oneListGroup&&(g=this.buildObjectNode(g,y,T,u)),p+=g}else if(this.options.attributesGroupName&&y===this.options.attributesGroupName){const A=Object.keys(l[y]),g=A.length;for(let T=0;T<g;T++)m+=this.buildAttrPairStr(A[T],""+l[y][A[T]])}else p+=this.processTextOrObjNode(l[y],y,u,d);return{attrStr:m,val:p}},o.prototype.buildAttrPairStr=function(l,u){return u=this.options.attributeValueProcessor(l,""+u),u=this.replaceEntitiesValue(u),this.options.suppressBooleanAttributes&&u==="true"?" "+l:" "+l+'="'+u+'"'},o.prototype.buildObjectNode=function(l,u,d,m){if(l==="")return u[0]==="?"?this.indentate(m)+"<"+u+d+"?"+this.tagEndChar:this.indentate(m)+"<"+u+d+this.closeTag(u)+this.tagEndChar;{let p="</"+u+this.tagEndChar,f="";return u[0]==="?"&&(f="?",p=""),!d&&d!==""||l.indexOf("<")!==-1?this.options.commentPropName!==!1&&u===this.options.commentPropName&&f.length===0?this.indentate(m)+`<!--${l}-->`+this.newLine:this.indentate(m)+"<"+u+d+f+this.tagEndChar+l+this.indentate(m)+p:this.indentate(m)+"<"+u+d+f+">"+l+p}},o.prototype.closeTag=function(l){let u="";return this.options.unpairedTags.indexOf(l)!==-1?this.options.suppressUnpairedNode||(u="/"):u=this.options.suppressEmptyNode?"/":`></${l}`,u},o.prototype.buildTextValNode=function(l,u,d,m){if(this.options.cdataPropName!==!1&&u===this.options.cdataPropName)return this.indentate(m)+`<![CDATA[${l}]]>`+this.newLine;if(this.options.commentPropName!==!1&&u===this.options.commentPropName)return this.indentate(m)+`<!--${l}-->`+this.newLine;if(u[0]==="?")return this.indentate(m)+"<"+u+d+"?"+this.tagEndChar;{let p=this.options.tagValueProcessor(u,l);return p=this.replaceEntitiesValue(p),p===""?this.indentate(m)+"<"+u+d+this.closeTag(u)+this.tagEndChar:this.indentate(m)+"<"+u+d+">"+p+"</"+u+this.tagEndChar}},o.prototype.replaceEntitiesValue=function(l){if(l&&l.length>0&&this.options.processEntities)for(let u=0;u<this.options.entities.length;u++){const d=this.options.entities[u];l=l.replace(d.regex,d.val)}return l},n.exports=o},87:n=>{function t(o,a,h,c){let l="",u=!1;for(let d=0;d<o.length;d++){const m=o[d],p=e(m);if(p===void 0)continue;let f="";if(f=h.length===0?p:`${h}.${p}`,p===a.textNodeName){let T=m[p];s(f,a)||(T=a.tagValueProcessor(p,T),T=i(T,a)),u&&(l+=c),l+=T,u=!1;continue}if(p===a.cdataPropName){u&&(l+=c),l+=`<![CDATA[${m[p][0][a.textNodeName]}]]>`,u=!1;continue}if(p===a.commentPropName){l+=c+`<!--${m[p][0][a.textNodeName]}-->`,u=!0;continue}if(p[0]==="?"){const T=r(m[":@"],a),v=p==="?xml"?"":c;let E=m[p][0][a.textNodeName];E=E.length!==0?" "+E:"",l+=v+`<${p}${E}${T}?>`,u=!0;continue}let y=c;y!==""&&(y+=a.indentBy);const A=c+`<${p}${r(m[":@"],a)}`,g=t(m[p],a,f,y);a.unpairedTags.indexOf(p)!==-1?a.suppressUnpairedNode?l+=A+">":l+=A+"/>":g&&g.length!==0||!a.suppressEmptyNode?g&&g.endsWith(">")?l+=A+`>${g}${c}</${p}>`:(l+=A+">",g&&c!==""&&(g.includes("/>")||g.includes("</"))?l+=c+a.indentBy+g+c:l+=g,l+=`</${p}>`):l+=A+"/>",u=!0}return l}function e(o){const a=Object.keys(o);for(let h=0;h<a.length;h++){const c=a[h];if(o.hasOwnProperty(c)&&c!==":@")return c}}function r(o,a){let h="";if(o&&!a.ignoreAttributes)for(let c in o){if(!o.hasOwnProperty(c))continue;let l=a.attributeValueProcessor(c,o[c]);l=i(l,a),l===!0&&a.suppressBooleanAttributes?h+=` ${c.substr(a.attributeNamePrefix.length)}`:h+=` ${c.substr(a.attributeNamePrefix.length)}="${l}"`}return h}function s(o,a){let h=(o=o.substr(0,o.length-a.textNodeName.length-1)).substr(o.lastIndexOf(".")+1);for(let c in a.stopNodes)if(a.stopNodes[c]===o||a.stopNodes[c]==="*."+h)return!0;return!1}function i(o,a){if(o&&o.length>0&&a.processEntities)for(let h=0;h<a.entities.length;h++){const c=a.entities[h];o=o.replace(c.regex,c.val)}return o}n.exports=function(o,a){let h="";return a.format&&a.indentBy.length>0&&(h=`
`),t(o,a,"",h)}},193:(n,t,e)=>{const r=e(705);function s(u,d){let m="";for(;d<u.length&&u[d]!=="'"&&u[d]!=='"';d++)m+=u[d];if(m=m.trim(),m.indexOf(" ")!==-1)throw new Error("External entites are not supported");const p=u[d++];let f="";for(;d<u.length&&u[d]!==p;d++)f+=u[d];return[m,f,d]}function i(u,d){return u[d+1]==="!"&&u[d+2]==="-"&&u[d+3]==="-"}function o(u,d){return u[d+1]==="!"&&u[d+2]==="E"&&u[d+3]==="N"&&u[d+4]==="T"&&u[d+5]==="I"&&u[d+6]==="T"&&u[d+7]==="Y"}function a(u,d){return u[d+1]==="!"&&u[d+2]==="E"&&u[d+3]==="L"&&u[d+4]==="E"&&u[d+5]==="M"&&u[d+6]==="E"&&u[d+7]==="N"&&u[d+8]==="T"}function h(u,d){return u[d+1]==="!"&&u[d+2]==="A"&&u[d+3]==="T"&&u[d+4]==="T"&&u[d+5]==="L"&&u[d+6]==="I"&&u[d+7]==="S"&&u[d+8]==="T"}function c(u,d){return u[d+1]==="!"&&u[d+2]==="N"&&u[d+3]==="O"&&u[d+4]==="T"&&u[d+5]==="A"&&u[d+6]==="T"&&u[d+7]==="I"&&u[d+8]==="O"&&u[d+9]==="N"}function l(u){if(r.isName(u))return u;throw new Error(`Invalid entity name ${u}`)}n.exports=function(u,d){const m={};if(u[d+3]!=="O"||u[d+4]!=="C"||u[d+5]!=="T"||u[d+6]!=="Y"||u[d+7]!=="P"||u[d+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{d+=9;let p=1,f=!1,y=!1,A="";for(;d<u.length;d++)if(u[d]!=="<"||y)if(u[d]===">"){if(y?u[d-1]==="-"&&u[d-2]==="-"&&(y=!1,p--):p--,p===0)break}else u[d]==="["?f=!0:A+=u[d];else{if(f&&o(u,d)){let g,T;d+=7,[g,T,d]=s(u,d+1),T.indexOf("&")===-1&&(m[l(g)]={regx:RegExp(`&${g};`,"g"),val:T})}else if(f&&a(u,d))d+=8;else if(f&&h(u,d))d+=8;else if(f&&c(u,d))d+=9;else{if(!i)throw new Error("Invalid DOCTYPE");y=!0}p++,A=""}if(p!==0)throw new Error("Unclosed DOCTYPE")}return{entities:m,i:d}}},63:(n,t)=>{const e={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(r,s){return s},attributeValueProcessor:function(r,s){return s},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,s,i){return r}};t.buildOptions=function(r){return Object.assign({},e,r)},t.defaultOptions=e},299:(n,t,e)=>{const r=e(705),s=e(365),i=e(193),o=e(494),a=e(118);function h(S){const w=Object.keys(S);for(let b=0;b<w.length;b++){const x=w[b];this.lastEntities[x]={regex:new RegExp("&"+x+";","g"),val:S[x]}}}function c(S,w,b,x,C,N,U){if(S!==void 0&&(this.options.trimValues&&!x&&(S=S.trim()),S.length>0)){U||(S=this.replaceEntitiesValue(S));const _=this.options.tagValueProcessor(w,S,b,C,N);return _==null?S:typeof _!=typeof S||_!==S?_:this.options.trimValues||S.trim()===S?E(S,this.options.parseTagValue,this.options.numberParseOptions):S}}function l(S){if(this.options.removeNSPrefix){const w=S.split(":"),b=S.charAt(0)==="/"?"/":"";if(w[0]==="xmlns")return"";w.length===2&&(S=b+w[1])}return S}const u=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function d(S,w,b){if(this.options.ignoreAttributes!==!0&&typeof S=="string"){const x=r.getAllMatches(S,u),C=x.length,N={};for(let U=0;U<C;U++){const _=this.resolveNameSpace(x[U][1]);if(this.ignoreAttributesFn(_,w))continue;let I=x[U][4],P=this.options.attributeNamePrefix+_;if(_.length)if(this.options.transformAttributeName&&(P=this.options.transformAttributeName(P)),P==="__proto__"&&(P="#__proto__"),I!==void 0){this.options.trimValues&&(I=I.trim()),I=this.replaceEntitiesValue(I);const R=this.options.attributeValueProcessor(_,I,w);N[P]=R==null?I:typeof R!=typeof I||R!==I?R:E(I,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(N[P]=!0)}if(!Object.keys(N).length)return;if(this.options.attributesGroupName){const U={};return U[this.options.attributesGroupName]=N,U}return N}}const m=function(S){S=S.replace(/\r\n?/g,`
`);const w=new s("!xml");let b=w,x="",C="";for(let N=0;N<S.length;N++)if(S[N]==="<")if(S[N+1]==="/"){const U=g(S,">",N,"Closing Tag is not closed.");let _=S.substring(N+2,U).trim();if(this.options.removeNSPrefix){const R=_.indexOf(":");R!==-1&&(_=_.substr(R+1))}this.options.transformTagName&&(_=this.options.transformTagName(_)),b&&(x=this.saveTextToParentTag(x,b,C));const I=C.substring(C.lastIndexOf(".")+1);if(_&&this.options.unpairedTags.indexOf(_)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${_}>`);let P=0;I&&this.options.unpairedTags.indexOf(I)!==-1?(P=C.lastIndexOf(".",C.lastIndexOf(".")-1),this.tagsNodeStack.pop()):P=C.lastIndexOf("."),C=C.substring(0,P),b=this.tagsNodeStack.pop(),x="",N=U}else if(S[N+1]==="?"){let U=T(S,N,!1,"?>");if(!U)throw new Error("Pi Tag is not closed.");if(x=this.saveTextToParentTag(x,b,C),!(this.options.ignoreDeclaration&&U.tagName==="?xml"||this.options.ignorePiTags)){const _=new s(U.tagName);_.add(this.options.textNodeName,""),U.tagName!==U.tagExp&&U.attrExpPresent&&(_[":@"]=this.buildAttributesMap(U.tagExp,C,U.tagName)),this.addChild(b,_,C)}N=U.closeIndex+1}else if(S.substr(N+1,3)==="!--"){const U=g(S,"-->",N+4,"Comment is not closed.");if(this.options.commentPropName){const _=S.substring(N+4,U-2);x=this.saveTextToParentTag(x,b,C),b.add(this.options.commentPropName,[{[this.options.textNodeName]:_}])}N=U}else if(S.substr(N+1,2)==="!D"){const U=i(S,N);this.docTypeEntities=U.entities,N=U.i}else if(S.substr(N+1,2)==="!["){const U=g(S,"]]>",N,"CDATA is not closed.")-2,_=S.substring(N+9,U);x=this.saveTextToParentTag(x,b,C);let I=this.parseTextData(_,b.tagname,C,!0,!1,!0,!0);I==null&&(I=""),this.options.cdataPropName?b.add(this.options.cdataPropName,[{[this.options.textNodeName]:_}]):b.add(this.options.textNodeName,I),N=U+2}else{let U=T(S,N,this.options.removeNSPrefix),_=U.tagName;const I=U.rawTagName;let P=U.tagExp,R=U.attrExpPresent,tt=U.closeIndex;this.options.transformTagName&&(_=this.options.transformTagName(_)),b&&x&&b.tagname!=="!xml"&&(x=this.saveTextToParentTag(x,b,C,!1));const q=b;if(q&&this.options.unpairedTags.indexOf(q.tagname)!==-1&&(b=this.tagsNodeStack.pop(),C=C.substring(0,C.lastIndexOf("."))),_!==w.tagname&&(C+=C?"."+_:_),this.isItStopNode(this.options.stopNodes,C,_)){let F="";if(P.length>0&&P.lastIndexOf("/")===P.length-1)_[_.length-1]==="/"?(_=_.substr(0,_.length-1),C=C.substr(0,C.length-1),P=_):P=P.substr(0,P.length-1),N=U.closeIndex;else if(this.options.unpairedTags.indexOf(_)!==-1)N=U.closeIndex;else{const K=this.readStopNodeData(S,I,tt+1);if(!K)throw new Error(`Unexpected end of ${I}`);N=K.i,F=K.tagContent}const At=new s(_);_!==P&&R&&(At[":@"]=this.buildAttributesMap(P,C,_)),F&&(F=this.parseTextData(F,_,C,!0,R,!0,!0)),C=C.substr(0,C.lastIndexOf(".")),At.add(this.options.textNodeName,F),this.addChild(b,At,C)}else{if(P.length>0&&P.lastIndexOf("/")===P.length-1){_[_.length-1]==="/"?(_=_.substr(0,_.length-1),C=C.substr(0,C.length-1),P=_):P=P.substr(0,P.length-1),this.options.transformTagName&&(_=this.options.transformTagName(_));const F=new s(_);_!==P&&R&&(F[":@"]=this.buildAttributesMap(P,C,_)),this.addChild(b,F,C),C=C.substr(0,C.lastIndexOf("."))}else{const F=new s(_);this.tagsNodeStack.push(b),_!==P&&R&&(F[":@"]=this.buildAttributesMap(P,C,_)),this.addChild(b,F,C),b=F}x="",N=tt}}else x+=S[N];return w.child};function p(S,w,b){const x=this.options.updateTag(w.tagname,b,w[":@"]);x===!1||(typeof x=="string"&&(w.tagname=x),S.addChild(w))}const f=function(S){if(this.options.processEntities){for(let w in this.docTypeEntities){const b=this.docTypeEntities[w];S=S.replace(b.regx,b.val)}for(let w in this.lastEntities){const b=this.lastEntities[w];S=S.replace(b.regex,b.val)}if(this.options.htmlEntities)for(let w in this.htmlEntities){const b=this.htmlEntities[w];S=S.replace(b.regex,b.val)}S=S.replace(this.ampEntity.regex,this.ampEntity.val)}return S};function y(S,w,b,x){return S&&(x===void 0&&(x=Object.keys(w.child).length===0),(S=this.parseTextData(S,w.tagname,b,!1,!!w[":@"]&&Object.keys(w[":@"]).length!==0,x))!==void 0&&S!==""&&w.add(this.options.textNodeName,S),S=""),S}function A(S,w,b){const x="*."+b;for(const C in S){const N=S[C];if(x===N||w===N)return!0}return!1}function g(S,w,b,x){const C=S.indexOf(w,b);if(C===-1)throw new Error(x);return C+w.length-1}function T(S,w,b){const x=(function(R,tt){let q,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",At="";for(let K=tt;K<R.length;K++){let et=R[K];if(q)et===q&&(q="");else if(et==='"'||et==="'")q=et;else if(et===F[0]){if(!F[1])return{data:At,index:K};if(R[K+1]===F[1])return{data:At,index:K}}else et===" "&&(et=" ");At+=et}})(S,w+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!x)return;let C=x.data;const N=x.index,U=C.search(/\s/);let _=C,I=!0;U!==-1&&(_=C.substring(0,U),C=C.substring(U+1).trimStart());const P=_;if(b){const R=_.indexOf(":");R!==-1&&(_=_.substr(R+1),I=_!==x.data.substr(R+1))}return{tagName:_,tagExp:C,closeIndex:N,attrExpPresent:I,rawTagName:P}}function v(S,w,b){const x=b;let C=1;for(;b<S.length;b++)if(S[b]==="<")if(S[b+1]==="/"){const N=g(S,">",b,`${w} is not closed`);if(S.substring(b+2,N).trim()===w&&(C--,C===0))return{tagContent:S.substring(x,b),i:N};b=N}else if(S[b+1]==="?")b=g(S,"?>",b+1,"StopNode is not closed.");else if(S.substr(b+1,3)==="!--")b=g(S,"-->",b+3,"StopNode is not closed.");else if(S.substr(b+1,2)==="![")b=g(S,"]]>",b,"StopNode is not closed.")-2;else{const N=T(S,b,">");N&&((N&&N.tagName)===w&&N.tagExp[N.tagExp.length-1]!=="/"&&C++,b=N.closeIndex)}}function E(S,w,b){if(w&&typeof S=="string"){const x=S.trim();return x==="true"||x!=="false"&&o(S,b)}return r.isExist(S)?S:""}n.exports=class{constructor(S){this.options=S,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(w,b)=>String.fromCharCode(Number.parseInt(b,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(w,b)=>String.fromCharCode(Number.parseInt(b,16))}},this.addExternalEntities=h,this.parseXml=m,this.parseTextData=c,this.resolveNameSpace=l,this.buildAttributesMap=d,this.isItStopNode=A,this.replaceEntitiesValue=f,this.readStopNodeData=v,this.saveTextToParentTag=y,this.addChild=p,this.ignoreAttributesFn=a(this.options.ignoreAttributes)}}},338:(n,t,e)=>{const{buildOptions:r}=e(63),s=e(299),{prettify:i}=e(728),o=e(31);n.exports=class{constructor(a){this.externalEntities={},this.options=r(a)}parse(a,h){if(typeof a!="string"){if(!a.toString)throw new Error("XML data is accepted in String or Bytes[] form.");a=a.toString()}if(h){h===!0&&(h={});const u=o.validate(a,h);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const c=new s(this.options);c.addExternalEntities(this.externalEntities);const l=c.parseXml(a);return this.options.preserveOrder||l===void 0?l:i(l,this.options)}addEntity(a,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(a.indexOf("&")!==-1||a.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(h==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[a]=h}}},728:(n,t)=>{function e(o,a,h){let c;const l={};for(let u=0;u<o.length;u++){const d=o[u],m=r(d);let p="";if(p=h===void 0?m:h+"."+m,m===a.textNodeName)c===void 0?c=d[m]:c+=""+d[m];else{if(m===void 0)continue;if(d[m]){let f=e(d[m],a,p);const y=i(f,a);d[":@"]?s(f,d[":@"],p,a):Object.keys(f).length!==1||f[a.textNodeName]===void 0||a.alwaysCreateTextNode?Object.keys(f).length===0&&(a.alwaysCreateTextNode?f[a.textNodeName]="":f=""):f=f[a.textNodeName],l[m]!==void 0&&l.hasOwnProperty(m)?(Array.isArray(l[m])||(l[m]=[l[m]]),l[m].push(f)):a.isArray(m,p,y)?l[m]=[f]:l[m]=f}}}return typeof c=="string"?c.length>0&&(l[a.textNodeName]=c):c!==void 0&&(l[a.textNodeName]=c),l}function r(o){const a=Object.keys(o);for(let h=0;h<a.length;h++){const c=a[h];if(c!==":@")return c}}function s(o,a,h,c){if(a){const l=Object.keys(a),u=l.length;for(let d=0;d<u;d++){const m=l[d];c.isArray(m,h+"."+m,!0,!0)?o[m]=[a[m]]:o[m]=a[m]}}}function i(o,a){const{textNodeName:h}=a,c=Object.keys(o).length;return c===0||!(c!==1||!o[h]&&typeof o[h]!="boolean"&&o[h]!==0)}t.prettify=function(o,a){return e(o,a)}},365:n=>{n.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},135:n=>{function t(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}n.exports=function(e){return e!=null&&(t(e)||(function(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&t(r.slice(0,0))})(e)||!!e._isBuffer)}},542:(n,t,e)=>{(function(){var r=e(298),s=e(526).utf8,i=e(135),o=e(526).bin,a=function(h,c){h.constructor==String?h=c&&c.encoding==="binary"?o.stringToBytes(h):s.stringToBytes(h):i(h)?h=Array.prototype.slice.call(h,0):Array.isArray(h)||h.constructor===Uint8Array||(h=h.toString());for(var l=r.bytesToWords(h),u=8*h.length,d=1732584193,m=-271733879,p=-1732584194,f=271733878,y=0;y<l.length;y++)l[y]=16711935&(l[y]<<8|l[y]>>>24)|4278255360&(l[y]<<24|l[y]>>>8);l[u>>>5]|=128<<u%32,l[14+(u+64>>>9<<4)]=u;var A=a._ff,g=a._gg,T=a._hh,v=a._ii;for(y=0;y<l.length;y+=16){var E=d,S=m,w=p,b=f;d=A(d,m,p,f,l[y+0],7,-680876936),f=A(f,d,m,p,l[y+1],12,-389564586),p=A(p,f,d,m,l[y+2],17,606105819),m=A(m,p,f,d,l[y+3],22,-1044525330),d=A(d,m,p,f,l[y+4],7,-176418897),f=A(f,d,m,p,l[y+5],12,1200080426),p=A(p,f,d,m,l[y+6],17,-1473231341),m=A(m,p,f,d,l[y+7],22,-45705983),d=A(d,m,p,f,l[y+8],7,1770035416),f=A(f,d,m,p,l[y+9],12,-1958414417),p=A(p,f,d,m,l[y+10],17,-42063),m=A(m,p,f,d,l[y+11],22,-1990404162),d=A(d,m,p,f,l[y+12],7,1804603682),f=A(f,d,m,p,l[y+13],12,-40341101),p=A(p,f,d,m,l[y+14],17,-1502002290),d=g(d,m=A(m,p,f,d,l[y+15],22,1236535329),p,f,l[y+1],5,-165796510),f=g(f,d,m,p,l[y+6],9,-1069501632),p=g(p,f,d,m,l[y+11],14,643717713),m=g(m,p,f,d,l[y+0],20,-373897302),d=g(d,m,p,f,l[y+5],5,-701558691),f=g(f,d,m,p,l[y+10],9,38016083),p=g(p,f,d,m,l[y+15],14,-660478335),m=g(m,p,f,d,l[y+4],20,-405537848),d=g(d,m,p,f,l[y+9],5,568446438),f=g(f,d,m,p,l[y+14],9,-1019803690),p=g(p,f,d,m,l[y+3],14,-187363961),m=g(m,p,f,d,l[y+8],20,1163531501),d=g(d,m,p,f,l[y+13],5,-1444681467),f=g(f,d,m,p,l[y+2],9,-51403784),p=g(p,f,d,m,l[y+7],14,1735328473),d=T(d,m=g(m,p,f,d,l[y+12],20,-1926607734),p,f,l[y+5],4,-378558),f=T(f,d,m,p,l[y+8],11,-2022574463),p=T(p,f,d,m,l[y+11],16,1839030562),m=T(m,p,f,d,l[y+14],23,-35309556),d=T(d,m,p,f,l[y+1],4,-1530992060),f=T(f,d,m,p,l[y+4],11,1272893353),p=T(p,f,d,m,l[y+7],16,-155497632),m=T(m,p,f,d,l[y+10],23,-1094730640),d=T(d,m,p,f,l[y+13],4,681279174),f=T(f,d,m,p,l[y+0],11,-358537222),p=T(p,f,d,m,l[y+3],16,-722521979),m=T(m,p,f,d,l[y+6],23,76029189),d=T(d,m,p,f,l[y+9],4,-640364487),f=T(f,d,m,p,l[y+12],11,-421815835),p=T(p,f,d,m,l[y+15],16,530742520),d=v(d,m=T(m,p,f,d,l[y+2],23,-995338651),p,f,l[y+0],6,-198630844),f=v(f,d,m,p,l[y+7],10,1126891415),p=v(p,f,d,m,l[y+14],15,-1416354905),m=v(m,p,f,d,l[y+5],21,-57434055),d=v(d,m,p,f,l[y+12],6,1700485571),f=v(f,d,m,p,l[y+3],10,-1894986606),p=v(p,f,d,m,l[y+10],15,-1051523),m=v(m,p,f,d,l[y+1],21,-2054922799),d=v(d,m,p,f,l[y+8],6,1873313359),f=v(f,d,m,p,l[y+15],10,-30611744),p=v(p,f,d,m,l[y+6],15,-1560198380),m=v(m,p,f,d,l[y+13],21,1309151649),d=v(d,m,p,f,l[y+4],6,-145523070),f=v(f,d,m,p,l[y+11],10,-1120210379),p=v(p,f,d,m,l[y+2],15,718787259),m=v(m,p,f,d,l[y+9],21,-343485551),d=d+E>>>0,m=m+S>>>0,p=p+w>>>0,f=f+b>>>0}return r.endian([d,m,p,f])};a._ff=function(h,c,l,u,d,m,p){var f=h+(c&l|~c&u)+(d>>>0)+p;return(f<<m|f>>>32-m)+c},a._gg=function(h,c,l,u,d,m,p){var f=h+(c&u|l&~u)+(d>>>0)+p;return(f<<m|f>>>32-m)+c},a._hh=function(h,c,l,u,d,m,p){var f=h+(c^l^u)+(d>>>0)+p;return(f<<m|f>>>32-m)+c},a._ii=function(h,c,l,u,d,m,p){var f=h+(l^(c|~u))+(d>>>0)+p;return(f<<m|f>>>32-m)+c},a._blocksize=16,a._digestsize=16,n.exports=function(h,c){if(h==null)throw new Error("Illegal argument "+h);var l=r.wordsToBytes(a(h,c));return c&&c.asBytes?l:c&&c.asString?o.bytesToString(l):r.bytesToHex(l)}})()},285:(n,t,e)=>{var r=e(2);n.exports=function(A){return A?(A.substr(0,2)==="{}"&&(A="\\{\\}"+A.substr(2)),y((function(g){return g.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(o).split("\\,").join(a).split("\\.").join(h)})(A),!0).map(l)):[]};var s="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",h="\0PERIOD"+Math.random()+"\0";function c(A){return parseInt(A,10)==A?parseInt(A,10):A.charCodeAt(0)}function l(A){return A.split(s).join("\\").split(i).join("{").split(o).join("}").split(a).join(",").split(h).join(".")}function u(A){if(!A)return[""];var g=[],T=r("{","}",A);if(!T)return A.split(",");var v=T.pre,E=T.body,S=T.post,w=v.split(",");w[w.length-1]+="{"+E+"}";var b=u(S);return S.length&&(w[w.length-1]+=b.shift(),w.push.apply(w,b)),g.push.apply(g,w),g}function d(A){return"{"+A+"}"}function m(A){return/^-?0\d/.test(A)}function p(A,g){return A<=g}function f(A,g){return A>=g}function y(A,g){var T=[],v=r("{","}",A);if(!v)return[A];var E=v.pre,S=v.post.length?y(v.post,!1):[""];if(/\$$/.test(v.pre))for(var w=0;w<S.length;w++){var b=E+"{"+v.body+"}"+S[w];T.push(b)}else{var x,C,N=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(v.body),U=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(v.body),_=N||U,I=v.body.indexOf(",")>=0;if(!_&&!I)return v.post.match(/,.*\}/)?y(A=v.pre+"{"+v.body+o+v.post):[A];if(_)x=v.body.split(/\.\./);else if((x=u(v.body)).length===1&&(x=y(x[0],!1).map(d)).length===1)return S.map((function(Rn){return v.pre+x[0]+Rn}));if(_){var P=c(x[0]),R=c(x[1]),tt=Math.max(x[0].length,x[1].length),q=x.length==3?Math.abs(c(x[2])):1,F=p;R<P&&(q*=-1,F=f);var At=x.some(m);C=[];for(var K=P;F(K,R);K+=q){var et;if(U)(et=String.fromCharCode(K))==="\\"&&(et="");else if(et=String(K),At){var Er=tt-et.length;if(Er>0){var _r=new Array(Er+1).join("0");et=K<0?"-"+_r+et.slice(1):_r+et}}C.push(et)}}else{C=[];for(var Vt=0;Vt<x.length;Vt++)C.push.apply(C,y(x[Vt],!1))}for(Vt=0;Vt<C.length;Vt++)for(w=0;w<S.length;w++)b=E+C[Vt]+S[w],(!g||_||b)&&T.push(b)}return T}},829:n=>{function t(c){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},t(c)}function e(c){var l=typeof Map=="function"?new Map:void 0;return e=function(u){if(u===null||(d=u,Function.toString.call(d).indexOf("[native code]")===-1))return u;var d;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(l!==void 0){if(l.has(u))return l.get(u);l.set(u,m)}function m(){return r(u,arguments,i(this).constructor)}return m.prototype=Object.create(u.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),s(m,u)},e(c)}function r(c,l,u){return r=(function(){if(typeof Reflect>"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}})()?Reflect.construct:function(d,m,p){var f=[null];f.push.apply(f,m);var y=new(Function.bind.apply(d,f));return p&&s(y,p.prototype),y},r.apply(null,arguments)}function s(c,l){return s=Object.setPrototypeOf||function(u,d){return u.__proto__=d,u},s(c,l)}function i(c){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},i(c)}var o=(function(c){function l(u){var d;return(function(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")})(this,l),(d=(function(m,p){return!p||t(p)!=="object"&&typeof p!="function"?(function(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f})(m):p})(this,i(l).call(this,u))).name="ObjectPrototypeMutationError",d}return(function(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),d&&s(u,d)})(l,c),l})(e(Error));function a(c,l){for(var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},d=l.split("."),m=d.length,p=function(A){var g=d[A];if(!c)return{v:void 0};if(g==="+"){if(Array.isArray(c))return{v:c.map((function(v,E){var S=d.slice(A+1);return S.length>0?a(v,S.join("."),u):u(c,E,d,A)}))};var T=d.slice(0,A).join(".");throw new Error("Object at wildcard (".concat(T,") is not an array"))}c=u(c,g,d,A)},f=0;f<m;f++){var y=p(f);if(t(y)==="object")return y.v}return c}function h(c,l){return c.length===l+1}n.exports={set:function(c,l,u){if(t(c)!="object"||c===null||l===void 0)return c;if(typeof l=="number")return c[l]=u,c[l];try{return a(c,l,(function(d,m,p,f){if(d===Reflect.getPrototypeOf({}))throw new o("Attempting to mutate Object.prototype");if(!d[m]){var y=Number.isInteger(Number(p[f+1])),A=p[f+1]==="+";d[m]=y||A?[]:{}}return h(p,f)&&(d[m]=u),d[m]}))}catch(d){if(d instanceof o)throw d;return c}},get:function(c,l){if(t(c)!="object"||c===null||l===void 0)return c;if(typeof l=="number")return c[l];try{return a(c,l,(function(u,d){return u[d]}))}catch{return c}},has:function(c,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(c)!="object"||c===null||l===void 0)return!1;if(typeof l=="number")return l in c;try{var d=!1;return a(c,l,(function(m,p,f,y){if(!h(f,y))return m&&m[p];d=u.own?m.hasOwnProperty(p):p in m})),d}catch{return!1}},hasOwn:function(c,l,u){return this.has(c,l,u||{own:!0})},isIn:function(c,l,u){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(c)!="object"||c===null||l===void 0)return!1;try{var m=!1,p=!1;return a(c,l,(function(f,y,A,g){return m=m||f===u||!!f&&f[y]===u,p=h(A,g)&&t(f)==="object"&&y in f,f&&f[y]})),d.validPath?m&&p:m}catch{return!1}},ObjectPrototypeMutationError:o}},47:(n,t,e)=>{var r=e(410),s=function(c){return typeof c=="string"};function i(c,l){for(var u=[],d=0;d<c.length;d++){var m=c[d];m&&m!=="."&&(m===".."?u.length&&u[u.length-1]!==".."?u.pop():l&&u.push(".."):u.push(m))}return u}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a={};function h(c){return o.exec(c).slice(1)}a.resolve=function(){for(var c="",l=!1,u=arguments.length-1;u>=-1&&!l;u--){var d=u>=0?arguments[u]:Ee.cwd();if(!s(d))throw new TypeError("Arguments to path.resolve must be strings");d&&(c=d+"/"+c,l=d.charAt(0)==="/")}return(l?"/":"")+(c=i(c.split("/"),!l).join("/"))||"."},a.normalize=function(c){var l=a.isAbsolute(c),u=c.substr(-1)==="/";return(c=i(c.split("/"),!l).join("/"))||l||(c="."),c&&u&&(c+="/"),(l?"/":"")+c},a.isAbsolute=function(c){return c.charAt(0)==="/"},a.join=function(){for(var c="",l=0;l<arguments.length;l++){var u=arguments[l];if(!s(u))throw new TypeError("Arguments to path.join must be strings");u&&(c+=c?"/"+u:u)}return a.normalize(c)},a.relative=function(c,l){function u(g){for(var T=0;T<g.length&&g[T]==="";T++);for(var v=g.length-1;v>=0&&g[v]==="";v--);return T>v?[]:g.slice(T,v+1)}c=a.resolve(c).substr(1),l=a.resolve(l).substr(1);for(var d=u(c.split("/")),m=u(l.split("/")),p=Math.min(d.length,m.length),f=p,y=0;y<p;y++)if(d[y]!==m[y]){f=y;break}var A=[];for(y=f;y<d.length;y++)A.push("..");return(A=A.concat(m.slice(f))).join("/")},a._makeLong=function(c){return c},a.dirname=function(c){var l=h(c),u=l[0],d=l[1];return u||d?(d&&(d=d.substr(0,d.length-1)),u+d):"."},a.basename=function(c,l){var u=h(c)[2];return l&&u.substr(-1*l.length)===l&&(u=u.substr(0,u.length-l.length)),u},a.extname=function(c){return h(c)[3]},a.format=function(c){if(!r.isObject(c))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof c);var l=c.root||"";if(!s(l))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof c.root);return(c.dir?c.dir+a.sep:"")+(c.base||"")},a.parse=function(c){if(!s(c))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof c);var l=h(c);if(!l||l.length!==4)throw new TypeError("Invalid path '"+c+"'");return l[1]=l[1]||"",l[2]=l[2]||"",l[3]=l[3]||"",{root:l[0],dir:l[0]+l[1].slice(0,l[1].length-1),base:l[2],ext:l[3],name:l[2].slice(0,l[2].length-l[3].length)}},a.sep="/",a.delimiter=":",n.exports=a},647:(n,t)=>{var e=Object.prototype.hasOwnProperty;function r(i){try{return decodeURIComponent(i.replace(/\+/g," "))}catch{return null}}function s(i){try{return encodeURIComponent(i)}catch{return null}}t.stringify=function(i,o){o=o||"";var a,h,c=[];for(h in typeof o!="string"&&(o="?"),i)if(e.call(i,h)){if((a=i[h])||a!=null&&!isNaN(a)||(a=""),h=s(h),a=s(a),h===null||a===null)continue;c.push(h+"="+a)}return c.length?o+c.join("&"):""},t.parse=function(i){for(var o,a=/([^=?#&]+)=?([^&]*)/g,h={};o=a.exec(i);){var c=r(o[1]),l=r(o[2]);c===null||l===null||c in h||(h[c]=l)}return h}},670:n=>{n.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}},494:n=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};n.exports=function(s){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i=Object.assign({},r,i),!s||typeof s!="string")return s;let o=s.trim();if(i.skipLike!==void 0&&i.skipLike.test(o))return s;if(i.hex&&t.test(o))return Number.parseInt(o,16);{const h=e.exec(o);if(h){const c=h[1],l=h[2];let u=((a=h[3])&&a.indexOf(".")!==-1&&((a=a.replace(/0+$/,""))==="."?a="0":a[0]==="."?a="0"+a:a[a.length-1]==="."&&(a=a.substr(0,a.length-1))),a);const d=h[4]||h[6];if(!i.leadingZeros&&l.length>0&&c&&o[2]!=="."||!i.leadingZeros&&l.length>0&&!c&&o[1]!==".")return s;{const m=Number(o),p=""+m;return p.search(/[eE]/)!==-1||d?i.eNotation?m:s:o.indexOf(".")!==-1?p==="0"&&u===""||p===u||c&&p==="-"+u?m:s:l?u===p||c+u===p?m:s:o===p||o===c+p?m:s}}return s}var a}},737:(n,t,e)=>{var r=e(670),s=e(647),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function u(g){return(g||"").toString().replace(i,"")}var d=[["#","hash"],["?","query"],function(g,T){return f(T.protocol)?g.replace(/\\/g,"/"):g},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],m={hash:1,query:1};function p(g){var T,v=(typeof window<"u"?window:typeof fe<"u"?fe:typeof self<"u"?self:{}).location||{},E={},S=typeof(g=g||v);if(g.protocol==="blob:")E=new A(unescape(g.pathname),{});else if(S==="string")for(T in E=new A(g,{}),m)delete E[T];else if(S==="object"){for(T in g)T in m||(E[T]=g[T]);E.slashes===void 0&&(E.slashes=a.test(g.href))}return E}function f(g){return g==="file:"||g==="ftp:"||g==="http:"||g==="https:"||g==="ws:"||g==="wss:"}function y(g,T){g=(g=u(g)).replace(o,""),T=T||{};var v,E=c.exec(g),S=E[1]?E[1].toLowerCase():"",w=!!E[2],b=!!E[3],x=0;return w?b?(v=E[2]+E[3]+E[4],x=E[2].length+E[3].length):(v=E[2]+E[4],x=E[2].length):b?(v=E[3]+E[4],x=E[3].length):v=E[4],S==="file:"?x>=2&&(v=v.slice(2)):f(S)?v=E[4]:S?w&&(v=v.slice(2)):x>=2&&f(T.protocol)&&(v=E[4]),{protocol:S,slashes:w||f(S),slashesCount:x,rest:v}}function A(g,T,v){if(g=(g=u(g)).replace(o,""),!(this instanceof A))return new A(g,T,v);var E,S,w,b,x,C,N=d.slice(),U=typeof T,_=this,I=0;for(U!=="object"&&U!=="string"&&(v=T,T=null),v&&typeof v!="function"&&(v=s.parse),E=!(S=y(g||"",T=p(T))).protocol&&!S.slashes,_.slashes=S.slashes||E&&T.slashes,_.protocol=S.protocol||T.protocol||"",g=S.rest,(S.protocol==="file:"&&(S.slashesCount!==2||l.test(g))||!S.slashes&&(S.protocol||S.slashesCount<2||!f(_.protocol)))&&(N[3]=[/(.*)/,"pathname"]);I<N.length;I++)typeof(b=N[I])!="function"?(w=b[0],C=b[1],w!=w?_[C]=g:typeof w=="string"?~(x=w==="@"?g.lastIndexOf(w):g.indexOf(w))&&(typeof b[2]=="number"?(_[C]=g.slice(0,x),g=g.slice(x+b[2])):(_[C]=g.slice(x),g=g.slice(0,x))):(x=w.exec(g))&&(_[C]=x[1],g=g.slice(0,x.index)),_[C]=_[C]||E&&b[3]&&T[C]||"",b[4]&&(_[C]=_[C].toLowerCase())):g=b(g,_);v&&(_.query=v(_.query)),E&&T.slashes&&_.pathname.charAt(0)!=="/"&&(_.pathname!==""||T.pathname!=="")&&(_.pathname=(function(P,R){if(P==="")return R;for(var tt=(R||"/").split("/").slice(0,-1).concat(P.split("/")),q=tt.length,F=tt[q-1],At=!1,K=0;q--;)tt[q]==="."?tt.splice(q,1):tt[q]===".."?(tt.splice(q,1),K++):K&&(q===0&&(At=!0),tt.splice(q,1),K--);return At&&tt.unshift(""),F!=="."&&F!==".."||tt.push(""),tt.join("/")})(_.pathname,T.pathname)),_.pathname.charAt(0)!=="/"&&f(_.protocol)&&(_.pathname="/"+_.pathname),r(_.port,_.protocol)||(_.host=_.hostname,_.port=""),_.username=_.password="",_.auth&&(~(x=_.auth.indexOf(":"))?(_.username=_.auth.slice(0,x),_.username=encodeURIComponent(decodeURIComponent(_.username)),_.password=_.auth.slice(x+1),_.password=encodeURIComponent(decodeURIComponent(_.password))):_.username=encodeURIComponent(decodeURIComponent(_.auth)),_.auth=_.password?_.username+":"+_.password:_.username),_.origin=_.protocol!=="file:"&&f(_.protocol)&&_.host?_.protocol+"//"+_.host:"null",_.href=_.toString()}A.prototype={set:function(g,T,v){var E=this;switch(g){case"query":typeof T=="string"&&T.length&&(T=(v||s.parse)(T)),E[g]=T;break;case"port":E[g]=T,r(T,E.protocol)?T&&(E.host=E.hostname+":"+T):(E.host=E.hostname,E[g]="");break;case"hostname":E[g]=T,E.port&&(T+=":"+E.port),E.host=T;break;case"host":E[g]=T,h.test(T)?(T=T.split(":"),E.port=T.pop(),E.hostname=T.join(":")):(E.hostname=T,E.port="");break;case"protocol":E.protocol=T.toLowerCase(),E.slashes=!v;break;case"pathname":case"hash":if(T){var S=g==="pathname"?"/":"#";E[g]=T.charAt(0)!==S?S+T:T}else E[g]=T;break;case"username":case"password":E[g]=encodeURIComponent(T);break;case"auth":var w=T.indexOf(":");~w?(E.username=T.slice(0,w),E.username=encodeURIComponent(decodeURIComponent(E.username)),E.password=T.slice(w+1),E.password=encodeURIComponent(decodeURIComponent(E.password))):E.username=encodeURIComponent(decodeURIComponent(T))}for(var b=0;b<d.length;b++){var x=d[b];x[4]&&(E[x[1]]=E[x[1]].toLowerCase())}return E.auth=E.password?E.username+":"+E.password:E.username,E.origin=E.protocol!=="file:"&&f(E.protocol)&&E.host?E.protocol+"//"+E.host:"null",E.href=E.toString(),E},toString:function(g){g&&typeof g=="function"||(g=s.stringify);var T,v=this,E=v.host,S=v.protocol;S&&S.charAt(S.length-1)!==":"&&(S+=":");var w=S+(v.protocol&&v.slashes||f(v.protocol)?"//":"");return v.username?(w+=v.username,v.password&&(w+=":"+v.password),w+="@"):v.password?(w+=":"+v.password,w+="@"):v.protocol!=="file:"&&f(v.protocol)&&!E&&v.pathname!=="/"&&(w+="@"),(E[E.length-1]===":"||h.test(v.hostname)&&!v.port)&&(E+=":"),w+=E+v.pathname,(T=typeof v.query=="object"?g(v.query):v.query)&&(w+=T.charAt(0)!=="?"?"?"+T:T),v.hash&&(w+=v.hash),w}},A.extractProtocol=y,A.location=p,A.trimLeft=u,A.qs=s,n.exports=A},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},Hr={};function L(n){var t=Hr[n];if(t!==void 0)return t.exports;var e=Hr[n]={id:n,loaded:!1,exports:{}};return Fi[n].call(e.exports,e,e.exports,L),e.loaded=!0,e.exports}L.n=n=>{var t=n&&n.__esModule?()=>n.default:()=>n;return L.d(t,{a:t}),t},L.d=(n,t)=>{for(var e in t)L.o(t,e)&&!L.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},L.o=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),L.nmd=n=>(n.paths=[],n.children||(n.children=[]),n);var _t={};L.d(_t,{hT:()=>ct,O4:()=>Mt,Kd:()=>Qi,YK:()=>ta,UU:()=>a0,Gu:()=>En,ky:()=>Pn,h4:()=>de,ch:()=>Le,hq:()=>Zt,i5:()=>In});var Wi=L(737),Hi=L.n(Wi);function He(n){if(!ar(n))throw new Error("Parameter was not an error")}function ar(n){return!!n&&typeof n=="object"&&(t=n,Object.prototype.toString.call(t)==="[object Error]")||n instanceof Error;var t}class dt extends Error{constructor(t,e){const r=[...arguments],{options:s,shortMessage:i}=(function(a){let h,c="";if(a.length===0)h={};else if(ar(a[0]))h={cause:a[0]},c=a.slice(1).join(" ")||"";else if(a[0]&&typeof a[0]=="object")h=Object.assign({},a[0]),c=a.slice(1).join(" ")||"";else{if(typeof a[0]!="string")throw new Error("Invalid arguments passed to Layerr");h={},c=c=a.join(" ")||""}return{options:h,shortMessage:c}})(r);let o=i;if(s.cause&&(o=`${o}: ${s.cause.message}`),super(o),this.message=o,s.name&&typeof s.name=="string"?this.name=s.name:this.name="Layerr",s.cause&&Object.defineProperty(this,"_cause",{value:s.cause}),Object.defineProperty(this,"_info",{value:{}}),s.info&&typeof s.info=="object"&&Object.assign(this._info,s.info),Error.captureStackTrace){const a=s.constructorOpt||this.constructor;Error.captureStackTrace(this,a)}}static cause(t){return He(t),t._cause&&ar(t._cause)?t._cause:null}static fullStack(t){He(t);const e=dt.cause(t);return e?`${t.stack}
caused by: ${dt.fullStack(e)}`:t.stack??""}static info(t){He(t);const e={},r=dt.cause(t);return r&&Object.assign(e,dt.info(r)),t._info&&Object.assign(e,t._info),e}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}var Gi=L(47),Ne=L.n(Gi);const Gr="__PATH_SEPARATOR_POSIX__",Kr="__PATH_SEPARATOR_WINDOWS__";function V(n){try{const t=n.replace(/\//g,Gr).replace(/\\\\/g,Kr);return encodeURIComponent(t).split(Kr).join("\\\\").split(Gr).join("/")}catch(t){throw new dt(t,"Failed encoding path")}}function qr(n){return n.startsWith("/")?n:"/"+n}function he(n){let t=n;return t[0]!=="/"&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function Ki(n){let t=new(Hi())(n).pathname;return t.length<=0&&(t="/"),he(t)}function $(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return(function(){return(function(r){var s=[];if(r.length===0)return"";if(typeof r[0]!="string")throw new TypeError("Url must be a string. Received "+r[0]);if(r[0].match(/^[^/:]+:\/*$/)&&r.length>1){var i=r.shift();r[0]=i+r[0]}r[0].match(/^file:\/\/\//)?r[0]=r[0].replace(/^([^/:]+):\/*/,"$1:///"):r[0]=r[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<r.length;o++){var a=r[o];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(o>0&&(a=a.replace(/^[\/]+/,"")),a=o<r.length-1?a.replace(/[\/]+$/,""):a.replace(/[\/]+$/,"/"),s.push(a))}var h=s.join("/"),c=(h=h.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return c.shift()+(c.length>0?"?":"")+c.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(t.reduce(((r,s,i)=>((i===0||s!=="/"||s==="/"&&r[r.length-1]!=="/")&&r.push(s),r)),[]))}var qi=L(542),te=L.n(qi);const Zi="abcdef0123456789";function Zr(n,t){const e=n.url.replace("//",""),r=e.indexOf("/")==-1?"/":e.slice(e.indexOf("/")),s=n.method?n.method.toUpperCase():"GET",i=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",o=`00000000${t.nc}`.slice(-8),a=(function(d,m,p,f,y,A,g){const T=g||te()(`${m}:${p}:${f}`);return d&&d.toLowerCase()==="md5-sess"?te()(`${T}:${y}:${A}`):T})(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),h=te()(`${s}:${r}`),c=i?te()(`${a}:${t.nonce}:${o}:${t.cnonce}:${i}:${h}`):te()(`${a}:${t.nonce}:${h}`),l={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:i,response:c,nc:o,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},u=[];for(const d in l)l[d]&&(d==="qop"||d==="nc"||d==="algorithm"?u.push(`${d}=${l[d]}`):u.push(`${d}="${l[d]}"`));return`Digest ${u.join(", ")}`}function An(n){return(n.headers&&n.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var Ji=L(101),bn=L.n(Ji);function Jr(n){return bn().decode(n)}function Xr(n,t){var e;return`Basic ${e=`${n}:${t}`,bn().encode(e)}`}const Oe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,Xi=Oe.fetch.bind(Oe),Qi=Oe.Request,ta=Oe.Response;let ct=(function(n){return n.Auto="auto",n.Digest="digest",n.None="none",n.Password="password",n.Token="token",n})({}),Mt=(function(n){return n.DataTypeNoLength="data-type-no-length",n.InvalidAuthType="invalid-auth-type",n.InvalidOutputFormat="invalid-output-format",n.LinkUnsupportedAuthType="link-unsupported-auth",n.InvalidUpdateRange="invalid-update-range",n.NotSupported="not-supported",n})({});function vn(n,t,e,r,s){switch(n.authType){case ct.Auto:t&&e&&(n.headers.Authorization=Xr(t,e));break;case ct.Digest:n.digest=(function(o,a,h){return{username:o,password:a,ha1:h,nc:0,algorithm:"md5",hasDigestAuth:!1}})(t,e,s);break;case ct.None:break;case ct.Password:n.headers.Authorization=Xr(t,e);break;case ct.Token:n.headers.Authorization=`${(i=r).token_type} ${i.access_token}`;break;default:throw new dt({info:{code:Mt.InvalidAuthType}},`Invalid auth type: ${n.authType}`)}var i}L(345),L(800);const Qr="@@HOTPATCHER",ea=()=>{};function Ge(n){return{original:n,methods:[n],final:!1}}class ra{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Qr}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(t){this.configuration.getEmptyAction=t}control(t){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==Qr)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach((r=>{this.configuration.registry.hasOwnProperty(r)?e&&(this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])):this.configuration.registry[r]=Object.assign({},t.configuration.registry[r])})),t._configuration=this.configuration,this}execute(t){const e=this.get(t)||ea;for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];return e(...s)}get(t){const e=this.configuration.registry[t];if(!e)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${t}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(){for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];if(s.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var o=arguments.length,a=new Array(o),h=0;h<o;h++)a[h]=arguments[h];let c=a;const l=this;for(;s.length>0;)c=[s.shift().apply(l,c)];return c[0]}})(...e.methods)}isPatched(t){return!!this.configuration.registry[t]}patch(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:s=!1}=r;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error(`Failed patching '${t}': Method marked as being final`);if(typeof e!="function")throw new Error(`Failed patching '${t}': Provided method is not a function`);if(s)this.configuration.registry[t]?this.configuration.registry[t].methods.push(e):this.configuration.registry[t]=Ge(e);else if(this.isPatched(t)){const{original:i}=this.configuration.registry[t];this.configuration.registry[t]=Object.assign(Ge(e),{original:i})}else this.configuration.registry[t]=Ge(e);return this}patchInline(t,e){this.isPatched(t)||this.patch(t,e);for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i<r;i++)s[i-2]=arguments[i];return this.execute(t,...s)}plugin(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),s=1;s<e;s++)r[s-1]=arguments[s];return r.forEach((i=>{this.patch(t,i,{chain:!0})})),this}restore(t){if(!this.isPatched(t))throw new Error(`Failed restoring method: No method present for key: ${t}`);if(typeof this.configuration.registry[t].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${t}`);return this.configuration.registry[t].methods=[this.configuration.registry[t].original],this}setFinal(t){if(!this.configuration.registry.hasOwnProperty(t))throw new Error(`Failed marking '${t}' as final: No method found for key`);return this.configuration.registry[t].final=!0,this}}let Ke=null;function En(){return Ke||(Ke=new ra),Ke}function Ue(n){return(function(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e})(n)?Object.assign({},n):Object.setPrototypeOf(Object.assign({},n),Object.getPrototypeOf(n))}function tn(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];let r=null,s=[...t];for(;s.length>0;){const i=s.shift();r=r?_n(r,i):Ue(i)}return r}function _n(n,t){const e=Ue(n);return Object.keys(t).forEach((r=>{e.hasOwnProperty(r)?Array.isArray(t[r])?e[r]=Array.isArray(e[r])?[...e[r],...t[r]]:[...t[r]]:typeof t[r]=="object"&&t[r]?e[r]=typeof e[r]=="object"&&e[r]?_n(e[r],t[r]):Ue(t[r]):e[r]=t[r]:e[r]=t[r]})),e}function na(n){const t={};for(const e of n.keys())t[e]=n.get(e);return t}function or(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];if(t.length===0)return{};const r={};return t.reduce(((s,i)=>(Object.keys(i).forEach((o=>{const a=o.toLowerCase();r.hasOwnProperty(a)?s[r[a]]=i[o]:(r[a]=o,s[o]=i[o])})),s)),{})}L(805);const sa=typeof ArrayBuffer=="function",{toString:ia}=Object.prototype;function Dn(n){return sa&&(n instanceof ArrayBuffer||ia.call(n)==="[object ArrayBuffer]")}function wn(n){return n!=null&&n.constructor!=null&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function gr(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}function lr(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const xn=gr((function(n){const t=n._digest;return delete n._digest,t.hasDigestAuth&&(n=tn(n,{headers:{Authorization:Zr(n,t)}})),lr(Pe(n),(function(e){let r=!1;return s=function(o){return r?o:e},(i=(function(){if(e.status==401)return t.hasDigestAuth=(function(o,a){if(!An(o))return!1;const h=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const c=o.headers&&o.headers.get("www-authenticate")||"",l=h.exec(c);if(!l)break;a[l[1]]=l[2]||l[3]}return a.nc+=1,a.cnonce=(function(){let c="";for(let l=0;l<32;++l)c=`${c}${Zi[Math.floor(16*Math.random())]}`;return c})(),!0})(e,t),(function(){if(t.hasDigestAuth)return lr(Pe(n=tn(n,{headers:{Authorization:Zr(n,t)}})),(function(o){return o.status==401?t.hasDigestAuth=!1:t.nc++,r=!0,o}))})();t.nc++})())&&i.then?i.then(s):s(i);var s,i}))})),aa=gr((function(n,t){return lr(Pe(n),(function(e){return e.ok?(t.authType=ct.Password,e):e.status==401&&An(e)?(t.authType=ct.Digest,vn(t,t.username,t.password,void 0,void 0),n._digest=t.digest,xn(n)):e}))})),Z=gr((function(n,t){return t.authType===ct.Auto?aa(n,t):n._digest?xn(n):Pe(n)}));function J(n,t,e){const r=Ue(n);return r.headers=or(t.headers,r.headers||{},e.headers||{}),e.data!==void 0&&(r.data=e.data),e.signal&&(r.signal=e.signal),t.httpAgent&&(r.httpAgent=t.httpAgent),t.httpsAgent&&(r.httpsAgent=t.httpsAgent),t.digest&&(r._digest=t.digest),typeof t.withCredentials=="boolean"&&(r.withCredentials=t.withCredentials),r}function Pe(n){const t=En();return t.patchInline("request",(e=>t.patchInline("fetch",Xi,e.url,(function(r){let s={};const i={method:r.method};if(r.headers&&(s=or(s,r.headers)),r.data!==void 0){const[o,a]=(function(h){if(typeof h=="string")return[h,{}];if(wn(h))return[h,{}];if(Dn(h))return[h,{}];if(h&&typeof h=="object")return[JSON.stringify(h),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof h)})(r.data);i.body=o,s=or(s,a)}return r.signal&&(i.signal=r.signal),r.withCredentials&&(i.credentials="include"),i.headers=s,i})(e))),n)}var oa=L(285);const Ie=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")},la={"[: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]},ee=n=>n.replace(/[[\]\\-]/g,"\\$&"),en=n=>n.join(""),ua=(n,t)=>{const e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");const r=[],s=[];let i=e+1,o=!1,a=!1,h=!1,c=!1,l=e,u="";t:for(;i<n.length;){const f=n.charAt(i);if(f!=="!"&&f!=="^"||i!==e+1){if(f==="]"&&o&&!h){l=i+1;break}if(o=!0,f!=="\\"||h){if(f==="["&&!h){for(const[y,[A,g,T]]of Object.entries(la))if(n.startsWith(y,i)){if(u)return["$.",!1,n.length-e,!0];i+=y.length,T?s.push(A):r.push(A),a=a||g;continue t}}h=!1,u?(f>u?r.push(ee(u)+"-"+ee(f)):f===u&&r.push(ee(f)),u="",i++):n.startsWith("-]",i+1)?(r.push(ee(f+"-")),i+=2):n.startsWith("-",i+1)?(u=f,i+=2):(r.push(ee(f)),i++)}else h=!0,i++}else c=!0,i++}if(l<i)return["",!1,0,!1];if(!r.length&&!s.length)return["$.",!1,n.length-e,!0];if(s.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!c)return[(d=r[0].length===2?r[0].slice(-1):r[0],d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,l-e,!1];var d;const m="["+(c?"^":"")+en(r)+"]",p="["+(c?"":"^")+en(s)+"]";return[r.length&&s.length?"("+m+"|"+p+")":r.length?m:p,a,l-e,!0]},ne=function(n){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},ca=new Set(["!","?","+","*","@"]),rn=n=>ca.has(n),qe="(?!\\.)",ha=new Set(["[","."]),da=new Set(["..","."]),fa=new Set("().*{}+?[]^$\\!"),yr="[^/]",nn=yr+"*?",sn=yr+"+?";class lt{type;#t;#r;#i=!1;#e=[];#n;#a;#l;#o=!1;#s;#u;#h=!1;constructor(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&(this.#r=!0),this.#n=e,this.#t=this.#n?this.#n.#t:this,this.#s=this.#t===this?r:this.#t.#s,this.#l=this.#t===this?[]:this.#t.#l,t!=="!"||this.#t.#o||this.#l.push(this),this.#a=this.#n?this.#n.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(const t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#e.map((t=>String(t))).join("|")+")":this.#u=this.#e.map((t=>String(t))).join("")}#f(){if(this!==this.#t)throw new Error("should only call on root");if(this.#o)return this;let t;for(this.toString(),this.#o=!0;t=this.#l.pop();){if(t.type!=="!")continue;let e=t,r=e.#n;for(;r;){for(let s=e.#a+1;!r.type&&s<r.#e.length;s++)for(const i of t.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(r.#e[s])}e=r,r=e.#n}}return this}push(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(const s of e)if(s!==""){if(typeof s!="string"&&!(s instanceof lt&&s.#n===this))throw new Error("invalid part: "+s);this.#e.push(s)}}toJSON(){const t=this.type===null?this.#e.slice().map((e=>typeof e=="string"?e:e.toJSON())):[this.type,...this.#e.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#o&&this.#n?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(this.#a===0)return!0;const t=this.#n;for(let e=0;e<this.#a;e++){const r=t.#e[e];if(!(r instanceof lt&&r.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();const t=this.#n?this.#n.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const e=new lt(this.type,t);for(const r of this.#e)e.copyIn(r);return e}static#c(t,e,r,s){let i=!1,o=!1,a=-1,h=!1;if(e.type===null){let m=r,p="";for(;m<t.length;){const f=t.charAt(m++);if(i||f==="\\")i=!i,p+=f;else if(o)m===a+1?f!=="^"&&f!=="!"||(h=!0):f!=="]"||m===a+2&&h||(o=!1),p+=f;else if(f!=="[")if(s.noext||!rn(f)||t.charAt(m)!=="(")p+=f;else{e.push(p),p="";const y=new lt(f,e);m=lt.#c(t,y,m,s),e.push(y)}else o=!0,a=m,h=!1,p+=f}return e.push(p),m}let c=r+1,l=new lt(null,e);const u=[];let d="";for(;c<t.length;){const m=t.charAt(c++);if(i||m==="\\")i=!i,d+=m;else if(o)c===a+1?m!=="^"&&m!=="!"||(h=!0):m!=="]"||c===a+2&&h||(o=!1),d+=m;else if(m!=="[")if(rn(m)&&t.charAt(c)==="("){l.push(d),d="";const p=new lt(m,l);l.push(p),c=lt.#c(t,p,c,s)}else if(m!=="|"){if(m===")")return d===""&&e.#e.length===0&&(e.#h=!0),l.push(d),d="",e.push(...u,l),c;d+=m}else l.push(d),d="",u.push(l),l=new lt(null,e);else o=!0,a=c,h=!1,d+=m}return e.type=null,e.#r=void 0,e.#e=[t.substring(r-1)],c}static fromGlob(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=new lt(null,void 0,e);return lt.#c(t,r,0,e),r}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString(),[e,r,s,i]=this.toRegExpSource();if(!(s||this.#r||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;const o=(this.#s.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#s}toRegExpSource(t){const e=t??!!this.#s.dot;if(this.#t===this&&this.#f(),!this.type){const h=this.isStart()&&this.isEnd(),c=this.#e.map((d=>{const[m,p,f,y]=typeof d=="string"?lt.#m(d,this.#r,h):d.toRegExpSource(t);return this.#r=this.#r||f,this.#i=this.#i||y,m})).join("");let l="";if(this.isStart()&&typeof this.#e[0]=="string"&&(this.#e.length!==1||!da.has(this.#e[0]))){const d=ha,m=e&&d.has(c.charAt(0))||c.startsWith("\\.")&&d.has(c.charAt(2))||c.startsWith("\\.\\.")&&d.has(c.charAt(4)),p=!e&&!t&&d.has(c.charAt(0));l=m?"(?!(?:^|/)\\.\\.?(?:$|/))":p?qe:""}let u="";return this.isEnd()&&this.#t.#o&&this.#n?.type==="!"&&(u="(?:$|\\/)"),[l+c+u,ne(c),this.#r=!!this.#r,this.#i]}const r=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let i=this.#d(e);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){const h=this.toString();return this.#e=[h],this.type=null,this.#r=void 0,[h,ne(this.toString()),!1,!1]}let o=!r||t||e?"":this.#d(!0);o===i&&(o=""),o&&(i=`(?:${i})(?:${o})*?`);let a="";return a=this.type==="!"&&this.#h?(this.isStart()&&!e?qe:"")+sn:s+i+(this.type==="!"?"))"+(!this.isStart()||e||t?"":qe)+nn+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`),[a,ne(i),this.#r=!!this.#r,this.#i]}#d(t){return this.#e.map((e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[r,s,i,o]=e.toRegExpSource(t);return this.#i=this.#i||o,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#m(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=!1,i="",o=!1;for(let a=0;a<t.length;a++){const h=t.charAt(a);if(s)s=!1,i+=(fa.has(h)?"\\":"")+h;else if(h!=="\\"){if(h==="["){const[c,l,u,d]=ua(t,a);if(u){i+=c,o=o||l,a+=u-1,e=e||d;continue}}h!=="*"?h!=="?"?i+=h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=yr,e=!0):(i+=r&&t==="*"?sn:nn,e=!0)}else a===t.length-1?i+="\\\\":s=!0}return[i,ne(t),!!e,o]}}const at=function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ie(t),!(!e.nocomment&&t.charAt(0)==="#")&&new Ye(t,e).match(n)},ma=/^\*+([^+@!?\*\[\(]*)$/,pa=n=>t=>!t.startsWith(".")&&t.endsWith(n),ga=n=>t=>t.endsWith(n),ya=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ta=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Sa=/^\*+\.\*+$/,Aa=n=>!n.startsWith(".")&&n.includes("."),ba=n=>n!=="."&&n!==".."&&n.includes("."),va=/^\.\*+$/,Ea=n=>n!=="."&&n!==".."&&n.startsWith("."),_a=/^\*+$/,Da=n=>n.length!==0&&!n.startsWith("."),wa=n=>n.length!==0&&n!=="."&&n!=="..",xa=/^\?+([^+@!?\*\[\(]*)?$/,Ca=n=>{let[t,e=""]=n;const r=Cn([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},Na=n=>{let[t,e=""]=n;const r=Nn([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},Oa=n=>{let[t,e=""]=n;const r=Nn([t]);return e?s=>r(s)&&s.endsWith(e):r},Ua=n=>{let[t,e=""]=n;const r=Cn([t]);return e?s=>r(s)&&s.endsWith(e):r},Cn=n=>{let[t]=n;const e=t.length;return r=>r.length===e&&!r.startsWith(".")},Nn=n=>{let[t]=n;const e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},On=typeof Ee=="object"&&Ee?typeof We=="object"&&We&&We.__MINIMATCH_TESTING_PLATFORM__||Ee.platform:"posix";at.sep=On==="win32"?"\\":"/";const vt=Symbol("globstar **");at.GLOBSTAR=vt,at.filter=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e=>at(e,n,t)};const bt=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},n,t)};at.defaults=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return at;const t=at;return Object.assign((function(e,r){return t(e,r,bt(n,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(e){super(e,bt(n,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(e){return t.defaults(bt(n,e)).Minimatch}},AST:class extends t.AST{constructor(e,r){super(e,r,bt(n,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(e,bt(n,r))}},unescape:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(e,bt(n,r))},escape:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(e,bt(n,r))},filter:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(e,bt(n,r))},defaults:e=>t.defaults(bt(n,e)),makeRe:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(e,bt(n,r))},braceExpand:function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(e,bt(n,r))},match:function(e,r){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(e,r,bt(n,s))},sep:t.sep,GLOBSTAR:vt})};const Un=function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ie(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:oa(n)};at.braceExpand=Un,at.makeRe=function(n){return new Ye(n,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},at.match=function(n,t){const e=new Ye(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return n=n.filter((r=>e.match(r))),e.options.nonull&&!n.length&&n.push(t),n};const an=/[?*]|[+@!]\(.*?\)|\[|\]/;class Ye{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ie(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||On,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(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const r=this.globSet.map((i=>this.slashSplit(i)));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let s=this.globParts.map(((i,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=!(i[0]!==""||i[1]!==""||i[2]!=="?"&&an.test(i[2])||an.test(i[3])),c=/^[a-z]:/i.test(i[0]);if(h)return[...i.slice(0,4),...i.slice(4).map((l=>this.parse(l)))];if(c)return[i[0],...i.slice(1).map((l=>this.parse(l)))]}return i.map((h=>this.parse(h)))}));if(this.debug(this.pattern,s),this.set=s.filter((i=>i.indexOf(!1)===-1)),this.isWindows)for(let i=0;i<this.set.length;i++){const o=this.set[i];o[0]===""&&o[1]===""&&this.globParts[i][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let s=0;s<t[r].length;s++)t[r][s]==="**"&&(t[r][s]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((e=>{let r=-1;for(;(r=e.indexOf("**",r+1))!==-1;){let s=r;for(;e[s+1]==="**";)s++;s!==r&&e.splice(r,s-r)}return e}))}levelOneOptimize(t){return t.map((e=>(e=e.reduce(((r,s)=>{const i=r[r.length-1];return s==="**"&&i==="**"?r:s===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(s),r)}),[])).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;s<t.length-1;s++){const i=t[s];s===1&&i===""&&t[0]===""||i!=="."&&i!==""||(e=!0,t.splice(s,1),s--)}t[0]!=="."||t.length!==2||t[1]!=="."&&t[1]!==""||(e=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){const s=t[r-1];s&&s!=="."&&s!==".."&&s!=="**"&&(e=!0,t.splice(r-1,2),r-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let r of t){let s=-1;for(;(s=r.indexOf("**",s+1))!==-1;){let o=s;for(;r[o+1]==="**";)o++;o>s&&r.splice(s+1,o-s);let a=r[s+1];const h=r[s+2],c=r[s+3];if(a!==".."||!h||h==="."||h===".."||!c||c==="."||c==="..")continue;e=!0,r.splice(s,1);const l=r.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let o=1;o<r.length-1;o++){const a=r[o];o===1&&a===""&&r[0]===""||a!=="."&&a!==""||(e=!0,r.splice(o,1),o--)}r[0]!=="."||r.length!==2||r[1]!=="."&&r[1]!==""||(e=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){const o=r[i-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;const a=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...a),r.length===0&&r.push(""),i-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let r=e+1;r<t.length;r++){const s=this.partsMatch(t[e],t[r],!this.preserveMultipleSlashes);if(s){t[e]=[],t[r]=s;break}}return t.filter((e=>e.length))}partsMatch(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=0,i=0,o=[],a="";for(;s<t.length&&i<e.length;)if(t[s]===e[i])o.push(a==="b"?e[i]:t[s]),s++,i++;else if(r&&t[s]==="**"&&e[i]===t[s+1])o.push(t[s]),s++;else if(r&&e[i]==="**"&&t[s]===e[i+1])o.push(e[i]),i++;else if(t[s]!=="*"||!e[i]||!this.options.dot&&e[i].startsWith(".")||e[i]==="**"){if(e[i]!=="*"||!t[s]||!this.options.dot&&t[s].startsWith(".")||t[s]==="**"||a==="a")return!1;a="b",o.push(e[i]),s++,i++}else{if(a==="b")return!1;a="a",o.push(t[s]),s++,i++}return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,r=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)e=!e,r++;r&&(this.pattern=t.slice(r)),this.negate=e}matchOne(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const s=this.options;if(this.isWindows){const f=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),y=!f&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),A=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),g=y?3:f?0:void 0,T=!A&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3])?3:A?0:void 0;if(typeof g=="number"&&typeof T=="number"){const[v,E]=[t[g],e[T]];v.toLowerCase()===E.toLowerCase()&&(e[T]=v,T>g?e=e.slice(T):g>T&&(t=t.slice(g)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,a=0,h=t.length,c=e.length;o<h&&a<c;o++,a++){this.debug("matchOne loop");var l=e[a],u=t[o];if(this.debug(e,l,u),l===!1)return!1;if(l===vt){this.debug("GLOBSTAR",[e,l,u]);var d=o,m=a+1;if(m===c){for(this.debug("** at the end");o<h;o++)if(t[o]==="."||t[o]===".."||!s.dot&&t[o].charAt(0)===".")return!1;return!0}for(;d<h;){var p=t[d];if(this.debug(`
globstar while`,t,d,e,m,p),this.matchOne(t.slice(d),e.slice(m),r))return this.debug("globstar found match!",d,h,p),!0;if(p==="."||p===".."||!s.dot&&p.charAt(0)==="."){this.debug("dot detected!",t,d,e,m);break}this.debug("globstar swallow a segment, and continue"),d++}return!(!r||(this.debug(`
>>> no match, partial?`,t,d,e,m),d!==h))}let f;if(typeof l=="string"?(f=u===l,this.debug("string match",l,u,f)):(f=l.test(u),this.debug("pattern match",l,u,f)),!f)return!1}if(o===h&&a===c)return!0;if(o===h)return r;if(a===c)return o===h-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Un(this.pattern,this.options)}parse(t){Ie(t);const e=this.options;if(t==="**")return vt;if(t==="")return"";let r,s=null;(r=t.match(_a))?s=e.dot?wa:Da:(r=t.match(ma))?s=(e.nocase?e.dot?Ta:ya:e.dot?ga:pa)(r[1]):(r=t.match(xa))?s=(e.nocase?e.dot?Na:Ca:e.dot?Oa:Ua)(r):(r=t.match(Sa))?s=e.dot?ba:Aa:(r=t.match(va))&&(s=Ea);const i=lt.fromGlob(t,this.options).toMMPattern();return s&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:s}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,r=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let i=t.map((h=>{const c=h.map((l=>{if(l instanceof RegExp)for(const u of l.flags.split(""))s.add(u);return typeof l=="string"?l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):l===vt?vt:l._src}));return c.forEach(((l,u)=>{const d=c[u+1],m=c[u-1];l===vt&&m!==vt&&(m===void 0?d!==void 0&&d!==vt?c[u+1]="(?:\\/|"+r+"\\/)?"+d:c[u]=r:d===void 0?c[u-1]=m+"(?:\\/|"+r+")?":d!==vt&&(c[u-1]=m+"(?:\\/|\\/"+r+"\\/)"+d,c[u+1]=vt))})),c.filter((l=>l!==vt)).join("/")})).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];i="^"+o+i+a+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...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){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const i=this.set;this.debug(this.pattern,"set",i);let o=s[s.length-1];if(!o)for(let a=s.length-2;!o&&a>=0;a--)o=s[a];for(let a=0;a<i.length;a++){const h=i[a];let c=s;if(r.matchBase&&h.length===1&&(c=[o]),this.matchOne(c,h,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(t){return at.defaults(t).Minimatch}}function Tr(n){const t=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${n.status} ${n.statusText}`);return t.status=n.status,t.response=n,t}function X(n,t){const{status:e}=t;if(e===401&&n.digest)return t;if(e>=400)throw Tr(t);return t}function Zt(n,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:n.headers?na(n.headers):{},status:n.status,statusText:n.statusText}:t}at.AST=lt,at.Minimatch=Ye,at.escape=function(n){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&")},at.unescape=ne;const Pa=(on=function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=J({url:$(n.remoteURL,V(t)),method:"COPY",headers:{Destination:$(n.remoteURL,V(e)),Overwrite:r.overwrite===!1?"F":"T",Depth:r.shallow?"0":"infinity"}},n,r);return o=function(a){X(n,a)},(i=Z(s,n))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o},function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];try{return Promise.resolve(on.apply(this,n))}catch(e){return Promise.reject(e)}});var on,Sr=L(635),Ia=L(829),Ut=L.n(Ia),Xt=(function(n){return n.Array="array",n.Object="object",n.Original="original",n})(Xt||{});function be(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xt.Original;const r=Ut().get(n,t);return e==="array"&&Array.isArray(r)===!1?[r]:e==="object"&&Array.isArray(r)?r[0]:r}function de(n){return new Promise((t=>{t((function(e){const{multistatus:r}=e;if(r==="")return{multistatus:{response:[]}};if(!r)throw new Error("Invalid response: No root multistatus found");const s={multistatus:Array.isArray(r)?r[0]:r};return Ut().set(s,"multistatus.response",be(s,"multistatus.response",Xt.Array)),Ut().set(s,"multistatus.response",Ut().get(s,"multistatus.response").map((i=>(function(o){const a=Object.assign({},o);return a.status?Ut().set(a,"status",be(a,"status",Xt.Object)):(Ut().set(a,"propstat",be(a,"propstat",Xt.Object)),Ut().set(a,"propstat.prop",be(a,"propstat.prop",Xt.Object))),a})(i)))),s})(new Sr.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(e,r,s)=>r==="true"||r==="false"?r==="true":r,tagValueProcessor(e,r,s){if(!s.endsWith("propstat.prop.displayname"))return r}}).parse(n)))}))}function Le(n,t){let e=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:r=null,getcontentlength:s="0",resourcetype:i=null,getcontenttype:o=null,getetag:a=null}=n,h=i&&typeof i=="object"&&i.collection!==void 0?"directory":"file",c={filename:t,basename:Ne().basename(t),lastmod:r,size:parseInt(s,10),type:h,etag:typeof a=="string"?a.replace(/"/g,""):null};return h==="file"&&(c.mime=o&&typeof o=="string"?o.split(";")[0]:""),e&&(n.displayname!==void 0&&(n.displayname=String(n.displayname)),c.props=n),c}function Pn(n,t){let e=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=null;try{n.multistatus.response[0].propstat&&(r=n.multistatus.response[0])}catch{}if(!r)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:s,status:i}}=r,[o,a,h]=i.split(" ",3),c=parseInt(a,10);if(c>=400){const l=new Error(`Invalid response: ${c} ${h}`);throw l.status=c,l}return Le(s,he(t),e)}function In(n){switch(String(n)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(n),10)}}function Ze(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Ar=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:r=!1}=e,s=J({url:$(n.remoteURL,V(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},n,e);return Ze(Z(s,n),(function(i){return X(n,i),Ze(i.text(),(function(o){return Ze(de(o),(function(a){const h=Pn(a,t,r);return Zt(i,h,r)}))}))}))}));function Yn(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Ya=Mn((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=(function(i){if(!i||i==="/")return[];let o=i;const a=[];do a.push(o),o=Ne().dirname(o);while(o&&o!=="/");return a})(he(t));r.sort(((i,o)=>i.length>o.length?1:o.length>i.length?-1:0));let s=!1;return(function(i,o,a){if(typeof i[un]=="function"){let f=function(y){try{for(;!(h=u.next()).done;)if((y=o(h.value))&&y.then){if(!cn(y))return void y.then(f,l||(l=ht.bind(null,c=new Qt,2)));y=y.v}c?ht(c,1,y):c=y}catch(A){ht(c||(c=new Qt),2,A)}};var h,c,l,u=i[un]();if(f(),u.return){var d=function(y){try{h.done||u.return()}catch{}return y};if(c&&c.then)return c.then(d,(function(y){throw d(y)}));d()}return c}if(!("length"in i))throw new TypeError("Object is not iterable");for(var m=[],p=0;p<i.length;p++)m.push(i[p]);return(function(f,y,A){var g,T,v=-1;return(function E(S){try{for(;++v<f.length&&(!A||!A());)if((S=y(v))&&S.then){if(!cn(S))return void S.then(E,T||(T=ht.bind(null,g=new Qt,2)));S=S.v}g?ht(g,1,S):g=S}catch(w){ht(g||(g=new Qt),2,w)}})(),g})(m,(function(f){return o(m[f])}),a)})(r,(function(i){return o=function(){return(function(h,c){try{var l=Yn(Ar(n,i),(function(u){if(u.type!=="directory")throw new Error(`Path includes a file: ${t}`)}))}catch(u){return c(u)}return l&&l.then?l.then(void 0,c):l})(0,(function(h){const c=h;return(function(){if(c.status===404)return s=!0,ln(ur(n,i,{...e,recursive:!1}));throw h})()}))},(a=(function(){if(s)return ln(ur(n,i,{...e,recursive:!1}))})())&&a.then?a.then(o):o();var o,a}),(function(){return!1}))}));function Mn(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}function Ma(){}function ln(n,t){return n&&n.then?n.then(Ma):Promise.resolve()}const un=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function ht(n,t,e){if(!n.s){if(e instanceof Qt){if(!e.s)return void(e.o=ht.bind(null,n,t));1&t&&(t=e.s),e=e.v}if(e&&e.then)return void e.then(ht.bind(null,n,t),ht.bind(null,n,2));n.s=t,n.v=e;const r=n.o;r&&r(n)}}const Qt=(function(){function n(){}return n.prototype.then=function(t,e){const r=new n,s=this.s;if(s){const i=1&s?t:e;if(i){try{ht(r,1,i(this.v))}catch(o){ht(r,2,o)}return r}return this}return this.o=function(i){try{const o=i.v;1&i.s?ht(r,1,t?t(o):o):e?ht(r,1,e(o)):ht(r,2,o)}catch(o){ht(r,2,o)}},r},n})();function cn(n){return n instanceof Qt&&1&n.s}const ur=Mn((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e.recursive===!0)return Ya(n,t,e);const r=J({url:$(n.remoteURL,(s=V(t),s.endsWith("/")?s:s+"/")),method:"MKCOL"},n,e);var s;return Yn(Z(r,n),(function(i){X(n,i)}))}));var ka=L(388),hn=L.n(ka);const Ba=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r={};if(typeof e.range=="object"&&typeof e.range.start=="number"){let a=`bytes=${e.range.start}-`;typeof e.range.end=="number"&&(a=`${a}${e.range.end}`),r.Range=a}const s=J({url:$(n.remoteURL,V(t)),method:"GET",headers:r},n,e);return o=function(a){if(X(n,a),r.Range&&a.status!==206){const h=new Error(`Invalid response code for partial request: ${a.status}`);throw h.status=a.status,h}return e.callback&&setTimeout((()=>{e.callback(a)}),0),a.body},(i=Z(s,n))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o})),ja=()=>{},La=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t,e){e.url||(e.url=$(n.remoteURL,V(t)));const r=J(e,n,{});return i=function(o){return X(n,o),o},(s=Z(r,n))&&s.then||(s=Promise.resolve(s)),i?s.then(i):s;var s,i})),Ra=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=J({url:$(n.remoteURL,V(t)),method:"DELETE"},n,e);return i=function(o){X(n,o)},(s=Z(r,n))&&s.then||(s=Promise.resolve(s)),i?s.then(i):s;var s,i})),za=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(r,s){try{var i=(o=Ar(n,t,e),a=function(){return!0},h?a?a(o):o:(o&&o.then||(o=Promise.resolve(o)),a?o.then(a):o))}catch(c){return s(c)}var o,a,h;return i&&i.then?i.then(void 0,s):i})(0,(function(r){if(r.status===404)return!1;throw r}))}));function Je(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Va=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=J({url:$(n.remoteURL,V(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:e.deep?"infinity":"1"}},n,e);return Je(Z(r,n),(function(s){return X(n,s),Je(s.text(),(function(i){if(!i)throw new Error("Failed parsing directory contents: Empty response");return Je(de(i),(function(o){const a=qr(t);let h=(function(c,l,u){let d=arguments.length>3&&arguments[3]!==void 0&&arguments[3],m=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const p=Ne().join(l,"/"),{multistatus:{response:f}}=c,y=f.map((A=>{const g=(function(v){try{return v.replace(/^https?:\/\/[^\/]+/,"")}catch(E){throw new dt(E,"Failed normalising HREF")}})(A.href),{propstat:{prop:T}}=A;return Le(T,p==="/"?decodeURIComponent(he(g)):he(Ne().relative(decodeURIComponent(p),decodeURIComponent(g))),d)}));return m?y:y.filter((A=>A.basename&&(A.type==="file"||A.filename!==u.replace(/\/$/,""))))})(o,qr(n.remoteBasePath||n.remotePath),a,e.details,e.includeSelf);return e.glob&&(h=(function(c,l){return c.filter((u=>at(u.filename,l,{matchBase:!0})))})(h,e.glob)),Zt(s,h,e.details)}))}))}))}));function br(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}const $a=br((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=J({url:$(n.remoteURL,V(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[Ha]},n,e);return Me(Z(r,n),(function(s){return X(n,s),Me(s.text(),(function(i){return Zt(s,i,e.details)}))}))}));function Me(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Fa=br((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=J({url:$(n.remoteURL,V(t)),method:"GET"},n,e);return Me(Z(r,n),(function(s){let i;return X(n,s),(function(o,a){var h=o();return h&&h.then?h.then(a):a()})((function(){return Me(s.arrayBuffer(),(function(o){i=o}))}),(function(){return Zt(s,i,e.details)}))}))})),Wa=br((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:r="binary"}=e;if(r!=="binary"&&r!=="text")throw new dt({info:{code:Mt.InvalidOutputFormat}},`Invalid output format: ${r}`);return r==="text"?$a(n,t,e):Fa(n,t,e)})),Ha=n=>n;function Ga(n){return new Sr.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(kn({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:n}}},"d"))}function kn(n,t){const e={...n};for(const r in e)e.hasOwnProperty(r)&&(e[r]&&typeof e[r]=="object"&&r.indexOf(":")===-1?(e[`${t}:${r}`]=kn(e[r],t),delete e[r]):/^@_/.test(r)===!1&&(e[`${t}:${r}`]=e[r],delete e[r]));return e}function cr(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}function Bn(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}const Ka=Bn((function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=J({url:$(n.remoteURL,V(t)),method:"UNLOCK",headers:{"Lock-Token":e}},n,r);return cr(Z(s,n),(function(i){if(X(n,i),i.status!==204&&i.status!==200)throw Tr(i)}))})),qa=Bn((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:r,timeout:s=Za}=e,i={Accept:"text/plain,application/xml",Timeout:s};r&&(i.If=r);const o=J({url:$(n.remoteURL,V(t)),method:"LOCK",headers:i,data:Ga(n.contactHref)},n,e);return cr(Z(o,n),(function(a){return X(n,a),cr(a.text(),(function(h){const c=(d=h,new Sr.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(d)),l=Ut().get(c,"prop.lockdiscovery.activelock.locktoken.href"),u=Ut().get(c,"prop.lockdiscovery.activelock.timeout");var d;if(!l)throw Tr(a,"No lock token received: ");return{token:l,serverTimeout:u}}))}))})),Za="Infinite, Second-4100000000";function Xe(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Ja=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const e=t.path||"/",r=J({url:$(n.remoteURL,e),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},n,t);return Xe(Z(r,n),(function(s){return X(n,s),Xe(s.text(),(function(i){return Xe(de(i),(function(o){const a=(function(h){try{const[c]=h.multistatus.response,{propstat:{prop:{"quota-used-bytes":l,"quota-available-bytes":u}}}=c;return l!==void 0&&u!==void 0?{used:parseInt(String(l),10),available:In(u)}:null}catch{}return null})(o);return Zt(s,a,t.details)}))}))}))}));function Qe(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const Xa=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:r=!1}=e,s=J({url:$(n.remoteURL,V(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":n.headers["Content-Type"]||"application/xml; charset=utf-8"}},n,e);return Qe(Z(s,n),(function(i){return X(n,i),Qe(i.text(),(function(o){return Qe(de(o),(function(a){const h=(function(c,l,u){const d={truncated:!1,results:[]};return d.truncated=c.multistatus.response.some((m=>(m.status||m.propstat?.status).split(" ",3)?.[1]==="507"&&m.href.replace(/\/$/,"").endsWith(V(l).replace(/\/$/,"")))),c.multistatus.response.forEach((m=>{if(m.propstat===void 0)return;const p=m.href.split("/").map(decodeURIComponent).join("/");d.results.push(Le(m.propstat.prop,p,u))})),d})(a,t,r);return Zt(i,h,r)}))}))}))})),Qa=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=J({url:$(n.remoteURL,V(t)),method:"MOVE",headers:{Destination:$(n.remoteURL,V(e)),Overwrite:r.overwrite===!1?"F":"T"}},n,r);return o=function(a){X(n,a)},(i=Z(s,n))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}));var t0=L(172);const e0=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:s=!0,overwrite:i=!0}=r,o={"Content-Type":"application/octet-stream"};s===!1||(o["Content-Length"]=typeof s=="number"?`${s}`:`${(function(l){if(Dn(l))return l.byteLength;if(wn(l))return l.length;if(typeof l=="string")return(0,t0.d)(l);throw new dt({info:{code:Mt.DataTypeNoLength}},"Cannot calculate data length: Invalid type")})(e)}`),i||(o["If-None-Match"]="*");const a=J({url:$(n.remoteURL,V(t)),method:"PUT",headers:o,data:e},n,r);return c=function(l){try{X(n,l)}catch(u){const d=u;if(d.status!==412||i)throw d;return!1}return!0},(h=Z(a,n))&&h.then||(h=Promise.resolve(h)),c?h.then(c):h;var h,c})),jn=(function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}})((function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=J({url:$(n.remoteURL,V(t)),method:"OPTIONS"},n,e);return i=function(o){try{X(n,o)}catch(a){throw a}return{compliance:(o.headers.get("DAV")??"").split(",").map((a=>a.trim())),server:o.headers.get("Server")??""}},(s=Z(r,n))&&s.then||(s=Promise.resolve(s)),i?s.then(i):s;var s,i}));function ae(n,t,e){return e?t?t(n):n:(n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n)}const r0=vr((function(n,t,e,r,s){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(e>r||e<0)throw new dt({info:{code:Mt.InvalidUpdateRange}},`Invalid update range ${e} for partial update`);const o={"Content-Type":"application/octet-stream","Content-Length":""+(r-e+1),"Content-Range":`bytes ${e}-${r}/*`},a=J({url:$(n.remoteURL,V(t)),method:"PUT",headers:o,data:s},n,i);return ae(Z(a,n),(function(h){X(n,h)}))}));function dn(n,t){var e=n();return e&&e.then?e.then(t):t(e)}const n0=vr((function(n,t,e,r,s){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(e>r||e<0)throw new dt({info:{code:Mt.InvalidUpdateRange}},`Invalid update range ${e} for partial update`);const o={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(r-e+1),"X-Update-Range":`bytes=${e}-${r}`},a=J({url:$(n.remoteURL,V(t)),method:"PATCH",headers:o,data:s},n,i);return ae(Z(a,n),(function(h){X(n,h)}))}));function vr(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(n.apply(this,t))}catch(r){return Promise.reject(r)}}}const s0=vr((function(n,t,e,r,s){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return ae(jn(n,t,i),(function(o){let a=!1;return dn((function(){if(o.compliance.includes("sabredav-partialupdate"))return ae(n0(n,t,e,r,s,i),(function(h){return a=!0,h}))}),(function(h){let c=!1;return a?h:dn((function(){if(o.server.includes("Apache")&&o.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return ae(r0(n,t,e,r,s,i),(function(l){return c=!0,l}))}),(function(l){if(c)return l;throw new dt({info:{code:Mt.NotSupported}},"Not supported")}))}))}))})),i0="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function a0(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:e=null,remoteBasePath:r,contactHref:s=i0,ha1:i,headers:o={},httpAgent:a,httpsAgent:h,password:c,token:l,username:u,withCredentials:d}=t;let m=e;m||(m=u||c?ct.Password:ct.None);const p={authType:m,remoteBasePath:r,contactHref:s,ha1:i,headers:Object.assign({},o),httpAgent:a,httpsAgent:h,password:c,remotePath:Ki(n),remoteURL:n,token:l,username:u,withCredentials:d};return vn(p,u,c,l,i),{copyFile:(f,y,A)=>Pa(p,f,y,A),createDirectory:(f,y)=>ur(p,f,y),createReadStream:(f,y)=>(function(A,g){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const v=new(hn()).PassThrough;return Ba(A,g,T).then((E=>{E.pipe(v)})).catch((E=>{v.emit("error",E)})),v})(p,f,y),createWriteStream:(f,y,A)=>(function(g,T){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ja;const S=new(hn()).PassThrough,w={};v.overwrite===!1&&(w["If-None-Match"]="*");const b=J({url:$(g.remoteURL,V(T)),method:"PUT",headers:w,data:S,maxRedirects:0},g,v);return Z(b,g).then((x=>X(g,x))).then((x=>{setTimeout((()=>{E(x)}),0)})).catch((x=>{S.emit("error",x)})),S})(p,f,y,A),customRequest:(f,y)=>La(p,f,y),deleteFile:(f,y)=>Ra(p,f,y),exists:(f,y)=>za(p,f,y),getDirectoryContents:(f,y)=>Va(p,f,y),getFileContents:(f,y)=>Wa(p,f,y),getFileDownloadLink:f=>(function(y,A){let g=$(y.remoteURL,V(A));const T=/^https:/i.test(g)?"https":"http";switch(y.authType){case ct.None:break;case ct.Password:{const v=Jr(y.headers.Authorization.replace(/^Basic /i,"").trim());g=g.replace(/^https?:\/\//,`${T}://${v}@`);break}default:throw new dt({info:{code:Mt.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${y.authType}`)}return g})(p,f),getFileUploadLink:f=>(function(y,A){let g=`${$(y.remoteURL,V(A))}?Content-Type=application/octet-stream`;const T=/^https:/i.test(g)?"https":"http";switch(y.authType){case ct.None:break;case ct.Password:{const v=Jr(y.headers.Authorization.replace(/^Basic /i,"").trim());g=g.replace(/^https?:\/\//,`${T}://${v}@`);break}default:throw new dt({info:{code:Mt.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${y.authType}`)}return g})(p,f),getHeaders:()=>Object.assign({},p.headers),getQuota:f=>Ja(p,f),lock:(f,y)=>qa(p,f,y),moveFile:(f,y,A)=>Qa(p,f,y,A),putFileContents:(f,y,A)=>e0(p,f,y,A),partialUpdateFileContents:(f,y,A,g,T)=>s0(p,f,y,A,g,T),getDAVCompliance:f=>jn(p,f),search:(f,y)=>Xa(p,f,y),setHeaders:f=>{p.headers=Object.assign({},f)},stat:(f,y)=>Ar(p,f,y),unlock:(f,y,A)=>Ka(p,f,y,A)}}_t.hT,_t.O4,_t.Kd,_t.YK;var o0=_t.UU;_t.Gu,_t.ky;var l0=_t.h4;_t.ch,_t.hq,_t.i5;let ve;function Ln(){if(!ve){const n=Gn(`dav/calendars/${er().uid}`);ve=o0(n);const t=e=>{ve.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})};qn(t),t(Kn())}return ve}function u0(){return{MO:[],TU:[],WE:[],TH:[],FR:[],SA:[],SU:[]}}async function c0(){const n=await Ln().customRequest("inbox",{method:"PROPFIND",data:`<?xml version="1.0"?>
<x0:propfind xmlns:x0="DAV:">
<x0:prop>
<x1:calendar-availability xmlns:x1="urn:ietf:params:xml:ns:caldav"/>
</x0:prop>
</x0:propfind>`}),t=await l0(await n.text());if(!t)return;const e=t?.multistatus?.response[0]?.propstat?.prop["calendar-availability"];if(e)return Vi(e)}async function h0(n,t){const e=[...Object.keys(n).flatMap(s=>n[s].map(i=>({...i,day:s})))],r=$i(e,t);Ct.debug("New availability ical created",{vavailability:r}),await Ln().customRequest("inbox",{method:"PROPPATCH",data:`<?xml version="1.0"?>
<x0:propertyupdate xmlns:x0="DAV:">
<x0:set>
<x0:prop>
<x1:calendar-availability xmlns:x1="urn:ietf:params:xml:ns:caldav">${r}</x1:calendar-availability>
</x0:prop>
</x0:set>
</x0:propertyupdate>`})}async function d0(){await se.post(ie("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}),{configValue:"yes"})}async function f0(){await se.delete(ie("/apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"dav",configKey:"user_status_automation"}))}const m0=ke({__name:"AvailabilityForm",setup(n){const t=cs().core.user?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone,e=re(!0),r=re(!1),s=re(u0()),i=re(dr("dav","user_status_automation")==="yes");Zn(async()=>{try{const a=await c0();a?(s.value=a.slots,Ct.debug("availability loaded",{slots:s.value})):Ct.debug("no availability is set")}catch(a){Ct.error("could not load existing availability",{error:a}),we(j("dav","Failed to load availability"))}finally{e.value=!1}});async function o(){r.value=!0;try{await h0(s.value,t),i.value?await d0():await f0(),nr(j("dav","Saved availability"))}catch(a){Ct.error("could not save availability",{error:a}),we(j("dav","Failed to save availability"))}finally{r.value=!1}}return(a,h)=>(B(),W("div",null,[G(Y(Li),{slots:s.value,"onUpdate:slots":h[0]||(h[0]=c=>s.value=c),loading:e.value,"l10n-to":Y(j)("dav","to"),"l10n-delete-slot":Y(j)("dav","Delete slot"),"l10n-empty-day":Y(j)("dav","No working hours set"),"l10n-add-slot":Y(j)("dav","Add slot"),"l10n-week-day-list-label":Y(j)("dav","Weekdays"),"l10n-monday":Y(j)("dav","Monday"),"l10n-tuesday":Y(j)("dav","Tuesday"),"l10n-wednesday":Y(j)("dav","Wednesday"),"l10n-thursday":Y(j)("dav","Thursday"),"l10n-friday":Y(j)("dav","Friday"),"l10n-saturday":Y(j)("dav","Saturday"),"l10n-sunday":Y(j)("dav","Sunday"),"l10n-start-picker-label":c=>Y(j)("dav","Pick a start time for {dayName}",{dayName:c}),"l10n-end-picker-label":c=>Y(j)("dav","Pick a end time for {dayName}",{dayName:c})},null,8,["slots","loading","l10n-to","l10n-delete-slot","l10n-empty-day","l10n-add-slot","l10n-week-day-list-label","l10n-monday","l10n-tuesday","l10n-wednesday","l10n-thursday","l10n-friday","l10n-saturday","l10n-sunday","l10n-start-picker-label","l10n-end-picker-label"]),G(Y(Jn),{modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=c=>i.value=c)},{default:Nt(()=>[oe(gt(Y(j)("dav",'Automatically set user status to "Do not disturb" outside of availability to mute all notifications.')),1)]),_:1},8,["modelValue"]),G(Y(fr),{disabled:e.value||r.value,variant:"primary",onClick:o},{default:Nt(()=>[oe(gt(Y(j)("dav","Save")),1)]),_:1},8,["disabled"])]))}}),p0=Be(m0,[["__scopeId","data-v-ed655058"]]),g0=ke({__name:"UserAvailability",setup(n){const t=dr("dav","hide_absence_settings",!0);return(e,r)=>(B(),W("div",null,[G(Y(Cr),{id:"availability",name:Y(j)("dav","Availability"),description:Y(j)("dav","If you configure your working hours, other people will see when you are out of office when they book a meeting.")},{default:Nt(()=>[G(p0)]),_:1},8,["name","description"]),Y(t)?Yt("",!0):(B(),zt(Y(Cr),{key:0,id:"absence",name:Y(j)("dav","Absence"),description:Y(j)("dav","Configure your next absence period.")},{default:Nt(()=>[G(Us)]),_:1},8,["name","description"]))]))}}),y0=Xn(g0);y0.mount("#settings-personal-availability");
//# sourceMappingURL=dav-settings-personal-availability.mjs.map