MCPcopy Create free account
hub / github.com/Make-md/makemd / NS

Function NS

main.js:37–37  ·  view source on GitHub ↗
(e,t,r)

Source from the content-addressed store, hash-verified

35`)):typeof readline=="function"&&(te=readline(),te!==null&&(te+=`
36`));if(!te)return null;W.input=Ge(te,!0)}return W.input.shift()},jb:function(W,te){te===null||te===10?(x(D(W.output,0)),W.output=[]):te!=0&&W.output.push(te)},fsync:function(W){W.output&&0<W.output.length&&(x(D(W.output,0)),W.output=[])}},Ie={jb:function(W,te){te===null||te===10?(g(D(W.output,0)),W.output=[]):te!=0&&W.output.push(te)},fsync:function(W){W.output&&0<W.output.length&&(g(D(W.output,0)),W.output=[])}},$e={Qa:null,Ra:function(){return $e.createNode(null,"/",16895,0)},createNode:function(W,te,ce,Ee){if((ce&61440)===24576||(ce&61440)===4096)throw new Ce(63);return $e.Qa||($e.Qa={dir:{node:{Pa:$e.Ga.Pa,Oa:$e.Ga.Oa,lookup:$e.Ga.lookup,ab:$e.Ga.ab,rename:$e.Ga.rename,unlink:$e.Ga.unlink,rmdir:$e.Ga.rmdir,readdir:$e.Ga.readdir,symlink:$e.Ga.symlink},stream:{Ta:$e.Ha.Ta}},file:{node:{Pa:$e.Ga.Pa,Oa:$e.Ga.Oa},stream:{Ta:$e.Ha.Ta,read:$e.Ha.read,write:$e.Ha.write,lb:$e.Ha.lb,bb:$e.Ha.bb,cb:$e.Ha.cb}},link:{node:{Pa:$e.Ga.Pa,Oa:$e.Ga.Oa,readlink:$e.Ga.readlink},stream:{}},pb:{node:{Pa:$e.Ga.Pa,Oa:$e.Ga.Oa},stream:Tm}}),ce=br(W,te,ce,Ee),(ce.mode&61440)===16384?(ce.Ga=$e.Qa.dir.node,ce.Ha=$e.Qa.dir.stream,ce.Ia={}):(ce.mode&61440)===32768?(ce.Ga=$e.Qa.file.node,ce.Ha=$e.Qa.file.stream,ce.Ma=0,ce.Ia=null):(ce.mode&61440)===40960?(ce.Ga=$e.Qa.link.node,ce.Ha=$e.Qa.link.stream):(ce.mode&61440)===8192&&(ce.Ga=$e.Qa.pb.node,ce.Ha=$e.Qa.pb.stream),ce.timestamp=Date.now(),W&&(W.Ia[te]=ce,W.timestamp=ce.timestamp),ce},Jb:function(W){return W.Ia?W.Ia.subarray?W.Ia.subarray(0,W.Ma):new Uint8Array(W.Ia):new Uint8Array(0)},qb:function(W,te){var ce=W.Ia?W.Ia.length:0;ce>=te||(te=Math.max(te,ce*(1048576>ce?2:1.125)>>>0),ce!=0&&(te=Math.max(te,256)),ce=W.Ia,W.Ia=new Uint8Array(te),0<W.Ma&&W.Ia.set(ce.subarray(0,W.Ma),0))},Gb:function(W,te){if(W.Ma!=te)if(te==0)W.Ia=null,W.Ma=0;else{var ce=W.Ia;W.Ia=new Uint8Array(te),ce&&W.Ia.set(ce.subarray(0,Math.min(te,W.Ma))),W.Ma=te}},Ga:{Pa:function(W){var te={};return te.dev=(W.mode&61440)===8192?W.id:1,te.ino=W.id,te.mode=W.mode,te.nlink=1,te.uid=0,te.gid=0,te.rdev=W.rdev,(W.mode&61440)===16384?te.size=4096:(W.mode&61440)===32768?te.size=W.Ma:(W.mode&61440)===40960?te.size=W.link.length:te.size=0,te.atime=new Date(W.timestamp),te.mtime=new Date(W.timestamp),te.ctime=new Date(W.timestamp),te.Ab=4096,te.blocks=Math.ceil(te.size/te.Ab),te},Oa:function(W,te){te.mode!==void 0&&(W.mode=te.mode),te.timestamp!==void 0&&(W.timestamp=te.timestamp),te.size!==void 0&&$e.Gb(W,te.size)},lookup:function(){throw ft[44]},ab:function(W,te,ce,Ee){return $e.createNode(W,te,ce,Ee)},rename:function(W,te,ce){if((W.mode&61440)===16384){try{var Ee=cr(te,ce)}catch{}if(Ee)for(var Be in Ee.Ia)throw new Ce(55)}delete W.parent.Ia[W.name],W.parent.timestamp=Date.now(),W.name=ce,te.Ia[ce]=W,te.timestamp=W.parent.timestamp,W.parent=te},unlink:function(W,te){delete W.Ia[te],W.timestamp=Date.now()},rmdir:function(W,te){var ce=cr(W,te),Ee;for(Ee in ce.Ia)throw new Ce(55);delete W.Ia[te],W.timestamp=Date.now()},readdir:function(W){var te=[".",".."],ce;for(ce in W.Ia)W.Ia.hasOwnProperty(ce)&&te.push(ce);return te},symlink:function(W,te,ce){return W=$e.createNode(W,te,41471,0),W.link=ce,W},readlink:function(W){if((W.mode&61440)!==40960)throw new Ce(28);return W.link}},Ha:{read:function(W,te,ce,Ee,Be){var it=W.node.Ia;if(Be>=W.node.Ma)return 0;if(W=Math.min(W.node.Ma-Be,Ee),8<W&&it.subarray)te.set(it.subarray(Be,Be+W),ce);else for(Ee=0;Ee<W;Ee++)te[ce+Ee]=it[Be+Ee];return W},write:function(W,te,ce,Ee,Be,it){if(te.buffer===P.buffer&&(it=!1),!Ee)return 0;if(W=W.node,W.timestamp=Date.now(),te.subarray&&(!W.Ia||W.Ia.subarray)){if(it)return W.Ia=te.subarray(ce,ce+Ee),W.Ma=Ee;if(W.Ma===0&&Be===0)return W.Ia=te.slice(ce,ce+Ee),W.Ma=Ee;if(Be+Ee<=W.Ma)return W.Ia.set(te.subarray(ce,ce+Ee),Be),Ee}if($e.qb(W,Be+Ee),W.Ia.subarray&&te.subarray)W.Ia.set(te.subarray(ce,ce+Ee),Be);else for(it=0;it<Ee;it++)W.Ia[Be+it]=te[ce+it];return W.Ma=Math.max(W.Ma,Be+Ee),Ee},Ta:function(W,te,ce){if(ce===1?te+=W.position:ce===2&&(W.node.mode&61440)===32768&&(te+=W.node.Ma),0>te)throw new Ce(28);return te},lb:function(W,te,ce){$e.qb(W.node,te+ce),W.node.Ma=Math.max(W.node.Ma,te+ce)},bb:function(W,te,ce,Ee,Be){if((W.node.mode&61440)!==32768)throw new Ce(43);if(W=W.node.Ia,Be&2||W.buffer!==O){if((0<ce||ce+te<W.length)&&(W.subarray?W=W.subarray(ce,ce+te):W=Array.prototype.slice.call(W,ce,ce+te)),ce=!0,te=65536*Math.ceil(te/65536),(Be=B4(65536,te))?(_.fill(0,Be,Be+te),te=Be):te=0,!te)throw new Ce(48);P.set(W,te)}else ce=!1,te=W.byteOffset;return{Fb:te,vb:ce}},cb:function(W,te,ce,Ee,Be){if((W.node.mode&61440)!==32768)throw new Ce(43);return Be&2||$e.Ha.write(W,te,0,Ee,ce,!1),0}}},Ue=null,Qe={},We=[],K=1,me=null,Fe=!0,Ce=null,ft={},gt=(W,te={})=>{if(W=Ne("/",W),!W)return{path:"",node:null};if(te=Object.assign({rb:!0,kb:0},te),8<te.kb)throw new Ce(32);W=he(W.split("/").filter(dt=>!!dt),!1);for(var ce=Ue,Ee="/",Be=0;Be<W.length;Be++){var it=Be===W.length-1;if(it&&te.parent)break;if(ce=cr(ce,W[Be]),Ee=fe(Ee+"/"+W[Be]),ce.Va&&(!it||it&&te.rb)&&(ce=ce.Va.root),!it||te.Sa){for(it=0;(ce.mode&61440)===40960;)if(ce=J2(Ee),Ee=Ne(ke(Ee),ce),ce=gt(Ee,{kb:te.kb+1}).node,40<it++)throw new Ce(32)}}return{path:Ee,node:ce}},rr=W=>{for(var te;;){if(W===W.parent)return W=W.Ra.ub,te?W[W.length-1]!=="/"?W+"/"+te:W+te:W;te=te?W.name+"/"+te:W.name,W=W.parent}},Nr=(W,te)=>{for(var ce=0,Ee=0;Ee<te.length;Ee++)ce=(ce<<5)-ce+te.charCodeAt(Ee)|0;return(W+ce>>>0)%me.length},Rr=W=>{var te=Nr(W.parent.id,W.name);if(me[te]===W)me[te]=W.Wa;else for(te=me[te];te;){if(te.Wa===W){te.Wa=W.Wa;break}te=te.Wa}},cr=(W,te)=>{var ce;if(ce=(ce=nn(W,"x"))?ce:W.Ga.lookup?0:2)throw new Ce(ce,W);for(ce=me[Nr(W.id,te)];ce;ce=ce.Wa){var Ee=ce.name;if(ce.parent.id===W.id&&Ee===te)return ce}return W.Ga.lookup(W,te)},br=(W,te,ce,Ee)=>(W=new _4(W,te,ce,Ee),te=Nr(W.parent.id,W.name),W.Wa=me[te],me[te]=W),Br={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},vn=W=>{var te=["r","w","rw"][W&3];return W&512&&(te+="w"),te},nn=(W,te)=>{if(Fe)return 0;if(!te.includes("r")||W.mode&292){if(te.includes("w")&&!(W.mode&146)||te.includes("x")&&!(W.mode&73))return 2}else return 2;return 0},Eo=(W,te)=>{try{return cr(W,te),20}catch{}return nn(W,"wx")},Qs=(W,te,ce)=>{try{var Ee=cr(W,te)}catch(Be){return Be.Ka}if(W=nn(W,"wx"))return W;if(ce){if((Ee.mode&61440)!==16384)return 54;if(Ee===Ee.parent||rr(Ee)==="/")return 10}else if((Ee.mode&61440)===16384)return 31;return 0},Pc=(W=0)=>{for(;4096>=W;W++)if(!We[W])return W;throw new Ce(33)},hp=(W,te)=>(Af||(Af=function(){this.$a={}},Af.prototype={},Object.defineProperties(Af.prototype,{object:{get:function(){return this.node},set:function(ce){this.node=ce}},flags:{get:function(){return this.$a.flags},set:function(ce){this.$a.flags=ce}},position:{get:function(){return this.$a.position},set:function(ce){this.$a.position=ce}}})),W=Object.assign(new Af,W),te=Pc(te),W.fd=te,We[te]=W),Tm={open:W=>{W.Ha=Qe[W.node.rdev].Ha,W.Ha.open&&W.Ha.open(W)},Ta:()=>{throw new Ce(70)}},Ru=(W,te)=>{Qe[W]={Ha:te}},gp=(W,te)=>{var ce=te==="/",Ee=!te;if(ce&&Ue)throw new Ce(10);if(!ce&&!Ee){var Be=gt(te,{rb:!1});if(te=Be.path,Be=Be.node,Be.Va)throw new Ce(10);if((Be.mode&61440)!==16384)throw new Ce(54)}te={type:W,Kb:{},ub:te,Eb:[]},W=W.Ra(te),W.Ra=te,te.root=W,ce?Ue=W:Be&&(Be.Va=te,Be.Ra&&Be.Ra.Eb.push(te))},Ap=(W,te,ce)=>{var Ee=gt(W,{parent:!0}).node;if(W=se(W),!W||W==="."||W==="..")throw new Ce(28);var Be=Eo(Ee,W);if(Be)throw new Ce(Be);if(!Ee.Ga.ab)throw new Ce(63);return Ee.Ga.ab(Ee,W,te,ce)},gf=(W,te)=>Ap(W,(te!==void 0?te:511)&1023|16384,0),_A=(W,te,ce)=>{typeof ce>"u"&&(ce=te,te=438),Ap(W,te|8192,ce)},Sb=(W,te)=>{if(!Ne(W))throw new Ce(44);var ce=gt(te,{parent:!0}).node;if(!ce)throw new Ce(44);te=se(te);var Ee=Eo(ce,te);if(Ee)throw new Ce(Ee);if(!ce.Ga.symlink)throw new Ce(63);ce.Ga.symlink(ce,te,W)},X2=W=>{var te=gt(W,{parent:!0}).node;W=se(W);var ce=cr(te,W),Ee=Qs(te,W,!0);if(Ee)throw new Ce(Ee);if(!te.Ga.rmdir)throw new Ce(63);if(ce.Va)throw new Ce(10);te.Ga.rmdir(te,W),Rr(ce)},K2=W=>{var te=gt(W,{parent:!0}).node;if(!te)throw new Ce(44);W=se(W);var ce=cr(te,W),Ee=Qs(te,W,!1);if(Ee)throw new Ce(Ee);if(!te.Ga.unlink)throw new Ce(63);if(ce.Va)throw new Ce(10);te.Ga.unlink(te,W),Rr(ce)},J2=W=>{if(W=gt(W).node,!W)throw new Ce(44);if(!W.Ga.readlink)throw new Ce(28);return Ne(rr(W.parent),W.Ga.readlink(W))},IA=(W,te)=>{if(W=gt(W,{Sa:!te}).node,!W)throw new Ce(44);if(!W.Ga.Pa)throw new Ce(63);return W.Ga.Pa(W)},Z2=W=>IA(W,!0),Nm=(W,te)=>{if(W=typeof W=="string"?gt(W,{Sa:!0}).node:W,!W.Ga.Oa)throw new Ce(63);W.Ga.Oa(W,{mode:te&4095|W.mode&-4096,timestamp:Date.now()})},eS=(W,te)=>{if(0>te)throw new Ce(28);if(W=typeof W=="string"?gt(W,{Sa:!0}).node:W,!W.Ga.Oa)throw new Ce(63);if((W.mode&61440)===16384)throw new Ce(31);if((W.mode&61440)!==32768)throw new Ce(28);var ce=nn(W,"w");if(ce)throw new Ce(ce);W.Ga.Oa(W,{size:te,timestamp:Date.now()})},cd=(W,te,ce)=>{if(W==="")throw new Ce(44);if(typeof te=="string"){var Ee=Br[te];if(typeof Ee>"u")throw Error("Unknown file open mode: "+te);te=Ee}if(ce=te&64?(typeof ce>"u"?438:ce)&4095|32768:0,typeof W=="object")var Be=W;else{W=fe(W);try{Be=gt(W,{Sa:!(te&131072)}).node}catch{}}if(Ee=!1,te&64)if(Be){if(te&128)throw new Ce(20)}else Be=Ap(W,ce,0),Ee=!0;if(!Be)throw new Ce(44);if((Be.mode&61440)===8192&&(te&=-513),te&65536&&(Be.mode&61440)!==16384)throw new Ce(54);if(!Ee&&(ce=Be?(Be.mode&61440)===40960?32:(Be.mode&61440)===16384&&(vn(te)!=="r"||te&512)?31:nn(Be,vn(te)):44))throw new Ce(ce);return te&512&&!Ee&&eS(Be,0),te&=-131713,Be=hp({node:Be,path:rr(Be),flags:te,seekable:!0,position:0,Ha:Be.Ha,Ib:[],error:!1}),Be.Ha.open&&Be.Ha.open(Be),!a.logReadFiles||te&1||(BA||(BA={}),W in BA||(BA[W]=1)),Be},Eb=W=>{if(W.fd===null)throw new Ce(8);W.hb&&(W.hb=null);try{W.Ha.close&&W.Ha.close(W)}catch(te){throw te}finally{We[W.fd]=null}W.fd=null},tS=(W,te,ce)=>{if(W.fd===null)throw new Ce(8);if(!W.seekable||!W.Ha.Ta)throw new Ce(70);if(ce!=0&&ce!=1&&ce!=2)throw new Ce(28);W.position=W.Ha.Ta(W,te,ce),W.Ib=[]},rS=(W,te,ce,Ee,Be)=>{if(0>Ee||0>Be)throw new Ce(28);if(W.fd===null)throw new Ce(8);if((W.flags&2097155)===1)throw new Ce(8);if((W.node.mode&61440)===16384)throw new Ce(31);if(!W.Ha.read)throw new Ce(28);var it=typeof Be<"u";if(!it)Be=W.position;else if(!W.seekable)throw new Ce(70);return te=W.Ha.read(W,te,ce,Ee,Be),it||(W.position+=te),te},kb=(W,te,ce,Ee,Be)=>{if(0>Ee||0>Be)throw new Ce(28);if(W.fd===null)throw new Ce(8);if((W.flags&2097155)===0)throw new Ce(8);if((W.node.mode&61440)===16384)throw new Ce(31);if(!W.Ha.write)throw new Ce(28);W.seekable&&W.flags&1024&&tS(W,0,2);var it=typeof Be<"u";if(!it)Be=W.position;else if(!W.seekable)throw new Ce(70);return te=W.Ha.write(W,te,ce,Ee,Be,void 0),it||(W.position+=te),te},nS=W=>{var te="binary";if(te!=="utf8"&&te!=="binary")throw Error('Invalid encoding type "'+te+'"');var ce,Ee=cd(W,Ee||0);W=IA(W).size;var Be=new Uint8Array(W);return rS(Ee,Be,0,W,0),te==="utf8"?ce=D(Be,0):te==="binary"&&(ce=Be),Eb(Ee),ce},Cb=()=>{Ce||(Ce=function(W,te){this.node=te,this.Hb=function(ce){this.Ka=ce},this.Hb(W),this.message="FS error"},Ce.prototype=Error(),Ce.prototype.constructor=Ce,[44].forEach(W=>{ft[W]=new Ce(W),ft[W].stack="<generic error, no stack>"}))},Vh,yi=(W,te)=>{var ce=0;return W&&(ce|=365),te&&(ce|=146),ce},Yo=(W,te,ce)=>{W=fe("/dev/"+W);var Ee=yi(!!te,!!ce);Db||(Db=64);var Be=Db++<<8|0;Ru(Be,{open:it=>{it.seekable=!1},close:()=>{ce&&ce.buffer&&ce.buffer.length&&ce(10)},read:(it,dt,dn,Di)=>{for(var ri=0,Oo=0;Oo<Di;Oo++){try{var vp=te()}catch{throw new Ce(29)}if(vp===void 0&&ri===0)throw new Ce(6);if(vp==null)break;ri++,dt[dn+Oo]=vp}return ri&&(it.node.timestamp=Date.now()),ri},write:(it,dt,dn,Di)=>{for(var ri=0;ri<Di;ri++)try{ce(dt[dn+ri])}catch{throw new Ce(29)}return Di&&(it.node.timestamp=Date.now()),ri}}),_A(W,Ee,Be)},Db,Ci={},Af,BA;function Mm(W,te,ce){if(te.charAt(0)==="/")return te;if(W=W===-100?"/":vf(W).path,te.length==0){if(!ce)throw new Ce(44);return W}return fe(W+"/"+te)}function iS(W,te,ce){try{var Ee=W(te)}catch(Be){if(Be&&Be.node&&fe(te)!==fe(rr(Be.node)))return-54;throw Be}return F[ce>>2]=Ee.dev,F[ce+8>>2]=Ee.ino,F[ce+12>>2]=Ee.mode,L[ce+16>>2]=Ee.nlink,F[ce+20>>2]=Ee.uid,F[ce+24>>2]=Ee.gid,F[ce+28>>2]=Ee.rdev,V=[Ee.size>>>0,(U=Ee.size,1<=+Math.abs(U)?0<U?(Math.min(+Math.floor(U/4294967296),4294967295)|0)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],F[ce+40>>2]=V[0],F[ce+44>>2]=V[1],F[ce+48>>2]=4096,F[ce+52>>2]=Ee.blocks,V=[Math.floor(Ee.atime.getTime()/1e3)>>>0,(U=Math.floor(Ee.atime.getTime()/1e3),1<=+Math.abs(U)?0<U?(Math.min(+Math.floor(U/4294967296),4294967295)|0)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],F[ce+56>>2]=V[0],F[ce+60>>2]=V[1],L[ce+64>>2]=0,V=[Math.floor(Ee.mtime.getTime()/1e3)>>>0,(U=Math.floor(Ee.mtime.getTime()/1e3),1<=+Math.abs(U)?0<U?(Math.min(+Math.floor(U/4294967296),4294967295)|0)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],F[ce+72>>2]=V[0],F[ce+76>>2]=V[1],L[ce+80>>2]=0,V=[Math.floor(Ee.ctime.getTime()/1e3)>>>0,(U=Math.floor(Ee.ctime.getTime()/1e3),1<=+Math.abs(U)?0<U?(Math.min(+Math.floor(U/4294967296),4294967295)|0)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],F[ce+88>>2]=V[0],F[ce+92>>2]=V[1],L[ce+96>>2]=0,V=[Ee.ino>>>0,(U=Ee.ino,1<=+Math.abs(U)?0<U?(Math.min(+Math.floor(U/4294967296),4294967295)|0)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],F[ce+104>>2]=V[0],F[ce+108>>2]=V[1],0}var Tb=void 0;function LA(){return Tb+=4,F[Tb-4>>2]}function vf(W){if(W=We[W],!W)throw new Ce(8);return W}function XD(W){return L[W>>2]+4294967296*F[W+4>>2]}function KD(W){var te=E(W)+1,ce=Fb(te);return ce&&M(W,P,ce,te),ce}function M4(W,te,ce){function Ee(Di){return(Di=Di.toTimeString().match(/\(([A-Za-z ]+)\)$/))?Di[1]:"GMT"}var Be=new Date().getFullYear(),it=new Date(Be,0,1),dt=new Date(Be,6,1);Be=it.getTimezoneOffset();var dn=dt.getTimezoneOffset();F[W>>2]=60*Math.max(Be,dn),F[te>>2]=Number(Be!=dn),W=Ee(it),te=Ee(dt),W=KD(W),te=KD(te),dn<Be?(L[ce>>2]=W,L[ce+4>>2]=te):(L[ce>>2]=te,L[ce+4>>2]=W)}function Nb(W,te,ce){Nb.Bb||(Nb.Bb=!0,M4(W,te,ce))}var O4;O4=c?()=>{var W=process.hrtime();return 1e3*W[0]+W[1]/1e6}:()=>performance.now();var aS={};function oS(){if(!Mb){var W={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:s||"./this.program"},te;for(te in aS)aS[te]===void 0?delete W[te]:W[te]=aS[te];var ce=[];for(te in W)ce.push(te+"="+W[te]);Mb=ce}return Mb}var Mb,_c=void 0,sS=[];function lS(W,te){if(!_c){_c=new WeakMap;var ce=Q.length;if(_c)for(var Ee=0;Ee<0+ce;Ee++){var Be=Q.get(Ee);Be&&_c.set(Be,Ee)}}if(_c.has(W))return _c.get(W);if(sS.length)ce=sS.pop();else{try{Q.grow(1)}catch(dn){throw dn instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":dn}ce=Q.length-1}try{Q.set(ce,W)}catch(dn){if(!(dn instanceof TypeError))throw dn;if(typeof WebAssembly.Function=="function"){Ee=WebAssembly.Function,Be={i:"i32",j:"i64",f:"f32",d:"f64",p:"i32"};for(var it={parameters:[],results:te[0]=="v"?[]:[Be[te[0]]]},dt=1;dt<te.length;++dt)it.parameters.push(Be[te[dt]]);te=new Ee(it,W)}else{for(Ee=[1,96],Be=te.slice(0,1),te=te.slice(1),it={i:127,p:127,j:126,f:125,d:124},dt=te.length,128>dt?Ee.push(dt):Ee.push(dt%128|128,dt>>7),dt=0;dt<te.length;++dt)Ee.push(it[te[dt]]);Be=="v"?Ee.push(0):Ee.push(1,it[Be]),te=[0,97,115,109,1,0,0,0,1],Be=Ee.length,128>Be?te.push(Be):te.push(Be%128|128,Be>>7),te.push.apply(te,Ee),te.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),te=new WebAssembly.Module(new Uint8Array(te)),te=new WebAssembly.Instance(te,{e:{f:W}}).exports.f}Q.set(ce,te)}return _c.set(W,ce),ce}function Ob(W){_c.delete(Q.get(W)),sS.push(W)}var F4=0,j4=1;function uS(W){var te=F4==j4?fd(W.length):Fb(W.length);return W.subarray||W.slice||(W=new Uint8Array(W)),_.set(W,te),te}function P4(W,te,ce,Ee){var Be={string:ri=>{var Oo=0;if(ri!=null&&ri!==0){var vp=(ri.length<<2)+1;Oo=fd(vp),M(ri,_,Oo,vp)}return Oo},array:ri=>{var Oo=fd(ri.length);return P.set(ri,Oo),Oo}};W=a["_"+W];var it=[],dt=0;if(Ee)for(var dn=0;dn<Ee.length;dn++){var Di=Be[ce[dn]];Di?(dt===0&&(dt=jb()),it[dn]=Di(Ee[dn])):it[dn]=Ee[dn]}return ce=W.apply(null,it),ce=function(ri){return dt!==0&&Pb(dt),te==="string"?k(ri):te==="boolean"?!!ri:ri}(ce)}function _4(W,te,ce,Ee){W||(W=this),this.parent=W,this.Ra=W.Ra,this.Va=null,this.id=K++,this.name=te,this.mode=ce,this.Ga={},this.Ha={},this.rdev=Ee}Object.defineProperties(_4.prototype,{read:{get:function(){return(this.mode&365)===365},set:function(W){W?this.mode|=365:this.mode&=-366}},write:{get:function(){return(this.mode&146)===146},set:function(W){W?this.mode|=146:this.mode&=-147}}}),Cb(),me=Array(4096),gp($e,"/"),gf("/tmp"),gf("/home"),gf("/home/web_user"),(()=>{gf("/dev"),Ru(259,{read:()=>0,write:(te,ce,Ee,Be)=>Be}),_A("/dev/null",259),ve(1280,Te),ve(1536,Ie),_A("/dev/tty",1280),_A("/dev/tty1",1536);var W=Le();Yo("random",W),Yo("urandom",W),gf("/dev/shm"),gf("/dev/shm/tmp")})(),(()=>{gf("/proc");var W=gf("/proc/self");gf("/proc/self/fd"),gp({Ra:()=>{var te=br(W,"fd",16895,73);return te.Ga={lookup:(ce,Ee)=>{var Be=We[+Ee];if(!Be)throw new Ce(8);return ce={parent:null,Ra:{ub:"fake"},Ga:{readlink:()=>Be.path}},ce.parent=ce}},te}},"/proc/self/fd")})();var sW={a:function(W,te,ce,Ee){ue("Assertion failed: "+k(W)+", at: "+[te?k(te):"unknown filename",ce,Ee?k(Ee):"unknown function"])},h:function(W,te){try{return W=k(W),Nm(W,te),0}catch(ce){if(typeof Ci>"u"||!(ce instanceof Ce))throw ce;return-ce.Ka}},H:function(W,te,ce){try{if(te=k(te),te=Mm(W,te),ce&-8)return-28;var Ee=gt(te,{Sa:!0}).node;return Ee?(W="",ce&4&&(W+="r"),ce&2&&(W+="w"),ce&1&&(W+="x"),W&&nn(Ee,W)?-2:0):-44}catch(Be){if(typeof Ci>"u"||!(Be instanceof Ce))throw Be;return-Be.Ka}},i:function(W,te){try{var ce=We[W];if(!ce)throw new Ce(8);return Nm(ce.node,te),0}catch(Ee){if(typeof Ci>"u"||!(Ee instanceof Ce))throw Ee;return-Ee.Ka}},g:function(W){try{var te=We[W];if(!te)throw new Ce(8);var ce=te.node,Ee=typeof ce=="string"?gt(ce,{Sa:!0}).node:ce;if(!Ee.Ga.Oa)throw new Ce(63);return Ee.Ga.Oa(Ee,{timestamp:Date.now()}),0}catch(Be){if(typeof Ci>"u"||!(Be instanceof Ce))throw Be;return-Be.Ka}},b:function(W,te,ce){Tb=ce;try{var Ee=vf(W);switch(te){case 0:var Be=LA();return 0>Be?-28:hp(Ee,Be).fd;case 1:case 2:return 0;case 3:return Ee.flags;case 4:return Be=LA(),Ee.flags|=Be,0;case 5:return Be=LA(),B[Be+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return F[I4()>>2]=28,-1;default:return-28}}catch(it){if(typeof Ci>"u"||!(it instanceof Ce))throw it;return-it.Ka}},G:function(W,te){try{var ce=vf(W);return iS(IA,ce.path,te)}catch(Ee){if(typeof Ci>"u"||!(Ee instanceof Ce))throw Ee;return-Ee.Ka}},l:function(W,te,ce){try{if(te=ce+2097152>>>0<4194305-!!te?(te>>>0)+4294967296*ce:NaN,isNaN(te))return-61;var Ee=We[W];if(!Ee)throw new Ce(8);if((Ee.flags&2097155)===0)throw new Ce(28);return eS(Ee.node,te),0}catch(Be){if(typeof Ci>"u"||!(Be instanceof Ce))throw Be;return-Be.Ka}},B:function(W,te){try{if(te===0)return-28;var ce=E("/")+1;return te<ce?-68:(M("/",_,W,te),ce)}catch(Ee){if(typeof Ci>"u"||!(Ee instanceof Ce))throw Ee;return-Ee.Ka}},E:function(W,te){try{return W=k(W),iS(Z2,W,te)}catch(ce){if(typeof Ci>"u"||!(ce instanceof Ce))throw ce;return-ce.Ka}},y:function(W,te,ce){try{return te=k(te),te=Mm(W,te),te=fe(te),te[te.length-1]==="/"&&(te=te.substr(0,te.length-1)),gf(te,ce),0}catch(Ee){if(typeof Ci>"u"||!(Ee instanceof Ce))throw Ee;return-Ee.Ka}},D:function(W,te,ce,Ee){try{te=k(te);var Be=Ee&256;return te=Mm(W,te,Ee&4096),iS(Be?Z2:IA,te,ce)}catch(it){if(typeof Ci>"u"||!(it instanceof Ce))throw it;return-it.Ka}},v:function(W,te,ce,Ee){Tb=Ee;try{te=k(te),te=Mm(W,te);var Be=Ee?LA():0;return cd(te,ce,Be).fd}catch(it){if(typeof Ci>"u"||!(it instanceof Ce))throw it;return-it.Ka}},t:function(W,te,ce,Ee){try{if(te=k(te),te=Mm(W,te),0>=Ee)return-28;var Be=J2(te),it=Math.min(Ee,E(Be)),dt=P[ce+it];return M(Be,_,ce,Ee+1),P[ce+it]=dt,it}catch(dn){if(typeof Ci>"u"||!(dn instanceof Ce))throw dn;return-dn.Ka}},s:function(W){try{return W=k(W),X2(W),0}catch(te){if(typeof Ci>"u"||!(te instanceof Ce))throw te;return-te.Ka}},F:function(W,te){try{return W=k(W),iS(IA,W,te)}catch(ce){if(typeof Ci>"u"||!(ce instanceof Ce))throw ce;return-ce.Ka}},p:function(W,te,ce){try{return te=k(te),te=Mm(W,te),ce===0?K2(te):ce===512?X2(te):ue("Invalid flags passed to unlinkat"),0}catch(Ee){if(typeof Ci>"u"||!(Ee instanceof Ce))throw Ee;return-Ee.Ka}},o:function(W,te,ce){try{if(te=k(te),te=Mm(W,te,!0),ce){var Ee=XD(ce),Be=F[ce+8>>2];it=1e3*Ee+Be/1e6,ce+=16,Ee=XD(ce),Be=F[ce+8>>2],dt=1e3*Ee+Be/1e6}else var it=Date.now(),dt=it;W=it;var dn=gt(te,{Sa:!0}).node;return dn.Ga.Oa(dn,{timestamp:Math.max(W,dt)}),0}catch(Di){if(typeof Ci>"u"||!(Di instanceof Ce))throw Di;return-Di.Ka}},e:function(){return Date.now()},j:function(W,te){W=new Date(1e3*XD(W)),F[te>>2]=W.getSeconds(),F[te+4>>2]=W.getMinutes(),F[te+8>>2]=W.getHours(),F[te+12>>2]=W.getDate(),F[te+16>>2]=W.getMonth(),F[te+20>>2]=W.getFullYear()-1900,F[te+24>>2]=W.getDay();var ce=new Date(W.getFullYear(),0,1);F[te+28>>2]=(W.getTime()-ce.getTime())/864e5|0,F[te+36>>2]=-(60*W.getTimezoneOffset());var Ee=new Date(W.getFullYear(),6,1).getTimezoneOffset();ce=ce.getTimezoneOffset(),F[te+32>>2]=(Ee!=ce&&W.getTimezoneOffset()==Math.min(ce,Ee))|0},w:function(W,te,ce,Ee,Be,it){try{var dt=vf(Ee);if((te&2)!==0&&(ce&2)===0&&(dt.flags&2097155)!==2)throw new Ce(2);if((dt.flags&2097155)===1)throw new Ce(2);if(!dt.Ha.bb)throw new Ce(43);var dn=dt.Ha.bb(dt,W,Be,te,ce),Di=dn.Fb;return F[it>>2]=dn.vb,Di}catch(ri){if(typeof Ci>"u"||!(ri instanceof Ce))throw ri;return-ri.Ka}},x:function(W,te,ce,Ee,Be,it){try{var dt=vf(Be);if(ce&2){var dn=_.slice(W,W+te);dt&&dt.Ha.cb&&dt.Ha.cb(dt,dn,it,te,Ee)}}catch(Di){if(typeof Ci>"u"||!(Di instanceof Ce))throw Di;return-Di.Ka}},n:Nb,q:function(){return 2147483648},d:O4,c:function(W){var te=_.length;if(W>>>=0,2147483648<W)return!1;for(var ce=1;4>=ce;ce*=2){var Ee=te*(1+.2/ce);Ee=Math.min(Ee,W+100663296);var Be=Math;Ee=Math.max(W,Ee),Be=Be.min.call(Be,2147483648,Ee+(65536-Ee%65536)%65536);e:{try{y.grow(Be-O.byteLength+65535>>>16),J();var it=1;break e}catch{}it=void 0}if(it)return!0}return!1},z:function(W,te){var ce=0;return oS().forEach(function(Ee,Be){var it=te+ce;for(Be=L[W+4*Be>>2]=it,it=0;it<Ee.length;++it)P[Be++>>0]=Ee.charCodeAt(it);P[Be>>0]=0,ce+=Ee.length+1}),0},A:function(W,te){var ce=oS();L[W>>2]=ce.length;var Ee=0;return ce.forEach(function(Be){Ee+=Be.length+1}),L[te>>2]=Ee,0},f:function(W){try{var te=vf(W);return Eb(te),0}catch(ce){if(typeof Ci>"u"||!(ce instanceof Ce))throw ce;return ce.Ka}},m:function(W,te){try{var ce=vf(W);return P[te>>0]=ce.tty?2:(ce.mode&61440)===16384?3:(ce.mode&61440)===40960?7:4,0}catch(Ee){if(typeof Ci>"u"||!(Ee instanceof Ce))throw Ee;return Ee.Ka}},u:function(W,te,ce,Ee){try{e:{var Be=vf(W);W=te;for(var it=te=0;it<ce;it++){var dt=L[W>>2],dn=L[W+4>>2];W+=8;var Di=rS(Be,P,dt,dn);if(0>Di){var ri=-1;break e}if(te+=Di,Di<dn)break}ri=te}return L[Ee>>2]=ri,0}catch(Oo){if(typeof Ci>"u"||!(Oo instanceof Ce))throw Oo;return Oo.Ka}},k:function(W,te,ce,Ee,Be){try{if(te=ce+2097152>>>0<4194305-!!te?(te>>>0)+4294967296*ce:NaN,isNaN(te))return 61;var it=vf(W);return tS(it,te,Ee),V=[it.position>>>0,(U=it.position,1<=+Math.abs(U)?0<U?(Math.min(+Math.floor(U/4294967296),4294967295)|0)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],F[Be>>2]=V[0],F[Be+4>>2]=V[1],it.hb&&te===0&&Ee===0&&(it.hb=null),0}catch(dt){if(typeof Ci>"u"||!(dt instanceof Ce))throw dt;return dt.Ka}},C:function(W){try{var te=vf(W);return te.Ha&&te.Ha.fsync?te.Ha.fsync(te):0}catch(ce){if(typeof Ci>"u"||!(ce instanceof Ce))throw ce;return ce.Ka}},r:function(W,te,ce,Ee){try{e:{var Be=vf(W);W=te;for(var it=te=0;it<ce;it++){var dt=L[W>>2],dn=L[W+4>>2];W+=8;var Di=kb(Be,P,dt,dn);if(0>Di){var ri=-1;break e}te+=Di}ri=te}return L[Ee>>2]=ri,0}catch(Oo){if(typeof Ci>"u"||!(Oo instanceof Ce))throw Oo;return Oo.Ka}}};(function(){function W(Be){a.asm=Be.exports,y=a.asm.I,J(),Q=a.asm.Aa,ie.unshift(a.asm.J),pe--,a.monitorRunDependencies&&a.monitorRunDependencies(pe),pe==0&&(ae!==null&&(clearInterval(ae),ae=null),oe&&(Be=oe,oe=null,Be()))}function te(Be){W(Be.instance)}function ce(Be){return z().then(function(it){return WebAssembly.instantiate(it,Ee)}).then(function(it){return it}).then(Be,function(it){g("failed to asynchronously prepare wasm: "+it),ue(it)})}var Ee={a:sW};if(pe++,a.monitorRunDependencies&&a.monitorRunDependencies(pe),a.instantiateWasm)try{return a.instantiateWasm(Ee,W)}catch(Be){return g("Module.instantiateWasm callback failed with error: "+Be),!1}return function(){return w||typeof WebAssembly.instantiateStreaming!="function"||Se()||H.startsWith("file://")||c||typeof fetch!="function"?ce(te):fetch(H,{credentials:"same-origin"}).then(function(Be){return WebAssembly.instantiateStreaming(Be,Ee).then(te,function(it){return g("wasm streaming compile failed: "+it),g("falling back to ArrayBuffer instantiation"),ce(te)})})}(),{}})(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.J).apply(null,arguments)},a._sqlite3_free=function(){return(a._sqlite3_free=a.asm.K).apply(null,arguments)},a._sqlite3_value_double=function(){return(a._sqlite3_value_double=a.asm.L).apply(null,arguments)},a._sqlite3_value_text=function(){return(a._sqlite3_value_text=a.asm.M).apply(null,arguments)};var I4=a.___errno_location=function(){return(I4=a.___errno_location=a.asm.N).apply(null,arguments)};a._sqlite3_prepare_v2=function(){return(a._sqlite3_prepare_v2=a.asm.O).apply(null,arguments)},a._sqlite3_step=function(){return(a._sqlite3_step=a.asm.P).apply(null,arguments)},a._sqlite3_finalize=function(){return(a._sqlite3_finalize=a.asm.Q).apply(null,arguments)},a._sqlite3_reset=function(){return(a._sqlite3_reset=a.asm.R).apply(null,arguments)},a._sqlite3_value_int=function(){return(a._sqlite3_value_int=a.asm.S).apply(null,arguments)},a._sqlite3_clear_bindings=function(){return(a._sqlite3_clear_bindings=a.asm.T).apply(null,arguments)},a._sqlite3_value_blob=function(){return(a._sqlite3_value_blob=a.asm.U).apply(null,arguments)},a._sqlite3_value_bytes=function(){return(a._sqlite3_value_bytes=a.asm.V).apply(null,arguments)},a._sqlite3_value_type=function(){return(a._sqlite3_value_type=a.asm.W).apply(null,arguments)},a._sqlite3_result_blob=function(){return(a._sqlite3_result_blob=a.asm.X).apply(null,arguments)},a._sqlite3_result_double=function(){return(a._sqlite3_result_double=a.asm.Y).apply(null,arguments)},a._sqlite3_result_error=function(){return(a._sqlite3_result_error=a.asm.Z).apply(null,arguments)},a._sqlite3_result_int=function(){return(a._sqlite3_result_int=a.asm._).apply(null,arguments)},a._sqlite3_result_int64=function(){return(a._sqlite3_result_int64=a.asm.$).apply(null,arguments)},a._sqlite3_result_null=function(){return(a._sqlite3_result_null=a.asm.aa).apply(null,arguments)},a._sqlite3_result_text=function(){return(a._sqlite3_result_text=a.asm.ba).apply(null,arguments)},a._sqlite3_sql=function(){return(a._sqlite3_sql=a.asm.ca).apply(null,arguments)},a._sqlite3_aggregate_context=function(){return(a._sqlite3_aggregate_context=a.asm.da).apply(null,arguments)},a._sqlite3_column_count=function(){return(a._sqlite3_column_count=a.asm.ea).apply(null,arguments)},a._sqlite3_data_count=function(){return(a._sqlite3_data_count=a.asm.fa).apply(null,arguments)},a._sqlite3_column_blob=function(){return(a._sqlite3_column_blob=a.asm.ga).apply(null,arguments)},a._sqlite3_column_bytes=function(){return(a._sqlite3_column_bytes=a.asm.ha).apply(null,arguments)},a._sqlite3_column_double=function(){return(a._sqlite3_column_double=a.asm.ia).apply(null,arguments)},a._sqlite3_column_text=function(){return(a._sqlite3_column_text=a.asm.ja).apply(null,arguments)},a._sqlite3_column_type=function(){return(a._sqlite3_column_type=a.asm.ka).apply(null,arguments)},a._sqlite3_column_name=function(){return(a._sqlite3_column_name=a.asm.la).apply(null,arguments)},a._sqlite3_bind_blob=function(){return(a._sqlite3_bind_blob=a.asm.ma).apply(null,arguments)},a._sqlite3_bind_double=function(){return(a._sqlite3_bind_double=a.asm.na).apply(null,arguments)},a._sqlite3_bind_int=function(){return(a._sqlite3_bind_int=a.asm.oa).apply(null,arguments)},a._sqlite3_bind_text=function(){return(a._sqlite3_bind_text=a.asm.pa).apply(null,arguments)},a._sqlite3_bind_parameter_index=function(){return(a._sqlite3_bind_parameter_index=a.asm.qa).apply(null,arguments)},a._sqlite3_normalized_sql=function(){return(a._sqlite3_normalized_sql=a.asm.ra).apply(null,arguments)},a._sqlite3_errmsg=function(){return(a._sqlite3_errmsg=a.asm.sa).apply(null,arguments)},a._sqlite3_exec=function(){return(a._sqlite3_exec=a.asm.ta).apply(null,arguments)},a._sqlite3_changes=function(){return(a._sqlite3_changes=a.asm.ua).apply(null,arguments)},a._sqlite3_close_v2=function(){return(a._sqlite3_close_v2=a.asm.va).apply(null,arguments)},a._sqlite3_create_function_v2=function(){return(a._sqlite3_create_function_v2=a.asm.wa).apply(null,arguments)},a._sqlite3_open=function(){return(a._sqlite3_open=a.asm.xa).apply(null,arguments)};var Fb=a._malloc=function(){return(Fb=a._malloc=a.asm.ya).apply(null,arguments)},cS=a._free=function(){return(cS=a._free=a.asm.za).apply(null,arguments)};a._RegisterExtensionFunctions=function(){return(a._RegisterExtensionFunctions=a.asm.Ba).apply(null,arguments)};var B4=a._emscripten_builtin_memalign=function(){return(B4=a._emscripten_builtin_memalign=a.asm.Ca).apply(null,arguments)},jb=a.stackSave=function(){return(jb=a.stackSave=a.asm.Da).apply(null,arguments)},Pb=a.stackRestore=function(){return(Pb=a.stackRestore=a.asm.Ea).apply(null,arguments)},fd=a.stackAlloc=function(){return(fd=a.stackAlloc=a.asm.Fa).apply(null,arguments)};a.UTF8ToString=k,a.stackAlloc=fd,a.stackSave=jb,a.stackRestore=Pb,a.cwrap=function(W,te,ce,Ee){ce=ce||[];var Be=ce.every(it=>it==="number"||it==="boolean");return te!=="string"&&Be&&!Ee?a["_"+W]:function(){return P4(W,te,ce,arguments)}};var fS;oe=function W(){fS||L4(),fS||(oe=W)};function L4(){function W(){if(!fS&&(fS=!0,a.calledRun=!0,!S)){if(a.noFSInit||Vh||(Vh=!0,Cb(),a.stdin=a.stdin,a.stdout=a.stdout,a.stderr=a.stderr,a.stdin?Yo("stdin",a.stdin):Sb("/dev/tty","/dev/stdin"),a.stdout?Yo("stdout",null,a.stdout):Sb("/dev/tty","/dev/stdout"),a.stderr?Yo("stderr",null,a.stderr):Sb("/dev/tty1","/dev/stderr"),cd("/dev/stdin",0),cd("/dev/stdout",1),cd("/dev/stderr",1)),Fe=!1,Y(ie),a.onRuntimeInitialized&&a.onRuntimeInitialized(),a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;){var te=a.postRun.shift();Ae.unshift(te)}Y(Ae)}}if(!(0<pe)){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)le();Y(q),0<pe||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),W()},1)):W())}}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();return L4(),n}),cG)};typeof dG=="object"&&typeof z2=="object"?(z2.exports=fG,z2.exports.default=fG):typeof define=="function"&&define.amd?define([],function(){return fG}):typeof dG=="object"&&(dG.Module=fG)});var m$e=Wn((p$e,Ole)=>{(function(e){if(typeof p$e=="object"&&typeof Ole<"u")Ole.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.pica=e()}})(function(){var e,t,r;return function(){function n(i,a,o){function s(c,f){if(!a[c]){if(!i[c]){var d=typeof require=="function"&&require;if(!f&&d)return d(c,!0);if(l)return l(c,!0);var p=new Error("Cannot find module '"+c+"'");throw p.code="MODULE_NOT_FOUND",p}var h=a[c]={exports:{}};i[c][0].call(h.exports,function(m){var v=i[c][1][m];return s(v||m)},h,h.exports,n,i,a,o)}return a[c].exports}for(var l=typeof require=="function"&&require,u=0;u<o.length;u++)s(o[u]);return s}return n}()({1:[function(n,i,a){"use strict";var o=n("multimath"),s=n("./mm_unsharp_mask"),l=n("./mm_resize");function u(c){var f=c||[],d={js:f.indexOf("js")>=0,wasm:f.indexOf("wasm")>=0};o.call(this,d),this.features={js:d.js,wasm:d.wasm&&this.has_wasm()},this.use(s),this.use(l)}u.prototype=Object.create(o.prototype),u.prototype.constructor=u,u.prototype.resizeAndUnsharp=function(f,d){var p=this.resize(f,d);return f.unsharpAmount&&this.unsharp_mask(p,f.toWidth,f.toHeight,f.unsharpAmount,f.unsharpRadius,f.unsharpThreshold),p},i.exports=u},{"./mm_resize":4,"./mm_unsharp_mask":9,multimath:19}],2:[function(n,i,a){"use strict";function o(d){return d<0?0:d>255?255:d}function s(d){return d>=0?d:0}function l(d,p,h,m,v,A){var x,g,w,b,y,S,T,D,k,M,E,O=0,P=0;for(k=0;k<m;k++){for(y=0,M=0;M<v;M++){for(S=A[y++],T=A[y++],D=O+S*4|0,x=g=w=b=0;T>0;T--)E=A[y++],b=b+E*d[D+3]|0,w=w+E*d[D+2]|0,g=g+E*d[D+1]|0,x=x+E*d[D]|0,D=D+4|0;p[P+3]=s(b>>7),p[P+2]=s(w>>7),p[P+1]=s(g>>7),p[P]=s(x>>7),P=P+m*4|0}P=(k+1)*4|0,O=(k+1)*h*4|0}}function u(d,p,h,m,v,A){var x,g,w,b,y,S,T,D,k,M,E,O=0,P=0;for(k=0;k<m;k++){for(y=0,M=0;M<v;M++){for(S=A[y++],T=A[y++],D=O+S*4|0,x=g=w=b=0;T>0;T--)E=A[y++],b=b+E*d[D+3]|0,w=w+E*d[D+2]|0,g=g+E*d[D+1]|0,x=x+E*d[D]|0,D=D+4|0;x>>=7,g>>=7,w>>=7,b>>=7,p[P+3]=o(b+(1<<13)>>14),p[P+2]=o(w+(1<<13)>>14),p[P+1]=o(g+(1<<13)>>14),p[P]=o(x+(1<<13)>>14),P=P+m*4|0}P=(k+1)*4|0,O=(k+1)*h*4|0}}function c(d,p,h,m,v,A){var x,g,w,b,y,S,T,D,k,M,E,O,P=0,_=0;for(M=0;M<m;M++){for(S=0,E=0;E<v;E++){for(T=A[S++],D=A[S++],k=P+T*4|0,x=g=w=b=0;D>0;D--)O=A[S++],y=d[k+3],b=b+O*y|0,w=w+O*d[k+2]*y|0,g=g+O*d[k+1]*y|0,x=x+O*d[k]*y|0,k=k+4|0;w=w/255|0,g=g/255|0,x=x/255|0,p[_+3]=s(b>>7),p[_+2]=s(w>>7),p[_+1]=s(g>>7),p[_]=s(x>>7),_=_+m*4|0}_=(M+1)*4|0,P=(M+1)*h*4|0}}function f(d,p,h,m,v,A){var x,g,w,b,y,S,T,D,k,M,E,O=0,P=0;for(k=0;k<m;k++){for(y=0,M=0;M<v;M++){for(S=A[y++],T=A[y++],D=O+S*4|0,x=g=w=b=0;T>0;T--)E=A[y++],b=b+E*d[D+3]|0,w=w+E*d[D+2]|0,g=g+E*d[D+1]|0,x=x+E*d[D]|0,D=D+4|0;x>>=7,g>>=7,w>>=7,b>>=7,b=o(b+(1<<13)>>14),b>0&&(x=x*255/b|0,g=g*255/b|0,w=w*255/b|0),p[P+3]=b,p[P+2]=o(w+(1<<13)>>14),p[P+1]=o(g+(1<<13)>>14),p[P]=o(x+(1<<13)>>14),P=P+m*4|0}P=(k+1)*4|0,O=(k+1)*h*4|0}}i.exports={convolveHor:l,convolveVert:u,convolveHorWithPre:c,convolveVertWithPre:f}},{}],3:[function(n,i,a){"use strict";i.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEYA2AGf39/f39/AGAAAGAIf39/f39/f38AAg8BA2VudgZtZW1vcnkCAAADBwYBAAAAAAIGBgF/AEEACweUAQgRX193YXNtX2NhbGxfY3RvcnMAAAtjb252b2x2ZUhvcgABDGNvbnZvbHZlVmVydAACEmNvbnZvbHZlSG9yV2l0aFByZQADE2NvbnZvbHZlVmVydFdpdGhQcmUABApjb252b2x2ZUhWAAUMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAKyA4GAwABC4wDARB/AkAgA0UNACAERQ0AIANBAnQhFQNAQQAhE0EAIQsDQCALQQJqIQcCfyALQQF0IAVqIgYuAQIiC0UEQEEAIQhBACEGQQAhCUEAIQogBwwBCyASIAYuAQBqIQhBACEJQQAhCiALIRRBACEOIAchBkEAIQ8DQCAFIAZBAXRqLgEAIhAgACAIQQJ0aigCACIRQRh2bCAPaiEPIBFB/wFxIBBsIAlqIQkgEUEQdkH/AXEgEGwgDmohDiARQQh2Qf8BcSAQbCAKaiEKIAhBAWohCCAGQQFqIQYgFEEBayIUDQALIAlBB3UhCCAKQQd1IQYgDkEHdSEJIA9BB3UhCiAHIAtqCyELIAEgDEEBdCIHaiAIQQAgCEEAShs7AQAgASAHQQJyaiAGQQAgBkEAShs7AQAgASAHQQRyaiAJQQAgCUEAShs7AQAgASAHQQZyaiAKQQAgCkEAShs7AQAgDCAVaiEMIBNBAWoiEyAERw0ACyANQQFqIg0gAmwhEiANQQJ0IQwgAyANRw0ACwsL2gMBD38CQCADRQ0AIARFDQAgAkECdCEUA0AgCyEMQQAhE0EAIQIDQCACQQJqIQYCfyACQQF0IAVqIgcuAQIiAkUEQEEAIQhBACEHQQAhCkEAIQkgBgwBCyAHLgEAQQJ0IBJqIQhBACEJIAIhCkEAIQ0gBiEHQQAhDkEAIQ8DQCAFIAdBAXRqLgEAIhAgACAIQQF0IhFqLwEAbCAJaiEJIAAgEUEGcmovAQAgEGwgDmohDiAAIBFBBHJqLwEAIBBsIA9qIQ8gACARQQJyai8BACAQbCANaiENIAhBBGohCCAHQQFqIQcgCkEBayIKDQALIAlBB3UhCCANQQd1IQcgDkEHdSEKIA9BB3UhCSACIAZqCyECIAEgDEECdGogB0GAQGtBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobQQh0QYD+A3EgCUGAQGtBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobQRB0QYCA/AdxIApBgEBrQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBgEBrQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG3I2AgAgAyAMaiEMIBNBAWoiEyAERw0ACyAUIAtBAWoiC2whEiADIAtHDQALCwuSAwEQfwJAIANFDQAgBEUNACADQQJ0IRUDQEEAIRNBACEGA0AgBkECaiEIAn8gBkEBdCAFaiIGLgECIgdFBEBBACEJQQAhDEEAIQ1BACEOIAgMAQsgEiAGLgEAaiEJQQAhDkEAIQ1BACEMIAchFEEAIQ8gCCEGA0AgBSAGQQF0ai4BACAAIAlBAnRqKAIAIhBBGHZsIhEgD2ohDyARIBBBEHZB/wFxbCAMaiEMIBEgEEEIdkH/AXFsIA1qIQ0gESAQQf8BcWwgDmohDiAJQQFqIQkgBkEBaiEGIBRBAWsiFA0ACyAPQQd1IQkgByAIagshBiABIApBAXQiCGogDkH/AW1BB3UiB0EAIAdBAEobOwEAIAEgCEECcmogDUH/AW1BB3UiB0EAIAdBAEobOwEAIAEgCEEEcmogDEH/AW1BB3UiB0EAIAdBAEobOwEAIAEgCEEGcmogCUEAIAlBAEobOwEAIAogFWohCiATQQFqIhMgBEcNAAsgC0EBaiILIAJsIRIgC0ECdCEKIAMgC0cNAAsLC4IEAQ9/AkAgA0UNACAERQ0AIAJBAnQhFANAIAshDEEAIRJBACEHA0AgB0ECaiEKAn8gB0EBdCAFaiICLgECIhNFBEBBACEIQQAhCUEAIQYgCiEHQQAMAQsgAi4BAEECdCARaiEJQQAhByATIQJBACENIAohBkEAIQ5BACEPA0AgBSAGQQF0ai4BACIIIAAgCUEBdCIQai8BAGwgB2ohByAAIBBBBnJqLwEAIAhsIA5qIQ4gACAQQQRyai8BACAIbCAPaiEPIAAgEEECcmovAQAgCGwgDWohDSAJQQRqIQkgBkEBaiEGIAJBAWsiAg0ACyAHQQd1IQggDUEHdSEJIA9BB3UhBiAKIBNqIQcgDkEHdQtBgEBrQQ51IgJB/wEgAkH/AUgbIgJBACACQQBKGyIKQf8BcQRAIAlB/wFsIAJtIQkgCEH/AWwgAm0hCCAGQf8BbCACbSEGCyABIAxBAnRqIAlBgEBrQQ51IgJB/wEgAkH/AUgbIgJBACACQQBKG0EIdEGA/gNxIAZBgEBrQQ51IgJB/wEgAkH/AUgbIgJBACACQQBKG0EQdEGAgPwHcSAKQRh0ciAIQYBAa0EOdSICQf8BIAJB/wFIGyICQQAgAkEAShtycjYCACADIAxqIQwgEkEBaiISIARHDQALIBQgC0EBaiILbCERIAMgC0cNAAsLC0AAIAcEQEEAIAIgAyAEIAUgABADIAJBACAEIAUgBiABEAQPC0EAIAIgAyAEIAUgABABIAJBACAEIAUgBiABEAIL"},{}],4:[function(n,i,a){"use strict";i.exports={name:"resize",fn:n("./resize"),wasm_fn:n("./resize_wasm"),wasm_src:n("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(n,i,a){"use strict";var o=n("./resize_filter_gen"),s=n("./convolve"),l=s.convolveHor,u=s.convolveVert,c=s.convolveHorWithPre,f=s.convolveVertWithPre;function d(h,m,v){for(var A=3,x=m*v*4|0;A<x;){if(h[A]!==255)return!0;A=A+4|0}return!1}function p(h,m,v){for(var A=3,x=m*v*4|0;A<x;)h[A]=255,A=A+4|0}i.exports=function(m){var v=m.src,A=m.width,x=m.height,g=m.toWidth,w=m.toHeight,b=m.scaleX||m.toWidth/m.width,y=m.scaleY||m.toHeight/m.height,S=m.offsetX||0,T=m.offsetY||0,D=m.dest||new Uint8Array(g*w*4),k=typeof m.filter>"u"?"mks2013":m.filter,M=o(k,A,g,b,S),E=o(k,x,w,y,T),O=new Uint16Array(g*x*4);return d(v,A,x)?(c(v,O,A,x,g,M),f(O,D,x,g,w,E)):(l(v,O,A,x,g,M),u(O,D,x,g,w,E),p(D,g,w)),D}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(n,i,a){"use strict";var o=n("./resize_filter_info"),s=14;function l(u){return Math.round(u*((1<<s)-1))}i.exports=function(c,f,d,p,h){var m=o.filter[c].fn,v=1/p,A=Math.min(1,p),x=o.filter[c].win/A,g,w,b,y,S,T,D,k,M,E,O,P,_,B,F,L,I,R=Math.floor((x+1)*2),J=new Int16Array((R+2)*d),Q=0,q=!J.subarray||!J.set;for(g=0;g<d;g++){for(w=(g+.5)*v+h,b=Math.max(0,Math.floor(w-x)),y=Math.min(f-1,Math.ceil(w+x)),S=y-b+1,T=new Float32Array(S),D=new Int16Array(S),k=0,M=b,E=0;M<=y;M++,E++)O=m((M+.5-w)*A),k+=O,T[E]=O;for(P=0,E=0;E<T.length;E++)_=T[E]/k,P+=_,D[E]=l(_);for(D[d>>1]+=l(1-P),B=0;B<D.length&&D[B]===0;)B++;if(B<D.length){for(F=D.length-1;F>0&&D[F]===0;)F--;if(L=b+B,I=F-B+1,J[Q++]=L,J[Q++]=I,!q)J.set(D.subarray(B,F+1),Q),Q+=I;else for(E=B;E<=F;E++)J[Q++]=D[E]}else J[Q++]=0,J[Q++]=0}return J}},{"./resize_filter_info":7}],7:[function(n,i,a){"use strict";var o={box:{win:.5,fn:function(l){return l<0&&(l=-l),l<.5?1:0}},hamming:{win:1,fn:function(l){if(l<0&&(l=-l),l>=1)return 0;if(l<11920929e-14)return 1;var u=l*Math.PI;return Math.sin(u)/u*(.54+.46*Math.cos(u/1))}},lanczos2:{win:2,fn:function(l){if(l<0&&(l=-l),l>=2)return 0;if(l<11920929e-14)return 1;var u=l*Math.PI;return Math.sin(u)/u*Math.sin(u/2)/(u/2)}},lanczos3:{win:3,fn:function(l){if(l<0&&(l=-l),l>=3)return 0;if(l<11920929e-14)return 1;var u=l*Math.PI;return Math.sin(u)/u*Math.sin(u/3)/(u/3)}},mks2013:{win:2.5,fn:function(l){return l<0&&(l=-l),l>=2.5?0:l>=1.5?-.125*(l-2.5)*(l-2.5):l>=.5?.25*(4*l*l-11*l+7):1.0625-1.75*l*l}}};i.exports={filter:o,f2q:{box:0,hamming:1,lanczos2:2,lanczos3:3},q2f:["box","hamming","lanczos2","lanczos3"]}},{}],8:[function(n,i,a){"use strict";var o=n("./resize_filter_gen");function s(d,p,h){for(var m=3,v=p*h*4|0;m<v;){if(d[m]!==255)return!0;m=m+4|0}return!1}function l(d,p,h){for(var m=3,v=p*h*4|0;m<v;)d[m]=255,m=m+4|0}function u(d){return new Uint8Array(d.buffer,0,d.byteLength)}var c=!0;try{c=new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]===1}catch{}function f(d,p,h){if(c){p.set(u(d),h);return}for(var m=h,v=0;v<d.length;v++){var A=d[v];p[m++]=A&255,p[m++]=A>>8&255}}i.exports=function(p){var h=p.src,m=p.width,v=p.height,A=p.toWidth,x=p.toHeight,g=p.scaleX||p.toWidth/p.width,w=p.scaleY||p.toHeight/p.height,b=p.offsetX||0,y=p.offsetY||0,S=p.dest||new Uint8Array(A*x*4),T=typeof p.filter>"u"?"mks2013":p.filter,D=o(T,m,A,g,b),k=o(T,v,x,w,y),M=0,E=Math.max(h.byteLength,S.byteLength),O=this.__align(M+E),P=v*A*4*2,_=this.__align(O+P),B=this.__align(_+D.byteLength),F=B+k.byteLength,L=this.__instance("resize",F),I=new Uint8Array(this.__memory.buffer),R=new Uint32Array(this.__memory.buffer),J=new Uint32Array(h.buffer);R.set(J),f(D,I,_),f(k,I,B);var Q=L.exports.convolveHV||L.exports._convolveHV;s(h,m,v)?Q(_,B,O,m,v,A,x,1):(Q(_,B,O,m,v,A,x,0),l(S,A,x));var q=new Uint32Array(S.buffer);return q.set(new Uint32Array(this.__memory.buffer,0,x*A)),S}},{"./resize_filter_gen":6}],9:[function(n,i,a){"use strict";i.exports={name:"unsharp_mask",fn:n("./unsharp_mask"),wasm_fn:n("./unsharp_mask_wasm"),wasm_src:n("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":10,"./unsharp_mask_wasm":11,"./unsharp_mask_wasm_base64":12}],10:[function(n,i,a){"use strict";var o=n("glur/mono16");function s(l,u,c){for(var f=u*c,d=new Uint16Array(f),p,h,m,v,A=0;A<f;A++)p=l[4*A],h=l[4*A+1],m=l[4*A+2],v=p>=h&&p>=m?p:h>=m&&h>=p?h:m,d[A]=v<<8;return d}i.exports=function(u,c,f,d,p,h){var m,v,A,x,g;if(!(d===0||p<.5)){p>2&&(p=2);var w=s(u,c,f),b=new Uint16Array(w);o(b,c,f,p);for(var y=d/100*4096+.5|0,S=h<<8,T=c*f,D=0;D<T;D++)m=w[D],x=m-b[D],Math.abs(x)>=S&&(v=m+(y*x+2048>>12),v=v>65280?65280:v,v=v<0?0:v,m=m!==0?m:1,A=(v<<12)/m|0,g=D*4,u[g]=u[g]*A+2048>>12,u[g+1]=u[g+1]*A+2048>>12,u[g+2]=u[g+2]*A+2048>>12)}}},{"glur/mono16":18}],11:[function(n,i,a){"use strict";i.exports=function(s,l,u,c,f,d){if(!(c===0||f<.5)){f>2&&(f=2);var p=l*u,h=p*4,m=p*2,v=p*2,A=Math.max(l,u)*4,x=8*4,g=0,w=h,b=w+m,y=b+v,S=y+v,T=S+A,D=this.__instance("unsharp_mask",h+m+v*2+A+x,{exp:Math.exp}),k=new Uint32Array(s.buffer),M=new Uint32Array(this.__memory.buffer);M.set(k);var E=D.exports.hsv_v16||D.exports._hsv_v16;E(g,w,l,u),E=D.exports.blurMono16||D.exports._blurMono16,E(w,b,y,S,T,l,u,f),E=D.exports.unsharp||D.exports._unsharp,E(g,g,w,b,l,u,c,d),k.set(new Uint32Array(this.__memory.buffer,0,p))}}},{}],12:[function(n,i,a){"use strict";i.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAE0B2AAAGAEf39/fwBgBn9/f39/fwBgCH9/f39/f39/AGAIf39/f39/f30AYAJ9fwBgAXwBfAIZAgNlbnYDZXhwAAYDZW52Bm1lbW9yeQIAAAMHBgAFAgQBAwYGAX8AQQALB4oBCBFfX3dhc21fY2FsbF9jdG9ycwABFl9fYnVpbGRfZ2F1c3NpYW5fY29lZnMAAg5fX2dhdXNzMTZfbGluZQADCmJsdXJNb25vMTYABAdoc3ZfdjE2AAUHdW5zaGFycAAGDF9fZHNvX2hhbmRsZQMAGF9fd2FzbV9hcHBseV9kYXRhX3JlbG9jcwABCsUMBgMAAQvWAQEHfCABRNuGukOCGvs/IAC7oyICRAAAAAAAAADAohAAIgW2jDgCFCABIAKaEAAiAyADoCIGtjgCECABRAAAAAAAAPA/IAOhIgQgBKIgAyACIAKgokQAAAAAAADwP6AgBaGjIgS2OAIAIAEgBSAEmqIiB7Y4AgwgASADIAJEAAAAAAAA8D+gIASioiIItjgCCCABIAMgAkQAAAAAAADwv6AgBKKiIgK2OAIEIAEgByAIoCAFRAAAAAAAAPA/IAahoCIDo7Y4AhwgASAEIAKgIAOjtjgCGAuGBQMGfwl8An0gAyoCDCEVIAMqAgghFiADKgIUuyERIAMqAhC7IRACQCAEQQFrIghBAEgiCQRAIAIhByAAIQYMAQsgAiAALwEAuCIPIAMqAhi7oiIMIBGiIg0gDCAQoiAPIAMqAgS7IhOiIhQgAyoCALsiEiAPoqCgoCIOtjgCACACQQRqIQcgAEECaiEGIAhFDQAgCEEBIAhBAUgbIgpBf3MhCwJ/IAQgCmtBAXFFBEAgDiENIAgMAQsgAiANIA4gEKIgFCASIAAvAQK4Ig+ioKCgIg22OAIEIAJBCGohByAAQQRqIQYgDiEMIARBAmsLIQIgC0EAIARrRg0AA0AgByAMIBGiIA0gEKIgDyAToiASIAYvAQC4Ig6ioKCgIgy2OAIAIAcgDSARoiAMIBCiIA4gE6IgEiAGLwECuCIPoqCgoCINtjgCBCAHQQhqIQcgBkEEaiEGIAJBAkohACACQQJrIQIgAA0ACwsCQCAJDQAgASAFIAhsQQF0aiIAAn8gBkECay8BACICuCINIBW7IhKiIA0gFrsiE6KgIA0gAyoCHLuiIgwgEKKgIAwgEaKgIg8gB0EEayIHKgIAu6AiDkQAAAAAAADwQWMgDkQAAAAAAAAAAGZxBEAgDqsMAQtBAAs7AQAgCEUNACAGQQRrIQZBACAFa0EBdCEBA0ACfyANIBKiIAJB//8DcbgiDSAToqAgDyIOIBCioCAMIBGioCIPIAdBBGsiByoCALugIgxEAAAAAAAA8EFjIAxEAAAAAAAAAABmcQRAIAyrDAELQQALIQMgBi8BACECIAAgAWoiACADOwEAIAZBAmshBiAIQQFKIQMgDiEMIAhBAWshCCADDQALCwvRAgIBfwd8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIglEAAAAAAAAAMCiEAAiDLaMOAIUIAQgCZoQACIKIAqgIg22OAIQIAREAAAAAAAA8D8gCqEiCyALoiAKIAkgCaCiRAAAAAAAAPA/oCAMoaMiC7Y4AgAgBCAMIAuaoiIOtjgCDCAEIAogCUQAAAAAAADwP6AgC6KiIg+2OAIIIAQgCiAJRAAAAAAAAPC/oCALoqIiCbY4AgQgBCAOIA+gIAxEAAAAAAAA8D8gDaGgIgqjtjgCHCAEIAsgCaAgCqO2OAIYIAYEQANAIAAgBSAIbEEBdGogAiAIQQF0aiADIAQgBSAGEAMgCEEBaiIIIAZHDQALCyAFRQ0AQQAhCANAIAIgBiAIbEEBdGogASAIQQF0aiADIAQgBiAFEAMgCEEBaiIIIAVHDQALCwtxAQN/IAIgA2wiBQRAA0AgASAAKAIAIgRBEHZB/wFxIgIgAiAEQQh2Qf8BcSIDIAMgBEH/AXEiBEkbIAIgA0sbIgYgBiAEIAIgBEsbIAMgBEsbQQh0OwEAIAFBAmohASAAQQRqIQAgBUEBayIFDQALCwuZAgIDfwF8IAQgBWwhBAJ/IAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6AiC5lEAAAAAAAA4EFjBEAgC6oMAQtBgICAgHgLIQUgBARAIAdBCHQhCUEAIQYDQCAJIAIgBkEBdCIHai8BACIBIAMgB2ovAQBrIgcgB0EfdSIIaiAIc00EQCAAIAZBAnQiCGoiCiAFIAdsQYAQakEMdSABaiIHQYD+AyAHQYD+A0gbIgdBACAHQQBKG0EMdCABQQEgARtuIgEgCi0AAGxBgBBqQQx2OgAAIAAgCEEBcmoiByABIActAABsQYAQakEMdjoAACAAIAhBAnJqIgcgASAHLQAAbEGAEGpBDHY6AAALIAZBAWoiBiAERw0ACwsL"},{}],13:[function(n,i,a){"use strict";var o=100;function s(l,u){this.create=l,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=u||2e3}s.prototype.acquire=function(){var l=this,u;return this.available.length!==0?u=this.available.pop():(u=this.create(),u.id=this.lastId++,u.release=function(){return l.release(u)}),this.acquired[u.id]=u,u},s.prototype.release=function(l){var u=this;delete this.acquired[l.id],l.lastUsed=Date.now(),this.available.push(l),this.timeoutId===0&&(this.timeoutId=setTimeout(function(){return u.gc()},o))},s.prototype.gc=function(){var l=this,u=Date.now();this.available=this.available.filter(function(c){return u-c.lastUsed>l.idle?(c.destroy(),!1):!0}),this.available.length!==0?this.timeoutId=setTimeout(function(){return l.gc()},o):this.timeoutId=0},i.exports=s},{}],14:[function(n,i,a){"use strict";var o=2;i.exports=function(l,u,c,f,d,p){var h=c/l,m=f/u,v=(2*p+o+1)/d;if(v>.5)return[[c,f]];var A=Math.ceil(Math.log(Math.min(h,m))/Math.log(v));if(A<=1)return[[c,f]];for(var x=[],g=0;g<A;g++){var w=Math.round(Math.pow(Math.pow(l,A-g-1)*Math.pow(c,g+1),1/A)),b=Math.round(Math.pow(Math.pow(u,A-g-1)*Math.pow(f,g+1),1/A));x.push([w,b])}return x}},{}],15:[function(n,i,a){"use strict";var o=1e-5;function s(u){var c=Math.round(u);return Math.abs(u-c)<o?c:Math.floor(u)}function l(u){var c=Math.round(u);return Math.abs(u-c)<o?c:Math.ceil(u)}i.exports=function(c){var f=c.toWidth/c.width,d=c.toHeight/c.height,p=s(c.srcTileSize*f)-2*c.destTileBorder,h=s(c.srcTileSize*d)-2*c.destTileBorder;if(p<1||h<1)throw new Error("Internal error in pica: target tile width/height is too small.");var m,v,A,x,g,w,b=[],y;for(x=0;x<c.toHeight;x+=h)for(A=0;A<c.toWidth;A+=p)m=A-c.destTileBorder,m<0&&(m=0),g=A+p+c.destTileBorder-m,m+g>=c.toWidth&&(g=c.toWidth-m),v=x-c.destTileBorder,v<0&&(v=0),w=x+h+c.destTileBorder-v,v+w>=c.toHeight&&(w=c.toHeight-v),y={toX:m,toY:v,toWidth:g,toHeight:w,toInnerX:A,toInnerY:x,toInnerWidth:p,toInnerHeight:h,offsetX:m/f-s(m/f),offsetY:v/d-s(v/d),scaleX:f,scaleY:d,x:s(m/f),y:s(v/d),width:l(g/f),height:l(w/d)},b.push(y);return b}},{}],16:[function(n,i,a){"use strict";function o(s){return Object.prototype.toString.call(s)}i.exports.isCanvas=function(l){var u=o(l);return u==="[object HTMLCanvasElement]"||u==="[object OffscreenCanvas]"||u==="[object Canvas]"},i.exports.isImage=function(l){return o(l)==="[object HTMLImageElement]"},i.exports.isImageBitmap=function(l){return o(l)==="[object ImageBitmap]"},i.exports.limiter=function(l){var u=0,c=[];function f(){u<l&&c.length&&(u++,c.shift()())}return function(p){return new Promise(function(h,m){c.push(function(){p().then(function(v){h(v),u--,f()},function(v){m(v),u--,f()})}),f()})}},i.exports.cib_quality_name=function(l){switch(l){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},i.exports.cib_support=function(l){return Promise.resolve().then(function(){if(typeof createImageBitmap>"u")return!1;var u=l(100,100);return createImageBitmap(u,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then(function(c){var f=c.width===10;return c.close(),u=null,f})}).catch(function(){return!1})},i.exports.worker_offscreen_canvas_support=function(){return new Promise(function(l,u){if(typeof OffscreenCanvas>"u"){l(!1);return}function c(p){if(typeof createImageBitmap>"u"){p.postMessage(!1);return}Promise.resolve().then(function(){var h=new OffscreenCanvas(10,10),m=h.getContext("2d");return m.rect(0,0,1,1),createImageBitmap(h,0,0,1,1)}).then(function(){return p.postMessage(!0)},function(){return p.postMessage(!1)})}var f=btoa("(".concat(c.toString(),")(self);")),d=new Worker("data:text/javascript;base64,".concat(f));d.onmessage=function(p){return l(p.data)},d.onerror=u}).then(function(l){return l},function(){return!1})},i.exports.can_use_canvas=function(l){var u=!1;try{var c=l(2,1),f=c.getContext("2d"),d=f.createImageData(2,1);d.data[0]=12,d.data[1]=23,d.data[2]=34,d.data[3]=255,d.data[4]=45,d.data[5]=56,d.data[6]=67,d.data[7]=255,f.putImageData(d,0,0),d=null,d=f.getImageData(0,0,2,1),d.data[0]===12&&d.data[1]===23&&d.data[2]===34&&d.data[3]===255&&d.data[4]===45&&d.data[5]===56&&d.data[6]===67&&d.data[7]===255&&(u=!0)}catch{}return u},i.exports.cib_can_use_region=function(){return new Promise(function(l){if(typeof Image>"u"||typeof createImageBitmap>"u"){l(!1);return}var u=new Image;u.src="data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z",u.onload=function(){createImageBitmap(u,0,0,u.width,u.height).then(function(c){c.width===u.width&&c.height===u.height?l(!0):l(!1)},function(){return l(!1)})},u.onerror=function(){return l(!1)}})}},{}],17:[function(n,i,a){"use strict";i.exports=function(){var o=n("./mathlib"),s;onmessage=function(u){var c=u.data.opts,f=!1;if(!c.src&&c.srcBitmap){var d=new OffscreenCanvas(c.width,c.height),p=d.getContext("2d");p.drawImage(c.srcBitmap,0,0),c.src=p.getImageData(0,0,c.width,c.height).data,d.width=d.height=0,d=null,c.srcBitmap.close(),c.srcBitmap=null}s||(s=new o(u.data.features));var h=s.resizeAndUnsharp(c);if(f){var m=new ImageData(new Uint8ClampedArray(h),c.toWidth,c.toHeight),v=new OffscreenCanvas(c.toWidth,c.toHeight),A=v.getContext("2d");A.putImageData(m,0,0),createImageBitmap(v).then(function(x){postMessage({bitmap:x},[x])})}else postMessage({data:h},[h.buffer])}}},{"./mathlib":1}],18:[function(n,i,a){var o,s,l,u,c,f,d,p;function h(A){A<.5&&(A=.5);var x=Math.exp(.726*.726)/A,g=Math.exp(-x),w=Math.exp(-2*x),b=(1-g)*(1-g)/(1+2*x*g-w);return o=b,s=b*(x-1)*g,l=b*(x+1)*g,u=-b*w,c=2*g,f=-w,d=(o+s)/(1-c-f),p=(l+u)/(1-c-f),new Float32Array([o,s,l,u,c,f,d,p])}function m(A,x,g,w,b,y){var S,T,D,k,M,E,O,P,_,B,F,L,I,R;for(_=0;_<y;_++){for(E=_*b,O=_,P=0,S=A[E],M=S*w[6],k=M,F=w[0],L=w[1],I=w[4],R=w[5],B=0;B<b;B++)T=A[E],D=T*F+S*L+k*I+M*R,M=k,k=D,S=T,g[P]=k,P++,E++;for(E--,P--,O+=y*(b-1),S=A[E],M=S*w[7],k=M,T=S,F=w[2],L=w[3],B=b-1;B>=0;B--)D=T*F+S*L+k*I+M*R,M=k,k=D,S=T,T=A[E],x[O]=g[P]+k,E--,P--,O-=y}}function v(A,x,g,w){if(!!w){var b=new Uint16Array(A.length),y=new Float32Array(Math.max(x,g)),S=h(w);m(A,b,y,S,x,g,w),m(b,A,y,S,g,x,w)}}i.exports=v},{}],19:[function(n,i,a){"use strict";var o=n("object-assign"),s=n("./lib/base64decode"),l=n("./lib/wa_detect"),u={js:!0,wasm:!0};function c(f){if(!(this instanceof c))return new c(f);var d=o({},u,f||{});if(this.options=d,this.__cache={},this.__init_promise=null,this.__modules=d.modules||{},this.__memory=null,this.__wasm={},this.__isLE=new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]===1,!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}c.prototype.has_wasm=l,c.prototype.use=function(f){return this.__modules[f.name]=f,this.options.wasm&&this.has_wasm()&&f.wasm_fn?this[f.name]=f.wasm_fn:this[f.name]=f.fn,this},c.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error(`mathlib: only "wasm" was enabled, but it's not supported`));var f=this;return this.__init_promise=Promise.all(Object.keys(f.__modules).map(function(d){var p=f.__modules[d];return!f.options.wasm||!f.has_wasm()||!p.wasm_fn||f.__wasm[d]?null:WebAssembly.compile(f.__base64decode(p.wasm_src)).then(function(h){f.__wasm[d]=h})})).then(function(){return f}),this.__init_promise},c.prototype.__base64decode=s,c.prototype.__reallocate=function(d){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(d/(64*1024))}),this.__memory;var p=this.__memory.buffer.byteLength;return p<d&&this.__memory.grow(Math.ceil((d-p)/(64*1024))),this.__memory},c.prototype.__instance=function(d,p,h){if(p&&this.__reallocate(p),!this.__wasm[d]){var m=this.__modules[d];this.__wasm[d]=new WebAssembly.Module(this.__base64decode(m.wasm_src))}if(!this.__cache[d]){var v={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[d]=new WebAssembly.Instance(this.__wasm[d],{env:o(v,h||{})})}return this.__cache[d]},c.prototype.__align=function(d,p){p=p||8;var h=d%p;return d+(h?p-h:0)},i.exports=c},{"./lib/base64decode":20,"./lib/wa_detect":21,"object-assign":22}],20:[function(n,i,a){"use strict";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";i.exports=function(l){for(var u=l.replace(/[\r\n=]/g,""),c=u.length,f=new Uint8Array(c*3>>2),d=0,p=0,h=0;h<c;h++)h%4===0&&h&&(f[p++]=d>>16&255,f[p++]=d>>8&255,f[p++]=d&255),d=d<<6|o.indexOf(u.charAt(h));var m=c%4*6;return m===0?(f[p++]=d>>16&255,f[p++]=d>>8&255,f[p++]=d&255):m===18?(f[p++]=d>>10&255,f[p++]=d>>2&255):m===12&&(f[p++]=d>>4&255),f}},{}],21:[function(n,i,a){"use strict";var o;i.exports=function(){if(typeof o<"u"||(o=!1,typeof WebAssembly>"u"))return o;try{var l=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),u=new WebAssembly.Module(l),c=new WebAssembly.Instance(u,{});return c.exports.test(4)!==0&&(o=!0),o}catch{}return o}},{}],22:[function(n,i,a){"use strict";var o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function u(f){if(f==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(f)}function c(){try{if(!Object.assign)return!1;var f=new String("abc");if(f[5]="de",Object.getOwnPropertyNames(f)[0]==="5")return!1;for(var d={},p=0;p<10;p++)d["_"+String.fromCharCode(p)]=p;var h=Object.getOwnPropertyNames(d).map(function(v){return d[v]});if(h.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(v){m[v]=v}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}i.exports=c()?Object.assign:function(f,d){for(var p,h=u(f),m,v=1;v<arguments.length;v++){p=Object(arguments[v]);for(var A in p)s.call(p,A)&&(h[A]=p[A]);if(o){m=o(p);for(var x=0;x<m.length;x++)l.call(p,m[x])&&(h[m[x]]=p[m[x]])}}return h}},{}],23:[function(n,i,a){var o=arguments[3],s=arguments[4],l=arguments[5],u=JSON.stringify;i.exports=function(c,f){for(var d,p=Object.keys(l),h=0,m=p.length;h<m;h++){var v=p[h],A=l[v].exports;if(A===c||A&&A.default===c){d=v;break}}if(!d){d=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var x={},h=0,m=p.length;h<m;h++){var v=p[h];x[v]=v}s[d]=["function(require,module,exports){"+c+"(self); }",x]}var g=Math.floor(Math.pow(16,8)*Math.random()).toString(16),w={};w[d]=d,s[g]=["function(require,module,exports){var f = require("+u(d)+");(f.default ? f.default : f)(self);}",w];var b={};y(g);function y(E){b[E]=!0;for(var O in s[E][1]){var P=s[E][1][O];b[P]||y(P)}}var S="("+o+")({"+Object.keys(b).map(function(E){return u(E)+":["+s[E][0]+","+u(s[E][1])+"]"}).join(",")+"},{},["+u(g)+"])",T=window.URL||window.webkitURL||window.mozURL||window.msURL,D=new Blob([S],{type:"text/javascript"});if(f&&f.bare)return D;var k=T.createObjectURL(D),M=new Worker(k);return M.objectURL=k,M}},{}],"/index.js":[function(n,i,a){"use strict";function o(F,L){return f(F)||c(F,L)||l(F,L)||s()}function s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
37In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(F,L){if(!!F){if(typeof F=="string")return u(F,L);var I=Object.prototype.toString.call(F).slice(8,-1);if(I==="Object"&&F.constructor&&(I=F.constructor.name),I==="Map"||I==="Set")return Array.from(F);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return u(F,L)}}function u(F,L){(L==null||L>F.length)&&(L=F.length);for(var I=0,R=new Array(L);I<L;I++)R[I]=F[I];return R}function c(F,L){var I=F==null?null:typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(I!=null){var R=[],J=!0,Q=!1,q,ie;try{for(I=I.call(F);!(J=(q=I.next()).done)&&(R.push(q.value),!(L&&R.length===L));J=!0);}catch(Ae){Q=!0,ie=Ae}finally{try{!J&&I.return!=null&&I.return()}finally{if(Q)throw ie}}return R}}function f(F){if(Array.isArray(F))return F}var d=n("object-assign"),p=n("webworkify"),h=n("./lib/mathlib"),m=n("./lib/pool"),v=n("./lib/utils"),A=n("./lib/worker"),x=n("./lib/stepper"),g=n("./lib/tiler"),w=n("./lib/mm_resize/resize_filter_info"),b={},y=!1;try{typeof navigator<"u"&&navigator.userAgent&&(y=navigator.userAgent.indexOf("Safari")>=0)}catch{}var S=1;typeof navigator<"u"&&(S=Math.min(navigator.hardwareConcurrency||1,4));var T={tile:1024,concurrency:S,features:["js","wasm","ww"],idle:2e3,createCanvas:function(L,I){var R=document.createElement("canvas");return R.width=L,R.height=I,R}},D={filter:"mks2013",unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},k=!1,M=!1,E=!1,O=!1,P=!1;function _(){return{value:p(A),destroy:function(){if(this.value.terminate(),typeof window<"u"){var L=window.URL||window.webkitURL||window.mozURL||window.msURL;L&&L.revokeObjectURL&&this.value.objectURL&&L.revokeObjectURL(this.value.objectURL)}}}}function B(F){if(!(this instanceof B))return new B(F);this.options=d({},T,F||{});var L="lk_".concat(this.options.concurrency);this.__limit=b[L]||v.limiter(this.options.concurrency),b[L]||(b[L]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}B.prototype.init=function(){var F=this;if(this.__initPromise)return this.__initPromise;if(typeof ImageData<"u"&&typeof Uint8ClampedArray<"u")try{new ImageData(new Uint8ClampedArray(400),10,10),k=!0}catch{}typeof ImageBitmap<"u"&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?M=!0:this.debug("ImageBitmap does not support .close(), disabled"));var L=this.options.features.slice();if(L.indexOf("all")>=0&&(L=["cib","wasm","js","ww"]),this.__requested_features=L,this.__mathlib=new h(L),L.indexOf("ww")>=0&&typeof window<"u"&&"Worker"in window)try{var I=n("webworkify")(function(){});I.terminate(),this.features.ww=!0;var R="wp_".concat(JSON.stringify(this.options));b[R]?this.__workersPool=b[R]:(this.__workersPool=new m(_,this.options.idle),b[R]=this.__workersPool)}catch{}var J=this.__mathlib.init().then(function(Ae){d(F.features,Ae.features)}),Q;M?Q=v.cib_support(this.options.createCanvas).then(function(Ae){if(F.features.cib&&L.indexOf("cib")<0){F.debug("createImageBitmap() resize supported, but disabled by config");return}L.indexOf("cib")>=0&&(F.features.cib=Ae)}):Q=Promise.resolve(!1),E=v.can_use_canvas(this.options.createCanvas);var q;M&&k&&L.indexOf("ww")!==-1?q=v.worker_offscreen_canvas_support():q=Promise.resolve(!1),q=q.then(function(Ae){O=Ae});var ie=v.cib_can_use_region().then(function(Ae){P=Ae});return this.__initPromise=Promise.all([J,Q,q,ie]).then(function(){return F}),this.__initPromise},B.prototype.__invokeResize=function(F,L){var I=this;return L.__mathCache=L.__mathCache||{},Promise.resolve().then(function(){return I.features.ww?new Promise(function(R,J){var Q=I.__workersPool.acquire();L.cancelToken&&L.cancelToken.catch(function(ie){return J(ie)}),Q.value.onmessage=function(ie){Q.release(),ie.data.err?J(ie.data.err):R(ie.data)};var q=[];F.src&&q.push(F.src.buffer),F.srcBitmap&&q.push(F.srcBitmap),Q.value.postMessage({opts:F,features:I.__requested_features,preload:{wasm_nodule:I.__mathlib.__}},q)}):{data:I.__mathlib.resizeAndUnsharp(F,L.__mathCache)}})},B.prototype.__extractTileData=function(F,L,I,R,J){if(this.features.ww&&O&&(v.isCanvas(L)||P))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(R.srcImageBitmap||L,F.x,F.y,F.width,F.height).then(function(ie){return J.srcBitmap=ie,J});if(v.isCanvas(L))return R.srcCtx||(R.srcCtx=L.getContext("2d")),this.debug("Get tile pixel data"),J.src=R.srcCtx.getImageData(F.x,F.y,F.width,F.height).data,J;this.debug("Draw tile imageBitmap/image to temporary canvas");var Q=this.options.createCanvas(F.width,F.height),q=Q.getContext("2d");return q.globalCompositeOperation="copy",q.drawImage(R.srcImageBitmap||L,F.x,F.y,F.width,F.height,0,0,F.width,F.height),this.debug("Get tile pixel data"),J.src=q.getImageData(0,0,F.width,F.height).data,Q.width=Q.height=0,J},B.prototype.__landTileData=function(F,L,I){var R;if(this.debug("Convert raw rgba tile result to ImageData"),L.bitmap)return I.toCtx.drawImage(L.bitmap,F.toX,F.toY),null;if(k)R=new ImageData(new Uint8ClampedArray(L.data),F.toWidth,F.toHeight);else if(R=I.toCtx.createImageData(F.toWidth,F.toHeight),R.data.set)R.data.set(L.data);else for(var J=R.data.length-1;J>=0;J--)R.data[J]=L.data[J];return this.debug("Draw tile"),y?I.toCtx.putImageData(R,F.toX,F.toY,F.toInnerX-F.toX,F.toInnerY-F.toY,F.toInnerWidth+1e-5,F.toInnerHeight+1e-5):I.toCtx.putImageData(R,F.toX,F.toY,F.toInnerX-F.toX,F.toInnerY-F.toY,F.toInnerWidth,F.toInnerHeight),null},B.prototype.__tileAndResize=function(F,L,I){var R=this,J={srcCtx:null,srcImageBitmap:null,isImageBitmapReused:!1,toCtx:null},Q=function(ie){return R.__limit(function(){if(I.canceled)return I.cancelToken;var Ae={width:ie.width,height:ie.height,toWidth:ie.toWidth,toHeight:ie.toHeight,scaleX:ie.scaleX,scaleY:ie.scaleY,offsetX:ie.offsetX,offsetY:ie.offsetY,filter:I.filter,unsharpAmount:I.unsharpAmount,unsharpRadius:I.unsharpRadius,unsharpThreshold:I.unsharpThreshold};return R.debug("Invoke resize math"),Promise.resolve(Ae).then(function(le){return R.__extractTileData(ie,F,I,J,le)}).then(function(le){return R.debug("Invoke resize math"),R.__invokeResize(le,I)}).then(function(le){return I.canceled?I.cancelToken:(J.srcImageData=null,R.__landTileData(ie,le,J))})})};return Promise.resolve().then(function(){if(J.toCtx=L.getContext("2d"),v.isCanvas(F))return null;if(v.isImageBitmap(F))return J.srcImageBitmap=F,J.isImageBitmapReused=!0,null;if(v.isImage(F))return M?(R.debug("Decode image via createImageBitmap"),createImageBitmap(F).then(function(q){J.srcImageBitmap=q}).catch(function(q){return null})):null;throw new Error('Pica: ".from" should be Image, Canvas or ImageBitmap')}).then(function(){if(I.canceled)return I.cancelToken;R.debug("Calculate tiles");var q=g({width:I.width,height:I.height,srcTileSize:R.options.tile,toWidth:I.toWidth,toHeight:I.toHeight,destTileBorder:I.__destTileBorder}),ie=q.map(function(le){return Q(le)});function Ae(le){le.srcImageBitmap&&(le.isImageBitmapReused||le.srcImageBitmap.close(),le.srcImageBitmap=null)}return R.debug("Process tiles"),Promise.all(ie).then(function(){return R.debug("Finished!"),Ae(J),L},function(le){throw Ae(J),le})})},B.prototype.__processStages=function(F,L,I,R){var J=this;if(R.canceled)return R.cancelToken;var Q=F.shift(),q=o(Q,2),ie=q[0],Ae=q[1],le=F.length===0,pe;le||w.q2f.indexOf(R.filter)<0?pe=R.filter:R.filter==="box"?pe="box":pe="hamming",R=d({},R,{toWidth:ie,toHeight:Ae,filter:pe});var ae;return le||(ae=this.options.createCanvas(ie,Ae)),this.__tileAndResize(L,le?I:ae,R).then(function(){return le?I:(R.width=ie,R.height=Ae,J.__processStages(F,ae,I,R))}).then(function(oe){return ae&&(ae.width=ae.height=0),oe})},B.prototype.__resizeViaCreateImageBitmap=function(F,L,I){var R=this,J=L.getContext("2d");return this.debug("Resize via createImageBitmap()"),createImageBitmap(F,{resizeWidth:I.toWidth,resizeHeight:I.toHeight,resizeQuality:v.cib_quality_name(w.f2q[I.filter])}).then(function(Q){if(I.canceled)return I.cancelToken;if(!I.unsharpAmount)return J.drawImage(Q,0,0),Q.close(),J=null,R.debug("Finished!"),L;R.debug("Unsharp result");var q=R.options.createCanvas(I.toWidth,I.toHeight),ie=q.getContext("2d");ie.drawImage(Q,0,0),Q.close();var Ae=ie.getImageData(0,0,I.toWidth,I.toHeight);return R.__mathlib.unsharp_mask(Ae.data,I.toWidth,I.toHeight,I.unsharpAmount,I.unsharpRadius,I.unsharpThreshold),J.putImageData(Ae,0,0),q.width=q.height=0,Ae=ie=q=J=null,R.debug("Finished!"),L})},B.prototype.resize=function(F,L,I){var R=this;this.debug("Start resize...");var J=d({},D);if(isNaN(I)?I&&(J=d(J,I)):J=d(J,{quality:I}),J.toWidth=L.width,J.toHeight=L.height,J.width=F.naturalWidth||F.width,J.height=F.naturalHeight||F.height,Object.prototype.hasOwnProperty.call(J,"quality")){if(J.quality<0||J.quality>3)throw new Error("Pica: .quality should be [0..3], got ".concat(J.quality));J.filter=w.q2f[J.quality]}if(L.width===0||L.height===0)return Promise.reject(new Error("Invalid output size: ".concat(L.width,"x").concat(L.height)));J.unsharpRadius>2&&(J.unsharpRadius=2),J.canceled=!1,J.cancelToken&&(J.cancelToken=J.cancelToken.then(function(q){throw J.canceled=!0,q},function(q){throw J.canceled=!0,q}));var Q=3;return J.__destTileBorder=Math.ceil(Math.max(Q,2.5*J.unsharpRadius|0)),this.init().then(function(){if(J.canceled)return J.cancelToken;if(R.features.cib){if(w.q2f.indexOf(J.filter)>=0)return R.__resizeViaCreateImageBitmap(F,L,J);R.debug("cib is enabled, but not supports provided filter, fallback to manual math")}if(!E){var q=new Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");throw q.code="ERR_GET_IMAGE_DATA",q}var ie=x(J.width,J.height,J.toWidth,J.toHeight,R.options.tile,J.__destTileBorder);return R.__processStages(ie,F,L,J)})},B.prototype.resizeBuffer=function(F){var L=this,I=d({},D,F);if(Object.prototype.hasOwnProperty.call(I,"quality")){if(I.quality<0||I.quality>3)throw new Error("Pica: .quality should be [0..3], got ".concat(I.quality));I.filter=w.q2f[I.quality]}return this.init().then(function(){return L.__mathlib.resizeAndUnsharp(I)})},B.prototype.toBlob=function(F,L,I){return L=L||"image/png",new Promise(function(R){if(F.toBlob){F.toBlob(function(Ae){return R(Ae)},L,I);return}if(F.convertToBlob){R(F.convertToBlob({type:L,quality:I}));return}for(var J=atob(F.toDataURL(L,I).split(",")[1]),Q=J.length,q=new Uint8Array(Q),ie=0;ie<Q;ie++)q[ie]=J.charCodeAt(ie);R(new Blob([q],{type:L}))})},B.prototype.debug=function(){},i.exports=B},{"./lib/mathlib":1,"./lib/mm_resize/resize_filter_info":7,"./lib/pool":13,"./lib/stepper":14,"./lib/tiler":15,"./lib/utils":16,"./lib/worker":17,"object-assign":22,webworkify:23}]},{},[])("/index.js")})});var WMt={};DS(WMt,{default:()=>oW});module.exports=mYe(WMt);var oqe=ge(jo());var TS=(e,t,r)=>!t||t<=0?[r,...e]:[...e.slice(0,t),r,...e.slice(t)],NS=(e,t,r)=>!t||t<=0?[...r,...e]:[...e.slice(0,t),...r,...e.slice(t)],Mr=e=>[...new Set(e)],Bj=e=>[...new Map(e.map(t=>[t.toLowerCase(),t])).values()],qi=(e,t)=>{let r=e;if(t.includes(r)){let n=1;for(;t.includes(r);)r=e+n.toString(),n+=1}return r},Vce=e=>(t,r,n)=>n.findIndex(i=>t[e]==i[e])===r;var Gce=(e,t,r)=>e.sort(function(n,i){let a=t.indexOf(n[r]),o=t.indexOf(i[r]);return a>o?a!=-1&&o==-1?-1:1:o!=-1&&a==-1?1:-1});var Vu=e=>e=="/"?e:e.slice(-1)=="/"?e.substring(0,e.length-1):e;var Ds=e=>{let t=e,r="",n=A=>{let x={};return A.split("&").forEach(g=>{let[w,b]=g.split("=");x[decodeURIComponent(w)]=decodeURIComponent(b)}),x},i=(A,x)=>x?A==="^"?"context":A==="*"?"frame":A===";"?"action":null:A==="^"?"block":"heading",a=null,o=null,s=null,l=null,u=null,c=null,f="vault";if(t.indexOf("://")!=-1){f=e.slice(0,e.indexOf("://"));let A=e.slice(e.indexOf("://")+3);if(A.charAt(0)=="#"||A.charAt(0)=="$"){let x=A.split("/")[0].lastIndexOf("#");x>0?(a=Vu(A.slice(0,x)),e=A.slice(x)):(a=A.split("/")[0],e=A.replace(a,""),e.length>0&&(e=e.slice(1)),e==""&&(e="/"))}else{let x=A.split("/");a=x[0],e=x.slice(1).join("/")||""}}let d=e.lastIndexOf("/"),p=e.lastIndexOf("#"),h=e.lastIndexOf("|"),m=e.lastIndexOf("?"),v=!1;if(m!==-1&&(c=n(e.slice(m+1)),e=e.slice(0,m)),p!==-1&&p>d){p==d+1&&(v=!0);let A=e.slice(p+1);u=i(A[0],v),(u||p!=d+1)&&(r=A[0],l=u?A.slice(1):A,e=e.slice(0,p))}return h!==-1&&h>d&&(s=e.slice(h+1),e=e.slice(0,h)),e.charAt(e.length-1)=="/"&&(v=!0),o=e,{basePath:Vu(`${a?`${f}://${a}/${o!="/"?o:""}`:o}`),authority:a,fullPath:t,scheme:f,path:Vu(e),alias:s,ref:l,refType:u,refStr:u?r+l:l,query:c,trailSlash:v}},Jh=(e,t)=>{let r=e.split("/");return t+"/"+r[r.length-1]},Wce=(e,t)=>{let r=e.substring(0,e.lastIndexOf("/"));return r.length>0?`${r}/${t}`:`${t}`},Qce=(e,t)=>{let r=e.substring(0,e.lastIndexOf("/")),n=e.lastIndexOf(".")!=-1?e.substring(e.lastIndexOf(".")):"";return r.length>0?`${r}/${t}${n}`:`${t}${n}`};var Yce=(e,t)=>t?e.spacesIndex.has(t):!1,gd=(e,t)=>t.superstate.settings.spacesMDBInHidden?e=="/"?t.superstate.settings.spaceSubFolder+"/":e+t.superstate.settings.spaceSubFolder+"/":e;var Lj=(e,t)=>t.spacesFolder+"/"+e;var or=e=>{let t;try{t=JSON.parse(e)}catch{}return t};var Rj=(e,t)=>!e||e.length==0?t:e;function Ks(e){return Array.isArray(e)?e:typeof e=="string"?[e]:[]}function lQ(e,t,r){let n=uo(e);return t.some(i=>i==n)?n:r}function uo(e){if(!e)return"";if(typeof e!="string"){let t=e.toString();return typeof t=="string"?t:""}return e}function Ub(e){return!!e}var Xce=(e,t)=>t.indexOf(e)>0?t.indexOf(e):t.length,vT=(e,t)=>t.pathsIndex.get(e)?.name??e,Kce=(e,t,r)=>r.contextsIndex.get(e)?.schemas.find(n=>n.id==t)?.name??t,Jce=e=>"spaces://"+yT(e),yT=e=>e?.replace(/\//g,"+"),ii=e=>"spaces://"+e;var Zce=e=>e?`(${e})`:null,Jt=e=>e?`"${e.replace(/"/g,'\\"').replace(/\n/g,"\\n")}"`:null,uQ=e=>{if(!e)return e;if(e.startsWith("(")){if(e.endsWith(")"))return e.substring(1,e.length-1);if(e.endsWith(");"))return e.substring(1,e.length-2)}return e},Yi=e=>{if(!e)return e;if(typeof e=="number")return e.toString();let t=e.startsWith("'")&&(e.endsWith("';")||e.endsWith("'")),r=e.startsWith('"')&&(e.endsWith('";')||e.endsWith('"'));return t||r?(e=e.substring(1,e.length-1),(e.endsWith('"')||e.endsWith("'"))&&(e=e.substring(0,e.length-1)),e.replace(/\\"/g,'"')):e.replace(/\\"/g,'"')},Ad=(e,t)=>!e||e.length==0?t:e,qj=e=>e.charAt(0)=="/"?e.substring(1):e,efe=e=>qj(e.substring(0,e.lastIndexOf("/")))||e;var dde=ge(On());var ut="File";function tu(e){return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function Xr(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ht(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function zt(e){ht(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||tu(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Ua(e,t){ht(2,arguments);var r=zt(e),n=Xr(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function Ts(e,t){ht(2,arguments);var r=zt(e),n=Xr(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function Ha(e,t){if(ht(2,arguments),!t||tu(t)!=="object")return new Date(NaN);var r=t.years?Xr(t.years):0,n=t.months?Xr(t.months):0,i=t.weeks?Xr(t.weeks):0,a=t.days?Xr(t.days):0,o=t.hours?Xr(t.hours):0,s=t.minutes?Xr(t.minutes):0,l=t.seconds?Xr(t.seconds):0,u=zt(e),c=n||r?Ts(u,n+r*12):u,f=a||i?Ua(c,a+i*7):c,d=s+o*60,p=l+d*60,h=p*1e3,m=new Date(f.getTime()+h);return m}function Cp(e,t){ht(2,arguments);var r=zt(e).getTime(),n=Xr(t);return new Date(r+n)}var gYe=36e5;function OS(e,t){ht(2,arguments);var r=Xr(t);return Cp(e,r*gYe)}var AYe={};function Gu(){return AYe}function Po(e,t){var r,n,i,a,o,s,l,u;ht(1,arguments);var c=Gu(),f=Xr((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=zt(e),p=d.getDay(),h=(p<f?7:0)+p-f;return d.setDate(d.getDate()-h),d.setHours(0,0,0,0),d}function vd(e){return ht(1,arguments),Po(e,{weekStartsOn:1})}function cQ(e){ht(1,arguments);var t=zt(e),r=t.getFullYear(),n=new Date(0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);var i=vd(n),a=new Date(0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);var o=vd(a);return t.getTime()>=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function fQ(e){ht(1,arguments);var t=cQ(e),r=new Date(0);r.setFullYear(t,0,4),r.setHours(0,0,0,0);var n=vd(r);return n}function YA(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Qn(e){ht(1,arguments);var t=zt(e);return t.setHours(0,0,0,0),t}var vYe=864e5;function Dp(e,t){ht(2,arguments);var r=Qn(e),n=Qn(t),i=r.getTime()-YA(r),a=n.getTime()-YA(n);return Math.round((i-a)/vYe)}var yYe=6e4;function xT(e,t){ht(2,arguments);var r=Xr(t);return Cp(e,r*yYe)}function Lv(e,t){ht(2,arguments);var r=Xr(t),n=r*7;return Ua(e,n)}function $j(e,t){ht(2,arguments);var r=Xr(t);return Ts(e,r*12)}function zj(e){ht(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(tu(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var r;return t.forEach(function(n){var i=zt(n);(r===void 0||r<i||isNaN(Number(i)))&&(r=i)}),r||new Date(NaN)}function Uj(e){ht(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(tu(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var r;return t.forEach(function(n){var i=zt(n);(r===void 0||r>i||isNaN(i.getDate()))&&(r=i)}),r||new Date(NaN)}var bYe=365.2425,xYe=Math.pow(10,8)*24*60*60*1e3,dQ=6e4,pQ=36e5;var kFt=-xYe;var wYe=3600;var tfe=wYe*24,CFt=tfe*7,SYe=tfe*bYe,EYe=SYe/12,DFt=EYe*3;function ru(e,t){ht(2,arguments);var r=Qn(e),n=Qn(t);return r.getTime()===n.getTime()}function Hb(e){return ht(1,arguments),e instanceof Date||tu(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function mQ(e){if(ht(1,arguments),!Hb(e)&&typeof e!="number")return!1;var t=zt(e);return!isNaN(Number(t))}function Rv(e,t){ht(2,arguments);var r=zt(e),n=zt(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}var kYe=6048e5;function hQ(e,t,r){ht(2,arguments);var n=Po(e,r),i=Po(t,r),a=n.getTime()-YA(n),o=i.getTime()-YA(i);return Math.round((a-o)/kYe)}function FS(e){ht(1,arguments);var t=zt(e);return t.setHours(23,59,59,999),t}function qv(e){ht(1,arguments);var t=zt(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function cs(e){ht(1,arguments);var t=zt(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Hj(e){ht(1,arguments);var t=zt(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function XA(e,t){var r,n,i,a,o,s,l,u;ht(1,arguments);var c=Gu(),f=Xr((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=zt(e),p=d.getDay(),h=(p<f?-7:0)+6-(p-f);return d.setDate(d.getDate()+h),d.setHours(23,59,59,999),d}function wT(e){return ht(1,arguments),XA(e,{weekStartsOn:1})}function gQ(e,t){ht(2,arguments);var r=Xr(t);return Cp(e,-r)}var CYe=864e5;function AQ(e){ht(1,arguments);var t=zt(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/CYe)+1}function $v(e){ht(1,arguments);var t=1,r=zt(e),n=r.getUTCDay(),i=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-i),r.setUTCHours(0,0,0,0),r}function ST(e){ht(1,arguments);var t=zt(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=$v(n),a=new Date(0);a.setUTCFullYear(r,0,4),a.setUTCHours(0,0,0,0);var o=$v(a);return t.getTime()>=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function vQ(e){ht(1,arguments);var t=ST(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=$v(r);return n}var DYe=6048e5;function yQ(e){ht(1,arguments);var t=zt(e),r=$v(t).getTime()-vQ(t).getTime();return Math.round(r/DYe)+1}function zv(e,t){var r,n,i,a,o,s,l,u;ht(1,arguments);var c=Gu(),f=Xr((r=(n=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=zt(e),p=d.getUTCDay(),h=(p<f?7:0)+p-f;return d.setUTCDate(d.getUTCDate()-h),d.setUTCHours(0,0,0,0),d}function ET(e,t){var r,n,i,a,o,s,l,u;ht(1,arguments);var c=zt(e),f=c.getUTCFullYear(),d=Gu(),p=Xr((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(f+1,0,p),h.setUTCHours(0,0,0,0);var m=zv(h,t),v=new Date(0);v.setUTCFullYear(f,0,p),v.setUTCHours(0,0,0,0);var A=zv(v,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=A.getTime()?f:f-1}function bQ(e,t){var r,n,i,a,o,s,l,u;ht(1,arguments);var c=Gu(),f=Xr((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=ET(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var h=zv(p,t);return h}var TYe=6048e5;function xQ(e,t){ht(1,arguments);var r=zt(e),n=zv(r,t).getTime()-bQ(r,t).getTime();return Math.round(n/TYe)+1}function $i(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var NYe={y:function(t,r){var n=t.getUTCFullYear(),i=n>0?n:1-n;return $i(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):$i(n+1,2)},d:function(t,r){return $i(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return $i(t.getUTCHours()%12||12,r.length)},H:function(t,r){return $i(t.getUTCHours(),r.length)},m:function(t,r){return $i(t.getUTCMinutes(),r.length)},s:function(t,r){return $i(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return $i(a,r.length)}},KA=NYe;var jS={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},MYe={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return KA.y(t,r)},Y:function(t,r,n,i){var a=ET(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return $i(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):$i(o,r.length)},R:function(t,r){var n=ST(t);return $i(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return $i(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return $i(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return $i(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return KA.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return $i(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=xQ(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):$i(a,r.length)},I:function(t,r,n){var i=yQ(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):$i(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):KA.d(t,r)},D:function(t,r,n){var i=AQ(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):$i(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return $i(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return $i(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return $i(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=jS.noon:i===0?a=jS.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=jS.evening:i>=12?a=jS.afternoon:i>=4?a=jS.morning:a=jS.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return KA.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):KA.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):$i(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):$i(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):KA.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):KA.s(t,r)},S:function(t,r){return KA.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return nfe(o);case"XXXX":case"XX":return Vb(o);case"XXXXX":case"XXX":default:return Vb(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return nfe(o);case"xxxx":case"xx":return Vb(o);case"xxxxx":case"xxx":default:return Vb(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+rfe(o,":");case"OOOO":default:return"GMT"+Vb(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+rfe(o,":");case"zzzz":default:return"GMT"+Vb(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return $i(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return $i(o,r.length)}};function rfe(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t||"";return r+String(i)+o+$i(a,2)}function nfe(e,t){if(e%60===0){var r=e>0?"-":"+";return r+$i(Math.abs(e)/60,2)}return Vb(e,t)}function Vb(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=$i(Math.floor(i/60),2),o=$i(i%60,2);return n+a+r+o}var ife=MYe;var afe=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},ofe=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},OYe=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return afe(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",afe(i,r)).replace("{{time}}",ofe(a,r))},FYe={p:ofe,P:OYe},sfe=FYe;var jYe=["D","DD"],PYe=["YY","YYYY"];function lfe(e){return jYe.indexOf(e)!==-1}function ufe(e){return PYe.indexOf(e)!==-1}function wQ(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var _Ye={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},IYe=function(t,r,n){var i,a=_Ye[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},cfe=IYe;function kT(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var BYe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},LYe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},RYe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qYe={date:kT({formats:BYe,defaultWidth:"full"}),time:kT({formats:LYe,defaultWidth:"full"}),dateTime:kT({formats:RYe,defaultWidth:"full"})},ffe=qYe;var $Ye={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zYe=function(t,r,n,i){return $Ye[t]},dfe=zYe;function Gb(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return i[u]}}var UYe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},HYe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},VYe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},GYe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},WYe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},QYe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},YYe=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},XYe={ordinalNumber:YYe,era:Gb({values:UYe,defaultWidth:"wide"}),quarter:Gb({values:HYe,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Gb({values:VYe,defaultWidth:"wide"}),day:Gb({values:GYe,defaultWidth:"wide"}),dayPeriod:Gb({values:WYe,defaultWidth:"wide",formattingValues:QYe,defaultFormattingWidth:"wide"})},pfe=XYe;function Wb(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?JYe(s,function(f){return f.test(o)}):KYe(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function KYe(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function JYe(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function SQ(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var ZYe=/^(\d+)(th|st|nd|rd)?/i,eXe=/\d+/i,tXe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rXe={any:[/^b/i,/^(a|c)/i]},nXe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},iXe={any:[/1/i,/2/i,/3/i,/4/i]},aXe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},oXe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sXe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lXe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},uXe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},cXe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fXe={ordinalNumber:SQ({matchPattern:ZYe,parsePattern:eXe,valueCallback:function(t){return parseInt(t,10)}}),era:Wb({matchPatterns:tXe,defaultMatchWidth:"wide",parsePatterns:rXe,defaultParseWidth:"any"}),quarter:Wb({matchPatterns:nXe,defaultMatchWidth:"wide",parsePatterns:iXe,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Wb({matchPatterns:aXe,defaultMatchWidth:"wide",parsePatterns:oXe,defaultParseWidth:"any"}),day:Wb({matchPatterns:sXe,defaultMatchWidth:"wide",parsePatterns:lXe,defaultParseWidth:"any"}),dayPeriod:Wb({matchPatterns:uXe,defaultMatchWidth:"any",parsePatterns:cXe,defaultParseWidth:"any"})},mfe=fXe;var dXe={code:"en-US",formatDistance:cfe,formatLong:ffe,formatRelative:dfe,localize:pfe,match:mfe,options:{weekStartsOn:0,firstWeekContainsDate:1}},CT=dXe;var hfe=CT;var pXe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mXe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hXe=/^'([^]*?)'?$/,gXe=/''/g,AXe=/[a-zA-Z]/;function _o(e,t,r){var n,i,a,o,s,l,u,c,f,d,p,h,m,v,A,x,g,w;ht(2,arguments);var b=String(t),y=Gu(),S=(n=(i=r?.locale)!==null&&i!==void 0?i:y.locale)!==null&&n!==void 0?n:hfe,T=Xr((a=(o=(s=(l=r?.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(u=r.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:y.firstWeekContainsDate)!==null&&o!==void 0?o:(f=y.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=Xr((p=(h=(m=(v=r?.weekStartsOn)!==null&&v!==void 0?v:r==null||(A=r.locale)===null||A===void 0||(x=A.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&m!==void 0?m:y.weekStartsOn)!==null&&h!==void 0?h:(g=y.locale)===null||g===void 0||(w=g.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var k=zt(e);if(!mQ(k))throw new RangeError("Invalid time value");var M=YA(k),E=gQ(k,M),O={firstWeekContainsDate:T,weekStartsOn:D,locale:S,_originalDate:k},P=b.match(mXe).map(function(_){var B=_[0];if(B==="p"||B==="P"){var F=sfe[B];return F(_,S.formatLong)}return _}).join("").match(pXe).map(function(_){if(_==="''")return"'";var B=_[0];if(B==="'")return vXe(_);var F=ife[B];if(F)return!(r!=null&&r.useAdditionalWeekYearTokens)&&ufe(_)&&wQ(_,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&lfe(_)&&wQ(_,t,String(e)),F(E,_,S.localize,O);if(B.match(AXe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+B+"`");return _}).join("");return P}function vXe(e){var t=e.match(hXe);return t?t[1].replace(gXe,"'"):e}function EQ(e){ht(1,arguments);var t=zt(e),r=t.getFullYear(),n=t.getMonth(),i=new Date(0);return i.setFullYear(r,n+1,0),i.setHours(0,0,0,0),i.getDate()}var yXe=6048e5;function Vj(e){ht(1,arguments);var t=zt(e),r=vd(t).getTime()-fQ(t).getTime();return Math.round(r/yXe)+1}function kQ(e){ht(1,arguments);var t=zt(e),r=t.getTime();return r}function Gj(e){return ht(1,arguments),Math.floor(kQ(e)/1e3)}function CQ(e,t){var r,n,i,a,o,s,l,u;ht(1,arguments);var c=zt(e),f=c.getFullYear(),d=Gu(),p=Xr((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(f+1,0,p),h.setHours(0,0,0,0);var m=Po(h,t),v=new Date(0);v.setFullYear(f,0,p),v.setHours(0,0,0,0);var A=Po(v,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=A.getTime()?f:f-1}function DQ(e,t){var r,n,i,a,o,s,l,u;ht(1,arguments);var c=Gu(),f=Xr((r=(n=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=CQ(e,t),p=new Date(0);p.setFullYear(d,0,f),p.setHours(0,0,0,0);var h=Po(p,t);return h}var bXe=6048e5;function Wj(e,t){ht(1,arguments);var r=zt(e),n=Po(r,t).getTime()-DQ(r,t).getTime();return Math.round(n/bXe)+1}function TQ(e){ht(1,arguments);var t=zt(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function Qj(e,t){return ht(1,arguments),hQ(TQ(e),cs(e),t)+1}function PS(e,t){ht(2,arguments);var r=zt(e),n=zt(t);return r.getTime()>n.getTime()}function DT(e,t){ht(2,arguments);var r=zt(e),n=zt(t);return r.getTime()<n.getTime()}function Yj(e,t){return Yj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Yj(e,t)}function gfe(e,t){if(tu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Afe(e){var t=gfe(e,"string");return tu(t)=="symbol"?t:t+""}function ai(e,t,r){return(t=Afe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _S(e,t){ht(2,arguments);var r=zt(e),n=zt(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function Xj(e,t){ht(2,arguments);var r=zt(e),n=zt(t);return r.getFullYear()===n.getFullYear()}function IS(e,t){ht(2,arguments);var r=Xr(t);return Ua(e,-r)}function Jj(e,t){var r;ht(1,arguments);var n=Xr((r=t?.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=EXe(e),a;if(i.date){var o=kXe(i.date,n);a=CXe(o.restDateString,o.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var s=a.getTime(),l=0,u;if(i.time&&(l=DXe(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(u=TXe(i.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(s+l),f=new Date(0);return f.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),f.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),f}return new Date(s+l+u)}var Kj={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},xXe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,wXe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,SXe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function EXe(e){var t={},r=e.split(Kj.dateTimeDelimiter),n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Kj.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Kj.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var i=Kj.timezone.exec(n);i?(t.time=n.replace(i[1],""),t.timezone=i[1]):t.time=n}return t}function kXe(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function CXe(e,t){if(t===null)return new Date(NaN);var r=e.match(xXe);if(!r)return new Date(NaN);var n=!!r[4],i=TT(r[1]),a=TT(r[2])-1,o=TT(r[3]),s=TT(r[4]),l=TT(r[5])-1;if(n)return jXe(t,s,l)?NXe(t,s,l):new Date(NaN);var u=new Date(0);return!OXe(t,a,o)||!FXe(t,i)?new Date(NaN):(u.setUTCFullYear(t,a,Math.max(i,o)),u)}function TT(e){return e?parseInt(e):1}function DXe(e){var t=e.match(wXe);if(!t)return NaN;var r=NQ(t[1]),n=NQ(t[2]),i=NQ(t[3]);return PXe(r,n,i)?r*pQ+n*dQ+i*1e3:NaN}function NQ(e){return e&&parseFloat(e.replace(",","."))||0}function TXe(e){if(e==="Z")return 0;var t=e.match(SXe);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return _Xe(n,i)?r*(n*pQ+i*dQ):NaN}function NXe(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var i=n.getUTCDay()||7,a=(t-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+a),n}var MXe=[31,null,31,30,31,30,31,31,30,31,30,31];function vfe(e){return e%400===0||e%4===0&&e%100!==0}function OXe(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(MXe[t]||(vfe(e)?29:28))}function FXe(e,t){return t>=1&&t<=(vfe(e)?366:365)}function jXe(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function PXe(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function _Xe(e,t){return t>=0&&t<=59}function BS(e,t){ht(2,arguments);var r=zt(e),n=Xr(t),i=r.getFullYear(),a=r.getDate(),o=new Date(0);o.setFullYear(i,n,15),o.setHours(0,0,0,0);var s=EQ(o);return r.setMonth(n,Math.min(a,s)),r}function NT(e,t){ht(2,arguments);var r=zt(e),n=Xr(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}var JA=(e,t)=>{if(e instanceof Date)return"date";if(typeof e=="string"){if(/\/\/(\S+?(?:jpe?g|png|gif|svg))/gi.test(e)||e.includes("unsplash"))return"image";if(/^\d{4}-\d{2}-\d{2}$/.test(e))return"date";if(t=="tag"||t=="tags")return"tags-multi";if(/\[\[.*?\]\]/.test(e))return"link"}else{if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(e)if(Array.isArray(e)||typeof e=="string"&&e.indexOf(",")>-1){let r=Array.isArray(e)?e:[];if(typeof e=="string"&&e.indexOf(",")>-1&&(r=Rt(e)),t=="tag"||t=="tags")return"tags-multi";if(r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string")return"link";let n=Mr(r.map(i=>JA(i,t)));return n.length==1&&n[0]=="link"?"link-multi":n.some(i=>i=="object")?"object-multi":"option-multi"}else return e.isLuxonDateTime?"date":e.isLuxonDuration?"duration":e.type=="file"?"link":typeof e=="object"&&!Array.isArray(e)&&e!==null?"object":"unknown";else return"unknown"}return"text"},LS=e=>{if(e=="date")return _o(Date.now(),"yyyy-MM-dd");if(e=="number")return 0;if(e=="boolean")return!0;if(e=="link")return"[[Select Note]]";if(e=="option")return"one, two";if(e=="text")return" ";if(e=="image")return"https://images.unsplash.com/photo-1675789652575-0a5d2425b6c2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80"};var MQ=(e,t)=>t?t=="number"?parseFloat(e):t=="boolean"?e=="true":t.includes("-multi")?Rt(e).map(r=>zi(t.replace("-multi",""),r,!1)):e:e,zi=(e,t,r)=>{if(!e)return t;if(e=="flex"){let n=Zh(t);return zi(n.type,n.value,r)}if(e=="object")return JSON.parse(t);if(e=="object-multi")return JSON.parse(t);if(e=="number")return parseFloat(t);if(e=="boolean")return t=="true";if(e=="date"||e=="datetime"||e=="date-end"){if(!t||t==="")return null;let n=new Date(t);return isNaN(n.getTime())?t:n}else{if(e.includes("-multi"))return Rt(t).map(n=>zi(e.replace("-multi",""),n,r));if(e.includes("link")||e.includes("context"))return r?`[[${t}]]`:t}return t},OQ=e=>{switch(e){case"duration":return"text";case"unknown":return"text"}return e},RS=e=>e.type=="object"||e.type=="object-multi"||e.type=="super";var Js=e=>e.map(t=>t.replace(",","\\,")).join(", "),Ui=e=>JSON.stringify(e),FQ=e=>e.join(", "),yfe=e=>e.join("; "),bfe=e=>e.join(",");var Rt=e=>uo(e).startsWith("[")?Ks(or(e)).map(t=>uo(t)):$S(e),$S=e=>(uo(e).replace("\\,",",")?.match(/(\\.|[^,])+/g)??[]).map(t=>t.trim()),fa=(e,t,r)=>{let n=r??JA(t,e);if(!t)return"";switch(n){case"tags-multi":return t;case"object":case"object-multi":{if(Array.isArray(t)){if(t[0].path)return JSON.stringify(t.map(i=>i.path))}else if(t.path)return t.path;return JSON.stringify(t)}break;case"number":return t.toString();case"boolean":return t?"true":"false";case"date":{if(t instanceof Date){let i=_o(t,"yyyy-MM-dd");return typeof i=="string"?i:""}return typeof t!="string"?"":t}break;case"duration":return Js(Object.keys(t.values).reduce((i,a)=>[...i,...t.values[a]>0?[t.values[a]+" "+a]:[]],[]));case"option-multi":case"link-multi":case"context-multi":return typeof t=="string"?qS(t):Ui(t.map(i=>i?typeof i=="string"?qS(i):i.path?i.path:Array.isArray(t)&&i.length==1&&Array.isArray(i[0])&&i[0].length==1&&typeof i[0][0]=="string"?i[0][0]:JSON.stringify(i):""));case"link":case"context":return Array.isArray(t)&&t.length==1&&Array.isArray(t[0])&&t[0].length==1&&typeof t[0][0]=="string"?t[0][0]:typeof t=="string"?qS(t):t.path;case"text":case"tag":case"option":case"image":return t}return""},eg=(e,t)=>t?Ks(or(e)):or(e)??{};var qS=e=>{if(!e)return"";let t=/\[\[(.*?)\]\]/g.exec(e),r=t?.length>1?t[1].substring(0,Xce("|",t[1])):e;return r||e};var xfe=({field:e,value:t})=>t=="ctime"?{value:"parseDate(prop('File')['metadata']['ctime'])",type:"date"}:{value:"",type:"string"},$t=(e,t)=>{let r=or(e);if(r)return t=="fileprop"&&r.field?xfe(r):[...Zs(t)?.configKeys??[],"alias","default","required"].reduce((i,a)=>({...i,[a]:r[a]}),{});if(!t)return{};if(!r)if(t=="context")r={};else if(t.startsWith("date"))e?.length>0?r={format:e}:r={};else if(t.startsWith("fileprop"))if(e?.length>0){let[n,i]=e.split(".");r=xfe({field:n,value:i})}else r={};else t.startsWith("option")&&(e?.length>0?r={options:Rt(e).map(i=>({name:i,value:i}))}:r={});return r??{}},Zh=e=>{let t=or(e),r=t?.value,n=t?.type,i=t?.config;return{value:r,type:n,config:i}};var wfe={hintText:{fileName:"Enter File Name",alias:"Enter Display Name",newItem:"+ New",selectNote:"Select Note...",createListItem:"Create List Item",dragDropProperties:"Drag and drop to reorder properties",dragDropModifierKeys:"Hold Alt to copy",hiddenExtensionsPlaceholder:"e.g., .mdb, _assets, _blocks"},timeUnits:{hour:"Hour",day:"Day",week:"Week",month:"Month",year:"Year",minute:"Minute",second:"Second"},aggregates:{values:"Values",sum:"Sum",average:"Average",median:"Median",count:"Count",countValues:"Count Values",countUniques:"Count Uniques",percentageEmpty:"Percentage Empty",percentageNotEmpty:"Percentage Not Empty",min:"Min",max:"Max",range:"Range",empty:"Empty",notEmpty:"Not Empty",earliest:"Earliest",latest:"Latest",complete:"Complete",incomplete:"Not Complete",percentageComplete:"Percentage Complete",dateRange:"Date Range"},fieldTypes:{object:"Object",text:"Text",file:"File",date:"Date",number:"Number"},defaults:{spaceNote:"Current Note",spaceContext:"Current Space"},commands:{h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",columns:"Columns",tabs:"Tabs",button:"Button",label:"Label",column:"Column",idea:"New",group:"Group",paragraph:"Text",card:"Card",cardDesc:"Card container with styled background",progress:"Progress",rating:"Rating",circularProgress:"Circular Progress",list:"Bullet List","ordered-list":"Numbered List",todo:"To-do List",quote:"Quote",internal:"Link to Note",context:"Embed Existing Context",flowEmbed:"Embed Note or Space",board:"New Board",divider:"Divider",note:"Note Block",link:"Web Link",internalLink:"Link",callout:"Callout",bookmark:"Bookmark",table:"New Table",codeblock:"Code Block",toggle:"Toggle",emoji:"Emoji",image:"Image",chart:"Chart",newNote:"Note",tag:"Tag",makeMenu:"Flow Menu",selectStyle:"Style",toggleKeyboard:"Toggle Keyboard",flow:"Flow"},styles:{blocklink:"Link to Note",textColor:"Text Color",highlight:"Highlight"},commandsSuggest:{noResult:"No result"},commandPalette:{toggleEnhancedLogs:"Toggle Enhanced Logs",fixPathCharacters:"Fix Path Characters",moveSpaceDataFolder:"Move Space Data Folder",openFlow:"Open Flow Blocks in Selection",closeFlow:"Close Flow Blocks in Selection",openSpaces:"Open Navigator",blink:"Blink",revealFile:"Reveal File in Navigator",releaseNotes:"Release Notes",getStarted:"Get Started",toggleBacklinks:"Toggle Backlinks",pinActiveFileToSpace:"Pin Active File to Space",closeExtraFileTabs:"Close Extra File Tabs",convertPathToSpace:"Convert Path to Space",openFileContext:"Open File Context"},frames:{label:{label:"Label",description:"Label"},context:{label:"Context",description:"Display a context view from another space"},calendar:{label:"Calendar View"},event:{label:"Event"},divider:{label:"Divider",description:"Divider to separate your content"},button:{label:"Button",description:"Buttons can perform actions and open links"},toggle:{description:"Toggle to show/hide content"}},menu:{createItemInSpace:"Create Item in Space",newItemView:"New Item View",noActionsAvailable:"No Actions Available",path:"Path",name:"Name",content:"Content",property:"Property",value:"Value",table:"Table",click:"Click",hover:"Hover",align:"Align",shadow:"Shadow",noFramesAvailable:"No Frames Available",tabName:"Tab Name",removeTab:"Remove Tab",items:"Items",metadata:"Metadata",special:"Special",cardContainerWithStyledBackground:"Card Container With Styled Background",buttonContainerWithStyledAppearance:"Button Container With Styled Appearance",up:"Up",down:"Down",selectmenu:"Selectmenu",toggle:"Toggle",setDefaultSticker:"Set Default Sticker",new:"New",noColorPalettesAvailable:"No Color Palettes Available",stopPosition:"Stop Position",removeSelectedGradientStop:"Remove Selected Gradient Stop",noColor:"No Color",thisElementWillHaveNoColorApplied:"This Element Will Have No Color Applied",yes:"Yes",no:"No",barChart:"Bar Chart",lineChart:"Line Chart",scatterPlot:"Scatter Plot",pieChart:"Pie Chart",areaChart:"Area Chart",radarChart:"Radar Chart",space:"Space",list:"List",category:"Category",values:"Values",xAxisField:"X-Axis Field",yAxisFields:"Y-Axis Fields",selectDataSource:"Select a data source",selectCategoryField:"Select category field",selectXAxisField:"Select X-axis field",selectValueFields:"Select value fields",selectYAxisFields:"Select Y-axis fields",legend:"Legend",hidden:"Hidden",hideLegend:"Hide Legend",showLegend:"Show Legend",legendPosition:"Position",orientation:"Orientation",horizontal:"Horizontal",vertical:"Vertical",legendTop:"Top",legendBottom:"Bottom",legendLeft:"Left",legendRight:"Right",colorPalette:"Color Palette",defaultPalette:"Default",axisLabels:"Labels",groupBy:"Group By",aggregate:"Aggregate",count:"Count",sum:"Sum",average:"Average",min:"Min",max:"Max",distinct:"Distinct",editFormula:"Edit Formula",right:"Right",showXAxis:"Show X Axis",showXAxisTitle:"Show X Axis Title",showYAxis:"Show Y Axis",showYAxisTitle:"Show Y Axis Title",showXGridlines:"Show X Gridlines",showYGridlines:"Show Y Gridlines",showDataLabels:"Show Data Labels",showDataPoints:"Show Data Points",stacked:"Stacked",newView:"New",calendarView:"Calendar View",dayView:"Day View",weekView:"Week View",monthView:"Month View",closeSpace:"Remove from Focus",customView:"Custom View",detailsView:"Details View",catalogView:"Catalog View",galleryView:"Gallery View",deleteContext:"Delete Context",openSpace:"Open",setNone:"None",applyItems:"Apply to Items in Folder",rename:"Rename",changeToFolderNote:"Convert to Folder Note",moveFile:"Move File to...",duplicate:"Make a copy",edit:"Edit",delete:"Delete",getHelp:"Make.md Community",openVault:"Open Another Vault",obSettings:"Obsidian Settings",collapseAllSections:"Collapse All Spaces",expandAllSections:"Expand All Spaces",collapseAllFolders:"Collapse All Folders",settings:"Settings",none:"None",tableView:"Table View",cardView:"Card View",boardView:"Board View",listView:"List View",flowView:"Flow View",sortBy:"Sort",filters:"Filters",clearFilters:"Clear Filters",hide:"Hide",unhideFields:"Unhide All Fields",removeFromSpace:"Unpin from ${1}",editCode:"Edit Code",editProperties:"Edit Properties",properties:"Properties",deleteProperty:"Delete Property",hideProperty:"Hide Property",unhideProperty:"Unhide Property",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",deleteRow:"Delete Item",customSort:"Custom Sort",groupSpaces:"Group Spaces",recursiveSort:"Apply to Subfolders",fileNameSortAlphaAsc:"File Name (A to Z)",fileNameSortAlphaDesc:"File Name (Z to A)",fileNameSortNumericalAsc:"File Name (1 to 9)",fileNameSortNumericalDesc:"File Name (9 to 1)",createdTimeSortAsc:"Created Time (new to old)",createdTimeSortDesc:"Created Time (old to new)",modifiedTimeSortAsc:"Modified Time (new to old)",modifiedTimeSortDesc:"Modified Time (old to new)",sizeSortAsc:"Size (smallest to largest)",sizeSortDesc:"Size (largest to smallest)",changeColor:"Color",changePropertyType:"Change Type",folder:"Folder",syncToContext:"Add Property to Context",setIcon:"Set Sticker",copyEmbedLink:"Copy Embed Link",moveUp:"Move Up",moveDown:"Move Down",insertAbove:"Insert Above",insertBelow:"Insert Below",toggleReadMode:"Toggle Read Mode",toggleFullWidth:"Toggle Full Width",showWarnings:"Show Warnings",openFilePane:"Open File Pane",openNativeMenu:"More Options",revealInDefault:"Reveal in Finder",revealInExplorer:"Reveal in Explorer",showHeader:"Show Header",hideHeader:"Hide Header"},editor:{linkName:"${1} Link",linkThumbnail:"${1} Thumbnail",linkSticker:"${1} Sticker",rows:"Rows",columns:"Columns",scaleToFit:"Scale to Fit",scaleToFill:"Scale to Fill",catalog:"Catalog",gallery:"Gallery",grid:"Grid",fit:"Fit",fill:"Fill",stroke:"Stroke",strokeNone:"None",strokeSolid:"Solid",strokeDotted:"Dotted",strokeDashed:"Dashed",size:"Size",gap:"Gap",marginLeft:"Left",marginTop:"Top",marginRight:"Right",marginBottom:"Bottom",minimize:"Minimize",paddingLeft:"Left",paddingTop:"Top",paddingRight:"Right",paddingBottom:"Bottom",unlinkProperty:"Unlink Property",linkedProperty:"Linked Property",linkProperty:"Link Property",currentSpace:"Current Space",opacity:"Opacity",shadowSpread:"Spread",shadowBlur:"Blur",width:"Width",height:"Height",margin:"Margin",padding:"Padding",bold:"Bold",italic:"Italic",underline:"Underline",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignJustify:"Align Justify",numberOfLines:"Lines",createVerticalSection:"Create Vertical Section",createHorizontalSection:"Create Horizontal Section"},buttons:{close:"Close",back:"Back",add:"Add",import:"Import",cancel:"Cancel",create:"Create",togglePin:"Toggle Pin",refresh:"Refresh",showHidden:"Show Hidden",alias:"Alias",addFilter:"Add Filter",loadMore:"Load More",addCondition:"Add Condition",customize:"Customize",moreOptions:"More Options",saveProperty:"Save Property",newNote:"New Note",changeIcon:"Sticker",removeIcon:"Remove Sticker",addIcon:"Add Sticker",addCover:"Add Cover",changeBanner:"Change Cover",changeBannerShort:"Cover",removeBanner:"Remove Cover",rename:"Change Name",createFolder:"New Folder",createCanvas:"New Canvas",addIntoSpace:"Pin Item",addSmartSearch:"Add Join",editProperty:"Edit Property",addContext:"Add Tag",delete:"Delete",toggleFlow:"Toggle Flow",openFlow:"Open Flow",hideFlow:"Hide Flow",addToSpace:"Pin File to...",addToSpaceShort:"Pin",saveTemplate:"Make into template",tag:"Tag",convertTable:"Convert to Markdown",cutTable:"Cut Table",deleteTable:"Delete From Note",addFile:"Add File",renameView:"Rename View",save:"Save",run:"Run",export:"Export",move:"Move",openOverview:"Open Overview",addTime:"Add Time",addFromExisting:"Add from Existing"},metadataTypes:{fileName:"File Name",contexts:"Contexts",isFolder:"Is Folder",path:"Path",folder:"Folder",sticker:"Sticker",color:"Color",created:"Created",lastModified:"Last Modified",extension:"Extension",size:"Size",tags:"Tags",inlinks:"Linked Mentions",outlinks:"Links",label:"Label",fileMetadata:"File Metadata",frontmatter:"Frontmatter"},filterTypes:{contains:"contains",notContains:"does not contain",is:"is",isNot:"is not",before:"before",after:"on or after",anyOf:"is any of",noneOf:"is none of",checked:"is checked",unchecked:"is unchecked",isNotEmpty:"is not empty",isEmpty:"is empty",isSameDate:"is same day as",isSameDateAsToday:"is today"},sortTypes:{alphaAsc:"A to Z",alphaDesc:"Z to A",earliest:"Earliest",latest:"Latest",checkAsc:"Checked \u2192 Unchecked",checkDesc:"Unchecked \u2192 Checked",itemsAsc:"Least Items",itemsDesc:"Most Items"},properties:{aggregate:{label:"Aggregate",description:"Aggregate functions to calculate values"},flex:{label:"Flex",description:"Flexible field to display any type of data"},audio:{label:"Audio"},text:{label:"Text",description:"Text field"},number:{label:"Number",description:"Number field with optional unit"},boolean:{label:"Yes/No",description:"Yes or No toggle to indicate the status"},date:{label:"Date",description:"Select a date from a calendar"},option:{label:"Option",description:"Select one or multiple option from a list"},file:{label:"File"},link:{label:"Link",description:"Link to another note or a website"},tags:{label:"Tags",description:"Use tags to quickly organize your items"},object:{label:"Object",description:"Store any complex objects"},context:{label:"Context",description:"Context property type"},image:{label:"Image",description:"Select any image from your system or from the internet"},color:{label:"Color",description:"Use colors to label your items or status"},space:{label:"Context",description:"Link to a context"},icon:{label:"Sticker",description:"Use stickers to uniquely label your items or status"},super:{label:"Super Property",performAction:"Perform Action",whenClicked:"When Clicked"},fileProperty:{name:"Name",label:"Formula",createdTime:"Created",modifiedTime:"Last Edited",sticker:"Sticker",links:"Links",tags:"Tags",spaces:"Spaces",extension:"Extension",size:"Size",parentFolder:"Folder",description:"Use a formula to dynamically display a property"}},views:{navigator:"Navigator",explorer:"Explorer"},labels:{base0:"Base0",base10:"Base10",base20:"Base20",base30:"Base30",base40:"Base40",base50:"Base50",base60:"Base60",base70:"Base70",base80:"Base80",base90:"Base90",base100:"Base100",installSpaceKit:"Install Space Kit",filesCount:"{$1} Files",someFilesHaveInvalidNames:"Some Files Have Invalid Names",placeholder:"Type '${1}' for commands",toAppendLinkToTheFile:"to append link to the file",notePlaceholder:"New Note for ${1}",noNotesInside:"No Notes Inside",today:"Today",startTimeProperty:"Start Time Property",endTimeProperty:"End Time Property",startOfDay:"Start Of Day",endOfDay:"End Of Day",itemsSelected:"${1} Selected",createATemplateToGetStarted:"Create a template to get started",iconCount:"${1} icons",iconsIn:"Icons in ${1}",showingFirst:"Showing first ${1} of ${2} icons",createNewItem:"Create New Item",autosaveFailed:"Auto-save failed:",editTitle:"Edit title",removeOption:"Remove option",unknownTransformationError:"Unknown transformation error",center:"Center",position:"Position",top:"Top",bottom:"Bottom",value:"Value",pounds:"Pounds",all:"All",duplicateTable:"Duplicate Table",aggregateBy:"Aggregate By",editFormula:"Edit Formula",editObject:"Edit Object",properties:"Properties",newAction:"Action",newTable:"New Table",template:"New Template",rename:"Rename",default:"Default",style:"Style",done:"Done",reposition:"Reposition",tables:"Tables",createSection:"New Folder",createNote:"New Note",select:"Select",pinnedItems:"Pinned Items",making:"Making...",findStickers:"Find Sticker",joinItemsFrom:"Join items from",notIncludingSubfolders:"Not including subfolders",includingSubfolders:"Including subfolders",createNewItemsUsing:"Create new items using",withName:"with name",createTemplate:"Create Template",editTemplate:"Edit Template",noTemplatesFound:"No templates found",createFirstTemplate:"Create your first global template",syncWarnings:"The following issues may affect the synchronization of your files. Please review and resolve them.",noWarnings:"No warnings",resolve:"Resolve",ignore:"Ignore",loadingTemplates:"Loading templates...",selectNote:"Select Note",selectIcon:"Select Sticker",selectSpace:"Select Space",styleSmall:"Small",styleMedium:"Medium",styleLarge:"Large",hiddenFilePattern:"Name, Suffixes and Extension",hiddenFileSpecific:"Exclude specific files and folders",textPlaceholder:"Enter Text",noFile:"File does not exist yet. Click to create.",blinkPlaceholder:"Search for notes, spaces...",searchPlaceholder:"Type to search...",contextItemSelectPlaceholder:"Find Item",linkItemSelectPlaceholder:"Find or Create Note",pinNotePlaceholder:"Select a Note or Space to Pin",optionItemSelectPlaceholder:"Select Option",tagItemSelectPlaceholder:"Find Tag",spaceSelectPlaceholder:"Select any Folder or Tag",propertyItemSelectPlaceholder:"Select Property",sortItemSelectPlaceholder:"Select Sort",filterItemSelectPlaceholder:"Select Filter",newPaletteName:"New palette name...",newProperty:"New Property",newPropertyShort:"New Property",propertyType:"Type",propertyDynamic:"Dynamic",propertyValueSpace:"Space",propertyValueReference:"Related Property",propertyValueAggregate:"Aggregate Property",propertyValueLinked:"Linked Property",propertyValueLinkedPlaceholder:"Add/Select Property",propertyLookup:"Edit Formula",existingFrontmatter:"Existing Property",dateFormat:"Date Format",numberFormat:"Number Format",editOptions:"Edit Options",checkedSticker:"Checked",uncheckedSticker:"Unchecked",indeterminateSticker:"Unset",propertyFileProp:"Property",multiple:"Multiple",hiddenFiles:"Hidden Files",colors:"Colors",stickers:"Stickers",globalTemplates:"Global Templates",loadingPalettes:"Loading palettes...",loadingStickerSets:"Loading sticker sets...",manageHiddenFiles:"Manage Hidden Files",addStickerSet:"Add Sticker Set",iconLibrary:"Icon library",emojiLibrary:"Emoji library",builtin:"Built-in",custom:"Custom",dropIconsHere:"Drop icons here to create a new icon set",dropPalettesHere:"Drop JSON palette files here to import",addExtension:"Add Rule",saveView:"Save View",renameView:"Rename View",backlinks:"Backlinks",spaces:"Spaces",content:"Content",deleteSpace:"Delete Space",deleteFiles:"Delete Files",outgoingLinks:"Outgoing Links",moveTo:"Move to",addTo:"Pin to",copyTo:"Copy to",reorderIn:"Reorder in",color:"Color",backgroundColor:"Background",layout:"Layout",name:"Name",alignment:"Alignment",styles:"Styles",actions:"Actions",script:"Script",formula:"Formula",namePlaceholder:"Name",insert:"Insert",allDay:"all day",templates:"Templates",invalidMKitFile:"Invalid MKit File",noFramesAvailable:"No frames available in this space kit",calculate:"Calculate",noVisualizationConfigured:"No visualization configured",noVisualizationFound:"No visualization found",saveFormula:"Save Formula",selectSticker:"Select Sticker",customize:"Customize",items:"Items",pins:"Pins",joins:"Joins",textStyle:"Text Style",ungroup:"Ungroup",duplicate:"Duplicate",delete:"Delete",list:"List",none:"None",auto:"auto",addKit:"Add Kit",kitLocation:"Kit Location",addKitToSpace:"Add Kit to Space",editPins:"Edit Pins",editJoins:"Edit Joins",editTables:"Edit Tables",editTemplates:"Edit Templates",exportToHTML:"Export to HTML",applyToItems:"Apply to Items",resetView:"Reset View",resetViewDesc:"Reset the view to the default settings",openASpace:"Open a Space",openASpaceDesc:"Open existing folders and tags as a Space or create a new one",setAsDefault:"Set as Default",thisSpaceAndAllSubfolders:"This Space and All Subfolders",changeCoverShort:"Change Cover",link:"Link",caption:"Caption",colorScheme:"Color Scheme",filesAndFolders:"Files and Folders",mkitViewer:"MKit Viewer",lucideIconLibraryForObsidian:"Lucide icon library for Obsidian",emojiIconLibrary:"Emoji icon library",gradients:"Gradients",waypoint:"Waypoint",empty:"Empty",areRequiredForThisLayout:"are required for this layout",showAll:"Show all",limit:"Limit",source:"Source",sizing:"Sizing",interactions:"Interactions",card:"Card",button:"Button",enterTitleForNewItem:"Enter title for new item",functions:"Functions",suggestions:"Suggestions",type:"Type",makeAStaticWebVersionOf:"Make a static web version of",others:"Others",frameHasNoRows:"Frame has no rows",series:"Series:",size:"Size:",label:"Label:",xAxis:"X Axis",yAxis:"Y Axis",unknown:"Unknown",title:"Title",on:"On",quarter:"Quarter",off:"Off",noDataProvided:"No data provided",data:"Data",root:"Root",action:"Action",checklist:"Checklist",home:"Home",frequency:"Frequency",yearly:"Yearly",monthly:"Monthly",weekly:"Weekly",daily:"Daily",hourly:"Hourly",minutely:"Minutely",secondly:"Secondly",until:"Until",interval:"Interval",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",sunday:"Sunday",percent:"Percent",sticker:"Sticker",dollars:"Dollars",euros:"Euros",yuan:"Yuan",rupees:"Rupees",won:"Won",francs:"Francs",rands:"Rands",krones:"Krones",rubles:"Rubles",dinars:"Dinars",pesos:"Pesos",rials:"Rials",ringgits:"Ringgits",drachmas:"Drachmas",kuna:"Kuna",forint:"Forint",koruna:"Koruna",dong:"Dong",lira:"Lira",lev:"Lev",zloty:"Zloty",kip:"Kip",tughrik:"Tughrik",rupiah:"Rupiah",liters:"Liters",seconds:"Seconds",scientific:"Scientific",header:"Header",pageHeaderContainingBannerAndTitle:"Page header containing banner and title",banner:"Banner",slides:"Slides",slide:"Slide",delta:"Delta",displayDataWithCustomFieldTypes:"Display data with custom field types",expanded:"Expanded",showFieldLabels:"Show Field Labels",showFieldIcons:"Show Field Icons",status:"Status",subtitle:"Subtitle",prefix:"Prefix",completed:"Completed",due:"Due",fields:"Fields",priority:"Priority",newItemButton:"New Item Button",showNewItemButton:"Show New Item Button",rows:"Rows",columns:"Columns",masonry:"Masonry",countdown:"Countdown",tabs:"Tabs",page:"Page",checkbox:"Checkbox",preview:"Preview",toNavigate:"to navigate",notImplemented:"Not implemented",board:"Board",nineToOne:"9 \u2192 1",xField:"X-Field",yField:"Y-Field",obsidianSyncCurrentlyWontSyncYourSpaces:"Obsidian Sync currently won't sync your Spaces",obsidianSyncCurrentlyWontSyncYourSpaceViewsOrContext:"Obsidian Sync currently won't sync your Space Views or Context",visualization:"Visualization",blink:{items:"Items",recent:"Recent",createNew:"Create New",newNote:"New Note",newSpace:"New Space",results:"Results"}},descriptions:{defaultMakemlColorPaletteWithThemeColors:"Default Makeml Color Palette With Theme Colors",monochromeColorPaletteWithBaseColors:"Monochrome Color Palette With Base Colors",defaultGradientPaletteWithBeautifulGradients:"Default Gradient Palette With Beautiful Gradients",softPastelColorsForGentleVisualizations:"Soft Pastel Colors For Gentle Visualizations",installing:"Installing",loopOverAList:"Loop Over A List",loop:"Loop",onlyContinueIfAConditionIsMet:"Only Continue If A Condition Is Met",filter:"Filter",useAFormulaToCalculateAResult:"Use A Formula To Calculate A Result",formula:"Formula",creating:"Creating",pasteUrlsHereOnePerLine:"Paste Urls Here One Per Line",pasteYourPaletteJsonHere:"Paste Your Palette Json Here",createAndEditGlobalTemplatesStoredInSpacetemplatesFolder:"Create And Edit Global Templates Stored In Spacetemplates Folder",searchForImagesInYourVaultOrPasteAUrl:"Search For Images In Your Vault Or Paste A Url",getPropertyColor:"Get Property Color",getTheColorForAPropertyValue:"Get The Color For A Property Value",getPropertySticker:"Get Property Sticker",getTheStickericonForAProperty:"Get The Stickericon For A Property",parsePropertyValue:"Parse Property Value",getContentsOfPath:"Get Contents Of Path",getPropertiesOfPath:"Get Properties Of Path",getPathLabel:"Get Path Label",getTheLabelForAPath:"Get The Label For A Path",getPathThumbnail:"Get Path Thumbnail",getTheThumbnailForAPath:"Get The Thumbnail For A Path",writeToPath:"Write To Path",mode:"Mode",append:"Append",getItemsInsideOfPath:"Get Items Inside Of Path",writeToFile:"Write To File",setPathProperty:"Set Path Property",setAPropertyOnAPath:"Set A Property On A Path",showPathContextMenu:"Show Path Context Menu",showContextMenuForAPath:"Show Context Menu For A Path",executeAFormulaWithParameters:"Execute A Formula With Parameters",index:"Index",schema:"Schema",createANewTable:"Create A New Table",openTableRow:"Open Table Row",openATableRow:"Open A Table Row",showTableRowContextMenu:"Show Table Row Context Menu",showContextMenuForATableRow:"Show Context Menu For A Table Row",openTableRowEditModal:"Open Table Row Edit Modal",openEditModalForATableRow:"Open Edit Modal For A Table Row",openTableRowCreateModal:"Open Table Row Create Modal",openCreateModalForANewTableRow:"Open Create Modal For A New Table Row",field:"Field",parseADateString:"Parse A Date String",daysInMonth:"Days In Month",getNumberOfDaysInAMonth:"Get Number Of Days In A Month",formatADateWithAPattern:"Format A Date With A Pattern",format:"Format",getDateComponent:"Get Date Component",getAComponentOfADate:"Get A Component Of A Date",component:"Component",dayOfWeek:"Day Of Week",offsetADateByAnAmount:"Offset A Date By An Amount",offset:"Offset",getTheCurrentDate:"Get The Current Date",getCurrentDate:"Get Current Date",getARangeOfDates:"Get A Range Of Dates",spaceActions:"Create actions that run when you press a button",spaceLists:"Create lists to track data and organize them in your space",spaceTemplates:"Create templates to quickly add items to your space",smartSearch:"Automatically pin notes to this space based on a set of searches",deleteSpace:"Deleting the space will also delete the folder and its contents.",deleteFiles:"Delete ${1} files/folders and their contents?",spaceProperties:"Define Properties for your Space Items",templateNameFormula:"Template Name Formula",hiddenFileOptions:"Hidden File Options",maxStepsReachedYouCanChangeThisInSettings:"Max steps reached, you can change this in settings."},notice:{invalidStickerPackFile:"Invalid Sticker Pack File",fileExists:"File Already Exists",templateSaved:"Template saved to space: ",tableDeleted:"Table removed from Note. You can find the table in the folder Space",copyError:"Copy Error",reload:"Reload",kitDoesntExist:"Kit doesn't exist",kitAdded:"Kit added",error:"Error: ",invalidKitURL:"Invalid Kit URL",cantConvertNoteToSpace:"Can't Convert Note to Space",newSpaceName:"New Space Name",duplicateSpaceName:"Duplicate Space Name",noPropertyName:"No Property Name",duplicatePropertyName:"Duplicate Property Name",palette:"Palette",noPropertiesFound:"No Properties Found",somethingWentWrong:"Something Went Wrong",noExistingValues:"No Existing Values"},settings:{importUrls:"Import Urls",exportUrls:"Export Urls",removeImage:"Remove Image",color1:"Color1",dropColorPaletteHereToImport:"Drop Color Palette Here To Import",nameOfYourSystem:"Name Of Your System",manageGlobalTemplates:"Manage Global Templates",stickerPack:"Sticker Pack",other:"Other",dropLanguagePackHereToImport:"Drop Language Pack Here To Import",flow:"Flow",untitled:"Untitled",tags:"Tags",vault:"Vault",title:"Settings",tooltips:{deletePalette:"Delete palette",resetToDefault:"Reset to default",removeColor:"Remove color",addColor:"Add color",deleteStickerSet:"Delete sticker set",addGradientStop:"Add gradient stop",stopPosition:"Stop position (%)",removeGradientStop:"Remove selected gradient stop",importPalette:"Import palette from JSON",exportPalette:"Export palette to JSON",invalidPaletteFormat:"Invalid palette file format. Must have 'name' and 'colors' array.",invalidJSON:"Invalid JSON format"},ariaLabels:{noColorApplied:"This element will have no color applied.",closeOnboarding:"Close onboarding",dataSource:"Data Source",chartType:"Chart Type",legendConfiguration:"Legend Configuration",colorConfiguration:"Color Configuration",close:"Close",toggleXAxis:"Toggle X Axis",toggleXAxisLabel:"Toggle X Axis Label",toggleXGridlines:"Toggle X Gridlines",toggleXAxisLine:"Toggle X Axis Line",toggleStackedMode:"Toggle Stacked Mode",toggleYAxis:"Toggle Y Axis",toggleYAxisLabel:"Toggle Y Axis Label",toggleDataLabels:"Toggle Data Labels",toggleYGridlines:"Toggle Y Gridlines",toggleYAxisLine:"Toggle Y Axis Line",toggleLegend:"Toggle Legend",legendPosition:"Legend Position",legendAlignment:"Legend Alignment",toggleLineSmoothing:"Toggle Line Smoothing",toggleStroke:"Toggle Stroke",toggleDataPoints:"Toggle Data Points",toggleDonutChart:"Toggle Donut Chart"},onboarding:{welcome:"Welcome to Make.md",welcomeDesc:"Welcome to Make.md! Let's configure your essential settings to get you started.",walkthrough:"We'll walk through the most important options to customize your experience.",coreFeatures:"Core Features",enableNavigator:"Enable Navigator (sidebar file browser)",enableNavigatorDesc:"Show the enhanced file navigator in the sidebar",enableSpaceViews:"Enable Space Views",enableSpaceViewsDesc:"Create custom views and organize content in spaces",enableContexts:"Enable Contexts & Properties",enableContextsDesc:"Add structured data and metadata to your notes",interfacePreferences:"Interface Preferences",showBanners:"Show Note Banners",showBannersDesc:"Display banner images at the top of notes",showFileIcons:"Show File Icons",showFileIconsDesc:"Display custom icons next to files and folders",systemName:"System Name",systemNameDesc:"Customize the name of your workspace",previous:"Previous",next:"Next",skipTour:"Skip Tour",getStarted:"Get Started"},categories:{core:"Core",appearance:"Appearance",system:"System"},sections:{general:"General",navigator:"Navigator",appearance:"Appearance",coverImage:"Cover Image",interaction:"Preferences",context:"Context",label:"Labels",tags:"Tags",space:"Spaces",performance:"Performance",advanced:"Advanced",folderNote:"Folder Note",notes:"Notes",assets:"Assets",language:"Language",colors:"Colors",stickers:"Stickers",hidden:"Hidden Files"},cacheIndex:{name:"Cache Search Index",desc:"Cache the index for faster search results"},layoutVertical:"Vertical",layoutHorizontal:"Horizontal",sectionGeneral:"General",sectionSidebar:"Spaces",sectionEditor:"Maker Mode",sectionFlow:"Flow",sectionAdvanced:"Advanced",sectionDataview:"Dataview",sectionContext:"Context",sectionStickers:"Labels",sectionNavigator:"Navigator",sectionDefault:"Default Spaces",sectionSpaceView:"Space View",sectionBlink:"Blink",sectionInlineContext:"Inline Context",sectionFlowBlock:"Flow Block",sectionFlowMenu:"Flow Menu",sectionFlowStyler:"Flow Styler",experimental:{name:"Experimental",desc:"Experimental features that are subject to change and may not be optimized for performance"},noteThumbnails:{name:"Note Thumbnails",desc:"Create thumbnails for notes"},imageThumbnails:{name:"Image Thumbnails",desc:"Create thumbnails for images to speed up performance"},hiddenExtensions:{name:"Hidden Extensions",desc:"File extensions and names to hide from the navigator"},minimalThemeFix:{name:"Minimal Theme Fix",description:"Apply fixes for the popular theme Minimal"},inlineStickerMenu:{name:"Inline Stickers",desc:"Add inline stickers by typing :"},openSpacesOnLaunch:{name:"Open Navigator as Default Tab",desc:"Open the Navigator tab when Obsidian launches"},overrideNativeMenu:{name:"Use Obsidian Context Menu",desc:"Show the Obsidian context menu instead of Make.md"},editStickerInSidebar:{name:"Edit Stickers in Sidebar",desc:"Edit stickers directly in the sidebar"},notesPreview:{name:"Notes Preview",desc:"Show a preview of notes, may cause performance issues"},spacesRightSplit:{name:"Navigator on Right Side",desc:"Open the Navigator in the right panel"},defaultSpaceTemplate:{name:"Default Space Template",desc:"Select the default template for new spaces"},datePickerTime:{name:"Date Picker Time",desc:"Select time by default in the date picker"},defaultDateFormat:{name:"Default Date Format",desc:"Set the default date format, example: yyyy-MM-dd (see https://date-fns.org/v2.30.0/docs/format)"},defaultTimeFormat:{name:"Default Time Format",desc:"Set the default time format, example: h:mm a (see https://date-fns.org/v2.30.0/docs/format)"},autoAddContextsToSubtags:{name:"Apply Properties to Subtags",desc:"Automatically apply context properties to subtags"},newNotePlaceholder:{name:"New Note Placeholder",desc:"Default name for new notes, applies to the Navigator buttons and the New Note command"},folderIndentationLines:{name:"Show Folder Indentation Lines",desc:"Turn on to show a line on the left of folders to indicate indentation"},folderNoteLocation:{name:"Folder Note Location Inside Folder",desc:"Turn on to have folder notes inside the folder, turn off to have it outside"},folderViewDefault:{name:"Show Folder Note by Default",desc:"Show the folder note by default when opening a folder"},internalLinkFlowEditor:{name:"Show Toggles to Open Flow Editor on Links",desc:"Turn on to toggle Flow Blocks directly in inline links"},internalLinkSticker:{name:"Show Stickers on Links",desc:"Turn on to toggle stickers shown directly by beside internal links"},saveAllContextToFrontmatter:{name:"Sync Context Fields to Frontmatter",desc:"Turn on to automatically save all context fields to Frontmatter fields, not just existing Frontmatter fields."},syncFormulaToFrontmatter:{name:"Sync Formula Fields to Frontmatter",desc:"Turn on to save calculated formula values to Frontmatter fields."},spaceSubFolder:{name:"Space Folder Name",desc:"Name of the folder for spaces"},basics:{name:"Make.md Basics",desc:"Enable features from Make.md Basics including styler and flow blocks"},spacesFolder:{name:"Tag Space Folder",desc:"Name of the folder for tag spaces"},inlineContext:{name:"Notes Header",desc:"Show a header to display labels and properties"},banners:{name:"Cover Image",desc:"Show a cover image for notes and spaces"},inlineContextProperties:{name:"Show Context Properties in Header",desc:"Show the properties in the header for notes and spaces"},inlineContextExpanded:{name:"Auto Expand Context Properties",desc:"Expand the inline context sections when opening a note"},inlineContextNameLayout:{name:"Title and Sticker Layout",desc:"Layout for inline title and sticker in Inline Context"},hideFrontmatter:{name:"Hide Context Properties",desc:"Hide properties you have added in context from the Obsidian properties panel"},autoOpenFileContext:{name:"Auto Open Explorer",desc:"Automatically open explorer panel in the right panel"},enableFolderNote:{name:"Enable Folder Note",desc:"Access the folder note in the folder page and hide the folder note from spaces"},folderNoteName:{name:"Folder Note Name",desc:"Name of the folder note, keep blank to use the same name as the folder"},expandFolderOnClick:{name:"Auto Expand Folder",desc:"Auto expand folders on click"},filePreviewOnHover:{name:"Preview on Hover",desc:"Preview on Hover while holding Control/Command key"},revealActiveFile:{name:"Reveal Active File",desc:"Automatically reveal the active file in Navigator"},contextEnabled:{name:"Contexts",desc:"Contexts allows you to have full control over the metadata of your files"},navigatorEnabled:{name:"Navigator",desc:"The navigator lets you create and organize your spaces"},spacesStickers:{name:"Stickers",desc:"Use Emojis to make it easier to find your notes"},spacesUseAlias:{name:"Alias",desc:"Use the alias metadata to show in Navigator"},spacesDisablePatch:{name:"Compatibility Mode",desc:"This will improve the compatibility of plugins while using the Navigator, however will turn off linking to spaces from breadcrumbs"},deleteFileOption:{name:"Delete File Option",desc:"Select how you want files to be deleted"},spacesDeleteOptions:{permanent:"Delete Permanently",trash:"Move to Obsidian Trash","system-trash":"Move to System Trash"},flowState:{name:"Flow State",desc:"Toggle the flow state"},showRibbon:{name:"App Ribbon",desc:"Show/hide the left menu aka. ribbon"},vaultSelector:{name:"Vault Selector",desc:"Show/hide the vault selector at the bottom"},spaceViewEnabled:{name:"Spaces",desc:"Customize your folders and tags with properties and views"},defaultSpaces:{name:"Default Spaces",desc:"Recommended Spaces for quickly organizing your vault"},homeSpace:{name:"Home Space",desc:"An easy-to-access space where you can add/organize your other spaces"},enableDefaultSpaces:{name:"Tag Spaces",desc:"Automatically create spaces for each of your tags"},readableLineWidth:{name:"Readable Line Width",desc:"Use Readable Line Width"},sidebarTabs:{name:"Sidebar Tabs",desc:"Show/hide other sidebar tabs"},spacesPerformance:{name:"Navigator Scroll Performance",desc:"Turn on performance mode for Navigator, may affect scrolling appearance. Requires Restart"},indexSVG:{name:"Use SVGs as Stickers",desc:"Use any svg file in your vault as a sticker"},language:{name:"Customize Interface Language",desc:"Modify any text in the interface. Changes require a reload to take effect.",loadingSettings:"Loading language settings...",exportJSON:"Export JSON",importJSON:"Import JSON",importJSONDesc:"Paste your language JSON here. Only modified values will be imported.",pasteJSONPlaceholder:"Paste your JSON here...",import:"Import",cancel:"Cancel",copied:"Copied!",resetAll:"Reset All",search:"Search",searchDesc:"Search by key or text value",showingCount:"Showing {{filtered}} of {{total}} strings",original:"Original",invalidJSON:"Invalid JSON format. Please check your input."},inlineStyler:{name:"Flow Styler",desc:"Select text to add styling"},inlineStylerColor:{name:"Text and Highlight Colors \u{1F9EA}",desc:"Select text color and highlight color, (this may change in the future because of the limitations with HTML and Obsidian)"},spaceRowHeight:{name:"Row Height",desc:"The height for each row in navigator (in pixels), default is 29"},mobileSpaceRowHeight:{name:"Row Height - Mobile",desc:"The height for each row in navigator for mobile (in pixels), default is 40"},contextPagination:{name:"Table View Pagination",desc:"Number of items per page in table view"},bannerHeight:{name:"Cover Height",desc:"The height for the cover of the note or space, default is 200"},makeChar:{name:"Flow Menu Trigger",desc:"Character to open the Flow Menu"},mobileMakeBar:{name:"Flow Styler (Mobile)",desc:"Replaces the mobile toolbar"},editorMarkSans:{name:"Mark Sans \u{1F9EA}",desc:"Use the editor without Markdown."},editorMakePlaceholder:{name:"Flow Menu Hint Text",desc:"Show a hint text on how to open the Flow Menu Shortcut"},blinkEnabled:{name:"Blink",desc:"A faster way to search and edit your notes"},editorMakeMenu:{name:"Flow Menu",desc:"Open the Flow menu to quickly add content"},editorMakeMenuTrigger:{name:"Flow Menu Shortcut",desc:"Trigger key to use flow menu"},editorFlowReplace:{name:"Flow Block",desc:"Open your internal links or toggle your embeds in the flow block."},editorFlowStyle:{name:"Flow Block Style",desc:"Select a theme for your flow block",seamless:"Seamless",minimal:"Minimal"},contextCreateUseModal:{name:"Use Modal for Creating Items",desc:"Use a modal to create new items in contexts"},changeTheSyncSettingsToIncludeUnsupportedFileTypes:{name:"Change the sync settings to include unsupported file types",desc:"Change the sync settings to include unsupported file types"},noVisualizationConfigured:{name:"No visualization configured",desc:"No visualization configured"},maxStepsReachedYouCanChangeThisInSettings:{name:"Max steps reached, you can change this in settings.",desc:"Max steps reached, you can change this in settings."}},colors:{red:"Red",pink:"Pink",orange:"Orange",yellow:"Yellow",green:"Green",turquoise:"Turquoise",teal:"Teal",blue:"Blue",purple:"Purple",brown:"Brown",charcoal:"Charcoal",gray:"Gray",gold:"Gold",plum:"Plum",khaki:"Khaki",moccasin:"Moccasin",lavender:"Lavender"},units:{celsius:"Celsius",fahrenheit:"Fahrenheit",yen:"Yen",baht:"Baht",ounces:"Ounces",miles:"Miles",feet:"Feet",inches:"Inches",centimeters:"Centimeters",millimeters:"Millimeters",kilograms:"Kilograms",grams:"Grams"},formulas:{prop:"Get the value of a property",slice:"Get a part of a text",if:"If condition is true return the first argument else return the second",ifs:"If the first condition is true return the first argument else check the next condition",empty:"Check if a list is empty",length:"Get the length of a list",values:"Get the number of values in a list",uniques:"Get the number of unique values in a list",substring:"Get a substring of a string",startsWith:"Check if a string starts with another string",contains:"Check if a string contains another string",test:"Test a string with a regex",match:"Match a string with a regex",replace:"Replace a string with another string",replaceAll:"Replace all occurences of a string with another string",lower:"Convert a string to lowercase",upper:"Convert a string to uppercase",repeat:"Repeat a string",format:"Format a value to string",toNumber:"Convert a value to a number",now:"Get the current date",minute:"Get the minutes of a date",hour:"Get the hours of a date",day:"Get the day of a date",date:"Get the date of a date",week:"Get the week of a date",month:"Get the month of a date",year:"Get the year of a date",pad:"Pad a number with text",range:"Get the difference between the largest and smallest from a list of numbers",latest:"Get the latest date of a list of dates",earliest:"Get the earliest date of a list of dates",dateRange:"Get the date range of a list of dates",dateAdd:"Add an amount to a date",dateSubtract:"Subtract an amount from a date",dateBetween:"Get the difference between two dates",spaceItems:"Get the items inside of a path",spaces:"Get the spaces the path is inside of",timeStamp:"Get the timestamp of a date",at:"Get an element at a specific index",first:"Get the first element of a list",last:"Get the last element of a list",concat:"Concatenate two lists",sort:"Sort a list",reverse:"Reverse a list",join:"Turn a list into text separator",includes:"Check if a list includes a value",split:"Split text into a list using a separator",formatDate:"Format a date into text",parseDate:"Transform date from text",find:"Find an element in a list",findIndex:"Find the index of an element in a list",filter:"Filter a list based on a condition",map:"Change all the values in a list based on a formula",some:"Check if some elements in a list are true",every:"Check if every element in a list is true",flat:"Flatten a list of lists into a single list",path:"Get the path object of a path",let:"Define a variable to use in a formula",lets:"Define multiple variables to use in a formula"}};var jQ=class{constructor(){this.overrides={};this.strings=this.loadDefaultStrings()}loadDefaultStrings(){return{en:wfe}}getStrings(){return((r,n)=>{let i={...r};for(let[a,o]of Object.entries(n)){let s=a.split("."),l=i;for(let u=0;u<s.length-1;u++)l[s[u]]||(l[s[u]]={}),l=l[s[u]];l[s[s.length-1]]=o}return i})(this.strings.en,this.overrides)}loadCustomStrings(t){this.overrides=t}setOverridesFromFile(t){this.overrides=t||{}}},Im=new jQ;var IXe=new Proxy({},{get(e,t,r){return Reflect.get(Im.getStrings(),t,r)},ownKeys(e){return Reflect.ownKeys(Im.getStrings())},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(Im.getStrings(),t)}}),N=IXe;var lr="files",yd={id:lr,name:"Items",type:"db",primary:"true"};var Va={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},Tp={...Va,rows:[{name:ut,schemaId:lr,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:"Created",schemaId:lr,type:"fileprop",value:ut+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]},PQ=e=>Tp,zS=[{name:"Name",schemaId:"",type:"text",primary:"true"}],Zj={...Va,rows:[{name:ut,schemaId:lr,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]};var Ns=e=>e?e.type=="fileprop"?$t(e.value,"fileprop")?.type??"text":e.type:null,fi=e=>e.attrs?.length>0?or(e.attrs)?.icon??Zs(e.type,e.name)?.icon:Zs(e.type,e.name)?.icon,eP=e=>e.def?.icon?.length>0?e.def?.icon:"ui//layout-list",Sfe=e=>or(e?.def)?.icon??"ui//layout-list",Zs=(e,t)=>t==ut?el.find(r=>r.type=="file"):t?.toLowerCase()=="tags"?el.find(r=>r.type=="tags-multi"):t=="aliases"?el.find(r=>r.type=="option-multi"):t=="sticker"?el.find(r=>e=="icon"):el.find(r=>e==r.type)||el.find(r=>e==r.multiType),el=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"any",label:"",restricted:!0,icon:"ui//wildcard",multi:!0,multiType:"any-multi"},{type:"text",label:N.properties.text.label,metadata:!0,icon:"ui//text",primative:!0,flex:!0,description:N.properties.text.description},{type:"number",label:N.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["format","sticker"],primative:!0,flex:!0,description:N.properties.number.description},{type:"boolean",label:N.properties.boolean.label,metadata:!0,icon:"ui//check-square",configKeys:["checked","unchecked","indeterminate"],primative:!0,flex:!0,description:N.properties.boolean.description},{type:"date",label:N.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],primative:!0,flex:!0,description:N.properties.date.description},{type:"option",label:N.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",primative:!0,configKeys:["options","source","sourceProps","colorScheme"],description:N.properties.option.description},{type:"tags-multi",label:N.properties.tags.label,icon:"ui//tags",description:N.properties.tags.description},{type:"file",label:N.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:N.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value","type","format"],flex:!0,description:N.properties.fileProperty.description},{type:"link",label:N.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",primative:!0,flex:!0,description:N.properties.link.description},{type:"context",label:N.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space","field"],description:N.properties.context.description},{type:"flex",label:N.properties.flex.label,icon:"ui//flex",multi:!1,configKeys:["type","format","options"],description:N.properties.flex.description},{type:"aggregate",label:N.properties.aggregate.label,icon:"ui//aggregate",multi:!1,configKeys:["ref","space","schema","filters","field","fn","format"],flex:!0,description:N.properties.aggregate.description},{type:"object",label:N.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type","typeName"],description:N.properties.object.description},{type:"icon",label:N.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",restricted:!0,description:N.properties.icon.description},{type:"image",label:N.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",primative:!0,flex:!0,description:N.properties.image.description},{type:"color",label:N.properties.color.label,icon:"ui//mk-make-image",restricted:!0,description:N.properties.color.description},{type:"space",label:N.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:N.properties.space.description},{type:"table",label:N.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:N.properties.space.description},{type:"super",label:N.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:N.properties.super.label,icon:"ui//input",restricted:!0}];var Bm="filesView",Lm={id:Bm,name:"All",type:"view",def:JSON.stringify({db:lr,icon:"ui//file-stack"})},Qb="main",tP=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),Efe={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[tP(Qb),Lm]},ZA={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[yd]},kfe=e=>BXe,BXe={schema:yd,cols:Tp.rows,rows:[]},_It={schema:yd,cols:Tp.rows,rows:[]},IIt={schema:yd,cols:Zj.rows,rows:[]},Cfe=(e,t)=>e.filter(r=>t.find(n=>n.id==r.schemaId&&n.type=="db")).reduce((r,n)=>({...r,...r[n.schemaId]?{[n.schemaId]:{uniques:n.unique=="true"?[...r[n.schemaId].uniques,n.name]:r[n.schemaId].uniques,cols:[...r[n.schemaId].cols,n.name],rows:[]}}:{[n.schemaId]:{uniques:n.unique=="true"?[n.name]:[],cols:[n.name],rows:[]}}}),{}),Dfe=e=>LXe,LXe={m_schema:ZA,m_fields:Tp,...Cfe(Tp.rows,ZA.rows)},BIt={m_schema:ZA,m_fields:Zj,...Cfe(Zj.rows,ZA.rows)};var QS=ge(On());var MT=["MO","TU","WE","TH","FR","SA","SU"],Ms=function(){function e(t,r){if(r===0)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=r}return e.fromStr=function(t){return new e(MT.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},e.prototype.toString=function(){var t=MT[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},e.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},e}();var Ga=function(e){return e!=null},bd=function(e){return typeof e=="number"},_Q=function(e){return typeof e=="string"&&MT.includes(e)},nu=Array.isArray,Np=function(e,t){t===void 0&&(t=e),arguments.length===1&&(t=e,e=0);for(var r=[],n=e;n<t;n++)r.push(n);return r};var oi=function(e,t){var r=0,n=[];if(nu(e))for(;r<t;r++)n[r]=[].concat(e);else for(;r<t;r++)n[r]=e;return n},Tfe=function(e){return nu(e)?e:[e]};function Yb(e,t,r){r===void 0&&(r=" ");var n=String(e);return t=t>>0,n.length>t?String(n):(t=t-n.length,t>r.length&&(r+=oi(r,t/r.length)),r.slice(0,t)+String(n))}var Nfe=function(e,t,r){var n=e.split(t);return r?n.slice(0,r).concat([n.slice(r).join(t)]):n},Wu=function(e,t){var r=e%t;return r*t<0?r+t:r},rP=function(e,t){return{div:Math.floor(e/t),mod:Wu(e,t)}},xd=function(e){return!Ga(e)||e.length===0},fs=function(e){return!xd(e)},di=function(e,t){return fs(e)&&e.indexOf(t)!==-1};var tg=function(e,t,r,n,i,a){return n===void 0&&(n=0),i===void 0&&(i=0),a===void 0&&(a=0),new Date(Date.UTC(e,t-1,r,n,i,a))},RXe=[31,28,31,30,31,30,31,31,30,31,30,31],Ofe=1e3*60*60*24,nP=9999,Ffe=tg(1970,1,1),qXe=[6,0,1,2,3,4,5];var US=function(e){return e%4===0&&e%100!==0||e%400===0},IQ=function(e){return e instanceof Date},Xb=function(e){return IQ(e)&&!isNaN(e.getTime())};var $Xe=function(e,t){var r=e.getTime(),n=t.getTime(),i=r-n;return Math.round(i/Ofe)},OT=function(e){return $Xe(e,Ffe)},iP=function(e){return new Date(Ffe.getTime()+e*Ofe)},zXe=function(e){var t=e.getUTCMonth();return t===1&&US(e.getUTCFullYear())?29:RXe[t]},e0=function(e){return qXe[e.getUTCDay()]},BQ=function(e,t){var r=tg(e,t+1,1);return[e0(r),zXe(r)]},aP=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},oP=function(e){var t=new Date(e.getTime());return t},LQ=function(e){for(var t=[],r=0;r<e.length;r++)t.push(oP(e[r]));return t},t0=function(e){e.sort(function(t,r){return t.getTime()-r.getTime()})},HS=function(e,t){t===void 0&&(t=!0);var r=new Date(e);return[Yb(r.getUTCFullYear().toString(),4,"0"),Yb(r.getUTCMonth()+1,2,"0"),Yb(r.getUTCDate(),2,"0"),"T",Yb(r.getUTCHours(),2,"0"),Yb(r.getUTCMinutes(),2,"0"),Yb(r.getUTCSeconds(),2,"0"),t?"Z":""].join("")},FT=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,r=t.exec(e);if(!r)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[5],10)||0,parseInt(r[6],10)||0,parseInt(r[7],10)||0))},Mfe=function(e,t){var r=e.toLocaleString("sv-SE",{timeZone:t});return r.replace(" ","T")+"Z"},jfe=function(e,t){var r=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(Mfe(e,r)),i=new Date(Mfe(e,t??"UTC")),a=i.getTime()-n.getTime();return new Date(e.getTime()-a)};var UXe=function(){function e(t,r){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=r,t==="between"?(this.maxDate=r.inc?r.before:new Date(r.before.getTime()-1),this.minDate=r.inc?r.after:new Date(r.after.getTime()+1)):t==="before"?this.maxDate=r.inc?r.dt:new Date(r.dt.getTime()-1):t==="after"&&(this.minDate=r.inc?r.dt:new Date(r.dt.getTime()+1))}return e.prototype.accept=function(t){++this.total;var r=this.minDate&&t<this.minDate,n=this.maxDate&&t>this.maxDate;if(this.method==="between"){if(r)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return r?!0:(this.add(t),!1);return this.add(t)},e.prototype.add=function(t){return this._result.push(t),!0},e.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;case"before":case"after":default:return t.length?t[t.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),r0=UXe;var RQ=function(e,t){return RQ=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},RQ(e,t)};function VS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");RQ(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var da=function(){return da=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},da.apply(this,arguments)};function sP(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Uv(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function Lt(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var HXe=function(e){VS(t,e);function t(r,n,i){var a=e.call(this,r,n)||this;return a.iterator=i,a}return t.prototype.add=function(r){return this.iterator(r,this._result.length)?(this._result.push(r),!0):!1},t}(r0),qQ=HXe;var VXe={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},Kb=VXe;var Pfe=function(e,t){return e.indexOf(t)!==-1},GXe=function(e){return e.toString()},WXe=function(e,t,r){return"".concat(t," ").concat(r,", ").concat(e)},QXe=function(){function e(t,r,n,i){if(r===void 0&&(r=GXe),n===void 0&&(n=Kb),i===void 0&&(i=WXe),this.text=[],this.language=n||Kb,this.gettext=r,this.dateFormatter=i,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),o=[].concat(this.options.bynmonthday);a.sort(function(c,f){return c-f}),o.sort(function(c,f){return f-c}),this.bymonthday=a.concat(o),this.bymonthday.length||(this.bymonthday=null)}if(Ga(this.origOptions.byweekday)){var s=nu(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],l=String(s);this.byweekday={allWeeks:s.filter(function(c){return!c.n}),someWeeks:s.filter(function(c){return Boolean(c.n)}),isWeekdays:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")===-1&&l.indexOf("SU")===-1,isEveryDay:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")!==-1&&l.indexOf("SU")!==-1};var u=function(c,f){return c.weekday-f.weekday};this.byweekday.allWeeks.sort(u),this.byweekday.someWeeks.sort(u),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){var r=!0;if(!(t.options.freq in e.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var n in t.origOptions){if(Pfe(["dtstart","tzid","wkst","freq"],n))return!0;if(!Pfe(e.IMPLEMENTED[t.options.freq],n))return!1}return r},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[dr.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var r=this.options.until;this.add(this.dateFormatter(r.getUTCFullYear(),this.language.monthNames[r.getUTCMonth()],r.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},e.prototype.HOURLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("hours"):t("hour"))},e.prototype.MINUTELY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("minutes"):t("minute"))},e.prototype.DAILY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("day")):(this.options.interval===1&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},e.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("months"):t("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("years"):t("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(this.plural(this.options.byweekno.length)?t("weeks"):t("week")).add(this.list(this.options.byweekno,void 0,t("and")))},e.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},e.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},e.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},e.prototype.nth=function(t){t=parseInt(t.toString(),10);var r,n=this.gettext;if(t===-1)return n("last");var i=Math.abs(t);switch(i){case 1:case 21:case 31:r=i+n("st");break;case 2:case 22:r=i+n("nd");break;case 3:case 23:r=i+n("rd");break;default:r=i+n("th")}return t<0?r+" "+n("last"):r},e.prototype.monthtext=function(t){return this.language.monthNames[t-1]},e.prototype.weekdaytext=function(t){var r=bd(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[r]},e.prototype.plural=function(t){return t%100!==1},e.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},e.prototype.list=function(t,r,n,i){var a=this;i===void 0&&(i=","),nu(t)||(t=[t]);var o=function(l,u,c){for(var f="",d=0;d<l.length;d++)d!==0&&(d===l.length-1?f+=" "+c+" ":f+=u+" "),f+=l[d];return f};r=r||function(l){return l.toString()};var s=function(l){return r&&r.call(a,l)};return n?o(t.map(s),i,n):t.map(s).join(i+" ")},e}(),rg=QXe;var YXe=function(){function e(t){this.done=!0,this.rules=t}return e.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&this.symbol===null},e.prototype.nextSymbol=function(){var t,r;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;t=null;for(var i in this.rules){n=this.rules[i];var a=n.exec(this.text);a&&(t===null||a[0].length>t[0].length)&&(t=a,r=i)}if(t!=null&&(this.text=this.text.substr(t[0].length),this.text===""&&(this.done=!0)),t==null){this.done=!0,this.symbol=null,this.value=null;return}}while(r==="SKIP");return this.symbol=r,this.value=t,!0},e.prototype.accept=function(t){if(this.symbol===t){if(this.value){var r=this.value;return this.nextSymbol(),r}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},e}();function jT(e,t){t===void 0&&(t=Kb);var r={},n=new YXe(t.tokens);if(!n.start(e))return null;return i(),r;function i(){n.expect("every");var d=n.acceptNumber();if(d&&(r.interval=parseInt(d[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":r.freq=dr.DAILY,n.nextSymbol()&&(o(),f());break;case"weekday(s)":r.freq=dr.WEEKLY,r.byweekday=[dr.MO,dr.TU,dr.WE,dr.TH,dr.FR],n.nextSymbol(),o(),f();break;case"week(s)":r.freq=dr.WEEKLY,n.nextSymbol()&&(a(),o(),f());break;case"hour(s)":r.freq=dr.HOURLY,n.nextSymbol()&&(a(),f());break;case"minute(s)":r.freq=dr.MINUTELY,n.nextSymbol()&&(a(),f());break;case"month(s)":r.freq=dr.MONTHLY,n.nextSymbol()&&(a(),f());break;case"year(s)":r.freq=dr.YEARLY,n.nextSymbol()&&(a(),f());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":r.freq=dr.WEEKLY;var p=n.symbol.substr(0,2).toUpperCase();if(r.byweekday=[dr[p]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var h=l();if(!h)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");r.byweekday.push(dr[h]),n.nextSymbol()}o(),c(),f();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(r.freq=dr.YEARLY,r.bymonth=[s()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var m=s();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected month");r.bymonth.push(m),n.nextSymbol()}a(),f();break;default:throw new Error("Unknown symbol")}}function a(){var d=n.accept("on"),p=n.accept("the");if(!!(d||p))do{var h=u(),m=l(),v=s();if(h)m?(n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(dr[m].nth(h))):(r.bymonthday||(r.bymonthday=[]),r.bymonthday.push(h),n.accept("day(s)"));else if(m)n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(dr[m]);else if(n.symbol==="weekday(s)")n.nextSymbol(),r.byweekday||(r.byweekday=[dr.MO,dr.TU,dr.WE,dr.TH,dr.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var A=n.acceptNumber();if(!A)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(r.byweekno=[parseInt(A[0],10)];n.accept("comma");){if(A=n.acceptNumber(),!A)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.byweekno.push(parseInt(A[0],10))}}else if(v)n.nextSymbol(),r.bymonth||(r.bymonth=[]),r.bymonth.push(v);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function o(){var d=n.accept("at");if(!!d)do{var p=n.acceptNumber();if(!p)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(r.byhour=[parseInt(p[0],10)];n.accept("comma");){if(p=n.acceptNumber(),!p)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");r.byhour.push(parseInt(p[0],10))}}while(n.accept("comma")||n.accept("at"))}function s(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function l(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function u(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var d=parseInt(n.value[1],10);if(d<-366||d>366)throw new Error("Nth out of range: "+d);return n.nextSymbol(),n.accept("last")?-d:d;default:return!1}}function c(){n.accept("on"),n.accept("the");var d=u();if(!!d)for(r.bymonthday=[d],n.nextSymbol();n.accept("comma");){if(d=u(),!d)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.bymonthday.push(d),n.nextSymbol()}}function f(){if(n.symbol==="until"){var d=Date.parse(n.text);if(!d)throw new Error("Cannot parse until date:"+n.text);r.until=new Date(d)}else n.accept("for")&&(r.count=parseInt(n.value[0],10),n.expect("number"))}}var $n;(function(e){e[e.YEARLY=0]="YEARLY",e[e.MONTHLY=1]="MONTHLY",e[e.WEEKLY=2]="WEEKLY",e[e.DAILY=3]="DAILY",e[e.HOURLY=4]="HOURLY",e[e.MINUTELY=5]="MINUTELY",e[e.SECONDLY=6]="SECONDLY"})($n||($n={}));function PT(e){return e<$n.HOURLY}var _fe=function(e,t){return t===void 0&&(t=Kb),new dr(jT(e,t)||void 0)},GS=["count","until","interval","byweekday","bymonthday","bymonth"];rg.IMPLEMENTED=[];rg.IMPLEMENTED[$n.HOURLY]=GS;rg.IMPLEMENTED[$n.MINUTELY]=GS;rg.IMPLEMENTED[$n.DAILY]=["byhour"].concat(GS);rg.IMPLEMENTED[$n.WEEKLY]=GS;rg.IMPLEMENTED[$n.MONTHLY]=GS;rg.IMPLEMENTED[$n.YEARLY]=["byweekno","byyearday"].concat(GS);var Ife=function(e,t,r,n){return new rg(e,t,r,n).toString()},Bfe=rg.isFullyConvertible;var WS=function(){function e(t,r,n,i){this.hour=t,this.minute=r,this.second=n,this.millisecond=i||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},e}();var Lfe=function(e){VS(t,e);function t(r,n,i,a,o,s,l){var u=e.call(this,a,o,s,l)||this;return u.year=r,u.month=n,u.day=i,u}return t.fromDate=function(r){return new this(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.valueOf()%1e3)},t.prototype.getWeekday=function(){return e0(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(r){this.year+=r},t.prototype.addMonths=function(r){if(this.month+=r,this.month>12){var n=Math.floor(this.month/12),i=Wu(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(r,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+r*7:this.day+=-(this.getWeekday()-n)+r*7,this.fixDay()},t.prototype.addDaily=function(r){this.day+=r,this.fixDay()},t.prototype.addHours=function(r,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/r)*r);;){this.hour+=r;var a=rP(this.hour,24),o=a.div,s=a.mod;if(o&&(this.hour=s,this.addDaily(o)),xd(i)||di(i,this.hour))break}},t.prototype.addMinutes=function(r,n,i,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/r)*r);;){this.minute+=r;var o=rP(this.minute,60),s=o.div,l=o.mod;if(s&&(this.minute=l,this.addHours(s,!1,i)),(xd(i)||di(i,this.hour))&&(xd(a)||di(a,this.minute)))break}},t.prototype.addSeconds=function(r,n,i,a,o){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/r)*r);;){this.second+=r;var s=rP(this.second,60),l=s.div,u=s.mod;if(l&&(this.second=u,this.addMinutes(l,!1,i,a)),(xd(i)||di(i,this.hour))&&(xd(a)||di(a,this.minute))&&(xd(o)||di(o,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var r=BQ(this.year,this.month-1)[1];if(!(this.day<=r))for(;this.day>r;){if(this.day-=r,++this.month,this.month===13&&(this.month=1,++this.year,this.year>nP))return;r=BQ(this.year,this.month-1)[1]}}},t.prototype.add=function(r,n){var i=r.freq,a=r.interval,o=r.wkst,s=r.byhour,l=r.byminute,u=r.bysecond;switch(i){case $n.YEARLY:return this.addYears(a);case $n.MONTHLY:return this.addMonths(a);case $n.WEEKLY:return this.addWeekly(a,o);case $n.DAILY:return this.addDaily(a);case $n.HOURLY:return this.addHours(a,n,s);case $n.MINUTELY:return this.addMinutes(a,n,s,l);case $n.SECONDLY:return this.addSeconds(a,n,s,l,u)}},t}(WS);function $Q(e){for(var t=[],r=Object.keys(e),n=0,i=r;n<i.length;n++){var a=i[n];di($fe,a)||t.push(a),IQ(e[a])&&!Xb(e[a])&&t.push(a)}if(t.length)throw new Error("Invalid options: "+t.join(", "));return da({},e)}function Rfe(e){var t=da(da({},_T),$Q(e));if(Ga(t.byeaster)&&(t.freq=dr.YEARLY),!(Ga(t.freq)&&dr.FREQUENCIES[t.freq]))throw new Error("Invalid frequency: ".concat(t.freq," ").concat(e.freq));if(t.dtstart||(t.dtstart=new Date(new Date().setMilliseconds(0))),Ga(t.wkst)?bd(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=dr.MO.weekday,Ga(t.bysetpos)){bd(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var r=0;r<t.bysetpos.length;r++){var n=t.bysetpos[r];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(t.byweekno)||fs(t.byweekno)||fs(t.byyearday)||Boolean(t.bymonthday)||fs(t.bymonthday)||Ga(t.byweekday)||Ga(t.byeaster)))switch(t.freq){case dr.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case dr.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case dr.WEEKLY:t.byweekday=[e0(t.dtstart)];break}if(Ga(t.bymonth)&&!nu(t.bymonth)&&(t.bymonth=[t.bymonth]),Ga(t.byyearday)&&!nu(t.byyearday)&&bd(t.byyearday)&&(t.byyearday=[t.byyearday]),!Ga(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if(nu(t.bymonthday)){for(var i=[],a=[],r=0;r<t.bymonthday.length;r++){var n=t.bymonthday[r];n>0?i.push(n):n<0&&a.push(n)}t.bymonthday=i,t.bynmonthday=a}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(Ga(t.byweekno)&&!nu(t.byweekno)&&(t.byweekno=[t.byweekno]),!Ga(t.byweekday))t.bynweekday=null;else if(bd(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(_Q(t.byweekday))t.byweekday=[Ms.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof Ms)!t.byweekday.n||t.freq>dr.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var o=[],s=[],r=0;r<t.byweekday.length;r++){var l=t.byweekday[r];if(bd(l)){o.push(l);continue}else if(_Q(l)){o.push(Ms.fromStr(l).weekday);continue}!l.n||t.freq>dr.MONTHLY?o.push(l.weekday):s.push([l.weekday,l.n])}t.byweekday=fs(o)?o:null,t.bynweekday=fs(s)?s:null}return Ga(t.byhour)?bd(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<dr.HOURLY?[t.dtstart.getUTCHours()]:null,Ga(t.byminute)?bd(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<dr.MINUTELY?[t.dtstart.getUTCMinutes()]:null,Ga(t.bysecond)?bd(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<dr.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function qfe(e){var t=e.dtstart.getTime()%1e3;if(!PT(e.freq))return[];var r=[];return e.byhour.forEach(function(n){e.byminute.forEach(function(i){e.bysecond.forEach(function(a){r.push(new WS(n,i,a,t))})})}),r}function BT(e){var t=e.split(`
38`).map(XXe).filter(function(r){return r!==null});return da(da({},t[0]),t[1])}function IT(e){var t={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!r)return t;var n=r[1],i=r[2];return n&&(t.tzid=n),t.dtstart=FT(i),t}function XXe(e){if(e=e.replace(/^\s+|\s+$/,""),!e.length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return zfe(e);var r=t[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return zfe(e);case"DTSTART":return IT(e);default:throw new Error("Unsupported RFC prop ".concat(r," in ").concat(e))}}function zfe(e){var t=e.replace(/^RRULE:/i,""),r=IT(t),n=e.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var a=i.split("="),o=a[0],s=a[1];switch(o.toUpperCase()){case"FREQ":r.freq=$n[s.toUpperCase()];break;case"WKST":r.wkst=Mp[s.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var l=KXe(s),u=o.toLowerCase();r[u]=l;break;case"BYWEEKDAY":case"BYDAY":r.byweekday=JXe(s);break;case"DTSTART":case"TZID":var c=IT(e);r.tzid=c.tzid,r.dtstart=c.dtstart;break;case"UNTIL":r.until=FT(s);break;case"BYEASTER":r.byeaster=Number(s);break;default:throw new Error("Unknown RRULE property '"+o+"'")}}),r}function KXe(e){if(e.indexOf(",")!==-1){var t=e.split(",");return t.map(Ufe)}return Ufe(e)}function Ufe(e){return/^[+-]?\d+$/.test(e)?Number(e):e}function JXe(e){var t=e.split(",");return t.map(function(r){if(r.length===2)return Mp[r];var n=r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(r));var i=Number(n[1]),a=n[2],o=Mp[a].weekday;return new Ms(o,i)})}var Jb=function(){function e(t,r){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=r}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=HS(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:jfe(this.date,this.tzid)},e}();function LT(e){for(var t=[],r="",n=Object.keys(e),i=Object.keys(_T),a=0;a<n.length;a++)if(n[a]!=="tzid"&&!!di(i,n[a])){var o=n[a].toUpperCase(),s=e[n[a]],l="";if(!(!Ga(s)||nu(s)&&!s.length)){switch(o){case"FREQ":l=dr.FREQUENCIES[e.freq];break;case"WKST":bd(s)?l=new Ms(s).toString():l=s.toString();break;case"BYWEEKDAY":o="BYDAY",l=Tfe(s).map(function(p){return p instanceof Ms?p:nu(p)?new Ms(p[0],p[1]):new Ms(p)}).toString();break;case"DTSTART":r=ZXe(s,e.tzid);break;case"UNTIL":l=HS(s,!e.tzid);break;default:if(nu(s)){for(var u=[],c=0;c<s.length;c++)u[c]=String(s[c]);l=u.toString()}else l=String(s)}l&&t.push([o,l])}}var f=t.map(function(p){var h=p[0],m=p[1];return"".concat(h,"=").concat(m.toString())}).join(";"),d="";return f!==""&&(d="RRULE:".concat(f)),[r,d].filter(function(p){return!!p}).join(`
39`)}function ZXe(e,t){return e?"DTSTART"+new Jb(new Date(e),t).toString():""}function eKe(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every(function(r,n){return r.getTime()===t[n].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var Hfe=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(t,r,n){r&&(r=r instanceof Date?oP(r):LQ(r)),t==="all"?this.all=r:(n._value=r,this[t].push(n))},e.prototype._cacheGet=function(t,r){var n=!1,i=r?Object.keys(r):[],a=function(c){for(var f=0;f<i.length;f++){var d=i[f];if(!eKe(r[d],c[d]))return!0}return!1},o=this[t];if(t==="all")n=this.all;else if(nu(o))for(var s=0;s<o.length;s++){var l=o[s];if(!(i.length&&a(l))){n=l._value;break}}if(!n&&this.all){for(var u=new r0(t,r),s=0;s<this.all.length&&u.accept(this.all[s]);s++);n=u.getValue(),this._cacheAdd(t,n,r)}return nu(n)?LQ(n):n instanceof Date?oP(n):n},e}();var Vfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],oi(1,31),!0),oi(2,28),!0),oi(3,31),!0),oi(4,30),!0),oi(5,31),!0),oi(6,30),!0),oi(7,31),!0),oi(8,31),!0),oi(9,30),!0),oi(10,31),!0),oi(11,30),!0),oi(12,31),!0),oi(1,7),!0),Gfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],oi(1,31),!0),oi(2,29),!0),oi(3,31),!0),oi(4,30),!0),oi(5,31),!0),oi(6,30),!0),oi(7,31),!0),oi(8,31),!0),oi(9,30),!0),oi(10,31),!0),oi(11,30),!0),oi(12,31),!0),oi(1,7),!0),tKe=Np(1,29),rKe=Np(1,30),Hv=Np(1,31),Qu=Np(1,32),Wfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Qu,!0),rKe,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu.slice(0,7),!0),Qfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Qu,!0),tKe,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu.slice(0,7),!0),nKe=Np(-28,0),iKe=Np(-29,0),Vv=Np(-30,0),Yu=Np(-31,0),Yfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Yu,!0),iKe,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu.slice(0,7),!0),Xfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Yu,!0),nKe,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu.slice(0,7),!0),Kfe=[0,31,60,91,121,152,182,213,244,274,305,335,366],Jfe=[0,31,59,90,120,151,181,212,243,273,304,334,365],zQ=function(){for(var e=[],t=0;t<55;t++)e=e.concat(Np(7));return e}();function Zfe(e,t){var r=tg(e,1,1),n=US(e)?366:365,i=US(e+1)?366:365,a=OT(r),o=e0(r),s=da(da({yearlen:n,nextyearlen:i,yearordinal:a,yearweekday:o},aKe(e)),{wnomask:null});if(xd(t.byweekno))return s;s.wnomask=oi(0,n+7);var l,u,c=l=Wu(7-o+t.wkst,7);c>=4?(c=0,u=s.yearlen+Wu(o-t.wkst,7)):u=n-c;for(var f=Math.floor(u/7),d=Wu(u,7),p=Math.floor(f+d/4),h=0;h<t.byweekno.length;h++){var m=t.byweekno[h];if(m<0&&(m+=p+1),m>0&&m<=p){var v=void 0;m>1?(v=c+(m-1)*7,c!==l&&(v-=7-l)):v=c;for(var A=0;A<7&&(s.wnomask[v]=1,v++,s.wdaymask[v]!==t.wkst);A++);}}if(di(t.byweekno,1)){var v=c+p*7;if(c!==l&&(v-=7-l),v<n)for(var h=0;h<7&&(s.wnomask[v]=1,v+=1,s.wdaymask[v]!==t.wkst);h++);}if(c){var x=void 0;if(di(t.byweekno,-1))x=-1;else{var g=e0(tg(e-1,1,1)),w=Wu(7-g.valueOf()+t.wkst,7),b=US(e-1)?366:365,y=void 0;w>=4?(w=0,y=b+Wu(g-t.wkst,7)):y=n-c,x=Math.floor(52+Wu(y,7)/4)}if(di(t.byweekno,x))for(var v=0;v<c;v++)s.wnomask[v]=1}return s}function aKe(e){var t=US(e)?366:365,r=tg(e,1,1),n=e0(r);return t===365?{mmask:Vfe,mdaymask:Qfe,nmdaymask:Xfe,wdaymask:zQ.slice(n),mrange:Jfe}:{mmask:Gfe,mdaymask:Wfe,nmdaymask:Yfe,wdaymask:zQ.slice(n),mrange:Kfe}}function ede(e,t,r,n,i,a){var o={lastyear:e,lastmonth:t,nwdaymask:[]},s=[];if(a.freq===dr.YEARLY)if(xd(a.bymonth))s=[[0,r]];else for(var l=0;l<a.bymonth.length;l++)t=a.bymonth[l],s.push(n.slice(t-1,t+1));else a.freq===dr.MONTHLY&&(s=[n.slice(t-1,t+1)]);if(xd(s))return o;o.nwdaymask=oi(0,r);for(var l=0;l<s.length;l++)for(var u=s[l],c=u[0],f=u[1]-1,d=0;d<a.bynweekday.length;d++){var p=void 0,h=a.bynweekday[d],m=h[0],v=h[1];v<0?(p=f+(v+1)*7,p-=Wu(i[p]-m,7)):(p=c+(v-1)*7,p+=Wu(7-i[p]+m,7)),c<=p&&p<=f&&(o.nwdaymask[p]=1)}return o}function tde(e,t){t===void 0&&(t=0);var r=e%19,n=Math.floor(e/100),i=e%100,a=Math.floor(n/4),o=n%4,s=Math.floor((n+8)/25),l=Math.floor((n-s+1)/3),u=Math.floor(19*r+n-a-l+15)%30,c=Math.floor(i/4),f=i%4,d=Math.floor(32+2*o+2*c-u-f)%7,p=Math.floor((r+11*u+22*d)/451),h=Math.floor((u+d-7*p+114)/31),m=(u+d-7*p+114)%31+1,v=Date.UTC(e,h-1,m+t),A=Date.UTC(e,0,1);return[Math.ceil((v-A)/(1e3*60*60*24))]}var oKe=function(){function e(t){this.options=t}return e.prototype.rebuild=function(t,r){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=Zfe(t,n)),fs(n.bynweekday)&&(r!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,a=i.yearlen,o=i.mrange,s=i.wdaymask;this.monthinfo=ede(t,r,a,o,s,n)}Ga(n.byeaster)&&(this.eastermask=tde(t,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[Np(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(t,r){for(var n=this.mrange[r-1],i=this.mrange[r],a=oi(null,this.yearlen),o=n;o<i;o++)a[o]=o;return[a,n,i]},e.prototype.wdayset=function(t,r,n){for(var i=oi(null,this.yearlen+7),a=OT(tg(t,r,n))-this.yearordinal,o=a,s=0;s<7&&(i[a]=a,++a,this.wdaymask[a]!==this.options.wkst);s++);return[i,o,a]},e.prototype.ddayset=function(t,r,n){var i=oi(null,this.yearlen),a=OT(tg(t,r,n))-this.yearordinal;return i[a]=a,[i,a,a+1]},e.prototype.htimeset=function(t,r,n,i){var a=this,o=[];return this.options.byminute.forEach(function(s){o=o.concat(a.mtimeset(t,s,n,i))}),t0(o),o},e.prototype.mtimeset=function(t,r,n,i){var a=this.options.bysecond.map(function(o){return new WS(t,r,o,i)});return t0(a),a},e.prototype.stimeset=function(t,r,n,i){return[new WS(t,r,n,i)]},e.prototype.getdayset=function(t){switch(t){case $n.YEARLY:return this.ydayset.bind(this);case $n.MONTHLY:return this.mdayset.bind(this);case $n.WEEKLY:return this.wdayset.bind(this);case $n.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(t){switch(t){case $n.HOURLY:return this.htimeset.bind(this);case $n.MINUTELY:return this.mtimeset.bind(this);case $n.SECONDLY:return this.stimeset.bind(this)}},e}(),rde=oKe;function nde(e,t,r,n,i,a){for(var o=[],s=0;s<e.length;s++){var l=void 0,u=void 0,c=e[s];c<0?(l=Math.floor(c/t.length),u=Wu(c,t.length)):(l=Math.floor((c-1)/t.length),u=Wu(c-1,t.length));for(var f=[],d=r;d<n;d++){var p=a[d];!Ga(p)||f.push(p)}var h=void 0;l<0?h=f.slice(l)[0]:h=f[l];var m=t[u],v=iP(i.yearordinal+h),A=aP(v,m);di(o,A)||o.push(A)}return t0(o),o}function lP(e,t){var r=t.dtstart,n=t.freq,i=t.interval,a=t.until,o=t.bysetpos,s=t.count;if(s===0||i===0)return n0(e);var l=Lfe.fromDate(r),u=new rde(t);u.rebuild(l.year,l.month);for(var c=uKe(u,l,t);;){var f=u.getdayset(n)(l.year,l.month,l.day),d=f[0],p=f[1],h=f[2],m=lKe(d,p,h,u,t);if(fs(o))for(var v=nde(o,c,p,h,u,d),A=0;A<v.length;A++){var x=v[A];if(a&&x>a)return n0(e);if(x>=r){var g=ide(x,t);if(!e.accept(g)||s&&(--s,!s))return n0(e)}}else for(var A=p;A<h;A++){var w=d[A];if(!!Ga(w))for(var b=iP(u.yearordinal+w),y=0;y<c.length;y++){var S=c[y],x=aP(b,S);if(a&&x>a)return n0(e);if(x>=r){var g=ide(x,t);if(!e.accept(g)||s&&(--s,!s))return n0(e)}}}if(t.interval===0||(l.add(t,m),l.year>nP))return n0(e);PT(n)||(c=u.gettimeset(n)(l.hour,l.minute,l.second,0)),u.rebuild(l.year,l.month)}}function sKe(e,t,r){var n=r.bymonth,i=r.byweekno,a=r.byweekday,o=r.byeaster,s=r.bymonthday,l=r.bynmonthday,u=r.byyearday;return fs(n)&&!di(n,e.mmask[t])||fs(i)&&!e.wnomask[t]||fs(a)&&!di(a,e.wdaymask[t])||fs(e.nwdaymask)&&!e.nwdaymask[t]||o!==null&&!di(e.eastermask,t)||(fs(s)||fs(l))&&!di(s,e.mdaymask[t])&&!di(l,e.nmdaymask[t])||fs(u)&&(t<e.yearlen&&!di(u,t+1)&&!di(u,-e.yearlen+t)||t>=e.yearlen&&!di(u,t+1-e.yearlen)&&!di(u,-e.nextyearlen+t-e.yearlen))}function ide(e,t){return new Jb(e,t.tzid).rezonedDate()}function n0(e){return e.getValue()}function lKe(e,t,r,n,i){for(var a=!1,o=t;o<r;o++){var s=e[o];a=sKe(n,s,i),a&&(e[s]=null)}return a}function uKe(e,t,r){var n=r.freq,i=r.byhour,a=r.byminute,o=r.bysecond;return PT(n)?qfe(r):n>=dr.HOURLY&&fs(i)&&!di(i,t.hour)||n>=dr.MINUTELY&&fs(a)&&!di(a,t.minute)||n>=dr.SECONDLY&&fs(o)&&!di(o,t.second)?[]:e.gettimeset(n)(t.hour,t.minute,t.second,t.millisecond)}var Mp={MO:new Ms(0),TU:new Ms(1),WE:new Ms(2),TH:new Ms(3),FR:new Ms(4),SA:new Ms(5),SU:new Ms(6)},_T={freq:$n.YEARLY,dtstart:null,interval:1,wkst:Mp.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},$fe=Object.keys(_T),dr=function(){function e(t,r){t===void 0&&(t={}),r===void 0&&(r=!1),this._cache=r?null:new Hfe,this.origOptions=$Q(t);var n=Rfe(t).parsedOptions;this.options=n}return e.parseText=function(t,r){return jT(t,r)},e.fromText=function(t,r){return _fe(t,r)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(t){return lP(t,this.options)},e.prototype._cacheGet=function(t,r){return this._cache?this._cache._cacheGet(t,r):!1},e.prototype._cacheAdd=function(t,r,n){if(!!this._cache)return this._cache._cacheAdd(t,r,n)},e.prototype.all=function(t){if(t)return this._iter(new qQ("all",{},t));var r=this._cacheGet("all");return r===!1&&(r=this._iter(new r0("all",{})),this._cacheAdd("all",r)),r},e.prototype.between=function(t,r,n,i){if(n===void 0&&(n=!1),!Xb(t)||!Xb(r))throw new Error("Invalid date passed in to RRule.between");var a={before:r,after:t,inc:n};if(i)return this._iter(new qQ("between",a,i));var o=this._cacheGet("between",a);return o===!1&&(o=this._iter(new r0("between",a)),this._cacheAdd("between",o,a)),o},e.prototype.before=function(t,r){if(r===void 0&&(r=!1),!Xb(t))throw new Error("Invalid date passed in to RRule.before");var n={dt:t,inc:r},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new r0("before",n)),this._cacheAdd("before",i,n)),i},e.prototype.after=function(t,r){if(r===void 0&&(r=!1),!Xb(t))throw new Error("Invalid date passed in to RRule.after");var n={dt:t,inc:r},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new r0("after",n)),this._cacheAdd("after",i,n)),i},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return LT(this.origOptions)},e.prototype.toText=function(t,r,n){return Ife(this,t,r,n)},e.prototype.isFullyConvertibleToText=function(){return Bfe(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],e.YEARLY=$n.YEARLY,e.MONTHLY=$n.MONTHLY,e.WEEKLY=$n.WEEKLY,e.DAILY=$n.DAILY,e.HOURLY=$n.HOURLY,e.MINUTELY=$n.MINUTELY,e.SECONDLY=$n.SECONDLY,e.MO=Mp.MO,e.TU=Mp.TU,e.WE=Mp.WE,e.TH=Mp.TH,e.FR=Mp.FR,e.SA=Mp.SA,e.SU=Mp.SU,e.parseString=BT,e.optionsToString=LT,e}();function ade(e,t,r,n,i,a){var o={},s=e.accept;function l(d,p){r.forEach(function(h){h.between(d,p,!0).forEach(function(m){o[Number(m)]=!0})})}i.forEach(function(d){var p=new Jb(d,a).rezonedDate();o[Number(p)]=!0}),e.accept=function(d){var p=Number(d);return isNaN(p)?s.call(this,d):!o[p]&&(l(new Date(p-1),new Date(p+1)),!o[p])?(o[p]=!0,s.call(this,d)):!0},e.method==="between"&&(l(e.args.after,e.args.before),e.accept=function(d){var p=Number(d);return o[p]?!0:(o[p]=!0,s.call(this,d))});for(var u=0;u<n.length;u++){var c=new Jb(n[u],a).rezonedDate();if(!e.accept(new Date(c.getTime())))break}t.forEach(function(d){lP(e,d.options)});var f=e._result;switch(t0(f),e.method){case"all":case"between":return f;case"before":return f.length&&f[f.length-1]||null;case"after":default:return f.length&&f[0]||null}}var ode={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function cKe(e,t){var r=[],n=[],i=[],a=[],o=IT(e),s=o.dtstart,l=o.tzid,u=hKe(e,t.unfold);return u.forEach(function(c){var f;if(!!c){var d=mKe(c),p=d.name,h=d.parms,m=d.value;switch(p.toUpperCase()){case"RRULE":if(h.length)throw new Error("unsupported RRULE parm: ".concat(h.join(",")));r.push(BT(c));break;case"RDATE":var v=(f=/RDATE(?:;TZID=([^:=]+))?/i.exec(c))!==null&&f!==void 0?f:[],A=v[1];A&&!l&&(l=A),n=n.concat(sde(m,h));break;case"EXRULE":if(h.length)throw new Error("unsupported EXRULE parm: ".concat(h.join(",")));i.push(BT(m));break;case"EXDATE":a=a.concat(sde(m,h));break;case"DTSTART":break;default:throw new Error("unsupported property: "+p)}}}),{dtstart:s,tzid:l,rrulevals:r,rdatevals:n,exrulevals:i,exdatevals:a}}function fKe(e,t){var r=cKe(e,t),n=r.rrulevals,i=r.rdatevals,a=r.exrulevals,o=r.exdatevals,s=r.dtstart,l=r.tzid,u=t.cache===!1;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||n.length>1||i.length||a.length||o.length){var c=new HQ(u);return c.dtstart(s),c.tzid(l||void 0),n.forEach(function(d){c.rrule(new dr(UQ(d,s,l),u))}),i.forEach(function(d){c.rdate(d)}),a.forEach(function(d){c.exrule(new dr(UQ(d,s,l),u))}),o.forEach(function(d){c.exdate(d)}),t.compatible&&t.dtstart&&c.rdate(s),c}var f=n[0]||{};return new dr(UQ(f,f.dtstart||t.dtstart||s,f.tzid||t.tzid||l),u)}function uP(e,t){return t===void 0&&(t={}),fKe(e,dKe(t))}function UQ(e,t,r){return da(da({},e),{dtstart:t,tzid:r})}function dKe(e){var t=[],r=Object.keys(e),n=Object.keys(ode);if(r.forEach(function(i){di(n,i)||t.push(i)}),t.length)throw new Error("Invalid options: "+t.join(", "));return da(da({},ode),e)}function pKe(e){if(e.indexOf(":")===-1)return{name:"RRULE",value:e};var t=Nfe(e,":",1),r=t[0],n=t[1];return{name:r,value:n}}function mKe(e){var t=pKe(e),r=t.name,n=t.value,i=r.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function hKe(e,t){if(t===void 0&&(t=!1),e=e&&e.trim(),!e)throw new Error("Invalid empty string");if(!t)return e.split(/\s/);for(var r=e.split(`
40`),n=0;n<r.length;){var i=r[n]=r[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(r[n-1]+=i.slice(1),r.splice(n,1)):n+=1:r.splice(n,1)}return r}function gKe(e){e.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function sde(e,t){return gKe(t),e.split(",").map(function(r){return FT(r)})}function lde(e){var t=this;return function(r){if(r!==void 0&&(t["_".concat(e)]=r),t["_".concat(e)]!==void 0)return t["_".concat(e)];for(var n=0;n<t._rrule.length;n++){var i=t._rrule[n].origOptions[e];if(i)return i}}}var HQ=function(e){VS(t,e);function t(r){r===void 0&&(r=!1);var n=e.call(this,{},r)||this;return n.dtstart=lde.apply(n,["dtstart"]),n.tzid=lde.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return t.prototype._iter=function(r){return ade(r,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(r){ude(r,this._rrule)},t.prototype.exrule=function(r){ude(r,this._exrule)},t.prototype.rdate=function(r){cde(r,this._rdate)},t.prototype.exdate=function(r){cde(r,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(r){return uP(r.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(r){return uP(r.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(r){return new Date(r.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(r){return new Date(r.getTime())})},t.prototype.valueOf=function(){var r=[];return!this._rrule.length&&this._dtstart&&(r=r.concat(LT({dtstart:this._dtstart}))),this._rrule.forEach(function(n){r=r.concat(n.toString().split(`

Callers 3

yYFunction · 0.85
prtFunction · 0.85
wFunction · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected