.obsidian/plugins/fantasy-calendar/main.js

503 lines
577 KiB
JavaScript

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var gg=Object.create;var Br=Object.defineProperty;var yg=Object.getOwnPropertyDescriptor;var vg=Object.getOwnPropertyNames;var bg=Object.getPrototypeOf,wg=Object.prototype.hasOwnProperty;var cl=t=>Br(t,"__esModule",{value:!0});var Xe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Dg=(t,e)=>{cl(t);for(var n in e)Br(t,n,{get:e[n],enumerable:!0})},_g=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of vg(e))!wg.call(t,a)&&a!=="default"&&Br(t,a,{get:()=>e[a],enumerable:!(n=yg(e,a))||n.enumerable});return t},Ee=t=>_g(cl(Br(t!=null?gg(bg(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Nn=Xe((fo,ho)=>{(function(t,e){typeof fo=="object"&&typeof ho!="undefined"?ho.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis!="undefined"?globalThis:t||self,t["fast-copy"]=e())})(fo,function(){"use strict";var t=Function.prototype.toString,e=Object.create,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,o=Object.getPrototypeOf,l=Object.prototype,s=l.hasOwnProperty,c=l.propertyIsEnumerable,u={SYMBOL_PROPERTIES:typeof i=="function",WEAKMAP:typeof WeakMap=="function"},d=function(){if(u.WEAKMAP)return new WeakMap;var A=e({has:function(L){return!!~A._keys.indexOf(L)},set:function(L,k){A._keys.push(L),A._values.push(k)},get:function(L){return A._values[A._keys.indexOf(L)]}});return A._keys=[],A._values=[],A},m=function(A,L){if(!A.constructor)return e(null);var k=A.constructor,E=A.__proto__||o(A);if(k===L.Object)return E===L.Object.prototype?{}:e(E);if(~t.call(k).indexOf("[native code]"))try{return new k}catch{}return e(E)},v=function(A,L,k,E){var w=m(A,L);E.set(A,w);for(var N in A)s.call(A,N)&&(w[N]=k(A[N],E));if(u.SYMBOL_PROPERTIES){var F=i(A),j=F.length;if(j)for(var x=0,T=void 0;x<j;x++)T=F[x],c.call(A,T)&&(w[T]=k(A[T],E))}return w},h=function(A,L,k,E){var w=m(A,L);E.set(A,w);var N=u.SYMBOL_PROPERTIES?r(A).concat(i(A)):r(A),F=N.length;if(F){for(var j=0,x=void 0,T=void 0;j<F;j++)if(x=N[j],x!=="callee"&&x!=="caller")if(T=a(A,x),T){!T.get&&!T.set&&(T.value=k(A[x],E));try{n(w,x,T)}catch{w[x]=T.value}}else w[x]=k(A[x],E)}return w},y=function(A){var L="";return A.global&&(L+="g"),A.ignoreCase&&(L+="i"),A.multiline&&(L+="m"),A.unicode&&(L+="u"),A.sticky&&(L+="y"),L},p=Array.isArray,S=function(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;console&&console.error&&console.error('Unable to locate global object, returning "this".')}();function _(A,L){var k=!!(L&&L.isStrict),E=L&&L.realm||S,w=k?h:v,N=function(F,j){if(!F||typeof F!="object")return F;if(j.has(F))return j.get(F);var x=F.constructor;if(x===E.Object)return w(F,E,N,j);var T;if(p(F)){if(k)return h(F,E,N,j);var I=F.length;T=new x,j.set(F,T);for(var U=0;U<I;U++)T[U]=N(F[U],j);return T}if(F instanceof E.Date)return new x(F.getTime());if(F instanceof E.RegExp)return T=new x(F.source,F.flags||y(F)),T.lastIndex=F.lastIndex,T;if(E.Map&&F instanceof E.Map)return T=new x,j.set(F,T),F.forEach(function($,ee){T.set(ee,N($,j))}),T;if(E.Set&&F instanceof E.Set)return T=new x,j.set(F,T),F.forEach(function($){T.add(N($,j))}),T;if(E.Blob&&F instanceof E.Blob)return F.slice(0,F.size,F.type);if(E.Buffer&&E.Buffer.isBuffer(F))return T=E.Buffer.allocUnsafe?E.Buffer.allocUnsafe(F.length):new x(F.length),j.set(F,T),F.copy(T),T;if(E.ArrayBuffer){if(E.ArrayBuffer.isView(F))return T=new x(F.buffer.slice(0)),j.set(F,T),T;if(F instanceof E.ArrayBuffer)return T=F.slice(0),j.set(F,T),T}return typeof F.then=="function"||F instanceof Error||E.WeakMap&&F instanceof E.WeakMap||E.WeakSet&&F instanceof E.WeakSet?F:w(F,E,N,j)};return N(A,d())}return _.default=_,_.strict=function(L,k){return _(L,{isStrict:!0,realm:k?k.realm:void 0})},_})});var dl=Xe(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.default=void 0;var Cg={sum:function(e){return e.reduce(function(n,a){return n+a})}},Eg=Cg;Nr.default=Eg});var Mr=Xe((Wb,fl)=>{function Ag(t){return Object.prototype.toString.call(t).slice(8,-1)}fl.exports=Ag});var mo=Xe((Gb,hl)=>{function kg(t){return!!t&&typeof t=="object"&&t.constructor===Object}hl.exports=kg});var Ir=Xe((Ub,ml)=>{function xg(t,e){return Object.prototype.hasOwnProperty.call(t,e)}ml.exports=xg});var vl=Xe((zb,yl)=>{var Fg=Ir(),Or,pl;function Tg(){pl=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Or=!0;for(var t in{toString:null})Or=!1}function Sg(t,e,n){var a,r=0;Or==null&&Tg();for(a in t)if(gl(e,t,a,n)===!1)break;if(Or)for(var i=t.constructor,o=!!i&&t===i.prototype;(a=pl[r++])&&!((a!=="constructor"||!o&&Fg(t,a))&&t[a]!==Object.prototype[a]&&gl(e,t,a,n)===!1););}function gl(t,e,n,a){return t.call(a,e[n],n,e)}yl.exports=Sg});var $a=Xe((Yb,bl)=>{var Bg=Ir(),Ng=vl();function Mg(t,e,n){Ng(t,function(a,r){if(Bg(t,r))return e.call(n,t[r],r,t)})}bl.exports=Mg});var Dl=Xe(($b,wl)=>{var Ig=$a();function Og(t,e){for(var n=0,a=arguments.length,r;++n<a;)r=arguments[n],r!=null&&Ig(r,qg,t);return t}function qg(t,e){this[e]=t}wl.exports=Og});var Cl=Xe((Zb,_l)=>{var Rg=Mr(),Lg=mo(),Pg=Dl();function jg(t){switch(Rg(t)){case"Object":return Vg(t);case"Array":return Gg(t);case"RegExp":return Hg(t);case"Date":return Wg(t);default:return t}}function Vg(t){return Lg(t)?Pg({},t):t}function Hg(t){var e="";return e+=t.multiline?"m":"",e+=t.global?"g":"",e+=t.ignoreCase?"i":"",new RegExp(t.source,e)}function Wg(t){return new Date(+t)}function Gg(t){return t.slice()}_l.exports=jg});var Al=Xe((Kb,El)=>{var Ug=Cl(),zg=$a(),Yg=Mr(),$g=mo();function po(t,e){switch(Yg(t)){case"Object":return Zg(t,e);case"Array":return Kg(t,e);default:return Ug(t)}}function Zg(t,e){if($g(t)){var n={};return zg(t,function(a,r){this[r]=po(a,e)},n),n}else return e?e(t):t}function Kg(t,e){for(var n=[],a=-1,r=t.length,i;++a<r;)n[a]=po(t[a],e);return n}El.exports=po});var qr=Xe((Qb,kl)=>{function Qg(t,e){return t===e?t!==0||1/t==1/e:t!==t&&e!==e}kl.exports=Qg});var go=Xe((Xb,xl)=>{var Xg=Mr();function Jg(t,e){return Xg(t)===e}xl.exports=Jg});var yo=Xe((Jb,Fl)=>{var e2=go();function t2(t){return e2(t,"Object")}Fl.exports=t2});var Rr=Xe((ew,Tl)=>{var n2=go(),a2=Array.isArray||function(t){return n2(t,"Array")};Tl.exports=a2});var Bl=Xe((tw,Sl)=>{function r2(t){return t}Sl.exports=r2});var Ml=Xe((nw,Nl)=>{function i2(t){return function(e){return e[t]}}Nl.exports=i2});var ql=Xe((aw,Ol)=>{var o2=$a(),Il=Rr();function s2(t,e){for(var n=-1,a=t.length;++n<a;)if(vo(t[n],e))return!0;return!1}function l2(t,e){for(var n=-1,a=e.length;++n<a;)if(!s2(t,e[n]))return!1;return!0}function u2(t,e){var n=!0;return o2(e,function(a,r){if(!vo(t[r],a))return n=!1}),n}function vo(t,e){return t&&typeof t=="object"&&e&&typeof e=="object"?Il(t)&&Il(e)?l2(t,e):u2(t,e):t===e}Ol.exports=vo});var bo=Xe((rw,Rl)=>{var c2=Bl(),d2=Ml(),f2=ql();function h2(t,e){if(t==null)return c2;switch(typeof t){case"function":return typeof e!="undefined"?function(n,a,r){return t.call(e,n,a,r)}:t;case"object":return function(n){return f2(n,t)};case"string":case"number":return d2(t)}}Rl.exports=h2});var Pl=Xe((iw,Ll)=>{var m2=$a(),p2=bo();function g2(t,e,n){e=p2(e,n);var a=!0;return m2(t,function(r,i){if(!e(r,i,t))return a=!1,!1}),a}Ll.exports=g2});var Gl=Xe((ow,Wl)=>{var jl=Ir(),Vl=Pl(),Hl=yo(),y2=qr();function v2(t){return function(e,n){return jl(this,n)&&t(e,this[n])}}function b2(t,e){return jl(this,e)}function w2(t,e,n){return n=n||y2,!Hl(t)||!Hl(e)?n(t,e):Vl(t,v2(n),e)&&Vl(e,b2,t)}Wl.exports=w2});var zl=Xe((sw,Ul)=>{var D2=bo();function _2(t,e,n){e=D2(e,n);var a=!0;if(t==null)return a;for(var r=-1,i=t.length;++r<i;)if(!e(t[r],r,t)){a=!1;break}return a}Ul.exports=_2});var Zl=Xe((lw,$l)=>{var C2=qr(),Yl=Rr(),E2=zl();function A2(t,e,n){return n=n||C2,!Yl(t)||!Yl(e)?n(t,e):t.length!==e.length?!1:E2(t,k2(n),e)}function k2(t){return function(e,n){return n in this&&t(e,this[n])}}$l.exports=A2});var eu=Xe((uw,Jl)=>{var x2=qr(),Kl=yo(),Ql=Rr(),F2=Gl(),T2=Zl();function Xl(t,e,n){n=n||x2;var a=Kl(t)&&Kl(e),r=!a&&Ql(t)&&Ql(e);if(!a&&!r)return n(t,e);function i(l,s){return Xl(l,s,n)}var o=a?F2:T2;return o(t,e,i)}Jl.exports=Xl});var tu=Xe((wo,Do)=>{(function(t,e){typeof wo=="object"&&typeof Do!="undefined"?Do.exports=e():typeof define=="function"&&define.amd?define(e):t.chroma=e()})(wo,function(){"use strict";for(var t=function(f,g,b){return g===void 0&&(g=0),b===void 0&&(b=1),f<g?g:f>b?b:f},e=function(f){f._clipped=!1,f._unclipped=f.slice(0);for(var g=0;g<=3;g++)g<3?((f[g]<0||f[g]>255)&&(f._clipped=!0),f[g]=t(f[g],0,255)):g===3&&(f[g]=t(f[g],0,1));return f},n={},a=0,r=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a<r.length;a+=1){var i=r[a];n["[object "+i+"]"]=i.toLowerCase()}var o=function(f){return n[Object.prototype.toString.call(f)]||"object"},l=function(f,g){return g===void 0&&(g=null),f.length>=3?Array.prototype.slice.call(f):o(f[0])=="object"&&g?g.split("").filter(function(b){return f[0][b]!==void 0}).map(function(b){return f[0][b]}):f[0]},s=function(f){if(f.length<2)return null;var g=f.length-1;return o(f[g])=="string"?f[g].toLowerCase():null},c=Math.PI,u={clip_rgb:e,limit:t,type:o,unpack:l,last:s,PI:c,TWOPI:c*2,PITHIRD:c/3,DEG2RAD:c/180,RAD2DEG:180/c},d={format:{},autodetect:[]},m=u.last,v=u.clip_rgb,h=u.type,y=function(){for(var g=[],b=arguments.length;b--;)g[b]=arguments[b];var M=this;if(h(g[0])==="object"&&g[0].constructor&&g[0].constructor===this.constructor)return g[0];var V=m(g),H=!1;if(!V){H=!0,d.sorted||(d.autodetect=d.autodetect.sort(function(oe,ae){return ae.p-oe.p}),d.sorted=!0);for(var O=0,z=d.autodetect;O<z.length;O+=1){var Y=z[O];if(V=Y.test.apply(Y,g),V)break}}if(d.format[V]){var X=d.format[V].apply(null,H?g:g.slice(0,-1));M._rgb=v(X)}else throw new Error("unknown format: "+g);M._rgb.length===3&&M._rgb.push(1)};y.prototype.toString=function(){return h(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var p=y,S=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(S.Color,[null].concat(f)))};S.Color=p,S.version="2.1.2";var _=S,A=u.unpack,L=Math.max,k=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=A(f,"rgb"),M=b[0],V=b[1],H=b[2];M=M/255,V=V/255,H=H/255;var O=1-L(M,L(V,H)),z=O<1?1/(1-O):0,Y=(1-M-O)*z,X=(1-V-O)*z,oe=(1-H-O)*z;return[Y,X,oe,O]},E=k,w=u.unpack,N=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=w(f,"cmyk");var b=f[0],M=f[1],V=f[2],H=f[3],O=f.length>4?f[4]:1;return H===1?[0,0,0,O]:[b>=1?0:255*(1-b)*(1-H),M>=1?0:255*(1-M)*(1-H),V>=1?0:255*(1-V)*(1-H),O]},F=N,j=u.unpack,x=u.type;p.prototype.cmyk=function(){return E(this._rgb)},_.cmyk=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["cmyk"])))},d.format.cmyk=F,d.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=j(f,"cmyk"),x(f)==="array"&&f.length===4)return"cmyk"}});var T=u.unpack,I=u.last,U=function(f){return Math.round(f*100)/100},$=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=T(f,"hsla"),M=I(f)||"lsa";return b[0]=U(b[0]||0),b[1]=U(b[1]*100)+"%",b[2]=U(b[2]*100)+"%",M==="hsla"||b.length>3&&b[3]<1?(b[3]=b.length>3?b[3]:1,M="hsla"):b.length=3,M+"("+b.join(",")+")"},ee=$,Z=u.unpack,K=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Z(f,"rgba");var b=f[0],M=f[1],V=f[2];b/=255,M/=255,V/=255;var H=Math.min(b,M,V),O=Math.max(b,M,V),z=(O+H)/2,Y,X;return O===H?(Y=0,X=Number.NaN):Y=z<.5?(O-H)/(O+H):(O-H)/(2-O-H),b==O?X=(M-V)/(O-H):M==O?X=2+(V-b)/(O-H):V==O&&(X=4+(b-M)/(O-H)),X*=60,X<0&&(X+=360),f.length>3&&f[3]!==void 0?[X,Y,z,f[3]]:[X,Y,z]},ve=K,xe=u.unpack,Ae=u.last,Oe=Math.round,He=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=xe(f,"rgba"),M=Ae(f)||"rgb";return M.substr(0,3)=="hsl"?ee(ve(b),M):(b[0]=Oe(b[0]),b[1]=Oe(b[1]),b[2]=Oe(b[2]),(M==="rgba"||b.length>3&&b[3]<1)&&(b[3]=b.length>3?b[3]:1,M="rgba"),M+"("+b.slice(0,M==="rgb"?3:4).join(",")+")")},st=He,je=u.unpack,wt=Math.round,Nt=function(){for(var f,g=[],b=arguments.length;b--;)g[b]=arguments[b];g=je(g,"hsl");var M=g[0],V=g[1],H=g[2],O,z,Y;if(V===0)O=z=Y=H*255;else{var X=[0,0,0],oe=[0,0,0],ae=H<.5?H*(1+V):H+V-H*V,ye=2*H-ae,pe=M/360;X[0]=pe+1/3,X[1]=pe,X[2]=pe-1/3;for(var ke=0;ke<3;ke++)X[ke]<0&&(X[ke]+=1),X[ke]>1&&(X[ke]-=1),6*X[ke]<1?oe[ke]=ye+(ae-ye)*6*X[ke]:2*X[ke]<1?oe[ke]=ae:3*X[ke]<2?oe[ke]=ye+(ae-ye)*(2/3-X[ke])*6:oe[ke]=ye;f=[wt(oe[0]*255),wt(oe[1]*255),wt(oe[2]*255)],O=f[0],z=f[1],Y=f[2]}return g.length>3?[O,z,Y,g[3]]:[O,z,Y,1]},Je=Nt,Te=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,tt=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Yt=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,$t=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Rt=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Ht=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,wn=Math.round,Dn=function(f){f=f.toLowerCase().trim();var g;if(d.format.named)try{return d.format.named(f)}catch{}if(g=f.match(Te)){for(var b=g.slice(1,4),M=0;M<3;M++)b[M]=+b[M];return b[3]=1,b}if(g=f.match(tt)){for(var V=g.slice(1,5),H=0;H<4;H++)V[H]=+V[H];return V}if(g=f.match(Yt)){for(var O=g.slice(1,4),z=0;z<3;z++)O[z]=wn(O[z]*2.55);return O[3]=1,O}if(g=f.match($t)){for(var Y=g.slice(1,5),X=0;X<3;X++)Y[X]=wn(Y[X]*2.55);return Y[3]=+Y[3],Y}if(g=f.match(Rt)){var oe=g.slice(1,4);oe[1]*=.01,oe[2]*=.01;var ae=Je(oe);return ae[3]=1,ae}if(g=f.match(Ht)){var ye=g.slice(1,4);ye[1]*=.01,ye[2]*=.01;var pe=Je(ye);return pe[3]=+g[4],pe}};Dn.test=function(f){return Te.test(f)||tt.test(f)||Yt.test(f)||$t.test(f)||Rt.test(f)||Ht.test(f)};var Gn=Dn,ha=u.type;p.prototype.css=function(f){return st(this._rgb,f)},_.css=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["css"])))},d.format.css=Gn,d.autodetect.push({p:5,test:function(f){for(var g=[],b=arguments.length-1;b-- >0;)g[b]=arguments[b+1];if(!g.length&&ha(f)==="string"&&Gn.test(f))return"css"}});var ma=u.unpack;d.format.gl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=ma(f,"rgba");return b[0]*=255,b[1]*=255,b[2]*=255,b},_.gl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["gl"])))},p.prototype.gl=function(){var f=this._rgb;return[f[0]/255,f[1]/255,f[2]/255,f[3]]};var Ii=u.unpack,Oi=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Ii(f,"rgb"),M=b[0],V=b[1],H=b[2],O=Math.min(M,V,H),z=Math.max(M,V,H),Y=z-O,X=Y*100/255,oe=O/(255-Y)*100,ae;return Y===0?ae=Number.NaN:(M===z&&(ae=(V-H)/Y),V===z&&(ae=2+(H-M)/Y),H===z&&(ae=4+(M-V)/Y),ae*=60,ae<0&&(ae+=360)),[ae,X,oe]},qi=Oi,Ri=u.unpack,Li=Math.floor,Pi=function(){for(var f,g,b,M,V,H,O=[],z=arguments.length;z--;)O[z]=arguments[z];O=Ri(O,"hcg");var Y=O[0],X=O[1],oe=O[2],ae,ye,pe;oe=oe*255;var ke=X*255;if(X===0)ae=ye=pe=oe;else{Y===360&&(Y=0),Y>360&&(Y-=360),Y<0&&(Y+=360),Y/=60;var Re=Li(Y),Se=Y-Re,We=oe*(1-X),Ke=We+ke*(1-Se),kt=We+ke*Se,xt=We+ke;switch(Re){case 0:f=[xt,kt,We],ae=f[0],ye=f[1],pe=f[2];break;case 1:g=[Ke,xt,We],ae=g[0],ye=g[1],pe=g[2];break;case 2:b=[We,xt,kt],ae=b[0],ye=b[1],pe=b[2];break;case 3:M=[We,Ke,xt],ae=M[0],ye=M[1],pe=M[2];break;case 4:V=[kt,We,xt],ae=V[0],ye=V[1],pe=V[2];break;case 5:H=[xt,We,Ke],ae=H[0],ye=H[1],pe=H[2];break}}return[ae,ye,pe,O.length>3?O[3]:1]},ji=Pi,Vi=u.unpack,Hi=u.type;p.prototype.hcg=function(){return qi(this._rgb)},_.hcg=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hcg"])))},d.format.hcg=ji,d.autodetect.push({p:1,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Vi(f,"hcg"),Hi(f)==="array"&&f.length===3)return"hcg"}});var Wi=u.unpack,Gi=u.last,ie=Math.round,em=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Wi(f,"rgba"),M=b[0],V=b[1],H=b[2],O=b[3],z=Gi(f)||"auto";O===void 0&&(O=1),z==="auto"&&(z=O<1?"rgba":"rgb"),M=ie(M),V=ie(V),H=ie(H);var Y=M<<16|V<<8|H,X="000000"+Y.toString(16);X=X.substr(X.length-6);var oe="0"+ie(O*255).toString(16);switch(oe=oe.substr(oe.length-2),z.toLowerCase()){case"rgba":return"#"+X+oe;case"argb":return"#"+oe+X;default:return"#"+X}},Ls=em,tm=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,nm=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,am=function(f){if(f.match(tm)){(f.length===4||f.length===7)&&(f=f.substr(1)),f.length===3&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]);var g=parseInt(f,16),b=g>>16,M=g>>8&255,V=g&255;return[b,M,V,1]}if(f.match(nm)){(f.length===5||f.length===9)&&(f=f.substr(1)),f.length===4&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]+f[3]+f[3]);var H=parseInt(f,16),O=H>>24&255,z=H>>16&255,Y=H>>8&255,X=Math.round((H&255)/255*100)/100;return[O,z,Y,X]}throw new Error("unknown hex color: "+f)},Ps=am,rm=u.type;p.prototype.hex=function(f){return Ls(this._rgb,f)},_.hex=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hex"])))},d.format.hex=Ps,d.autodetect.push({p:4,test:function(f){for(var g=[],b=arguments.length-1;b-- >0;)g[b]=arguments[b+1];if(!g.length&&rm(f)==="string"&&[3,4,5,6,7,8,9].indexOf(f.length)>=0)return"hex"}});var im=u.unpack,js=u.TWOPI,om=Math.min,sm=Math.sqrt,lm=Math.acos,um=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=im(f,"rgb"),M=b[0],V=b[1],H=b[2];M/=255,V/=255,H/=255;var O,z=om(M,V,H),Y=(M+V+H)/3,X=Y>0?1-z/Y:0;return X===0?O=NaN:(O=(M-V+(M-H))/2,O/=sm((M-V)*(M-V)+(M-H)*(V-H)),O=lm(O),H>V&&(O=js-O),O/=js),[O*360,X,Y]},cm=um,dm=u.unpack,Ui=u.limit,pa=u.TWOPI,zi=u.PITHIRD,ga=Math.cos,fm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=dm(f,"hsi");var b=f[0],M=f[1],V=f[2],H,O,z;return isNaN(b)&&(b=0),isNaN(M)&&(M=0),b>360&&(b-=360),b<0&&(b+=360),b/=360,b<1/3?(z=(1-M)/3,H=(1+M*ga(pa*b)/ga(zi-pa*b))/3,O=1-(z+H)):b<2/3?(b-=1/3,H=(1-M)/3,O=(1+M*ga(pa*b)/ga(zi-pa*b))/3,z=1-(H+O)):(b-=2/3,O=(1-M)/3,z=(1+M*ga(pa*b)/ga(zi-pa*b))/3,H=1-(O+z)),H=Ui(V*H*3),O=Ui(V*O*3),z=Ui(V*z*3),[H*255,O*255,z*255,f.length>3?f[3]:1]},hm=fm,mm=u.unpack,pm=u.type;p.prototype.hsi=function(){return cm(this._rgb)},_.hsi=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hsi"])))},d.format.hsi=hm,d.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=mm(f,"hsi"),pm(f)==="array"&&f.length===3)return"hsi"}});var gm=u.unpack,ym=u.type;p.prototype.hsl=function(){return ve(this._rgb)},_.hsl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hsl"])))},d.format.hsl=Je,d.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=gm(f,"hsl"),ym(f)==="array"&&f.length===3)return"hsl"}});var vm=u.unpack,bm=Math.min,wm=Math.max,Dm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=vm(f,"rgb");var b=f[0],M=f[1],V=f[2],H=bm(b,M,V),O=wm(b,M,V),z=O-H,Y,X,oe;return oe=O/255,O===0?(Y=Number.NaN,X=0):(X=z/O,b===O&&(Y=(M-V)/z),M===O&&(Y=2+(V-b)/z),V===O&&(Y=4+(b-M)/z),Y*=60,Y<0&&(Y+=360)),[Y,X,oe]},_m=Dm,Cm=u.unpack,Em=Math.floor,Am=function(){for(var f,g,b,M,V,H,O=[],z=arguments.length;z--;)O[z]=arguments[z];O=Cm(O,"hsv");var Y=O[0],X=O[1],oe=O[2],ae,ye,pe;if(oe*=255,X===0)ae=ye=pe=oe;else{Y===360&&(Y=0),Y>360&&(Y-=360),Y<0&&(Y+=360),Y/=60;var ke=Em(Y),Re=Y-ke,Se=oe*(1-X),We=oe*(1-X*Re),Ke=oe*(1-X*(1-Re));switch(ke){case 0:f=[oe,Ke,Se],ae=f[0],ye=f[1],pe=f[2];break;case 1:g=[We,oe,Se],ae=g[0],ye=g[1],pe=g[2];break;case 2:b=[Se,oe,Ke],ae=b[0],ye=b[1],pe=b[2];break;case 3:M=[Se,We,oe],ae=M[0],ye=M[1],pe=M[2];break;case 4:V=[Ke,Se,oe],ae=V[0],ye=V[1],pe=V[2];break;case 5:H=[oe,Se,We],ae=H[0],ye=H[1],pe=H[2];break}}return[ae,ye,pe,O.length>3?O[3]:1]},km=Am,xm=u.unpack,Fm=u.type;p.prototype.hsv=function(){return _m(this._rgb)},_.hsv=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hsv"])))},d.format.hsv=km,d.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=xm(f,"hsv"),Fm(f)==="array"&&f.length===3)return"hsv"}});var Wt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Tm=u.unpack,Vs=Math.pow,Sm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Tm(f,"rgb"),M=b[0],V=b[1],H=b[2],O=Bm(M,V,H),z=O[0],Y=O[1],X=O[2],oe=116*Y-16;return[oe<0?0:oe,500*(z-Y),200*(Y-X)]},Yi=function(f){return(f/=255)<=.04045?f/12.92:Vs((f+.055)/1.055,2.4)},$i=function(f){return f>Wt.t3?Vs(f,1/3):f/Wt.t2+Wt.t0},Bm=function(f,g,b){f=Yi(f),g=Yi(g),b=Yi(b);var M=$i((.4124564*f+.3575761*g+.1804375*b)/Wt.Xn),V=$i((.2126729*f+.7151522*g+.072175*b)/Wt.Yn),H=$i((.0193339*f+.119192*g+.9503041*b)/Wt.Zn);return[M,V,H]},Hs=Sm,Nm=u.unpack,Mm=Math.pow,Im=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Nm(f,"lab");var b=f[0],M=f[1],V=f[2],H,O,z,Y,X,oe;return O=(b+16)/116,H=isNaN(M)?O:O+M/500,z=isNaN(V)?O:O-V/200,O=Wt.Yn*Ki(O),H=Wt.Xn*Ki(H),z=Wt.Zn*Ki(z),Y=Zi(3.2404542*H-1.5371385*O-.4985314*z),X=Zi(-.969266*H+1.8760108*O+.041556*z),oe=Zi(.0556434*H-.2040259*O+1.0572252*z),[Y,X,oe,f.length>3?f[3]:1]},Zi=function(f){return 255*(f<=.00304?12.92*f:1.055*Mm(f,1/2.4)-.055)},Ki=function(f){return f>Wt.t1?f*f*f:Wt.t2*(f-Wt.t0)},Ws=Im,Om=u.unpack,qm=u.type;p.prototype.lab=function(){return Hs(this._rgb)},_.lab=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["lab"])))},d.format.lab=Ws,d.autodetect.push({p:2,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=Om(f,"lab"),qm(f)==="array"&&f.length===3)return"lab"}});var Rm=u.unpack,Lm=u.RAD2DEG,Pm=Math.sqrt,jm=Math.atan2,Vm=Math.round,Hm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Rm(f,"lab"),M=b[0],V=b[1],H=b[2],O=Pm(V*V+H*H),z=(jm(H,V)*Lm+360)%360;return Vm(O*1e4)===0&&(z=Number.NaN),[M,O,z]},Wm=Hm,Gm=u.unpack,Um=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=Gm(f,"rgb"),M=b[0],V=b[1],H=b[2],O=Hs(M,V,H),z=O[0],Y=O[1],X=O[2];return Wm(z,Y,X)},Gs=Um,zm=u.unpack,Ym=u.DEG2RAD,$m=Math.sin,Zm=Math.cos,Km=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=zm(f,"lch"),M=b[0],V=b[1],H=b[2];return isNaN(H)&&(H=0),H=H*Ym,[M,Zm(H)*V,$m(H)*V]},Qm=Km,Xm=u.unpack,Jm=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];f=Xm(f,"lch");var b=f[0],M=f[1],V=f[2],H=Qm(b,M,V),O=H[0],z=H[1],Y=H[2],X=Ws(O,z,Y),oe=X[0],ae=X[1],ye=X[2];return[oe,ae,ye,f.length>3?f[3]:1]},Us=Jm,ep=u.unpack,tp=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=ep(f,"hcl").reverse();return Us.apply(void 0,b)},np=tp,ap=u.unpack,rp=u.type;p.prototype.lch=function(){return Gs(this._rgb)},p.prototype.hcl=function(){return Gs(this._rgb).reverse()},_.lch=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["lch"])))},_.hcl=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["hcl"])))},d.format.lch=Us,d.format.hcl=np,["lch","hcl"].forEach(function(f){return d.autodetect.push({p:2,test:function(){for(var g=[],b=arguments.length;b--;)g[b]=arguments[b];if(g=ap(g,f),rp(g)==="array"&&g.length===3)return f}})});var ip={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},ya=ip,op=u.type;p.prototype.name=function(){for(var f=Ls(this._rgb,"rgb"),g=0,b=Object.keys(ya);g<b.length;g+=1){var M=b[g];if(ya[M]===f)return M.toLowerCase()}return f},d.format.named=function(f){if(f=f.toLowerCase(),ya[f])return Ps(ya[f]);throw new Error("unknown color name: "+f)},d.autodetect.push({p:5,test:function(f){for(var g=[],b=arguments.length-1;b-- >0;)g[b]=arguments[b+1];if(!g.length&&op(f)==="string"&&ya[f.toLowerCase()])return"named"}});var sp=u.unpack,lp=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=sp(f,"rgb"),M=b[0],V=b[1],H=b[2];return(M<<16)+(V<<8)+H},up=lp,cp=u.type,dp=function(f){if(cp(f)=="number"&&f>=0&&f<=16777215){var g=f>>16,b=f>>8&255,M=f&255;return[g,b,M,1]}throw new Error("unknown num color: "+f)},fp=dp,hp=u.type;p.prototype.num=function(){return up(this._rgb)},_.num=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["num"])))},d.format.num=fp,d.autodetect.push({p:5,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f.length===1&&hp(f[0])==="number"&&f[0]>=0&&f[0]<=16777215)return"num"}});var zs=u.unpack,Ys=u.type,$s=Math.round;p.prototype.rgb=function(f){return f===void 0&&(f=!0),f===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map($s)},p.prototype.rgba=function(f){return f===void 0&&(f=!0),this._rgb.slice(0,4).map(function(g,b){return b<3?f===!1?g:$s(g):g})},_.rgb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["rgb"])))},d.format.rgb=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];var b=zs(f,"rgba");return b[3]===void 0&&(b[3]=1),b},d.autodetect.push({p:3,test:function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];if(f=zs(f,"rgba"),Ys(f)==="array"&&(f.length===3||f.length===4&&Ys(f[3])=="number"&&f[3]>=0&&f[3]<=1))return"rgb"}});var kr=Math.log,mp=function(f){var g=f/100,b,M,V;return g<66?(b=255,M=-155.25485562709179-.44596950469579133*(M=g-2)+104.49216199393888*kr(M),V=g<20?0:-254.76935184120902+.8274096064007395*(V=g-10)+115.67994401066147*kr(V)):(b=351.97690566805693+.114206453784165*(b=g-55)-40.25366309332127*kr(b),M=325.4494125711974+.07943456536662342*(M=g-50)-28.0852963507957*kr(M),V=255),[b,M,V,1]},Zs=mp,pp=u.unpack,gp=Math.round,yp=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];for(var b=pp(f,"rgb"),M=b[0],V=b[2],H=1e3,O=4e4,z=.4,Y;O-H>z;){Y=(O+H)*.5;var X=Zs(Y);X[2]/X[0]>=V/M?O=Y:H=Y}return gp(Y)},vp=yp;p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return vp(this._rgb)},_.temp=_.kelvin=_.temperature=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];return new(Function.prototype.bind.apply(p,[null].concat(f,["temp"])))},d.format.temp=d.format.kelvin=d.format.temperature=Zs;var bp=u.type;p.prototype.alpha=function(f,g){return g===void 0&&(g=!1),f!==void 0&&bp(f)==="number"?g?(this._rgb[3]=f,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],f],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(f){f===void 0&&(f=1);var g=this,b=g.lab();return b[0]-=Wt.Kn*f,new p(b,"lab").alpha(g.alpha(),!0)},p.prototype.brighten=function(f){return f===void 0&&(f=1),this.darken(-f)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(f){var g=f.split("."),b=g[0],M=g[1],V=this[b]();if(M){var H=b.indexOf(M);if(H>-1)return V[H];throw new Error("unknown channel "+M+" in mode "+b)}else return V};var wp=u.type,Dp=Math.pow,_p=1e-7,Cp=20;p.prototype.luminance=function(f){if(f!==void 0&&wp(f)==="number"){if(f===0)return new p([0,0,0,this._rgb[3]],"rgb");if(f===1)return new p([255,255,255,this._rgb[3]],"rgb");var g=this.luminance(),b="rgb",M=Cp,V=function(O,z){var Y=O.interpolate(z,.5,b),X=Y.luminance();return Math.abs(f-X)<_p||!M--?Y:X>f?V(O,Y):V(Y,z)},H=(g>f?V(new p([0,0,0]),this):V(this,new p([255,255,255]))).rgb();return new p(H.concat([this._rgb[3]]))}return Ep.apply(void 0,this._rgb.slice(0,3))};var Ep=function(f,g,b){return f=Qi(f),g=Qi(g),b=Qi(b),.2126*f+.7152*g+.0722*b},Qi=function(f){return f/=255,f<=.03928?f/12.92:Dp((f+.055)/1.055,2.4)},Gt={},Ks=u.type,Qs=function(f,g,b){b===void 0&&(b=.5);for(var M=[],V=arguments.length-3;V-- >0;)M[V]=arguments[V+3];var H=M[0]||"lrgb";if(!Gt[H]&&!M.length&&(H=Object.keys(Gt)[0]),!Gt[H])throw new Error("interpolation mode "+H+" is not defined");return Ks(f)!=="object"&&(f=new p(f)),Ks(g)!=="object"&&(g=new p(g)),Gt[H](f,g,b).alpha(f.alpha()+b*(g.alpha()-f.alpha()))};p.prototype.mix=p.prototype.interpolate=function(f,g){g===void 0&&(g=.5);for(var b=[],M=arguments.length-2;M-- >0;)b[M]=arguments[M+2];return Qs.apply(void 0,[this,f,g].concat(b))},p.prototype.premultiply=function(f){f===void 0&&(f=!1);var g=this._rgb,b=g[3];return f?(this._rgb=[g[0]*b,g[1]*b,g[2]*b,b],this):new p([g[0]*b,g[1]*b,g[2]*b,b],"rgb")},p.prototype.saturate=function(f){f===void 0&&(f=1);var g=this,b=g.lch();return b[1]+=Wt.Kn*f,b[1]<0&&(b[1]=0),new p(b,"lch").alpha(g.alpha(),!0)},p.prototype.desaturate=function(f){return f===void 0&&(f=1),this.saturate(-f)};var Xs=u.type;p.prototype.set=function(f,g,b){b===void 0&&(b=!1);var M=f.split("."),V=M[0],H=M[1],O=this[V]();if(H){var z=V.indexOf(H);if(z>-1){if(Xs(g)=="string")switch(g.charAt(0)){case"+":O[z]+=+g;break;case"-":O[z]+=+g;break;case"*":O[z]*=+g.substr(1);break;case"/":O[z]/=+g.substr(1);break;default:O[z]=+g}else if(Xs(g)==="number")O[z]=g;else throw new Error("unsupported value for Color.set");var Y=new p(O,V);return b?(this._rgb=Y._rgb,this):Y}throw new Error("unknown channel "+H+" in mode "+V)}else return O};var Ap=function(f,g,b){var M=f._rgb,V=g._rgb;return new p(M[0]+b*(V[0]-M[0]),M[1]+b*(V[1]-M[1]),M[2]+b*(V[2]-M[2]),"rgb")};Gt.rgb=Ap;var Xi=Math.sqrt,va=Math.pow,kp=function(f,g,b){var M=f._rgb,V=M[0],H=M[1],O=M[2],z=g._rgb,Y=z[0],X=z[1],oe=z[2];return new p(Xi(va(V,2)*(1-b)+va(Y,2)*b),Xi(va(H,2)*(1-b)+va(X,2)*b),Xi(va(O,2)*(1-b)+va(oe,2)*b),"rgb")};Gt.lrgb=kp;var xp=function(f,g,b){var M=f.lab(),V=g.lab();return new p(M[0]+b*(V[0]-M[0]),M[1]+b*(V[1]-M[1]),M[2]+b*(V[2]-M[2]),"lab")};Gt.lab=xp;var Ua=function(f,g,b,M){var V,H,O,z;M==="hsl"?(O=f.hsl(),z=g.hsl()):M==="hsv"?(O=f.hsv(),z=g.hsv()):M==="hcg"?(O=f.hcg(),z=g.hcg()):M==="hsi"?(O=f.hsi(),z=g.hsi()):(M==="lch"||M==="hcl")&&(M="hcl",O=f.hcl(),z=g.hcl());var Y,X,oe,ae,ye,pe;M.substr(0,1)==="h"&&(V=O,Y=V[0],oe=V[1],ye=V[2],H=z,X=H[0],ae=H[1],pe=H[2]);var ke,Re,Se,We;return!isNaN(Y)&&!isNaN(X)?(X>Y&&X-Y>180?We=X-(Y+360):X<Y&&Y-X>180?We=X+360-Y:We=X-Y,Re=Y+b*We):isNaN(Y)?isNaN(X)?Re=Number.NaN:(Re=X,(ye==1||ye==0)&&M!="hsv"&&(ke=ae)):(Re=Y,(pe==1||pe==0)&&M!="hsv"&&(ke=oe)),ke===void 0&&(ke=oe+b*(ae-oe)),Se=ye+b*(pe-ye),new p([Re,ke,Se],M)},Js=function(f,g,b){return Ua(f,g,b,"lch")};Gt.lch=Js,Gt.hcl=Js;var Fp=function(f,g,b){var M=f.num(),V=g.num();return new p(M+b*(V-M),"num")};Gt.num=Fp;var Tp=function(f,g,b){return Ua(f,g,b,"hcg")};Gt.hcg=Tp;var Sp=function(f,g,b){return Ua(f,g,b,"hsi")};Gt.hsi=Sp;var Bp=function(f,g,b){return Ua(f,g,b,"hsl")};Gt.hsl=Bp;var Np=function(f,g,b){return Ua(f,g,b,"hsv")};Gt.hsv=Np;var Mp=u.clip_rgb,Ji=Math.pow,eo=Math.sqrt,to=Math.PI,el=Math.cos,tl=Math.sin,Ip=Math.atan2,Op=function(f,g,b){g===void 0&&(g="lrgb"),b===void 0&&(b=null);var M=f.length;b||(b=Array.from(new Array(M)).map(function(){return 1}));var V=M/b.reduce(function(Re,Se){return Re+Se});if(b.forEach(function(Re,Se){b[Se]*=V}),f=f.map(function(Re){return new p(Re)}),g==="lrgb")return qp(f,b);for(var H=f.shift(),O=H.get(g),z=[],Y=0,X=0,oe=0;oe<O.length;oe++)if(O[oe]=(O[oe]||0)*b[0],z.push(isNaN(O[oe])?0:b[0]),g.charAt(oe)==="h"&&!isNaN(O[oe])){var ae=O[oe]/180*to;Y+=el(ae)*b[0],X+=tl(ae)*b[0]}var ye=H.alpha()*b[0];f.forEach(function(Re,Se){var We=Re.get(g);ye+=Re.alpha()*b[Se+1];for(var Ke=0;Ke<O.length;Ke++)if(!isNaN(We[Ke]))if(z[Ke]+=b[Se+1],g.charAt(Ke)==="h"){var kt=We[Ke]/180*to;Y+=el(kt)*b[Se+1],X+=tl(kt)*b[Se+1]}else O[Ke]+=We[Ke]*b[Se+1]});for(var pe=0;pe<O.length;pe++)if(g.charAt(pe)==="h"){for(var ke=Ip(X/z[pe],Y/z[pe])/to*180;ke<0;)ke+=360;for(;ke>=360;)ke-=360;O[pe]=ke}else O[pe]=O[pe]/z[pe];return ye/=M,new p(O,g).alpha(ye>.99999?1:ye,!0)},qp=function(f,g){for(var b=f.length,M=[0,0,0,0],V=0;V<f.length;V++){var H=f[V],O=g[V]/b,z=H._rgb;M[0]+=Ji(z[0],2)*O,M[1]+=Ji(z[1],2)*O,M[2]+=Ji(z[2],2)*O,M[3]+=z[3]*O}return M[0]=eo(M[0]),M[1]=eo(M[1]),M[2]=eo(M[2]),M[3]>.9999999&&(M[3]=1),new p(Mp(M))},ba=u.type,Rp=Math.pow,xr=function(f){var g="rgb",b=_("#ccc"),M=0,V=[0,1],H=[],O=[0,0],z=!1,Y=[],X=!1,oe=0,ae=1,ye=!1,pe={},ke=!0,Re=1,Se=function(se){if(se=se||["#fff","#000"],se&&ba(se)==="string"&&_.brewer&&_.brewer[se.toLowerCase()]&&(se=_.brewer[se.toLowerCase()]),ba(se)==="array"){se.length===1&&(se=[se[0],se[0]]),se=se.slice(0);for(var Ce=0;Ce<se.length;Ce++)se[Ce]=_(se[Ce]);H.length=0;for(var Le=0;Le<se.length;Le++)H.push(Le/(se.length-1))}return Zt(),Y=se},We=function(se){if(z!=null){for(var Ce=z.length-1,Le=0;Le<Ce&&se>=z[Le];)Le++;return Le-1}return 0},Ke=function(se){return se},kt=function(se){return se},xt=function(se,Ce){var Le,Ie;if(Ce==null&&(Ce=!1),isNaN(se)||se===null)return b;if(Ce)Ie=se;else if(z&&z.length>2){var Ut=We(se);Ie=Ut/(z.length-2)}else ae!==oe?Ie=(se-oe)/(ae-oe):Ie=1;Ie=kt(Ie),Ce||(Ie=Ke(Ie)),Re!==1&&(Ie=Rp(Ie,Re)),Ie=O[0]+Ie*(1-O[0]-O[1]),Ie=Math.min(1,Math.max(0,Ie));var it=Math.floor(Ie*1e4);if(ke&&pe[it])Le=pe[it];else{if(ba(Y)==="array")for(var Ye=0;Ye<H.length;Ye++){var $e=H[Ye];if(Ie<=$e){Le=Y[Ye];break}if(Ie>=$e&&Ye===H.length-1){Le=Y[Ye];break}if(Ie>$e&&Ie<H[Ye+1]){Ie=(Ie-$e)/(H[Ye+1]-$e),Le=_.interpolate(Y[Ye],Y[Ye+1],Ie,g);break}}else ba(Y)==="function"&&(Le=Y(Ie));ke&&(pe[it]=Le)}return Le},Zt=function(){return pe={}};Se(f);var Pe=function(se){var Ce=_(xt(se));return X&&Ce[X]?Ce[X]():Ce};return Pe.classes=function(se){if(se!=null){if(ba(se)==="array")z=se,V=[se[0],se[se.length-1]];else{var Ce=_.analyze(V);se===0?z=[Ce.min,Ce.max]:z=_.limits(Ce,"e",se)}return Pe}return z},Pe.domain=function(se){if(!arguments.length)return V;oe=se[0],ae=se[se.length-1],H=[];var Ce=Y.length;if(se.length===Ce&&oe!==ae)for(var Le=0,Ie=Array.from(se);Le<Ie.length;Le+=1){var Ut=Ie[Le];H.push((Ut-oe)/(ae-oe))}else{for(var it=0;it<Ce;it++)H.push(it/(Ce-1));if(se.length>2){var Ye=se.map(function(ht,Qe){return Qe/(se.length-1)}),$e=se.map(function(ht){return(ht-oe)/(ae-oe)});$e.every(function(ht,Qe){return Ye[Qe]===ht})||(kt=function(ht){if(ht<=0||ht>=1)return ht;for(var Qe=0;ht>=$e[Qe+1];)Qe++;var Bn=(ht-$e[Qe])/($e[Qe+1]-$e[Qe]),wa=Ye[Qe]+Bn*(Ye[Qe+1]-Ye[Qe]);return wa})}}return V=[oe,ae],Pe},Pe.mode=function(se){return arguments.length?(g=se,Zt(),Pe):g},Pe.range=function(se,Ce){return Se(se,Ce),Pe},Pe.out=function(se){return X=se,Pe},Pe.spread=function(se){return arguments.length?(M=se,Pe):M},Pe.correctLightness=function(se){return se==null&&(se=!0),ye=se,Zt(),ye?Ke=function(Ce){for(var Le=xt(0,!0).lab()[0],Ie=xt(1,!0).lab()[0],Ut=Le>Ie,it=xt(Ce,!0).lab()[0],Ye=Le+(Ie-Le)*Ce,$e=it-Ye,ht=0,Qe=1,Bn=20;Math.abs($e)>.01&&Bn-- >0;)(function(){return Ut&&($e*=-1),$e<0?(ht=Ce,Ce+=(Qe-Ce)*.5):(Qe=Ce,Ce+=(ht-Ce)*.5),it=xt(Ce,!0).lab()[0],$e=it-Ye})();return Ce}:Ke=function(Ce){return Ce},Pe},Pe.padding=function(se){return se!=null?(ba(se)==="number"&&(se=[se,se]),O=se,Pe):O},Pe.colors=function(se,Ce){arguments.length<2&&(Ce="hex");var Le=[];if(arguments.length===0)Le=Y.slice(0);else if(se===1)Le=[Pe(.5)];else if(se>1){var Ie=V[0],Ut=V[1]-Ie;Le=Lp(0,se,!1).map(function(Qe){return Pe(Ie+Qe/(se-1)*Ut)})}else{f=[];var it=[];if(z&&z.length>2)for(var Ye=1,$e=z.length,ht=1<=$e;ht?Ye<$e:Ye>$e;ht?Ye++:Ye--)it.push((z[Ye-1]+z[Ye])*.5);else it=V;Le=it.map(function(Qe){return Pe(Qe)})}return _[Ce]&&(Le=Le.map(function(Qe){return Qe[Ce]()})),Le},Pe.cache=function(se){return se!=null?(ke=se,Pe):ke},Pe.gamma=function(se){return se!=null?(Re=se,Pe):Re},Pe.nodata=function(se){return se!=null?(b=_(se),Pe):b},Pe};function Lp(f,g,b){for(var M=[],V=f<g,H=b?V?g+1:g-1:g,O=f;V?O<H:O>H;V?O++:O--)M.push(O);return M}var no=function(f){var g,b,M,V,H,O,z;if(f=f.map(function(ae){return new p(ae)}),f.length===2)g=f.map(function(ae){return ae.lab()}),H=g[0],O=g[1],V=function(ae){var ye=[0,1,2].map(function(pe){return H[pe]+ae*(O[pe]-H[pe])});return new p(ye,"lab")};else if(f.length===3)b=f.map(function(ae){return ae.lab()}),H=b[0],O=b[1],z=b[2],V=function(ae){var ye=[0,1,2].map(function(pe){return(1-ae)*(1-ae)*H[pe]+2*(1-ae)*ae*O[pe]+ae*ae*z[pe]});return new p(ye,"lab")};else if(f.length===4){var Y;M=f.map(function(ae){return ae.lab()}),H=M[0],O=M[1],z=M[2],Y=M[3],V=function(ae){var ye=[0,1,2].map(function(pe){return(1-ae)*(1-ae)*(1-ae)*H[pe]+3*(1-ae)*(1-ae)*ae*O[pe]+3*(1-ae)*ae*ae*z[pe]+ae*ae*ae*Y[pe]});return new p(ye,"lab")}}else if(f.length===5){var X=no(f.slice(0,3)),oe=no(f.slice(2,5));V=function(ae){return ae<.5?X(ae*2):oe((ae-.5)*2)}}return V},Pp=function(f){var g=no(f);return g.scale=function(){return xr(g)},g},on=function(f,g,b){if(!on[b])throw new Error("unknown blend mode "+b);return on[b](f,g)},Tn=function(f){return function(g,b){var M=_(b).rgb(),V=_(g).rgb();return _.rgb(f(M,V))}},Sn=function(f){return function(g,b){var M=[];return M[0]=f(g[0],b[0]),M[1]=f(g[1],b[1]),M[2]=f(g[2],b[2]),M}},jp=function(f){return f},Vp=function(f,g){return f*g/255},Hp=function(f,g){return f>g?g:f},Wp=function(f,g){return f>g?f:g},Gp=function(f,g){return 255*(1-(1-f/255)*(1-g/255))},Up=function(f,g){return g<128?2*f*g/255:255*(1-2*(1-f/255)*(1-g/255))},zp=function(f,g){return 255*(1-(1-g/255)/(f/255))},Yp=function(f,g){return f===255?255:(f=255*(g/255)/(1-f/255),f>255?255:f)};on.normal=Tn(Sn(jp)),on.multiply=Tn(Sn(Vp)),on.screen=Tn(Sn(Gp)),on.overlay=Tn(Sn(Up)),on.darken=Tn(Sn(Hp)),on.lighten=Tn(Sn(Wp)),on.dodge=Tn(Sn(Yp)),on.burn=Tn(Sn(zp));for(var $p=on,ao=u.type,Zp=u.clip_rgb,Kp=u.TWOPI,Qp=Math.pow,Xp=Math.sin,Jp=Math.cos,eg=function(f,g,b,M,V){f===void 0&&(f=300),g===void 0&&(g=-1.5),b===void 0&&(b=1),M===void 0&&(M=1),V===void 0&&(V=[0,1]);var H=0,O;ao(V)==="array"?O=V[1]-V[0]:(O=0,V=[V,V]);var z=function(Y){var X=Kp*((f+120)/360+g*Y),oe=Qp(V[0]+O*Y,M),ae=H!==0?b[0]+Y*H:b,ye=ae*oe*(1-oe)/2,pe=Jp(X),ke=Xp(X),Re=oe+ye*(-.14861*pe+1.78277*ke),Se=oe+ye*(-.29227*pe-.90649*ke),We=oe+ye*(1.97294*pe);return _(Zp([Re*255,Se*255,We*255,1]))};return z.start=function(Y){return Y==null?f:(f=Y,z)},z.rotations=function(Y){return Y==null?g:(g=Y,z)},z.gamma=function(Y){return Y==null?M:(M=Y,z)},z.hue=function(Y){return Y==null?b:(b=Y,ao(b)==="array"?(H=b[1]-b[0],H===0&&(b=b[1])):H=0,z)},z.lightness=function(Y){return Y==null?V:(ao(Y)==="array"?(V=Y,O=Y[1]-Y[0]):(V=[Y,Y],O=0),z)},z.scale=function(){return _.scale(z)},z.hue(b),z},tg="0123456789abcdef",ng=Math.floor,ag=Math.random,rg=function(){for(var f="#",g=0;g<6;g++)f+=tg.charAt(ng(ag()*16));return new p(f,"hex")},nl=Math.log,ig=Math.pow,og=Math.floor,sg=Math.abs,al=function(f,g){g===void 0&&(g=null);var b={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return o(f)==="object"&&(f=Object.values(f)),f.forEach(function(M){g&&o(M)==="object"&&(M=M[g]),M!=null&&!isNaN(M)&&(b.values.push(M),b.sum+=M,M<b.min&&(b.min=M),M>b.max&&(b.max=M),b.count+=1)}),b.domain=[b.min,b.max],b.limits=function(M,V){return rl(b,M,V)},b},rl=function(f,g,b){g===void 0&&(g="equal"),b===void 0&&(b=7),o(f)=="array"&&(f=al(f));var M=f.min,V=f.max,H=f.values.sort(function(uo,co){return uo-co});if(b===1)return[M,V];var O=[];if(g.substr(0,1)==="c"&&(O.push(M),O.push(V)),g.substr(0,1)==="e"){O.push(M);for(var z=1;z<b;z++)O.push(M+z/b*(V-M));O.push(V)}else if(g.substr(0,1)==="l"){if(M<=0)throw new Error("Logarithmic scales are only possible for values > 0");var Y=Math.LOG10E*nl(M),X=Math.LOG10E*nl(V);O.push(M);for(var oe=1;oe<b;oe++)O.push(ig(10,Y+oe/b*(X-Y)));O.push(V)}else if(g.substr(0,1)==="q"){O.push(M);for(var ae=1;ae<b;ae++){var ye=(H.length-1)*ae/b,pe=og(ye);if(pe===ye)O.push(H[pe]);else{var ke=ye-pe;O.push(H[pe]*(1-ke)+H[pe+1]*ke)}}O.push(V)}else if(g.substr(0,1)==="k"){var Re,Se=H.length,We=new Array(Se),Ke=new Array(b),kt=!0,xt=0,Zt=null;Zt=[],Zt.push(M);for(var Pe=1;Pe<b;Pe++)Zt.push(M+Pe/b*(V-M));for(Zt.push(V);kt;){for(var se=0;se<b;se++)Ke[se]=0;for(var Ce=0;Ce<Se;Ce++)for(var Le=H[Ce],Ie=Number.MAX_VALUE,Ut=void 0,it=0;it<b;it++){var Ye=sg(Zt[it]-Le);Ye<Ie&&(Ie=Ye,Ut=it),Ke[Ut]++,We[Ce]=Ut}for(var $e=new Array(b),ht=0;ht<b;ht++)$e[ht]=null;for(var Qe=0;Qe<Se;Qe++)Re=We[Qe],$e[Re]===null?$e[Re]=H[Qe]:$e[Re]+=H[Qe];for(var Bn=0;Bn<b;Bn++)$e[Bn]*=1/Ke[Bn];kt=!1;for(var wa=0;wa<b;wa++)if($e[wa]!==Zt[wa]){kt=!0;break}Zt=$e,xt++,xt>200&&(kt=!1)}for(var za={},oo=0;oo<b;oo++)za[oo]=[];for(var Sr=0;Sr<Se;Sr++)Re=We[Sr],za[Re].push(H[Sr]);for(var Un=[],Ya=0;Ya<b;Ya++)Un.push(za[Ya][0]),Un.push(za[Ya][za[Ya].length-1]);Un=Un.sort(function(uo,co){return uo-co}),O.push(Un[0]);for(var so=1;so<Un.length;so+=2){var lo=Un[so];!isNaN(lo)&&O.indexOf(lo)===-1&&O.push(lo)}}return O},il={analyze:al,limits:rl},lg=function(f,g){f=new p(f),g=new p(g);var b=f.luminance(),M=g.luminance();return b>M?(b+.05)/(M+.05):(M+.05)/(b+.05)},Fr=Math.sqrt,ug=Math.atan2,ol=Math.abs,sl=Math.cos,ro=Math.PI,cg=function(f,g,b,M){b===void 0&&(b=1),M===void 0&&(M=1),f=new p(f),g=new p(g);for(var V=Array.from(f.lab()),H=V[0],O=V[1],z=V[2],Y=Array.from(g.lab()),X=Y[0],oe=Y[1],ae=Y[2],ye=Fr(O*O+z*z),pe=Fr(oe*oe+ae*ae),ke=H<16?.511:.040975*H/(1+.01765*H),Re=.0638*ye/(1+.0131*ye)+.638,Se=ye<1e-6?0:ug(z,O)*180/ro;Se<0;)Se+=360;for(;Se>=360;)Se-=360;var We=Se>=164&&Se<=345?.56+ol(.2*sl(ro*(Se+168)/180)):.36+ol(.4*sl(ro*(Se+35)/180)),Ke=ye*ye*ye*ye,kt=Fr(Ke/(Ke+1900)),xt=Re*(kt*We+1-kt),Zt=H-X,Pe=ye-pe,se=O-oe,Ce=z-ae,Le=se*se+Ce*Ce-Pe*Pe,Ie=Zt/(b*ke),Ut=Pe/(M*Re),it=xt;return Fr(Ie*Ie+Ut*Ut+Le/(it*it))},dg=function(f,g,b){b===void 0&&(b="lab"),f=new p(f),g=new p(g);var M=f.get(b),V=g.get(b),H=0;for(var O in M){var z=(M[O]||0)-(V[O]||0);H+=z*z}return Math.sqrt(H)},fg=function(){for(var f=[],g=arguments.length;g--;)f[g]=arguments[g];try{return new(Function.prototype.bind.apply(p,[null].concat(f))),!0}catch{return!1}},hg={cool:function(){return xr([_.hsl(180,1,.9),_.hsl(250,.7,.4)])},hot:function(){return xr(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")}},Tr={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},io=0,ll=Object.keys(Tr);io<ll.length;io+=1){var ul=ll[io];Tr[ul.toLowerCase()]=Tr[ul]}var mg=Tr;_.average=Op,_.bezier=Pp,_.blend=$p,_.cubehelix=eg,_.mix=_.interpolate=Qs,_.random=rg,_.scale=xr,_.analyze=il.analyze,_.contrast=lg,_.deltaE=cg,_.distance=dg,_.limits=il.limits,_.valid=fg,_.scales=hg,_.colors=ya,_.brewer=mg;var pg=_;return pg})});var iu=Xe(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.default=void 0;var _o=Pr(dl()),Co=Pr(Al()),S2=Pr(eu()),Lr=Pr(tu());function Pr(t){return t&&t.__esModule?t:{default:t}}function B2(t){if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(t=N2(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(s){throw s},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,r=!0,i=!1,o;return{s:function(){a=t[Symbol.iterator]()},n:function(){var s=a.next();return r=s.done,s},e:function(s){i=!0,o=s},f:function(){try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}}}function N2(t,e){if(!!t){if(typeof t=="string")return nu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nu(t,e)}}function nu(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function au(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function M2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?au(Object(n),!0).forEach(function(a){I2(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):au(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function I2(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var O2={count:5,hueMin:0,hueMax:360,chromaMin:0,chromaMax:100,lightMin:0,lightMax:100,quality:50,samples:800},ru=function(e,n){for(var a=Number.MAX_SAFE_INTEGER,r=0,i=0;i<e.length;i+=1){var o=e[i],l=Math.sqrt(Math.pow(Math.abs(o[0]-n[0]),2)+Math.pow(Math.abs(o[1]-n[1]),2)+Math.pow(Math.abs(o[2]-n[2]),2));l<a&&(a=l,r=i)}return r},q2=function(e,n){var a=Lr.default.lab(e),r=a.hcl(),i=a.rgb(),o=Lr.default.rgb(i).lab(),l=2;return r[0]>=n.hueMin&&r[0]<=n.hueMax&&r[1]>=n.chromaMin&&r[1]<=n.chromaMax&&r[2]>=n.lightMin&&r[2]<=n.lightMax&&o[0]>=e[0]-l&&o[0]<=e[0]+l&&o[1]>=e[1]-l&&o[1]<=e[1]+l&&o[2]>=e[2]-l&&o[2]<=e[2]+l},R2=function(e){for(var n=e.slice(0),a=[n.shift()];n.length>0;){for(var r=a[a.length-1],i=0,o=Number.MIN_SAFE_INTEGER,l=0;l<n.length;l+=1){var s=Math.sqrt(Math.pow(Math.abs(r[0]-n[l][0]),2)+Math.pow(Math.abs(r[1]-n[l][1]),2)+Math.pow(Math.abs(r[2]-n[l][2]),2));s>o&&(o=s,i=l)}a.push(n.splice(i,1)[0])}return a},L2=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=M2({},O2,{},e);if(n.count<=0)return[];n.samples<n.count*3&&(n.samples=Math.ceil(n.count*3));var a=[],r=[],i=new Set,o=Math.ceil(Math.cbrt(n.samples)),l=(n.hueMax-n.hueMin)/o,s=(n.chromaMax-n.chromaMin)/o,c=(n.lightMax-n.lightMin)/o;if(l<=0)throw new Error("hueMax must be greater than hueMin!");if(s<=0)throw new Error("chromaMax must be greater than chromaMin!");if(c<=0)throw new Error("lightMax must be greater than lightMin!");for(var u=n.hueMin+l/2;u<=n.hueMax;u+=l)for(var d=n.chromaMin+s/2;d<=n.chromaMax;d+=s)for(var m=n.lightMin+c/2;m<=n.lightMax;m+=c){var v=Lr.default.hcl(u,d,m).lab();q2(v,n)&&i.add(v.toString())}if(i=Array.from(i),i=i.map(function(Ae){return Ae.split(",").map(function(Oe){return parseFloat(Oe)})}),i.length<n.count)throw new Error("Not enough samples to generate palette, increase sample count.");for(var h=Math.floor(i.length/n.count),y=0;y<i.length&&(a.push(i[y]),r.push([]),!(a.length>=n.count));y+=h);for(var p=1;p<=n.quality;p+=1){for(var S=(0,Co.default)(r),_=(0,Co.default)(i),A=0;A<a.length;A+=1){var L=ru(_,a[A]);S[A].push(_[L]),_.splice(L,1)}for(var k=0;k<_.length;k+=1){var E=i[k],w=ru(a,E);S[w].push(i[k])}for(var N=(0,Co.default)(a),F=0;F<S.length;F+=1){var j=S[F],x=j.length,T=[],I=[],U=[],$=B2(j),ee;try{for($.s();!(ee=$.n()).done;){var Z=ee.value;T.push(Z[0]),I.push(Z[1]),U.push(Z[2])}}catch(Ae){$.e(Ae)}finally{$.f()}var K=_o.default.sum(T)/x,ve=_o.default.sum(I)/x,xe=_o.default.sum(U)/x;a[F]=[K,ve,xe]}if((0,S2.default)(N,a))break}return a=R2(a),a.map(function(Ae){return Lr.default.lab(Ae)})},P2=L2;jr.default=P2});var ou=Xe((Vr,Ka)=>{(function(t){var e=typeof Vr=="object"&&Vr,n=typeof Ka=="object"&&Ka&&Ka.exports==e&&Ka,a=typeof global=="object"&&global;(a.global===a||a.window===a)&&(t=a);var r=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,i=/[\x01-\x7F]/g,o=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,s={"\xAD":"shy","\u200C":"zwnj","\u200D":"zwj","\u200E":"lrm","\u2063":"ic","\u2062":"it","\u2061":"af","\u200F":"rlm","\u200B":"ZeroWidthSpace","\u2060":"NoBreak","\u0311":"DownBreve","\u20DB":"tdot","\u20DC":"DotDot"," ":"Tab","\n":"NewLine","\u2008":"puncsp","\u205F":"MediumSpace","\u2009":"thinsp","\u200A":"hairsp","\u2004":"emsp13","\u2002":"ensp","\u2005":"emsp14","\u2003":"emsp","\u2007":"numsp","\xA0":"nbsp","\u205F\u200A":"ThickSpace","\u203E":"oline",_:"lowbar","\u2010":"dash","\u2013":"ndash","\u2014":"mdash","\u2015":"horbar",",":"comma",";":"semi","\u204F":"bsemi",":":"colon","\u2A74":"Colone","!":"excl","\xA1":"iexcl","?":"quest","\xBF":"iquest",".":"period","\u2025":"nldr","\u2026":"mldr","\xB7":"middot","'":"apos","\u2018":"lsquo","\u2019":"rsquo","\u201A":"sbquo","\u2039":"lsaquo","\u203A":"rsaquo",'"':"quot","\u201C":"ldquo","\u201D":"rdquo","\u201E":"bdquo","\xAB":"laquo","\xBB":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","\u2308":"lceil","\u2309":"rceil","\u230A":"lfloor","\u230B":"rfloor","\u2985":"lopar","\u2986":"ropar","\u298B":"lbrke","\u298C":"rbrke","\u298D":"lbrkslu","\u298E":"rbrksld","\u298F":"lbrksld","\u2990":"rbrkslu","\u2991":"langd","\u2992":"rangd","\u2993":"lparlt","\u2994":"rpargt","\u2995":"gtlPar","\u2996":"ltrPar","\u27E6":"lobrk","\u27E7":"robrk","\u27E8":"lang","\u27E9":"rang","\u27EA":"Lang","\u27EB":"Rang","\u27EC":"loang","\u27ED":"roang","\u2772":"lbbrk","\u2773":"rbbrk","\u2016":"Vert","\xA7":"sect","\xB6":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","\u2030":"permil","\u2031":"pertenk","\u2020":"dagger","\u2021":"Dagger","\u2022":"bull","\u2043":"hybull","\u2032":"prime","\u2033":"Prime","\u2034":"tprime","\u2057":"qprime","\u2035":"bprime","\u2041":"caret","`":"grave","\xB4":"acute","\u02DC":"tilde","^":"Hat","\xAF":"macr","\u02D8":"breve","\u02D9":"dot","\xA8":"die","\u02DA":"ring","\u02DD":"dblac","\xB8":"cedil","\u02DB":"ogon","\u02C6":"circ","\u02C7":"caron","\xB0":"deg","\xA9":"copy","\xAE":"reg","\u2117":"copysr","\u2118":"wp","\u211E":"rx","\u2127":"mho","\u2129":"iiota","\u2190":"larr","\u219A":"nlarr","\u2192":"rarr","\u219B":"nrarr","\u2191":"uarr","\u2193":"darr","\u2194":"harr","\u21AE":"nharr","\u2195":"varr","\u2196":"nwarr","\u2197":"nearr","\u2198":"searr","\u2199":"swarr","\u219D":"rarrw","\u219D\u0338":"nrarrw","\u219E":"Larr","\u219F":"Uarr","\u21A0":"Rarr","\u21A1":"Darr","\u21A2":"larrtl","\u21A3":"rarrtl","\u21A4":"mapstoleft","\u21A5":"mapstoup","\u21A6":"map","\u21A7":"mapstodown","\u21A9":"larrhk","\u21AA":"rarrhk","\u21AB":"larrlp","\u21AC":"rarrlp","\u21AD":"harrw","\u21B0":"lsh","\u21B1":"rsh","\u21B2":"ldsh","\u21B3":"rdsh","\u21B5":"crarr","\u21B6":"cularr","\u21B7":"curarr","\u21BA":"olarr","\u21BB":"orarr","\u21BC":"lharu","\u21BD":"lhard","\u21BE":"uharr","\u21BF":"uharl","\u21C0":"rharu","\u21C1":"rhard","\u21C2":"dharr","\u21C3":"dharl","\u21C4":"rlarr","\u21C5":"udarr","\u21C6":"lrarr","\u21C7":"llarr","\u21C8":"uuarr","\u21C9":"rrarr","\u21CA":"ddarr","\u21CB":"lrhar","\u21CC":"rlhar","\u21D0":"lArr","\u21CD":"nlArr","\u21D1":"uArr","\u21D2":"rArr","\u21CF":"nrArr","\u21D3":"dArr","\u21D4":"iff","\u21CE":"nhArr","\u21D5":"vArr","\u21D6":"nwArr","\u21D7":"neArr","\u21D8":"seArr","\u21D9":"swArr","\u21DA":"lAarr","\u21DB":"rAarr","\u21DD":"zigrarr","\u21E4":"larrb","\u21E5":"rarrb","\u21F5":"duarr","\u21FD":"loarr","\u21FE":"roarr","\u21FF":"hoarr","\u2200":"forall","\u2201":"comp","\u2202":"part","\u2202\u0338":"npart","\u2203":"exist","\u2204":"nexist","\u2205":"empty","\u2207":"Del","\u2208":"in","\u2209":"notin","\u220B":"ni","\u220C":"notni","\u03F6":"bepsi","\u220F":"prod","\u2210":"coprod","\u2211":"sum","+":"plus","\xB1":"pm","\xF7":"div","\xD7":"times","<":"lt","\u226E":"nlt","<\u20D2":"nvlt","=":"equals","\u2260":"ne","=\u20E5":"bne","\u2A75":"Equal",">":"gt","\u226F":"ngt",">\u20D2":"nvgt","\xAC":"not","|":"vert","\xA6":"brvbar","\u2212":"minus","\u2213":"mp","\u2214":"plusdo","\u2044":"frasl","\u2216":"setmn","\u2217":"lowast","\u2218":"compfn","\u221A":"Sqrt","\u221D":"prop","\u221E":"infin","\u221F":"angrt","\u2220":"ang","\u2220\u20D2":"nang","\u2221":"angmsd","\u2222":"angsph","\u2223":"mid","\u2224":"nmid","\u2225":"par","\u2226":"npar","\u2227":"and","\u2228":"or","\u2229":"cap","\u2229\uFE00":"caps","\u222A":"cup","\u222A\uFE00":"cups","\u222B":"int","\u222C":"Int","\u222D":"tint","\u2A0C":"qint","\u222E":"oint","\u222F":"Conint","\u2230":"Cconint","\u2231":"cwint","\u2232":"cwconint","\u2233":"awconint","\u2234":"there4","\u2235":"becaus","\u2236":"ratio","\u2237":"Colon","\u2238":"minusd","\u223A":"mDDot","\u223B":"homtht","\u223C":"sim","\u2241":"nsim","\u223C\u20D2":"nvsim","\u223D":"bsim","\u223D\u0331":"race","\u223E":"ac","\u223E\u0333":"acE","\u223F":"acd","\u2240":"wr","\u2242":"esim","\u2242\u0338":"nesim","\u2243":"sime","\u2244":"nsime","\u2245":"cong","\u2247":"ncong","\u2246":"simne","\u2248":"ap","\u2249":"nap","\u224A":"ape","\u224B":"apid","\u224B\u0338":"napid","\u224C":"bcong","\u224D":"CupCap","\u226D":"NotCupCap","\u224D\u20D2":"nvap","\u224E":"bump","\u224E\u0338":"nbump","\u224F":"bumpe","\u224F\u0338":"nbumpe","\u2250":"doteq","\u2250\u0338":"nedot","\u2251":"eDot","\u2252":"efDot","\u2253":"erDot","\u2254":"colone","\u2255":"ecolon","\u2256":"ecir","\u2257":"cire","\u2259":"wedgeq","\u225A":"veeeq","\u225C":"trie","\u225F":"equest","\u2261":"equiv","\u2262":"nequiv","\u2261\u20E5":"bnequiv","\u2264":"le","\u2270":"nle","\u2264\u20D2":"nvle","\u2265":"ge","\u2271":"nge","\u2265\u20D2":"nvge","\u2266":"lE","\u2266\u0338":"nlE","\u2267":"gE","\u2267\u0338":"ngE","\u2268\uFE00":"lvnE","\u2268":"lnE","\u2269":"gnE","\u2269\uFE00":"gvnE","\u226A":"ll","\u226A\u0338":"nLtv","\u226A\u20D2":"nLt","\u226B":"gg","\u226B\u0338":"nGtv","\u226B\u20D2":"nGt","\u226C":"twixt","\u2272":"lsim","\u2274":"nlsim","\u2273":"gsim","\u2275":"ngsim","\u2276":"lg","\u2278":"ntlg","\u2277":"gl","\u2279":"ntgl","\u227A":"pr","\u2280":"npr","\u227B":"sc","\u2281":"nsc","\u227C":"prcue","\u22E0":"nprcue","\u227D":"sccue","\u22E1":"nsccue","\u227E":"prsim","\u227F":"scsim","\u227F\u0338":"NotSucceedsTilde","\u2282":"sub","\u2284":"nsub","\u2282\u20D2":"vnsub","\u2283":"sup","\u2285":"nsup","\u2283\u20D2":"vnsup","\u2286":"sube","\u2288":"nsube","\u2287":"supe","\u2289":"nsupe","\u228A\uFE00":"vsubne","\u228A":"subne","\u228B\uFE00":"vsupne","\u228B":"supne","\u228D":"cupdot","\u228E":"uplus","\u228F":"sqsub","\u228F\u0338":"NotSquareSubset","\u2290":"sqsup","\u2290\u0338":"NotSquareSuperset","\u2291":"sqsube","\u22E2":"nsqsube","\u2292":"sqsupe","\u22E3":"nsqsupe","\u2293":"sqcap","\u2293\uFE00":"sqcaps","\u2294":"sqcup","\u2294\uFE00":"sqcups","\u2295":"oplus","\u2296":"ominus","\u2297":"otimes","\u2298":"osol","\u2299":"odot","\u229A":"ocir","\u229B":"oast","\u229D":"odash","\u229E":"plusb","\u229F":"minusb","\u22A0":"timesb","\u22A1":"sdotb","\u22A2":"vdash","\u22AC":"nvdash","\u22A3":"dashv","\u22A4":"top","\u22A5":"bot","\u22A7":"models","\u22A8":"vDash","\u22AD":"nvDash","\u22A9":"Vdash","\u22AE":"nVdash","\u22AA":"Vvdash","\u22AB":"VDash","\u22AF":"nVDash","\u22B0":"prurel","\u22B2":"vltri","\u22EA":"nltri","\u22B3":"vrtri","\u22EB":"nrtri","\u22B4":"ltrie","\u22EC":"nltrie","\u22B4\u20D2":"nvltrie","\u22B5":"rtrie","\u22ED":"nrtrie","\u22B5\u20D2":"nvrtrie","\u22B6":"origof","\u22B7":"imof","\u22B8":"mumap","\u22B9":"hercon","\u22BA":"intcal","\u22BB":"veebar","\u22BD":"barvee","\u22BE":"angrtvb","\u22BF":"lrtri","\u22C0":"Wedge","\u22C1":"Vee","\u22C2":"xcap","\u22C3":"xcup","\u22C4":"diam","\u22C5":"sdot","\u22C6":"Star","\u22C7":"divonx","\u22C8":"bowtie","\u22C9":"ltimes","\u22CA":"rtimes","\u22CB":"lthree","\u22CC":"rthree","\u22CD":"bsime","\u22CE":"cuvee","\u22CF":"cuwed","\u22D0":"Sub","\u22D1":"Sup","\u22D2":"Cap","\u22D3":"Cup","\u22D4":"fork","\u22D5":"epar","\u22D6":"ltdot","\u22D7":"gtdot","\u22D8":"Ll","\u22D8\u0338":"nLl","\u22D9":"Gg","\u22D9\u0338":"nGg","\u22DA\uFE00":"lesg","\u22DA":"leg","\u22DB":"gel","\u22DB\uFE00":"gesl","\u22DE":"cuepr","\u22DF":"cuesc","\u22E6":"lnsim","\u22E7":"gnsim","\u22E8":"prnsim","\u22E9":"scnsim","\u22EE":"vellip","\u22EF":"ctdot","\u22F0":"utdot","\u22F1":"dtdot","\u22F2":"disin","\u22F3":"isinsv","\u22F4":"isins","\u22F5":"isindot","\u22F5\u0338":"notindot","\u22F6":"notinvc","\u22F7":"notinvb","\u22F9":"isinE","\u22F9\u0338":"notinE","\u22FA":"nisd","\u22FB":"xnis","\u22FC":"nis","\u22FD":"notnivc","\u22FE":"notnivb","\u2305":"barwed","\u2306":"Barwed","\u230C":"drcrop","\u230D":"dlcrop","\u230E":"urcrop","\u230F":"ulcrop","\u2310":"bnot","\u2312":"profline","\u2313":"profsurf","\u2315":"telrec","\u2316":"target","\u231C":"ulcorn","\u231D":"urcorn","\u231E":"dlcorn","\u231F":"drcorn","\u2322":"frown","\u2323":"smile","\u232D":"cylcty","\u232E":"profalar","\u2336":"topbot","\u233D":"ovbar","\u233F":"solbar","\u237C":"angzarr","\u23B0":"lmoust","\u23B1":"rmoust","\u23B4":"tbrk","\u23B5":"bbrk","\u23B6":"bbrktbrk","\u23DC":"OverParenthesis","\u23DD":"UnderParenthesis","\u23DE":"OverBrace","\u23DF":"UnderBrace","\u23E2":"trpezium","\u23E7":"elinters","\u2423":"blank","\u2500":"boxh","\u2502":"boxv","\u250C":"boxdr","\u2510":"boxdl","\u2514":"boxur","\u2518":"boxul","\u251C":"boxvr","\u2524":"boxvl","\u252C":"boxhd","\u2534":"boxhu","\u253C":"boxvh","\u2550":"boxH","\u2551":"boxV","\u2552":"boxdR","\u2553":"boxDr","\u2554":"boxDR","\u2555":"boxdL","\u2556":"boxDl","\u2557":"boxDL","\u2558":"boxuR","\u2559":"boxUr","\u255A":"boxUR","\u255B":"boxuL","\u255C":"boxUl","\u255D":"boxUL","\u255E":"boxvR","\u255F":"boxVr","\u2560":"boxVR","\u2561":"boxvL","\u2562":"boxVl","\u2563":"boxVL","\u2564":"boxHd","\u2565":"boxhD","\u2566":"boxHD","\u2567":"boxHu","\u2568":"boxhU","\u2569":"boxHU","\u256A":"boxvH","\u256B":"boxVh","\u256C":"boxVH","\u2580":"uhblk","\u2584":"lhblk","\u2588":"block","\u2591":"blk14","\u2592":"blk12","\u2593":"blk34","\u25A1":"squ","\u25AA":"squf","\u25AB":"EmptyVerySmallSquare","\u25AD":"rect","\u25AE":"marker","\u25B1":"fltns","\u25B3":"xutri","\u25B4":"utrif","\u25B5":"utri","\u25B8":"rtrif","\u25B9":"rtri","\u25BD":"xdtri","\u25BE":"dtrif","\u25BF":"dtri","\u25C2":"ltrif","\u25C3":"ltri","\u25CA":"loz","\u25CB":"cir","\u25EC":"tridot","\u25EF":"xcirc","\u25F8":"ultri","\u25F9":"urtri","\u25FA":"lltri","\u25FB":"EmptySmallSquare","\u25FC":"FilledSmallSquare","\u2605":"starf","\u2606":"star","\u260E":"phone","\u2640":"female","\u2642":"male","\u2660":"spades","\u2663":"clubs","\u2665":"hearts","\u2666":"diams","\u266A":"sung","\u2713":"check","\u2717":"cross","\u2720":"malt","\u2736":"sext","\u2758":"VerticalSeparator","\u27C8":"bsolhsub","\u27C9":"suphsol","\u27F5":"xlarr","\u27F6":"xrarr","\u27F7":"xharr","\u27F8":"xlArr","\u27F9":"xrArr","\u27FA":"xhArr","\u27FC":"xmap","\u27FF":"dzigrarr","\u2902":"nvlArr","\u2903":"nvrArr","\u2904":"nvHarr","\u2905":"Map","\u290C":"lbarr","\u290D":"rbarr","\u290E":"lBarr","\u290F":"rBarr","\u2910":"RBarr","\u2911":"DDotrahd","\u2912":"UpArrowBar","\u2913":"DownArrowBar","\u2916":"Rarrtl","\u2919":"latail","\u291A":"ratail","\u291B":"lAtail","\u291C":"rAtail","\u291D":"larrfs","\u291E":"rarrfs","\u291F":"larrbfs","\u2920":"rarrbfs","\u2923":"nwarhk","\u2924":"nearhk","\u2925":"searhk","\u2926":"swarhk","\u2927":"nwnear","\u2928":"toea","\u2929":"tosa","\u292A":"swnwar","\u2933":"rarrc","\u2933\u0338":"nrarrc","\u2935":"cudarrr","\u2936":"ldca","\u2937":"rdca","\u2938":"cudarrl","\u2939":"larrpl","\u293C":"curarrm","\u293D":"cularrp","\u2945":"rarrpl","\u2948":"harrcir","\u2949":"Uarrocir","\u294A":"lurdshar","\u294B":"ldrushar","\u294E":"LeftRightVector","\u294F":"RightUpDownVector","\u2950":"DownLeftRightVector","\u2951":"LeftUpDownVector","\u2952":"LeftVectorBar","\u2953":"RightVectorBar","\u2954":"RightUpVectorBar","\u2955":"RightDownVectorBar","\u2956":"DownLeftVectorBar","\u2957":"DownRightVectorBar","\u2958":"LeftUpVectorBar","\u2959":"LeftDownVectorBar","\u295A":"LeftTeeVector","\u295B":"RightTeeVector","\u295C":"RightUpTeeVector","\u295D":"RightDownTeeVector","\u295E":"DownLeftTeeVector","\u295F":"DownRightTeeVector","\u2960":"LeftUpTeeVector","\u2961":"LeftDownTeeVector","\u2962":"lHar","\u2963":"uHar","\u2964":"rHar","\u2965":"dHar","\u2966":"luruhar","\u2967":"ldrdhar","\u2968":"ruluhar","\u2969":"rdldhar","\u296A":"lharul","\u296B":"llhard","\u296C":"rharul","\u296D":"lrhard","\u296E":"udhar","\u296F":"duhar","\u2970":"RoundImplies","\u2971":"erarr","\u2972":"simrarr","\u2973":"larrsim","\u2974":"rarrsim","\u2975":"rarrap","\u2976":"ltlarr","\u2978":"gtrarr","\u2979":"subrarr","\u297B":"suplarr","\u297C":"lfisht","\u297D":"rfisht","\u297E":"ufisht","\u297F":"dfisht","\u299A":"vzigzag","\u299C":"vangrt","\u299D":"angrtvbd","\u29A4":"ange","\u29A5":"range","\u29A6":"dwangle","\u29A7":"uwangle","\u29A8":"angmsdaa","\u29A9":"angmsdab","\u29AA":"angmsdac","\u29AB":"angmsdad","\u29AC":"angmsdae","\u29AD":"angmsdaf","\u29AE":"angmsdag","\u29AF":"angmsdah","\u29B0":"bemptyv","\u29B1":"demptyv","\u29B2":"cemptyv","\u29B3":"raemptyv","\u29B4":"laemptyv","\u29B5":"ohbar","\u29B6":"omid","\u29B7":"opar","\u29B9":"operp","\u29BB":"olcross","\u29BC":"odsold","\u29BE":"olcir","\u29BF":"ofcir","\u29C0":"olt","\u29C1":"ogt","\u29C2":"cirscir","\u29C3":"cirE","\u29C4":"solb","\u29C5":"bsolb","\u29C9":"boxbox","\u29CD":"trisb","\u29CE":"rtriltri","\u29CF":"LeftTriangleBar","\u29CF\u0338":"NotLeftTriangleBar","\u29D0":"RightTriangleBar","\u29D0\u0338":"NotRightTriangleBar","\u29DC":"iinfin","\u29DD":"infintie","\u29DE":"nvinfin","\u29E3":"eparsl","\u29E4":"smeparsl","\u29E5":"eqvparsl","\u29EB":"lozf","\u29F4":"RuleDelayed","\u29F6":"dsol","\u2A00":"xodot","\u2A01":"xoplus","\u2A02":"xotime","\u2A04":"xuplus","\u2A06":"xsqcup","\u2A0D":"fpartint","\u2A10":"cirfnint","\u2A11":"awint","\u2A12":"rppolint","\u2A13":"scpolint","\u2A14":"npolint","\u2A15":"pointint","\u2A16":"quatint","\u2A17":"intlarhk","\u2A22":"pluscir","\u2A23":"plusacir","\u2A24":"simplus","\u2A25":"plusdu","\u2A26":"plussim","\u2A27":"plustwo","\u2A29":"mcomma","\u2A2A":"minusdu","\u2A2D":"loplus","\u2A2E":"roplus","\u2A2F":"Cross","\u2A30":"timesd","\u2A31":"timesbar","\u2A33":"smashp","\u2A34":"lotimes","\u2A35":"rotimes","\u2A36":"otimesas","\u2A37":"Otimes","\u2A38":"odiv","\u2A39":"triplus","\u2A3A":"triminus","\u2A3B":"tritime","\u2A3C":"iprod","\u2A3F":"amalg","\u2A40":"capdot","\u2A42":"ncup","\u2A43":"ncap","\u2A44":"capand","\u2A45":"cupor","\u2A46":"cupcap","\u2A47":"capcup","\u2A48":"cupbrcap","\u2A49":"capbrcup","\u2A4A":"cupcup","\u2A4B":"capcap","\u2A4C":"ccups","\u2A4D":"ccaps","\u2A50":"ccupssm","\u2A53":"And","\u2A54":"Or","\u2A55":"andand","\u2A56":"oror","\u2A57":"orslope","\u2A58":"andslope","\u2A5A":"andv","\u2A5B":"orv","\u2A5C":"andd","\u2A5D":"ord","\u2A5F":"wedbar","\u2A66":"sdote","\u2A6A":"simdot","\u2A6D":"congdot","\u2A6D\u0338":"ncongdot","\u2A6E":"easter","\u2A6F":"apacir","\u2A70":"apE","\u2A70\u0338":"napE","\u2A71":"eplus","\u2A72":"pluse","\u2A73":"Esim","\u2A77":"eDDot","\u2A78":"equivDD","\u2A79":"ltcir","\u2A7A":"gtcir","\u2A7B":"ltquest","\u2A7C":"gtquest","\u2A7D":"les","\u2A7D\u0338":"nles","\u2A7E":"ges","\u2A7E\u0338":"nges","\u2A7F":"lesdot","\u2A80":"gesdot","\u2A81":"lesdoto","\u2A82":"gesdoto","\u2A83":"lesdotor","\u2A84":"gesdotol","\u2A85":"lap","\u2A86":"gap","\u2A87":"lne","\u2A88":"gne","\u2A89":"lnap","\u2A8A":"gnap","\u2A8B":"lEg","\u2A8C":"gEl","\u2A8D":"lsime","\u2A8E":"gsime","\u2A8F":"lsimg","\u2A90":"gsiml","\u2A91":"lgE","\u2A92":"glE","\u2A93":"lesges","\u2A94":"gesles","\u2A95":"els","\u2A96":"egs","\u2A97":"elsdot","\u2A98":"egsdot","\u2A99":"el","\u2A9A":"eg","\u2A9D":"siml","\u2A9E":"simg","\u2A9F":"simlE","\u2AA0":"simgE","\u2AA1":"LessLess","\u2AA1\u0338":"NotNestedLessLess","\u2AA2":"GreaterGreater","\u2AA2\u0338":"NotNestedGreaterGreater","\u2AA4":"glj","\u2AA5":"gla","\u2AA6":"ltcc","\u2AA7":"gtcc","\u2AA8":"lescc","\u2AA9":"gescc","\u2AAA":"smt","\u2AAB":"lat","\u2AAC":"smte","\u2AAC\uFE00":"smtes","\u2AAD":"late","\u2AAD\uFE00":"lates","\u2AAE":"bumpE","\u2AAF":"pre","\u2AAF\u0338":"npre","\u2AB0":"sce","\u2AB0\u0338":"nsce","\u2AB3":"prE","\u2AB4":"scE","\u2AB5":"prnE","\u2AB6":"scnE","\u2AB7":"prap","\u2AB8":"scap","\u2AB9":"prnap","\u2ABA":"scnap","\u2ABB":"Pr","\u2ABC":"Sc","\u2ABD":"subdot","\u2ABE":"supdot","\u2ABF":"subplus","\u2AC0":"supplus","\u2AC1":"submult","\u2AC2":"supmult","\u2AC3":"subedot","\u2AC4":"supedot","\u2AC5":"subE","\u2AC5\u0338":"nsubE","\u2AC6":"supE","\u2AC6\u0338":"nsupE","\u2AC7":"subsim","\u2AC8":"supsim","\u2ACB\uFE00":"vsubnE","\u2ACB":"subnE","\u2ACC\uFE00":"vsupnE","\u2ACC":"supnE","\u2ACF":"csub","\u2AD0":"csup","\u2AD1":"csube","\u2AD2":"csupe","\u2AD3":"subsup","\u2AD4":"supsub","\u2AD5":"subsub","\u2AD6":"supsup","\u2AD7":"suphsub","\u2AD8":"supdsub","\u2AD9":"forkv","\u2ADA":"topfork","\u2ADB":"mlcp","\u2AE4":"Dashv","\u2AE6":"Vdashl","\u2AE7":"Barv","\u2AE8":"vBar","\u2AE9":"vBarv","\u2AEB":"Vbar","\u2AEC":"Not","\u2AED":"bNot","\u2AEE":"rnmid","\u2AEF":"cirmid","\u2AF0":"midcir","\u2AF1":"topcir","\u2AF2":"nhpar","\u2AF3":"parsim","\u2AFD":"parsl","\u2AFD\u20E5":"nparsl","\u266D":"flat","\u266E":"natur","\u266F":"sharp","\xA4":"curren","\xA2":"cent",$:"dollar","\xA3":"pound","\xA5":"yen","\u20AC":"euro","\xB9":"sup1","\xBD":"half","\u2153":"frac13","\xBC":"frac14","\u2155":"frac15","\u2159":"frac16","\u215B":"frac18","\xB2":"sup2","\u2154":"frac23","\u2156":"frac25","\xB3":"sup3","\xBE":"frac34","\u2157":"frac35","\u215C":"frac38","\u2158":"frac45","\u215A":"frac56","\u215D":"frac58","\u215E":"frac78","\u{1D4B6}":"ascr","\u{1D552}":"aopf","\u{1D51E}":"afr","\u{1D538}":"Aopf","\u{1D504}":"Afr","\u{1D49C}":"Ascr",\u00AA:"ordf",\u00E1:"aacute",\u00C1:"Aacute",\u00E0:"agrave",\u00C0:"Agrave",\u0103:"abreve",\u0102:"Abreve",\u00E2:"acirc",\u00C2:"Acirc",\u00E5:"aring",\u00C5:"angst",\u00E4:"auml",\u00C4:"Auml",\u00E3:"atilde",\u00C3:"Atilde",\u0105:"aogon",\u0104:"Aogon",\u0101:"amacr",\u0100:"Amacr",\u00E6:"aelig",\u00C6:"AElig","\u{1D4B7}":"bscr","\u{1D553}":"bopf","\u{1D51F}":"bfr","\u{1D539}":"Bopf",\u212C:"Bscr","\u{1D505}":"Bfr","\u{1D520}":"cfr","\u{1D4B8}":"cscr","\u{1D554}":"copf",\u212D:"Cfr","\u{1D49E}":"Cscr",\u2102:"Copf",\u0107:"cacute",\u0106:"Cacute",\u0109:"ccirc",\u0108:"Ccirc",\u010D:"ccaron",\u010C:"Ccaron",\u010B:"cdot",\u010A:"Cdot",\u00E7:"ccedil",\u00C7:"Ccedil","\u2105":"incare","\u{1D521}":"dfr","\u2146":"dd","\u{1D555}":"dopf","\u{1D4B9}":"dscr","\u{1D49F}":"Dscr","\u{1D507}":"Dfr","\u2145":"DD","\u{1D53B}":"Dopf",\u010F:"dcaron",\u010E:"Dcaron",\u0111:"dstrok",\u0110:"Dstrok",\u00F0:"eth",\u00D0:"ETH","\u2147":"ee",\u212F:"escr","\u{1D522}":"efr","\u{1D556}":"eopf",\u2130:"Escr","\u{1D508}":"Efr","\u{1D53C}":"Eopf",\u00E9:"eacute",\u00C9:"Eacute",\u00E8:"egrave",\u00C8:"Egrave",\u00EA:"ecirc",\u00CA:"Ecirc",\u011B:"ecaron",\u011A:"Ecaron",\u00EB:"euml",\u00CB:"Euml",\u0117:"edot",\u0116:"Edot",\u0119:"eogon",\u0118:"Eogon",\u0113:"emacr",\u0112:"Emacr","\u{1D523}":"ffr","\u{1D557}":"fopf","\u{1D4BB}":"fscr","\u{1D509}":"Ffr","\u{1D53D}":"Fopf",\u2131:"Fscr",\uFB00:"fflig",\uFB03:"ffilig",\uFB04:"ffllig",\uFB01:"filig",fj:"fjlig",\uFB02:"fllig",\u0192:"fnof",\u210A:"gscr","\u{1D558}":"gopf","\u{1D524}":"gfr","\u{1D4A2}":"Gscr","\u{1D53E}":"Gopf","\u{1D50A}":"Gfr",\u01F5:"gacute",\u011F:"gbreve",\u011E:"Gbreve",\u011D:"gcirc",\u011C:"Gcirc",\u0121:"gdot",\u0120:"Gdot",\u0122:"Gcedil","\u{1D525}":"hfr",\u210E:"planckh","\u{1D4BD}":"hscr","\u{1D559}":"hopf",\u210B:"Hscr",\u210C:"Hfr",\u210D:"Hopf",\u0125:"hcirc",\u0124:"Hcirc",\u210F:"hbar",\u0127:"hstrok",\u0126:"Hstrok","\u{1D55A}":"iopf","\u{1D526}":"ifr","\u{1D4BE}":"iscr","\u2148":"ii","\u{1D540}":"Iopf",\u2110:"Iscr",\u2111:"Im",\u00ED:"iacute",\u00CD:"Iacute",\u00EC:"igrave",\u00CC:"Igrave",\u00EE:"icirc",\u00CE:"Icirc",\u00EF:"iuml",\u00CF:"Iuml",\u0129:"itilde",\u0128:"Itilde",\u0130:"Idot",\u012F:"iogon",\u012E:"Iogon",\u012B:"imacr",\u012A:"Imacr",\u0133:"ijlig",\u0132:"IJlig",\u0131:"imath","\u{1D4BF}":"jscr","\u{1D55B}":"jopf","\u{1D527}":"jfr","\u{1D4A5}":"Jscr","\u{1D50D}":"Jfr","\u{1D541}":"Jopf",\u0135:"jcirc",\u0134:"Jcirc","\u0237":"jmath","\u{1D55C}":"kopf","\u{1D4C0}":"kscr","\u{1D528}":"kfr","\u{1D4A6}":"Kscr","\u{1D542}":"Kopf","\u{1D50E}":"Kfr",\u0137:"kcedil",\u0136:"Kcedil","\u{1D529}":"lfr","\u{1D4C1}":"lscr",\u2113:"ell","\u{1D55D}":"lopf",\u2112:"Lscr","\u{1D50F}":"Lfr","\u{1D543}":"Lopf",\u013A:"lacute",\u0139:"Lacute",\u013E:"lcaron",\u013D:"Lcaron",\u013C:"lcedil",\u013B:"Lcedil",\u0142:"lstrok",\u0141:"Lstrok",\u0140:"lmidot",\u013F:"Lmidot","\u{1D52A}":"mfr","\u{1D55E}":"mopf","\u{1D4C2}":"mscr","\u{1D510}":"Mfr","\u{1D544}":"Mopf",\u2133:"Mscr","\u{1D52B}":"nfr","\u{1D55F}":"nopf","\u{1D4C3}":"nscr",\u2115:"Nopf","\u{1D4A9}":"Nscr","\u{1D511}":"Nfr",\u0144:"nacute",\u0143:"Nacute",\u0148:"ncaron",\u0147:"Ncaron",\u00F1:"ntilde",\u00D1:"Ntilde",\u0146:"ncedil",\u0145:"Ncedil","\u2116":"numero",\u014B:"eng",\u014A:"ENG","\u{1D560}":"oopf","\u{1D52C}":"ofr",\u2134:"oscr","\u{1D4AA}":"Oscr","\u{1D512}":"Ofr","\u{1D546}":"Oopf",\u00BA:"ordm",\u00F3:"oacute",\u00D3:"Oacute",\u00F2:"ograve",\u00D2:"Ograve",\u00F4:"ocirc",\u00D4:"Ocirc",\u00F6:"ouml",\u00D6:"Ouml",\u0151:"odblac",\u0150:"Odblac",\u00F5:"otilde",\u00D5:"Otilde",\u00F8:"oslash",\u00D8:"Oslash",\u014D:"omacr",\u014C:"Omacr",\u0153:"oelig",\u0152:"OElig","\u{1D52D}":"pfr","\u{1D4C5}":"pscr","\u{1D561}":"popf",\u2119:"Popf","\u{1D513}":"Pfr","\u{1D4AB}":"Pscr","\u{1D562}":"qopf","\u{1D52E}":"qfr","\u{1D4C6}":"qscr","\u{1D4AC}":"Qscr","\u{1D514}":"Qfr",\u211A:"Qopf",\u0138:"kgreen","\u{1D52F}":"rfr","\u{1D563}":"ropf","\u{1D4C7}":"rscr",\u211B:"Rscr",\u211C:"Re",\u211D:"Ropf",\u0155:"racute",\u0154:"Racute",\u0159:"rcaron",\u0158:"Rcaron",\u0157:"rcedil",\u0156:"Rcedil","\u{1D564}":"sopf","\u{1D4C8}":"sscr","\u{1D530}":"sfr","\u{1D54A}":"Sopf","\u{1D516}":"Sfr","\u{1D4AE}":"Sscr","\u24C8":"oS",\u015B:"sacute",\u015A:"Sacute",\u015D:"scirc",\u015C:"Scirc",\u0161:"scaron",\u0160:"Scaron",\u015F:"scedil",\u015E:"Scedil",\u00DF:"szlig","\u{1D531}":"tfr","\u{1D4C9}":"tscr","\u{1D565}":"topf","\u{1D4AF}":"Tscr","\u{1D517}":"Tfr","\u{1D54B}":"Topf",\u0165:"tcaron",\u0164:"Tcaron",\u0163:"tcedil",\u0162:"Tcedil","\u2122":"trade",\u0167:"tstrok",\u0166:"Tstrok","\u{1D4CA}":"uscr","\u{1D566}":"uopf","\u{1D532}":"ufr","\u{1D54C}":"Uopf","\u{1D518}":"Ufr","\u{1D4B0}":"Uscr",\u00FA:"uacute",\u00DA:"Uacute",\u00F9:"ugrave",\u00D9:"Ugrave",\u016D:"ubreve",\u016C:"Ubreve",\u00FB:"ucirc",\u00DB:"Ucirc",\u016F:"uring",\u016E:"Uring",\u00FC:"uuml",\u00DC:"Uuml",\u0171:"udblac",\u0170:"Udblac",\u0169:"utilde",\u0168:"Utilde",\u0173:"uogon",\u0172:"Uogon",\u016B:"umacr",\u016A:"Umacr","\u{1D533}":"vfr","\u{1D567}":"vopf","\u{1D4CB}":"vscr","\u{1D519}":"Vfr","\u{1D54D}":"Vopf","\u{1D4B1}":"Vscr","\u{1D568}":"wopf","\u{1D4CC}":"wscr","\u{1D534}":"wfr","\u{1D4B2}":"Wscr","\u{1D54E}":"Wopf","\u{1D51A}":"Wfr",\u0175:"wcirc",\u0174:"Wcirc","\u{1D535}":"xfr","\u{1D4CD}":"xscr","\u{1D569}":"xopf","\u{1D54F}":"Xopf","\u{1D51B}":"Xfr","\u{1D4B3}":"Xscr","\u{1D536}":"yfr","\u{1D4CE}":"yscr","\u{1D56A}":"yopf","\u{1D4B4}":"Yscr","\u{1D51C}":"Yfr","\u{1D550}":"Yopf",\u00FD:"yacute",\u00DD:"Yacute",\u0177:"ycirc",\u0176:"Ycirc",\u00FF:"yuml",\u0178:"Yuml","\u{1D4CF}":"zscr","\u{1D537}":"zfr","\u{1D56B}":"zopf",\u2128:"Zfr",\u2124:"Zopf","\u{1D4B5}":"Zscr",\u017A:"zacute",\u0179:"Zacute",\u017E:"zcaron",\u017D:"Zcaron",\u017C:"zdot",\u017B:"Zdot",\u01B5:"imped",\u00FE:"thorn",\u00DE:"THORN",\u0149:"napos",\u03B1:"alpha",\u0391:"Alpha",\u03B2:"beta",\u0392:"Beta",\u03B3:"gamma",\u0393:"Gamma",\u03B4:"delta",\u0394:"Delta",\u03B5:"epsi","\u03F5":"epsiv",\u0395:"Epsilon",\u03DD:"gammad",\u03DC:"Gammad",\u03B6:"zeta",\u0396:"Zeta",\u03B7:"eta",\u0397:"Eta",\u03B8:"theta",\u03D1:"thetav",\u0398:"Theta",\u03B9:"iota",\u0399:"Iota",\u03BA:"kappa",\u03F0:"kappav",\u039A:"Kappa",\u03BB:"lambda",\u039B:"Lambda",\u03BC:"mu",\u00B5:"micro",\u039C:"Mu",\u03BD:"nu",\u039D:"Nu",\u03BE:"xi",\u039E:"Xi",\u03BF:"omicron",\u039F:"Omicron",\u03C0:"pi",\u03D6:"piv",\u03A0:"Pi",\u03C1:"rho",\u03F1:"rhov",\u03A1:"Rho",\u03C3:"sigma",\u03A3:"Sigma",\u03C2:"sigmaf",\u03C4:"tau",\u03A4:"Tau",\u03C5:"upsi",\u03A5:"Upsilon",\u03D2:"Upsi",\u03C6:"phi",\u03D5:"phiv",\u03A6:"Phi",\u03C7:"chi",\u03A7:"Chi",\u03C8:"psi",\u03A8:"Psi",\u03C9:"omega",\u03A9:"ohm",\u0430:"acy",\u0410:"Acy",\u0431:"bcy",\u0411:"Bcy",\u0432:"vcy",\u0412:"Vcy",\u0433:"gcy",\u0413:"Gcy",\u0453:"gjcy",\u0403:"GJcy",\u0434:"dcy",\u0414:"Dcy",\u0452:"djcy",\u0402:"DJcy",\u0435:"iecy",\u0415:"IEcy",\u0451:"iocy",\u0401:"IOcy",\u0454:"jukcy",\u0404:"Jukcy",\u0436:"zhcy",\u0416:"ZHcy",\u0437:"zcy",\u0417:"Zcy",\u0455:"dscy",\u0405:"DScy",\u0438:"icy",\u0418:"Icy",\u0456:"iukcy",\u0406:"Iukcy",\u0457:"yicy",\u0407:"YIcy",\u0439:"jcy",\u0419:"Jcy",\u0458:"jsercy",\u0408:"Jsercy",\u043A:"kcy",\u041A:"Kcy",\u045C:"kjcy",\u040C:"KJcy",\u043B:"lcy",\u041B:"Lcy",\u0459:"ljcy",\u0409:"LJcy",\u043C:"mcy",\u041C:"Mcy",\u043D:"ncy",\u041D:"Ncy",\u045A:"njcy",\u040A:"NJcy",\u043E:"ocy",\u041E:"Ocy",\u043F:"pcy",\u041F:"Pcy",\u0440:"rcy",\u0420:"Rcy",\u0441:"scy",\u0421:"Scy",\u0442:"tcy",\u0422:"Tcy",\u045B:"tshcy",\u040B:"TSHcy",\u0443:"ucy",\u0423:"Ucy",\u045E:"ubrcy",\u040E:"Ubrcy",\u0444:"fcy",\u0424:"Fcy",\u0445:"khcy",\u0425:"KHcy",\u0446:"tscy",\u0426:"TScy",\u0447:"chcy",\u0427:"CHcy",\u045F:"dzcy",\u040F:"DZcy",\u0448:"shcy",\u0428:"SHcy",\u0449:"shchcy",\u0429:"SHCHcy",\u044A:"hardcy",\u042A:"HARDcy",\u044B:"ycy",\u042B:"Ycy",\u044C:"softcy",\u042C:"SOFTcy",\u044D:"ecy",\u042D:"Ecy",\u044E:"yucy",\u042E:"YUcy",\u044F:"yacy",\u042F:"YAcy",\u2135:"aleph",\u2136:"beth",\u2137:"gimel",\u2138:"daleth"},c=/["&'<>`]/g,u={'"':"&quot;","&":"&amp;","'":"&#x27;","<":"&lt;",">":"&gt;","`":"&#x60;"},d=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,m=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,v=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,h={aacute:"\xE1",Aacute:"\xC1",abreve:"\u0103",Abreve:"\u0102",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",acy:"\u0430",Acy:"\u0410",aelig:"\xE6",AElig:"\xC6",af:"\u2061",afr:"\u{1D51E}",Afr:"\u{1D504}",agrave:"\xE0",Agrave:"\xC0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",Alpha:"\u0391",amacr:"\u0101",Amacr:"\u0100",amalg:"\u2A3F",amp:"&",AMP:"&",and:"\u2227",And:"\u2A53",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",Aogon:"\u0104",aopf:"\u{1D552}",Aopf:"\u{1D538}",ap:"\u2248",apacir:"\u2A6F",ape:"\u224A",apE:"\u2A70",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",Aring:"\xC5",ascr:"\u{1D4B6}",Ascr:"\u{1D49C}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",Bcy:"\u0411",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",beta:"\u03B2",Beta:"\u0392",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",Bfr:"\u{1D505}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bNot:"\u2AED",bopf:"\u{1D553}",Bopf:"\u{1D539}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxhD:"\u2565",boxHd:"\u2564",boxHD:"\u2566",boxhu:"\u2534",boxhU:"\u2568",boxHu:"\u2567",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpe:"\u224F",bumpE:"\u2AAE",bumpeq:"\u224F",Bumpeq:"\u224E",cacute:"\u0107",Cacute:"\u0106",cap:"\u2229",Cap:"\u22D2",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",ccaron:"\u010D",Ccaron:"\u010C",ccedil:"\xE7",Ccedil:"\xC7",ccirc:"\u0109",Ccirc:"\u0108",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",Cdot:"\u010A",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",chcy:"\u0447",CHcy:"\u0427",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",Chi:"\u03A7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cire:"\u2257",cirE:"\u29C3",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",colone:"\u2254",Colone:"\u2A74",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",cscr:"\u{1D4B8}",Cscr:"\u{1D49E}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",Cup:"\u22D3",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",dArr:"\u21D3",Darr:"\u21A1",dash:"\u2010",dashv:"\u22A3",Dashv:"\u2AE4",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",Dcaron:"\u010E",dcy:"\u0434",Dcy:"\u0414",dd:"\u2146",DD:"\u2145",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",delta:"\u03B4",Delta:"\u0394",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",Dfr:"\u{1D507}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",DJcy:"\u0402",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",Dopf:"\u{1D53B}",dot:"\u02D9",Dot:"\xA8",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",downarrow:"\u2193",Downarrow:"\u21D3",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",Dscr:"\u{1D49F}",dscy:"\u0455",DScy:"\u0405",dsol:"\u29F6",dstrok:"\u0111",Dstrok:"\u0110",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",DZcy:"\u040F",dzigrarr:"\u27FF",eacute:"\xE9",Eacute:"\xC9",easter:"\u2A6E",ecaron:"\u011B",Ecaron:"\u011A",ecir:"\u2256",ecirc:"\xEA",Ecirc:"\xCA",ecolon:"\u2255",ecy:"\u044D",Ecy:"\u042D",eDDot:"\u2A77",edot:"\u0117",eDot:"\u2251",Edot:"\u0116",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",Efr:"\u{1D508}",eg:"\u2A9A",egrave:"\xE8",Egrave:"\xC8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",Emacr:"\u0112",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",eng:"\u014B",ENG:"\u014A",ensp:"\u2002",eogon:"\u0119",Eogon:"\u0118",eopf:"\u{1D556}",Eopf:"\u{1D53C}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",Epsilon:"\u0395",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",esim:"\u2242",Esim:"\u2A73",eta:"\u03B7",Eta:"\u0397",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",Fcy:"\u0424",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",Ffr:"\u{1D509}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",Fopf:"\u{1D53D}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",gamma:"\u03B3",Gamma:"\u0393",gammad:"\u03DD",Gammad:"\u03DC",gap:"\u2A86",gbreve:"\u011F",Gbreve:"\u011E",Gcedil:"\u0122",gcirc:"\u011D",Gcirc:"\u011C",gcy:"\u0433",Gcy:"\u0413",gdot:"\u0121",Gdot:"\u0120",ge:"\u2265",gE:"\u2267",gel:"\u22DB",gEl:"\u2A8C",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",Gfr:"\u{1D50A}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",GJcy:"\u0403",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",Gopf:"\u{1D53E}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",gscr:"\u210A",Gscr:"\u{1D4A2}",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",Gt:"\u226B",GT:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",HARDcy:"\u042A",harr:"\u2194",hArr:"\u21D4",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",hcirc:"\u0125",Hcirc:"\u0124",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",hstrok:"\u0127",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",Iacute:"\xCD",ic:"\u2063",icirc:"\xEE",Icirc:"\xCE",icy:"\u0438",Icy:"\u0418",Idot:"\u0130",iecy:"\u0435",IEcy:"\u0415",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",igrave:"\xEC",Igrave:"\xCC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",IJlig:"\u0132",Im:"\u2111",imacr:"\u012B",Imacr:"\u012A",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",Int:"\u222C",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",iocy:"\u0451",IOcy:"\u0401",iogon:"\u012F",Iogon:"\u012E",iopf:"\u{1D55A}",Iopf:"\u{1D540}",iota:"\u03B9",Iota:"\u0399",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",Itilde:"\u0128",iukcy:"\u0456",Iukcy:"\u0406",iuml:"\xEF",Iuml:"\xCF",jcirc:"\u0135",Jcirc:"\u0134",jcy:"\u0439",Jcy:"\u0419",jfr:"\u{1D527}",Jfr:"\u{1D50D}",jmath:"\u0237",jopf:"\u{1D55B}",Jopf:"\u{1D541}",jscr:"\u{1D4BF}",Jscr:"\u{1D4A5}",jsercy:"\u0458",Jsercy:"\u0408",jukcy:"\u0454",Jukcy:"\u0404",kappa:"\u03BA",Kappa:"\u039A",kappav:"\u03F0",kcedil:"\u0137",Kcedil:"\u0136",kcy:"\u043A",Kcy:"\u041A",kfr:"\u{1D528}",Kfr:"\u{1D50E}",kgreen:"\u0138",khcy:"\u0445",KHcy:"\u0425",kjcy:"\u045C",KJcy:"\u040C",kopf:"\u{1D55C}",Kopf:"\u{1D542}",kscr:"\u{1D4C0}",Kscr:"\u{1D4A6}",lAarr:"\u21DA",lacute:"\u013A",Lacute:"\u0139",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",Lambda:"\u039B",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larr:"\u2190",lArr:"\u21D0",Larr:"\u219E",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",lAtail:"\u291B",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",Lcaron:"\u013D",lcedil:"\u013C",Lcedil:"\u013B",lceil:"\u2308",lcub:"{",lcy:"\u043B",Lcy:"\u041B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",leftarrow:"\u2190",Leftarrow:"\u21D0",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",Leftrightarrow:"\u21D4",LeftRightArrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",leg:"\u22DA",lEg:"\u2A8B",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",Lfr:"\u{1D50F}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",LJcy:"\u0409",ll:"\u226A",Ll:"\u22D8",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",Lmidot:"\u013F",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",LongLeftArrow:"\u27F5",longleftrightarrow:"\u27F7",Longleftrightarrow:"\u27FA",LongLeftRightArrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",LongRightArrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",Lopf:"\u{1D543}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",Lstrok:"\u0141",lt:"<",Lt:"\u226A",LT:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",Map:"\u2905",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",Mcy:"\u041C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",mfr:"\u{1D52A}",Mfr:"\u{1D510}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",Mopf:"\u{1D544}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",mu:"\u03BC",Mu:"\u039C",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",nacute:"\u0144",Nacute:"\u0143",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",Ncaron:"\u0147",ncedil:"\u0146",Ncedil:"\u0145",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",Ncy:"\u041D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",pcy:"\u043F",Pcy:"\u041F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",Pfr:"\u{1D513}",phi:"\u03C6",Phi:"\u03A6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",Pi:"\u03A0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",pr:"\u227A",Pr:"\u2ABB",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prE:"\u2AB3",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",Pscr:"\u{1D4AB}",psi:"\u03C8",Psi:"\u03A8",puncsp:"\u2008",qfr:"\u{1D52E}",Qfr:"\u{1D514}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",qscr:"\u{1D4C6}",Qscr:"\u{1D4AC}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",racute:"\u0155",Racute:"\u0154",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rArr:"\u21D2",Rarr:"\u21A0",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",Rarrtl:"\u2916",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",Rcaron:"\u0158",rcedil:"\u0157",Rcedil:"\u0156",rceil:"\u2309",rcub:"}",rcy:"\u0440",Rcy:"\u0420",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",Rho:"\u03A1",rhov:"\u03F1",RightAngleBracket:"\u27E9",rightarrow:"\u2192",Rightarrow:"\u21D2",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",Sacute:"\u015A",sbquo:"\u201A",sc:"\u227B",Sc:"\u2ABC",scap:"\u2AB8",scaron:"\u0161",Scaron:"\u0160",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",scedil:"\u015F",Scedil:"\u015E",scirc:"\u015D",Scirc:"\u015C",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",Scy:"\u0421",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",Sfr:"\u{1D516}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",SHCHcy:"\u0429",shcy:"\u0448",SHcy:"\u0428",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",sigma:"\u03C3",Sigma:"\u03A3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",SOFTcy:"\u042C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",Sopf:"\u{1D54A}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",Sscr:"\u{1D4AE}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",Star:"\u22C6",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",sube:"\u2286",subE:"\u2AC5",subedot:"\u2AC3",submult:"\u2AC1",subne:"\u228A",subnE:"\u2ACB",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup:"\u2283",Sup:"\u22D1",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supE:"\u2AC6",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supne:"\u228B",supnE:"\u2ACC",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",tau:"\u03C4",Tau:"\u03A4",tbrk:"\u23B4",tcaron:"\u0165",Tcaron:"\u0164",tcedil:"\u0163",Tcedil:"\u0162",tcy:"\u0442",Tcy:"\u0422",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",Tfr:"\u{1D517}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",theta:"\u03B8",Theta:"\u0398",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",THORN:"\xDE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",Topf:"\u{1D54B}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",Tscr:"\u{1D4AF}",tscy:"\u0446",TScy:"\u0426",tshcy:"\u045B",TSHcy:"\u040B",tstrok:"\u0167",Tstrok:"\u0166",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uacute:"\xFA",Uacute:"\xDA",uarr:"\u2191",uArr:"\u21D1",Uarr:"\u219F",Uarrocir:"\u2949",ubrcy:"\u045E",Ubrcy:"\u040E",ubreve:"\u016D",Ubreve:"\u016C",ucirc:"\xFB",Ucirc:"\xDB",ucy:"\u0443",Ucy:"\u0423",udarr:"\u21C5",udblac:"\u0171",Udblac:"\u0170",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",Ufr:"\u{1D518}",ugrave:"\xF9",Ugrave:"\xD9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",Umacr:"\u016A",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",uogon:"\u0173",Uogon:"\u0172",uopf:"\u{1D566}",Uopf:"\u{1D54C}",uparrow:"\u2191",Uparrow:"\u21D1",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",Updownarrow:"\u21D5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",upsilon:"\u03C5",Upsilon:"\u03A5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",Uring:"\u016E",urtri:"\u25F9",uscr:"\u{1D4CA}",Uscr:"\u{1D4B0}",utdot:"\u22F0",utilde:"\u0169",Utilde:"\u0168",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",Uuml:"\xDC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",vcy:"\u0432",Vcy:"\u0412",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",vee:"\u2228",Vee:"\u22C1",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",vfr:"\u{1D533}",Vfr:"\u{1D519}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",Vopf:"\u{1D54D}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",Vscr:"\u{1D4B1}",vsubne:"\u228A\uFE00",vsubnE:"\u2ACB\uFE00",vsupne:"\u228B\uFE00",vsupnE:"\u2ACC\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",wcirc:"\u0175",Wcirc:"\u0174",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",Wfr:"\u{1D51A}",wopf:"\u{1D568}",Wopf:"\u{1D54E}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",Wscr:"\u{1D4B2}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",Xfr:"\u{1D51B}",xharr:"\u27F7",xhArr:"\u27FA",xi:"\u03BE",Xi:"\u039E",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",Xopf:"\u{1D54F}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",xscr:"\u{1D4CD}",Xscr:"\u{1D4B3}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",Yacute:"\xDD",yacy:"\u044F",YAcy:"\u042F",ycirc:"\u0177",Ycirc:"\u0176",ycy:"\u044B",Ycy:"\u042B",yen:"\xA5",yfr:"\u{1D536}",Yfr:"\u{1D51C}",yicy:"\u0457",YIcy:"\u0407",yopf:"\u{1D56A}",Yopf:"\u{1D550}",yscr:"\u{1D4CE}",Yscr:"\u{1D4B4}",yucy:"\u044E",YUcy:"\u042E",yuml:"\xFF",Yuml:"\u0178",zacute:"\u017A",Zacute:"\u0179",zcaron:"\u017E",Zcaron:"\u017D",zcy:"\u0437",Zcy:"\u0417",zdot:"\u017C",Zdot:"\u017B",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",zeta:"\u03B6",Zeta:"\u0396",zfr:"\u{1D537}",Zfr:"\u2128",zhcy:"\u0436",ZHcy:"\u0416",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",zscr:"\u{1D4CF}",Zscr:"\u{1D4B5}",zwj:"\u200D",zwnj:"\u200C"},y={aacute:"\xE1",Aacute:"\xC1",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",aelig:"\xE6",AElig:"\xC6",agrave:"\xE0",Agrave:"\xC0",amp:"&",AMP:"&",aring:"\xE5",Aring:"\xC5",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",brvbar:"\xA6",ccedil:"\xE7",Ccedil:"\xC7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",Eacute:"\xC9",ecirc:"\xEA",Ecirc:"\xCA",egrave:"\xE8",Egrave:"\xC8",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",iacute:"\xED",Iacute:"\xCD",icirc:"\xEE",Icirc:"\xCE",iexcl:"\xA1",igrave:"\xEC",Igrave:"\xCC",iquest:"\xBF",iuml:"\xEF",Iuml:"\xCF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",Ntilde:"\xD1",oacute:"\xF3",Oacute:"\xD3",ocirc:"\xF4",Ocirc:"\xD4",ograve:"\xF2",Ograve:"\xD2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",Oslash:"\xD8",otilde:"\xF5",Otilde:"\xD5",ouml:"\xF6",Ouml:"\xD6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",THORN:"\xDE",times:"\xD7",uacute:"\xFA",Uacute:"\xDA",ucirc:"\xFB",Ucirc:"\xDB",ugrave:"\xF9",Ugrave:"\xD9",uml:"\xA8",uuml:"\xFC",Uuml:"\xDC",yacute:"\xFD",Yacute:"\xDD",yen:"\xA5",yuml:"\xFF"},p={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"},S=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],_=String.fromCharCode,A={},L=A.hasOwnProperty,k=function(Z,K){return L.call(Z,K)},E=function(Z,K){for(var ve=-1,xe=Z.length;++ve<xe;)if(Z[ve]==K)return!0;return!1},w=function(Z,K){if(!Z)return K;var ve={},xe;for(xe in K)ve[xe]=k(Z,xe)?Z[xe]:K[xe];return ve},N=function(Z,K){var ve="";return Z>=55296&&Z<=57343||Z>1114111?(K&&x("character reference outside the permissible Unicode range"),"\uFFFD"):k(p,Z)?(K&&x("disallowed character reference"),p[Z]):(K&&E(S,Z)&&x("disallowed character reference"),Z>65535&&(Z-=65536,ve+=_(Z>>>10&1023|55296),Z=56320|Z&1023),ve+=_(Z),ve)},F=function(Z){return"&#x"+Z.toString(16).toUpperCase()+";"},j=function(Z){return"&#"+Z+";"},x=function(Z){throw Error("Parse error: "+Z)},T=function(Z,K){K=w(K,T.options);var ve=K.strict;ve&&m.test(Z)&&x("forbidden code point");var xe=K.encodeEverything,Ae=K.useNamedReferences,Oe=K.allowUnsafeSymbols,He=K.decimal?j:F,st=function(je){return He(je.charCodeAt(0))};return xe?(Z=Z.replace(i,function(je){return Ae&&k(s,je)?"&"+s[je]+";":st(je)}),Ae&&(Z=Z.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;").replace(/&#x66;&#x6A;/g,"&fjlig;")),Ae&&(Z=Z.replace(l,function(je){return"&"+s[je]+";"}))):Ae?(Oe||(Z=Z.replace(c,function(je){return"&"+s[je]+";"})),Z=Z.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;"),Z=Z.replace(l,function(je){return"&"+s[je]+";"})):Oe||(Z=Z.replace(c,st)),Z.replace(r,function(je){var wt=je.charCodeAt(0),Nt=je.charCodeAt(1),Je=(wt-55296)*1024+Nt-56320+65536;return He(Je)}).replace(o,st)};T.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var I=function(Z,K){K=w(K,I.options);var ve=K.strict;return ve&&d.test(Z)&&x("malformed character reference"),Z.replace(v,function(xe,Ae,Oe,He,st,je,wt,Nt,Je){var Te,tt,Yt,$t,Rt,Ht;return Ae?(Rt=Ae,h[Rt]):Oe?(Rt=Oe,Ht=He,Ht&&K.isAttributeValue?(ve&&Ht=="="&&x("`&` did not start a character reference"),xe):(ve&&x("named character reference was not terminated by a semicolon"),y[Rt]+(Ht||""))):st?(Yt=st,tt=je,ve&&!tt&&x("character reference was not terminated by a semicolon"),Te=parseInt(Yt,10),N(Te,ve)):wt?($t=wt,tt=Nt,ve&&!tt&&x("character reference was not terminated by a semicolon"),Te=parseInt($t,16),N(Te,ve)):(ve&&x("named character reference was not terminated by a semicolon"),xe)})};I.options={isAttributeValue:!1,strict:!1};var U=function(Z){return Z.replace(c,function(K){return u[K]})},$={version:"1.2.0",encode:T,decode:I,escape:U,unescape:I};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return $});else if(e&&!e.nodeType)if(n)n.exports=$;else for(var ee in $)k($,ee)&&(e[ee]=$[ee]);else t.he=$})(Vr)});var Xd=Xe((Dr,_r)=>{(function(t,e){if(typeof Dr=="object"){var n=e();typeof _r=="object"&&_r&&_r.exports&&(Dr=_r.exports=n),Dr.randomColor=n}else typeof define=="function"&&define.amd?define([],e):t.randomColor=e()})(Dr,function(){var t=null,e={};y();var n=[],a=function(k){if(k=k||{},k.seed!==void 0&&k.seed!==null&&k.seed===parseInt(k.seed,10))t=k.seed;else if(typeof k.seed=="string")t=A(k.seed);else{if(k.seed!==void 0&&k.seed!==null)throw new TypeError("The seed value must be an integer or string");t=null}var E,w,N;if(k.count!==null&&k.count!==void 0){for(var F=k.count,j=[],x=0;x<k.count;x++)n.push(!1);for(k.count=null;F>j.length;){var T=a(k);t!==null&&(k.seed=t),j.push(T)}return k.count=F,j}return E=r(k),w=i(E,k),N=o(E,w,k),l([E,w,N],k)};function r(k){if(n.length>0){var E=L(k.hue),w=m(E),N=(E[1]-E[0])/n.length,F=parseInt((w-E[0])/N);n[F]===!0?F=(F+2)%n.length:n[F]=!0;var j=(E[0]+F*N)%359,x=(E[0]+(F+1)*N)%359;return E=[j,x],w=m(E),w<0&&(w=360+w),w}else{var E=c(k.hue);return w=m(E),w<0&&(w=360+w),w}}function i(k,E){if(E.hue==="monochrome")return 0;if(E.luminosity==="random")return m([0,100]);var w=u(k),N=w[0],F=w[1];switch(E.luminosity){case"bright":N=55;break;case"dark":N=F-10;break;case"light":F=55;break}return m([N,F])}function o(k,E,w){var N=s(k,E),F=100;switch(w.luminosity){case"dark":F=N+20;break;case"light":N=(F+N)/2;break;case"random":N=0,F=100;break}return m([N,F])}function l(k,E){switch(E.format){case"hsvArray":return k;case"hslArray":return _(k);case"hsl":var w=_(k);return"hsl("+w[0]+", "+w[1]+"%, "+w[2]+"%)";case"hsla":var N=_(k),F=E.alpha||Math.random();return"hsla("+N[0]+", "+N[1]+"%, "+N[2]+"%, "+F+")";case"rgbArray":return p(k);case"rgb":var j=p(k);return"rgb("+j.join(", ")+")";case"rgba":var x=p(k),F=E.alpha||Math.random();return"rgba("+x.join(", ")+", "+F+")";default:return v(k)}}function s(k,E){for(var w=d(k).lowerBounds,N=0;N<w.length-1;N++){var F=w[N][0],j=w[N][1],x=w[N+1][0],T=w[N+1][1];if(E>=F&&E<=x){var I=(T-j)/(x-F),U=j-I*F;return I*E+U}}return 0}function c(k){if(typeof parseInt(k)=="number"){var E=parseInt(k);if(E<360&&E>0)return[E,E]}if(typeof k=="string"){if(e[k]){var w=e[k];if(w.hueRange)return w.hueRange}else if(k.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var N=S(k)[0];return[N,N]}}return[0,360]}function u(k){return d(k).saturationRange}function d(k){k>=334&&k<=360&&(k-=360);for(var E in e){var w=e[E];if(w.hueRange&&k>=w.hueRange[0]&&k<=w.hueRange[1])return e[E]}return"Color not found"}function m(k){if(t===null){var E=.618033988749895,w=Math.random();return w+=E,w%=1,Math.floor(k[0]+w*(k[1]+1-k[0]))}else{var N=k[1]||1,F=k[0]||0;t=(t*9301+49297)%233280;var j=t/233280;return Math.floor(F+j*(N-F))}}function v(k){var E=p(k);function w(F){var j=F.toString(16);return j.length==1?"0"+j:j}var N="#"+w(E[0])+w(E[1])+w(E[2]);return N}function h(k,E,w){var N=w[0][0],F=w[w.length-1][0],j=w[w.length-1][1],x=w[0][1];e[k]={hueRange:E,lowerBounds:w,saturationRange:[N,F],brightnessRange:[j,x]}}function y(){h("monochrome",null,[[0,0],[100,0]]),h("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),h("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),h("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),h("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),h("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),h("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),h("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function p(k){var E=k[0];E===0&&(E=1),E===360&&(E=359),E=E/360;var w=k[1]/100,N=k[2]/100,F=Math.floor(E*6),j=E*6-F,x=N*(1-w),T=N*(1-j*w),I=N*(1-(1-j)*w),U=256,$=256,ee=256;switch(F){case 0:U=N,$=I,ee=x;break;case 1:U=T,$=N,ee=x;break;case 2:U=x,$=N,ee=I;break;case 3:U=x,$=T,ee=N;break;case 4:U=I,$=x,ee=N;break;case 5:U=N,$=x,ee=T;break}var Z=[Math.floor(U*255),Math.floor($*255),Math.floor(ee*255)];return Z}function S(k){k=k.replace(/^#/,""),k=k.length===3?k.replace(/(.)/g,"$1$1"):k;var E=parseInt(k.substr(0,2),16)/255,w=parseInt(k.substr(2,2),16)/255,N=parseInt(k.substr(4,2),16)/255,F=Math.max(E,w,N),j=F-Math.min(E,w,N),x=F?j/F:0;switch(F){case E:return[60*((w-N)/j%6)||0,x,F];case w:return[60*((N-E)/j+2)||0,x,F];case N:return[60*((E-w)/j+4)||0,x,F]}}function _(k){var E=k[0],w=k[1]/100,N=k[2]/100,F=(2-w)*N;return[E,Math.round(w*N/(F<1?F:2-F)*1e4)/100,F/2*100]}function A(k){for(var E=0,w=0;w!==k.length&&!(E>=Number.MAX_SAFE_INTEGER);w++)E+=k.charCodeAt(w);return E}function L(k){if(isNaN(k)){if(typeof k=="string"){if(e[k]){var w=e[k];if(w.hueRange)return w.hueRange}else if(k.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var N=S(k)[0];return d(N).hueRange}}}else{var E=parseInt(k);if(E<360&&E>0)return d(k).hueRange}return[0,360]}return a})});Dg(exports,{DEFAULT_CALENDAR:()=>ia,DEFAULT_DATA:()=>Jh,MODIFIER_KEY:()=>Xh,default:()=>Rs});var Wn=Ee(require("obsidian"));var ze=Ee(require("obsidian")),Ha=Ee(Nn());var su=Ee(iu());function Eo(t,e){let n=window.moment(t),a=window.moment(e),r=a.diff(n,"days");return(n.year()<a.year()||n.dayOfYear()<a.dayOfYear())&&(n.hour()>a.hour()||n.minute()>a.minute()||n.second()>a.second()||n.millisecond()>a.millisecond())&&(r+=1),r}function Mn(t,e){return(t%e+e)%e}function Ze(t){return"ID_xyxyxyxyxyxy".replace(/[xy]/g,function(e){var n=Math.random()*16|0,a=e=="x"?n:n&3|8;return a.toString(16)})}function Za(t){if(!t.interval?.length)return"";let e=t.interval.sort((r,i)=>r.interval-i.interval),n=[];for(let r of e){let i=r.interval,o=t.offset&&!r.ignore?` (offset by ${t.offset})`:"";if(r.exclusive)i==1?n.push(`not every year${o}`):n.push(`not every ${Lt(i)} year${o}`);else{let l=e.indexOf(r),s=l>0&&e[l-1].exclusive;i==1?n.push(`${s?"also ":""}every year${o}`):n.push(`${s?"also ":""}every ${Lt(i)} year${o}`)}}let a=n.join(", but ");return a[0].toUpperCase()+a.slice(1).toLowerCase()}function Lt(t){let e=t%10,n=t%100;return e==1&&n!=11?t+"st":e==2&&n!=12?t+"nd":e==3&&n!=13?t+"rd":t+"th"}function Kt(t,e,n){if(!t||t.day==null)return"";let{day:a,month:r,year:i}=t,o=`${i}`,{months:l,years:s,useCustomYears:c}=e.static;if(c&&(o=s[i-1].name),r!=null&&!l[r])return"Invalid Date";if(n&&n.day){let u=n.day,d=n.month,m=n.year,v=`${m}`;if(c&&(v=s[m-1]?.name),d!=null&&m!=null&&r!=null&&i!=null)return i!=m?`${l[r].name} ${Lt(a)}, ${o} - ${l[d].name} ${Lt(u)}, ${m}`:d==r?`${l[r].name} ${Lt(a)}-${Lt(u)}, ${o}`:r!=null&&i!=null?`${l[r].name} ${Lt(a)}-${l[d].name} ${Lt(u)}, ${o}`:r!=null?`${l[r].name} ${Lt(a)}-${l[d].name} ${Lt(u)} of every year`:`${Lt(a)}-${Lt(u)} of every month`}return r!=null&&i!=null?`${l[r].name} ${Lt(a)}, ${o}`:r!=null?`${l[r].name} ${Lt(a)} of every year`:`${Lt(a)} of every month`}function Da(t,e){return!(t==null||e?.current?.month==null||t<1||t<1||t>e?.static?.months[e.current?.month]?.length||!e?.static?.months[e.current?.month]?.length)}function _a(t,e){return!(t==null||!e?.static?.months?.length||t<0||t>=e?.static?.months?.length)}function Ca(t,e){return!(t==null||t<1&&!e.static?.useCustomYears||e?.static?.useCustomYears&&(!e?.static?.years?.length||t<0||t>=e?.static?.years?.length))}var lu=Ee(ou()),Hr=class{static import(e){let n=[];for(let a of e){let r=a.name??"Imported Calendar",i=a.static_data;if(!i)continue;let o=i.year_data;if(!o)continue;let l=o.first_day-1,s=o.overflow??!0,c=o.global_week;if(!c)continue;let u=c.map(w=>({type:"day",name:w,id:Ze(6)})),d=o.timespans;if(!d)continue;let m=d.map(w=>({name:(0,lu.decode)(w.name),type:w.type,length:w.length,id:Ze(6)})),v=m.reduce((w,N)=>N.type=="month"?w+N.length:w,0),h=[];if("leap_days"in o)for(let w of o.leap_days){let F=(w.interval.split(",")??["1"]).map(j=>{let x=/\+/.test(j),T=/\!/.test(j),I=j.match(/(\d+)/).first();return{ignore:x,exclusive:T,interval:Number(I)}});h.push({name:w.name??`Leap Day ${h.length+1}`,type:"leapday",interval:F,timespan:w.timespan??0,intercalary:w.intercalary??!1,numbered:!w.not_numbered,after:w.day,offset:w.offset??0,id:Ze(6)})}let y=[];if("moons"in i)for(let w of i.moons)y.push({name:w.name??`Moon ${y.length+1}`,cycle:Number(w.cycle)??v,offset:w.shift??0,faceColor:w.color??"#ffffff",shadowColor:w.shadow_color??"#000000",id:Ze(6)});let p=[];if("eras"in i)for(let w of i.eras)p.push({name:w.name??`Era ${p.length+1}`,description:w.description,format:w.formatting??"Year {{year}} - {{era_name}}",start:{year:w.date?.year??1,month:w.date?.timespan??0,day:w.date?.day??0}});let S={firstWeekDay:l,overflow:s,weekdays:u,months:m,moons:y,leapDays:h,eras:p,displayMoons:!0,incrementDay:!1,displayDayNumber:!1},_={year:1,day:1,month:0};a.dynamic_data&&(_.year=Math.max(1,a.dynamic_data.year??_.year),_.day=a.dynamic_data.day??_.day,_.month=a.dynamic_data.timespan??_.month);let A=[],L=new Map;if("categories"in a)for(let w of a.categories){let N=w.name,F=N?.split(" ").join("-").toLowerCase()??Ze(6),j=w.event_settings.color;if(j in uu)j=uu[j];else{j=j.split("-").join("");let x=createEl("canvas"),T=x.getContext("2d");T.fillStyle=j,j=T.fillStyle,x.detach()}L.set(F,{name:N,id:F,color:j})}if(a.events&&Array.isArray(a.events)&&a.events.length)for(let w of a.events){let N={day:null,year:null,month:null};if(w.data&&w.data.date&&Array.isArray(w.data?.date)&&w.data.date.length)N.day=w.data.date[2],N.month=w.data.date[1],N.year=w.data.date[0];else if(w.data&&w.data.conditions&&Array.isArray(w.data.conditions)){let j=w.data.conditions;try{let x=j.find(U=>U[0]==="Year"),T=j.find(U=>U[0]==="Month"),I=j.find(U=>U[0]==="Day");x&&(N.year=Number(x[2][0])),T&&(N.month=Number(T[2][0])),I&&(N.day=Number(I[2][0]))}catch{}}let F;if(w.description){let j=createDiv();j.innerHTML=w.description,F=j.textContent}A.push({name:w.name,description:F,id:`${w.id}`,note:null,date:N,category:L.get(w.event_category_id)?.id??null})}let k=(0,su.default)({count:L.size});for(let w of L.keys()){let N=L.get(w);N.color||(N.color=k.shift().hex(),L.set(w,N))}let E={name:r,description:null,static:S,current:_,events:A,id:Ze(6),categories:Array.from(L.values())};n.push(E)}return n}},uu={"Dark-Solid":"#000000",Red:"#9b2c2c",Pink:"#880E4F",Purple:"#4A148C","Deep-Purple":"#311B92",Blue:"#0D47A1","Light-Blue":"#0288D1",Cyan:"#006064",Teal:"#004D40",Green:"#2E7D32","Light-Green":"#7CB342",Lime:"#9e9d24",Yellow:"#FFEB3B",Orange:"#FF9100","Blue-Grey":"#455A64"};function Q(){}var Wr=t=>t;function cu(t,e){for(let n in e)t[n]=e[n];return t}function Ao(t){return t()}function du(){return Object.create(null)}function we(t){t.forEach(Ao)}function ot(t){return typeof t=="function"}function le(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function fu(t){return Object.keys(t).length===0}function ko(t,...e){if(t==null)return Q;let n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Fe(t,e,n){t.$$.on_destroy.push(ko(e,n))}function Gr(t,e,n,a){if(t){let r=hu(t,e,n,a);return t[0](r)}}function hu(t,e,n,a){return t[1]&&a?cu(n.ctx.slice(),t[1](a(e))):n.ctx}function Ur(t,e,n,a){if(t[2]&&a){let r=t[2](a(n));if(e.dirty===void 0)return r;if(typeof r=="object"){let i=[],o=Math.max(e.dirty.length,r.length);for(let l=0;l<o;l+=1)i[l]=e.dirty[l]|r[l];return i}return e.dirty|r}return e.dirty}function zr(t,e,n,a,r,i){if(r){let o=hu(e,n,a,i);t.p(o,r)}}function Yr(t){if(t.ctx.length>32){let e=[],n=t.ctx.length/32;for(let a=0;a<n;a++)e[a]=-1;return e}return-1}function xo(t){return t??""}function nt(t,e,n){return t.set(n),e}function ue(t){return t&&ot(t.destroy)?t.destroy:Q}var mu=typeof window!="undefined",pu=mu?()=>window.performance.now():()=>Date.now(),Fo=mu?t=>requestAnimationFrame(t):Q;var Ea=new Set;function gu(t){Ea.forEach(e=>{e.c(t)||(Ea.delete(e),e.f())}),Ea.size!==0&&Fo(gu)}function yu(t){let e;return Ea.size===0&&Fo(gu),{promise:new Promise(n=>{Ea.add(e={c:t,f:n})}),abort(){Ea.delete(e)}}}var vu=!1;function j2(){vu=!0}function V2(){vu=!1}function C(t,e){t.appendChild(e)}function be(t,e,n){let a=To(t);if(!a.getElementById(e)){let r=B("style");r.id=e,r.textContent=n,bu(a,r)}}function To(t){if(!t)return document;let e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function H2(t){let e=B("style");return bu(To(t),e),e.sheet}function bu(t,e){C(t.head||t,e)}function R(t,e,n){t.insertBefore(e,n||null)}function q(t){t.parentNode.removeChild(t)}function Ge(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function B(t){return document.createElement(t)}function sn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function fe(t){return document.createTextNode(t)}function W(){return fe(" ")}function Ue(){return fe("")}function re(t,e,n,a){return t.addEventListener(e,n,a),()=>t.removeEventListener(e,n,a)}function D(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function ln(t){return t===""?null:+t}function W2(t){return Array.from(t.childNodes)}function ge(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Dt(t,e){t.value=e??""}function at(t,e,n,a){n===null?t.style.removeProperty(e):t.style.setProperty(e,n,a?"important":"")}function Mt(t,e){for(let n=0;n<t.options.length;n+=1){let a=t.options[n];if(a.__value===e){a.selected=!0;return}}t.selectedIndex=-1}function mn(t){let e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function me(t,e,n){t.classList[n?"add":"remove"](e)}function wu(t,e,{bubbles:n=!1,cancelable:a=!1}={}){let r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,a,e),r}var $r=new Map,Zr=0;function G2(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function U2(t,e){let n={stylesheet:H2(e),rules:{}};return $r.set(t,n),n}function So(t,e,n,a,r,i,o,l=0){let s=16.666/a,c=`{
`;for(let p=0;p<=1;p+=s){let S=e+(n-e)*i(p);c+=p*100+`%{${o(S,1-S)}}
`}let u=c+`100% {${o(n,1-n)}}
}`,d=`__svelte_${G2(u)}_${l}`,m=To(t),{stylesheet:v,rules:h}=$r.get(m)||U2(m,t);h[d]||(h[d]=!0,v.insertRule(`@keyframes ${d} ${u}`,v.cssRules.length));let y=t.style.animation||"";return t.style.animation=`${y?`${y}, `:""}${d} ${a}ms linear ${r}ms 1 both`,Zr+=1,d}function Du(t,e){let n=(t.style.animation||"").split(", "),a=n.filter(e?i=>i.indexOf(e)<0:i=>i.indexOf("__svelte")===-1),r=n.length-a.length;r&&(t.style.animation=a.join(", "),Zr-=r,Zr||z2())}function z2(){Fo(()=>{Zr||($r.forEach(t=>{let{stylesheet:e}=t,n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}}),$r.clear())})}function zn(t,e,n,a){if(!e)return Q;let r=t.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return Q;let{delay:i=0,duration:o=300,easing:l=Wr,start:s=pu()+i,end:c=s+o,tick:u=Q,css:d}=n(t,{from:e,to:r},a),m=!0,v=!1,h;function y(){d&&(h=So(t,0,1,o,i,l,d)),i||(v=!0)}function p(){d&&Du(t,h),m=!1}return yu(S=>{if(!v&&S>=s&&(v=!0),v&&S>=c&&(u(1,0),p()),!m)return!1;if(v){let _=S-s,A=0+1*l(_/o);u(A,1-A)}return!0}),y(),u(0,1),p}function Yn(t){let e=getComputedStyle(t);if(e.position!=="absolute"&&e.position!=="fixed"){let{width:n,height:a}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=a,Y2(t,r)}}function Y2(t,e){let n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){let a=getComputedStyle(t),r=a.transform==="none"?"":a.transform;t.style.transform=`${r} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}var Qa;function Xa(t){Qa=t}function Ja(){if(!Qa)throw new Error("Function called outside component initialization");return Qa}function $n(t){Ja().$$.on_mount.push(t)}function Bo(t){Ja().$$.on_destroy.push(t)}function Ve(){let t=Ja();return(e,n,{cancelable:a=!1}={})=>{let r=t.$$.callbacks[e];if(r){let i=wu(e,n,{cancelable:a});return r.slice().forEach(o=>{o.call(t,i)}),!i.defaultPrevented}return!0}}function Zn(t,e){return Ja().$$.context.set(t,e),e}function Ne(t){return Ja().$$.context.get(t)}function ce(t,e){let n=t.$$.callbacks[e.type];n&&n.slice().forEach(a=>a.call(this,e))}var er=[];var Aa=[],Kr=[],_u=[],Cu=Promise.resolve(),No=!1;function Eu(){No||(No=!0,Cu.then(Au))}function Kn(){return Eu(),Cu}function It(t){Kr.push(t)}var Mo=new Set,Qr=0;function Au(){let t=Qa;do{for(;Qr<er.length;){let e=er[Qr];Qr++,Xa(e),$2(e.$$)}for(Xa(null),er.length=0,Qr=0;Aa.length;)Aa.pop()();for(let e=0;e<Kr.length;e+=1){let n=Kr[e];Mo.has(n)||(Mo.add(n),n())}Kr.length=0}while(er.length);for(;_u.length;)_u.pop()();No=!1,Mo.clear(),Xa(t)}function $2(t){if(t.fragment!==null){t.update(),we(t.before_update);let e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(It)}}var tr;function Z2(){return tr||(tr=Promise.resolve(),tr.then(()=>{tr=null})),tr}function Io(t,e,n){t.dispatchEvent(wu(`${e?"intro":"outro"}${n}`))}var Xr=new Set,_n;function De(){_n={r:0,c:[],p:_n}}function _e(){_n.r||we(_n.c),_n=_n.p}function P(t,e){t&&t.i&&(Xr.delete(t),t.i(e))}function G(t,e,n,a){if(t&&t.o){if(Xr.has(t))return;Xr.add(t),_n.c.push(()=>{Xr.delete(t),a&&(n&&t.d(1),a())}),t.o(e)}else a&&a()}var K2={duration:0};function Oo(t,e,n,a){let r=e(t,n),i=a?0:1,o=null,l=null,s=null;function c(){s&&Du(t,s)}function u(m,v){let h=m.b-i;return v*=Math.abs(h),{a:i,b:m.b,d:h,duration:v,start:m.start,end:m.start+v,group:m.group}}function d(m){let{delay:v=0,duration:h=300,easing:y=Wr,tick:p=Q,css:S}=r||K2,_={start:pu()+v,b:m};m||(_.group=_n,_n.r+=1),o||l?l=_:(S&&(c(),s=So(t,i,m,h,v,y,S)),m&&p(0,1),o=u(_,h),It(()=>Io(t,m,"start")),yu(A=>{if(l&&A>l.start&&(o=u(l,h),l=null,Io(t,o.b,"start"),S&&(c(),s=So(t,i,o.b,o.duration,0,y,r.css))),o){if(A>=o.end)p(i=o.b,1-i),Io(t,o.b,"end"),l||(o.b?c():--o.group.r||we(o.group.c)),o=null;else if(A>=o.start){let L=A-o.start;i=o.a+o.d*y(L/o.duration),p(i,1-i)}}return!!(o||l)}))}return{run(m){ot(r)?Z2().then(()=>{r=r(),d(m)}):d(m)},end(){c(),o=l=null}}}var mw=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function Q2(t,e){t.d(1),e.delete(t.key)}function X2(t,e){G(t,1,1,()=>{e.delete(t.key)})}function nr(t,e){t.f(),Q2(t,e)}function ku(t,e){t.f(),X2(t,e)}function Qn(t,e,n,a,r,i,o,l,s,c,u,d){let m=t.length,v=i.length,h=m,y={};for(;h--;)y[t[h].key]=h;let p=[],S=new Map,_=new Map;for(h=v;h--;){let E=d(r,i,h),w=n(E),N=o.get(w);N?a&&N.p(E,e):(N=c(w,E),N.c()),S.set(w,p[h]=N),w in y&&_.set(w,Math.abs(h-y[w]))}let A=new Set,L=new Set;function k(E){P(E,1),E.m(l,u),o.set(E.key,E),u=E.first,v--}for(;m&&v;){let E=p[v-1],w=t[m-1],N=E.key,F=w.key;E===w?(u=E.first,m--,v--):S.has(F)?!o.has(N)||A.has(N)?k(E):L.has(F)?m--:_.get(N)>_.get(F)?(L.add(N),k(E)):(A.add(F),m--):(s(w,o),m--)}for(;m--;){let E=t[m];S.has(E.key)||s(E,o)}for(;v;)k(p[v-1]);return p}var pw=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);function ne(t){t&&t.c()}function te(t,e,n,a){let{fragment:r,on_mount:i,on_destroy:o,after_update:l}=t.$$;r&&r.m(e,n),a||It(()=>{let s=i.map(Ao).filter(ot);o?o.push(...s):we(s),t.$$.on_mount=[]}),l.forEach(It)}function J(t,e){let n=t.$$;n.fragment!==null&&(we(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function J2(t,e){t.$$.dirty[0]===-1&&(er.push(t),Eu(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function he(t,e,n,a,r,i,o,l=[-1]){let s=Qa;Xa(t);let c=t.$$={fragment:null,ctx:null,props:i,update:Q,not_equal:r,bound:du(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(s?s.$$.context:[])),callbacks:du(),dirty:l,skip_bound:!1,root:e.target||s.$$.root};o&&o(c.root);let u=!1;if(c.ctx=n?n(t,e.props||{},(d,m,...v)=>{let h=v.length?v[0]:m;return c.ctx&&r(c.ctx[d],c.ctx[d]=h)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](h),u&&J2(t,d)),m}):[],c.update(),u=!0,we(c.before_update),c.fragment=a?a(c.ctx):!1,e.target){if(e.hydrate){j2();let d=W2(e.target);c.fragment&&c.fragment.l(d),d.forEach(q)}else c.fragment&&c.fragment.c();e.intro&&P(t.$$.fragment),te(t,e.target,e.anchor,e.customElement),V2(),Au()}Xa(s)}var ey;typeof HTMLElement=="function"&&(ey=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(Ao).filter(ot);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){we(this.$$.on_disconnect)}$destroy(){J(this,1),this.$destroy=Q}$on(t,e){let n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{let a=n.indexOf(e);a!==-1&&n.splice(a,1)}}$set(t){this.$$set&&!fu(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var de=class{$destroy(){J(this,1),this.$destroy=Q}$on(e,n){let a=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return a.push(n),()=>{let r=a.indexOf(n);r!==-1&&a.splice(r,1)}}$set(e){this.$$set&&!fu(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var If=Ee(Nn()),Fn=Ee(require("obsidian"));var Tu=Ee(Nn()),ar=Ee(require("obsidian"));var xu=[{name:"Gregorian Calendar",description:"A calendar for the real world.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,incrementDay:!0,displayMoons:!0,firstWeekDay:1,overflow:!0,weekdays:[{type:"day",name:"Sunday",id:"ID_19ea684b4a08"},{type:"day",name:"Monday",id:"ID_2928b90ab949"},{type:"day",name:"Tuesday",id:"ID_0ad9a8f9e95b"},{type:"day",name:"Wednesday",id:"ID_195a4b290bc9"},{type:"day",name:"Thursday",id:"ID_abe8c89b0999"},{type:"day",name:"Friday",id:"ID_2b5b8a79fa4a"},{type:"day",name:"Saturday",id:"ID_1a78cb79c8cb"}],months:[{name:"January",type:"month",length:31,id:"ID_e9997a780b3a"},{name:"February",type:"month",length:28,id:"ID_b8c9ebeb0b89"},{name:"March",type:"month",length:31,id:"ID_b83bda2b9be8"},{name:"April",type:"month",length:30,id:"ID_29baea7b28ab"},{name:"May",type:"month",length:31,id:"ID_6a3899fad909"},{name:"June",type:"month",length:30,id:"ID_384aeb1afa8a"},{name:"July",type:"month",length:31,id:"ID_48b8cba87b8a"},{name:"August",type:"month",length:31,id:"ID_fa0b1a6bab8a"},{name:"September",type:"month",length:30,id:"ID_da880b8af849"},{name:"October",type:"month",length:31,id:"ID_babba8186968"},{name:"November",type:"month",length:30,id:"ID_da582bfaf9b9"},{name:"December",type:"month",length:31,id:"ID_ba1bab4a3a28"}],moons:[{name:"Moon",cycle:29.530588853,offset:9.24953,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_a9ab186b1819"}],leapDays:[{name:"Leap Day",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:400},{ignore:!1,exclusive:!0,interval:100},{ignore:!1,exclusive:!1,interval:4}],offset:0,timespan:1,intercalary:!1,id:"ID_b91ad86a887a"}],eras:[{name:"Before Christ",format:"Year {{abs_year}} - {{era_name}}",start:{year:-1,month:0,day:31},id:"ID_9a2978c92baa",restart:!1,endsYear:!1,event:!1},{name:"Anno Domini",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1},id:"ID_a8db38899a2b",restart:!1,endsYear:!1,event:!1}],offset:0},current:{year:null,day:null,month:null},events:[{name:"Summer Solstice",description:"At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824599",note:null,date:{day:null,year:null,month:null},category:null},{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824600",note:null,date:{day:null,year:null,month:null},category:null},{name:"Spring Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824601",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824602",note:null,date:{day:null,year:null,month:null},category:null},{name:"Christmas",description:"Christmas is a Christian holiday celebrating the birth of Christ. Due to a combination of marketability and long lasting traditions it is popular even among many non-Christians, especially in countries that have a strong Christian tradition.",id:"824603",note:null,date:{day:25,year:null,month:11},category:"christian-holidays"},{name:"Paschal Full Moon",description:"The first full moon after march 21st, which is considered the fixed date for the spring equinox.",id:"824604",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Easter",description:"Easter is considered the most important feast for Christians, celebrating the resurrection of Christ. It is classed as a moveable feast occurring on the first full moon after the spring equinox, which is considered to be fixed at March 21st for the sake of computing the date.",id:"824605",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Easter Monday",description:"The Monday following the Easter Sunday is often considered part of the Easter Celebration and is a day off in many countries with a strong Christian tradition.",id:"824606",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Good Friday",description:"Good Friday is the Friday preceding Easter. It comemmorates the crucifixion of Christ according to the Bible.",id:"824607",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"Pentecost",description:"Celebrated exactly 50 days after Easter, Pentecost is the celebration of the Holy Spirit appearing before the Apostles as described in the Bible.",id:"824608",note:null,date:{day:null,year:null,month:null},category:"christian-holidays"},{name:"New Year's Day",description:"New Year's Day marks the start of a new year on the Gregorian Calendar. It starts when the clock strikes midnight and is often celebrated with fireworks, champagne and kissing.",id:"824609",note:null,date:{day:1,year:null,month:0},category:"secular-holidays"},{name:"Valentine's Day",description:"Valentine's day is a celebration of love and romance that is popular across the world. Many more cynically minded people mostly consider it an attempt to monetize the expectation of romantic gestures on the holiday through gift cards, flowers, chocolate and dates.",id:"824610",note:null,date:{day:14,year:null,month:1},category:"secular-holidays"},{name:"Halloween",description:'Halloween is holiday popular in the US, Canada and Ireland that has gradually been adopted by more and more countries. It is often celebrated by people dressing up, usually as something scary. Children will often go from door to door shouting "trick or treat" in the hopes of receiving candy, while adults tend to go to parties.',id:"824611",note:null,date:{day:31,year:null,month:9},category:"secular-holidays"},{name:"Work on the first version of this calendar started.",description:"Aecius started work on the first version Gregorian Calendar for Fantasy Calendar on this day.",id:"824612",note:null,date:{day:23,year:2019,month:5},category:"miscellaneous-events"},{name:"Work on this version of the Gregorian Calendar started.",description:"On this day, Aecius started to rework the Gregorian Calendar from scratch to make it work with the updates Wasp and Alex implemented since the summer of 2019.",id:"824613",note:null,date:{day:21,year:2020,month:0},category:"miscellaneous-events"},{name:"Introduction of the Gregorian Calendar",description:"On this day in 1582 the Gregorian calendar was officially introduced, following Thursday October 4th on the Julian Calendar",id:"824614",note:null,date:{day:15,year:1582,month:9},category:"historical-events"}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Christian Holidays",id:"christian-holidays",color:"#9b2c2c"},{name:"Secular Holidays",id:"secular-holidays",color:"#0D47A1"},{name:"Historical Events",id:"historical-events",color:"#455A64"},{name:"Miscellaneous Events",id:"miscellaneous-events",color:"#0288D1"}]},{name:"Calendar of Greyhawk",description:"Calendar of the world of Greyhawk.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,incrementDay:!1,displayMoons:!0,firstWeekDay:0,overflow:!1,weekdays:[{type:"day",name:"Starday",id:"ID_a8e979984938"},{type:"day",name:"Sunday",id:"ID_1b68bb78ca1b"},{type:"day",name:"Moonday",id:"ID_c8b86aea0998"},{type:"day",name:"Godsday",id:"ID_b8097a18e95b"},{type:"day",name:"Waterday",id:"ID_1918c99949ca"},{type:"day",name:"Earthday",id:"ID_fa295a1bab89"},{type:"day",name:"Freeday",id:"ID_6a485ada3ae8"}],months:[{name:"Needfest",type:"month",length:7,id:"ID_b8a9e9da8a48"},{name:"Fireseek",type:"month",length:28,id:"ID_39b90bd8189a"},{name:"Readying",type:"month",length:28,id:"ID_48a9081ad839"},{name:"Coldeven",type:"month",length:28,id:"ID_5a7b6beadb68"},{name:"Growfest",type:"month",length:7,id:"ID_48c8d82b1908"},{name:"Planting",type:"month",length:28,id:"ID_081a793a49da"},{name:"Flocktime",type:"month",length:28,id:"ID_eb68a89a0a2a"},{name:"Wealsun",type:"month",length:28,id:"ID_9b3a098ae908"},{name:"Richfest",type:"month",length:7,id:"ID_f99b4b3a08b8"},{name:"Reaping",type:"month",length:28,id:"ID_ebe9eb68ea39"},{name:"Goodmonth",type:"month",length:28,id:"ID_fb3b6af9895b"},{name:"Harvester",type:"month",length:28,id:"ID_395bcb399b8a"},{name:"Brewfest",type:"month",length:7,id:"ID_e8b908181afa"},{name:"Patchwall",type:"month",length:28,id:"ID_cbda3b399969"},{name:"Ready'reat",type:"month",length:28,id:"ID_592a2a690bf8"},{name:"Sunsebb",type:"month",length:28,id:"ID_39e8faf8e9b8"}],moons:[{name:"Luna",cycle:28,offset:3,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_f8997b39b8b8"},{name:"Celene",cycle:91,offset:46,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_7afbb9b88be8"}],leapDays:[],eras:[{name:"Common Year",format:"Year {{year}} CY",start:{year:1,month:0,day:1},id:"ID_db994869db7b",restart:!1,endsYear:!1,event:!1}]},current:{year:591,day:1,month:0},events:[{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824573",note:null,date:{day:null,year:null,month:null},category:null},{name:"Spring Equinox",description:`The 4th of Growfest is the first day of Low Summer in Oerth's Calendar. This is the point where the sun crosses Oerth's equator. Holidays celebrated on this date include Saint Cuthbert's Day, the Feast of Edoira, the Spring Feast, and Raxivort's Orgy. This is also the day on which the priests of Tlaloc ritually sacrifice and eat the flesh of human children or babies in their patron's honor. Worshippers of Rillifane Rallathil celebrate the Budding on this day, a joyful celebration of new life celebrated through dance and song in oak groves in the heart of the forest. A ritual hunt of a noble heart is held on this day, after which the venison is eaten in celebration of Rillifane's bounty.
Also celebrated on this date is the Sanctification of Renewal, a sacred holiday to the followers of Garyx.`,id:"824574",note:null,date:{day:null,year:null,month:null},category:null},{name:"Summer Solstice",description:" At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824575",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The 4th of Brewfest is the Autumnal Equinox, when the sun crosses the equator from north to south. This date is the official end of high summer and the beginning of autumn on the Greyhawk Calendar. This date is holy to Wenta and is sometimes regarded as an unofficial holy day of Velnius. Among the xvarts, it also marks the celebration of Raxivort's Orgy. The worshippers of Rillifane Rallathil celebrate the Transformation on this day, a time of dancing and spiritual rebirth marking the beginning of autumn and the promise that spring will come again.",id:"824576",note:null,date:{day:null,year:null,month:null},category:null},{name:"Great Moons Glory",description:"The night of Great Moon's Glory on Readying 11th, when Luna is full but Celene is new. It is holy to Celestian, and a time when offerings are left to Atroa to beg her to come early and to Telchur to request that he peacefully leave. Druids of the Old Faith are known to also hold this night as auspicious, but few outside their circles know the details.",id:"824577",note:null,date:{day:null,year:null,month:null},category:null},{name:"Dark Night",description:`Dark Night, also called Black Night, Star Night, and the Night of Hopeful Dawn, is observed on Goodmonth 11. It is a holy night for the church of Celestian because the stars are so easy to observe without the light of one of the moons getting in the way.
It is also a holy night for the church of Rao, who refer to it as the Night of Hopeful Judgment. They believe that Rao chooses this time to separate the sinful from the righteous in the afterworld. There is also a prophecy in the Raoan holy text, the Book of Incarum, that claims that Rao will cleanse the world of evil on this night, sometime in the future.
The priesthood of Kurell consider it holy, too, calling it Kurell's Night, requiring the faithful to undertake special missions on this night to prove their cleverness and skill. Kurell smiles particularly on acts of theft or vengeance performed on his holy night, blessing those who do so successfully. Donations to Kurell's church are encouraged afterwards, for Kurell may take vengeance against those who do not properly thank him for his aid.
Most other people regard Dark Night as a time of ill omen, fearing it as much as the night of the Blood Moon Festival. Bonfires are burned from dusk till dawn, particularly in small villages and in Elmshire and Narwell. Orc and goblin religions view it as an excellent night for raiding settlements. Certain evil cults perform kidnappings, murders, and vile rites during this period. On the other hand, lycanthropic activity is at its lowest.
Iggwilv and Tuerny attempted to summon a demonic army to Luna on this night in 585 CY.`,id:"824578",note:null,date:{day:null,year:null,month:null},category:null},{name:"Agelong",description:`Agelong, observed on the 4th of Richfest (the Summer Solstice), is the celebration of the legendary creation of the elves. According to myth, after Corellon Larethian spilled his blood during the battle with Gruumsh, the rest of the Seldarine gathered this sacred blood and mingled it with the tears shed during the same battle by Sehanine Moonbow. The Seldarine then infused these divine fluids into vessels they had created to be the bodies of the elven race.
This day is, among the elves, mostly an excuse to go orc-hunting. Elven warriors cut themselves with daggers carved from volcanic glass to remind themselves of Corellon's own wound from Gruumsh's spear, then strive to slaughter as many orcs as possible during the night.`,id:"824579",note:null,date:{day:4,year:null,month:8},category:null},{name:"Blood Moon Festival",description:`The Blood Moon Festival is celebrated on Coldeven 11, the night when Luna is full just before the Spring Equinox. On this night, curses are said to be twice as powerful and the forces of evil are at their strongest. Fiends roam the lands, and human sacrifice is common. This night is held especially sacred by cultists of Nerull, but worshipers of Kurell also mark this night as especially auspicious for acts of vengeance. Goodly folk superstitiously guard their homes with horseshoes, holy water, bottles of milk, and iron filings.
Demonic forces sent by Iuz destroyed the leadership of the Horned Society during the Blood Moon Festival of 583 CY.
It's possible that this is also the night the elves celebrate as Faerieluck.`,id:"824580",note:null,date:{day:11,year:null,month:3},category:null},{name:"Breadgiving Day",description:`Celebrated on on the Winter Solstice (Needfest 4), Breadgiving Day, is a day of charity observed in the Free City of Greyhawk by the faiths of Pelor, Rao, and Saint Cuthbert.
This was not originally a religious holiday as such. It is a new practice that began after the Greyhawk Wars to feed the refugees that flooded the city during that time. Since of Old City who line up by the hundreds along the Processional from the Black Gate. The booths are worked by low-ranking priests from all three religions, with armed priests of St. Cuthbert providing security. A smaller event is held simultaneously below Wharfgate in Greyhawk City's Shacktown.
The clergies of Heironeous, Pholtus, and Trithereon do not participate, but they compete with one another to perform good deeds the whole week of Needfest. The rivalries between Trithereon and Pholtus, Trithereon and Heironeous, and Pholtus and St. Cuthbert are such that the faiths sometimes fall into arguments and even blows if their "good deeds" conflict with each other. Greyhawk's rowdy citizens often cheer and place bets on the outcomes of these quarrels.
The priests of Pelor hold a morning ceremony on this day with a sermon, singing, and music.`,id:"824581",note:null,date:{day:4,year:null,month:0},category:null},{name:"Brewfest",description:`Also called Drunken Days or the Feast of Brewers, Brewfest, the fourth festival week of Oerth's calendar, is a rowdy period unsurprisingly claimed as a holy time by the churches of Olidammara and Wenta. The Free City of Greyhawk does not celebrate the entire week, but Brewfest 1 and Brewfest 7 are both set aside as public holidays. In Elmshire, the week is spent in restful, carefree music, drinking, and dancing. In Hardby it is spent with fistfights, riots, and ensuing hangovers. In Narwell it is celebrated with ale-brewing contests, horse races, beatings, and robbery. In Safeton it is celebrated with nervous violence and nightly orc hunts. The week is also sacred to the Old Faith.
The elves call this week Fallrite, and use it to contemplate the spirits of their ancestors, the passage to the afterworld, and the fragility of life. They believe other races make merry during Brewfest because they are "hiding" to avoid facing death's reality. In contrast, the olvenfolk strive to fulfill the most important of their duties and reach the most crucial of their decisions during this time of year. The elven kings and queens traditionally judge capital cases during Fallrite.`,id:"824582",note:null,date:{day:4,year:null,month:12},category:null},{name:"Faerieluck",description:"Faerieluck is a holiday celebrated by the elves in early spring, when the power of Faerie runs high and they celebrate with their fey cousins: the sprites, buckawns, pixies, nymphs and so forth. The point of the festival is to remind the elves of their ancient kinship with these creatures. The day is spent playing practical jokes, engaging in battles of wit, and general merriment.",id:"824583",note:null,date:{day:11,year:null,month:2},category:null},{name:"Feast of Edoira",description:`The Feast of Edoira is a holiday celebrated in the Domain of Greyhawk on Growfest 4, during the Spring Equinox. It is named after Edoira, a priest of Rao who centuries ago established the Edoiran Compact, a pact by which many of the lawful good-aligned faiths and people of the Domain could agree to cooperate. The Compact was later extended to non-lawful good and neutral faiths.
Edoira was never deified but was revered by many good faiths in the Domain. The holiday was marked by religious services on Godsday of Growfest led by the clerics of the good faiths who partook of the Compact, and secular festivals by the ordinary citizenry. Observance of the holiday has declined over the years, though the clergies of Rao and Pelor still hold their traditional interfaith services, with occasional participation by the priesthoods of Heironeous and Mayaheine. Since the end of the Greyhawk Wars most of the Domain's outlying communities no longer observe the holiday. Only one church in Safeton still does so.`,id:"824584",note:null,date:{day:4,year:null,month:4},category:null},{name:"Desportium of Magic",description:`The highlight of Growfest is the Desportium of Magic. During this day torchlight only, no magic illumination is supposed to be used. Wizards and Sorcerers then perform feats of illusion and magic trying to outdo one another with their displays. Usually there is a panel of judges to decide, in the larger cities there is usually a limit of 5-person teams competing. Each performance during the Desportium of Magic uses a long established theme, that of an attack on the town by various monsters and Dark Elves, repelled by brave warriors and spellcasters. The displays, made up of any number of spells cast without the use of magic devices, cannot actually cause any harm to property or people, but must be as wonderful, striking, detailed, and lifelike as possible.
This motif is based on actual attacks through the years from the Uttermost War to the most recent Great Slave Raids. The idea is to make the attackers as dreadful as possible and the defenders as heroic as possible, secondary is to make sure that people will always remember the terror of the Uttermost War. In large cities like the CSIO and CSWE and Tarantis, these performances last all night and are amazing to watch. In smaller villages without spellcasters, puppet plays are often done in its stead.`,id:"824585",note:null,date:{day:7,year:null,month:4},category:null},{name:"Holy Day of Pelor",description:`The Holy Day of Pelor, also known as Giving Day and Midsummer's Day, is celebrated on the Summer Solstice.
Because Pelor is widely loved by the commoners, this day is set aside as a day of rest in the Free City of Greyhawk. Only essential work is done on this day. Many merchants close their shops on Giving Day as well out of respect for the Sun Father and his teachings. Gambling houses are closed, but not hostelries, for Giving Day is a day of feasting and goodwill, a time for enjoying the fruits of the Oerth.
Public services are held from dawn until noon by Pelor's priests, outdoors if the weather permits (which if almost always does, as the clerics use weather-controlling magic for maximum sunlight). Even Greyhawk City's large temple of Pelor is not big enough to hold the throngs who come to celebrate on this day, so throngs of the faithful fill the temple grounds in the Garden Quarter, spilling out from the Millstream to the Nobles' Wall, and to the road leading toward Greyhawk's Grand Theater. Many come, of course, for the free meal the priests provide after the service. The Pelorian priests are well aware of this, but believe that for the needy, a full stomach must come before wisdom and learning. Members of Greyhawk's Guild of Thieves and Beggar's Union, many of whom remember Midsummer's Day fondly from their orphaned childhoods, both protect priests of Pelor on this day, and woe onto those who attempt to test them on this matter.
Priests of Pelor, bedecked in yellow and gold, parade about the streets, demanding donations for their charitable works, freely using guilt to squeeze more from stingy purses. Free healings are given out, particularly to children. Most Greyhawkers wear at least one item of yellow cloth on this day out of respect.
Some crusading Pelorians crusade against evil lycanthropes on this night, since both Celene and Luna are full.`,id:"824586",note:null,date:{day:4,year:null,month:8},category:null},{name:"Holy Day of Serenity",description:"The Holy Day of Serenity, on Reaping 10, is celebrated in Veluna as a holy day of Rao, though it's actually the anniversary of Veluna's secession from Furyondy in 476 CY. It is celebrated with religious singing and worship.",id:"824587",note:null,date:{day:10,year:null,month:9},category:null}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Religious Holidays",id:"religious-holidays",color:"#FFEB3B"},{name:"Secular Holidays",id:"secular-holidays",color:"#0D47A1"},{name:"Magical Events",id:"magical-events",color:"#311B92"},{name:"Miscellaneous Events",id:"miscellaneous-events",color:"#0288D1"}]},{name:"Calendar of Golarion",description:"Calendar for the world of Pathfinder.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!0,weekdays:[{type:"day",name:"Moonday",id:"ID_db8af8f85b8a"},{type:"day",name:"Toilday",id:"ID_f87a094b2849"},{type:"day",name:"Wealday",id:"ID_2a5bb88b3ae8"},{type:"day",name:"Oathday",id:"ID_c93a0be8981b"},{type:"day",name:"Fireday",id:"ID_2b7b59794a0b"},{type:"day",name:"Starday",id:"ID_baaa6a89ca1b"},{type:"day",name:"Sunday",id:"ID_f9baca088b28"}],months:[{name:"Abadius",type:"month",length:31,id:"ID_dad9da89f818"},{name:"Calistril",type:"month",length:28,id:"ID_980a88cb9b68"},{name:"Pharast",type:"month",length:31,id:"ID_a9c96ac80908"},{name:"Gozran",type:"month",length:30,id:"ID_a99a697b9abb"},{name:"Desnus",type:"month",length:31,id:"ID_8bcad9a8f84a"},{name:"Sarenith",type:"month",length:30,id:"ID_484a49a998db"},{name:"Erastus",type:"month",length:31,id:"ID_9a48e9b96938"},{name:"Arodus",type:"month",length:31,id:"ID_bbe99b2afaea"},{name:"Rova",type:"month",length:30,id:"ID_ba39fbe8c8b8"},{name:"Lamashan",type:"month",length:31,id:"ID_69d93ba9dba8"},{name:"Neth",type:"month",length:30,id:"ID_4ad8fb79eb6a"},{name:"Kuthona",type:"month",length:31,id:"ID_9a3a8b388939"}],moons:[{name:"Somal",cycle:29.5,offset:9.5,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_b87ab959cac9"}],leapDays:[{name:"Leap Day",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:8}],offset:0,timespan:1,intercalary:!1,id:"ID_88c8da3b8b2b"}],eras:[{name:"Age of Serpents",format:"Year {{year}} - {{era_name}}",start:{year:4720,month:8,day:15},id:"ID_eb4af87babaa",restart:!1,endsYear:!1,event:!1},{name:"Age of Darkness",format:"Year {{abs_year}} - {{era_name}}",start:{year:-5300,month:0,day:1},id:"ID_58e99a8b9b9a",restart:!1,endsYear:!1,event:!1},{name:"Age of Anguish",format:"Year {{year}} - {{era_name}}",start:{year:-4500,month:8,day:1},id:"ID_3af84ada898a",restart:!1,endsYear:!1,event:!1},{name:"Age of Destiny",format:"Year {{year}} - {{era_name}}",start:{year:-3500,month:8,day:1},id:"ID_abc87ad9fbfb",restart:!1,endsYear:!1,event:!1},{name:"Age of Enthronement",format:"Year {{year}} AR - {{era_name}}",start:{year:1,month:8,day:1},id:"ID_19197be9dac8",restart:!1,endsYear:!1,event:!1},{name:"Age of Lost Omens",format:"Year {{year}} AR - {{era_name}}",start:{year:4606,month:8,day:1},id:"ID_7b585b5bd9ea",restart:!1,endsYear:!1,event:!1}]},current:{year:4720,day:15,month:0},events:[{name:"Summer Solstice",description:"At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824492",note:null,date:{day:null,year:null,month:null},category:null},{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824493",note:null,date:{day:null,year:null,month:null},category:null},{name:"Spring Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824494",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The equinox marks the day and the night is equally as long.",id:"824495",note:null,date:{day:null,year:null,month:null},category:null},{name:"Eternal Kiss",description:`Zon-Kuthon
Culminating on the first new moon of the new year, the Eternal Kiss is an 11 day ceremony honoring Zon-Kuthon. On the final day, a living sacrifice is made to the Dark Prince, after the victim is pampered and pleasured for the ten days prior. The sacrifice can either be an enemy or a great devotee of the church, and is kept alive for as long as possible during the torture using magic. This holiday often involves fortune-telling as a part of the torture, using the victim's entrails or their cries of pain to determine the Midnight Lord's will. Occasionally it is believed that the sacrifice will prophesy with the voice of Zon-Kuthon himself.`,id:"824496",note:null,date:{day:null,year:null,month:null},category:null},{name:"Longnight",description:"Longnight is a holiday celebrated on the full moon in the winter month of Abadius. During the festival, revelers stay up all night to greet the dawn to defy the long winter months. It is even celebrated in Irrisen, where there are no natural seasons.",id:"824497",note:null,date:{day:null,year:null,month:0},category:null},{name:"Foundation Day",description:`Absalom, Milani
Foundation Day is a civil holiday celebrated on the New Year (1 Abadius) in Absalom to commemorate the city's founding by the god Aroden in 1 AR.`,id:"824498",note:null,date:{day:1,year:null,month:0},category:null},{name:"Pjallarane Day",description:`Irrisen
Pjallarane Day is an ancient holiday in Irrisen celebrated on 1 Abadius (New Year's Day). Every 100 years, Baba Yaga returns to Golarion to remove her daughter from the throne of Irrisen, and put another daughter on the throne instead. In 3713 AR the third Queen of Irrisen, Pjallarane, and her children chose to resist. Baba Yaga ruthlessly crushed the rebellion in a single day, which is now celebrated as a holiday. The festival includes feasting and the burning of effigies of tar and straw. This is a reminder of the fate of Pjallarane's followers, who were burned alive as a warning to all those who would oppose Baba Yaga.`,id:"824499",note:null,date:{day:1,year:null,month:0},category:null},{name:"Vault Day",description:`Abadar
Vault Day is a holiday held on 6 Abadius in honor of Abadar, Master of the First Vault.`,id:"824500",note:null,date:{day:6,year:null,month:0},category:null},{name:"Ruby Prince's Birthday",description:`Osirion
The Ruby Prince's Birthday is a national holiday in Osirion in honor of the birthday of Khemet III, the Ruby Prince. It is celebrated annually on the 20 Abadius.`,id:"824501",note:null,date:{day:20,year:null,month:0},category:null},{name:"Merrymead",description:`Druma, Cayden Cailean
A holiday occurring on 2 Calistril, Merrymead was started in Druma and is supposed to be a time to share of the last of the previous year's mead with the rest of the community.
In current times, most people just use it as an excuse to drink excessively. The poor travel from bar to bar drinking whatever alcohol they can afford, while the wealthy will set aside specific vintages for this day. A known consequence of this day are 'mead riots' that happen when there are more celebrants than there is alcohol to serve them. This leads to a violent, destructive group of people in a crowded bar. If this is a common occurrence for particular cities, they may reinforce their guard force for the inevitably eventful night.`,id:"824502",note:null,date:{day:2,year:null,month:1},category:null},{name:"King Eodred II's Birthday",description:`Korvosa
King Eodred II's Birthday was a local holiday in the Varisian city-state of Korvosa and was celebrated on 16 Calistril. It commemorated the birthday of its former ruler, King Eodred Arabasti II, who decreed that on the day, scantily clad women would dance and serve free wine to celebrants.`,id:"824503",note:null,date:{day:16,year:null,month:1},category:null},{name:"Loyalty Day",description:`Cheliax, Asmodeus
Loyalty Day is a holiday in the nation of Cheliax commemorating the date on Calistril 19, 4640 AR when House Thrune signed the Treaty of Egorian, declaring it the victor in the Chelish Civil War and ruler of the empire. Because of House Thrune's well-known ties to the infernal, this holiday is also observed by the Church of Asmodeus who consider it a feast day. The church along with local governments provide a free meal to all citizens to remind them of the benefits House Thrune provides them with.`,id:"824504",note:null,date:{day:19,year:null,month:1},category:null},{name:"Fateless Day",description:`Mahathallah
Followers of Mahathallah mark each leap day as Fateless Day, when the River of Souls temporarily stops and souls can escape Pharasma's judgment. They perform many sacrificial and suicidal rituals on Fateless Day.`,id:"824505",note:null,date:{day:29,year:null,month:1},category:null},{name:"Golemwalk Parade",description:`Magnimar, Varisia
The Golemwalk Parade is a parade of golems created by amateurs hoping to win a monetary grant, or even a job, from the Golemworks in Magnimar. At the end of the parade along the Avenue of Honors, the constructs are judged.`,id:"824506",note:null,date:{day:null,year:null,month:2},category:null},{name:"Day of Bones",description:`Pharasma
Priests and worshipers of the Lady of Graves parade the bodies of the recently dead on this holiday, holding free burials afterwards.`,id:"824507",note:null,date:{day:5,year:null,month:2},category:null},{name:"Sable Company Founding Day",description:`Korvosa
Sable Company Founding Day is a holiday marking the founding of the Sable Company of the Varisian city-state of Korvosa. Celebrated on 6 Pharast, the day is marked by somber military parades that generally preclude the consumption of alcohol, a staple on most other holidays.`,id:"824508",note:null,date:{day:6,year:null,month:2},category:null},{name:"Night of Tears",description:`Solku
The Night of Tears held annually on 7 Pharast in the Katapeshi town of Solku. It is a solemn vigil commemorating those lost in the Battle of Red Hail in 4701 AR.`,id:"824509",note:null,date:{day:7,year:null,month:2},category:null},{name:"Kaliashahrim",description:`Qadira
Kaliashahrim is a national holiday celebrated on Pharast 13 in Qadira that celebrates the Padishah Emperor of distant Katheer, and Qadira's loyalty to him.`,id:"824510",note:null,date:{day:13,year:null,month:2},category:null},{name:"Conquest Day",description:`Nex
Every year, on the 26th of Pharast, Elder Architect Oblosk \u2014 oldest member of Nex's Council of Three and Nine \u2014 ascends to the highest balconies of the Bandeshar in Quantium. In a voice made thunderous by the platform's magic, the wizened pech councilman spends the hours from dusk to just past noon enumerating the atrocities committed by the necromancers of Geb upon the people of Nex, culminating with the disappearance of the archwizard Nex himself. At the conclusion of this record of national wounds, the country's eleven other council members join Oblosk in renewing their yearly vow to neither forget nor forgive the Gebbites' atrocities and to again swear in their lost ruler's name to endlessly wage war against their ancient enemies.
On this day, known as Conquest Day, all the people of Nex are expected to share in their leaders' oaths, to celebrate the shared patriotism of their wondrous nation, and to remember the sacrifices of heroes past. This also makes it a day for many Nexian wizards to reveal deadly new spells, gigantic constructs, and audacious arcane masterworks\u2014which many creators promise to be the doom of their foes. Even throughout the rest of the Inner Sea region, many crusaders, rebels, and zealots observe Conquest Day as a day to renew blood oaths, launch long-planned battles, and finally take revenge. It is a day for words of honor, a day for battle cries, and a day where glory most favors the bold.`,id:"824511",note:null,date:{day:26,year:null,month:2},category:null},{name:"Days of Wrath",description:`Asmodeus, Cheliax
The Days of Wrath, or Dies Irae, are a holiday celebrated on both solstices and equinoxes in the nation of Cheliax and wherever Asmodeus is worshiped. They are primarily a national holiday and not truly a religious one, but the two are often confused due to Cheliax's current political climate. Various contests and blood sports are held on these days, promoting those elites who can clearly demonstrate their superiority over others. Some believe that these competitions are watched and judged by devils themselves. In the parts of the world where the Prince of Darkness is not openly venerated, these holidays take on a different tone: they are used to settle old grievances and also to end contracts.
In these days, bloodsports are organized into cities' stadiums. Slaves and servants of any master may choose to enter the arena for one-on-one bloody battles to the death. Free men and women of all classes are free to enter the arena as well. The entrants fight in rounds until at last one stands alone. The winner is granted freedom from slavery or servitude, erasure of all debts, and a purse of gold.
The winter solstice sees the culmination of the Dies Irae, with all the winners of the three previous bouts summoned to Egorian to fight to the death for the amusement of the nobles. The winner is given a title of baronet and a plot of land.`,id:"824512",note:null,date:{day:null,year:null,month:null},category:null},{name:"Firstbloom",description:`Gozreh
Firstbloom is a holiday celebrating the first planting of the agricultural season, and generally associated with the weather god Gozreh. It falls on the vernal equinox. Many farming communities see it as the beginning of the year, even though conventional calendars begin two months earlier. Despite weariness after a full day planting, many farming communities hold celebrations come the night: feasting, dancing and courtship feature showing the cycle of nature.`,id:"824513",note:null,date:{day:null,year:null,month:null},category:null},{name:"First Cut",description:`Falcon's Hollow
The First Cut celebration in Falcon's Hollow used to mark the start of the work in the woods each spring. Now, however, it is a meaningless ramshackle ceremony as Thuldrin Kreed forces the lumber crews to work through even during the coldest months in the winter. Still, First Cut brings people out to celebrate the start of the spring.`,id:"824514",note:null,date:{day:null,year:null,month:null},category:null},{name:"Currentseve",description:`Gozreh
On this religious holiday, all who travel on the water make offerings to Gozreh in the hopes of safe passage for the coming year.`,id:"824515",note:null,date:{day:7,year:null,month:3},category:null},{name:"Taxfest",description:`Abadar
No one enjoys paying taxes but the collection of fair taxes is considered an integral part of the maintenance of society, and is therefore holy to the god Abadar. Every year on the 15th of Gozran, priests of the church of Abadar spend the day walking city streets, doing what they can to make the bitter pill of annual taxes a bit easier to swallow.
The Business of the Day
From dawn to dusk, clerics of Abadar attend the tax collectors of sizeable communities as the tax wagons roll from door to door. The church officials monitor these activities to make sure that the process is conducted respectfully and justly, and that citizens know that the process is monitored. More than just aiding in the yearly errand, the faithful personally thank every citizen for contributing to the improvement of their city, extol the public works funded by their contributions, and foretell the grandeur of civic projects to come. The disenfranchised and destitute they attempt to comfort as best they can, quoting from their god's dogma on work and worthiness, but this is not a day for discounts or deferrals. The citizens are able to voice their concerns and ideas as to where the monies levied should best be applied. Citizens are free to speak their mind on any issue here without fear of repercussion.
The Celebrations of the Day
At dusk, the Abadarans host several celebrations in parks, plazas, and other communal areas about the city, organizing donations and contributions from local vendors to feed and entertain all-comers. Having already preached to most of the city over the course of the day, the clerics perform only a brief opening ceremony, dedicating the feast to Abadar, the city, and its great people. These celebrations are often quite distinct from neighbourhood to neighbourhood and are almost always divided along economic boundaries.
The festivities involving the wealthiest citizens usually happen on the steps of city hall or other grand civic buildings and feature the best music and food, but often little more than polite card and guessing games. These galas usually wrap up by midnight.
For the common folk, the parks and marketplaces take on a carnival atmosphere, with simple but good food, local ales, performances by talented citizens, and games of chance going on well into the night. A prevailing superstition through these festivals is that, during the celebration, it is lucky to kiss\u2014or in some regions, pinch\u2014a cleric of Abadar, leading to many a rosy-cheeked cleric.
Even the city's poor are given reason to celebrate, as the local temple of Abadar hosts a cheery but unabashedly religious gathering on its steps, feeding all comers, doling out a hearty ration of wine, singing hymns of the faith, and providing tokens for a second wine ration for any who return to attend a service within the month.
For a holiday that revolves around paying taxes, this Abadaran festival is not as reviled as one might expect.`,id:"824516",note:null,date:{day:15,year:null,month:3},category:null},{name:"Wrights of Augustana",description:`Andoran, Brigh
This local festival in the Andoran port city of Augustana is held to honor and celebrate the local shipbuilding industry as well as the navy. The mathematics and engineering required for the building of the ships is praised by Brigh's faithful.`,id:"824517",note:null,date:{day:16,year:null,month:3},category:null},{name:"Gala of Sails",description:`Absalom
One of two local festivals where kite-battlers compete.`,id:"824518",note:null,date:{day:27,year:null,month:3},category:null},{name:"Remembrance Moon",description:`Iomedae, Lastwall, Ustalav
A national holiday to commemorate those who died in the Shining Crusade against the Whispering Tyrant. Although not strictly a religious holiday, Iomedae's name is heavily invoked, due to her many military accomplishments during the war.`,id:"824519",note:null,date:{day:null,year:null,month:4},category:null},{name:"Angel Day",description:`Magnimar, Varisia
Angel Day is a local Magnimarian holiday celebrated on 31 Desnus. The annual celebration marks the founding of the city, and its founders' flight from Korvosa. It also honors the presence and popular worship of the empyreal lords, which predates the city by centuries. During the festival, nearly all local businesses shut their doors and the citizens take part in countless feasts, masquerade balls dressed as angels, and the burning of devil effigies meant to symbolize infernally-influenced Korvosa.`,id:"824520",note:null,date:{day:31,year:null,month:4},category:null},{name:"Old-Mage Day",description:"Holiday celebrating Old-Mage Jatembe, the father of Garundi magic.",id:"824521",note:null,date:{day:13,year:null,month:4},category:null},{name:"Multiple Events",description:`Festival of the Ruling Sun
Shizuru
Celebrates the longest day.
Founder's FollyUlar Kel
Adventurers and children follow a hallucinatory red stripe along zigzagging paths, amusing residents.
Harvest Bounty Festival
Segada
Marking the beginning of the harvest season, this festival involves sporting tournaments, dancing, storytelling, and feasts. Celebrants give thanks and eliminate grudges.
Longwalk
Grandmother Spider, Nurvatchta; southern hemisphere winter solstice
Celebrates the escape of Nurvatchta's anadi people from bondage, in part thanks to Grandmother Spider lengthening their cover of darkness in their escape.
Ritual of Stardust
Desna
Festival held in the evening and through the night, where Desna's faithful sing songs and throw sand and powdered gems into bonfires.
Runefeast
Magrim
Day marking the day dwarves learnt the first runes and the proper way to pray.
Sunwrought FestivalSarenrae, Brigh
Day commemorating the defeat of Rovagug by Sarenrae, celebrated with the flying of kites, fireworks, and gift giving.`,id:"824522",note:null,date:{day:null,year:null,month:null},category:null},{name:"Burning Blades",description:`Sarenrae
The holy, month-long festival ends on this day, featuring dances with flaming blades.`,id:"824523",note:null,date:{day:10,year:null,month:5},category:null},{name:"Liberty Day",description:`Andoran, Milani
Holiday celebrating Andoran's independence. Milanites celebrate that very little violence occurred.`,id:"824524",note:null,date:{day:3,year:null,month:5},category:null},{name:"Talon Tag",description:`Andoran
The Eagle Knights perform aerial displays in Almas on this day.`,id:"824525",note:null,date:{day:21,year:null,month:5},category:null},{name:"Riverwind Festival",description:`Korvosa
An early summer holiday that honors a cooling shift in the winds, celebrated with much drinking.`,id:"824526",note:null,date:{day:22,year:null,month:5},category:null},{name:"Inheritor's Ascendance ",description:`Iomedae
Inheritor's Ascendance, originally called 'Herald's Day', honours the day that Iomedae was chosen by the god Aroden to become his herald (thus replacing Arazni), thus boosting her power beyond that of a fledgling goddess. This holiday was renamed after the demise of Aroden.`,id:"824527",note:null,date:{day:1,year:null,month:7},category:null},{name:"First Crusader Day",description:`Mendev
Holiday in celebration of the continuing crusade against the demons of the Worldwound.`,id:"824528",note:null,date:{day:6,year:null,month:7},category:null},{name:"Day of Silenced Whispers",description:`Ustalav
The Day of Silenced Whispers is an Ustalavic holiday celebrated every 9 Arodus marking the defeat of the Whispering Tyrant in 3827 AR by the coalition forces of the Shining Crusade and the liberation of the country after centuries of undead domination.`,id:"824529",note:null,date:{day:9,year:null,month:7},category:null},{name:"Founding Day",description:`Ilsurian, Varisia
Festival celebrating the founding by Ilsur of the town of Ilsurian in 4631 AR.`,id:"824530",note:null,date:{day:10,year:null,month:7},category:null},{name:"Armasse",description:`Aroden, Iomedae, Milani
The raucous, week-long festival known as Armasse is held each year beginning on 16 Arodus. The celebration \u2014 once dedicated to the god Aroden \u2014 is still important to the faithful of Iomedae, who use it to train commoners in combat, ordain apprentice clergy, pick squires for knights, and teach military history, hoping to prevent the mistakes of the past from being repeated. Among those not dedicated to the Inheritor the holiday has lost most of its religious significance since Aroden's death, tending now only toward wild partying, a fact that has precluded the diabolist authorities of Cheliax from prohibiting Armasse outright. Nevertheless, in places where the church of Asmodeus is openly allowed, it hosts special activities for its parishioners during the same week in an effort to counter the influence of the holiday. The city of Corentyn is especially known for its extravagant Armasse festivities.`,id:"824531",note:null,date:{day:16,year:null,month:7},category:null},{name:"Saint Alika's Birthday",description:`Korvosa
Quiet holiday honoring the birth of Saint Alika the Martyr.`,id:"824532",note:null,date:{day:31,year:null,month:7},category:null},{name:"Archerfeast",description:`Erastil
Archer's Day or Archerfeast is a holiday of the god Erastil held annually on the 3rd of Erastus. Despite the holiday's origins in the worship of Erastil, common country folk from the Lands of the Linnorm Kings to Taldor celebrate the height of summer with a day set aside for establishing new relationships, enjoying current camaraderie, and celebrating the gifts of the gods. Archery competitions are held frequently in which the men test their skill with the bow through progressively harder trials. The exact form of competition is different from place to place, and the winner is awarded a rack of elk horns and a quiver of blessed arrows. He is also given the title of "Protector", which he holds until the next year.
While the festival's traditions emphasize contests of marksmanship, most have expanded to exhibit talents of all types, from baking and storytelling to racing and mock combat. Aside from encouraging a fair-like atmosphere, many of the displays and competitions serve one of two secondary purposes: either as a way for merchants to show off their superior livestock and wares, or (more popularly) as a way for eligible men and women to show off to each other.
While the day's events at most Archerfeast fairs are filled with games, food, and crafts, the night brings dancing, drinking, pranks, and the crowning of the princes and princesses of spring and summer for the two single youths and two single adults who fared best in the day's events. The festivities continue late into the evening, but end promptly at midnight, so that in true Erastilian fashion the next day's responsibilities are not overly impeded. For those not of Erastil's flock, however, private parties, drinking, and trysting carry on long into the next morning.`,id:"824533",note:null,date:{day:3,year:null,month:6},category:null},{name:"Founding Festival",description:`Korvosa
Founding Festival is a local Korvosan celebration marking the establishment of the city in 4407 AR. Held annually on 14 Erastus, the festival is a chance for the citizens to let off some steam, drink copiously, and watch magical light shows late into the night.`,id:"824534",note:null,date:{day:14,year:null,month:6},category:null},{name:"Burning Night",description:`Razmiran
Items or people who have transgressed against the god-king of Razmiran are burned on this day.`,id:"824535",note:null,date:{day:17,year:null,month:6},category:null},{name:"Kianidi Festival",description:`Garundi
The Kianidi Festival is a week long event held annually between 15 and 21 Erastus by Garundi people everywhere. The Garundi have a powerful belief in belonging to a specific location in this world, with clans or tribes sometimes traveling for years in search of their true home. In these travels each individual will collect small mementos of the places she or he has visited in order to remember them and maintain a spiritual connection. During the Kianidi, a tribe will gather and display these mementos to the group. The best ones are chosen and made part of the clan or tribal history, something which Garundi feel is a great honor.`,id:"824536",note:null,date:{day:15,year:null,month:6},category:null},{name:"Harvest Moon",description:null,id:"824537",note:null,date:{day:null,year:null,month:8},category:null},{name:"Multiple Events",description:`Festival of Night's Return
Nidal
Celebrated throughout Nidal, this holiday involves the burning of effigies and self-flagellation.
Swallowtail Festival
Desna
Holiday celebrated with storytelling, feasting, and the release of butterflies.
Waning Light Festival
Segada
Also called Blessing of the Sun and Night of Spirits, participants bid farewell to the long days of sunshine with feasting, dancing, and music.`,id:"824538",note:null,date:{day:null,year:null,month:null},category:null},{name:"Signing Day",description:`Andoran, Cheliax, Galt, Isger
Signing Day is a Chelish holiday, dating back to the height of the empire. Observed on the second Oathday of Rova, this is the day on which new laws in the empire took effect. The significance of this day expanded over many years until imperial marriages, significant business arrangements and oaths of fealty were all conducted on this day.
Originally, the holiday began as a celebration of the mutual-defense pact between Cheliax, Isger, Galt and Andoran when the united nations threw off the shackles of Taldor, declaring themselves independent from the empire. Observances of the holiday vary, but often include firework displays, feats of strength, and public debates to showcase speaking and rhetorical skills.
As Cheliax degenerated to civil war and diabolism after 4606 AR, blood pacts and infernal contracts also began to be signed on this day. As a result of Cheliax's new affiliation, Andoran and Galt began to distance themselves from Cheliax and the original interpretation of the holiday. In Andoran it continues to be the day that most national laws take effect as well as being a traditional day of marriage, and the date on which new Steel Falcons are inducted.`,id:"824539",note:null,date:{day:null,year:null,month:8},category:null},{name:"Crabfest",description:`Korvosa
Crabfest is a Korvosan holiday held on the first Wealday of Rova. It celebrates the return of the crabs from the cooler waters of the Jeggare River to their winter habitat in Conqueror's Bay, and is marked by crab boil feasts held throughout the city and its surrounding communities.`,id:"824540",note:null,date:{day:null,year:null,month:8},category:null},{name:"Feast of Szurpade",description:`Irrisen
This "celebration of plenty" festival mocks the traditional harvest festivals celebrated in the region before Baba Yaga and her eternal winter descended upon the land.`,id:"824541",note:null,date:{day:26,year:null,month:8},category:null},{name:"Day of Sundering",description:`Ydersius
Once many holidays were celebrated by the faith of Ydersius, but today only this date has much significance.`,id:"824542",note:null,date:{day:29,year:null,month:8},category:null},{name:"Admani Upastuti",description:`Jalmeri
Admani Upastuti is a Jalmeri holiday celebrated on the first full moon of Lamashan that marks the founding of Jalmeray as a Vudran colony.`,id:"824543",note:null,date:{day:null,year:null,month:9},category:null},{name:"Ascendance Day",description:`Iomedae
Ascendance Day is an Iomedaean holiday, held on the 6th of Lamashan. The day marks the anniversary of the day Iomedae took the Test of the Starstone in the autumn of 3832 AR and ascended to godhood.
Celebration
The day is a joyous celebration for the faithful, with singing, pledging of friendships, and forgiving of old grudges.
To many, the Test of the Starstone represents the greatest of all challenges, yet for Iomedae it was one of three storied promotions in her rise from Aroden's herald to a goddess in her own right. On the 6th of Lamashan, the Inheritor's faithful observe the heroism of Iomedae's life before her moment of ascension and celebrate the anniversary of the apotheosis itself.
The celebration takes place in several stages. Early in the day, troupes of performers\u2014as often passionate amateurs as professionals\u2014stage morality plays featuring the Eleven Acts of Iomedae, the heroic near-miracles and sacrifices she made leading up to her trials in the Starstone Cathedral. Scripts vary by region, city, and even neighborhood, but despite differences in setting, performance medium, and word choice, the themes and morals are all the same.
As the day continues, the priests organize jousts and mock battles, allowing anyone to participate so long as she can demonstrate enough skill to not be a risk to herself or others. The winners of these contests then face tests of mental acuity such as solving riddles, deciphering philosophical quandaries, and answering questions of honor and justice. Those who prove themselves in both contests are awarded a white cloak\u2014representing the Inheritor at peace\u2014styled after Iomedae's own red garment to wear for the rest of the celebration. Feasting and singing follow the competitions, mirroring the jubilation that followed Iomedae's ascension. This is occasion for making pledges of friendship and forgiving enemies, and priests circulate about the crowd offering the Inheritor's blessing to those who do and providing a moment's counsel or mediation for those who need an extra nudge.
The celebration typically ends before midnight, and the following day the priests and previous day's champions gather up the blunted swords from the mock battles, sharpen them, and distribute them among the church's armory and those of like-minded organizations so that all may remain vigilant against evil and prepared to strike it down.`,id:"824544",note:null,date:{day:6,year:null,month:9},category:null},{name:"Bastion Day",description:`Solku
Bastion Day is a two-day festival held annually on 19 and 20 Lamashan in the Katapeshi town of Solku honoring the founding of the town, when it is traditional to host a stranger from one noon until the next.`,id:"824545",note:null,date:{day:19,year:4712,month:9},category:null},{name:"Jestercap",description:`Andoran, Druma, Taldor
Jestercap occurs at the end of the month of Lamashan, traditionally on the 27th (although a few regions have taken to moving the exact day around slightly so it always falls on the last Starday of the month, allowing people who wish to celebrate in excess to have the following day of rest to recover).
History
While Jestercap has been embraced with excited open arms by the gnome communities of the Inner Sea region, its original genesis is said to have been in one of Taldor's coastal cities not long after King Aspex the Even-Tongued broke from the nation, significantly weakening Taldor's power and beginning that nation's long decline. The holiday was originally intended to distract the distraught Taldan populace with a night of revelry and comedic entertainment, but the antics of jesters were simply not enough.
Over the course of the first few years, Jestercap evolved from a holiday of observation to a holiday of participation. Today, the holiday is a time where anyone can pull pranks or jokes or japes on companions, on neighbors, and (most typically) on rivals, with the understanding that provided no lasting harm is done, any humiliations inflicted before midnight are to be taken in stride. Of course, come morning the day after, there are inevitably jokes that went too far, and grudges and feuds borne from Jestercap antics have a way of lingering for months to follow.
In Religion
Followers of Chaldira Zuzaristan, a halfling deity of mischief, treat Jestercap as a holy day and their pranks \u2014 often elaborate and extravagant in nature and plotted for months in advance \u2014 as displays of their faith.`,id:"824546",note:null,date:{day:27,year:null,month:9},category:null},{name:"Feast of the Survivors",description:`Zon-Kuthon, Nidal
A harvest festival signifying the centuries of Nidalese ancestors protected by Zon-Kuthon. The ceremonial tables are made of human bones of community members from past generations.`,id:"824547",note:null,date:{day:null,year:null,month:9},category:null},{name:"Kraken Carnival",description:`Absalom
The second of two local festivals where kite-battlers compete.`,id:"824548",note:null,date:{day:15,year:null,month:9},category:null},{name:"Independence Day",description:`Galt
Marks the beginning of the Red Revolution.`,id:"824549",note:null,date:{day:5,year:null,month:10},category:null},{name:"Seven Veils",description:`Sivanah
The holiday known as Seven Veils, which takes place on the 23rd of Neth in most realms of the Inner Sea region, is a celebration of the region's diversity \u2014 a time when social boundaries break down even further in a day-long event filled with dancing, feasting, and courting. The evening traditionally closes out with the Seven Veil masquerade, a ball wherein the participants wear disguises that hide their race or gender (often using minor magical trinkets and spells) or disguise these features as entirely new characteristics. At the end of the ball, the participants remove their disguises to their partners, often with unpredictable and sometimes delightfully awkward results. Traditionalists and conservative minds often find the Seven Veils masquerades to be scandalous or off-putting, yet they remain particularly popular in most of the larger cities of the land.
Historians note that the original "Dance of the Seven Veils" has a much different genesis than one promoting diversity \u2014 the mysterious cult of Sivanah, goddess of illusions, mystery, and reflections, is generally cited as the source of this festival, and indeed, worshippers of the goddess (herself known as the Seventh Veil) count the 23rd of Neth as one of their most sacred of days. What rituals the church of Sivanah performs on this date, however, are unknown to outsiders, for the cult enjoys its secrets. This secrecy has, unsurprisingly, given rise to all manner of sinister rumour, yet when Seven Veils rolls around each year, its eager participants are quick to set aside rumour in preference for the night's fun and games.`,id:"824550",note:null,date:{day:23,year:null,month:10},category:null},{name:"Abjurant Day",description:`Nethys
Abjurant Day occurs on 8 Neth and is known as a day of cooperation between neighbors to shore up mutual defenses and train allies in magic. Potential apprentices are often tested on the day.`,id:"824551",note:null,date:{day:8,year:null,month:10},category:null},{name:"Great Fire Remembrance",description:`Korvosa
Great Fire Remembrance is a holiday celebrated on each 13 Neth in the Varisian city of Korvosa. It commemorates the Great Fire of 4429 AR, which devastated the then still fledgling Chelish colony of Fort Korvosa. On this somber day, most of the city shuts down and people generally remain at home. It has become tradition not to light any fires (not even cooking fires) on Great Fire Remembrance.`,id:"824552",note:null,date:{day:13,year:null,month:10},category:null},{name:"Even-Tongued Day",description:`Cheliax, Asmodeus, Milani
Observed on 14 of Neth, Even-Tongued Day was once a day of joy and celebration in Cheliax, but has become instead one of mourning.
Originally, the date marked the conquest of Aspex the Even-Tongued, who brought the nations of Galt, Andoran and Isger under Chelish control. Since the death of Aroden and the loss of these nations, the holiday instead marks the loss of territory and glory once held by Cheliax. Oaths are sometimes made, typically to Asmodeus, and rarely of a pleasant nature (such as the reclaiming of the lost empire and vengeance against treacherous former allies).
Citizens wear black on this day, public speaking is forbidden, and old feuds and vendettas are rekindled.`,id:"824553",note:null,date:{day:14,year:null,month:10},category:null},{name:"Evoking Day",description:`Nethys
A holy day to followers of Nethys, Evoking Day is full of vibrant explosions, skillful wielding of spells, and much dancing. Evoking Day is observed on the 18th of Neth, and while this holiday is mostly celebrated in Garund, temples dedicated to Nethys host celebrations throughout the Inner Sea region. Traditional celebrations of Evoking Day have changed over the thousands of years since its first incarnation, but to this day every occurrence of Evoking Day still features a grand meal shared by celebrants during the afternoon and a wondrous exhibition of brilliant and explosive magic once the sun sets. These days, such colorful magical displays are augmented with fireworks of a dozen different colors and patterns.
In temples of Nethys dedicated to revering evocation magic, priests and prominent arcanists participate in spell duels where each contestant stands on a raised platform and takes turns trying to incapacitate her opponent. The magic wielded in theses duels favors the flashy over the dangerous, but clerics of Nethys are on hand to treat any injuries. These duels gather large crowds eager to lend their applause to their favorite contestant.
It is also during this festival when wizards who worship Nethys open their spellbooks to others who share their craft. Wizards normally guard their spellbooks with their lives and covet the eldritch information therein, but on Evoking Day these wizards meet with one another prior to the afternoon feast to share their spells just as they prepare to share a grand meal.
Though Evoking Day is primarily a day of grand magic, those with no spellcasting talent still flock to local temples of Nethys to partake in the shared feast and flashy evening displays of magic and fireworks. Between the meal and into the night, celebrants wear black-and-white robes and perform joyous dances meant to give thanks to the wonders Nethys brought to humankind. These dances are grand affairs involving dozens of dancers all spinning and clapping to the accompanying music as their black-and-white robes fan out around them with each spin. As night descends and the fireworks and magical displays begin, the dancing rises to a climax erupting in shouts and calls to Nethys with each thunderous boom.`,id:"824554",note:null,date:{day:18,year:null,month:10},category:null},{name:"Baptism of Ice",description:`Irrisen
In the Irriseni Baptism of Ice, an annual fertility festival held from the 24th to the 30th of Neth, locals parade all children born during the year through the town in fine clothes. In most towns, the festival ends with a symbolic sacrifice of a child to the cold. However, in Whitethrone and Irrisen's provincial capitals, a peasant child is killed through exposure.`,id:"824555",note:null,date:{day:24,year:null,month:10},category:null},{name:"Transmutatum",description:`Nethys
Transmutatum is one of the three major holidays of the church of Nethys, on 28th of Neth. It is a day of reflection and self-improvement. Many followers of Nethys begin research and crafting projects on this day.`,id:"824556",note:null,date:{day:28,year:null,month:10},category:null},{name:"Winter Week",description:"Traditional feast; time for courting and spending time with friends.",id:"824557",note:null,date:{day:null,year:null,month:11},category:null},{name:"The Shadowchaining",description:`Zon-Kuthon, Nidal
Commemorating the Midnight Lord's gift of shadow animals.`,id:"824558",note:null,date:{day:1,year:null,month:11},category:null},{name:"Pseudodragon Festival",description:`Korvosa
Korvosa's Pseudodragon Festival, a holiday celebrated annually on 7 Kuthona, marks the winter migration of wild pseudodragons from the Mindspin Mountains to Conqueror's Bay, which inspires the creatures already in the city\u2014even those domesticated\u2014to play with their wild kin in the skies over the city. Locals mark the day with a joyous inebriation.`,id:"824559",note:null,date:{day:7,year:null,month:11},category:null},{name:"Ascension Day",description:`Cayden Cailean
Much like the god to whom it is dedicated, the Caydenite holiday of Ascension Day is generally celebrated in a very informal style. Occurring annually on 11 Kuthona, it commemorates the day Cayden Cailean passed the Test of the Starstone and ascended to godhood in 2765 AR. In all likelihood, the 11th of Kuthona is not the exact date on which it actually happened, but since the god was dead drunk when it happened, it will probably be never known.`,id:"824560",note:null,date:{day:11,year:null,month:11},category:null},{name:"Winterbloom",description:`Naderi
Holiday celebrating Naderi's ascension. Celebrations are typically understated but include readings of The Lay of Arden and Lysena.`,id:"824561",note:null,date:{day:15,year:null,month:11},category:null},{name:"Final Day",description:`Groetus
Cultists of Groetus perform an hour's silence at dusk on the last day of the year and seek guidance from their god about the End Time.`,id:"824562",note:null,date:{day:31,year:null,month:11},category:null},{name:"Night of the Pale",description:`Not all of Golarion's holidays and festivals are times of rejoicing and delight. Holidays worshiped by dark and sinister cults and religions tend to be hidden affairs, their rituals and ceremonies involving cruelties and vile practices that send shivers of fear through gentler society. Scholars suspect that the Night of the Pale\u2014a holiday that traditionally takes place on the last day of the year, the 31st of Kuthona\u2014has links to several sinister religions, but today no one church has specific association with the event. Nonetheless, the Night of the Pale is an event that many look forward to all year, whether in fear or excitement.
On the Night of the Pale, it is said that the ghosts of those who died during the previous year manifest upon the world and come to visit the homes they lived in during life. Although some might think that the chance of seeing even the shade of a dearly departed one might be a blessing, the Night of the Pale is not a time for tearful reunions, for these ghosts, tradition says, do not return out of love for those they left behind but out of darker compulsions. Lingering jealousy, unfinished arguments, or the simmering need for revenge are said to be what compels the dead to return to torment the living on the Night of the Pale.
The evening of this night in many communities is celebrated by a morbid feast, the food prepared with themes revolving around graveyards, the dead, and other spooky traditions. This feast, on one level, helps the celebrants to make light of their fears while sharing good company with similarly nervous neighbors, but at another level is believed to placate vengeful spirits as toasts are raised to the memories of the recently departed. These feasts include retellings of favorite memories of the departed, in hopes of reminding the approaching ghosts of brighter and kinder memories than those that compel them to return. The feast always ends at least an hour before midnight in order to give participants time to return home, decorate doors and windows with salt and other trinkets taken from the feasting table (salted bread baked into crook-like shapes are a favorite, as these can be hung from doorknobs and eaves) to ward off evil spirits, and hide in their bedrooms until dawn. Brave youths and adventurers often deliberately stay out after midnight, either to dare the ghosts to challenge them or simply for the thrill of bucking tradition. Every Night of the Pale, it seems, there are disappearances among those who stay out after midnight, although whether these vanishings are the result of dissatisfied locals taking the opportunity to run away from home, murderers or wild animals or other mundane dangers, or the vengeful spirits carrying off their victims depends upon the circumstances.
The morning after a Night of the Pale is also the first day of the new year\u2014a time that many celebrate more as a relief for surviving the night before than in anticipation of what the new year might bring, although regional preferences for how this day is celebrated vary enough that no single tradition holds over the other. Save, of course, the lingering fears of what dread spirits might come knocking upon warded doors one year away...`,id:"824563",note:null,date:{day:31,year:null,month:11},category:null},{name:"Turning Day",description:`Alseta
The changing of the year is celebrated with the forgiveness of old debts and grudges, and embracing new opportunities.`,id:"824564",note:null,date:{day:31,year:null,month:11},category:null},{name:"Ritual of Stardust",description:`Desna
The Ritual of Stardust is one of the few formal religious holidays in honor of the goddess Desna. It is held on both the summer and winter solstices.
Followers of the Song of Spheres gather at dusk and light enormous bonfires and hold feasts, watching the sparks and embers float out into the darkening sky. After it is fully dark, the celebrants chant and sing songs as they watch the fires burn low. When only embers remain, sand mixed with ground star gems (either star rubies, star sapphires, or rose quartz) is thrown on them or into the air downwind. At this point it is common to make proclamations of love and friendship and of promised journeys to come. The twinkling of the sand is thought to mirror the night sky and demonstrate Desna's witnessing of these pronouncements.`,id:"824565",note:null,date:{day:null,year:null,month:null},category:null},{name:"Planting Week",description:`Erastil
This holy week to the god Erastil is a time of heavy work in the fields for farmers.`,id:"824566",note:null,date:{day:null,year:null,month:null},category:null},{name:"Ascendance Night",description:`Norgorber
Day marking the apotheosis of the Reaper of Reputation.`,id:"824567",note:null,date:{day:2,year:null,month:4},category:null},{name:"Azvadeva Dejal",description:`Gruhastha
Celebration of the revelation of the Azvadeva Pujila, with gifts of books, celebrations of knowledge, blessing of animals, and a vegetarian feast.`,id:"824568",note:null,date:{day:3,year:null,month:4},category:null},{name:"Goblin Flea Market",description:`Andoran
A market day that focuses on unusual crafts and offers games to children who dress up for the occasion.`,id:"824569",note:null,date:{day:null,year:null,month:null},category:null},{name:"Breaching Festival",description:`Korvosa
Yearly festival in which contestants try to break through the magical wards protecting the Academae.`,id:"824570",note:null,date:{day:null,year:null,month:4},category:null},{name:"Silverglazer Sunday",description:`Andoran
Silverglazer Sunday is a two-part Andoren national festival that is held on the last Sunday of Arodus and the first Sunday of Rova every year. Celebrants spend the two Sundays fishing, holding swimming competitions, and making enormous puppets.`,id:"824571",note:null,date:{day:null,year:null,month:null},category:null},{name:"Batul al-Alim",description:`Qadira
Batul al-Alim is a holiday celebrated on the last Oathday of Calistril in Qadira. It commemorates the birthday of the popular romantic poet of the same name.`,id:"824572",note:null,date:{day:null,year:null,month:1},category:null}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Religious Holidays",id:"religious-holidays",color:"#9b2c2c"},{name:"Secular Holidays",id:"secular-holidays",color:"#0D47A1"},{name:"Historical Events",id:"historical-events",color:"#455A64"},{name:"Miscellaneous Events",id:"miscellaneous-events",color:"#0288D1"}]},{name:"Calendar of Galifar",description:"Calendar of the world of Eberron.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!1,weekdays:[{type:"day",name:"Sul",id:"ID_598a7bd9b8b9"},{type:"day",name:"Mol",id:"ID_69088ac8f818"},{type:"day",name:"Zol",id:"ID_a8c85a98f8fa"},{type:"day",name:"Wir",id:"ID_fa4b687aaba9"},{type:"day",name:"Zor",id:"ID_58e9a82a6bc8"},{type:"day",name:"Far",id:"ID_9a18cb889ada"},{type:"day",name:"Sar",id:"ID_3b9bfa38c979"}],months:[{name:"Zarantyr",type:"month",length:28,id:"ID_7a8afb09aa6a"},{name:"Olarune",type:"month",length:28,id:"ID_386b188b2a89"},{name:"Therendor",type:"month",length:28,id:"ID_599a0ad859c8"},{name:"Eyre",type:"month",length:28,id:"ID_98a95869e90b"},{name:"Dravago",type:"month",length:28,id:"ID_eb5a194bcbf8"},{name:"Nymm",type:"month",length:28,id:"ID_bb596aa9ca5b"},{name:"Lharvion",type:"month",length:28,id:"ID_fb1bb9dabb88"},{name:"Barrakas",type:"month",length:28,id:"ID_8bcb19c8f90a"},{name:"Rhaan",type:"month",length:28,id:"ID_0a09eb5b7b9b"},{name:"Sypheros",type:"month",length:28,id:"ID_3b98ab1a29e8"},{name:"Aryth",type:"month",length:28,id:"ID_899b59faaba9"},{name:"Vult",type:"month",length:28,id:"ID_8a286b78aac9"}],moons:[{name:"Nymm",cycle:28,offset:-14,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_a8b88988a94a"},{name:"Sypheros",cycle:35,offset:-11,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_5ba80b4b096a"},{name:"Therendor",cycle:42,offset:21,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_c999085a499b"},{name:"Rhaan",cycle:49,offset:9,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_39f91ab8a85a"},{name:"Olarune",cycle:56,offset:27,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_2ada8b99788b"},{name:"Eyre",cycle:63,offset:10,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_49285b79d988"},{name:"Vult",cycle:70,offset:6,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_eaebb94a9acb"},{name:"Zarantyr",cycle:77,offset:31,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_98d86aabcbb9"},{name:"Aryth",cycle:84,offset:41,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_d989b809d97b"},{name:"Dravago",cycle:91,offset:31,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_1a293959eaab"},{name:"Lharvion",cycle:98,offset:34,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_cbf919491a5b"},{name:"Barrakas",cycle:105,offset:-11,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_4a1a2a6b589b"}],leapDays:[],eras:[]},current:{year:998,day:1,month:0},events:[{name:"The Tain Gala - Sharn",description:"The Tain Gala is a notable event held on the first Far of each month in Sharn.",id:"824461",note:null,date:{day:null,year:null,month:null},category:null},{name:"Revelation Day - Blood of Vol",description:"Meditation ceremony for Seekers (also called Ascension Day).",id:"824462",note:null,date:{day:13,year:null,month:0},category:null},{name:"Winter Solstice",description:"The longest night of the year.",id:"824463",note:null,date:{day:14,year:null,month:0},category:null},{name:"Rebirth Eve - The Silver Flame",description:"The Purified new year; a night for spiritual vigil and guarding against evil. ",id:"824464",note:null,date:{day:14,year:null,month:0},category:null},{name:"Crystalfall - Sharn",description:"A day of remembrance; Ice sculptures are created (and destroyed) to commemorate the destruction of the Glass Tower on 9 Olarune in 918 by abjurers. ",id:"824465",note:null,date:{day:9,year:998,month:1},category:null},{name:"Bright Souls' Day - The Silver Flame",description:"On this day each year, the Purified celebrate the lives and sacrifice of all followers of the Flame who died while fighting evil and protecting the faithful. ",id:"824466",note:null,date:{day:18,year:null,month:1},category:null},{name:"The Day of Mourning - Sharn",description:"In commemoration of the destruction of the nation of Cyre, those who survived gather to remember the loss of their kingdom on this date in the year 994. ",id:"824467",note:null,date:{day:20,year:995,month:1},category:null},{name:"Tirasday - The Silver Flame",description:"On this day, the Silver Flame work, give gifts, and partake in joyous celebration out of thankfulness for the new planting season and the birth of Tira Miron - the Voice of the Silver Flame.",id:"824468",note:null,date:{day:5,year:null,month:2},category:null},{name:"Sun's Blessing - The Sovereign Host",description:"The Sovereign Host enjoys this festival of peace, and of setting aside differences, in the name of Dol Arrah.",id:"824469",note:null,date:{day:15,year:null,month:2},category:null},{name:"Initiation Day - The Silver Flame",description:"Seminary graduations and breaking grounds for new churches are common on this day as the Silver Flame recalls their declarations of independent faith and the construction of their first cathedral on this special day each year. ",id:"824470",note:null,date:{day:11,year:null,month:3},category:null},{name:"Baker's Night - The Silver Flame",description:"An old and misunderstood, yet immensely popular, holiday wherein followers of the Silver Flame gather to share pastries and treats created by bakers within their fold. ",id:"824471",note:null,date:{day:6,year:null,month:4},category:null},{name:"Aureon's Crown - Sharn and The Sovereign Host",description:`The Sovereign Host celebrate knowledge on this day with lectures and sermons.Secular institutions hold graduation and commencement ceremonies on this date, as do the monastic schools of the Silver Flame.In Sharn this has become a common secular holiday, wherein even non-devout members of the Five Nations attend lectures and sermons held by the priests of Aureon on philosophical, historical, and a range of other topics - including discussions on the nature of the gods.
`,id:"824472",note:null,date:{day:26,year:null,month:4},category:null},{name:"Promisetide - The Silver Flame",description:"A controversial holiday outside of the Silver Flame faith, on this day the Purified honor the Silver Flame for the promise of paradise. They also honor (without worship) the Sovereign Host for having created the world, before stepping aside to allow the Flame its rightful place as the last god of Eberron.\xA0 ",id:"824473",note:null,date:{day:28,year:null,month:4},category:null},{name:"Brightblade - Sharn and The Sovereign Host",description:`This Sovereign Host festival, dedicated to Dol Dorn, is marked by gladiatorial and athletic contests.
In Sharn, festival celebrations occur throughout the temple districts with events culminating in a combined contest of champions at the Cornerstone Arena. `,id:"824474",note:null,date:{day:12,year:null,month:5},category:null},{name:"First Dawn - The Silver Flame",description:"On this day in 914, the Church of the Silver Flame officially assumed control of the government of Thrane. On each anniversary, the Purified give thanks for their just rule, while also honoring the memory of King Thalin, whose death paved the way for their governance.",id:"824475",note:null,date:{day:21,year:915,month:5},category:null},{name:"Silvertide - The Silver Flame",description:"Commemoration of both the couatl sacrifice and the entry, thousands of years ago, of the Silver Flame into Eberron mark this highest of holy days. The vast majority of Purified spend this day in prayer and observance.\xA0 ",id:"824476",note:null,date:{day:14,year:null,month:6},category:null},{name:"The Race of Eight Winds - Sharn",description:`Legend tells of King Galifar II's fascination with aerial scouts and cavalry. The evolution of this annual contest took centuries, but has given Sharn an exotic and well anticipated event involving beasts and their riders in a symbiotic quest for glory* over a course that finds them weaving through the spires of the city.
*the winner also receives 500gp and a land grant located elsewhere in Breland.`,id:"824477",note:null,date:{day:21,year:201,month:6},category:null},{name:"The Hunt - Sharn and The Sovereign Host",description:`The Sovereign Host celebrate Balinor with communal hunts of dangerous creatures.
In Sharn, a dangerous beast*, whose transport to the city was arranged by the priests of Balinor, is released into the Depths of the Lower-City. Open to any who would participate (and pay an entry fee in the form of a 5gp donation), the victor must return with the beast's head to receive a 500gp purse, local fame, and the blessing of Balinor.
*often a singular beast, it can be several - which then requires the victor to return with the most skins. `,id:"824478",note:null,date:{day:4,year:null,month:7},category:null},{name:"Victory Day - The Silver Flame",description:"Commemorating the conclusion of the lycanthropic purge (832 YK - 880 YK), on Victory Day the adult faithful of the Silver Flame attend sermons on triumph, defeat, and the somewhat questionable methods utilized by the templars during the purge - while the children of the faithful act out great battles with toy swords. ",id:"824479",note:null,date:{day:9,year:881,month:7},category:null},{name:"Fathen's Fall - Sharn",description:"Honoring the memory of Fathen, a great hero of the Silver Crusade (832 YK - 880 YK), who, in the last days of the purge, was torn apart by wererats on the streets of North Market. Faithful gather on this day at the Shrine of Fathen the Martyr to listen to a sermon from the priest of High Hope. This holiday is often uncomfortable and tense for shifter communities in Sharn. ",id:"824480",note:null,date:{day:25,year:881,month:7},category:null},{name:"Boldrei's Feast - Sharn and The Sovereign Host",description:`A feast of community in the name of Boldrei, extravagant parties are often held on this holiday and it has also become the traditional day for elections.
In Sharn, a great feast is held at the Pavilion of the Host with goods and services donated\xA0 from local merchants, as well as House Ghallanda. Many grand parties, some quite astonishing in their opulence, are hosted by the wealthiest members of varying districts - often in competition with one another for social standing. `,id:"824481",note:null,date:{day:9,year:null,month:8},category:null},{name:"The Ascension - Sharn",description:"Each year on The Ascension, followers reaffirm their faith and give thanks as well as attend blessing ceremonies at temples throughout the city - the grandest of which occurs at the Cathedral of the Cleansing Flame. All of this is to honor the sacrifice of Tira Miron, the Voice of the Flame, without which there would be no Church of the Silver Flame. Contributions to their community on this day are a high priority for the faithful.",id:"824482",note:null,date:{day:1,year:null,month:9},category:null},{name:"Wildnight - Sharn",description:"With the The Fury (the Sovereign of Passion and Madness) reaching the height of her power on this night, people find it difficult to control or restrain their impulses - once the sun sets, public revelry in the streets climbs to joyous or, all too often, dangerous levels, calming only as the sun rises on the following morning. ",id:"824483",note:null,date:{day:18,year:null,month:9},category:null},{name:"Saint Voltros's Day - The Silver Flame",description:"Though one of the least high holy days, it is marked by brief prayers and church services in the honor of the birth of Saint Voltros - the first paladin called to only serve the Silver Flame.",id:"824484",note:null,date:{day:25,year:null,month:9},category:null},{name:"Thronehold - Sharn",description:"On this day in 996, the Treaty of Thronehold was signed, formally ending the Last War. Annual celebratory feasts are held throughout the Five Nations to mark this auspicious and long-awaited event. ",id:"824485",note:null,date:{day:11,year:997,month:10},category:null},{name:"Rampartide - The Silver Flame",description:"In accordance with scripture, on this day the Purified steel themselves against wickedness, both without and within, through repentance and fasting. Children, elderly, and the sick are required only to give up their favorite foods for the day. ",id:"824486",note:null,date:{day:24,year:null,month:10},category:null},{name:"Long Shadows - Sharn",description:"As dark magic dominates over these three days of the Long Shadows, the myth of Sovereign Lord Aureon's stolen shadow is forefront in the minds of the people. Most will spend these days indoors huddled around the warmth of a fire, but those few who worship the dark deity use this time to prey upon the weak and the foolish. ",id:"824487",note:null,date:{day:26,year:null,month:11},category:null},{name:"Khybersef - The Silver Flame",description:`Originally called Khyber's Eve, the Purified spend the night in intense prayer and spiritual vigilance against the, according to scripture, "thinning of the bonds that hold the demon lords in Khyber" between now (the beginning of winter) and the solstice. Quests and crusades often begin on Khybersef. `,id:"824488",note:null,date:{day:27,year:null,month:11},category:null},{name:"Spring Equinox",description:"The spring equinox is when the day and the night are equally as long, and are getting longer.",id:"824489",note:null,date:{day:null,year:null,month:null},category:null},{name:"Summer Solstice",description:" At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824490",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The autumn equinox is when the day and the night are equally as long, and are getting shorter.",id:"824491",note:null,date:{day:null,year:null,month:null},category:null}],id:null,categories:[]},{name:"Barovian Calendar",description:"Calendar of the realm of Barovia, home of Strahd.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!0,weekdays:[{type:"day",name:"Monday",id:"ID_6a183b08c8eb"},{type:"day",name:"Tuesday",id:"ID_892b7b7a5ae9"},{type:"day",name:"Wednesday",id:"ID_6bb98899ba68"},{type:"day",name:"Thursday",id:"ID_4a7b683aea19"},{type:"day",name:"Friday",id:"ID_78690a099b89"},{type:"day",name:"Saturday",id:"ID_ba5b09ba5a89"},{type:"day",name:"Sunday",id:"ID_29b90acaead9"}],months:[{name:"1st Moon",type:"month",length:31,id:"ID_7b4978ab581a"},{name:"2nd Moon",type:"month",length:28,id:"ID_cb99fbb9395b"},{name:"3rd Moon",type:"month",length:31,id:"ID_79881a89cb18"},{name:"4th Moon",type:"month",length:30,id:"ID_5b9a8a397908"},{name:"5th Moon",type:"month",length:31,id:"ID_f8399ab80818"},{name:"6th Moon",type:"month",length:30,id:"ID_3ac84a7bc869"},{name:"7th Moon",type:"month",length:31,id:"ID_e98bc86bc809"},{name:"8th Moon",type:"month",length:31,id:"ID_89ea78ca5988"},{name:"9th Moon",type:"month",length:30,id:"ID_798a3b990a4b"},{name:"10th Moon",type:"month",length:31,id:"ID_3a9999e8eb59"},{name:"11th Moon",type:"month",length:30,id:"ID_db39383b990a"},{name:"12th Moon",type:"month",length:31,id:"ID_1bfa3b180a48"}],moons:[{name:"Moon",cycle:29.530588853,offset:10.24953,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_e98b3a8ab8da"}],leapDays:[{name:"Leap Day",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:400},{ignore:!1,exclusive:!0,interval:100},{ignore:!1,exclusive:!1,interval:4}],offset:0,timespan:1,intercalary:!1,id:"ID_6a28dbb81a48"}],eras:[{name:"Before Christ",format:"Year {{year}} - {{era_name}}",start:{year:-9e3,month:0,day:0},id:"ID_897bba588a98",restart:!1,endsYear:!1,event:!1},{name:"Anno Domini",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1},id:"ID_185ab9b8b95a",restart:!1,endsYear:!1,event:!1}]},current:{year:735,day:1,month:0},events:[{name:"Winter Solstice",description:"The Winter Solstice is the day of the year with the least time between sunrise and sunset. Many western cultures consider it the official start of winter.",id:"824455",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Summer Solstice",description:`The Summer Solstice is the day of the year with the most time between
sunrise and sunset. Many western cultures consider it the official start
of summer.`,id:"824456",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Spring Equinox",description:`The Spring Equinox,
also called the Vernal Equinox, is the day between the winter and
summer solstices where the day is the exact same length as the night.
Many western cultures consider it the official start of Spring.
`,id:"824457",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Autumnal Equinox",description:`The Autumnal Equinox,
also called the Fall Equinox, is the midpoint between the summer and
winter solstices, where the day is the exact same length as the night.
Many western cultures consider it the official start of Autumn.
`,id:"824458",note:null,date:{day:null,year:null,month:null},category:null},{name:"New Year's Day",description:"New Year's day marks the start of a new year.",id:"824459",note:null,date:{day:1,year:null,month:null},category:null},{name:"Paschal Full Moon",description:"The first full moon after march 21st, which is considered the fixed date for the spring equinox.",id:"824460",note:null,date:{day:null,year:null,month:null},category:"natural-event"}],id:null,categories:[{name:"Natural Event",id:"natural-event",color:"#9e9d24"}]},{name:"Exandrian Calendar",description:"Calendar of the world of Wildemount.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:2,incrementDay:!1,displayMoons:!0,overflow:!0,weekdays:[{type:"day",name:"Miresen",id:"ID_3b38aaa81bca"},{type:"day",name:"Grissen",id:"ID_da6b19882baa"},{type:"day",name:"Whelsen",id:"ID_a9cae8f88b98"},{type:"day",name:"Conthsen",id:"ID_e87859eb5aaa"},{type:"day",name:"Folsen",id:"ID_59180abbea8a"},{type:"day",name:"Yulisen",id:"ID_98082bd8d8ca"},{type:"day",name:"Da'leysen",id:"ID_da4ba92b299a"}],months:[{name:"Horisal",type:"month",length:29,id:"ID_e89a4ab9995b"},{name:"Misuthar",type:"month",length:30,id:"ID_18b8894bab7b"},{name:"Dualahei",type:"month",length:30,id:"ID_0a9b29f8f8db"},{name:"Thunsheer",type:"month",length:31,id:"ID_6a8a8a5bea5b"},{name:"Unndilar",type:"month",length:28,id:"ID_b8295bdbcafa"},{name:"Brussendar",type:"month",length:31,id:"ID_c92a489bb909"},{name:"Sydenstar",type:"month",length:32,id:"ID_7b48bb1b0a4a"},{name:"Fessuran",type:"month",length:29,id:"ID_289858c97849"},{name:"Quen'pillar",type:"month",length:27,id:"ID_f8abd9a86aa9"},{name:"Cuersaar",type:"month",length:29,id:"ID_7aba59fa2b69"},{name:"Duscar",type:"month",length:32,id:"ID_5819f86b99cb"}],moons:[{name:"Catha",cycle:33,offset:7,faceColor:"#ffffff",shadowColor:"#292b4a",id:"ID_0ab929092b5b"},{name:"Ruidus",cycle:328,offset:80,faceColor:"#ff6161",shadowColor:"#1f1f1f",id:"ID_b9783ac818e9"}],leapDays:[],eras:[{name:"The Founding",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1},id:"ID_cb9baaabab7a",restart:!1,endsYear:!1,event:!1},{name:"Age of Arcanum",format:"Year {{year}} - {{era_name}}",start:{year:-1500,month:0,day:1},id:"ID_499b3ae8c868",restart:!1,endsYear:!1,event:!1},{name:"The Calamity",format:"Year {{year}} - {{era_name}}",start:{year:-665,month:0,day:1},id:"ID_7ac8c9590999",restart:!1,endsYear:!1,event:!1},{name:"Post-Divergence",format:"Year {{year}} P.D.",start:{year:1,month:0,day:1},id:"ID_58aad97ac84b",restart:!1,endsYear:!1,event:!1}]},current:{day:1,month:0,year:836},events:[{name:"Spring Equinox",description:"The spring equinox is when the day and the night are equally as long, and are getting longer.",id:"824430",note:null,date:{day:null,year:null,month:null},category:null},{name:"Summer Solstice",description:" At the summer solstice, the Sun travels the longest path through the sky, and that day therefore has the most daylight.",id:"824431",note:null,date:{day:null,year:null,month:null},category:null},{name:"Autumn Equinox",description:"The autumn equinox is when the day and the night are equally as long, and are getting shorter.",id:"824432",note:null,date:{day:null,year:null,month:null},category:null},{name:"Winter Solstice",description:"The winter solstice marks the shortest day and longest night of the year, when the sun is at its lowest arc in the sky.",id:"824433",note:null,date:{day:null,year:null,month:null},category:null},{name:"New Dawn",description:`The first day of the new year is also the holy day of the Changebringer, as the old year gives way to a new path.
In Tal'Dorei, Emon celebrates New Dawn with a grand midnight feast, which commonly features a short play celebrating the changes witnessed in the past year.
On the Menagerie Coast, people celebrate by having a feast on the shore at dusk to watch the sunset. They feast and discuss their hopes for the new year until the sun rises.`,id:"824434",note:null,date:{day:1,year:null,month:0},category:"religious-holidays"},{name:"Hillsgold",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824435",note:null,date:{day:27,year:null,month:0},category:"secular-holidays"},{name:"Day of Challenging",description:`The holy day of the Stormlord is one of the most raucous holidays in Emon. Thousands of spectators attend the annual Godsbrawl, which is held in the fighting ring within the Temple of the Stormlord. The people root for their deity's favored champion, and there is a fierce (yet friendly) rivalry between the Champion of the Stormlord and the Champion of the Platinum Dragon. The winner earns the title of "Supreme Champion" for an entire year.
The Day of Challenging is one of the most raucous holidays in Port Damali, and thousands of spectators attend the annual Godsbrawl held in the Temple of\xA0Kord to root for their favored deity's champion, particularly the chosen champions of the Storm Lord and the\xA0All-Hammer.\xA0`,id:"824436",note:null,date:{day:7,year:null,month:1},category:"religious-holidays"},{name:"Renewal Festival",description:"Spring begins early in the month of Dualahei, officially starting on the 13th with the Renewal Festival.",id:"824437",note:null,date:{day:13,year:null,month:2},category:"secular-holidays"},{name:"Wild's Grandeur",description:`Though the Archeart is the god of spring, the peak of the spring season is the holy day of the Wildmother.
The people in the southern wilds of Tal'Dorei celebrate the Wildmother's strength by journeying to a place of great natural beauty. This could be the top of a mountainous waterfall, the center of a desert, or even an old and peaceful city park (such as Azalea Street Park in Emon). Though Emon rarely celebrates Wild's Grandeur, the few who do will plant trees in observance of the holiday.
The people of the Menagerie Coast set aside this day to sail for no reason other than the pleasure of observing the natural beauty of their surroundings. Those who still partake in elements of Ki'Nau culture take this day to appreciate the fruits and foods granted by the sea, leaving offerings of delicacies and small handmade crafts at temporary altars of twisted roots and grasses.`,id:"824438",note:null,date:{day:20,year:null,month:2},category:"religious-holidays"},{name:"Harvest's Rise",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824439",note:null,date:{day:11,year:null,month:3},category:"secular-holidays"},{name:"Merryfrond's Day",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824440",note:null,date:{day:31,year:null,month:3},category:"secular-holidays"},{name:"Deep Solace",description:`Moradin's holy day is Deep Solace, which is celebrated on the eighteenth day of the fifth month. Especially devout followers of the All-Hammer spend the day in isolation, meditating on the meaning of family and how they may be better mothers, fathers, siblings, and children.
The dwarven communities across Exandria, such as the ones in Grimgolir and Kraghammer, celebrate with a full day of feasting and drinking.\xA0`,id:"824441",note:null,date:{day:18,year:null,month:4},category:"religious-holidays"},{name:"Zenith",description:"Summer begins in the middle of Unndilar, officially starting at noon on the 26th day known as the Zenith.",id:"824442",note:null,date:{day:26,year:null,month:4},category:"secular-holidays"},{name:"Artisan's Faire",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824443",note:null,date:{day:15,year:null,month:5},category:"secular-holidays"},{name:"Elvendawn",description:`Corellon's holy day is called Elvendawn,
or Midsummer. It is celebrated on the twentieth day
of the sixth month, and commemorates the elves' first
emergence from the Feywild.
In Syngorn, the Elves open small doorways into the Feywild and celebrate alongside the wild fey with uncharacteristic vigor.
Though the Dwendalian
Empire doesn't promote the worship of the Arch Heart,
the elves of Bysaes Tyl quietly celebrate in private by
opening small doors to the Feywild and having a little
more wine than usual.\xA0`,id:"824444",note:null,date:{day:20,year:null,month:5},category:"religious-holidays"},{name:"Highsummer",description:`The holy day of the Dawnfather is the peak of the summer season.
Emon celebrates with an entire week of gift-giving and feasting, ending at midnight on the 21st of Sydenstar (the anniversary of the Battle of the Umbra Hills, where Zan Tal'Dorei dethroned Trist Drassig).
Whitestone (where the Dawnfather is the city's patron god) celebrates with gift-giving and a festival of lights around the Sun Tree. Due to the Briarwood occupation, money is thin, so most Whitestone folk choose to recount the small things they are thankful for, rather than buy gifts.
While other parts of Exandria feast, the Dwendalian
Empire uses this day as an opportunity to enlist more
soldiers in its army. The military holds great feasts and
hands out toy soldiers and other propaganda, encouraging people to enlist and help fight against the evil that
threatens the king.\xA0`,id:"824445",note:null,date:{day:7,year:null,month:6},category:"religious-holidays"},{name:"Morn of Largesse",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824446",note:null,date:{day:14,year:null,month:6},category:"secular-holidays"},{name:"Harvest's Close",description:"Autumn begins on the 3rd of Fessuran\xA0and is typically celebrated with feasting in rural regions and with carnivals in the cities.\xA0",id:"824447",note:null,date:{day:3,year:null,month:7},category:"secular-holidays"},{name:"The Hazel Festival",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824448",note:null,date:{day:12,year:null,month:8},category:"secular-holidays"},{name:"Civilization's Dawn",description:`The Law Bearer's holy day is Civilization's
Dawn, which is celebrated on the autumnal equinox,
usually the twenty-second day of the ninth month.
Emon celebrates with a great bonfire in the square of each neighborhood, around which each community dances and gives gifts.
In the
Dwendalian Empire, people celebrate by having feasts
in honor of the laws of the Dwendal bloodline. One seat
at every table is left open for the king, who eats in spirit
with the people he rules.\xA0`,id:"824449",note:null,date:{day:22,year:null,month:8},category:"religious-holidays"},{name:"Night of Ascension",description:`The Raven Queen's holy day is called the Night of Ascension, celebrating her apotheosis. The actual date of the her rise to divinity is unclear, but the Night of Ascension is celebrated on the thirteenth day of the tenth month.
Though most in Emon see this celebration of the dead as unnerving and macabre, the followers of the Matron of Ravens believe that the honored dead would prefer to be venerated with cheer, not misery.
What was once a night of cheery celebration of the dead in the Dwendalian Empire has recently become an occasion to burn effigies and decry the Kryn Dynasty for their unnatural relationship with death.`,id:"824450",note:null,date:{day:13,year:null,month:9},category:"religious-holidays"},{name:"Zan's Cup",description:"This holiday is up to the calendar owner to decide what it is for! :)",id:"824451",note:null,date:{day:21,year:null,month:9},category:"secular-holidays"},{name:"Barren Eve",description:"Winter begins on the 2nd day of Duscar, the Barren Eve, which is a nighttime celebration and remembrance of those who fell in battle.",id:"824452",note:null,date:{day:2,year:null,month:10},category:"secular-holidays"},{name:"Embertide",description:"Bahamut's holy day is called Embertide,\xA0and is celebrated on the fifth day of Duscar. This is a day\xA0of remembrance, solemnity, and respect for those who\xA0have fallen in the defense of others.",id:"824453",note:null,date:{day:5,year:null,month:10},category:"religious-holidays"},{name:"Winter's Crest",description:`This day celebrates the freedom of Tal'Dorei from Errevon the Rimelord. It is the peak of the winter season, so devout followers of the Matron of Ravens (as the goddess of winter) consider it to be one of her holy days.
However, in most of the land, people see Winter's Crest as a secular holiday, often celebrated with omnipresent music in public areas, lavish gift-giving to relatives and loved ones, and the cutting and decorating of trees placed indoors. The Sun Tree in Whitestone is often decorated with lights and other baubles for Winter's Crest.`,id:"824454",note:null,date:{day:20,year:null,month:10},category:"secular-holidays"}],id:null,categories:[{name:"Religious Holidays",id:"religious-holidays",color:"#0D47A1"},{name:"Secular Holidays",id:"secular-holidays",color:"#4A148C"}]},{name:"Calendar of Harptos",description:"Calendar of Faer\xFBn of the Forgotten Realms.",autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!1,timelineTag:"#timeline",static:{displayDayNumber:!1,firstWeekDay:0,incrementDay:!1,displayMoons:!0,overflow:!1,weekdays:[{type:"day",name:"I",id:"ID_9999882bb94a"},{type:"day",name:"II",id:"ID_8a0b4b79d888"},{type:"day",name:"III",id:"ID_da483aca8bf9"},{type:"day",name:"IV",id:"ID_a8fbea39cac8"},{type:"day",name:"V",id:"ID_9b19d9787b0b"},{type:"day",name:"VI",id:"ID_382a590a8a28"},{type:"day",name:"VII",id:"ID_fbca0ab80afb"},{type:"day",name:"VIII",id:"ID_ca093bca5ad9"},{type:"day",name:"IX",id:"ID_d95b39098bf8"},{type:"day",name:"X",id:"ID_389bfb5858db"}],months:[{name:"Hammer (Deepwinter)",type:"month",length:30,id:"ID_cbeb4b190b6a"},{name:"Midwinter",type:"intercalary",length:1,id:"ID_89bad9089b7b"},{name:"Alturiak (The Claw of Winter)",type:"month",length:30,id:"ID_6a08a8aacb7b"},{name:"Ches (The Claw of the Sunsets)",type:"month",length:30,id:"ID_db2a7bf97afa"},{name:"Tarsakh (The Claw of Storms)",type:"month",length:30,id:"ID_6b48982b0bda"},{name:"Greengrass",type:"intercalary",length:1,id:"ID_08790af92809"},{name:"Mirtul (The Melting)",type:"month",length:30,id:"ID_b91b39f95a28"},{name:"Kythorn (The Time of Flowers)",type:"month",length:30,id:"ID_f8e9585a2bf8"},{name:"Flamerule (Summertide)",type:"month",length:30,id:"ID_fa895bdb38e9"},{name:"Midsummer",type:"intercalary",length:1,id:"ID_a9181b5a683a"},{name:"Eleasis (Highsun)",type:"month",length:30,id:"ID_1b1b1b287b0a"},{name:"Eleint (The Fading)",type:"month",length:30,id:"ID_1aca5918993a"},{name:"Highharvestide",type:"intercalary",length:1,id:"ID_a94a183b4b88"},{name:"Marpenoth (Leaffall)",type:"month",length:30,id:"ID_58d97969eb79"},{name:"Uktar (The Rotting)",type:"month",length:30,id:"ID_4b090b787b18"},{name:"The Feast of the Moon",type:"intercalary",length:1,id:"ID_1b0ae8dbdb4a"},{name:"Nightal (The Drawing Down)",type:"month",length:30,id:"ID_abb82afab80a"}],moons:[{name:"Sel\xFAne",cycle:30.4375,offset:13.9,faceColor:"#ffffff",shadowColor:"#000000",id:"ID_48ea2a69a888"}],leapDays:[{name:"Shieldsmeet",type:"leapday",interval:[{ignore:!1,exclusive:!1,interval:4}],offset:0,timespan:9,intercalary:!1,id:"ID_5b08faa88ada"}],eras:[]},current:{year:1491,day:1,month:0},events:[{name:"Winter Solstice",description:null,id:"824588",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Vernal Equinox",description:null,id:"824589",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Summer Solstice",description:null,id:"824590",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Autumnal Equinox",description:null,id:"824591",note:null,date:{day:null,year:null,month:null},category:"natural-events"},{name:"Shieldmeet",description:`Shieldmeet was the equivalent of a leap year day in the Calendar of Harptos, occurring once every four years, adding a day after the festival of Midsummer and before Eleasis 1. Traditionally the day was used for fairs, bazaars, musical and theatrical performances, and tournaments of skill and magical ability. Nobles usually held court to hear the petitions of their people and to make or renew trade pacts, alliances, and agreements. Shieldmeet was known as Cinnaelos'Cor (also seen as Cinnaeloscor), "the Day of Corellon's Peace" in elvish and marked the end of an aeloulaev and the beginning of a new one in the elven Aryselmalyn calendar.`,id:"824592",note:null,date:{day:2,year:null,month:9},category:"festivals"},{name:"Feast of the Moon",description:`The Feast of the Moon, or Moonfest, was an annual festival in the Calendar of Harptos, occurring between the final night of Uktar and the first day of Nightal. It was the last great festival of the calendar year.
The day traditionally marked the onset of winter. It was also a time to celebrate and honor the ancestors and the respected dead. On this day, folk blessed their ancestors' graves and performed the Ritual of Remembrance. People also gathered to tell stories of the deeds of their ancestors and of the gods until deep into the night, until they merged and became legend. This was a time to hear of past heroes, great treasures, and lost cities.
In Faer\xC3\u0192\xC2\xBBn, battles were typically fought between harvest-time and the coming of winter. This meant that most of the fighting usually occurred in the month of Uktar. The timing of the Feast of the Moon\xC3\xA2\xE2\u201A\xAC\xE2\u20ACafter recently slain soldiers had joined the ranks of the dead\xC3\xA2\xE2\u201A\xAC\xE2\u20ACwas thus practical, if sadly ironic.
The Heralds of Faer\xC3\u0192\xC2\xBBn had a number of special duties on the Feast of the Moon. Prime among these was to perform the Bloodsong ceremony, at which a Herald publicly recited the genealogies of each noble family in the area. In this way, the Heralds reaffirmed a noble family's traditional authority and status, as well as the respect accorded to them.
Priests of a number of deities of various pantheons held rites, ceremonies, and festivals on the Feast of the Moon. Many, though not all, focused on remembering the dead in one way or another.`,id:"824593",note:null,date:{day:1,year:null,month:15},category:"festivals"},{name:"Highharvesttide",description:`Highharvestide was an annual festival in the Calendar of Harptos, taking place between 30 Eleint and 1 Marpenoth. It was traditionally a feast to celebrate the harvest and the abundance of food, but also the time when those wishing to travel left on their journeys before winter set in.
Preparations for the feast started as early as a tenday before, while preparing, cooking, and preserving the harvest for the cold winter months. Traditions varied from community to community, but examples of festive activity included food-related contests; races and challenges of skill and strength; receiving homemade sweets from the local clergy; and priests blessing larders, wine cellars, grain bins, and food preserves.
This day was often an important anniversary to various governments. Often, taxes and tithes came due, rulers held "open courts" to hear the concerns of their citizens, oaths were publicly renewed, troops received marching orders to new duty stations, and guilds met to confer on prices and rate changes for goods and services.
According to tradition, dwarves only drank water and elves drank only dew on this day. However, these traditions began to fade in the 14th and 15th century DR.
It was said that children born on this day were favored by Tymora to have lifelong good luck but be smitten with wanderlust. Another legend was that human females born on this day had control over their reproductive system (i.e., got pregnant only when they wanted to) by force of will alone, and that they could instantly sense when they had been poisoned, either by ingestion or being bitten by a venomous creature for example.`,id:"824594",note:null,date:{day:1,year:null,month:12},category:"festivals"},{name:"Greengrass",description:"Greengrass was a festival to welcome in the first day of spring in the Calendar of Harptos. It occured annually on a special day between Tarsakh 30 and Mirtul 1. Traditionally, the wealthier people brought out flowers to give to the less wealthy, who either wore them or spread them on the ground to encourage the deities to usher in the summer.",id:"824595",note:null,date:{day:1,year:null,month:5},category:"festivals"},{name:"Midwinter",description:`Midwinter (also known as Deadwinter Day) was a festival to mark the midpoint of winter in the Calendar of Harptos. It occured on a special day between Hammer 30 and Alturiak 1. Amongst nobles and monarchs it was known as Midwinter and was traditionally used to make or renew alliances, although the common people called it Deadwinter Day, a reference to the cold and hard times that remained before the spring.
On Midwinter Day the Red Fellowship of the Deity known as the Red Knight observes the Retreat. This solemn ceremony consists of an assembly wherein the clergy discuss the previous year's campaigns. Strategies are discussed, battles analyzed, and the accumulated lore integrated into the church's teachings.
The holiest day of the year for the Church of Shevarash is Midwinter Night, during which the Dark Court Slaughter is remembered. Inductions into the ranks of the clergy occur at this time. Each new cleric screams vows of vengeance into the night air and swears neither to laugh nor smile until the Spider Queen and her followers are no more.`,id:"824596",note:null,date:{day:1,year:null,month:1},category:"festivals"},{name:"Midsummer",description:"Midsummer was a festival that celebrated love and music through feast. It occurred between Flamerule 30 and Eleasis 1 on the Calendar of Harptos. It was a time when love advanced, and it was said the deities themselves took a hand to ensure good weather. If bad weather was experienced on this night it was considered an extremely bad omen. Shieldmeet occurred the day after Midsummer on leap years.",id:"824597",note:null,date:{day:1,year:null,month:9},category:"festivals"}],id:null,categories:[{name:"Natural Events",id:"natural-events",color:"#2E7D32"},{name:"Festivals",id:"festivals",color:"#9b2c2c"}]}];var Fu=Ee(require("obsidian")),lt=class extends Fu.Modal{constructor(e){super(e);this.app=e;this.containerEl.addClass("fantasy-calendar-modal")}};var qo=class extends lt{async onOpen(){await this.display()}async display(){this.containerEl.addClass("fantasy-calendar-choose-preset"),this.contentEl.empty(),this.contentEl.createEl("h3",{text:"Choose a Preset Calendar"});let e=this.contentEl.createDiv("fantasy-calendar-preset-container");for(let a of xu){let r=new ar.ButtonComponent(e).onClick(()=>{this.preset=a,this.display()});this.preset==a&&r.setCta(),r.buttonEl.createDiv({cls:"setting-item-name",text:a.name}),r.buttonEl.createDiv({cls:"setting-item-description",text:a.description})}let n=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new ar.ButtonComponent(n).setButtonText("Apply").onClick(()=>{this.saved=!0,this.preset=(0,Tu.default)(this.preset),this.preset.id=Ze(6),this.close()}).setCta(),new ar.ExtraButtonComponent(n).setIcon("cross").onClick(()=>{this.close()})}};function Jr(t){let e=t-1;return e*e*e+1}function Su(t,{delay:e=0,duration:n=400,easing:a=Jr,x:r=0,y:i=0,opacity:o=0}={}){let l=getComputedStyle(t),s=+l.opacity,c=l.transform==="none"?"":l.transform,u=s*(1-o);return{delay:e,duration:n,easing:a,css:(d,m)=>`
transform: ${c} translate(${(1-d)*r}px, ${(1-d)*i}px);
opacity: ${s-u*m}`}}var ka=[];function ty(t,e){return{subscribe:pn(t,e).subscribe}}function pn(t,e=Q){let n,a=new Set;function r(l){if(le(t,l)&&(t=l,n)){let s=!ka.length;for(let c of a)c[1](),ka.push(c,t);if(s){for(let c=0;c<ka.length;c+=2)ka[c][0](ka[c+1]);ka.length=0}}}function i(l){r(l(t))}function o(l,s=Q){let c=[l,s];return a.add(c),a.size===1&&(n=e(r)||Q),l(t),()=>{a.delete(c),a.size===0&&(n(),n=null)}}return{set:r,update:i,subscribe:o}}function et(t,e,n){let a=!Array.isArray(t),r=a?[t]:t,i=e.length<2;return ty(n,o=>{let l=!1,s=[],c=0,u=Q,d=()=>{if(c)return;u();let v=e(a?s[0]:s,o);i?o(v):u=ot(v)?v:Q},m=r.map((v,h)=>ko(v,y=>{s[h]=y,c&=~(1<<h),l&&d()},()=>{c|=1<<h}));return l=!0,d(),function(){we(m),u()}})}var Bu=Ee(require("obsidian"));function gn(t){(0,Bu.setIcon)(t,"fantasy-calendar-warning")}function Nu(t){let e=[];if(t.name?.length||e.push("A calendar must have a name."),(!Da(t.current.day,t)||!_a(t.current.month,t)||!Ca(t.current.year,t))&&e.push("Specified current date is not valid."),!t.static.weekdays?.length)e.push("A calendar must have at least 1 weekday.");else{if(!t.static.weekdays?.every(n=>n.name?.length)){let n=t.static.weekdays?.filter(a=>!a.name?.length).length;n==1?e.push(`${n} weekday does not have a name.`):e.push(`${n} weekdays do not have names.`)}t.static.firstWeekDay>=(t.static.weekdays?.length??1/0)&&e.push(`Invalid first weekday selection: ${t.static.weekdays[t.static.firstWeekDay]}`)}if(!t.static.months?.length)e.push("A calendar must have at least 1 month.");else{if(!t.static.months?.every(n=>n.name?.length)){let n=t.static.months?.filter(a=>!a.name?.length).length;n==1?e.push(`${n} month does not have a name.`):e.push(`${n} months do not have names.`)}if(!t.static.months?.every(n=>n.length>0)){let n=t.static.months?.filter(a=>!(a.length>0)).length;n==1?e.push(`${n} month does not have a length.`):e.push(`${n} months do not have lengths.`)}}if(t.static.useCustomYears){if(!t.static.years?.length)e.push("Use Custom Years is on but no years have been created.");else if(!t.static.years.every(n=>n.name?.length)){let n=t.static.years.filter(a=>!a.name?.length).length;n==1?e.push(`${n} year does not have a name.`):e.push(`${n} years do not have names.`)}}return e.join(`
`)}function Ro(t,e){if(t==null)return"No day specified";if(e?.current?.month==null)return"No month selected";if(t<1||t>e?.static?.months[e.current?.month]?.length||!e?.static?.months[e.current?.month]?.length)return"Day does not exist in selected month"}function Lo(t,e){if(t==null)return"No month specified";if(!e?.static?.months?.length)return"No months exist";if(t<0||t>=e?.static?.months?.length)return"Selected month does not exist"}function Po(t,e){if(t==null)return"No year specified";if(t<1&&!e.static?.useCustomYears)return"Years start at 1";if(e?.static?.useCustomYears){if(!e?.static?.years?.length)return"No custom years exist";if(t<0||t>=e?.static?.years?.length)return"Year does not exist in custom years"}}function ny(t){be(t,"svelte-1p943ki",".fantasy-calendar-date-field-container.fantasy-calendar-date-field-container.svelte-1p943ki.svelte-1p943ki{display:flex;flex-direction:row;gap:1rem;border:0}.fantasy-calendar-date-field.svelte-1p943ki.svelte-1p943ki{display:grid;grid-auto-rows:1fr;flex:1 1 0;gap:0.5rem}.fantasy-calendar-date-field.svelte-1p943ki .setting-item-description.svelte-1p943ki{padding-top:0}.fantasy-calendar-date-field.svelte-1p943ki .invalid.svelte-1p943ki{border:1px solid var(--text-error)}.warning-container.svelte-1p943ki.svelte-1p943ki{position:relative;display:grid;align-items:center;gap:0.25rem;grid-template-columns:1fr auto}")}function Mu(t,e,n){let a=t.slice();return a[18]=e[n],a[20]=n,a}function Iu(t,e,n){let a=t.slice();return a[21]=e[n],a[20]=n,a}function Ou(t){let e,n,a,r,i,o,l=!t[0]&&qu(t);return{c(){e=B("div"),a=W(),r=B("div"),l&&l.c(),D(r,"class","setting-item-description svelte-1p943ki")},m(s,c){R(s,e,c),R(s,a,c),R(s,r,c),l&&l.m(r,null),i||(o=ue(n=gn.call(null,e)),i=!0)},p(s,c){s[0]?l&&(l.d(1),l=null):l?l.p(s,c):(l=qu(s),l.c(),l.m(r,null))},d(s){s&&q(e),s&&q(a),s&&q(r),l&&l.d(),i=!1,o()}}}function qu(t){let e=Ro(t[1].day,t[2])+"",n;return{c(){n=fe(e)},m(a,r){R(a,n,r)},p(a,r){r&6&&e!==(e=Ro(a[1].day,a[2])+"")&&ge(n,e)},d(a){a&&q(n)}}}function Ru(t){let e,n,a,r,i,o,l=!t[3]&&Lu(t);return{c(){e=B("div"),a=W(),r=B("div"),l&&l.c(),D(r,"class","setting-item-description svelte-1p943ki")},m(s,c){R(s,e,c),R(s,a,c),R(s,r,c),l&&l.m(r,null),i||(o=ue(n=gn.call(null,e)),i=!0)},p(s,c){s[3]?l&&(l.d(1),l=null):l?l.p(s,c):(l=Lu(s),l.c(),l.m(r,null))},d(s){s&&q(e),s&&q(a),s&&q(r),l&&l.d(),i=!1,o()}}}function Lu(t){let e=Lo(t[1].month,t[2])+"",n;return{c(){n=fe(e)},m(a,r){R(a,n,r)},p(a,r){r&6&&e!==(e=Lo(a[1].month,a[2])+"")&&ge(n,e)},d(a){a&&q(n)}}}function Pu(t){let e,n=t[21].name+"",a,r;return{c(){e=B("option"),a=fe(n),e.__value=r=t[20],e.value=e.__value},m(i,o){R(i,e,o),C(e,a)},p(i,o){o&16&&n!==(n=i[21].name+"")&&ge(a,n)},d(i){i&&q(e)}}}function ju(t){let e,n,a,r,i,o,l=!t[5]&&Vu(t);return{c(){e=B("div"),a=W(),r=B("div"),l&&l.c(),D(r,"class","setting-item-description svelte-1p943ki")},m(s,c){R(s,e,c),R(s,a,c),R(s,r,c),l&&l.m(r,null),i||(o=ue(n=gn.call(null,e)),i=!0)},p(s,c){s[5]?l&&(l.d(1),l=null):l?l.p(s,c):(l=Vu(s),l.c(),l.m(r,null))},d(s){s&&q(e),s&&q(a),s&&q(r),l&&l.d(),i=!1,o()}}}function Vu(t){let e=Po(t[1].year,t[2])+"",n;return{c(){n=fe(e)},m(a,r){R(a,n,r)},p(a,r){r&6&&e!==(e=Po(a[1].year,a[2])+"")&&ge(n,e)},d(a){a&&q(n)}}}function ay(t){let e,n,a;return{c(){e=B("input"),D(e,"type","number"),D(e,"spellcheck","false"),D(e,"placeholder","Year"),D(e,"class","svelte-1p943ki"),me(e,"invalid",!t[5])},m(r,i){R(r,e,i),Dt(e,t[1].year),n||(a=re(e,"input",t[17]),n=!0)},p(r,i){i&2&&ln(e.value)!==r[1].year&&Dt(e,r[1].year),i&32&&me(e,"invalid",!r[5])},d(r){r&&q(e),n=!1,a()}}}function ry(t){let e,n,a,r=t[6]?.filter(Gu),i=[];for(let o=0;o<r.length;o+=1)i[o]=Hu(Mu(t,r,o));return{c(){e=B("select");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","dropdown svelte-1p943ki"),t[1].year===void 0&&It(()=>t[16].call(e)),me(e,"invalid",!t[5])},m(o,l){R(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);Mt(e,t[1].year),n||(a=re(e,"change",t[16]),n=!0)},p(o,l){if(l&64){r=o[6]?.filter(Gu);let s;for(s=0;s<r.length;s+=1){let c=Mu(o,r,s);i[s]?i[s].p(c,l):(i[s]=Hu(c),i[s].c(),i[s].m(e,null))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}l&2&&Mt(e,o[1].year),l&32&&me(e,"invalid",!o[5])},d(o){o&&q(e),Ge(i,o),n=!1,a()}}}function Hu(t){let e,n=t[18].name+"",a,r;return{c(){e=B("option"),a=fe(n),e.__value=r=t[20]+1,e.value=e.__value},m(i,o){R(i,e,o),C(e,a)},p(i,o){o&64&&n!==(n=i[18].name+"")&&ge(a,n)},d(i){i&&q(e)}}}function iy(t){let e,n,a,r,i,o,l,s,c,u,d,m,v,h,y,p,S,_,A,L,k,E,w=!t[0]&&Ou(t),N=!t[3]&&Ru(t),F=t[4].filter(Wu),j=[];for(let $=0;$<F.length;$+=1)j[$]=Pu(Iu(t,F,$));let x=!t[5]&&ju(t);function T($,ee){return $[2].static.useCustomYears?ry:ay}let I=T(t,-1),U=I(t);return{c(){e=B("div"),n=B("div"),a=B("div"),r=B("label"),r.textContent="Day",i=W(),w&&w.c(),o=W(),l=B("input"),s=W(),c=B("div"),u=B("div"),d=B("label"),d.textContent="Month",m=W(),N&&N.c(),v=W(),h=B("select");for(let $=0;$<j.length;$+=1)j[$].c();y=W(),p=B("div"),S=B("div"),_=B("label"),_.textContent="Year",A=W(),x&&x.c(),L=W(),U.c(),D(r,"for",""),D(a,"class","warning-container svelte-1p943ki"),D(l,"type","number"),D(l,"spellcheck","false"),D(l,"placeholder","Day"),D(l,"class","svelte-1p943ki"),me(l,"invalid",!t[0]),D(n,"class","fantasy-calendar-date-field svelte-1p943ki"),D(d,"for",""),D(u,"class","warning-container svelte-1p943ki"),D(h,"class","dropdown svelte-1p943ki"),t[1].month===void 0&&It(()=>t[15].call(h)),me(h,"invalid",!t[3]),D(c,"class","fantasy-calendar-date-field svelte-1p943ki"),D(_,"for",""),D(S,"class","warning-container svelte-1p943ki"),D(p,"class","fantasy-calendar-date-field svelte-1p943ki"),D(e,"class","fantasy-calendar-date-field-container setting-item svelte-1p943ki")},m($,ee){R($,e,ee),C(e,n),C(n,a),C(a,r),C(a,i),w&&w.m(a,null),C(n,o),C(n,l),Dt(l,t[1].day),C(e,s),C(e,c),C(c,u),C(u,d),C(u,m),N&&N.m(u,null),C(c,v),C(c,h);for(let Z=0;Z<j.length;Z+=1)j[Z].m(h,null);Mt(h,t[1].month),C(e,y),C(e,p),C(p,S),C(S,_),C(S,A),x&&x.m(S,null),C(p,L),U.m(p,null),k||(E=[re(l,"input",t[14]),re(h,"change",t[15])],k=!0)},p($,[ee]){if($[0]?w&&(w.d(1),w=null):w?w.p($,ee):(w=Ou($),w.c(),w.m(a,null)),ee&2&&ln(l.value)!==$[1].day&&Dt(l,$[1].day),ee&1&&me(l,"invalid",!$[0]),$[3]?N&&(N.d(1),N=null):N?N.p($,ee):(N=Ru($),N.c(),N.m(u,null)),ee&16){F=$[4].filter(Wu);let Z;for(Z=0;Z<F.length;Z+=1){let K=Iu($,F,Z);j[Z]?j[Z].p(K,ee):(j[Z]=Pu(K),j[Z].c(),j[Z].m(h,null))}for(;Z<j.length;Z+=1)j[Z].d(1);j.length=F.length}ee&2&&Mt(h,$[1].month),ee&8&&me(h,"invalid",!$[3]),$[5]?x&&(x.d(1),x=null):x?x.p($,ee):(x=ju($),x.c(),x.m(S,null)),I===(I=T($,ee))&&U?U.p($,ee):(U.d(1),U=I($),U&&(U.c(),U.m(p,null)))},i:Q,o:Q,d($){$&&q(e),w&&w.d(),N&&N.d(),Ge(j,$),x&&x.d(),U.d(),k=!1,we(E)}}}var Wu=t=>t.name,Gu=t=>t.name;function oy(t,e,n){let a,r,i,o,l,s,c,u=Ne("store");Fe(t,u,k=>n(2,i=k));let{monthStore:d,validDay:m,validMonth:v,validYear:h,yearStore:y,currentStore:p}=u;Fe(t,d,k=>n(4,l=k)),Fe(t,m,k=>n(0,a=k)),Fe(t,v,k=>n(3,o=k)),Fe(t,h,k=>n(5,s=k)),Fe(t,y,k=>n(6,c=k)),Fe(t,p,k=>n(1,r=k));function S(){r.day=ln(this.value),p.set(r)}function _(){r.month=mn(this),p.set(r)}function A(){r.year=mn(this),p.set(r)}function L(){r.year=ln(this.value),p.set(r)}return[a,r,i,o,l,s,c,u,d,m,v,h,y,p,S,_,A,L]}var Uu=class extends de{constructor(e){super();he(this,e,oy,iy,le,{},ny)}},zu=Uu;var ei=Ee(require("obsidian"));function sy(t){be(t,"svelte-13g7dwb",'.fantasy-calendar-nested-settings.svelte-13g7dwb.svelte-13g7dwb{position:relative}.warning-label-container.svelte-13g7dwb.svelte-13g7dwb{display:flex;justify-content:flex-end;position:absolute;right:0}.warning-label.svelte-13g7dwb.svelte-13g7dwb{color:var(--text-error)}.fantasy-calendar-nested-summary.svelte-13g7dwb.svelte-13g7dwb{outline:none;display:block !important;list-style:none !important;list-style-type:none !important;min-height:1rem;border-top-left-radius:0.1rem;border-top-right-radius:0.1rem;cursor:pointer;position:sticky;top:0;z-index:2;background-color:var(--creator-background-color)}summary.svelte-13g7dwb.svelte-13g7dwb::-webkit-details-marker,summary.svelte-13g7dwb.svelte-13g7dwb::marker{display:none !important}.collapser.svelte-13g7dwb.svelte-13g7dwb{position:absolute;top:50%;right:8px;transform:translateY(-50%);content:""}.handle.svelte-13g7dwb.svelte-13g7dwb{transform:rotate(0deg);transition:transform 0.25s;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-image:var(--admonition-details-icon);mask-image:var(--admonition-details-icon);width:20px;height:20px}details[open].svelte-13g7dwb .handle.svelte-13g7dwb{transform:rotate(90deg)}')}function Yu(t){let e,n,a,r;return{c(){e=B("div")},m(i,o){R(i,e,o),a||(r=ue(n=gn.call(null,e)),a=!0)},d(i){i&&q(e),a=!1,r()}}}function $u(t){let e,n,a;return{c(){e=B("div"),n=B("div"),a=fe(t[3]),D(n,"class","setting-item-description warning-label svelte-13g7dwb"),D(e,"class","warning-label-container svelte-13g7dwb")},m(r,i){R(r,e,i),C(e,n),C(n,a)},p(r,i){i&8&&ge(a,r[3])},d(r){r&&q(e)}}}function ly(t){let e,n,a,r,i,o,l,s,c,u,d,m,v,h,y,p,S,_,A,L,k=t[2]&&Yu(t),E=t[2]&&t[3]&&$u(t),w=t[7].default,N=Gr(w,t,t[6],null);return{c(){e=B("details"),n=B("summary"),a=B("div"),r=B("div"),i=B("div"),o=fe(t[0]),l=W(),s=B("div"),c=fe(t[1]),u=W(),d=B("div"),m=B("div"),k&&k.c(),v=W(),h=B("div"),y=W(),E&&E.c(),p=W(),N&&N.c(),D(i,"class","setting-item-name"),D(s,"class","setting-item-description"),D(r,"class","setting-item-info"),D(a,"class","setting-item setting-item-heading"),D(h,"class","handle svelte-13g7dwb"),D(m,"class","warning-container"),D(d,"class","collapser svelte-13g7dwb"),D(n,"class","fantasy-calendar-nested-summary svelte-13g7dwb"),D(e,"class","fantasy-calendar-nested-settings svelte-13g7dwb")},m(F,j){R(F,e,j),C(e,n),C(n,a),C(a,r),C(r,i),C(i,o),C(r,l),C(r,s),C(s,c),C(n,u),C(n,d),C(d,m),k&&k.m(m,null),C(m,v),C(m,h),C(e,y),E&&E.m(e,null),C(e,p),N&&N.m(e,null),_=!0,A||(L=ue(S=t[4].call(null,e)),A=!0)},p(F,[j]){(!_||j&1)&&ge(o,F[0]),(!_||j&2)&&ge(c,F[1]),F[2]?k||(k=Yu(F),k.c(),k.m(m,v)):k&&(k.d(1),k=null),F[2]&&F[3]?E?E.p(F,j):(E=$u(F),E.c(),E.m(e,p)):E&&(E.d(1),E=null),N&&N.p&&(!_||j&64)&&zr(N,w,F,F[6],_?Ur(w,F[6],j,null):Yr(F[6]),null)},i(F){_||(P(N,F),_=!0)},o(F){G(N,F),_=!1},d(F){F&&q(e),k&&k.d(),E&&E.d(),N&&N.d(F),A=!1,L()}}}function uy(t,e,n){let{$$slots:a={},$$scope:r}=e,{open:i=!ei.Platform.isMobile}=e,{name:o}=e,{desc:l=""}=e,{warn:s=!1}=e,{label:c=null}=e,u=m=>{i&&m.setAttr("open","open")},d=m=>{new ei.Setting(m).setHeading().setName(o)};return t.$$set=m=>{"open"in m&&n(5,i=m.open),"name"in m&&n(0,o=m.name),"desc"in m&&n(1,l=m.desc),"warn"in m&&n(2,s=m.warn),"label"in m&&n(3,c=m.label),"$$scope"in m&&n(6,r=m.$$scope)},[o,l,s,c,u,i,r,a]}var Zu=class extends de{constructor(e){super();he(this,e,uy,ly,le,{open:5,name:0,desc:1,warn:2,label:3},sy)}},ct=Zu;function cy(t){let e,n;return e=new zu({}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function dy(t){let e,n;return e=new ct({props:{name:"Current Date",warn:!t[0],label:"Invalid current date specified",desc:t[1],open:!1,$$slots:{default:[cy]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,[r]){let i={};r&1&&(i.warn=!a[0]),r&2&&(i.desc=a[1]),r&512&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function fy(t,e,n){let a,r,i,o,l=Ne("store");Fe(t,l,m=>n(5,r=m));let{validDate:s,currentStore:c,monthStore:u,yearStore:d}=l;return Fe(t,s,m=>n(0,o=m)),Fe(t,c,m=>n(6,i=m)),t.$$.update=()=>{if(t.$$.dirty&97){e:n(1,a=o?Kt(i,r):"Invalid date")}},[o,a,l,s,c,r,i]}var Ku=class extends de{constructor(e){super();he(this,e,fy,dy,le,{})}},jo=Ku;var yn=Ee(require("obsidian"));var vc=Ee(require("obsidian"));var li=Ee(require("obsidian"));var dt="top",yt="bottom",mt="right",pt="left",ti="auto",In=[dt,yt,mt,pt],Cn="start",Xn="end",Qu="clippingParents",ni="viewport",xa="popper",Xu="reference",Vo=In.reduce(function(t,e){return t.concat([e+"-"+Cn,e+"-"+Xn])},[]),ai=[].concat(In,[ti]).reduce(function(t,e){return t.concat([e,e+"-"+Cn,e+"-"+Xn])},[]),hy="beforeRead",my="read",py="afterRead",gy="beforeMain",yy="main",vy="afterMain",by="beforeWrite",wy="write",Dy="afterWrite",Ju=[hy,my,py,gy,yy,vy,by,wy,Dy];function _t(t){return t?(t.nodeName||"").toLowerCase():null}function ft(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function En(t){var e=ft(t).Element;return t instanceof e||t instanceof Element}function Ct(t){var e=ft(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function ri(t){if(typeof ShadowRoot=="undefined")return!1;var e=ft(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function _y(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var a=e.styles[n]||{},r=e.attributes[n]||{},i=e.elements[n];!Ct(i)||!_t(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(o){var l=r[o];l===!1?i.removeAttribute(o):i.setAttribute(o,l===!0?"":l)}))})}function Cy(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(a){var r=e.elements[a],i=e.attributes[a]||{},o=Object.keys(e.styles.hasOwnProperty(a)?e.styles[a]:n[a]),l=o.reduce(function(s,c){return s[c]="",s},{});!Ct(r)||!_t(r)||(Object.assign(r.style,l),Object.keys(i).forEach(function(s){r.removeAttribute(s)}))})}}var ec={name:"applyStyles",enabled:!0,phase:"write",fn:_y,effect:Cy,requires:["computeStyles"]};function Et(t){return t.split("-")[0]}function en(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),a=1,r=1;return{width:n.width/a,height:n.height/r,top:n.top/r,right:n.right/a,bottom:n.bottom/r,left:n.left/a,x:n.left/a,y:n.top/r}}function Jn(t){var e=en(t),n=t.offsetWidth,a=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-a)<=1&&(a=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:a}}function rr(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&ri(n)){var a=e;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Pt(t){return ft(t).getComputedStyle(t)}function Ho(t){return["table","td","th"].indexOf(_t(t))>=0}function Ft(t){return((En(t)?t.ownerDocument:t.document)||window.document).documentElement}function An(t){return _t(t)==="html"?t:t.assignedSlot||t.parentNode||(ri(t)?t.host:null)||Ft(t)}function tc(t){return!Ct(t)||Pt(t).position==="fixed"?null:t.offsetParent}function Ey(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Ct(t)){var a=Pt(t);if(a.position==="fixed")return null}for(var r=An(t);Ct(r)&&["html","body"].indexOf(_t(r))<0;){var i=Pt(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function un(t){for(var e=ft(t),n=tc(t);n&&Ho(n)&&Pt(n).position==="static";)n=tc(n);return n&&(_t(n)==="html"||_t(n)==="body"&&Pt(n).position==="static")?e:n||Ey(t)||e}function ea(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var tn=Math.max,On=Math.min,ir=Math.round;function ta(t,e,n){return tn(t,On(e,n))}function or(){return{top:0,right:0,bottom:0,left:0}}function sr(t){return Object.assign({},or(),t)}function lr(t,e){return e.reduce(function(n,a){return n[a]=t,n},{})}var Ay=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,sr(typeof e!="number"?e:lr(e,In))};function ky(t){var e,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,l=Et(n.placement),s=ea(l),c=[pt,mt].indexOf(l)>=0,u=c?"height":"width";if(!(!i||!o)){var d=Ay(r.padding,n),m=Jn(i),v=s==="y"?dt:pt,h=s==="y"?yt:mt,y=n.rects.reference[u]+n.rects.reference[s]-o[s]-n.rects.popper[u],p=o[s]-n.rects.reference[s],S=un(i),_=S?s==="y"?S.clientHeight||0:S.clientWidth||0:0,A=y/2-p/2,L=d[v],k=_-m[u]-d[h],E=_/2-m[u]/2+A,w=ta(L,E,k),N=s;n.modifiersData[a]=(e={},e[N]=w,e.centerOffset=w-E,e)}}function xy(t){var e=t.state,n=t.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||!rr(e.elements.popper,r)||(e.elements.arrow=r))}var nc={name:"arrow",enabled:!0,phase:"main",fn:ky,effect:xy,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function nn(t){return t.split("-")[1]}var Fy={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ty(t){var e=t.x,n=t.y,a=window,r=a.devicePixelRatio||1;return{x:ir(ir(e*r)/r)||0,y:ir(ir(n*r)/r)||0}}function ac(t){var e,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,o=t.offsets,l=t.position,s=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=u===!0?Ty(o):typeof u=="function"?u(o):o,m=d.x,v=m===void 0?0:m,h=d.y,y=h===void 0?0:h,p=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),_=pt,A=dt,L=window;if(c){var k=un(n),E="clientHeight",w="clientWidth";k===ft(n)&&(k=Ft(n),Pt(k).position!=="static"&&l==="absolute"&&(E="scrollHeight",w="scrollWidth")),k=k,(r===dt||(r===pt||r===mt)&&i===Xn)&&(A=yt,y-=k[E]-a.height,y*=s?1:-1),(r===pt||(r===dt||r===yt)&&i===Xn)&&(_=mt,v-=k[w]-a.width,v*=s?1:-1)}var N=Object.assign({position:l},c&&Fy);if(s){var F;return Object.assign({},N,(F={},F[A]=S?"0":"",F[_]=p?"0":"",F.transform=(L.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",F))}return Object.assign({},N,(e={},e[A]=S?y+"px":"",e[_]=p?v+"px":"",e.transform="",e))}function Sy(t){var e=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,o=i===void 0?!0:i,l=n.roundOffsets,s=l===void 0?!0:l;if(!1)var c;var u={placement:Et(e.placement),variation:nn(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ac(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:s})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ac(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var rc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Sy,data:{}};var ii={passive:!0};function By(t){var e=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,o=a.resize,l=o===void 0?!0:o,s=ft(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,ii)}),l&&s.addEventListener("resize",n.update,ii),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ii)}),l&&s.removeEventListener("resize",n.update,ii)}}var ic={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:By,data:{}};var Ny={left:"right",right:"left",bottom:"top",top:"bottom"};function Fa(t){return t.replace(/left|right|bottom|top/g,function(e){return Ny[e]})}var My={start:"end",end:"start"};function oi(t){return t.replace(/start|end/g,function(e){return My[e]})}function na(t){var e=ft(t),n=e.pageXOffset,a=e.pageYOffset;return{scrollLeft:n,scrollTop:a}}function aa(t){return en(Ft(t)).left+na(t).scrollLeft}function Wo(t){var e=ft(t),n=Ft(t),a=e.visualViewport,r=n.clientWidth,i=n.clientHeight,o=0,l=0;return a&&(r=a.width,i=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=a.offsetLeft,l=a.offsetTop)),{width:r,height:i,x:o+aa(t),y:l}}function Go(t){var e,n=Ft(t),a=na(t),r=(e=t.ownerDocument)==null?void 0:e.body,i=tn(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=tn(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-a.scrollLeft+aa(t),s=-a.scrollTop;return Pt(r||n).direction==="rtl"&&(l+=tn(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:o,x:l,y:s}}function ra(t){var e=Pt(t),n=e.overflow,a=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function si(t){return["html","body","#document"].indexOf(_t(t))>=0?t.ownerDocument.body:Ct(t)&&ra(t)?t:si(An(t))}function qn(t,e){var n;e===void 0&&(e=[]);var a=si(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=ft(a),o=r?[i].concat(i.visualViewport||[],ra(a)?a:[]):a,l=e.concat(o);return r?l:l.concat(qn(An(o)))}function Ta(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Iy(t){var e=en(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function oc(t,e){return e===ni?Ta(Wo(t)):Ct(e)?Iy(e):Ta(Go(Ft(t)))}function Oy(t){var e=qn(An(t)),n=["absolute","fixed"].indexOf(Pt(t).position)>=0,a=n&&Ct(t)?un(t):t;return En(a)?e.filter(function(r){return En(r)&&rr(r,a)&&_t(r)!=="body"}):[]}function Uo(t,e,n){var a=e==="clippingParents"?Oy(t):[].concat(e),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(l,s){var c=oc(t,s);return l.top=tn(c.top,l.top),l.right=On(c.right,l.right),l.bottom=On(c.bottom,l.bottom),l.left=tn(c.left,l.left),l},oc(t,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function ur(t){var e=t.reference,n=t.element,a=t.placement,r=a?Et(a):null,i=a?nn(a):null,o=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,s;switch(r){case dt:s={x:o,y:e.y-n.height};break;case yt:s={x:o,y:e.y+e.height};break;case mt:s={x:e.x+e.width,y:l};break;case pt:s={x:e.x-n.width,y:l};break;default:s={x:e.x,y:e.y}}var c=r?ea(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Cn:s[c]=s[c]-(e[u]/2-n[u]/2);break;case Xn:s[c]=s[c]+(e[u]/2-n[u]/2);break;default:}}return s}function cn(t,e){e===void 0&&(e={});var n=e,a=n.placement,r=a===void 0?t.placement:a,i=n.boundary,o=i===void 0?Qu:i,l=n.rootBoundary,s=l===void 0?ni:l,c=n.elementContext,u=c===void 0?xa:c,d=n.altBoundary,m=d===void 0?!1:d,v=n.padding,h=v===void 0?0:v,y=sr(typeof h!="number"?h:lr(h,In)),p=u===xa?Xu:xa,S=t.rects.popper,_=t.elements[m?p:u],A=Uo(En(_)?_:_.contextElement||Ft(t.elements.popper),o,s),L=en(t.elements.reference),k=ur({reference:L,element:S,strategy:"absolute",placement:r}),E=Ta(Object.assign({},S,k)),w=u===xa?E:L,N={top:A.top-w.top+y.top,bottom:w.bottom-A.bottom+y.bottom,left:A.left-w.left+y.left,right:w.right-A.right+y.right},F=t.modifiersData.offset;if(u===xa&&F){var j=F[r];Object.keys(N).forEach(function(x){var T=[mt,yt].indexOf(x)>=0?1:-1,I=[dt,yt].indexOf(x)>=0?"y":"x";N[x]+=j[I]*T})}return N}function zo(t,e){e===void 0&&(e={});var n=e,a=n.placement,r=n.boundary,i=n.rootBoundary,o=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?ai:s,u=nn(a),d=u?l?Vo:Vo.filter(function(h){return nn(h)===u}):In,m=d.filter(function(h){return c.indexOf(h)>=0});m.length===0&&(m=d);var v=m.reduce(function(h,y){return h[y]=cn(t,{placement:y,boundary:r,rootBoundary:i,padding:o})[Et(y)],h},{});return Object.keys(v).sort(function(h,y){return v[h]-v[y]})}function qy(t){if(Et(t)===ti)return[];var e=Fa(t);return[oi(t),e,oi(e)]}function Ry(t){var e=t.state,n=t.options,a=t.name;if(!e.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,l=o===void 0?!0:o,s=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,h=v===void 0?!0:v,y=n.allowedAutoPlacements,p=e.options.placement,S=Et(p),_=S===p,A=s||(_||!h?[Fa(p)]:qy(p)),L=[p].concat(A).reduce(function(st,je){return st.concat(Et(je)===ti?zo(e,{placement:je,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:y}):je)},[]),k=e.rects.reference,E=e.rects.popper,w=new Map,N=!0,F=L[0],j=0;j<L.length;j++){var x=L[j],T=Et(x),I=nn(x)===Cn,U=[dt,yt].indexOf(T)>=0,$=U?"width":"height",ee=cn(e,{placement:x,boundary:u,rootBoundary:d,altBoundary:m,padding:c}),Z=U?I?mt:pt:I?yt:dt;k[$]>E[$]&&(Z=Fa(Z));var K=Fa(Z),ve=[];if(i&&ve.push(ee[T]<=0),l&&ve.push(ee[Z]<=0,ee[K]<=0),ve.every(function(st){return st})){F=x,N=!1;break}w.set(x,ve)}if(N)for(var xe=h?3:1,Ae=function(je){var wt=L.find(function(Nt){var Je=w.get(Nt);if(Je)return Je.slice(0,je).every(function(Te){return Te})});if(wt)return F=wt,"break"},Oe=xe;Oe>0;Oe--){var He=Ae(Oe);if(He==="break")break}e.placement!==F&&(e.modifiersData[a]._skip=!0,e.placement=F,e.reset=!0)}}var sc={name:"flip",enabled:!0,phase:"main",fn:Ry,requiresIfExists:["offset"],data:{_skip:!1}};function lc(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function uc(t){return[dt,mt,yt,pt].some(function(e){return t[e]>=0})}function Ly(t){var e=t.state,n=t.name,a=e.rects.reference,r=e.rects.popper,i=e.modifiersData.preventOverflow,o=cn(e,{elementContext:"reference"}),l=cn(e,{altBoundary:!0}),s=lc(o,a),c=lc(l,r,i),u=uc(s),d=uc(c);e.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var cc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ly};function Py(t,e,n){var a=Et(t),r=[pt,dt].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=i[0],l=i[1];return o=o||0,l=(l||0)*r,[pt,mt].indexOf(a)>=0?{x:l,y:o}:{x:o,y:l}}function jy(t){var e=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,o=ai.reduce(function(u,d){return u[d]=Py(d,e.rects,i),u},{}),l=o[e.placement],s=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=s,e.modifiersData.popperOffsets.y+=c),e.modifiersData[a]=o}var dc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jy};function Vy(t){var e=t.state,n=t.name;e.modifiersData[n]=ur({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var fc={name:"popperOffsets",enabled:!0,phase:"read",fn:Vy,data:{}};function Yo(t){return t==="x"?"y":"x"}function Hy(t){var e=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,l=o===void 0?!1:o,s=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,m=n.tether,v=m===void 0?!0:m,h=n.tetherOffset,y=h===void 0?0:h,p=cn(e,{boundary:s,rootBoundary:c,padding:d,altBoundary:u}),S=Et(e.placement),_=nn(e.placement),A=!_,L=ea(S),k=Yo(L),E=e.modifiersData.popperOffsets,w=e.rects.reference,N=e.rects.popper,F=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,j={x:0,y:0};if(!!E){if(i||l){var x=L==="y"?dt:pt,T=L==="y"?yt:mt,I=L==="y"?"height":"width",U=E[L],$=E[L]+p[x],ee=E[L]-p[T],Z=v?-N[I]/2:0,K=_===Cn?w[I]:N[I],ve=_===Cn?-N[I]:-w[I],xe=e.elements.arrow,Ae=v&&xe?Jn(xe):{width:0,height:0},Oe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:or(),He=Oe[x],st=Oe[T],je=ta(0,w[I],Ae[I]),wt=A?w[I]/2-Z-je-He-F:K-je-He-F,Nt=A?-w[I]/2+Z+je+st+F:ve+je+st+F,Je=e.elements.arrow&&un(e.elements.arrow),Te=Je?L==="y"?Je.clientTop||0:Je.clientLeft||0:0,tt=e.modifiersData.offset?e.modifiersData.offset[e.placement][L]:0,Yt=E[L]+wt-tt-Te,$t=E[L]+Nt-tt;if(i){var Rt=ta(v?On($,Yt):$,U,v?tn(ee,$t):ee);E[L]=Rt,j[L]=Rt-U}if(l){var Ht=L==="x"?dt:pt,wn=L==="x"?yt:mt,Dn=E[k],Gn=Dn+p[Ht],ha=Dn-p[wn],ma=ta(v?On(Gn,Yt):Gn,Dn,v?tn(ha,$t):ha);E[k]=ma,j[k]=ma-Dn}}e.modifiersData[a]=j}}var hc={name:"preventOverflow",enabled:!0,phase:"main",fn:Hy,requiresIfExists:["offset"]};function $o(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Zo(t){return t===ft(t)||!Ct(t)?na(t):$o(t)}function Wy(t){var e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,a=e.height/t.offsetHeight||1;return n!==1||a!==1}function Ko(t,e,n){n===void 0&&(n=!1);var a=Ct(e),r=Ct(e)&&Wy(e),i=Ft(e),o=en(t,r),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&((_t(e)!=="body"||ra(i))&&(l=Zo(e)),Ct(e)?(s=en(e,!0),s.x+=e.clientLeft,s.y+=e.clientTop):i&&(s.x=aa(i))),{x:o.left+l.scrollLeft-s.x,y:o.top+l.scrollTop-s.y,width:o.width,height:o.height}}function Gy(t){var e=new Map,n=new Set,a=[];t.forEach(function(i){e.set(i.name,i)});function r(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var s=e.get(l);s&&r(s)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function Qo(t){var e=Gy(t);return Ju.reduce(function(n,a){return n.concat(e.filter(function(r){return r.phase===a}))},[])}function Xo(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Jo(t){var e=t.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(e).map(function(n){return e[n]})}var mc={placement:"bottom",modifiers:[],strategy:"absolute"};function pc(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function gc(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,a=n===void 0?[]:n,r=e.defaultOptions,i=r===void 0?mc:r;return function(l,s,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},mc,i),modifiersData:{},elements:{reference:l,popper:s},attributes:{},styles:{}},d=[],m=!1,v={state:u,setOptions:function(S){var _=typeof S=="function"?S(u.options):S;y(),u.options=Object.assign({},i,u.options,_),u.scrollParents={reference:En(l)?qn(l):l.contextElement?qn(l.contextElement):[],popper:qn(s)};var A=Qo(Jo([].concat(a,u.options.modifiers)));if(u.orderedModifiers=A.filter(function(x){return x.enabled}),!1){var L;if(getBasePlacement(u.options.placement)===auto)var k;var E,w,N,F,j}return h(),v.update()},forceUpdate:function(){if(!m){var S=u.elements,_=S.reference,A=S.popper;if(!!pc(_,A)){u.rects={reference:Ko(_,un(A),u.options.strategy==="fixed"),popper:Jn(A)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(x){return u.modifiersData[x.name]=Object.assign({},x.data)});for(var L=0,k=0;k<u.orderedModifiers.length;k++){if(u.reset===!0){u.reset=!1,k=-1;continue}var E=u.orderedModifiers[k],w=E.fn,N=E.options,F=N===void 0?{}:N,j=E.name;typeof w=="function"&&(u=w({state:u,options:F,name:j,instance:v})||u)}}}},update:Xo(function(){return new Promise(function(p){v.forceUpdate(),p(u)})}),destroy:function(){y(),m=!0}};if(!pc(l,s))return v;v.setOptions(c).then(function(p){!m&&c.onFirstUpdate&&c.onFirstUpdate(p)});function h(){u.orderedModifiers.forEach(function(p){var S=p.name,_=p.options,A=_===void 0?{}:_,L=p.effect;if(typeof L=="function"){var k=L({state:u,name:S,instance:v,options:A}),E=function(){};d.push(k||E)}})}function y(){d.forEach(function(p){return p()}),d=[]}return v}}var Uy=[ic,fc,rc,ec,dc,sc,hc,nc,cc],es=gc({defaultModifiers:Uy});var yc=class{constructor(e,n,a){this.containerEl=n,this.owner=e,n.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),n.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),a.register([],"ArrowUp",()=>(this.setSelectedItem(this.selectedItem-1,!0),!1)),a.register([],"ArrowDown",()=>(this.setSelectedItem(this.selectedItem+1,!0),!1)),a.register([],"Enter",r=>(this.useSelectedItem(r),!1)),a.register([],"Tab",r=>(this.chooseSuggestion(r),!1))}chooseSuggestion(e){if(!this.items||!this.items.length)return;let n=this.items[this.selectedItem];n&&this.owner.onChooseSuggestion(n,e)}onSuggestionClick(e,n){if(e.preventDefault(),!this.suggestions||!this.suggestions.length)return;let a=this.suggestions.indexOf(n);this.setSelectedItem(a,!1),this.useSelectedItem(e)}onSuggestionMouseover(e,n){if(!this.suggestions||!this.suggestions.length)return;let a=this.suggestions.indexOf(n);this.setSelectedItem(a,!1)}empty(){this.containerEl.empty()}setSuggestions(e){this.containerEl.empty();let n=[];e.forEach(a=>{let r=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(a,r),n.push(r)}),this.items=e,this.suggestions=n,this.setSelectedItem(0,!1)}useSelectedItem(e){if(!this.items||!this.items.length)return;let n=this.items[this.selectedItem];n&&this.owner.selectSuggestion(n,e)}wrap(e,n){return(e%n+n)%n}setSelectedItem(e,n){let a=this.wrap(e,this.suggestions.length),r=this.suggestions[this.selectedItem],i=this.suggestions[a];r&&r.removeClass("is-selected"),i&&i.addClass("is-selected"),this.selectedItem=a,n&&i.scrollIntoView(!1)}},cr=class extends li.FuzzySuggestModal{constructor(e,n,a){super(e);this.items=[];this.scope=new li.Scope;this.emptyStateText="No match found";this.limit=100;this.inputEl=n,this.items=a,this.suggestEl=createDiv("suggestion-container"),this.contentEl=this.suggestEl.createDiv("suggestion"),this.suggester=new yc(this,this.contentEl,this.scope),this.scope.register([],"Escape",this.onEscape.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onFocus.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",r=>{r.preventDefault()})}empty(){this.suggester.empty()}onInputChanged(){if(this.shouldNotOpen)return;let e=this.modifyInput(this.inputEl.value),n=this.getSuggestions(e);n.length>0?this.suggester.setSuggestions(n.slice(0,this.limit)):this.onNoSuggestion(),this.open()}onFocus(){this.shouldNotOpen=!1,this.onInputChanged()}modifyInput(e){return e}onNoSuggestion(){this.empty(),this.renderSuggestion(null,this.contentEl.createDiv("suggestion-item"))}open(){this.app.keymap.pushScope(this.scope),document.body.appendChild(this.suggestEl),this.popper=es(this.inputEl,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"flip",options:{fallbackPlacements:["top"]}}]})}onEscape(){this.close(),this.shouldNotOpen=!0}close(){this.app.keymap.popScope(this.scope),this.suggester.setSuggestions([]),this.popper&&this.popper.destroy(),this.suggestEl.detach()}createPrompt(e){this.promptEl||(this.promptEl=this.suggestEl.createDiv("prompt-instructions"));let n=this.promptEl.createDiv("prompt-instruction");for(let a of e)n.appendChild(a)}};var dr=class extends cr{constructor(e,n,a){super(e,n.inputEl,a);this.folders=[...a],this.text=n,this.inputEl.addEventListener("input",()=>this.getFolder())}getFolder(){let e=this.inputEl.value,n=this.app.vault.getAbstractFileByPath(e);n!=this.folder&&n instanceof vc.TFolder&&(this.folder=n,this.onInputChanged())}getItemText(e){return e.path}onChooseItem(e){this.text.setValue(e.path),this.folder=e}selectSuggestion({item:e}){let n=e.path;this.text.setValue(n),this.onClose(),this.close()}renderSuggestion(e,n){let{item:a,match:r}=e||{},i=n.createDiv({cls:"suggestion-content"});if(!a){i.setText(this.emptyStateText),i.parentElement.addClass("is-selected");return}let o=a.path.length-a.name.length,l=r.matches.map(s=>createSpan("suggestion-highlight"));for(let s=o;s<a.path.length;s++){let c=r.matches.find(u=>u[0]===s);if(c){let u=l[r.matches.indexOf(c)];i.appendChild(u),u.appendText(a.path.substring(c[0],c[1])),s+=c[1]-c[0]-1;continue}i.appendText(a.path[s])}n.createDiv({cls:"suggestion-note",text:a.path})}getItems(){return this.folders}};function zy(t){be(t,"svelte-1ezzfh1",".text-area-component.svelte-1ezzfh1{display:flex;flex-flow:column nowrap;align-items:flex-start;width:100%}textarea.svelte-1ezzfh1{width:100%}")}function Yy(t){let e,n,a,r,i,o,l;return{c(){e=B("div"),n=B("label"),a=fe(t[1]),r=W(),i=B("textarea"),D(i,"spellcheck","false"),D(i,"placeholder",t[2]),D(i,"class","svelte-1ezzfh1"),D(e,"class","text-area-component setting-item svelte-1ezzfh1"),me(e,"cls",t[3])},m(s,c){R(s,e,c),C(e,n),C(n,a),C(e,r),C(e,i),Dt(i,t[0]),o||(l=[re(i,"input",t[5]),re(i,"blur",t[6])],o=!0)},p(s,[c]){c&2&&ge(a,s[1]),c&4&&D(i,"placeholder",s[2]),c&1&&Dt(i,s[0]),c&8&&me(e,"cls",s[3])},i:Q,o:Q,d(s){s&&q(e),o=!1,we(l)}}}function $y(t,e,n){let a=Ve(),{value:r}=e,{name:i}=e,{placeholder:o=i}=e,{cls:l=""}=e;function s(){r=this.value,n(0,r)}let c=()=>a("blur",r);return t.$$set=u=>{"value"in u&&n(0,r=u.value),"name"in u&&n(1,i=u.name),"placeholder"in u&&n(2,o=u.placeholder),"cls"in u&&n(3,l=u.cls)},[r,i,o,l,a,s,c]}var bc=class extends de{constructor(e){super();he(this,e,$y,Yy,le,{value:0,name:1,placeholder:2,cls:3},zy)}},wc=bc;function Zy(t){be(t,"svelte-9iftg2","input.warn.svelte-9iftg2{border-color:var(--text-error)}")}function Dc(t){let e;function n(i,o){return typeof i[4]=="string"?Qy:Ky}let a=n(t,-1),r=a(t);return{c(){r.c(),e=Ue()},m(i,o){r.m(i,o),R(i,e,o)},p(i,o){a===(a=n(i,o))&&r?r.p(i,o):(r.d(1),r=a(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){r.d(i),i&&q(e)}}}function Ky(t){let e,n,a,r;return{c(){e=B("div"),D(e,"class","setting-item-description")},m(i,o){R(i,e,o),a||(r=ue(n=t[7].call(null,e)),a=!0)},p:Q,d(i){i&&q(e),a=!1,r()}}}function Qy(t){let e,n;return{c(){e=B("div"),n=fe(t[4]),D(e,"class","setting-item-description")},m(a,r){R(a,e,r),C(e,n)},p(a,r){r&16&&ge(n,a[4])},d(a){a&&q(e)}}}function _c(t){let e,n,a,r;return{c(){e=B("div")},m(i,o){R(i,e,o),a||(r=ue(n=gn.call(null,e)),a=!0)},d(i){i&&q(e),a=!1,r()}}}function Xy(t){let e,n,a;return{c(){e=B("input"),D(e,"type","number"),D(e,"spellcheck","false"),D(e,"placeholder",t[5]),D(e,"class","svelte-9iftg2"),me(e,"warn",t[2])},m(r,i){R(r,e,i),Dt(e,t[0]),n||(a=[re(e,"input",t[13]),re(e,"input",t[14]),re(e,"blur",t[15])],n=!0)},p(r,i){i&32&&D(e,"placeholder",r[5]),i&1&&ln(e.value)!==r[0]&&Dt(e,r[0]),i&4&&me(e,"warn",r[2])},d(r){r&&q(e),n=!1,we(a)}}}function Jy(t){let e,n,a;return{c(){e=B("input"),D(e,"type","text"),D(e,"spellcheck","false"),D(e,"placeholder",t[5]),D(e,"class","svelte-9iftg2"),me(e,"warn",t[2])},m(r,i){R(r,e,i),Dt(e,t[0]),n||(a=[re(e,"input",t[10]),re(e,"input",t[11]),re(e,"blur",t[12])],n=!0)},p(r,i){i&32&&D(e,"placeholder",r[5]),i&1&&e.value!==r[0]&&Dt(e,r[0]),i&4&&me(e,"warn",r[2])},d(r){r&&q(e),n=!1,we(a)}}}function ev(t){let e,n,a=t[2]&&_c(t);function r(l,s){if(l[3]=="text")return Jy;if(l[3]=="number")return Xy}let i=r(t,-1),o=i&&i(t);return{c(){a&&a.c(),e=W(),o&&o.c(),n=Ue()},m(l,s){a&&a.m(l,s),R(l,e,s),o&&o.m(l,s),R(l,n,s)},p(l,s){l[2]?a||(a=_c(l),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),i===(i=r(l,s))&&o?o.p(l,s):(o&&o.d(1),o=i&&i(l),o&&(o.c(),o.m(n.parentNode,n)))},d(l){a&&a.d(l),l&&q(e),o&&o.d(l),l&&q(n)}}}function tv(t){let e,n,a,r,i,o,l,s,c,u=t[4]&&Dc(t),d=t[9].default,m=Gr(d,t,t[8],null),v=m||ev(t);return{c(){e=B("div"),n=B("div"),a=B("div"),r=fe(t[1]),i=W(),u&&u.c(),o=W(),l=B("div"),s=B("div"),v&&v.c(),D(a,"class","setting-item-name"),D(n,"class","setting-item-info"),D(s,"class","warning-container"),D(l,"class","setting-item-control"),D(e,"class","setting-item")},m(h,y){R(h,e,y),C(e,n),C(n,a),C(a,r),C(n,i),u&&u.m(n,null),C(e,o),C(e,l),C(l,s),v&&v.m(s,null),c=!0},p(h,[y]){(!c||y&2)&&ge(r,h[1]),h[4]?u?u.p(h,y):(u=Dc(h),u.c(),u.m(n,null)):u&&(u.d(1),u=null),m?m.p&&(!c||y&256)&&zr(m,d,h,h[8],c?Ur(d,h[8],y,null):Yr(h[8]),null):v&&v.p&&(!c||y&45)&&v.p(h,c?y:-1)},i(h){c||(P(v,h),c=!0)},o(h){G(v,h),c=!1},d(h){h&&q(e),u&&u.d(),v&&v.d(h)}}}function nv(t,e,n){let{$$slots:a={},$$scope:r}=e,i=Ve(),{value:o}=e,{name:l}=e,{warn:s=!1}=e,{type:c="text"}=e,{desc:u}=e,{placeholder:d=l}=e,m=A=>{A.append(u.cloneNode(!0))};function v(){o=this.value,n(0,o)}let h=()=>i("change",o),y=()=>{i("blur",o)};function p(){o=ln(this.value),n(0,o)}let S=()=>i("change",o),_=()=>{i("blur",o)};return t.$$set=A=>{"value"in A&&n(0,o=A.value),"name"in A&&n(1,l=A.name),"warn"in A&&n(2,s=A.warn),"type"in A&&n(3,c=A.type),"desc"in A&&n(4,u=A.desc),"placeholder"in A&&n(5,d=A.placeholder),"$$scope"in A&&n(8,r=A.$$scope)},[o,l,s,c,u,d,i,m,r,a,v,h,y,p,S,_]}var Cc=class extends de{constructor(e){super();he(this,e,nv,tv,le,{value:0,name:1,warn:2,type:3,desc:4,placeholder:5},Zy)}},kn=Cc;function Ec(t){let e;function n(i,o){return typeof i[1]=="string"?rv:av}let a=n(t,-1),r=a(t);return{c(){r.c(),e=Ue()},m(i,o){r.m(i,o),R(i,e,o)},p(i,o){a===(a=n(i,o))&&r?r.p(i,o):(r.d(1),r=a(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){r.d(i),i&&q(e)}}}function av(t){let e,n,a,r;return{c(){e=B("div"),D(e,"class","setting-item-description")},m(i,o){R(i,e,o),a||(r=ue(n=t[4].call(null,e)),a=!0)},p:Q,d(i){i&&q(e),a=!1,r()}}}function rv(t){let e,n;return{c(){e=B("div"),n=fe(t[1]),D(e,"class","setting-item-description")},m(a,r){R(a,e,r),C(e,n)},p(a,r){r&2&&ge(n,a[1])},d(a){a&&q(e)}}}function iv(t){let e,n,a,r,i,o,l,s,c,u,d=t[1]&&Ec(t);return{c(){e=B("div"),n=B("div"),a=B("div"),r=fe(t[0]),i=W(),d&&d.c(),o=W(),l=B("div"),s=B("div"),D(a,"class","setting-item-name"),D(n,"class","setting-item-info"),D(s,"class","checkbox-container"),me(s,"is-disabled",t[3]),me(s,"is-enabled",t[2]),D(l,"class","setting-item-control"),D(e,"class","setting-item mod-toggle")},m(m,v){R(m,e,v),C(e,n),C(n,a),C(a,r),C(n,i),d&&d.m(n,null),C(e,o),C(e,l),C(l,s),c||(u=re(s,"click",t[5]),c=!0)},p(m,[v]){v&1&&ge(r,m[0]),m[1]?d?d.p(m,v):(d=Ec(m),d.c(),d.m(n,null)):d&&(d.d(1),d=null),v&8&&me(s,"is-disabled",m[3]),v&4&&me(s,"is-enabled",m[2])},i:Q,o:Q,d(m){m&&q(e),d&&d.d(),c=!1,u()}}}function ov(t,e,n){let{name:a}=e,{desc:r}=e,{value:i}=e,{disabled:o=!1}=e,l=c=>{c.append(r)};function s(c){ce.call(this,t,c)}return t.$$set=c=>{"name"in c&&n(0,a=c.name),"desc"in c&&n(1,r=c.desc),"value"in c&&n(2,i=c.value),"disabled"in c&&n(3,o=c.disabled)},[a,r,i,o,l,s]}var Ac=class extends de{constructor(e){super();he(this,e,ov,iv,le,{name:0,desc:1,value:2,disabled:3})}},Ot=Ac;function sv(t){be(t,"svelte-1uda69j",".fantasy-calendar-info.svelte-1uda69j .setting-item{padding-top:18px}.fantasy-calendar-info.svelte-1uda69j .fantasy-calendar-description{display:flex;flex-flow:column;align-items:flex-start}.fantasy-calendar-info.svelte-1uda69j .fantasy-calendar-description textarea{width:100%}")}function kc(t){let e,n,a,r,i,o;e=new kn({props:{name:"Events Folder",desc:"The plugin will only parse files in this folder for events.",value:t[0].path,$$slots:{default:[lv]},$$scope:{ctx:t}}}),a=new Ot({props:{name:"Support Timelines Events",desc:t[2],value:t[3]}}),a.$on("click",t[18]);let l=t[3]&&xc(t);return{c(){ne(e.$$.fragment),n=W(),ne(a.$$.fragment),r=W(),l&&l.c(),i=Ue()},m(s,c){te(e,s,c),R(s,n,c),te(a,s,c),R(s,r,c),l&&l.m(s,c),R(s,i,c),o=!0},p(s,c){let u={};c&1&&(u.value=s[0].path),c&524288&&(u.$$scope={dirty:c,ctx:s}),e.$set(u);let d={};c&4&&(d.desc=s[2]),c&8&&(d.value=s[3]),a.$set(d),s[3]?l?(l.p(s,c),c&8&&P(l,1)):(l=xc(s),l.c(),P(l,1),l.m(i.parentNode,i)):l&&(De(),G(l,1,1,()=>{l=null}),_e())},i(s){o||(P(e.$$.fragment,s),P(a.$$.fragment,s),P(l),o=!0)},o(s){G(e.$$.fragment,s),G(a.$$.fragment,s),G(l),o=!1},d(s){J(e,s),s&&q(n),J(a,s),s&&q(r),l&&l.d(s),s&&q(i)}}}function lv(t){let e,n,a,r;return{c(){e=B("div")},m(i,o){R(i,e,o),a||(r=ue(n=t[9].call(null,e)),a=!0)},p:Q,d(i){i&&q(e),a=!1,r()}}}function xc(t){let e=t[0].syncTimelines,n,a,r=Fc(t);return{c(){r.c(),n=Ue()},m(i,o){r.m(i,o),R(i,n,o),a=!0},p(i,o){o&1&&le(e,e=i[0].syncTimelines)?(De(),G(r,1,1,Q),_e(),r=Fc(i),r.c(),P(r,1),r.m(n.parentNode,n)):r.p(i,o)},i(i){a||(P(r),a=!0)},o(i){G(r),a=!1},d(i){i&&q(n),r.d(i)}}}function uv(t){let e,n,a,r;return{c(){e=B("div"),D(e,"class","setting-item-control")},m(i,o){R(i,e,o),a||(r=ue(n=t[10].call(null,e)),a=!0)},p:Q,d(i){i&&q(e),a=!1,r()}}}function Fc(t){let e,n;return e=new kn({props:{name:"Default Timelines Tag",desc:t[1],value:"",$$slots:{default:[uv]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r&2&&(i.desc=a[1]),r&524288&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function cv(t){let e,n,a,r,i,o,l,s,c,u,d,m;n=new kn({props:{name:"Calendar Name",warn:!t[5],desc:t[5]?"":"The calendar must have a name",value:t[0].name}}),n.$on("blur",t[12]),n.$on("change",t[13]),r=new wc({props:{name:"Calendar Description",value:t[0].description}}),r.$on("blur",t[14]),o=new Ot({props:{name:"Display Day Number",desc:"Display day of year in Day View",value:t[7]}}),o.$on("click",t[15]),s=new Ot({props:{name:"Auto Increment Day",desc:"Automatically increment the current day every real-world day.",value:t[6]}}),s.$on("click",t[16]),u=new Ot({props:{name:"Parse Files for Events",desc:"The plugin will automatically parse files in the vault for events.",value:t[4]}}),u.$on("click",t[17]);let v=t[4]&&kc(t);return{c(){e=B("div"),ne(n.$$.fragment),a=W(),ne(r.$$.fragment),i=W(),ne(o.$$.fragment),l=W(),ne(s.$$.fragment),c=W(),ne(u.$$.fragment),d=W(),v&&v.c(),D(e,"class","fantasy-calendar-info svelte-1uda69j")},m(h,y){R(h,e,y),te(n,e,null),C(e,a),te(r,e,null),C(e,i),te(o,e,null),C(e,l),te(s,e,null),C(e,c),te(u,e,null),C(e,d),v&&v.m(e,null),m=!0},p(h,y){let p={};y&32&&(p.warn=!h[5]),y&32&&(p.desc=h[5]?"":"The calendar must have a name"),y&1&&(p.value=h[0].name),n.$set(p);let S={};y&1&&(S.value=h[0].description),r.$set(S);let _={};y&128&&(_.value=h[7]),o.$set(_);let A={};y&64&&(A.value=h[6]),s.$set(A);let L={};y&16&&(L.value=h[4]),u.$set(L),h[4]?v?(v.p(h,y),y&16&&P(v,1)):(v=kc(h),v.c(),P(v,1),v.m(e,null)):v&&(De(),G(v,1,1,()=>{v=null}),_e())},i(h){m||(P(n.$$.fragment,h),P(r.$$.fragment,h),P(o.$$.fragment,h),P(s.$$.fragment,h),P(u.$$.fragment,h),P(v),m=!0)},o(h){G(n.$$.fragment,h),G(r.$$.fragment,h),G(o.$$.fragment,h),G(s.$$.fragment,h),G(u.$$.fragment,h),G(v),m=!1},d(h){h&&q(e),J(n),J(r),J(o),J(s),J(u),v&&v.d()}}}function dv(t){let e,n;return e=new ct({props:{name:"Basic Info",warn:!t[5],label:"The calendar must have a name",$$slots:{default:[cv]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,[r]){let i={};r&32&&(i.warn=!a[5]),r&524543&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function fv(t,e,n){let a,r,i,o,l,s,c,u,{plugin:d}=e,m=Ne("store");Fe(t,m,E=>n(0,u=E)),u.timelineTag||nt(m,u.timelineTag=ia.timelineTag,u);let v=E=>{let w=d.app.vault.getAllLoadedFiles().filter(j=>j instanceof yn.TFolder),N=new yn.TextComponent(E);u.path||nt(m,u.path="/",u),N.setPlaceholder(u.path??"/");let F=new dr(d.app,N,[...w]);F.onClose=async()=>{let j=N.inputEl.value?.trim()?N.inputEl.value.trim():"/";nt(m,u.path=(0,yn.normalizePath)(j),u)},N.inputEl.onblur=async()=>{let j=N.inputEl.value?.trim()?N.inputEl.value.trim():"/";nt(m,u.path=(0,yn.normalizePath)(j),u)}},h=E=>{new yn.TextComponent(E).setValue(`${u.timelineTag??""}`.replace("#","")).setDisabled(u.syncTimelines).onChange(async F=>{nt(m,u.timelineTag=F.startsWith("#")?F:`#${F}`,u),await d.saveSettings()});let N=new yn.ExtraButtonComponent(E);if(!d.canUseTimelines){nt(m,u.syncTimelines=!1,u),N.extraSettingsEl.detach();return}u.syncTimelines?N.setIcon("checkmark").setTooltip("Unsync from Timelines Plugin").onClick(async()=>{nt(m,u.syncTimelines=!1,u),await d.saveSettings()}):N.setIcon("sync").setTooltip("Sync with Timelines Plugin").onClick(async()=>{nt(m,u.syncTimelines=!0,u),nt(m,u.timelineTag=d.app.plugins.getPlugin("obsidian-timelines").settings.timelineTag,u),await d.saveSettings()})},y=E=>{nt(m,u.name=E.detail,u)},p=E=>nt(m,u.name=E.detail,u),S=E=>nt(m,u.description=E.detail,u),_=()=>{nt(m,u.static.displayDayNumber=!u.static.displayDayNumber,u)},A=()=>{nt(m,u.static.incrementDay=!u.static.incrementDay,u)},L=()=>{nt(m,u.autoParse=!u.autoParse,u)},k=()=>{nt(m,u.supportTimelines=!u.supportTimelines,u)};t.$$set=E=>{"plugin"in E&&n(11,d=E.plugin)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(7,a=u.static.displayDayNumber)}if(t.$$.dirty&1){e:n(6,r=u.static.incrementDay)}if(t.$$.dirty&1){e:n(5,i=u.name!=null&&u.name.length)}if(t.$$.dirty&1){e:n(4,o=u.autoParse)}if(t.$$.dirty&1){e:n(3,l=u.supportTimelines)}};e:n(2,s=createFragment(E=>{E.createSpan({text:"Support "}),E.createEl("code",{text:"<span>"}),E.createSpan({text:" elements used by the "}),E.createEl("a",{text:"Obsidian Timelines",href:"obsidian://show-plugin?id=obsidian-timelines"}),E.createSpan({text:" plugin (by Darakah)."})}));e:n(1,c=createFragment(E=>{E.createSpan({text:"Tag to specify which notes to include in created timelines, e.g. "}),E.createEl("code",{text:"timeline"}),E.createSpan({text:" to use the "}),E.createEl("code",{text:"#timeline"}),E.createSpan({text:" tag."})}));return[u,c,s,l,o,i,r,a,m,v,h,d,y,p,S,_,A,L,k]}var Tc=class extends de{constructor(e){super();he(this,e,fv,dv,le,{plugin:11},sv)}},Sc=Tc;function oa(t,{from:e,to:n},a={}){let r=getComputedStyle(t),i=r.transform==="none"?"":r.transform,[o,l]=r.transformOrigin.split(" ").map(parseFloat),s=e.left+e.width*o/n.width-(n.left+o),c=e.top+e.height*l/n.height-(n.top+l),{delay:u=0,duration:d=v=>Math.sqrt(v)*120,easing:m=Jr}=a;return{delay:u,duration:ot(d)?d(Math.sqrt(s*s+c*c)):d,easing:m,css:(v,h)=>{let y=h*s,p=h*c,S=v+h*e.width/n.width,_=v+h*e.height/n.height;return`transform: ${i} translate(${y}px, ${p}px) scale(${S}, ${_});`}}}function fr(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fr=function(e){return typeof e}:fr=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(t)}function hr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function sa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bc(Object(n),!0).forEach(function(a){hr(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bc(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function hv(t,e){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function mv(t,e){if(t==null)return{};var n=hv(t,e),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(e.indexOf(a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,a)||(n[a]=t[a]))}return n}function pv(t,e){return yv(t)||bv(t,e)||ts(t,e)||Dv()}function ui(t){return gv(t)||vv(t)||ts(t)||wv()}function gv(t){if(Array.isArray(t))return ns(t)}function yv(t){if(Array.isArray(t))return t}function vv(t){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(t))return Array.from(t)}function bv(t,e){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(t)))){var n=[],a=!0,r=!1,i=void 0;try{for(var o=t[Symbol.iterator](),l;!(a=(l=o.next()).done)&&(n.push(l.value),!(e&&n.length===e));a=!0);}catch(s){r=!0,i=s}finally{try{!a&&o.return!=null&&o.return()}finally{if(r)throw i}}return n}}function ts(t,e){if(!!t){if(typeof t=="string")return ns(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ns(t,e)}}function ns(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function wv(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function as(t,e){var n;if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=ts(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var a=0,r=function(){};return{s:r,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(s){throw s},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,l;return{s:function(){n=t[Symbol.iterator]()},n:function(){var s=n.next();return i=s.done,s},e:function(s){o=!0,l=s},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw l}}}}var _v="finalize",Cv="consider";function Sa(t,e,n){t.dispatchEvent(new CustomEvent(_v,{detail:{items:e,info:n}}))}function Rn(t,e,n){t.dispatchEvent(new CustomEvent(Cv,{detail:{items:e,info:n}}))}var ci="draggedEntered",mr="draggedLeft",di="draggedOverIndex",rs="draggedLeftDocument",fi={LEFT_FOR_ANOTHER:"leftForAnother",OUTSIDE_OF_ANY:"outsideOfAny"};function Ev(t,e,n){t.dispatchEvent(new CustomEvent(ci,{detail:{indexObj:e,draggedEl:n}}))}function Av(t,e,n){t.dispatchEvent(new CustomEvent(mr,{detail:{draggedEl:e,type:fi.LEFT_FOR_ANOTHER,theOtherDz:n}}))}function kv(t,e){t.dispatchEvent(new CustomEvent(mr,{detail:{draggedEl:e,type:fi.OUTSIDE_OF_ANY}}))}function xv(t,e,n){t.dispatchEvent(new CustomEvent(di,{detail:{indexObj:e,draggedEl:n}}))}function Fv(t){window.dispatchEvent(new CustomEvent(rs,{detail:{draggedEl:t}}))}var ut={DRAG_STARTED:"dragStarted",DRAGGED_ENTERED:ci,DRAGGED_ENTERED_ANOTHER:"dragEnteredAnother",DRAGGED_OVER_INDEX:di,DRAGGED_LEFT:mr,DRAGGED_LEFT_ALL:"draggedLeftAll",DROPPED_INTO_ZONE:"droppedIntoZone",DROPPED_INTO_ANOTHER:"droppedIntoAnother",DROPPED_OUTSIDE_OF_ANY:"droppedOutsideOfAny",DRAG_STOPPED:"dragStopped"},rt={POINTER:"pointer",KEYBOARD:"keyboard"},hi="isDndShadowItem",is="data-is-dnd-shadow-item",os="id:dnd-shadow-placeholder-0000",Tv="dnd-action-dragged-el",At="id",ss=0;function Nc(){ss++}function Mc(){if(ss===0)throw new Error("Bug! trying to decrement when there are no dropzones");ss--}var Sv=typeof window=="undefined",Be=function(){};function Ic(t){var e,n=t.getBoundingClientRect(),a=getComputedStyle(t),r=a.transform;if(r){var i,o,l,s;if(r.startsWith("matrix3d("))e=r.slice(9,-1).split(/, /),i=+e[0],o=+e[5],l=+e[12],s=+e[13];else if(r.startsWith("matrix("))e=r.slice(7,-1).split(/, /),i=+e[0],o=+e[3],l=+e[4],s=+e[5];else return n;var c=a.transformOrigin,u=n.x-l-(1-i)*parseFloat(c),d=n.y-s-(1-o)*parseFloat(c.slice(c.indexOf(" ")+1)),m=i?n.width/i:t.offsetWidth,v=o?n.height/o:t.offsetHeight;return{x:u,y:d,width:m,height:v,top:d,right:u+m,bottom:d+v,left:u}}else return n}function Oc(t){var e=Ic(t);return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function ls(t){var e=t.getBoundingClientRect();return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function qc(t){return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function Bv(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function us(t,e){return t.y<=e.bottom&&t.y>=e.top&&t.x>=e.left&&t.x<=e.right}function pr(t){return qc(ls(t))}function Rc(t,e){var n=pr(t),a=Oc(e);return us(n,a)}function Nv(t,e){var n=pr(t),a=pr(e);return Bv(n,a)}function Mv(t){var e=ls(t);return e.right<0||e.left>document.documentElement.scrollWidth||e.bottom<0||e.top>document.documentElement.scrollHeight}function Iv(t,e){var n=ls(e);return us(t,n)?{top:t.y-n.top,bottom:n.bottom-t.y,left:t.x-n.left,right:Math.min(n.right,document.documentElement.clientWidth)-t.x}:null}var Ba;function Lc(){Be(function(){return"resetting indexes cache"}),Ba=new Map}Lc();function Ov(t){var e=Array.from(t.children).findIndex(function(n){return n.getAttribute(is)});if(e>=0)return Ba.has(t)||Ba.set(t,new Map),Ba.get(t).set(e,Oc(t.children[e])),e}function qv(t,e){if(!Rc(t,e))return null;var n=e.children;if(n.length===0)return{index:0,isProximityBased:!0};for(var a=Ov(e),r=0;r<n.length;r++)if(Rc(t,n[r])){var i=Ba.has(e)&&Ba.get(e).get(r);return i&&!us(pr(t),i)?{index:a,isProximityBased:!1}:{index:r,isProximityBased:!1}}for(var o=Number.MAX_VALUE,l=void 0,s=0;s<n.length;s++){var c=Nv(t,n[s]);c<o&&(o=c,l=s)}return{index:l,isProximityBased:!0}}var gr=25;function Pc(){var t;function e(){t={directionObj:void 0,stepPx:0}}e();function n(i){var o=t,l=o.directionObj,s=o.stepPx;l&&(i.scrollBy(l.x*s,l.y*s),window.requestAnimationFrame(function(){return n(i)}))}function a(i){return gr-i}function r(i,o){if(!o)return!1;var l=Iv(i,o);if(l===null)return e(),!1;var s=!!t.directionObj,c=!1,u=!1;return o.scrollHeight>o.clientHeight&&(l.bottom<gr?(c=!0,t.directionObj={x:0,y:1},t.stepPx=a(l.bottom)):l.top<gr&&(c=!0,t.directionObj={x:0,y:-1},t.stepPx=a(l.top)),!s&&c)||o.scrollWidth>o.clientWidth&&(l.right<gr?(u=!0,t.directionObj={x:1,y:0},t.stepPx=a(l.right)):l.left<gr&&(u=!0,t.directionObj={x:-1,y:0},t.stepPx=a(l.left)),!s&&u)?(n(o),!0):(e(),!1)}return{scrollIfNeeded:r,resetScrolling:e}}function xn(t){return JSON.stringify(t,null,2)}function jc(t){if(!t)throw new Error("cannot get depth of a falsy node");return Vc(t,0)}function Vc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.parentElement?Vc(t.parentElement,e+1):e-1}function Rv(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!{}.hasOwnProperty.call(e,n)||e[n]!==t[n])return!1;return!0}function Lv(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var Pv=200,Hc=10,Wc=Pc(),jv=Wc.scrollIfNeeded,Vv=Wc.resetScrolling,cs;function Hv(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Pv,a,r,i=!1,o,l=Array.from(e).sort(function(c,u){return jc(u)-jc(c)});function s(){var c=pr(t),u=jv(c,a);if(!u&&o&&Math.abs(o.x-c.x)<Hc&&Math.abs(o.y-c.y)<Hc){cs=window.setTimeout(s,n);return}if(Mv(t)){Be(function(){return"off document"}),Fv(t);return}o=c;var d=!1,m=as(l),v;try{for(m.s();!(v=m.n()).done;){var h=v.value,y=qv(t,h);if(y!==null){var p=y.index;d=!0,h!==a?(a&&Av(a,t,h),Ev(h,y,t),a=h):p!==r&&(xv(h,y,t),r=p);break}}}catch(S){m.e(S)}finally{m.f()}!d&&i&&a?(kv(a,t),a=void 0,r=void 0,i=!1):i=!0,cs=window.setTimeout(s,n)}s()}function Wv(){Be(function(){return"unobserving"}),clearTimeout(cs),Vv(),Lc()}var Gv=300,mi;function pi(t){var e=t.touches?t.touches[0]:t;mi={x:e.clientX,y:e.clientY}}var Gc=Pc(),Uv=Gc.scrollIfNeeded,zv=Gc.resetScrolling,Uc;function zc(){mi&&Uv(mi,document.documentElement),Uc=window.setTimeout(zc,Gv)}function Yv(){Be(function(){return"arming window scroller"}),window.addEventListener("mousemove",pi),window.addEventListener("touchmove",pi),zc()}function $v(){Be(function(){return"disarming window scroller"}),window.removeEventListener("mousemove",pi),window.removeEventListener("touchmove",pi),mi=void 0,window.clearTimeout(Uc),zv()}var Zv=.2;function la(t){return"".concat(t," ").concat(Zv,"s ease")}function Kv(t,e){var n=t.getBoundingClientRect(),a=t.cloneNode(!0);Yc(t,a),a.id=Tv,a.style.position="fixed";var r=n.top,i=n.left;if(a.style.top="".concat(r,"px"),a.style.left="".concat(i,"px"),e){var o=qc(n);r-=o.y-e.y,i-=o.x-e.x,window.setTimeout(function(){a.style.top="".concat(r,"px"),a.style.left="".concat(i,"px")},0)}return a.style.margin="0",a.style.boxSizing="border-box",a.style.height="".concat(n.height,"px"),a.style.width="".concat(n.width,"px"),a.style.transition="".concat(la("top"),", ").concat(la("left"),", ").concat(la("background-color"),", ").concat(la("opacity"),", ").concat(la("color")," "),window.setTimeout(function(){return a.style.transition+=", ".concat(la("width"),", ").concat(la("height"))},0),a.style.zIndex="9999",a.style.cursor="grabbing",a}function Qv(t){t.style.cursor="grab"}function Xv(t,e,n,a,r){var i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),l=i.width-o.width,s=i.height-o.height;if(l||s){var c={left:(n-o.left)/o.width,top:(a-o.top)/o.height};t.style.height="".concat(i.height,"px"),t.style.width="".concat(i.width,"px"),t.style.left="".concat(parseFloat(t.style.left)-c.left*l,"px"),t.style.top="".concat(parseFloat(t.style.top)-c.top*s,"px")}Yc(e,t),r()}function Yc(t,e){var n=window.getComputedStyle(t);Array.from(n).filter(function(a){return a.startsWith("background")||a.startsWith("padding")||a.startsWith("font")||a.startsWith("text")||a.startsWith("align")||a.startsWith("justify")||a.startsWith("display")||a.startsWith("flex")||a.startsWith("border")||a==="opacity"||a==="color"||a==="list-style-type"}).forEach(function(a){return e.style.setProperty(a,n.getPropertyValue(a),n.getPropertyPriority(a))})}function Jv(t,e){t.draggable=!1,t.ondragstart=function(){return!1},e?(t.style.userSelect="",t.style.WebkitUserSelect="",t.style.cursor=""):(t.style.userSelect="none",t.style.WebkitUserSelect="none",t.style.cursor="grab")}function e0(t){t.style.display="none",t.style.position="fixed",t.style.zIndex="-5"}function t0(t){t.style.visibility="hidden",t.setAttribute(is,"true")}function n0(t){t.style.visibility="",t.removeAttribute(is)}function gi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(a){var r=e(a);Object.keys(r).forEach(function(i){a.style[i]=r[i]}),n(a).forEach(function(i){return a.classList.add(i)})})}function yi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(a){var r=e(a);Object.keys(r).forEach(function(i){a.style[i]=""}),n(a).forEach(function(i){return a.classList.contains(i)&&a.classList.remove(i)})})}function a0(t){var e=t.style.minHeight;t.style.minHeight=window.getComputedStyle(t).getPropertyValue("height");var n=t.style.minWidth;return t.style.minWidth=window.getComputedStyle(t).getPropertyValue("width"),function(){t.style.minHeight=e,t.style.minWidth=n}}var r0="--any--",i0=100,$c=3,Zc={outline:"rgba(255, 255, 102, 0.7) solid 2px"},vn,Tt,Qt,vi,gt,bi,Na,zt,Ln,an,Ma=!1,ds=!1,fs,yr=!1,dn=new Map,vt=new Map,hs=new WeakMap;function o0(t,e){Be(function(){return"registering drop-zone if absent"}),dn.has(e)||dn.set(e,new Set),dn.get(e).has(t)||(dn.get(e).add(t),Nc())}function Kc(t,e){dn.get(e).delete(t),Mc(),dn.get(e).size===0&&dn.delete(e)}function s0(){Be(function(){return"watching dragged element"}),Yv();var t=dn.get(vi),e=as(t),n;try{for(e.s();!(n=e.n()).done;){var a=n.value;a.addEventListener(ci,Qc),a.addEventListener(mr,Xc),a.addEventListener(di,Jc)}}catch(i){e.e(i)}finally{e.f()}window.addEventListener(rs,Ia);var r=Math.max.apply(Math,[i0].concat(ui(Array.from(t.keys()).map(function(i){return vt.get(i).dropAnimationDurationMs}))));Hv(Tt,t,r*1.07)}function l0(){Be(function(){return"unwatching dragged element"}),$v();var t=dn.get(vi),e=as(t),n;try{for(e.s();!(n=e.n()).done;){var a=n.value;a.removeEventListener(ci,Qc),a.removeEventListener(mr,Xc),a.removeEventListener(di,Jc)}}catch(r){e.e(r)}finally{e.f()}window.removeEventListener(rs,Ia),Wv()}function u0(t){return t.findIndex(function(e){return e[At]===os})}function wi(t){return t.findIndex(function(e){return!!e[hi]&&e[At]!==os})}function Qc(t){Be(function(){return["dragged entered",t.currentTarget,t.detail]});var e=vt.get(t.currentTarget),n=e.items,a=e.dropFromOthersDisabled;if(a&&t.currentTarget!==gt){Be(function(){return"ignoring dragged entered because drop is currently disabled"});return}if(yr=!1,n=n.filter(function(d){return d[At]!==Na[At]}),Be(function(){return"dragged entered items ".concat(xn(n))}),gt!==t.currentTarget){var r=vt.get(gt).items,i=r.filter(function(d){return!d[hi]});Rn(gt,i,{trigger:ut.DRAGGED_ENTERED_ANOTHER,id:Qt[At],source:rt.POINTER})}else{var o=u0(n);o!==-1&&(Be(function(){return"removing placeholder item from origin dz"}),n.splice(o,1))}var l=t.detail.indexObj,s=l.index,c=l.isProximityBased,u=c&&s===t.currentTarget.children.length-1?s+1:s;zt=t.currentTarget,n.splice(u,0,Na),Rn(t.currentTarget,n,{trigger:ut.DRAGGED_ENTERED,id:Qt[At],source:rt.POINTER})}function Xc(t){if(!!Ma){Be(function(){return["dragged left",t.currentTarget,t.detail]});var e=vt.get(t.currentTarget),n=e.items,a=e.dropFromOthersDisabled;if(a&&t.currentTarget!==gt&&t.currentTarget!==zt){Be(function(){return"drop is currently disabled"});return}var r=wi(n),i=n.splice(r,1)[0];zt=void 0;var o=t.detail,l=o.type,s=o.theOtherDz;if(l===fi.OUTSIDE_OF_ANY||l===fi.LEFT_FOR_ANOTHER&&s!==gt&&vt.get(s).dropFromOthersDisabled){Be(function(){return"dragged left all, putting shadow element back in the origin dz"}),yr=!0,zt=gt;var c=vt.get(gt).items;c.splice(bi,0,i),Rn(gt,c,{trigger:ut.DRAGGED_LEFT_ALL,id:Qt[At],source:rt.POINTER})}Rn(t.currentTarget,n,{trigger:ut.DRAGGED_LEFT,id:Qt[At],source:rt.POINTER})}}function Jc(t){Be(function(){return["dragged is over index",t.currentTarget,t.detail]});var e=vt.get(t.currentTarget),n=e.items,a=e.dropFromOthersDisabled;if(a&&t.currentTarget!==gt){Be(function(){return"drop is currently disabled"});return}yr=!1;var r=t.detail.indexObj.index,i=wi(n);n.splice(i,1),n.splice(r,0,Na),Rn(t.currentTarget,n,{trigger:ut.DRAGGED_OVER_INDEX,id:Qt[At],source:rt.POINTER})}function Di(t){t.preventDefault();var e=t.touches?t.touches[0]:t;an={x:e.clientX,y:e.clientY},Tt.style.transform="translate3d(".concat(an.x-Ln.x,"px, ").concat(an.y-Ln.y,"px, 0)")}function Ia(){Be(function(){return"dropped"}),ds=!0,window.removeEventListener("mousemove",Di),window.removeEventListener("touchmove",Di),window.removeEventListener("mouseup",Ia),window.removeEventListener("touchend",Ia),l0(),Qv(Tt),zt||(Be(function(){return"element was dropped right after it left origin but before entering somewhere else"}),zt=gt),Be(function(){return["dropped in dz",zt]});var t=vt.get(zt),e=t.items,n=t.type;yi(dn.get(n),function(i){return vt.get(i).dropTargetStyle},function(i){return vt.get(i).dropTargetClasses});var a=wi(e);a===-1&&(a=bi),e=e.map(function(i){return i[hi]?Qt:i});function r(){fs(),Sa(zt,e,{trigger:yr?ut.DROPPED_OUTSIDE_OF_ANY:ut.DROPPED_INTO_ZONE,id:Qt[At],source:rt.POINTER}),zt!==gt&&Sa(gt,vt.get(gt).items,{trigger:ut.DROPPED_INTO_ANOTHER,id:Qt[At],source:rt.POINTER}),n0(zt.children[a]),d0()}c0(a,r)}function c0(t,e){var n=Ic(zt.children[t]),a={x:n.left-parseFloat(Tt.style.left),y:n.top-parseFloat(Tt.style.top)},r=vt.get(zt),i=r.dropAnimationDurationMs,o="transform ".concat(i,"ms ease");Tt.style.transition=Tt.style.transition?Tt.style.transition+","+o:o,Tt.style.transform="translate3d(".concat(a.x,"px, ").concat(a.y,"px, 0)"),window.setTimeout(e,i)}function d0(){Tt.remove(),vn.remove(),Tt=void 0,vn=void 0,Qt=void 0,vi=void 0,gt=void 0,bi=void 0,Na=void 0,zt=void 0,Ln=void 0,an=void 0,Ma=!1,ds=!1,fs=void 0,yr=!1}function f0(t,e){var n={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:Zc,dropTargetClasses:[],transformDraggedElement:function(){},centreDraggedOnCursor:!1};Be(function(){return["dndzone good to go options: ".concat(xn(e),", config: ").concat(xn(n)),{node:t}]});var a=new Map;function r(){window.addEventListener("mousemove",l,{passive:!1}),window.addEventListener("touchmove",l,{passive:!1,capture:!1}),window.addEventListener("mouseup",o,{passive:!1}),window.addEventListener("touchend",o,{passive:!1})}function i(){window.removeEventListener("mousemove",l),window.removeEventListener("touchmove",l),window.removeEventListener("mouseup",o),window.removeEventListener("touchend",o)}function o(){i(),vn=void 0,Ln=void 0,an=void 0}function l(d){d.preventDefault();var m=d.touches?d.touches[0]:d;an={x:m.clientX,y:m.clientY},(Math.abs(an.x-Ln.x)>=$c||Math.abs(an.y-Ln.y)>=$c)&&(i(),c())}function s(d){if(d.target!==d.currentTarget&&(d.target.value!==void 0||d.target.isContentEditable)){Be(function(){return"won't initiate drag on a nested input element"});return}if(d.button){Be(function(){return"ignoring none left click button: ".concat(d.button)});return}if(Ma){Be(function(){return"cannot start a new drag before finalizing previous one"});return}d.stopPropagation();var m=d.touches?d.touches[0]:d;Ln={x:m.clientX,y:m.clientY},an=sa({},Ln),vn=d.currentTarget,r()}function c(){Be(function(){return["drag start config: ".concat(xn(n)),vn]}),Ma=!0;var d=a.get(vn);bi=d,gt=vn.parentElement;var m=gt.getRootNode(),v=m.body||m,h=n.items,y=n.type,p=n.centreDraggedOnCursor;Qt=sa({},h[d]),vi=y,Na=sa(sa({},Qt),{},hr({},hi,!0));var S=sa(sa({},Na),{},hr({},At,os));Tt=Kv(vn,p&&an);function _(){Tt.parentElement?window.requestAnimationFrame(_):(v.appendChild(Tt),Tt.focus(),s0(),e0(vn),v.appendChild(vn))}window.requestAnimationFrame(_),gi(Array.from(dn.get(n.type)).filter(function(A){return A===gt||!vt.get(A).dropFromOthersDisabled}),function(A){return vt.get(A).dropTargetStyle},function(A){return vt.get(A).dropTargetClasses}),h.splice(d,1,S),fs=a0(gt),Rn(gt,h,{trigger:ut.DRAG_STARTED,id:Qt[At],source:rt.POINTER}),window.addEventListener("mousemove",Di,{passive:!1}),window.addEventListener("touchmove",Di,{passive:!1,capture:!1}),window.addEventListener("mouseup",Ia,{passive:!1}),window.addEventListener("touchend",Ia,{passive:!1})}function u(d){var m=d.items,v=m===void 0?void 0:m,h=d.flipDurationMs,y=h===void 0?0:h,p=d.type,S=p===void 0?r0:p,_=d.dragDisabled,A=_===void 0?!1:_,L=d.morphDisabled,k=L===void 0?!1:L,E=d.dropFromOthersDisabled,w=E===void 0?!1:E,N=d.dropTargetStyle,F=N===void 0?Zc:N,j=d.dropTargetClasses,x=j===void 0?[]:j,T=d.transformDraggedElement,I=T===void 0?function(){}:T,U=d.centreDraggedOnCursor,$=U===void 0?!1:U;n.dropAnimationDurationMs=y,n.type&&S!==n.type&&Kc(t,n.type),n.type=S,o0(t,S),n.items=ui(v),n.dragDisabled=A,n.morphDisabled=k,n.transformDraggedElement=I,n.centreDraggedOnCursor=$,Ma&&!ds&&(!Rv(F,n.dropTargetStyle)||!Lv(x,n.dropTargetClasses))&&(yi([t],function(){return n.dropTargetStyle},function(){return x}),gi([t],function(){return F},function(){return x})),n.dropTargetStyle=F,n.dropTargetClasses=ui(x);function ee(Ae,Oe){return vt.get(Ae)?vt.get(Ae)[Oe]:n[Oe]}Ma&&n.dropFromOthersDisabled!==w&&(w?yi([t],function(Ae){return ee(Ae,"dropTargetStyle")},function(Ae){return ee(Ae,"dropTargetClasses")}):gi([t],function(Ae){return ee(Ae,"dropTargetStyle")},function(Ae){return ee(Ae,"dropTargetClasses")})),n.dropFromOthersDisabled=w,vt.set(t,n);for(var Z=wi(n.items),K=function(Oe){var He=t.children[Oe];if(Jv(He,A),Oe===Z)return k||Xv(Tt,He,an.x,an.y,function(){return n.transformDraggedElement(Tt,Qt,Oe)}),t0(He),"continue";He.removeEventListener("mousedown",hs.get(He)),He.removeEventListener("touchstart",hs.get(He)),A||(He.addEventListener("mousedown",s),He.addEventListener("touchstart",s),hs.set(He,s)),a.set(He,Oe)},ve=0;ve<t.children.length;ve++)var xe=K(ve)}return u(e),{update:function(m){Be(function(){return"pointer dndzone will update newOptions: ".concat(xn(m))}),u(m)},destroy:function(){Be(function(){return"pointer dndzone will destroy"}),Kc(t,n.type),vt.delete(t)}}}var _i,ms={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},h0=(_i={},hr(_i,ms.DND_ZONE_ACTIVE,"Tab to one the items and press space-bar or enter to start dragging it"),hr(_i,ms.DND_ZONE_DRAG_DISABLED,"This is a disabled drag and drop list"),_i),m0="dnd-action-aria-alert",jt;function ed(){jt=document.createElement("div"),function(){jt.id=m0,jt.style.position="fixed",jt.style.bottom="0",jt.style.left="0",jt.style.zIndex="-5",jt.style.opacity="0",jt.style.height="0",jt.style.width="0",jt.setAttribute("role","alert")}(),document.body.prepend(jt),Object.entries(h0).forEach(function(t){var e=pv(t,2),n=e[0],a=e[1];return document.body.prepend(g0(n,a))})}function p0(){return Sv?null:(document.readyState==="complete"?ed():window.addEventListener("DOMContentLoaded",ed),sa({},ms))}function g0(t,e){var n=document.createElement("div");return n.id=t,n.innerHTML="<p>".concat(e,"</p>"),n.style.display="none",n.style.position="fixed",n.style.zIndex="-5",n}function Oa(t){jt.innerHTML="";var e=document.createTextNode(t);jt.appendChild(e),jt.style.display="none",jt.style.display="inline"}var y0="--any--",td={outline:"rgba(255, 255, 102, 0.7) solid 2px"},rn=!1,ps,qt,ua="",ca,fn,Pn="",Ci=new WeakSet,nd=new WeakMap,ad=new WeakMap,gs=new Map,St=new Map,hn=new Map,rd=p0();function v0(t,e){Be(function(){return"registering drop-zone if absent"}),hn.size===0&&(Be(function(){return"adding global keydown and click handlers"}),window.addEventListener("keydown",od),window.addEventListener("click",sd)),hn.has(e)||hn.set(e,new Set),hn.get(e).has(t)||(hn.get(e).add(t),Nc())}function id(t,e){Be(function(){return"unregistering drop-zone"}),qt===t&&vr(),hn.get(e).delete(t),Mc(),hn.get(e).size===0&&hn.delete(e),hn.size===0&&(Be(function(){return"removing global keydown and click handlers"}),window.removeEventListener("keydown",od),window.removeEventListener("click",sd))}function od(t){if(!!rn)switch(t.key){case"Escape":{vr();break}}}function sd(){!rn||Ci.has(document.activeElement)||(Be(function(){return"clicked outside of any draggable"}),vr())}function b0(t){if(Be(function(){return"zone focus"}),!!rn){var e=t.currentTarget;if(e!==qt){ua=e.getAttribute("aria-label")||"";var n=St.get(qt),a=n.items,r=a.find(function(d){return d[At]===fn}),i=a.indexOf(r),o=a.splice(i,1)[0],l=St.get(e),s=l.items,c=l.autoAriaDisabled;e.getBoundingClientRect().top<qt.getBoundingClientRect().top||e.getBoundingClientRect().left<qt.getBoundingClientRect().left?(s.push(o),c||Oa("Moved item ".concat(Pn," to the end of the list ").concat(ua))):(s.unshift(o),c||Oa("Moved item ".concat(Pn," to the beginning of the list ").concat(ua)));var u=qt;Sa(u,a,{trigger:ut.DROPPED_INTO_ANOTHER,id:fn,source:rt.KEYBOARD}),Sa(e,s,{trigger:ut.DROPPED_INTO_ZONE,id:fn,source:rt.KEYBOARD}),qt=e}}}function ld(){gs.forEach(function(t,e){var n=t.update;return n(St.get(e))})}function vr(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;Be(function(){return"drop"}),St.get(qt).autoAriaDisabled||Oa("Stopped dragging item ".concat(Pn)),Ci.has(document.activeElement)&&document.activeElement.blur(),t&&Rn(qt,St.get(qt).items,{trigger:ut.DRAG_STOPPED,id:fn,source:rt.KEYBOARD}),yi(hn.get(ps),function(e){return St.get(e).dropTargetStyle},function(e){return St.get(e).dropTargetClasses}),ca=null,fn=null,Pn="",ps=null,qt=null,ua="",rn=!1,ld()}function w0(t,e){var n={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:td,dropTargetClasses:[],autoAriaDisabled:!1};function a(u,d,m){u.length<=1||u.splice(m,1,u.splice(d,1,u[m])[0])}function r(u){switch(Be(function(){return["handling key down",u.key]}),u.key){case"Enter":case" ":{if((u.target.disabled!==void 0||u.target.href||u.target.isContentEditable)&&!Ci.has(u.target))return;u.preventDefault(),u.stopPropagation(),rn?vr():i(u);break}case"ArrowDown":case"ArrowRight":{if(!rn)return;u.preventDefault(),u.stopPropagation();var d=St.get(t),m=d.items,v=Array.from(t.children),h=v.indexOf(u.currentTarget);Be(function(){return["arrow down",h]}),h<v.length-1&&(n.autoAriaDisabled||Oa("Moved item ".concat(Pn," to position ").concat(h+2," in the list ").concat(ua)),a(m,h,h+1),Sa(t,m,{trigger:ut.DROPPED_INTO_ZONE,id:fn,source:rt.KEYBOARD}));break}case"ArrowUp":case"ArrowLeft":{if(!rn)return;u.preventDefault(),u.stopPropagation();var y=St.get(t),p=y.items,S=Array.from(t.children),_=S.indexOf(u.currentTarget);Be(function(){return["arrow up",_]}),_>0&&(n.autoAriaDisabled||Oa("Moved item ".concat(Pn," to position ").concat(_," in the list ").concat(ua)),a(p,_,_-1),Sa(t,p,{trigger:ut.DROPPED_INTO_ZONE,id:fn,source:rt.KEYBOARD}));break}}}function i(u){Be(function(){return"drag start"}),l(u.currentTarget),qt=t,ps=n.type,rn=!0;var d=Array.from(hn.get(n.type)).filter(function(v){return v===qt||!St.get(v).dropFromOthersDisabled});if(gi(d,function(v){return St.get(v).dropTargetStyle},function(v){return St.get(v).dropTargetClasses}),!n.autoAriaDisabled){var m="Started dragging item ".concat(Pn,". Use the arrow keys to move it within its list ").concat(ua);d.length>1&&(m+=", or tab to another list in order to move the item into it"),Oa(m)}Rn(t,St.get(t).items,{trigger:ut.DRAG_STARTED,id:fn,source:rt.KEYBOARD}),ld()}function o(u){!rn||u.currentTarget!==ca&&(u.stopPropagation(),vr(!1),i(u))}function l(u){var d=St.get(t),m=d.items,v=Array.from(t.children),h=v.indexOf(u);ca=u,ca.tabIndex=0,fn=m[h][At],Pn=v[h].getAttribute("aria-label")||""}function s(u){var d=u.items,m=d===void 0?[]:d,v=u.type,h=v===void 0?y0:v,y=u.dragDisabled,p=y===void 0?!1:y,S=u.zoneTabIndex,_=S===void 0?0:S,A=u.dropFromOthersDisabled,L=A===void 0?!1:A,k=u.dropTargetStyle,E=k===void 0?td:k,w=u.dropTargetClasses,N=w===void 0?[]:w,F=u.autoAriaDisabled,j=F===void 0?!1:F;n.items=ui(m),n.dragDisabled=p,n.dropFromOthersDisabled=L,n.zoneTabIndex=_,n.dropTargetStyle=E,n.dropTargetClasses=N,n.autoAriaDisabled=j,j||(t.setAttribute("aria-disabled",p),t.setAttribute("role","list"),t.setAttribute("aria-describedby",p?rd.DND_ZONE_DRAG_DISABLED:rd.DND_ZONE_ACTIVE)),n.type&&h!==n.type&&id(t,n.type),n.type=h,v0(t,h),St.set(t,n),rn?t.tabIndex=t===qt||ca.contains(t)||n.dropFromOthersDisabled||qt&&n.type!==St.get(qt).type?-1:0:t.tabIndex=n.zoneTabIndex,t.addEventListener("focus",b0);for(var x=function(U){var $=t.children[U];Ci.add($),$.tabIndex=rn?-1:0,j||$.setAttribute("role","listitem"),$.removeEventListener("keydown",nd.get($)),$.removeEventListener("click",ad.get($)),p||($.addEventListener("keydown",r),nd.set($,r),$.addEventListener("click",o),ad.set($,o)),rn&&n.items[U][At]===fn&&(Be(function(){return["focusing on",{i:U,focusedItemId:fn}]}),ca=$,ca.tabIndex=0,$.focus())},T=0;T<t.children.length;T++)x(T)}s(e);var c={update:function(d){Be(function(){return"keyboard dndzone will update newOptions: ".concat(xn(d))}),s(d)},destroy:function(){Be(function(){return"keyboard dndzone will destroy"}),id(t,n.type),St.delete(t),gs.delete(t)}};return gs.set(t,c),c}function da(t,e){ud(e);var n=f0(t,e),a=w0(t,e);return{update:function(i){ud(i),n.update(i),a.update(i)},destroy:function(){n.destroy(),a.destroy()}}}function ud(t){var e=t.items,n=t.flipDurationMs,a=t.type,r=t.dragDisabled,i=t.morphDisabled,o=t.dropFromOthersDisabled,l=t.zoneTabIndex,s=t.dropTargetStyle,c=t.dropTargetClasses,u=t.transformDraggedElement,d=t.autoAriaDisabled,m=t.centreDraggedOnCursor,v=mv(t,["items","flipDurationMs","type","dragDisabled","morphDisabled","dropFromOthersDisabled","zoneTabIndex","dropTargetStyle","dropTargetClasses","transformDraggedElement","autoAriaDisabled","centreDraggedOnCursor"]);if(Object.keys(v).length>0&&console.warn("dndzone will ignore unknown options",v),!e)throw new Error("no 'items' key provided to dndzone");var h=e.find(function(y){return!{}.hasOwnProperty.call(y,At)});if(h)throw new Error("missing '".concat(At,"' property for item ").concat(xn(h)));if(c&&!Array.isArray(c))throw new Error("dropTargetClasses should be an array but instead it is a ".concat(fr(c),", ").concat(xn(c)));if(l&&!D0(l))throw new Error("zoneTabIndex should be a number but instead it is a ".concat(fr(l),", ").concat(xn(l)))}function D0(t){return!isNaN(t)&&function(e){return(e|0)===e}(parseFloat(t))}var qa=Ee(require("obsidian"));var cd=Ee(require("obsidian"));function _0(t){be(t,"svelte-l6axd",".add-new.svelte-l6axd,.add-new.svelte-l6axd button{width:100%}.disabled.svelte-l6axd button{cursor:not-allowed}")}function C0(t){let e,n,a,r;return{c(){e=B("div"),D(e,"class","add-new setting-item svelte-l6axd"),D(e,"aria-label",t[1]),me(e,"disabled",t[0])},m(i,o){R(i,e,o),a||(r=[ue(n=t[2].call(null,e)),re(e,"click",t[4])],a=!0)},p(i,[o]){o&2&&D(e,"aria-label",i[1]),o&1&&me(e,"disabled",i[0])},i:Q,o:Q,d(i){i&&q(e),a=!1,we(r)}}}function E0(t,e,n){let{disabled:a=!1}=e,{label:r="Add New"}=e,i,o=s=>{n(3,i=new cd.ButtonComponent(s).setButtonText("+").setDisabled(a))};function l(s){ce.call(this,t,s)}return t.$$set=s=>{"disabled"in s&&n(0,a=s.disabled),"label"in s&&n(1,r=s.label)},t.$$.update=()=>{if(t.$$.dirty&9){e:i&&i.setDisabled(a)}},[a,r,o,i,l]}var dd=class extends de{constructor(e){super();he(this,e,E0,C0,le,{disabled:0,label:1},_0)}},Bt=dd;function A0(t){be(t,"svelte-1o5puim",".no-existing-items.svelte-1o5puim.svelte-1o5puim{width:100%}.no-existing-items.svelte-1o5puim span.svelte-1o5puim{width:100%;text-align:center;color:var(--text-faint)}")}function k0(t){let e,n,a;return{c(){e=B("div"),n=B("span"),a=fe(t[0]),D(n,"class","svelte-1o5puim"),D(e,"class","no-existing-items setting-item svelte-1o5puim")},m(r,i){R(r,e,i),C(e,n),C(n,a)},p(r,[i]){i&1&&ge(a,r[0])},i:Q,o:Q,d(r){r&&q(e)}}}function x0(t,e,n){let{message:a}=e;return t.$$set=r=>{"message"in r&&n(0,a=r.message)},[a]}var fd=class extends de{constructor(e){super();he(this,e,x0,k0,le,{message:0},A0)}},Vt=fd;function F0(t){be(t,"svelte-1ddbnom",".existing-items.svelte-1ddbnom.svelte-1ddbnom{width:100%}.weekday.svelte-1ddbnom.svelte-1ddbnom{display:grid;grid-template-columns:auto 1fr auto;align-items:center;justify-content:space-between;gap:1rem;width:100%}.weekday.svelte-1ddbnom .icon.svelte-1ddbnom{align-items:center}.weekday.svelte-1ddbnom.svelte-1ddbnom{margin-top:0.5rem}")}function hd(t,e,n){let a=t.slice();return a[18]=e[n],a[20]=n,a}function md(t,e,n){let a=t.slice();return a[21]=e[n],a}function T0(t){let e,n=[],a=new Map,r,i,o,l=t[4],s=c=>c[21].id;for(let c=0;c<l.length;c+=1){let u=md(t,l,c),d=s(u);a.set(d,n[c]=pd(d,u))}return{c(){e=B("div");for(let c=0;c<n.length;c+=1)n[c].c();D(e,"class","existing-items svelte-1ddbnom")},m(c,u){R(c,e,u);for(let d=0;d<n.length;d+=1)n[d].m(e,null);i||(o=[ue(r=da.call(null,e,{items:t[4],flipDurationMs:ys,dragDisabled:t[2]})),re(e,"consider",t[10]),re(e,"finalize",t[11])],i=!0)},p(c,u){if(u&528){l=c[4];for(let d=0;d<n.length;d+=1)n[d].r();n=Qn(n,u,s,1,c,l,a,e,nr,pd,null,md);for(let d=0;d<n.length;d+=1)n[d].a()}r&&ot(r.update)&&u&20&&r.update.call(null,{items:c[4],flipDurationMs:ys,dragDisabled:c[2]})},i:Q,o:Q,d(c){c&&q(e);for(let u=0;u<n.length;u+=1)n[u].d();i=!1,we(o)}}}function S0(t){let e,n;return e=new Vt({props:{message:"Create a new weekday to see it here."}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p:Q,i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function pd(t,e){let n,a,r,i,o,l,s,c,u,d,m,v=Q,h,y;return{key:t,first:null,c(){n=B("div"),a=B("div"),i=W(),o=B("div"),s=W(),c=B("div"),d=W(),D(a,"class","icon svelte-1ddbnom"),D(c,"class","icon svelte-1ddbnom"),D(n,"class","weekday svelte-1ddbnom"),this.first=n},m(p,S){R(p,n,S),C(n,a),C(n,i),C(n,o),C(n,s),C(n,c),C(n,d),h||(y=[ue(r=e[7].call(null,a)),re(a,"mousedown",e[9]),re(a,"touchstart",e[9]),ue(l=e[12].call(null,o,e[21])),ue(u=e[8].call(null,c,e[21]))],h=!0)},p(p,S){e=p,l&&ot(l.update)&&S&16&&l.update.call(null,e[21]),u&&ot(u.update)&&S&16&&u.update.call(null,e[21])},r(){m=n.getBoundingClientRect()},f(){Yn(n),v()},a(){v(),v=zn(n,m,oa,{duration:ys})},d(p){p&&q(n),h=!1,we(y)}}}function gd(t){let e,n=(t[18].name??"")+"",a,r,i,o;return{c(){e=B("option"),a=fe(n),r=W(),e.disabled=i=!t[3],e.__value=o=t[20],e.value=e.__value},m(l,s){R(l,e,s),C(e,a),C(e,r)},p(l,s){s&16&&n!==(n=(l[18].name??"")+"")&&ge(a,n),s&8&&i!==(i=!l[3])&&(e.disabled=i)},d(l){l&&q(e)}}}function B0(t){let e,n,a,r,i,o,l,s,c,u,d,m,v,h,y,p,S;e=new Ot({props:{name:"Overflow Weeks",desc:"Turn this off to make each month start on the first of the week.",value:t[0].overflow}}),e.$on("click",t[13]),a=new Bt({}),a.$on("click",t[14]);let _=[S0,T0],A=[];function L(w,N){return w[4].length?1:0}i=L(t,-1),o=A[i]=_[i](t);let k=t[4].filter(yd),E=[];for(let w=0;w<k.length;w+=1)E[w]=gd(hd(t,k,w));return{c(){ne(e.$$.fragment),n=W(),ne(a.$$.fragment),r=W(),o.c(),l=W(),s=B("div"),c=B("div"),c.innerHTML=`<div class="setting-item-name">First Day</div>
<div class="setting-item-description">The day of the week the first year starts on.</div>`,u=W(),d=B("div"),m=B("select"),v=B("option"),v.textContent="Select a Weekday";for(let w=0;w<E.length;w+=1)E[w].c();D(c,"class","setting-item-info"),v.selected=!0,v.hidden=!0,v.disabled=!0,v.__value="Select a Weekday",v.value=v.__value,D(m,"class","dropdown"),D(m,"aria-label",h=t[4].filter(vd).length?null:"Named Weekday Required"),t[1]===void 0&&It(()=>t[15].call(m)),D(d,"class","setting-item-control"),D(s,"class","setting-item")},m(w,N){te(e,w,N),R(w,n,N),te(a,w,N),R(w,r,N),A[i].m(w,N),R(w,l,N),R(w,s,N),C(s,c),C(s,u),C(s,d),C(d,m),C(m,v);for(let F=0;F<E.length;F+=1)E[F].m(m,null);Mt(m,t[1]),y=!0,p||(S=[re(m,"change",t[15]),re(m,"change",t[16])],p=!0)},p(w,N){let F={};N&1&&(F.value=w[0].overflow),e.$set(F);let j=i;if(i=L(w,N),i===j?A[i].p(w,N):(De(),G(A[j],1,1,()=>{A[j]=null}),_e(),o=A[i],o?o.p(w,N):(o=A[i]=_[i](w),o.c()),P(o,1),o.m(l.parentNode,l)),N&24){k=w[4].filter(yd);let x;for(x=0;x<k.length;x+=1){let T=hd(w,k,x);E[x]?E[x].p(T,N):(E[x]=gd(T),E[x].c(),E[x].m(m,null))}for(;x<E.length;x+=1)E[x].d(1);E.length=k.length}(!y||N&16&&h!==(h=w[4].filter(vd).length?null:"Named Weekday Required"))&&D(m,"aria-label",h),N&2&&Mt(m,w[1])},i(w){y||(P(e.$$.fragment,w),P(a.$$.fragment,w),P(o),y=!0)},o(w){G(e.$$.fragment,w),G(a.$$.fragment,w),G(o),y=!1},d(w){J(e,w),w&&q(n),J(a,w),w&&q(r),A[i].d(w),w&&q(l),w&&q(s),Ge(E,w),p=!1,we(S)}}}function N0(t){let e,n;return e=new ct({props:{name:"Weekdays",warn:!t[4]?.length,label:"At least one weekday is required",desc:`${t[4].length} weekday${t[4].length!=1?"s":""}`,open:!1,$$slots:{default:[B0]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,[r]){let i={};r&16&&(i.warn=!a[4]?.length),r&16&&(i.desc=`${a[4].length} weekday${a[4].length!=1?"s":""}`),r&16777247&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}var ys=300,yd=t=>t.name?.length,vd=t=>t.name?.length;function M0(t,e,n){let a,r,i,o=Ne("store"),{staticStore:l,weekdayStore:s}=o;Fe(t,l,k=>n(0,r=k)),Fe(t,s,k=>n(4,i=k));let c=r.firstWeekDay,u=k=>{(0,qa.setIcon)(k,"fantasy-calendar-grip")},d=(k,E)=>{new qa.ExtraButtonComponent(k).setIcon("trash").onClick(()=>s.delete(E.id))};function m(k){k.preventDefault(),n(2,v=!1)}let v=!1;function h(k){let{items:E,info:{source:w,trigger:N}}=k.detail;s.set(E),w===rt.KEYBOARD&&N===ut.DRAG_STOPPED&&n(2,v=!0)}function y(k){let{items:E,info:{source:w}}=k.detail;s.set(E),w===rt.POINTER&&n(2,v=!0)}let p=(k,E)=>{new qa.TextComponent(k).setValue(E.name).setPlaceholder("Name").onChange(w=>{E.name=w,s.update(E.id,E)}).inputEl.setAttr("style","width: 100%;")},S=()=>l.setProperty("overflow",!r.overflow),_=()=>s.add();function A(){c=mn(this),n(1,c)}let L=()=>{l.setProperty("firstWeekDay",c)};return t.$$.update=()=>{if(t.$$.dirty&1){e:n(3,a=r.overflow)}},[r,c,v,a,i,l,s,u,d,m,h,y,p,S,_,A,L]}var bd=class extends de{constructor(e){super();he(this,e,M0,N0,le,{},F0)}},wd=bd;var Cd=Ee(require("obsidian"));var Ei=Ee(require("obsidian"));function I0(t){be(t,"svelte-1e37bk8",".month.svelte-1e37bk8.svelte-1e37bk8{display:grid;grid-template-columns:1fr 1fr auto auto;align-items:center;justify-content:space-between;gap:1rem;width:100%}.month.svelte-1e37bk8 .icon.svelte-1e37bk8{align-items:center}")}function O0(t){let e,n,a,r,i,o,l,s,c,u,d,m,v;return{c(){e=B("div"),n=B("input"),a=W(),r=B("input"),i=W(),o=B("select"),l=B("option"),l.textContent="Month",s=B("option"),s.textContent="Intercalary",c=W(),u=B("div"),D(n,"type","text"),D(n,"spellcheck","false"),D(n,"placeholder","Name"),at(n,"width","100%"),D(r,"type","number"),D(r,"spellcheck","false"),D(r,"placeholder","Length"),at(r,"width","100%"),D(r,"min","0"),l.__value="month",l.value=l.__value,s.__value="intercalary",s.value=s.__value,D(o,"class","dropdown"),t[1]===void 0&&It(()=>t[8].call(o)),D(u,"class","icon svelte-1e37bk8"),D(e,"class","month svelte-1e37bk8")},m(h,y){R(h,e,y),C(e,n),Dt(n,t[0]),C(e,a),C(e,r),Dt(r,t[2]),C(e,i),C(e,o),C(o,l),C(o,s),Mt(o,t[1]),C(e,c),C(e,u),m||(v=[re(n,"input",t[6]),re(n,"input",t[4]),re(r,"input",t[7]),re(r,"input",t[4]),re(o,"change",t[8]),re(o,"input",t[4]),ue(d=t[3].call(null,u))],m=!0)},p(h,[y]){y&1&&n.value!==h[0]&&Dt(n,h[0]),y&4&&ln(r.value)!==h[2]&&Dt(r,h[2]),y&2&&Mt(o,h[1])},i:Q,o:Q,d(h){h&&q(e),m=!1,we(v)}}}function q0(t,e,n){let a=Ve(),{month:r}=e,i=Ne("store"),{monthStore:o}=i,l=r.name,s=r.type,c=r.length,u=y=>{new Ei.ExtraButtonComponent(y).setIcon("trash").onClick(()=>o.delete(r.id))},d=(0,Ei.debounce)(()=>{n(5,r.name=l,r),n(5,r.type=s,r),n(5,r.length=c,r),o.update(r.id,r)},300,!0);function m(){l=this.value,n(0,l)}function v(){c=ln(this.value),n(2,c)}function h(){s=mn(this),n(1,s)}return t.$$set=y=>{"month"in y&&n(5,r=y.month)},[l,s,c,u,d,r,m,v,h]}var Dd=class extends de{constructor(e){super();he(this,e,q0,O0,le,{month:5},I0)}},_d=Dd;function R0(t){be(t,"svelte-xv4vbj",".month.svelte-xv4vbj{display:flex;align-items:center;margin-top:0.5rem;gap:1rem}")}function Ed(t,e,n){let a=t.slice();return a[9]=e[n],a}function L0(t){let e,n=[],a=new Map,r,i,o,l,s=t[1],c=u=>u[9].id;for(let u=0;u<s.length;u+=1){let d=Ed(t,s,u),m=c(d);a.set(m,n[u]=Ad(m,d))}return{c(){e=B("div");for(let u=0;u<n.length;u+=1)n[u].c();D(e,"class","existing-items")},m(u,d){R(u,e,d);for(let m=0;m<n.length;m+=1)n[m].m(e,null);i=!0,o||(l=[ue(r=da.call(null,e,{items:t[1],flipDurationMs:vs,dragDisabled:t[0]})),re(e,"consider",t[5]),re(e,"finalize",t[6])],o=!0)},p(u,d){if(d&18){s=u[1],De();for(let m=0;m<n.length;m+=1)n[m].r();n=Qn(n,d,c,1,u,s,a,e,ku,Ad,null,Ed);for(let m=0;m<n.length;m+=1)n[m].a();_e()}r&&ot(r.update)&&d&3&&r.update.call(null,{items:u[1],flipDurationMs:vs,dragDisabled:u[0]})},i(u){if(!i){for(let d=0;d<s.length;d+=1)P(n[d]);i=!0}},o(u){for(let d=0;d<n.length;d+=1)G(n[d]);i=!1},d(u){u&&q(e);for(let d=0;d<n.length;d+=1)n[d].d();o=!1,we(l)}}}function P0(t){let e,n;return e=new Vt({props:{message:"Create a new month to see it here."}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p:Q,i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Ad(t,e){let n,a,r,i,o,l,s,c=Q,u,d,m;return o=new _d({props:{month:e[9]}}),o.$on("mousedown",e[4]),{key:t,first:null,c(){n=B("div"),a=B("div"),i=W(),ne(o.$$.fragment),l=W(),D(a,"class","icon"),D(n,"class","month svelte-xv4vbj"),this.first=n},m(v,h){R(v,n,h),C(n,a),C(n,i),te(o,n,null),C(n,l),u=!0,d||(m=[ue(r=e[3].call(null,a)),re(a,"mousedown",e[4]),re(a,"touchstart",e[4])],d=!0)},p(v,h){e=v;let y={};h&2&&(y.month=e[9]),o.$set(y)},r(){s=n.getBoundingClientRect()},f(){Yn(n),c()},a(){c(),c=zn(n,s,oa,{duration:vs})},i(v){u||(P(o.$$.fragment,v),u=!0)},o(v){G(o.$$.fragment,v),u=!1},d(v){v&&q(n),J(o),d=!1,we(m)}}}function j0(t){let e,n,a,r,i,o;e=new Bt({}),e.$on("click",t[7]);let l=[P0,L0],s=[];function c(u,d){return u[1].length?1:0}return a=c(t,-1),r=s[a]=l[a](t),{c(){ne(e.$$.fragment),n=W(),r.c(),i=Ue()},m(u,d){te(e,u,d),R(u,n,d),s[a].m(u,d),R(u,i,d),o=!0},p(u,d){let m=a;a=c(u,d),a===m?s[a].p(u,d):(De(),G(s[m],1,1,()=>{s[m]=null}),_e(),r=s[a],r?r.p(u,d):(r=s[a]=l[a](u),r.c()),P(r,1),r.m(i.parentNode,i))},i(u){o||(P(e.$$.fragment,u),P(r),o=!0)},o(u){G(e.$$.fragment,u),G(r),o=!1},d(u){J(e,u),u&&q(n),s[a].d(u),u&&q(i)}}}function V0(t){let e,n;return e=new ct({props:{name:"Months",warn:!t[1]?.length,label:"At least one month is required",desc:`${t[1].length} month${t[1].length!=1?"s":""}`,open:!1,$$slots:{default:[j0]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,[r]){let i={};r&2&&(i.warn=!a[1]?.length),r&2&&(i.desc=`${a[1].length} month${a[1].length!=1?"s":""}`),r&4099&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}var vs=300;function H0(t,e,n){let a,r=Ne("store"),{monthStore:i}=r;Fe(t,i,m=>n(1,a=m));let o=m=>{(0,Cd.setIcon)(m,"fantasy-calendar-grip")};function l(m){m.preventDefault(),n(0,s=!1)}let s=!1;function c(m){let{items:v,info:{source:h,trigger:y}}=m.detail;i.set(v),h===rt.KEYBOARD&&y===ut.DRAG_STOPPED&&n(0,s=!0)}function u(m){let{items:v,info:{source:h}}=m.detail;i.set(v),h===rt.POINTER&&n(0,s=!0)}return[s,a,i,o,l,c,u,()=>i.add()]}var kd=class extends de{constructor(e){super();he(this,e,H0,V0,le,{},R0)}},xd=kd;var La=Ee(require("obsidian"));var Ra=Ee(require("obsidian"));async function br(t,e,n={cta:"Yes",secondary:"No"}){return new Promise((a,r)=>{try{let i=new Fd(t,e,n);i.onClose=()=>{a(i.confirmed)},i.open()}catch{r()}})}var Fd=class extends lt{constructor(e,n,a){super(e);this.text=n;this.buttons=a;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:this.text});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new Ra.ButtonComponent(e).setButtonText(this.buttons.cta).setCta().onClick(()=>{this.confirmed=!0,this.close()}),new Ra.ButtonComponent(e).setButtonText(this.buttons.secondary).onClick(()=>{this.close()})}onOpen(){this.display()}};async function Td(t){return new Promise((e,n)=>{try{let a=new Sd(t);a.onClose=()=>{e(a.confirmed)},a.open()}catch{n()}})}var Sd=class extends lt{constructor(e){super(e.app);this.plugin=e;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:"Are you sure you want to delete this calendar?"});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons-container");e.createEl("a").createEl("small",{cls:"dont-ask",text:"Delete and don't ask again"}).onclick=async()=>{this.confirmed=!0,this.plugin.data.exit.calendar=!0,await this.plugin.saveSettings(),this.close()};let n=e.createDiv("fantasy-calendar-confirm-buttons");new Ra.ButtonComponent(n).setButtonText("Delete").setCta().onClick(()=>{this.confirmed=!0,this.close()}),n.createEl("a").createEl("small",{cls:"dont-ask",text:"Cancel"}).onclick=()=>{this.close()}}onOpen(){this.display()}},bs=class extends lt{constructor(e){super(e.app);this.plugin=e;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:"Additional information is required to save this calendar. Any changes you may have made will be discarded if you exit now."});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons-container");e.createEl("a").createEl("small",{cls:"dont-ask",text:"Exit and don't ask again"}).onclick=async()=>{this.confirmed=!0,this.plugin.data.exit.saving=!0,await this.plugin.saveSettings(),this.close()};let n=e.createDiv("fantasy-calendar-confirm-buttons");new Ra.ButtonComponent(n).setButtonText("Exit").setCta().onClick(()=>{this.confirmed=!0,this.close()}),n.createEl("a").createEl("small",{cls:"dont-ask",text:"Keep editing"}).onclick=()=>{this.close()}}onOpen(){this.display()}};async function Bd(t){return new Promise((e,n)=>{try{let a=new Nd(t);a.onClose=()=>{e(a.confirmed)},a.open()}catch{n()}})}var Nd=class extends lt{constructor(e){super(e.app);this.plugin=e;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:"Are you sure you wish to delete this event?"});let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons-container");e.createEl("a").createEl("small",{cls:"dont-ask",text:"Delete and don't ask again"}).onclick=async()=>{this.confirmed=!0,this.plugin.data.exit.event=!0,await this.plugin.saveSettings(),this.close()};let n=e.createDiv("fantasy-calendar-confirm-buttons");new Ra.ButtonComponent(n).setButtonText("Delete").setCta().onClick(()=>{this.confirmed=!0,this.close()}),n.createEl("a").createEl("small",{cls:"dont-ask",text:"Cancel"}).onclick=()=>{this.close()}}onOpen(){this.display()}};function W0(t){be(t,"svelte-1c4m78g",".weekday.svelte-1c4m78g.svelte-1c4m78g{display:grid;grid-template-columns:auto 1fr auto;align-items:center;justify-content:space-between;gap:1rem}.weekday.svelte-1c4m78g .icon.svelte-1c4m78g{align-items:center}.weekday.svelte-1c4m78g.svelte-1c4m78g{margin-top:0.5rem}")}function Md(t,e,n){let a=t.slice();return a[19]=e[n],a}function Id(t){let e,n,a,r,i,o;e=new Bt({}),e.$on("click",t[16]);let l=[U0,G0],s=[];function c(u,d){return u[2]?.length?1:0}return a=c(t,-1),r=s[a]=l[a](t),{c(){ne(e.$$.fragment),n=W(),r.c(),i=Ue()},m(u,d){te(e,u,d),R(u,n,d),s[a].m(u,d),R(u,i,d),o=!0},p(u,d){let m=a;a=c(u,d),a===m?s[a].p(u,d):(De(),G(s[m],1,1,()=>{s[m]=null}),_e(),r=s[a],r?r.p(u,d):(r=s[a]=l[a](u),r.c()),P(r,1),r.m(i.parentNode,i))},i(u){o||(P(e.$$.fragment,u),P(r),o=!0)},o(u){G(e.$$.fragment,u),G(r),o=!1},d(u){J(e,u),u&&q(n),s[a].d(u),u&&q(i)}}}function G0(t){let e,n=[],a=new Map,r,i,o,l=t[2],s=c=>c[19].id;for(let c=0;c<l.length;c+=1){let u=Md(t,l,c),d=s(u);a.set(d,n[c]=Od(d,u))}return{c(){e=B("div");for(let c=0;c<n.length;c+=1)n[c].c();D(e,"class","existing-items")},m(c,u){R(c,e,u);for(let d=0;d<n.length;d+=1)n[d].m(e,null);i||(o=[ue(r=da.call(null,e,{items:t[2],flipDurationMs:ws,dragDisabled:t[0]})),re(e,"consider",t[12]),re(e,"finalize",t[13])],i=!0)},p(c,u){if(u&2052){l=c[2];for(let d=0;d<n.length;d+=1)n[d].r();n=Qn(n,u,s,1,c,l,a,e,nr,Od,null,Md);for(let d=0;d<n.length;d+=1)n[d].a()}r&&ot(r.update)&&u&5&&r.update.call(null,{items:c[2],flipDurationMs:ws,dragDisabled:c[0]})},i:Q,o:Q,d(c){c&&q(e);for(let u=0;u<n.length;u+=1)n[u].d();i=!1,we(o)}}}function U0(t){let e,n;return e=new Vt({props:{message:"Create a new year to see it here."}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p:Q,i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Od(t,e){let n,a,r,i,o,l,s,c,u,d,m,v=Q,h,y;return{key:t,first:null,c(){n=B("div"),a=B("div"),i=W(),o=B("div"),s=W(),c=B("div"),d=W(),D(a,"class","icon svelte-1c4m78g"),D(c,"class","icon svelte-1c4m78g"),D(n,"class","weekday svelte-1c4m78g"),this.first=n},m(p,S){R(p,n,S),C(n,a),C(n,i),C(n,o),C(n,s),C(n,c),C(n,d),h||(y=[ue(r=e[6].call(null,a)),re(a,"mousedown",e[11]),re(a,"touchstart",e[11]),ue(l=e[8].call(null,o,e[19])),ue(u=e[7].call(null,c,e[19]))],h=!0)},p(p,S){e=p,l&&ot(l.update)&&S&4&&l.update.call(null,e[19]),u&&ot(u.update)&&S&4&&u.update.call(null,e[19])},r(){m=n.getBoundingClientRect()},f(){Yn(n),v()},a(){v(),v=zn(n,m,oa,{duration:ws})},d(p){p&&q(n),h=!1,we(y)}}}function z0(t){let e,n,a,r;e=new Ot({props:{name:"Use Custom Years",desc:t[9],value:t[1]}}),e.$on("click",t[15]);let i=t[1]&&Id(t);return{c(){ne(e.$$.fragment),n=W(),i&&i.c(),a=Ue()},m(o,l){te(e,o,l),R(o,n,l),i&&i.m(o,l),R(o,a,l),r=!0},p(o,l){let s={};l&2&&(s.value=o[1]),e.$set(s),o[1]?i?(i.p(o,l),l&2&&P(i,1)):(i=Id(o),i.c(),P(i,1),i.m(a.parentNode,a)):i&&(De(),G(i,1,1,()=>{i=null}),_e())},i(o){r||(P(e.$$.fragment,o),P(i),r=!0)},o(o){G(e.$$.fragment,o),G(i),r=!1},d(o){J(e,o),o&&q(n),i&&i.d(o),o&&q(a)}}}function Y0(t){let e,n;return e=new ct({props:{name:"Years",warn:t[1]&&!t[2]?.length,label:"At least one year is required when using custom years",open:!1,$$slots:{default:[z0]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,[r]){let i={};r&6&&(i.warn=a[1]&&!a[2]?.length),r&4194311&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}var ws=300;function $0(t,e,n){let a,r,i,o=Ne("store"),{yearStore:l,staticStore:s}=o;Fe(t,l,E=>n(2,i=E)),Fe(t,s,E=>n(17,a=E));let{customYears:c}=l;Fe(t,c,E=>n(1,r=E));let u=E=>{(0,La.setIcon)(E,"fantasy-calendar-grip")},d=(E,w)=>{new La.ExtraButtonComponent(E).setIcon("trash").onClick(()=>l.delete(w.id))},m=(E,w)=>{new La.TextComponent(E).setValue(w.name).setPlaceholder("Name").onChange(F=>{w.name=F,l.update(w.id,w)}).inputEl.setAttr("style","width: 100%;")},{app:v}=e,h=createFragment(E=>(E.createSpan({text:"Create custom years to display instead of incrementing from 1."}),E.createEl("br"),E.createSpan({text:"If on, "}),E.createEl("strong",{text:"only the years added below will be displayed."}),E)),y=async()=>{(!i?.length||r&&await br(v,"The custom years you have created will be removed. Proceed?"))&&l.set([]),s.setProperty("useCustomYears",!a.useCustomYears)};function p(E){E.preventDefault(),n(0,S=!1)}let S=!1;function _(E){let{items:w,info:{source:N,trigger:F}}=E.detail;l.set(w),N===rt.KEYBOARD&&F===ut.DRAG_STOPPED&&n(0,S=!0)}function A(E){let{items:w,info:{source:N}}=E.detail;l.set(w),N===rt.POINTER&&n(0,S=!0)}let L=()=>y(),k=()=>{l.add()};return t.$$set=E=>{"app"in E&&n(14,v=E.app)},[S,r,i,l,s,c,u,d,m,h,y,p,_,A,v,L,k]}var qd=class extends de{constructor(e){super();he(this,e,$0,Y0,le,{app:14},W0)}},Rd=qd;var Ds=Ee(require("obsidian"));function Z0(t){be(t,"svelte-1ldxqlp",".dot.svelte-1ldxqlp{display:inline-block;height:0.875em;width:0.875em;margin:0 1px}")}function K0(t){let e,n;return{c(){e=sn("svg"),n=sn("circle"),D(n,"stroke",t[0]),D(n,"fill",t[0]),D(n,"cx","3"),D(n,"cy","3"),D(n,"r","2"),D(e,"class","dot svelte-1ldxqlp"),D(e,"viewBox","0 0 6 6"),D(e,"xmlns","http://www.w3.org/2000/svg"),D(e,"aria-label",t[1])},m(a,r){R(a,e,r),C(e,n)},p(a,[r]){r&1&&D(n,"stroke",a[0]),r&1&&D(n,"fill",a[0]),r&2&&D(e,"aria-label",a[1])},i:Q,o:Q,d(a){a&&q(e)}}}function Q0(t,e,n){let{color:a}=e,{label:r}=e;return t.$$set=i=>{"color"in i&&n(0,a=i.color),"label"in i&&n(1,r=i.label)},[a,r]}var Ld=class extends de{constructor(e){super();he(this,e,Q0,K0,le,{color:0,label:1},Z0)}},Pd=Ld;function X0(t){be(t,"svelte-3snb0d",".event.svelte-3snb0d.svelte-3snb0d{display:grid;grid-template-columns:1fr auto;align-items:center;justify-content:space-between;gap:1rem;margin-top:0.5rem}.event-info.svelte-3snb0d.svelte-3snb0d{width:100%}.icons.svelte-3snb0d.svelte-3snb0d{display:flex;align-self:flex-start;justify-self:flex-end;align-items:center}.event.svelte-3snb0d .icon.svelte-3snb0d{align-items:center}.date.svelte-3snb0d.svelte-3snb0d{display:flex;justify-content:flex-start;gap:0.25rem}.clamp.svelte-3snb0d.svelte-3snb0d{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;word-break:keep-all;overflow:hidden;width:calc(var(--event-max-width) * 0.75)}")}function jd(t){let e,n;return e=new Pd({props:{color:t[1].color,label:t[1].name}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r&2&&(i.color=a[1].color),r&2&&(i.label=a[1].name),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function J0(t){let e,n,a,r,i=t[0].name+"",o,l,s,c,u,d,m,v=(t[0].description??"")+"",h,y,p,S,_,A,L,k,E,w,N,F=t[1]!=null&&jd(t);return{c(){e=B("div"),n=B("div"),a=B("span"),F&&F.c(),r=W(),o=fe(i),l=W(),s=B("div"),c=B("div"),u=fe(t[2]),d=W(),m=B("span"),h=fe(v),y=W(),p=B("div"),S=B("div"),A=W(),L=B("div"),D(a,"class","setting-item-name"),D(c,"class","date svelte-3snb0d"),D(m,"class","clamp svelte-3snb0d"),D(s,"class","setting-item-description"),D(n,"class","event-info svelte-3snb0d"),D(S,"class","icon svelte-3snb0d"),D(L,"class","icon svelte-3snb0d"),D(p,"class","icons svelte-3snb0d"),D(e,"class","event svelte-3snb0d")},m(j,x){R(j,e,x),C(e,n),C(n,a),F&&F.m(a,null),C(a,r),C(a,o),C(n,l),C(n,s),C(s,c),C(c,u),C(s,d),C(s,m),C(m,h),C(e,y),C(e,p),C(p,S),C(p,A),C(p,L),E=!0,w||(N=[ue(_=t[5].call(null,S)),re(S,"click",t[6]),ue(k=t[4].call(null,L)),re(L,"click",t[7])],w=!0)},p(j,[x]){j[1]!=null?F?(F.p(j,x),x&2&&P(F,1)):(F=jd(j),F.c(),P(F,1),F.m(a,r)):F&&(De(),G(F,1,1,()=>{F=null}),_e()),(!E||x&1)&&i!==(i=j[0].name+"")&&ge(o,i),(!E||x&4)&&ge(u,j[2]),(!E||x&1)&&v!==(v=(j[0].description??"")+"")&&ge(h,v)},i(j){E||(P(F),E=!0)},o(j){G(F),E=!1},d(j){j&&q(e),F&&F.d(),w=!1,we(N)}}}function e1(t,e,n){let a=Ve(),r=d=>{new Ds.ExtraButtonComponent(d).setIcon("trash").setTooltip("Delete").extraSettingsEl.setAttr("style","margin-left: 0;")},i=d=>{new Ds.ExtraButtonComponent(d).setIcon("pencil").setTooltip("Edit")},{event:o}=e,{category:l}=e,{date:s}=e,c=()=>a("edit"),u=()=>a("delete");return t.$$set=d=>{"event"in d&&n(0,o=d.event),"category"in d&&n(1,l=d.category),"date"in d&&n(2,s=d.date)},[o,l,s,a,r,i,c,u]}var Vd=class extends de{constructor(e){super();he(this,e,e1,J0,le,{event:0,category:1,date:2},X0)}},Hd=Vd;var bt=Ee(require("obsidian"));var wr=Ee(require("obsidian")),Ai=class extends cr{constructor(e,n,a){super(e,n.inputEl,a);this.files=[...a],this.text=n,this.createPrompts(),this.inputEl.addEventListener("input",this.getFile.bind(this))}createPrompts(){this.createPrompt([createSpan({cls:"prompt-instruction-command",text:"Type #"}),createSpan({text:"to link heading"})]),this.createPrompt([createSpan({cls:"prompt-instruction-command",text:"Type ^"}),createSpan({text:"to link blocks"})]),this.createPrompt([createSpan({cls:"prompt-instruction-command",text:"Note: "}),createSpan({text:"Blocks must have been created already"})])}getFile(){let e=this.inputEl.value,n=this.app.metadataCache.getFirstLinkpathDest(e.split(/[\^#]/).shift()||"","");n!=this.file&&(this.file=n,this.file&&(this.cache=this.app.metadataCache.getFileCache(this.file)),this.onInputChanged())}getItemText(e){if(e instanceof wr.TFile)return e.path;if(Object.prototype.hasOwnProperty.call(e,"heading"))return e.heading;if(Object.prototype.hasOwnProperty.call(e,"id"))return e.id}onChooseItem(e){e instanceof wr.TFile?(this.text.setValue(e.basename),this.file=e,this.cache=this.app.metadataCache.getFileCache(this.file)):Object.prototype.hasOwnProperty.call(e,"heading")?this.text.setValue(this.file.basename+"#"+e.heading):Object.prototype.hasOwnProperty.call(e,"id")&&this.text.setValue(this.file.basename+"^"+e.id)}selectSuggestion({item:e}){let n;e instanceof wr.TFile?(this.file=e,n=e.basename):Object.prototype.hasOwnProperty.call(e,"heading")?n=this.file.basename+"#"+e.heading:Object.prototype.hasOwnProperty.call(e,"id")&&(n=this.file.basename+"^"+e.id);let a=this.file.path.split("/").slice(0,-1);a.length?this.link=a.join("/")+"/"+n:this.link=n,this.text.setValue(n),this.close(),this.onClose()}renderSuggestion(e,n){let{item:a,match:r}=e||{},i=n.createDiv({cls:"suggestion-content"});if(!a){i.setText(this.emptyStateText),i.parentElement.addClass("is-selected");return}if(a instanceof wr.TFile){let o=a.path.length-a.name.length,l=r.matches.map(s=>createSpan("suggestion-highlight"));for(let s=o;s<a.path.length-a.extension.length-1;s++){let c=r.matches.find(u=>u[0]===s);if(c){let u=l[r.matches.indexOf(c)];i.appendChild(u),u.appendText(a.path.substring(c[0],c[1])),s+=c[1]-c[0]-1;continue}i.appendText(a.path[s])}n.createDiv({cls:"suggestion-note",text:a.path})}else Object.prototype.hasOwnProperty.call(a,"heading")?(i.setText(a.heading),i.prepend(createSpan({cls:"suggestion-flair",text:`H${a.level}`}))):Object.prototype.hasOwnProperty.call(a,"id")&&i.setText(a.id)}get headings(){return this.file?(this.cache||(this.cache=this.app.metadataCache.getFileCache(this.file)),this.cache.headings||[]):[]}get blocks(){return this.file?(this.cache||(this.cache=this.app.metadataCache.getFileCache(this.file)),Object.values(this.cache.blocks||{})||[]):[]}getItems(){let e=this.inputEl.value;return/#/.test(e)?(this.modifyInput=n=>n.split(/#/).pop(),this.headings):/\^/.test(e)?(this.modifyInput=n=>n.split(/\^/).pop(),this.blocks):this.files}};var _s=Ee(Nn());var Pa=class extends lt{constructor(e,n,a,r){super(e.app);this.plugin=e;this.calendar=n;this.saved=!1;this.event={name:null,description:null,date:{month:null,day:null,year:null},id:Ze(6),note:null,category:null};a&&(this.event=(0,_s.default)(a),this.editing=!0),r&&(this.event.date=(0,_s.default)(r)),this.containerEl.addClass("fantasy-calendar-create-event")}async display(){this.contentEl.empty(),this.titleEl.setText(this.editing?"Edit Event":"New Event"),this.infoEl=this.contentEl.createDiv("event-info"),this.buildInfo(),this.dateEl=this.contentEl.createDiv("event-date"),this.buildDate(),new bt.Setting(this.contentEl).addButton(e=>{e.setButtonText("Save").setCta().onClick(async()=>{if(!this.event.name?.length){new bt.Notice("The event must have a name.");return}if(this.event.end){this.event.end={year:this.event.end.year??this.event.date.year,month:this.event.end.month??this.event.date.month,day:this.event.end.day??this.event.date.day};let n=this.event.date,a=this.event.end,r=Math.max(...this.calendar.static.months.map(s=>s.length)),i=r*this.calendar.static.months.length,o=(n.year-1)*i+(n.month??-1)*r+n.day,l=(a.year-1)*i+(a.month??-1)*r+a.day;if(o>l){let s={...this.event.end};this.event.end={...this.event.date},this.event.date={...s}}}this.saved=!0,this.event.name||(this.event.name="Event"),this.close()})}).addExtraButton(e=>{e.setIcon("cross").setTooltip("Cancel").onClick(()=>this.close())})}buildDate(){this.dateEl.empty(),this.buildStartDate(),this.endEl=this.dateEl.createDiv(),this.event.end?this.buildEndDate():new bt.Setting(this.endEl).setName("Add End Date").addToggle(n=>{n.setValue(!1).onChange(a=>this.buildEndDate())});let e=this.dateEl.createDiv("fantasy-calendar-event-formula");this.event.formulas?.length?this.buildEventFormulas(e):new bt.Setting(e).setName("Add Interval").addToggle(n=>{n.setValue(!1).onChange(a=>this.buildEventFormulas(e))}),this.stringEl=this.dateEl.createDiv("event-date-string setting-item-description"),this.buildDateString()}buildEventFormulas(e){e.empty(),this.event.formulas=this.event.formulas??[{type:"interval",number:1,timespan:"days"}],new bt.Setting(e).setName("Event Interval").addText(n=>{n.setValue(`${this.event.formulas[0].number}`).onChange(a=>{this.event.formulas[0].number=Number(a)}).inputEl.setAttr("type","number")}).addDropdown(n=>{n.addOption("days","days")})}buildStartDate(){this.startEl=this.dateEl.createDiv("fantasy-calendar-event-date"),this.startEl.createSpan({text:"Start:"}),this.startDateEl=this.startEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(this.startDateEl,this.event.date)}buildEndDate(){this.event.end=this.event.end??{...this.event.date},this.endEl.empty(),this.endEl.addClass("fantasy-calendar-event-date"),this.endEl.createSpan({text:"End:"}),this.endDateEl=this.endEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(this.endDateEl,this.event.end)}buildDateString(){this.stringEl.empty(),this.stringEl.createSpan({text:Kt(this.event.date,this.calendar,this.event.end)})}buildDateFields(e,n=this.event.date){e.empty();let a=e.createDiv("fantasy-calendar-date-field");a.createEl("label",{text:"Day"}),new bt.TextComponent(a).setPlaceholder("Day").setValue(`${n.day}`).onChange(s=>{n.day=Number(s),this.buildDateString()}).inputEl.setAttr("type","number");let i=e.createDiv("fantasy-calendar-date-field");i.createEl("label",{text:"Month"}),new bt.DropdownComponent(i).addOptions(Object.fromEntries([["select","Select Month"],...this.calendar.static.months.map(s=>[s.name,s.name])])).setValue(n.month!=null?this.calendar.static.months[n.month].name:"select").onChange(s=>{s==="select"&&(n.month=null);let c=this.calendar.static.months.find(u=>u.name==s);n.month=this.calendar.static.months.indexOf(c),this.buildDateString()});let o=e.createDiv("fantasy-calendar-date-field");o.createEl("label",{text:"Year"}),new bt.TextComponent(o).setPlaceholder("Year").setValue(`${n.year}`).onChange(s=>{!s||s==null?n.year=void 0:n.year=Number(s),this.buildDateString()}).inputEl.setAttr("type","number")}buildInfo(){this.infoEl.empty(),new bt.Setting(this.infoEl).setName("Note").setDesc("Link the event to a note.").addText(n=>{let a=this.app.vault.getFiles();if(n.setPlaceholder("Path"),this.event.note){let[i,o]=this.event.note.split(/[#^]/),l=this.app.metadataCache.getFirstLinkpathDest(i,"");l&&l instanceof bt.TFile&&n.setValue(`${l.basename}${o?"#":""}${o||""}`)}let r=new Ai(this.app,n,[...a]);r.onClose=async()=>{n.inputEl.blur(),this.event.note=r.link,this.tryParse(r.file)}}),new bt.Setting(this.infoEl).setName("Event Name").addText(n=>n.setPlaceholder("Event Name").setValue(this.event.name).onChange(a=>{this.event.name=a}));let e=this.infoEl.createDiv("event-description");e.createEl("label",{text:"Event Description"}),new bt.TextAreaComponent(e).setPlaceholder("Event Description").setValue(this.event.description).onChange(n=>{this.event.description=n}),new bt.Setting(this.infoEl).setName("Event Category").addDropdown(n=>{let a=Object.fromEntries(this.calendar.categories.map(r=>[r.id,r.name]));n.addOptions(a).setValue(this.event.category).onChange(r=>this.event.category=r)})}async tryParse(e){this.event.name=e.basename;let n=this.app.metadataCache.getFileCache(e),{frontmatter:a}=n;if(a){if("fc-display-name"in a&&(this.event.name=a["fc-display-name"]),"fc-date"in a){let{day:r,month:i,year:o}=a["fc-date"];if(r&&(this.event.date.day=r),i){if(typeof i=="string"){let l=this.calendar.static.months?.find(s=>s.name==i)??this.calendar.static.months?.[0];this.event.date.month=this.calendar.static.months?.indexOf(l)}typeof i=="number"&&(this.event.date.month=i-1)}o&&(this.event.date.year=o)}"fc-category"in a&&(this.calendar.categories.find(r=>r.name===a["fc-category"])||this.calendar.categories.push({name:a["fantasy-category"],color:"#808080",id:Ze(6)}),this.event.category=this.calendar.categories.find(r=>r.name===a["fc-category"])?.id)}await this.display()}async onOpen(){await this.display()}};var Wd=Ee(require("obsidian"));function t1(t){let e;return{c(){e=fe(t[4])},m(n,a){R(n,e,a)},p(n,a){a&16&&ge(e,n[4])},d(n){n&&q(e)}}}function n1(t){let e,n,a,r;return{c(){e=B("div")},m(i,o){R(i,e,o),a||(r=ue(n=t[5].call(null,e)),a=!0)},p:Q,d(i){i&&q(e),a=!1,r()}}}function a1(t){let e,n,a,r,i,o,l,s,c,u,d,m;function v(p,S){if(p[3])return n1;if(p[4])return t1}let h=v(t,-1),y=h&&h(t);return{c(){e=B("div"),n=B("div"),a=B("div"),r=fe(t[0]),i=W(),o=B("div"),l=fe(t[1]),s=W(),c=B("div"),u=B("button"),y&&y.c(),D(a,"class","setting-item-name"),D(o,"class","setting-item-description"),D(n,"class","setting-item-info"),D(u,"aria-label",t[2]),D(c,"class","setting-item-control"),D(e,"class","setting-item")},m(p,S){R(p,e,S),C(e,n),C(n,a),C(a,r),C(n,i),C(n,o),C(o,l),C(e,s),C(e,c),C(c,u),y&&y.m(u,null),d||(m=re(u,"click",t[6]),d=!0)},p(p,[S]){S&1&&ge(r,p[0]),S&2&&ge(l,p[1]),h===(h=v(p,S))&&y?y.p(p,S):(y&&y.d(1),y=h&&h(p),y&&(y.c(),y.m(u,null))),S&4&&D(u,"aria-label",p[2])},i:Q,o:Q,d(p){p&&q(e),y&&y.d(),d=!1,m()}}}function r1(t,e,n){let{name:a}=e,{desc:r=""}=e,{label:i=null}=e,{icon:o=null}=e,{text:l=null}=e,s=u=>{(0,Wd.setIcon)(u,o)};function c(u){ce.call(this,t,u)}return t.$$set=u=>{"name"in u&&n(0,a=u.name),"desc"in u&&n(1,r=u.desc),"label"in u&&n(2,i=u.label),"icon"in u&&n(3,o=u.icon),"text"in u&&n(4,l=u.text)},[a,r,i,o,l,s,c]}var Gd=class extends de{constructor(e){super();he(this,e,r1,a1,le,{name:0,desc:1,label:2,icon:3,text:4})}},Ud=Gd;var ja=Ee(require("obsidian"));function i1(t){be(t,"svelte-1cuaalj",".more.svelte-1cuaalj{text-align:center;padding-top:10px;text-decoration:underline;font-style:italic;cursor:pointer}")}function zd(t,e,n){let a=t.slice();return a[26]=e[n],a}function Yd(t){let e,n,a,r,i,o;return r=new Vt({props:{message:"Create a new event to see it here."}}),{c(){e=B("div"),n=W(),a=B("div"),ne(r.$$.fragment),i=W(),D(a,"class","setting-item")},m(l,s){R(l,e,s),R(l,n,s),R(l,a,s),te(r,a,null),C(a,i),o=!0},p:Q,i(l){o||(P(r.$$.fragment,l),o=!0)},o(l){G(r.$$.fragment,l),o=!1},d(l){l&&q(e),l&&q(n),l&&q(a),J(r)}}}function $d(t){let e,n;function a(){return t[20](t[26])}function r(){return t[21](t[26])}return e=new Hd({props:{event:t[26],category:t[13](t[26].category),date:Kt(t[26].date,t[3],t[26].end)}}),e.$on("edit",a),e.$on("delete",r),{c(){ne(e.$$.fragment)},m(i,o){te(e,i,o),n=!0},p(i,o){t=i;let l={};o&16&&(l.event=t[26]),o&16&&(l.category=t[13](t[26].category)),o&24&&(l.date=Kt(t[26].date,t[3],t[26].end)),e.$set(l)},i(i){n||(P(e.$$.fragment,i),n=!0)},o(i){G(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function Zd(t){let e,n,a;return{c(){e=B("div"),e.innerHTML="<small>Load More Events...</small>",D(e,"class","more svelte-1cuaalj")},m(r,i){R(r,e,i),n||(a=re(e,"click",t[22]),n=!0)},p:Q,d(r){r&&q(e),n=!1,a()}}}function o1(t){let e,n,a,r,i,o,l,s,c,u,d,m,v;e=new Ud({props:{name:"Delete All Events",icon:"trash"}}),e.$on("click",t[18]),o=new Bt({}),o.$on("click",t[19]);let h=t[4],y=[];for(let A=0;A<h.length;A+=1)y[A]=$d(zd(t,h,A));let p=A=>G(y[A],1,1,()=>{y[A]=null}),S=null;h.length||(S=Yd(t));let _=!t[0]&&t[4].length<t[2].length&&Zd(t);return{c(){ne(e.$$.fragment),n=W(),a=B("div"),i=W(),ne(o.$$.fragment),l=W(),s=B("div");for(let A=0;A<y.length;A+=1)y[A].c();S&&S.c(),c=W(),_&&_.c(),u=Ue(),D(a,"class","filter"),D(s,"class","existing-items")},m(A,L){te(e,A,L),R(A,n,L),R(A,a,L),R(A,i,L),te(o,A,L),R(A,l,L),R(A,s,L);for(let k=0;k<y.length;k+=1)y[k].m(s,null);S&&S.m(s,null),R(A,c,L),_&&_.m(A,L),R(A,u,L),d=!0,m||(v=ue(r=t[16].call(null,a)),m=!0)},p(A,L){if(L&28696){h=A[4];let k;for(k=0;k<h.length;k+=1){let E=zd(A,h,k);y[k]?(y[k].p(E,L),P(y[k],1)):(y[k]=$d(E),y[k].c(),P(y[k],1),y[k].m(s,null))}for(De(),k=h.length;k<y.length;k+=1)p(k);_e(),!h.length&&S?S.p(A,L):h.length?S&&(De(),G(S,1,1,()=>{S=null}),_e()):(S=Yd(A),S.c(),P(S,1),S.m(s,null))}!A[0]&&A[4].length<A[2].length?_?_.p(A,L):(_=Zd(A),_.c(),_.m(u.parentNode,u)):_&&(_.d(1),_=null)},i(A){if(!d){P(e.$$.fragment,A),P(o.$$.fragment,A);for(let L=0;L<h.length;L+=1)P(y[L]);d=!0}},o(A){G(e.$$.fragment,A),G(o.$$.fragment,A),y=y.filter(Boolean);for(let L=0;L<y.length;L+=1)G(y[L]);d=!1},d(A){J(e,A),A&&q(n),A&&q(a),A&&q(i),J(o,A),A&&q(l),A&&q(s),Ge(y,A),S&&S.d(),A&&q(c),_&&_.d(A),A&&q(u),m=!1,v()}}}function s1(t){let e,n;return e=new ct({props:{name:"Events",desc:`Displaying ${t[1].length}/${t[3].events.length} events.`,open:!1,$$slots:{default:[o1]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,[r]){let i={};r&10&&(i.desc=`Displaying ${a[1].length}/${a[3].events.length} events.`),r&536870973&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function l1(t,e,n){let a,r,i,o,l,s,{plugin:c}=e,u=Ne("store");Fe(t,u,I=>n(3,o=I));let{eventStore:d,monthStore:m}=u;Fe(t,d,I=>n(2,i=I));let{sortedStore:v}=d,h=pn(1);Fe(t,h,I=>n(5,s=I));let y=!1,p=pn("");Fe(t,p,I=>n(23,a=I));let S=et([v,p],([I,U])=>{if(!U||!U.length)return n(0,y=!1),I;let $=[];for(let ee of I)(0,ja.prepareFuzzySearch)(U)(ee.name)&&$.push(ee);return n(0,y=!0),$});Fe(t,S,I=>n(1,r=I));let _=et([S,h],([I,U])=>I.slice(0,100*U));Fe(t,_,I=>n(4,l=I));let A=I=>{d.delete(I.id)},L=I=>o.categories.find(({id:U})=>U==I),k=I=>{let U=new Pa(c,o,I);U.onClose=()=>{!U.saved||(U.editing?d.update(I.id,{...U.event}):d.add({...U.event}))},U.open()},E=async()=>{await br(c.app,"Are you sure you want to delete all events from this calendar?")&&d.set([])},w=I=>{I.createDiv();let U;new ja.Setting(I).setName("Filter events").addSearch($=>{U=$,$.onChange((0,ja.debounce)(ee=>{nt(p,a=ee,a)},250))}).addExtraButton($=>{$.setIcon("trash").setTooltip("Delete Filtered Events").onClick(async()=>{await br(c.app,"Are you sure you want to delete the filtered events from this calendar?")&&(d.set(i.filter(ee=>!r.includes(ee))),U.setValue(""),nt(p,a="",a))})})},N=()=>E(),F=()=>k(),j=I=>k(I),x=I=>A(I),T=()=>nt(h,s++,s);return t.$$set=I=>{"plugin"in I&&n(17,c=I.plugin)},[y,r,i,o,l,s,u,d,h,p,S,_,A,L,k,E,w,c,N,F,j,x,T]}var Kd=class extends de{constructor(e){super();he(this,e,l1,s1,le,{plugin:17},i1)}},Qd=Kd;var ki=Ee(require("obsidian"));var Jd=Ee(Xd());function u1(t){be(t,"svelte-1ok7o99",".category.svelte-1ok7o99{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:0.5rem;padding-top:0.75rem}")}function ef(t,e,n){let a=t.slice();return a[11]=e[n],a}function c1(t){let e,n=t[0],a=[];for(let r=0;r<n.length;r+=1)a[r]=tf(ef(t,n,r));return{c(){e=B("div");for(let r=0;r<a.length;r+=1)a[r].c();D(e,"class","existing-items")},m(r,i){R(r,e,i);for(let o=0;o<a.length;o+=1)a[o].m(e,null)},p(r,i){if(i&65){n=r[0];let o;for(o=0;o<n.length;o+=1){let l=ef(r,n,o);a[o]?a[o].p(l,i):(a[o]=tf(l),a[o].c(),a[o].m(e,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=n.length}},i:Q,o:Q,d(r){r&&q(e),Ge(a,r)}}}function d1(t){let e,n;return e=new Vt({props:{message:"Create a new event category to see it here."}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p:Q,i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function tf(t){let e,n,a,r,i,o,l,s,c,u,d,m,v;function h(...y){return t[9](t[11],...y)}return{c(){e=B("div"),n=B("div"),r=W(),i=B("div"),o=B("input"),s=W(),c=B("div"),d=W(),D(o,"type","color"),o.value=l=t[11].color,D(i,"class","color"),D(e,"class","category svelte-1ok7o99")},m(y,p){R(y,e,p),C(e,n),C(e,r),C(e,i),C(i,o),C(e,s),C(e,c),C(e,d),m||(v=[ue(a=t[4].call(null,n,t[11])),re(o,"change",h),ue(u=t[5].call(null,c,t[11]))],m=!0)},p(y,p){t=y,a&&ot(a.update)&&p&1&&a.update.call(null,t[11]),p&1&&l!==(l=t[11].color)&&(o.value=l),u&&ot(u.update)&&p&1&&u.update.call(null,t[11])},d(y){y&&q(e),m=!1,we(v)}}}function f1(t){let e,n,a,r,i,o;e=new Bt({}),e.$on("click",t[8]);let l=[d1,c1],s=[];function c(u,d){return u[0].length?1:0}return a=c(t,-1),r=s[a]=l[a](t),{c(){ne(e.$$.fragment),n=W(),r.c(),i=Ue()},m(u,d){te(e,u,d),R(u,n,d),s[a].m(u,d),R(u,i,d),o=!0},p(u,d){let m=a;a=c(u,d),a===m?s[a].p(u,d):(De(),G(s[m],1,1,()=>{s[m]=null}),_e(),r=s[a],r?r.p(u,d):(r=s[a]=l[a](u),r.c()),P(r,1),r.m(i.parentNode,i))},i(u){o||(P(e.$$.fragment,u),P(r),o=!0)},o(u){G(e.$$.fragment,u),G(r),o=!1},d(u){J(e,u),u&&q(n),s[a].d(u),u&&q(i)}}}function h1(t){let e,n;return e=new ct({props:{name:"Categories",open:!1,desc:`${t[1].length} categor${t[1].length!=1?"ies":"y"}`,$$slots:{default:[f1]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,[r]){let i={};r&2&&(i.desc=`${a[1].length} categor${a[1].length!=1?"ies":"y"}`),r&16385&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function m1(t,e,n){let a,r,i,o=Ve(),l=Ne("store");Fe(t,l,h=>n(7,r=h));let{categoryStore:s}=l;Fe(t,s,h=>n(1,i=h));let c=(h,y)=>{new ki.TextComponent(h).setValue(y.name).setPlaceholder("Name").onChange(S=>{y.name=S,s.update(y.id,y)}).inputEl.setAttr("style","width: 100%;")},u=(h,y)=>{new ki.ExtraButtonComponent(h).setIcon("trash").onClick(()=>{s.delete(y.id)})},d=(h,y)=>{let{target:p}=h;p instanceof HTMLInputElement&&(y.color=p.value,s.update(y.id,y))},m=()=>s.add({id:Ze(6),color:(0,Jd.default)(),name:"Category"}),v=(h,y)=>d(y,h);return t.$$.update=()=>{if(t.$$.dirty&128){e:n(0,a=r.categories)}},[a,i,l,s,c,u,d,r,m,v]}var nf=class extends de{constructor(e){super();he(this,e,m1,h1,le,{},u1)}},af=nf;var As=Ee(require("obsidian"));var Cs="#808080",Me=["M6.5,16a9.5,9.5 0 1,0 19,0a9.5,9.5 0 1,0 -19,0","M19.79,6C22.25,7.2,25,9.92,25,16s-2.75,8.8-5.21,10a10.59,10.59,0,0,1-3.79.71A10.72,10.72,0,0,1,16,5.28,10.59,10.59,0,0,1,19.79,6Z","M19.43,5.86C21.79,7,24.5,9.7,24.5,16s-2.71,9-5.07,10.14a10.55,10.55,0,0,1-3.43.58A10.72,10.72,0,0,1,16,5.28,10.55,10.55,0,0,1,19.43,5.86Z","M17.87,5.46C20.23,6.34,24,8.88,24,16.17c0,6.85-3.33,9.36-5.69,10.29a11,11,0,0,1-2.31.26A10.72,10.72,0,0,1,16,5.28,10.49,10.49,0,0,1,17.87,5.46Z","M17.79,5.45C20,6.3,23.5,8.77,23.5,15.88c0,7.37-3.75,9.87-5.95,10.71a9.92,9.92,0,0,1-1.55.13A10.72,10.72,0,0,1,16,5.28,10.54,10.54,0,0,1,17.79,5.45Z","M17.35,5.38c1.9.79,5.15,3.25,5.15,10.72,0,7.25-3.06,9.68-5,10.5a10.87,10.87,0,0,1-1.52.12A10.72,10.72,0,0,1,16,5.28,10.1,10.1,0,0,1,17.35,5.38Z","M17.05,5.34c1.6.75,4.45,3.17,4.45,10.79,0,7.39-2.68,9.76-4.3,10.52a11.9,11.9,0,0,1-1.2.07A10.72,10.72,0,0,1,16,5.28,9,9,0,0,1,17.05,5.34Z","M16.85,5.33c1.3.74,3.65,3.12,3.65,10.67s-2.35,9.93-3.65,10.67c-.28,0-.56,0-.85,0A10.72,10.72,0,0,1,16,5.28,7.92,7.92,0,0,1,16.85,5.33Z","M16.46,5.31c.95.78,3,3.34,3,10.69s-2.09,9.91-3,10.69l-.46,0A10.72,10.72,0,0,1,16,5.28Z","M16.29,5.3c.65.8,2.21,3.48,2.21,10.78S17,25.91,16.3,26.7l-.3,0A10.72,10.72,0,0,1,16,5.28Z","M16.13,5.29c.37.89,1.37,3.92,1.37,10.79s-1,9.76-1.36,10.63H16A10.72,10.72,0,0,1,16,5.28Z","M16,5.29A85.5,85.5,0,0,1,16.5,16,85.5,85.5,0,0,1,16,26.71h0A10.72,10.72,0,0,1,16,5.28Z","M16,26.72A10.72,10.72,0,0,1,16,5.28Z","M15.5,16A85.59,85.59,0,0,0,16,26.72,10.72,10.72,0,0,1,16,5.28,85.59,85.59,0,0,0,15.5,16Z","M14.5,16.08c0,6.84,1,9.77,1.36,10.63a10.71,10.71,0,0,1,0-21.42C15.5,6.17,14.5,9.2,14.5,16.08Z","M15.7,26.7a10.7,10.7,0,0,1,0-21.4c-.65.8-2.21,3.47-2.21,10.78S15,25.92,15.7,26.7Z","M15.55,26.7a10.71,10.71,0,0,1,0-21.4c-1,.78-3.05,3.34-3.05,10.7S14.6,25.92,15.55,26.7Z","M15.16,26.68a10.71,10.71,0,0,1,0-21.36C13.85,6.06,11.5,8.43,11.5,16S13.85,25.94,15.16,26.68Z","M14.81,26.65A10.72,10.72,0,0,1,15,5.33c-1.59.76-4.45,3.17-4.45,10.8C10.5,23.53,13.19,25.9,14.81,26.65Z","M14.49,26.6a10.71,10.71,0,0,1,.17-21.23c-1.9.8-5.16,3.24-5.16,10.73C9.5,23.37,12.57,25.79,14.49,26.6Z","M14.46,26.6a10.71,10.71,0,0,1-.24-21.16C12,6.29,8.5,8.76,8.5,15.88,8.5,23.26,12.27,25.76,14.46,26.6Z","M13.72,26.47a10.71,10.71,0,0,1,.43-21C11.78,6.33,8,8.87,8,16.17,8,23,11.35,25.55,13.72,26.47Z","M12.6,26.19a10.73,10.73,0,0,1,0-20.35C10.23,7,7.5,9.67,7.5,16s2.73,9,5.1,10.16Z","M12.23,26a10.7,10.7,0,0,1,0-20C9.77,7.19,7,9.9,7,16S9.77,24.81,12.23,26Z",null,"M19.77,26C22.23,24.81,25,22.1,25,16S22.23,7.19,19.77,6a10.7,10.7,0,0,1,0,20Z","M19.4,26.16C21.77,25,24.5,22.33,24.5,16S21.77,7,19.4,5.84a10.71,10.71,0,0,1,0,20.32Z","M18.28,26.47C20.65,25.55,24,23,24,16.17c0-7.3-3.78-9.84-6.15-10.72a10.71,10.71,0,0,1,.43,21Z","M17.54,26.6c2.19-.84,6-3.34,6-10.72,0-7.12-3.5-9.59-5.72-10.44a10.71,10.71,0,0,1-.24,21.16Z","M17.51,26.6c1.92-.81,5-3.23,5-10.5,0-7.49-3.26-9.93-5.16-10.73a10.71,10.71,0,0,1,.17,21.23Z","M17.19,26.65c1.62-.75,4.31-3.12,4.31-10.52,0-7.63-2.86-10-4.45-10.8a10.72,10.72,0,0,1,.14,21.32Z","M16.84,26.68c1.31-.74,3.66-3.11,3.66-10.68S18.15,6.06,16.84,5.32a10.71,10.71,0,0,1,0,21.36Z","M16.45,26.7c.95-.78,3.05-3.34,3.05-10.7S17.4,6.08,16.45,5.3a10.71,10.71,0,0,1,0,21.4Z","M16.3,26.7c.67-.78,2.2-3.37,2.2-10.62S16.94,6.1,16.29,5.3a10.7,10.7,0,0,1,0,21.4Z","M16.14,26.71c.37-.86,1.36-3.79,1.36-10.63s-1-9.91-1.37-10.79a10.71,10.71,0,0,1,0,21.42Z","M16,26.72A85.59,85.59,0,0,0,16.5,16,85.59,85.59,0,0,0,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72V5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72h0A85.59,85.59,0,0,1,15.5,16,85.59,85.59,0,0,1,16,5.28h0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72h-.14c-.37-.86-1.36-3.79-1.36-10.63s1-9.91,1.37-10.79H16a10.72,10.72,0,0,1,0,21.44Z","M16,26.72l-.3,0c-.67-.78-2.2-3.37-2.2-10.62s1.56-10,2.21-10.78l.29,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72l-.45,0c-1-.78-3.05-3.34-3.05-10.7s2.1-9.92,3.05-10.7l.45,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72c-.28,0-.56,0-.84,0C13.85,25.94,11.5,23.57,11.5,16s2.35-9.94,3.66-10.68c.28,0,.56,0,.84,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a11.7,11.7,0,0,1-1.19-.07c-1.62-.75-4.31-3.12-4.31-10.52,0-7.63,2.86-10,4.45-10.8.35,0,.7,0,1.05,0a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a10.85,10.85,0,0,1-1.51-.12c-1.92-.81-5-3.23-5-10.5,0-7.49,3.26-9.93,5.16-10.73A11.9,11.9,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a11.16,11.16,0,0,1-1.54-.12c-2.19-.84-6-3.34-6-10.72,0-7.12,3.5-9.59,5.72-10.44A10.43,10.43,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a10.69,10.69,0,0,1-2.28-.25C11.35,25.55,8,23,8,16.17c0-7.3,3.78-9.84,6.15-10.72A11.26,11.26,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z","M16,26.72a10.63,10.63,0,0,1-3.4-.56C10.23,25,7.5,22.33,7.5,16s2.73-9,5.1-10.16A10.72,10.72,0,1,1,16,26.72Z","M16,26.72a10.52,10.52,0,0,1-3.77-.7C9.77,24.81,7,22.1,7,16S9.77,7.19,12.23,6A10.52,10.52,0,0,1,16,5.28a10.72,10.72,0,0,1,0,21.44Z"],rf={"New Moon":Me[0],"New Moon Fading":Me[1],"New Moon Faded":Me[2],"Waxing Crescent Rising":Me[3],"Waxing Crescent Risen":Me[4],"Waxing Crescent":Me[6],"Waxing Crescent Fading":Me[7],"Waxing Crescent Faded":Me[8],"First Quarter Rising":Me[9],"First Quarter Risen":Me[10],"First Quarter":Me[12],"First Quarter Fading":Me[13],"First Quarter Faded":Me[14],"Waxing Gibbous Rising":Me[15],"Waxing Gibbous Risen":Me[16],"Waxing Gibbous":Me[18],"Waxing Gibbous Fading":Me[19],"Waxing Gibbous Faded":Me[20],"Full Moon Rising":Me[21],"Full Moon Risen":Me[22],"Full Moon":Me[24],"Full Moon Fading":Me[25],"Full Moon Faded":Me[26],"Waning Gibbous Rising":Me[27],"Waning Gibbous Risen":Me[28],"Waning Gibbous":Me[30],"Waning Gibbous Fading":Me[31],"Waning Gibbous Faded":Me[32],"Last Quarter Rising":Me[33],"Last Quarter Risen":Me[34],"Last Quarter":Me[36],"Last Quarter Fading":Me[37],"Last Quarter Faded":Me[38],"Waning Crescent Rising":Me[39],"Waning Crescent Risen":Me[40],"Waning Crescent":Me[42],"Waning Crescent Fading":Me[43],"Waning Crescent Faded":Me[44],"New Moon Rising":Me[45],"New Moon Risen":Me[46]},of={4:["New Moon","First Quarter","Full Moon","Last Quarter"],8:["New Moon","Waxing Crescent","First Quarter","Waxing Gibbous","Full Moon","Waning Gibbous","Last Quarter","Waning Crescent"],16:["New Moon","New Moon Fading","Waxing Crescent","Waxing Crescent Fading","First Quarter","First Quarter Fading","Waxing Gibbous","Waxing Gibbous Fading","Full Moon","Full Moon Fading","Waning Gibbous","Waning Gibbous Fading","Last Quarter","Last Quarter Fading","Waning Crescent","Waning Crescent Fading"],24:["New Moon","New Moon Fading","Waxing Crescent Rising","Waxing Crescent","Waxing Crescent Fading","First Quarter Rising","First Quarter","First Quarter Fading","Waxing Gibbous Rising","Waxing Gibbous","Waxing Gibbous Fading","Full Moon Rising","Full Moon","Full Moon Fading","Waning Gibbous Rising","Waning Gibbous","Waning Gibbous Fading","Last Quarter Rising","Last Quarter","Last Quarter Fading","Waning Crescent Rising","Waning Crescent","Waning Crescent Fading","New Moon Rising"],40:["New Moon","New Moon Fading","New Moon Faded","Waxing Crescent Rising","Waxing Crescent Risen","Waxing Crescent","Waxing Crescent Fading","Waxing Crescent Faded","First Quarter Rising","First Quarter Risen","First Quarter","First Quarter Fading","First Quarter Faded","Waxing Gibbous Rising","Waxing Gibbous Risen","Waxing Gibbous","Waxing Gibbous Fading","Waxing Gibbous Faded","Full Moon Rising","Full Moon Risen","Full Moon","Full Moon Fading","Full Moon Faded","Waning Gibbous Rising","Waning Gibbous Risen","Waning Gibbous","Waning Gibbous Fading","Waning Gibbous Faded","Last Quarter Rising","Last Quarter Risen","Last Quarter","Last Quarter Fading","Last Quarter Faded","Waning Crescent Rising","Waning Crescent Risen","Waning Crescent","Waning Crescent Fading","Waning Crescent Faded","New Moon Rising","New Moon Risen"]};function p1(t){let e,n,a,r,i,o,l,s;return{c(){e=sn("svg"),n=sn("circle"),r=sn("path"),o=sn("circle"),D(n,"cx","16"),D(n,"cy","16"),D(n,"r","10"),D(n,"fill",a=t[0].faceColor),D(r,"class","shadow"),D(r,"fill",i=t[0].shadowColor),D(r,"d",t[4]),D(o,"cx","16"),D(o,"cy","16"),D(o,"r","10"),D(o,"fill","none"),D(o,"stroke","#000"),D(o,"stroke-width","2px"),D(e,"class","moon"),D(e,"id",l=t[0].id),D(e,"preserveAspectRatio","xMidYMid"),D(e,"aria-label",s=t[1]?`${t[0].name}
${t[3]}`:null),D(e,"width",t[2]),D(e,"height",t[2]),D(e,"viewBox","0 0 32 32")},m(c,u){R(c,e,u),C(e,n),C(e,r),C(e,o)},p(c,[u]){u&1&&a!==(a=c[0].faceColor)&&D(n,"fill",a),u&1&&i!==(i=c[0].shadowColor)&&D(r,"fill",i),u&16&&D(r,"d",c[4]),u&1&&l!==(l=c[0].id)&&D(e,"id",l),u&11&&s!==(s=c[1]?`${c[0].name}
${c[3]}`:null)&&D(e,"aria-label",s),u&4&&D(e,"width",c[2]),u&4&&D(e,"height",c[2])},i:Q,o:Q,d(c){c&&q(e)}}}function g1(t,e,n){let a,{moon:r}=e,{label:i=!0}=e,{size:o=28}=e,{phase:l}=e;return t.$$set=s=>{"moon"in s&&n(0,r=s.moon),"label"in s&&n(1,i=s.label),"size"in s&&n(2,o=s.size),"phase"in s&&n(3,l=s.phase)},t.$$.update=()=>{if(t.$$.dirty&8){e:n(4,a=rf[l])}},[r,i,o,l,a]}var sf=class extends de{constructor(e){super();he(this,e,g1,p1,le,{moon:0,label:1,size:2,phase:3})}},jn=sf;var bn=Ee(require("obsidian"));var Es=class extends lt{constructor(e,n,a){super(e);this.calendar=n;this.saved=!1;this.moon={name:null,cycle:null,offset:null,faceColor:"#fff",shadowColor:"#000",id:Ze(6)};a&&(this.moon={...a},this.editing=!0),this.containerEl.addClass("fantasy-calendar-create-moon")}async display(){this.contentEl.empty(),this.contentEl.createEl("h3",{text:this.editing?"Edit Moon":"New Moon"}),this.infoEl=this.contentEl.createDiv("moon-info"),this.buildInfo(),new bn.Setting(this.contentEl).addButton(e=>{e.setButtonText("Save").setCta().onClick(()=>{if(!this.moon.name?.length){new bn.Notice("The moon must have a name.");return}if(!this.moon.cycle){new bn.Notice("The moon must have a positive cycle.");return}this.saved=!0,this.close()})}).addExtraButton(e=>{e.setIcon("cross").setTooltip("Cancel").onClick(()=>this.close())})}buildInfo(){this.infoEl.empty(),new bn.Setting(this.infoEl).setName("Name").addText(e=>{e.setValue(this.moon.name).onChange(n=>{this.moon.name=n})}),new bn.Setting(this.infoEl).setName("Cycle").setDesc("How many days it takes for the moon to complete a full cycle.").addText(e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.moon.cycle}`).onChange(n=>{isNaN(Number(n))||(this.moon.cycle=Number(n))})}),new bn.Setting(this.infoEl).setName("Offset").setDesc("Shift the starting moon phase by a number of days.").addText(e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.moon.offset}`).onChange(n=>{isNaN(Number(n))||(this.moon.offset=Number(n))})}),new bn.Setting(this.infoEl).setName("Face Color").addText(e=>{e.inputEl.setAttr("type","color"),e.setValue(this.moon.faceColor).onChange(n=>{this.moon.faceColor=n})}),new bn.Setting(this.infoEl).setName("Shadow Color").addText(e=>{e.inputEl.setAttr("type","color"),e.setValue(this.moon.shadowColor).onChange(n=>{this.moon.shadowColor=n})})}async onOpen(){await this.display()}};function y1(t){be(t,"svelte-v24qmo",".moon.svelte-v24qmo{display:grid;grid-template-columns:1fr auto;align-items:center;justify-content:space-between;gap:1rem;margin-top:0.5rem}.setting-item-name.svelte-v24qmo{display:flex;align-items:center}.icons.svelte-v24qmo{display:flex;align-self:flex-start;justify-self:flex-end;align-items:center}.icon.svelte-v24qmo{align-items:center}")}function lf(t,e,n){let a=t.slice();return a[15]=e[n],a}function v1(t){let e,n,a=t[0],r=[];for(let o=0;o<a.length;o+=1)r[o]=cf(lf(t,a,o));let i=o=>G(r[o],1,1,()=>{r[o]=null});return{c(){e=B("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","existing-items")},m(o,l){R(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,l){if(l&385){a=o[0];let s;for(s=0;s<a.length;s+=1){let c=lf(o,a,s);r[s]?(r[s].p(c,l),P(r[s],1)):(r[s]=cf(c),r[s].c(),P(r[s],1),r[s].m(e,null))}for(De(),s=a.length;s<r.length;s+=1)i(s);_e()}},i(o){if(!n){for(let l=0;l<a.length;l+=1)P(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)G(r[l]);n=!1},d(o){o&&q(e),Ge(r,o)}}}function b1(t){let e,n;return e=new Vt({props:{message:"Create a new moon to see it here."}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p:Q,i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function uf(t){let e,n,a=t[15].offset+"",r,i;return{c(){e=B("span"),n=fe(", offset: "),r=fe(a),i=fe(" days")},m(o,l){R(o,e,l),C(e,n),C(e,r),C(e,i)},p(o,l){l&1&&a!==(a=o[15].offset+"")&&ge(r,a)},d(o){o&&q(e)}}}function cf(t){let e,n,a,r,i,o=t[15].name+"",l,s,c,u,d,m,v=t[15].cycle+"",h,y,p,S,_,A,L,k,E,w,N,F,j,x;r=new jn({props:{moon:t[15],phase:"First Quarter",label:!1,size:20}});let T=t[15].offset&&uf(t);function I(){return t[12](t[15])}function U(){return t[13](t[15])}return{c(){e=B("div"),n=B("div"),a=B("span"),ne(r.$$.fragment),i=W(),l=fe(o),s=W(),c=B("div"),u=B("div"),d=B("span"),m=fe("Cycle: "),h=fe(v),y=fe(" days"),p=W(),T&&T.c(),S=W(),_=B("div"),A=B("div"),k=W(),E=B("div"),N=W(),D(a,"class","setting-item-name svelte-v24qmo"),D(u,"class","date"),D(c,"class","setting-item-description"),D(n,"class","moon-info"),D(A,"class","icon svelte-v24qmo"),D(E,"class","icon svelte-v24qmo"),D(_,"class","icons svelte-v24qmo"),D(e,"class","moon svelte-v24qmo")},m($,ee){R($,e,ee),C(e,n),C(n,a),te(r,a,null),C(a,i),C(a,l),C(n,s),C(n,c),C(c,u),C(u,d),C(d,m),C(d,h),C(d,y),C(u,p),T&&T.m(u,null),C(e,S),C(e,_),C(_,A),C(_,k),C(_,E),C(e,N),F=!0,j||(x=[ue(L=t[6].call(null,A)),re(A,"click",I),ue(w=t[5].call(null,E)),re(E,"click",U)],j=!0)},p($,ee){t=$;let Z={};ee&1&&(Z.moon=t[15]),r.$set(Z),(!F||ee&1)&&o!==(o=t[15].name+"")&&ge(l,o),(!F||ee&1)&&v!==(v=t[15].cycle+"")&&ge(h,v),t[15].offset?T?T.p(t,ee):(T=uf(t),T.c(),T.m(u,null)):T&&(T.d(1),T=null)},i($){F||(P(r.$$.fragment,$),F=!0)},o($){G(r.$$.fragment,$),F=!1},d($){$&&q(e),J(r),T&&T.d(),j=!1,we(x)}}}function w1(t){let e,n,a,r,i,o,l,s;e=new Ot({props:{name:"Display Moons",desc:"Display moons by default when viewing this calendar.",value:t[1]}}),e.$on("click",t[10]),a=new Bt({}),a.$on("click",t[11]);let c=[b1,v1],u=[];function d(m,v){return m[0].length?1:0}return i=d(t,-1),o=u[i]=c[i](t),{c(){ne(e.$$.fragment),n=W(),ne(a.$$.fragment),r=W(),o.c(),l=Ue()},m(m,v){te(e,m,v),R(m,n,v),te(a,m,v),R(m,r,v),u[i].m(m,v),R(m,l,v),s=!0},p(m,v){let h={};v&2&&(h.value=m[1]),e.$set(h);let y=i;i=d(m,v),i===y?u[i].p(m,v):(De(),G(u[y],1,1,()=>{u[y]=null}),_e(),o=u[i],o?o.p(m,v):(o=u[i]=c[i](m),o.c()),P(o,1),o.m(l.parentNode,l))},i(m){s||(P(e.$$.fragment,m),P(a.$$.fragment,m),P(o),s=!0)},o(m){G(e.$$.fragment,m),G(a.$$.fragment,m),G(o),s=!1},d(m){J(e,m),m&&q(n),J(a,m),m&&q(r),u[i].d(m),m&&q(l)}}}function D1(t){let e,n;return e=new ct({props:{name:"Moons",open:!1,desc:`${t[0].length} moon${t[0].length!=1?"s":""}`,$$slots:{default:[w1]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,[r]){let i={};r&1&&(i.desc=`${a[0].length} moon${a[0].length!=1?"s":""}`),r&262147&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function _1(t,e,n){let a,r,i,{plugin:o}=e,l=Ne("store");Fe(t,l,_=>n(14,a=_));let{moonStore:s,displayMoons:c}=l;Fe(t,s,_=>n(0,r=_)),Fe(t,c,_=>n(1,i=_));let u=_=>{let A=new As.ExtraButtonComponent(_).setIcon("trash").setTooltip("Delete")},d=_=>{new As.ExtraButtonComponent(_).setIcon("pencil").setTooltip("Edit")},m=_=>{s.delete(_.id)},v=_=>{let A=new Es(o.app,a,_);A.onClose=()=>{!A.saved||(A.editing?s.update(_.id,{...A.moon}):s.add({...A.moon}))},A.open()},h=()=>nt(c,i=!i,i),y=()=>v(),p=_=>v(_),S=_=>m(_);return t.$$set=_=>{"plugin"in _&&n(9,o=_.plugin)},[r,i,l,s,c,u,d,m,v,o,h,y,p,S]}var df=class extends de{constructor(e){super();he(this,e,_1,D1,le,{plugin:9},y1)}},ff=df;var ks=Ee(require("obsidian"));function C1(t){be(t,"svelte-1rh93fc",".leapday.svelte-1rh93fc.svelte-1rh93fc{display:grid;grid-template-columns:1fr auto;align-items:center;justify-content:space-between;gap:1rem;margin-top:0.5rem}.leapday-info.svelte-1rh93fc.svelte-1rh93fc{width:100%}.icons.svelte-1rh93fc.svelte-1rh93fc{display:flex;align-self:center;justify-self:flex-end;align-items:center}.leapday.svelte-1rh93fc .icon.svelte-1rh93fc{align-items:center}")}function E1(t){let e,n,a,r=t[0].name+"",i,o,l,s,c,u,d,m,v,h,y,p,S;return{c(){e=B("div"),n=B("div"),a=B("span"),i=fe(r),o=W(),l=B("div"),s=fe(t[1]),c=W(),u=B("div"),d=B("div"),v=W(),h=B("div"),D(a,"class","setting-item-name"),D(l,"class","setting-item-description"),D(n,"class","leapday-info svelte-1rh93fc"),D(d,"class","icon svelte-1rh93fc"),D(h,"class","icon svelte-1rh93fc"),D(u,"class","icons svelte-1rh93fc"),D(e,"class","leapday svelte-1rh93fc")},m(_,A){R(_,e,A),C(e,n),C(n,a),C(a,i),C(n,o),C(n,l),C(l,s),C(e,c),C(e,u),C(u,d),C(u,v),C(u,h),p||(S=[ue(m=t[4].call(null,d)),re(d,"click",t[5]),ue(y=t[3].call(null,h)),re(h,"click",t[6])],p=!0)},p(_,[A]){A&1&&r!==(r=_[0].name+"")&&ge(i,r),A&2&&ge(s,_[1])},i:Q,o:Q,d(_){_&&q(e),p=!1,we(S)}}}function A1(t,e,n){let a,r=Ve(),i=u=>{new ks.ExtraButtonComponent(u).setIcon("trash").setTooltip("Delete").extraSettingsEl.setAttr("style","margin-left: 0;")},o=u=>{new ks.ExtraButtonComponent(u).setIcon("pencil").setTooltip("Edit")},{leapday:l}=e,s=()=>r("edit"),c=()=>r("delete");return t.$$set=u=>{"leapday"in u&&n(0,l=u.leapday)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(1,a=Za(l))}},[l,a,r,i,o,s,c]}var hf=class extends de{constructor(e){super();he(this,e,A1,E1,le,{leapday:0},C1)}},mf=hf;var kf=Ee(Nn()),Va=Ee(require("obsidian"));var Cr=Ee(require("obsidian"));function k1(t){be(t,"svelte-n1tx0h",".intercalary-settings.svelte-n1tx0h{display:flex;justify-content:space-around}.buttons.svelte-n1tx0h{display:flex;justify-content:flex-end}")}function pf(t,e,n){let a=t.slice();return a[24]=e[n],a}function gf(t,e,n){let a=t.slice();return a[27]=e[n],a}function yf(t,e,n){let a=t.slice();return a[30]=e[n],a[32]=n,a}function vf(t){let e,n=(t[30].name??"")+"",a,r,i,o;return{c(){e=B("option"),a=fe(n),r=W(),e.__value=i=t[32],e.value=e.__value,e.selected=o=t[32]==t[0].timespan},m(l,s){R(l,e,s),C(e,a),C(e,r)},p(l,s){s[0]&2&&n!==(n=(l[30].name??"")+"")&&ge(a,n),s[0]&1&&o!==(o=l[32]==l[0].timespan)&&(e.selected=o)},d(l){l&&q(e)}}}function bf(t){let e,n,a,r,i,o,l,s,c,u,d,m,v,h,y,p,S=t[3],_=[];for(let A=0;A<S.length;A+=1)_[A]=wf(gf(t,S,A));return{c(){e=B("div"),n=B("div"),a=B("input"),i=W(),o=B("label"),o.textContent="Numbered",l=W(),s=B("div"),c=B("label"),c.textContent="After",u=W(),d=B("select"),m=B("option"),v=fe("Before 1");for(let A=0;A<_.length;A+=1)_[A].c();D(a,"id","numbered"),D(a,"type","checkbox"),a.checked=r=t[0].numbered,D(o,"for","numbered"),D(n,"class","numbered intercalary-field"),D(c,"for","after"),m.selected=h=t[0].after==0,m.__value="0",m.value=m.__value,D(d,"class","dropdown"),t[0].after===void 0&&It(()=>t[18].call(d)),D(s,"class","after intercalary-field"),D(e,"class","setting-item intercalary-settings svelte-n1tx0h")},m(A,L){R(A,e,L),C(e,n),C(n,a),C(n,i),C(n,o),C(e,l),C(e,s),C(s,c),C(s,u),C(s,d),C(d,m),C(m,v);for(let k=0;k<_.length;k+=1)_[k].m(d,null);Mt(d,t[0].after),y||(p=[re(a,"change",t[17]),re(d,"change",t[18])],y=!0)},p(A,L){if(L[0]&1&&r!==(r=A[0].numbered)&&(a.checked=r),L[0]&1&&h!==(h=A[0].after==0)&&(m.selected=h),L[0]&9){S=A[3];let k;for(k=0;k<S.length;k+=1){let E=gf(A,S,k);_[k]?_[k].p(E,L):(_[k]=wf(E),_[k].c(),_[k].m(d,null))}for(;k<_.length;k+=1)_[k].d(1);_.length=S.length}L[0]&1&&Mt(d,A[0].after)},d(A){A&&q(e),Ge(_,A),y=!1,we(p)}}}function wf(t){let e,n=t[27]+"",a,r,i;return{c(){e=B("option"),a=fe(n),e.selected=r=t[0].after==t[27],e.__value=i=t[27],e.value=e.__value},m(o,l){R(o,e,l),C(e,a)},p(o,l){l[0]&8&&n!==(n=o[27]+"")&&ge(a,n),l[0]&9&&r!==(r=o[0].after==o[27])&&(e.selected=r),l[0]&8&&i!==(i=o[27])&&(e.__value=i,e.value=e.__value)},d(o){o&&q(e)}}}function Df(t){let e,n,a,r=t[7](t[24])+"",i,o,l,s,c,u,d,m,v,h,y;function p(){return t[21](t[24])}function S(){return t[22](t[24])}return{c(){e=B("div"),n=B("div"),a=B("div"),i=fe(r),o=W(),l=B("div"),s=B("div"),u=W(),d=B("div"),v=W(),D(a,"class","setting-item-name"),D(n,"class","setting-item-info"),D(l,"class","setting-item-control"),D(e,"class","setting-item")},m(_,A){R(_,e,A),C(e,n),C(n,a),C(a,i),C(e,o),C(e,l),C(l,s),C(l,u),C(l,d),C(e,v),h||(y=[ue(c=t[8].call(null,s)),re(s,"click",p),ue(m=t[9].call(null,d)),re(d,"click",S)],h=!0)},p(_,A){t=_,A[0]&4&&r!==(r=t[7](t[24])+"")&&ge(i,r)},d(_){_&&q(e),h=!1,we(y)}}}function x1(t){let e,n,a,r,i,o,l=Za(t[0])+"",s,c,u,d;e=new kn({props:{type:"number",name:"Offset",desc:"Offset the year the leap day is applied to.",value:`${t[0].offset}`}}),e.$on("blur",t[19]),a=new Bt({}),a.$on("click",t[20]);let m=t[2],v=[];for(let h=0;h<m.length;h+=1)v[h]=Df(pf(t,m,h));return{c(){ne(e.$$.fragment),n=W(),ne(a.$$.fragment),r=W(),i=B("div"),o=B("div"),s=fe(l),c=W();for(let h=0;h<v.length;h+=1)v[h].c();u=Ue(),D(o,"class","setting-item-description"),D(i,"class","setting-item")},m(h,y){te(e,h,y),R(h,n,y),te(a,h,y),R(h,r,y),R(h,i,y),C(i,o),C(o,s),R(h,c,y);for(let p=0;p<v.length;p+=1)v[p].m(h,y);R(h,u,y),d=!0},p(h,y){let p={};if(y[0]&1&&(p.value=`${h[0].offset}`),e.$set(p),(!d||y[0]&1)&&l!==(l=Za(h[0])+"")&&ge(s,l),y[0]&197){m=h[2];let S;for(S=0;S<m.length;S+=1){let _=pf(h,m,S);v[S]?v[S].p(_,y):(v[S]=Df(_),v[S].c(),v[S].m(u.parentNode,u))}for(;S<v.length;S+=1)v[S].d(1);v.length=m.length}},i(h){d||(P(e.$$.fragment,h),P(a.$$.fragment,h),d=!0)},o(h){G(e.$$.fragment,h),G(a.$$.fragment,h),d=!1},d(h){J(e,h),h&&q(n),J(a,h),h&&q(r),h&&q(i),h&&q(c),Ge(v,h),h&&q(u)}}}function F1(t){let e,n,a,r,i,o,l,s,c,u,d,m,v,h,y,p,S,_,A,L;n=new kn({props:{name:"Name",desc:"",value:t[0].name,warn:!t[0].name}}),n.$on("blur",t[14]);let k=t[1],E=[];for(let N=0;N<k.length;N+=1)E[N]=vf(yf(t,k,N));u=new Ot({props:{name:"Intercalary",value:t[0].intercalary,desc:"Intercalary days interrupt the normal flow of the month."}}),u.$on("click",t[16]);let w=t[4]&&bf(t);return v=new ct({props:{name:"Conditions",open:!0,warn:!t[0].interval.length,label:"At least one condition is required",$$slots:{default:[x1]},$$scope:{ctx:t}}}),{c(){e=B("div"),ne(n.$$.fragment),a=W(),r=B("div"),i=B("div"),i.innerHTML=`<div class="setting-item-name">Month</div>
<div class="setting-item-description">The leap day will be added to this month.</div>`,o=W(),l=B("div"),s=B("select");for(let N=0;N<E.length;N+=1)E[N].c();c=W(),ne(u.$$.fragment),d=W(),w&&w.c(),m=W(),ne(v.$$.fragment),h=W(),y=B("div"),p=B("div"),D(i,"class","setting-item-info"),D(s,"class","dropdown"),t[0].timespan===void 0&&It(()=>t[15].call(s)),D(l,"class","setting-item-control"),D(r,"class","setting-item"),D(e,"class","fantasy-calendar-nested-settings"),D(y,"class","buttons svelte-n1tx0h")},m(N,F){R(N,e,F),te(n,e,null),C(e,a),C(e,r),C(r,i),C(r,o),C(r,l),C(l,s);for(let j=0;j<E.length;j+=1)E[j].m(s,null);Mt(s,t[0].timespan),C(e,c),te(u,e,null),C(e,d),w&&w.m(e,null),R(N,m,F),te(v,N,F),R(N,h,F),R(N,y,F),C(y,p),_=!0,A||(L=[re(s,"change",t[15]),ue(S=t[10].call(null,p)),re(p,"click",t[23])],A=!0)},p(N,F){let j={};if(F[0]&1&&(j.value=N[0].name),F[0]&1&&(j.warn=!N[0].name),n.$set(j),F[0]&3){k=N[1];let I;for(I=0;I<k.length;I+=1){let U=yf(N,k,I);E[I]?E[I].p(U,F):(E[I]=vf(U),E[I].c(),E[I].m(s,null))}for(;I<E.length;I+=1)E[I].d(1);E.length=k.length}F[0]&1&&Mt(s,N[0].timespan);let x={};F[0]&1&&(x.value=N[0].intercalary),u.$set(x),N[4]?w?w.p(N,F):(w=bf(N),w.c(),w.m(e,null)):w&&(w.d(1),w=null);let T={};F[0]&1&&(T.warn=!N[0].interval.length),F[0]&5|F[1]&4&&(T.$$scope={dirty:F,ctx:N}),v.$set(T)},i(N){_||(P(n.$$.fragment,N),P(u.$$.fragment,N),P(v.$$.fragment,N),_=!0)},o(N){G(n.$$.fragment,N),G(u.$$.fragment,N),G(v.$$.fragment,N),_=!1},d(N){N&&q(e),J(n),Ge(E,N),J(u),w&&w.d(),N&&q(m),J(v,N),N&&q(h),N&&q(y),A=!1,we(L)}}}function T1(t,e,n){let a,r,i,o,l,s=Ve(),{app:c}=e,{leapDay:u}=e,{calendar:d}=e,m=x=>{let T=new xs(c,u.interval.length>0,x);T.onClose=()=>{!T.saved||!T.condition.interval||(x?u.interval.splice(u.interval.indexOf(x),1,T.condition):u.interval.push(T.condition),n(0,u))},T.open()},v=x=>{let T=[`${x.interval}`];return x.exclusive&&T.push("(Exclusive)"),x.ignore&&T.push(" - Ignoring Offset"),T.join(" ")},h=x=>{new Cr.ExtraButtonComponent(x).setIcon("pencil")},y=x=>{new Cr.ExtraButtonComponent(x).setIcon("trash")},p=x=>{new Cr.ButtonComponent(x).setButtonText("Cancel").setCta()},S=x=>n(0,u.name=x.detail,u);function _(){u.timespan=mn(this),n(0,u)}let A=x=>n(0,u.intercalary=!u.intercalary,u),L=()=>n(0,u.numbered=!u.numbered,u);function k(){u.after=mn(this),n(0,u)}let E=x=>n(0,u.offset=x.detail,u),w=()=>m(),N=x=>m(x),F=x=>n(0,u.interval=u.interval.filter(T=>T!=x),u),j=()=>s("cancel");return t.$$set=x=>{"app"in x&&n(11,c=x.app),"leapDay"in x&&n(0,u=x.leapDay),"calendar"in x&&n(12,d=x.calendar)},t.$$.update=()=>{if(t.$$.dirty[0]&1){e:n(4,a=u.intercalary)}if(t.$$.dirty[0]&4096){e:n(1,r=d.static.months)}if(t.$$.dirty[0]&3){e:n(13,i=r[u.timespan])}if(t.$$.dirty[0]&8192){e:n(3,o=i.length?[...Array(i.length).keys()].map(x=>x+1):[])}if(t.$$.dirty[0]&1){e:n(2,l=u.interval.sort((x,T)=>x.interval-T.interval))}},[u,r,l,o,a,s,m,v,h,y,p,c,d,i,S,_,A,L,k,E,w,N,F,j]}var _f=class extends de{constructor(e){super();he(this,e,T1,F1,le,{app:11,leapDay:0,calendar:12},k1,[-1,-1])}},Cf=_f;function S1(t){let e,n,a,r,i,o;return e=new kn({props:{type:"number",name:"Interval",desc:"How often the condition applies.",value:t[0].interval,warn:!t[0].interval}}),e.$on("blur",t[2]),a=new Ot({props:{disabled:!t[1],name:"Exclusive",desc:"If true, the leap day will not apply when the year meets the condition.\\n\\nRequires the leap day to have at least one non-exclusive condition.",value:t[0].exclusive}}),a.$on("click",t[3]),i=new Ot({props:{name:"Ignore Offset",desc:"The condition will ignore the leap day's offset when checking to apply.",value:t[0].ignore}}),i.$on("click",t[4]),{c(){ne(e.$$.fragment),n=W(),ne(a.$$.fragment),r=W(),ne(i.$$.fragment)},m(l,s){te(e,l,s),R(l,n,s),te(a,l,s),R(l,r,s),te(i,l,s),o=!0},p(l,[s]){let c={};s&1&&(c.value=l[0].interval),s&1&&(c.warn=!l[0].interval),e.$set(c);let u={};s&2&&(u.disabled=!l[1]),s&1&&(u.value=l[0].exclusive),a.$set(u);let d={};s&1&&(d.value=l[0].ignore),i.$set(d)},i(l){o||(P(e.$$.fragment,l),P(a.$$.fragment,l),P(i.$$.fragment,l),o=!0)},o(l){G(e.$$.fragment,l),G(a.$$.fragment,l),G(i.$$.fragment,l),o=!1},d(l){J(e,l),l&&q(n),J(a,l),l&&q(r),J(i,l)}}}function B1(t,e,n){let{canBeExclusive:a}=e,{condition:r}=e,i=s=>n(0,r.interval=s.detail,r),o=()=>a?n(0,r.exclusive=!r.exclusive,r):null,l=()=>n(0,r.ignore=!r.ignore,r);return t.$$set=s=>{"canBeExclusive"in s&&n(1,a=s.canBeExclusive),"condition"in s&&n(0,r=s.condition)},[r,a,i,o,l]}var Ef=class extends de{constructor(e){super();he(this,e,B1,S1,le,{canBeExclusive:1,condition:0})}},Af=Ef;var Fs=class extends lt{constructor(e,n,a){super(e);this.calendar=n;this.saved=!0;this.leapday={id:Ze(6),name:"Leap Day",interval:[],intercalary:!1,timespan:0,offset:0,type:"leapday"};a&&(this.leapday=(0,kf.default)(a),this.editing=!0),this.containerEl.addClasses(["fantasy-calendar-create-leapday"])}async display(){this.titleEl.setText(this.editing?"Edit Leap Day":"New Leap Day"),new Cf({target:this.contentEl,props:{leapDay:this.leapday,calendar:this.calendar,app:this.app}}).$on("cancel",()=>{this.saved=!1,this.close()})}async onOpen(){await this.display()}},xs=class extends lt{constructor(e,n,a){super(e);this.app=e;this.canBeExclusive=n;this.saved=!0;this.editing=!1;this.condition={interval:null,exclusive:!1,ignore:!1};a&&(this.condition={...a},this.editing=!0)}onOpen(){this.containerEl.addClasses(["fantasy-calendar-nested-settings"]),this.contentEl.empty(),this.titleEl.setText("Leap Day Condition"),new Af({target:this.contentEl,props:{canBeExclusive:this.canBeExclusive,condition:this.condition}}),this.buttonsEl=this.contentEl.createDiv("fantasy-context-buttons setting-item"),new Va.ButtonComponent(this.buttonsEl).setCta().setButtonText("Cancel").onClick(()=>{this.saved=!1,this.close()})}old(){new Va.Setting(this.contentEl).setName("Interval").setDesc("How often the condition applies.").addText(e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.condition.interval}`).onChange(n=>{isNaN(Number(n))||(this.condition.interval=Number(n))})}),new Va.Setting(this.contentEl).setName("Exclusive").setDesc(`If true, the leap day will not apply when the year meets the condition.
Requires the leap day to have at least one non-exclusive condition.`).addToggle(e=>e.setDisabled(!this.canBeExclusive).setValue(this.condition.exclusive).onChange(n=>this.condition.exclusive=n)),new Va.Setting(this.contentEl).setName("Ignore Offset").setDesc("The condition will ignore the leap day's offset when checking to apply.").addToggle(e=>e.setValue(this.condition.ignore).onChange(n=>this.condition.ignore=n))}};function xf(t,e,n){let a=t.slice();return a[11]=e[n],a}function N1(t){let e,n,a=t[0],r=[];for(let o=0;o<a.length;o+=1)r[o]=Ff(xf(t,a,o));let i=o=>G(r[o],1,1,()=>{r[o]=null});return{c(){e=B("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","existing-items")},m(o,l){R(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,l){if(l&41){a=o[0];let s;for(s=0;s<a.length;s+=1){let c=xf(o,a,s);r[s]?(r[s].p(c,l),P(r[s],1)):(r[s]=Ff(c),r[s].c(),P(r[s],1),r[s].m(e,null))}for(De(),s=a.length;s<r.length;s+=1)i(s);_e()}},i(o){if(!n){for(let l=0;l<a.length;l+=1)P(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)G(r[l]);n=!1},d(o){o&&q(e),Ge(r,o)}}}function M1(t){let e,n;return e=new Vt({props:{message:"Create a new leap day to see it here."}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p:Q,i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Ff(t){let e,n;function a(){return t[8](t[11])}function r(){return t[9](t[11])}return e=new mf({props:{leapday:t[11]}}),e.$on("edit",a),e.$on("delete",r),{c(){ne(e.$$.fragment)},m(i,o){te(e,i,o),n=!0},p(i,o){t=i;let l={};o&1&&(l.leapday=t[11]),e.$set(l)},i(i){n||(P(e.$$.fragment,i),n=!0)},o(i){G(e.$$.fragment,i),n=!1},d(i){J(e,i)}}}function I1(t){let e,n,a,r,i,o;e=new Bt({props:{disabled:t[1],label:t[1]?"At least one named month is required":null}}),e.$on("click",t[7]);let l=[M1,N1],s=[];function c(u,d){return u[0].length?1:0}return a=c(t,-1),r=s[a]=l[a](t),{c(){ne(e.$$.fragment),n=W(),r.c(),i=Ue()},m(u,d){te(e,u,d),R(u,n,d),s[a].m(u,d),R(u,i,d),o=!0},p(u,d){let m={};d&2&&(m.disabled=u[1]),d&2&&(m.label=u[1]?"At least one named month is required":null),e.$set(m);let v=a;a=c(u,d),a===v?s[a].p(u,d):(De(),G(s[v],1,1,()=>{s[v]=null}),_e(),r=s[a],r?r.p(u,d):(r=s[a]=l[a](u),r.c()),P(r,1),r.m(i.parentNode,i))},i(u){o||(P(e.$$.fragment,u),P(r),o=!0)},o(u){G(e.$$.fragment,u),G(r),o=!1},d(u){J(e,u),u&&q(n),s[a].d(u),u&&q(i)}}}function O1(t){let e,n;return e=new ct({props:{name:"Leap Days",open:!1,desc:`${t[0].length} leap day${t[0].length!=1?"s":""}`,$$slots:{default:[I1]},$$scope:{ctx:t}}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,[r]){let i={};r&1&&(i.desc=`${a[0].length} leap day${a[0].length!=1?"s":""}`),r&16387&&(i.$$scope={dirty:r,ctx:a}),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function q1(t,e,n){let a,r,i,{plugin:o}=e,l=Ne("store");Fe(t,l,h=>n(10,a=h));let{leapDayStore:s,leapDayDisabled:c}=l;Fe(t,s,h=>n(0,r=h)),Fe(t,c,h=>n(1,i=h));let u=h=>{let y=new Fs(o.app,a,h);y.onClose=()=>{!y.saved||!y.leapday.interval.length||!y.leapday.name||(y.editing?s.update(h.id,{...y.leapday}):s.add({...y.leapday}))},y.open()},d=()=>u(),m=h=>u(h),v=h=>s.delete(h.id);return t.$$set=h=>{"plugin"in h&&n(6,o=h.plugin)},[r,i,l,s,c,u,o,d,m,v]}var Tf=class extends de{constructor(e){super();he(this,e,q1,O1,le,{plugin:6})}},Sf=Tf;var Nf=Ee(require("obsidian"));var R1=Ee(Nn());var Bf=Ee(require("obsidian"));var yA=Ee(require("obsidian"));function L1(t,e=ia){let n=pn(e),{subscribe:a,set:r,update:i}=n,o=et(n,T=>T.static),l=et(n,T=>T.current),{subscribe:s}=o,c=T=>i(I=>(I.static=T,I)),u=et(o,T=>T.months),d=et(o,T=>T.weekdays),m=et(o,T=>T.years),v=et(o,T=>T.useCustomYears),h=et(o,T=>T.moons),y=et(o,T=>T.displayMoons),p=et(o,T=>T.leapDays),S=et(n,T=>T.events),_=et(n,T=>T.categories),A=et(o,T=>T.months?.length&&T.months?.every(I=>I.name?.length)&&T.months?.every(I=>I.length>0)),L=et(o,T=>T.weekdays?.length&&T.weekdays?.every(I=>I.name?.length)&&T.firstWeekDay<(T.weekdays?.length??1/0)),k=et(o,T=>!T.useCustomYears||T.useCustomYears&&T.years?.length&&T.years.every(I=>I.name?.length)),E=et(n,T=>T.name?.length),w=et([n,l],([T,I])=>Da(I.day,T)),N=et([n,l],([T,I])=>_a(I.month,T)),F=et([n,l],([T,I])=>Ca(I.year,T)),j=et([w,N,F],([T,I,U])=>T&&I&&U),x=et([j,E,A,L,k],([T,I,U,$,ee])=>T&&I&&U&&$&&ee);return{subscribe:a,set:r,update:i,currentStore:{subscribe:l.subscribe,set:T=>{i(I=>(I.current={...T},I))},update:T=>i(I=>(I.current={...T},I))},valid:x,validDate:j,validDay:w,validMonth:N,validMonths:A,validWeekdays:L,validYear:F,validYears:k,validName:E,setProperty(T,I){return i(U=>(U[T]=I,U))},setCurrentDate:T=>i(I=>(I.current={...T},I)),staticStore:{subscribe:s,set:c,setProperty(T,I){return i(U=>(U.static[T]=I,U))}},weekdayStore:{subscribe:d.subscribe,add:()=>i(T=>(T.static.weekdays.push({type:"day",name:null,id:Ze(6)}),T)),update:(T,I)=>i(U=>(U.static.weekdays.splice(U.static.weekdays.findIndex($=>$.id==T),1,I),U)),delete:T=>i(I=>(I.static.weekdays=I.static.weekdays.filter(U=>U.id!=T),I)),set:T=>i(I=>(I.static.weekdays=[...T],I))},monthStore:{subscribe:u.subscribe,add:()=>i(T=>(T.static.months.push({type:"month",name:null,length:null,id:Ze(6)}),T)),update:(T,I)=>i(U=>(U.static.months.splice(U.static.months.findIndex($=>$.id==T),1,I),U)),delete:T=>i(I=>(I.static.months=I.static.months.filter(U=>U.id!=T),I)),set:T=>i(I=>(I.static.months=[...T],I))},yearStore:{customYears:v,subscribe:m.subscribe,add:()=>i(T=>(T.static.years.push({type:"year",name:null,id:Ze(6)}),T)),update:(T,I)=>i(U=>(U.static.years.splice(U.static.years.findIndex($=>$.id==T),1,I),U)),delete:T=>i(I=>(I.static.years=I.static.years.filter(U=>U.id!=T),I)),set:T=>i(I=>(I.static.years=[...T],I))},eventStore:{subscribe:S.subscribe,sortedStore:et(S,T=>T.sort((I,U)=>I.date.year!=U.date.year?I.date.year-U.date.year:I.date.month!=U.date.month?I.date.month-U.date.month:I.date.day-U.date.day)),set:T=>i(I=>(I.events=[...T],I)),add:T=>i(I=>(I.events.push({...T}),I)),update:(T,I)=>i(U=>{let $=U.events.findIndex(ee=>ee.id===T);return U.events.splice($,1,{...I}),U}),delete:T=>i(I=>(I.events=I.events.filter(U=>U.id!==T),I))},categoryStore:{subscribe:_.subscribe,set:T=>i(I=>(I.categories=[...T],I)),add:T=>i(I=>(I.categories.push({...T}),I)),update:(T,I)=>i(U=>{let $=U.categories.findIndex(ee=>ee.id===T);return U.categories.splice($,1,{...I}),U}),delete:T=>i(I=>(I.categories=I.categories.filter(U=>U.id!==T),I))},displayMoons:{subscribe:y.subscribe,set:T=>{i(I=>(I.static.displayMoons=T,I))}},moonStore:{subscribe:h.subscribe,set:T=>i(I=>(I.static.moons=[...T],I)),add:T=>i(I=>(I.static.moons.push({...T}),I)),update:(T,I)=>i(U=>{let $=U.static.moons.findIndex(ee=>ee.id===T);return U.static.moons.splice($,1,{...I}),U}),delete:T=>i(I=>(I.static.moons=I.static.moons.filter(U=>U.id!==T),I))},leapDayDisabled:et(u,T=>T.filter(I=>I.name?.length).length==0),leapDayStore:{subscribe:p.subscribe,set:T=>i(I=>(I.static.leapDays=[...T],I)),add:T=>i(I=>(I.static.leapDays.push({...T}),I)),update:(T,I)=>i(U=>{let $=U.static.leapDays.findIndex(ee=>ee.id===T);return U.static.leapDays.splice($,1,{...I}),U}),delete:T=>i(I=>(I.static.leapDays=I.static.leapDays.filter(U=>U.id!==T),I))}}}var Mf=L1;function P1(t){be(t,"svelte-190iu8i","body:not(.is-mobile) .fantasy-calendar-creator.svelte-190iu8i.svelte-190iu8i{position:absolute;top:var(--top, 0);height:100%}body:not(.is-mobile) .fantasy-calendar-creator-inner.svelte-190iu8i.svelte-190iu8i{position:absolute;top:0;left:-2px;bottom:0;overflow:auto;display:grid;grid-template-rows:auto 1fr}.fantasy-calendar-creator.svelte-190iu8i.svelte-190iu8i,.fantasy-calendar-creator.svelte-190iu8i .fantasy-calendar-creator-inner.svelte-190iu8i,.fantasy-calendar-creator.svelte-190iu8i .fantasy-creator-app.svelte-190iu8i{background-color:var(--creator-background-color)}body.is-mobile .fantasy-calendar-creator.svelte-190iu8i.svelte-190iu8i,body.is-mobile .fantasy-calendar-creator.svelte-190iu8i .fantasy-creator-app.svelte-190iu8i{padding:0px 10px;width:100%}.fantasy-creator-app.svelte-190iu8i.svelte-190iu8i{overflow:auto;height:100%}.fantasy-calendar-creator-header.svelte-190iu8i.svelte-190iu8i{margin:0}.top-nav.svelte-190iu8i.svelte-190iu8i{position:sticky;top:0;padding:10px 0px;background-color:inherit;z-index:3}.icons.svelte-190iu8i.svelte-190iu8i{display:flex;justify-content:space-between}.icons.svelte-190iu8i .left.svelte-190iu8i{display:flex;align-items:center}.check.svelte-190iu8i.svelte-190iu8i{display:flex;gap:0.25rem;align-items:center}.additional.svelte-190iu8i.svelte-190iu8i{color:var(--text-faint)}.save.svelte-190iu8i.svelte-190iu8i{color:var(--text-error)}.save.can-save.svelte-190iu8i.svelte-190iu8i{color:var(--interactive-success)}.additional.can-save.svelte-190iu8i.svelte-190iu8i{color:var(--text-normal)}.back.svelte-190iu8i.svelte-190iu8i{width:min-content}.back.svelte-190iu8i .clickable-icon{margin-left:0}")}function Of(t){let e,n,a,r,i,o,l,s,c,u,d,m,v,h,y,p,S,_,A,L,k,E,w,N,F,j,x,T,I,U,$,ee,Z,K,ve,xe,Ae,Oe,He,st,je;function wt(Te,tt){return Te[8]?V1:j1}let Nt=wt(t,-1),Je=Nt(t);return L=new Sc({props:{plugin:t[1]}}),E=new wd({}),N=new xd({}),j=new Rd({props:{app:t[1].app}}),T=new jo({}),U=new Qd({props:{plugin:t[1]}}),ee=new af({}),K=new ff({props:{plugin:t[1]}}),xe=new Sf({props:{plugin:t[1]}}),{c(){e=B("div"),n=B("div"),a=B("div"),r=B("div"),i=B("div"),s=W(),c=B("div"),Je.c(),u=W(),d=B("div"),v=W(),h=B("h3"),h.textContent="Calendar Creator",y=W(),p=B("div"),S=B("div"),A=W(),ne(L.$$.fragment),k=W(),ne(E.$$.fragment),w=W(),ne(N.$$.fragment),F=W(),ne(j.$$.fragment),x=W(),ne(T.$$.fragment),I=W(),ne(U.$$.fragment),$=W(),ne(ee.$$.fragment),Z=W(),ne(K.$$.fragment),ve=W(),ne(xe.$$.fragment),D(i,"class","back svelte-190iu8i"),D(i,"aria-label",o=t[8]?"Save and exit":"Exit without saving"),D(c,"class","check svelte-190iu8i"),D(r,"class","left svelte-190iu8i"),D(d,"class","cancel"),D(a,"class","icons svelte-190iu8i"),D(h,"class","fantasy-calendar-creator-header svelte-190iu8i"),D(n,"class","top-nav svelte-190iu8i"),D(p,"class","fantasy-creator-app svelte-190iu8i"),D(e,"class","inherit fantasy-calendar-creator-inner svelte-190iu8i"),D(e,"style",Ae=t[9]?"":`width: ${t[0]+4}px;`)},m(Te,tt){R(Te,e,tt),C(e,n),C(n,a),C(a,r),C(r,i),C(r,s),C(r,c),Je.m(c,null),C(a,u),C(a,d),C(n,v),C(n,h),C(e,y),C(e,p),C(p,S),C(p,A),te(L,p,null),C(p,k),te(E,p,null),C(p,w),te(N,p,null),C(p,F),te(j,p,null),C(p,x),te(T,p,null),C(p,I),te(U,p,null),C(p,$),te(ee,p,null),C(p,Z),te(K,p,null),C(p,ve),te(xe,p,null),He=!0,st||(je=[ue(l=t[12].call(null,i)),re(i,"click",t[20]),ue(m=t[13].call(null,d)),re(d,"click",t[21]),ue(_=t[14].call(null,S)),re(e,"introend",t[22]),re(e,"outroend",t[23])],st=!0)},p(Te,tt){t=Te,(!He||tt&256&&o!==(o=t[8]?"Save and exit":"Exit without saving"))&&D(i,"aria-label",o),Nt===(Nt=wt(t,tt))&&Je?Je.p(t,tt):(Je.d(1),Je=Nt(t),Je&&(Je.c(),Je.m(c,null)));let Yt={};tt&2&&(Yt.plugin=t[1]),L.$set(Yt);let $t={};tt&2&&($t.app=t[1].app),j.$set($t);let Rt={};tt&2&&(Rt.plugin=t[1]),U.$set(Rt);let Ht={};tt&2&&(Ht.plugin=t[1]),K.$set(Ht);let wn={};tt&2&&(wn.plugin=t[1]),xe.$set(wn),(!He||tt&1&&Ae!==(Ae=t[9]?"":`width: ${t[0]+4}px;`))&&D(e,"style",Ae)},i(Te){He||(P(L.$$.fragment,Te),P(E.$$.fragment,Te),P(N.$$.fragment,Te),P(j.$$.fragment,Te),P(T.$$.fragment,Te),P(U.$$.fragment,Te),P(ee.$$.fragment,Te),P(K.$$.fragment,Te),P(xe.$$.fragment,Te),It(()=>{Oe||(Oe=Oo(e,t[18],{x:t[0]*1.5,opacity:1},!0)),Oe.run(1)}),He=!0)},o(Te){G(L.$$.fragment,Te),G(E.$$.fragment,Te),G(N.$$.fragment,Te),G(j.$$.fragment,Te),G(T.$$.fragment,Te),G(U.$$.fragment,Te),G(ee.$$.fragment,Te),G(K.$$.fragment,Te),G(xe.$$.fragment,Te),Oe||(Oe=Oo(e,t[18],{x:t[0]*1.5,opacity:1},!1)),Oe.run(0),He=!1},d(Te){Te&&q(e),Je.d(),J(L),J(E),J(N),J(j),J(T),J(U),J(ee),J(K),J(xe),Te&&Oe&&Oe.end(),st=!1,we(je)}}}function j1(t){let e,n,a,r,i,o;return{c(){e=B("div"),a=W(),r=B("span"),r.textContent=`Additional information is required before
saving`,D(e,"class","save svelte-190iu8i"),D(e,"aria-label",t[7]),D(r,"class","additional svelte-190iu8i")},m(l,s){R(l,e,s),R(l,a,s),R(l,r,s),i||(o=ue(n=t[17].call(null,e)),i=!0)},p(l,s){s&128&&D(e,"aria-label",l[7])},d(l){l&&q(e),l&&q(a),l&&q(r),i=!1,o()}}}function V1(t){let e,n,a,r,i,o;return{c(){e=B("div"),a=W(),r=B("span"),r.textContent="All good! Exit to save calendar",D(e,"class","save can-save svelte-190iu8i"),D(e,"aria-label",t[7]),D(r,"class","additional can-save svelte-190iu8i")},m(l,s){R(l,e,s),R(l,a,s),R(l,r,s),i||(o=ue(n=t[17].call(null,e)),i=!0)},p(l,s){s&128&&D(e,"aria-label",l[7])},d(l){l&&q(e),l&&q(a),l&&q(r),i=!1,o()}}}function H1(t){let e,n,a=t[5]&&Of(t);return{c(){e=B("div"),a&&a.c(),D(e,"class","fantasy-calendar-creator svelte-190iu8i"),at(e,"--creator-background-color",t[2]),at(e,"--top",t[3]+"px")},m(r,i){R(r,e,i),a&&a.m(e,null),n=!0},p(r,[i]){r[5]?a?(a.p(r,i),i&32&&P(a,1)):(a=Of(r),a.c(),P(a,1),a.m(e,null)):a&&(De(),G(a,1,1,()=>{a=null}),_e()),(!n||i&4)&&at(e,"--creator-background-color",r[2]),(!n||i&8)&&at(e,"--top",r[3]+"px")},i(r){n||(P(a),n=!0)},o(r){G(a),n=!1},d(r){r&&q(e),a&&a.d()}}}function W1(t,e,n){let a,r,i,o=Fn.Platform.isMobile,l=o;$n(()=>{n(5,l=!0)});let s=Ve(),{width:c}=e,{base:u}=e,{plugin:d}=e,{color:m=null}=e,{top:v}=e,h=Mf(d,u);Fe(t,h,x=>n(4,i=x)),Zn("store",h);let y=x=>{new Fn.ExtraButtonComponent(x).setIcon("left-arrow-with-tail")},p=x=>{new Fn.ExtraButtonComponent(x).setIcon("cross").setTooltip("Exit without saving")},S=x=>{let T=x.createDiv("fantasy-calendar-apply-preset");new Fn.Setting(T).setName("Apply Preset").setDesc("Apply a common fantasy calendar as a preset.").addButton(I=>{I.setCta().setButtonText("Choose Preset").onClick(()=>{let U=new qo(d.app);U.onClose=()=>{if(!!U.saved&&(nt(h,i=(0,If.default)(U.preset),i),i?.name=="Gregorian Calendar")){let $=new Date;h.setCurrentDate({year:$.getFullYear(),month:$.getMonth(),day:$.getDate()})}},U.open()})})},_=!1,{valid:A}=h;Fe(t,A,x=>n(8,r=x));let L=()=>{if(!r&&!d.data.exit.saving){let x=new bs(d);x.onClose=()=>{x.confirmed&&n(5,l=!1),o&&s("exit",{saved:_,calendar:i})},x.open()}else n(6,_=!0),n(5,l=!1)},k=x=>{r?(0,Fn.setIcon)(x,"checkmark"):gn(x)},E=(x,T)=>o?null:Su(x,T),w=()=>{L()},N=()=>n(5,l=!1),F=()=>s("flown"),j=()=>s("exit",{saved:_,calendar:i});return t.$$set=x=>{"width"in x&&n(0,c=x.width),"base"in x&&n(19,u=x.base),"plugin"in x&&n(1,d=x.plugin),"color"in x&&n(2,m=x.color),"top"in x&&n(3,v=x.top)},t.$$.update=()=>{if(t.$$.dirty&16){e:n(7,a=Nu(i))}},[c,d,m,v,i,l,_,a,r,o,s,h,y,p,S,A,L,k,E,u,w,N,F,j]}var qf=class extends de{constructor(e){super();he(this,e,W1,H1,le,{width:0,base:19,plugin:1,color:2,top:3},P1)}},Ts=qf;var Rf;(function(a){a.none="None",a.monthly="Monthly",a.yearly="Yearly"})(Rf||(Rf={}));(0,ze.addIcon)("fantasy-calendar-grip",'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="grip-lines" class="svg-inline--fa fa-grip-lines fa-w-16" role="img" viewBox="0 0 512 512"><path fill="currentColor" d="M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"/></svg>');(0,ze.addIcon)("fantasy-calendar-warning",'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="exclamation-triangle" class="svg-inline--fa fa-exclamation-triangle fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"></path></svg>');var xi=class extends ze.PluginSettingTab{constructor(e){super(e.app,e);this.plugin=e}get data(){return this.plugin.data}async display(){this.containerEl.empty(),this.containerEl.createEl("h2",{text:"Fantasy Calendars"}),this.containerEl.addClass("fantasy-calendar-settings"),this.contentEl=this.containerEl.createDiv("fantasy-calendar-settings-content"),this.buildInfo(this.contentEl.createDiv("fantasy-calendar-nested-settings")),this.calendarsEl=this.contentEl.createEl("details",{cls:"fantasy-calendar-nested-settings",attr:{...this.data.settingsToggleState.calendars?{open:"open"}:{}}}),this.buildCalendars(),this.buildEvents(this.contentEl.createEl("details",{cls:"fantasy-calendar-nested-settings",attr:{...this.data.settingsToggleState.events?{open:"open"}:{}}})),this.buildAdvanced(this.contentEl.createEl("details",{cls:"fantasy-calendar-nested-settings",attr:{...this.data.settingsToggleState.advanced?{open:"open"}:{}}}))}buildInfo(e){e.empty(),new ze.Setting(e).setName(`Reset "Don't Ask Again" Prompts`).setDesc(`All confirmations set to "Don't Ask Again" will be reset.`).addButton(n=>{n.setIcon("reset").onClick(async()=>{this.plugin.data.exit={saving:!1,event:!1,calendar:!1},await this.plugin.saveSettings()})}),new ze.Setting(e).setName(createFragment(n=>{let a=n.createSpan("fantasy-calendar-warning");(0,ze.setIcon)(a.createSpan("fantasy-calendar-warning"),"fantasy-calendar-warning"),a.createSpan({text:"Default Config Directory"})})).setDesc(createFragment(n=>{n.createSpan({text:"Please back up your data before changing this setting. Hidden directories must be manually entered."}),n.createEl("br"),n.createSpan({text:"Current directory: "});let a=this.data.configDirectory??this.app.vault.configDir;n.createEl("code",{text:a})})).addText(async n=>{let a=this.app.vault.getAllLoadedFiles().filter(i=>i instanceof ze.TFolder);n.setPlaceholder(this.data.configDirectory??this.app.vault.configDir);let r=new dr(this.app,n,[...a]);r.onClose=async()=>{n.inputEl.value?await this.app.vault.adapter.exists(n.inputEl.value)||(this.data.configDirectory=n.inputEl.value,await this.plugin.saveSettings()):this.data.configDirectory=null},n.inputEl.onblur=async()=>{if(!n.inputEl.value)return;let i=await this.app.vault.adapter.exists(n.inputEl.value);this.data.configDirectory=n.inputEl.value,await this.plugin.saveSettings(),this.display()}}).addExtraButton(n=>{n.setTooltip("Reset to Default").setIcon("reset").onClick(async()=>{this.data.configDirectory=null,await this.plugin.saveSettings(),this.display()})})}buildCalendars(){this.calendarsEl.empty(),this.calendarsEl.ontoggle=()=>{this.data.settingsToggleState.calendars=this.calendarsEl.open};let e=this.calendarsEl.createEl("summary");new ze.Setting(e).setHeading().setName("Calendar Management"),e.createDiv("collapser").createDiv("handle"),new ze.Setting(this.calendarsEl).setName("Show Intercalary Months Separately").setDesc("Intercalary months will appear a distinct months in the calendar.").addToggle(n=>{n.setValue(this.data.showIntercalary).onChange(async a=>{this.data.showIntercalary=a,await this.plugin.saveCalendar()})}),new ze.Setting(this.calendarsEl).setName("Default Calendar").setDesc("Views will open to this calendar by default.").addDropdown(n=>{n.addOption("none","None");for(let a of this.data.calendars)n.addOption(a.id,a.name);n.setValue(this.plugin.data.defaultCalendar),n.onChange(async a=>{if(a==="none"){this.plugin.data.defaultCalendar=null,await this.plugin.saveSettings();return}this.plugin.data.defaultCalendar=a,await this.plugin.saveSettings(),this.plugin.watcher.start()})}),new ze.Setting(this.calendarsEl).setName("Import Calendar").setDesc(createFragment(n=>{n.createSpan({text:"Import calendar from "}),n.createEl("a",{href:"https://app.fantasy-calendar.com",text:"Fantasy Calendar",cls:"external-link"})})).addButton(n=>{let a=createEl("input",{attr:{type:"file",name:"merge",accept:".json",multiple:!0,style:"display: none;"}});a.onchange=async()=>{let{files:r}=a;if(!!r.length){try{let i=[];for(let l of Array.from(r))i.push(JSON.parse(await l.text()));let o=Hr.import(i);for(let l of o)await this.plugin.addNewCalendar(l);this.display()}catch(i){new ze.Notice(`There was an error while importing the calendar${r.length==1?"":"s"}.`),console.error(i)}a.value=null}},n.setButtonText("Choose Files"),n.buttonEl.addClass("calendar-file-upload"),n.buttonEl.appendChild(a),n.onClick(()=>a.click())}),new ze.Setting(this.calendarsEl).setName("Create New Calendar").addButton(n=>n.setTooltip("Launch Calendar Creator").setIcon("plus-with-circle").onClick(async()=>{let a=await this.launchCalendarCreator();a&&(await this.plugin.addNewCalendar(a),this.display())})),this.existingEl=this.calendarsEl.createDiv("existing-calendars"),this.showCalendars()}showCalendars(){if(this.existingEl.empty(),!this.data.calendars.length){this.existingEl.createSpan({text:"No calendars created! Create a calendar to see it here."});return}for(let e of this.data.calendars)new ze.Setting(this.existingEl).setName(e.name).setDesc(e.description??"").addExtraButton(n=>{n.setIcon("pencil").onClick(async()=>{let a=await this.launchCalendarCreator(e);a&&(this.plugin.addNewCalendar(a,e),await this.plugin.saveCalendar(),this.display())})}).addExtraButton(n=>{n.setIcon("trash").onClick(async()=>{!this.plugin.data.exit.calendar&&!await Td(this.plugin)||(this.plugin.data.calendars=this.plugin.data.calendars.filter(a=>a.id!=e.id),e.id==this.data.defaultCalendar&&(this.plugin.data.defaultCalendar=this.plugin.data.calendars[0]?.id,this.plugin.watcher.start()),await this.plugin.saveCalendar(),this.display())})})}buildEvents(e){e.empty(),e.ontoggle=()=>{this.data.settingsToggleState.events=e.open};let n=e.createEl("summary");new ze.Setting(n).setHeading().setName("Events"),n.createDiv("collapser").createDiv("handle"),new ze.Setting(e).setName("Add Events to Default Calendar").setDesc(createFragment(a=>{a.createSpan({text:"Add events found in notes to the default calendar if the "}),a.createEl("code",{text:"fc-calendar"}),a.createSpan({text:" frontmatter tag is not present."})})).addToggle(a=>{a.setValue(this.data.addToDefaultIfMissing).onChange(async r=>{this.data.addToDefaultIfMissing=r,await this.plugin.saveSettings(),this.plugin.watcher.start()})}),new ze.Setting(e).setName("Display Event Previews").setDesc("Use the core Note Preview plugin to display event notes when hovered.").addToggle(a=>{a.setValue(this.data.eventPreview).onChange(async r=>{this.data.eventPreview=r,await this.plugin.saveSettings()})}),new ze.Setting(e).setName("Write Event Data to Frontmatter").setDesc("This setting is temporarily disabled.").addToggle(a=>{a.setValue(!1).setDisabled(!0).onChange(async r=>{this.data.eventFrontmatter=r,await this.plugin.saveSettings()})}),new ze.Setting(e).setName("Parse Note Titles for Event Dates").setDesc("The plugin will parse note titles for event dates.").addToggle(a=>{a.setValue(this.data.parseDates).onChange(async r=>{this.data.parseDates=r,await this.plugin.saveSettings(),this.plugin.watcher.start()})}),new ze.Setting(e).setName("Date Format").setClass(this.data.dailyNotes?"daily-notes":"no-daily-notes").setDesc(createFragment(a=>{if(a.createSpan({text:"Event dates will be parsed using this format."}),a.createSpan({text:"Only the "}),a.createEl("code",{text:"Y"}),a.createSpan({text:", "}),a.createEl("code",{text:"M"}),a.createSpan({text:", and "}),a.createEl("code",{text:"D"}),a.createEl("a",{text:"tokens",href:"https://momentjs.com/docs/#/displaying/format/",cls:"external-link"}),a.createSpan({text:" are supported."}),["Y","M","D"].some(r=>!this.data.dateFormat.includes(r))){a.createEl("br");let r=a.createSpan({cls:"fantasy-calendar-warning date-format"});(0,ze.setIcon)(r.createSpan("fantasy-calendar-warning"),"fantasy-calendar-warning");let i=["Y","M","D"].filter(o=>!this.data.dateFormat.includes(o));r.createSpan({text:` Date format is missing: ${i.join(", ").replace(/, ([^,]*)$/," and $1")}`})}})).addText(a=>{a.setDisabled(this.data.dailyNotes).setValue(this.plugin.format).onChange(async r=>{this.data.dateFormat=r,await this.plugin.saveSettings()}),a.inputEl.onblur=()=>this.buildEvents(e)}).addExtraButton(a=>{if(!this.plugin.canUseDailyNotes){a.extraSettingsEl.detach();return}this.data.dailyNotes?a.setIcon("checkmark").setTooltip("Unlink from Daily Notes").onClick(()=>{this.data.dailyNotes=!1,this.buildEvents(e)}):a.setIcon("sync").setTooltip("Link with Daily Notes").onClick(()=>{this.data.dailyNotes=!0,this.buildEvents(e)})})}buildAdvanced(e){e.empty(),e.ontoggle=()=>{this.data.settingsToggleState.advanced=e.open};let n=e.createEl("summary");new ze.Setting(n).setHeading().setName("Advanced"),n.createDiv("collapser").createDiv("handle"),new ze.Setting(e).setName("Show Event Debug Messages").setDesc(createFragment(a=>{a.createSpan({text:"The plugin will show debug messages when events are added, deleted or updated by the file watcher."})})).addToggle(a=>{a.setValue(this.data.debug).onChange(async r=>{this.data.debug=r,await this.plugin.saveSettings()})})}launchCalendarCreator(e=ia){let n=(0,Ha.default)(e);if(ze.Platform.isMobile){let a=new Lf(this.plugin,n);return new Promise((r,i)=>{try{a.onClose=()=>{a.saved&&(e=(0,Ha.default)(a.calendar),r(e)),r()},a.open()}catch{i()}})}else return this.containerEl.addClass("fantasy-calendar-creator-open"),new Promise(a=>{let r=getComputedStyle(this.containerEl.closest(".modal")).backgroundColor,i=new Ts({target:this.containerEl,props:{base:n,plugin:this.plugin,width:this.contentEl.clientWidth,color:r,top:this.containerEl.scrollTop}}),o=new ResizeObserver(()=>{i.$set({width:this.contentEl.clientWidth})});o.observe(this.contentEl),i.$on("exit",l=>{this.containerEl.removeClass("fantasy-calendar-creator-open"),i.$destroy(),l.detail.saved&&(e=(0,Ha.default)(l.detail.calendar),o.disconnect(),a(e)),a()})})}},Lf=class extends lt{constructor(e,n){super(e.app);this.plugin=e;this.saved=!1;this.calendar=(0,Ha.default)(n)}onOpen(){this.contentEl.setAttr("style","background-color: inherit; padding-top: 0px;");let e=new Ts({target:this.contentEl,props:{base:this.calendar,plugin:this.plugin,width:this.contentEl.clientWidth,top:0}});e.$on("exit",n=>{n.detail.saved&&(this.calendar=(0,Ha.default)(n.detail.calendar),this.saved=!0),this.close(),e.$destroy()})}};var qe=Ee(require("obsidian"));var Er=Ee(require("obsidian"));var Pf=class{constructor(e,n,a){this.month=e;this.number=n;this.leapday=a;this.shouldUpdate=!1}get calendar(){return this.month.calendar}get date(){return{day:this.number,month:this.month.number,year:this.year}}get events(){return(!this._events||!this._events.length||this.shouldUpdate)&&(this._events=this.month.getEventsOnDay(this.date)),this._events}get longDate(){return{day:this.number,month:this.month.name,year:this.year}}get daysBefore(){return this.month.daysBefore+this.number-1-this.month.leapDays.filter(e=>e.numbered&&e.after<this.number-1).length}get year(){return this.month.year}get weekday(){let e=this.calendar.firstDayOfYear(this.year);return Mn(this.daysBefore%this.calendar.weekdays.length+e,this.calendar.weekdays.length)}get isCurrentDay(){return this.number==this.calendar.current.day&&this.month.number==this.calendar.current.month&&this.month.year==this.calendar.current.year}get isDisplaying(){return this.number==this.calendar.viewing.day&&this.month.year==this.calendar.viewing.year&&this.month.number==this.calendar.viewing.month}get moons(){return(!this._moons||!this._moons.length)&&(this._moons=this.month.getMoonsForDay(this.date)),this._moons}},Fi=class{constructor(e,n,a,r){this.data=e;this.number=n;this.year=a;this.calendar=r;this.days=[];this.leapDays=[];this.shouldUpdate=!1;this.shouldUpdateMoons=!1;this.leapDays=this.calendar.leapDaysForMonth(this.number,a),this.daysBefore=this.calendar.daysBeforeMonth(this.number,this.year),this.days=[...new Array(e.length+this.leapDays.filter(i=>!i.intercalary||i.intercalary&&i.numbered).length).keys()].map(i=>new Pf(this,i+1,this.leapDays.find(o=>o.after==i)))}get id(){return this.data.id}get index(){return this.calendar.data.months.indexOf(this.data)}get name(){return this.data.name}get length(){return this.days.length}get firstWeekday(){return this.calendar.data.overflow?this.days[0].weekday:0}get lastWeekday(){return this.days[this.days.length-1].weekday}get type(){return this.data.type}getEventsOnDay(e){return(!this.events||!this.events.length||this.shouldUpdate)&&(this.days.forEach(n=>n.shouldUpdate=!0),this.events=this.calendar.getEventsForMonth(this),this.shouldUpdate=!1),this.events.filter(n=>{if((!n.date.year||n.date.year==e.year)&&(!n.date.month||n.date.month==e.month)&&n.date.day==e.day)return!0;if(!n.end&&!n.formulas?.length)return!1;let a={...n.date},r={...n.end??{}};a.year||(a.year=r.year=this.year),a.month||(a.month=r.month=this.number);let i=Number(this.calendar.hash(e));if(Number(this.calendar.hash(a))<=i&&i<=Number(this.calendar.hash(r)??1/0))if(n.formulas?.length){let o=this.calendar.totalDaysBeforeYear(a.year)+this.calendar.daysBeforeMonth(a.month,a.year,!0)+a.day;return(this.calendar.totalDaysBeforeYear(e.year)+this.calendar.daysBeforeMonth(e.month,e.year,!0)+e.day-o)%n.formulas[0].number==0}else return!0;return!1})}getMoonsForDay(e){return(!this.moons||!this.moons.length||this.shouldUpdateMoons)&&(this.moons=this.calendar.getMoonsForMonth(this)),this.moons[e.day-1]}},Wa=class extends Er.Events{constructor(e,n){super();this.calendar=e;this.plugin=n;this._cache=new Map;this.displayed={year:null,month:null,day:null};this.viewing={year:null,month:null,day:null};this.displayed={...this.current},this.update(this.calendar),this.plugin.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-event-update",a=>{if(!a.has(this.calendar.id))return;let r=a.get(this.calendar.id);for(let i of r)!this._cache.has(i)||this.refreshYear(i)}))}addEvent(e){let n=e.date.year,a=e.date.month;this.refreshMonth(a,n)}refreshMonth(e,n){!this._cache.has(n)||!this._cache.get(n).months.has(e)||(this._cache.get(n).shouldUpdate=!0,this._cache.get(n).months.forEach(a=>a.shouldUpdate=!0),(n==this.displayed.year&&e==this.displayed.month||n==this.viewing.year&&e==this.viewing.month)&&this.trigger("month-update"))}refreshYear(e){!this._cache.has(e)||(this._cache.get(e).shouldUpdate=!0,this._cache.get(e).months.forEach(n=>n.shouldUpdate=!0),(e==this.displayed.year||e==this.viewing.year)&&this.trigger("month-update"))}getDayForDate(e){return this.getMonth(e.month,e.year).days[e.day-1]}getEventsForMonth(e){let{year:n,number:a}=e;if(this._cache.has(n)||this._cache.set(n,{events:[],shouldUpdate:!0,months:new Map}),this._cache.get(n).shouldUpdate){let i=this.calendar.events.filter(o=>{let l={...o.date},s={...o.end};return l.year==n||l.year==null?!0:l.year>n||!s&&!o.formulas?.length&&l.year<n?!1:!!(l.year<=n&&(s?.year>=n||o.formulas?.length))});this._cache.set(n,{months:this._cache.get(n).months,events:i,shouldUpdate:!1})}return this._cache.get(n).events.filter(i=>{let o={...i.date},l={...i.end};return o.month==null||(o.year==n||o.year==null)&&o.month==a?!0:o.year>n||o.year==n&&o.month>a||!l&&!i.formulas?.length&&(o.month!=a||o.year<n)?!1:(o.year==null&&(l.year=o.year=n),!!((o.year<=n||o.month<=a)&&(i.formulas?.length||l.year>=n&&l.month>=a)))})}getNameForYear(e){if(!this.data.useCustomYears)return`${e}`;if(this.data.useCustomYears&&e-1>=0&&e<=this.data.years?.length)return this.data.years[e-1].name}get displayWeeks(){return this.calendar.displayWeeks}getMonthsForYear(e){return this._cache.has(e)||this._cache.set(e,{events:[],shouldUpdate:!0,months:new Map(this.data.months.map((n,a)=>[a,new Fi(n,a,e,this)]))}),this._cache.get(e).months.size!=this.data.months.length&&this._cache.set(e,{...this._cache.get(e),months:new Map(this.data.months.map((n,a)=>[a,new Fi(n,a,e,this)]))}),Array.from(this._cache.get(e).months.values())}hash(e){if(e.year==null||e.month==null||e.day==null)return null;let n=`${this.data.months.length}`.length,a=`${e.month}`.padStart(n,"0"),r=`${this.maxDays}`.length,i=`${e.day}`.padStart(r,"0");return`${e.year}${a}${i}`}update(e){this.calendar=e??this.calendar,this.maxDays=Math.max(...this.data.months.map(n=>n.length)),this.standardMonths=this.data.months.filter(n=>n.type!="intercalary"),this.calendar?.current||(this.calendar.current={day:null,month:null,year:null}),Ca(this.calendar?.current.year,this.calendar)||(this.calendar.current.year=1),_a(this.calendar?.current.month,this.calendar)||(this.calendar.current.month=0),Da(this.calendar?.current.day,this.calendar)||(this.calendar.current.day=1),this.trigger("month-update"),this.trigger("day-update")}get categories(){return this.calendar.categories}get data(){return this.calendar.static}get current(){return this.calendar.current}get leapdays(){return this.data.leapDays??[]}get currentDate(){return Kt(this.current,this.calendar)}get displayedDate(){return Kt(this.displayed,this.calendar)}get viewedDate(){return Kt(this.viewing,this.calendar)}reset(){this.displayed={...this.current},this.viewing={...this.current},this.trigger("month-update"),this.trigger("day-update")}setCurrentMonth(e){this.displayed.month=e,this.trigger("month-update")}goToNextDay(){let e=this.getDayForDate(this.viewing);this.viewing.day+=1,this.viewing.day>e.month.days.length&&(this.goToNext(),this.viewing.month=this.displayed.month,this.viewing.year=this.displayed.year,this.viewing.day=1),this.trigger("day-update")}goToNextCurrentDay(){this.current.day+=1;let e=this.getMonth(this.current.month,this.current.year);this.current.day>=e.days.length&&(this.current.day=1,this.current.month+=1,this.current.month>=this.data.months.length&&(this.current.month=0,this.current.year+=1)),this.trigger("day-update")}get nextMonthIndex(){return Mn(this.displayed.month+1,this.data.months.length)}get nextMonth(){return this.getMonth(this.displayed.month+1,this.displayed.year)}canGoToNextYear(e=this.displayed.year){return!this.data.useCustomYears||e<this.data.years.length}getNextMonth(){return this.plugin.data.showIntercalary?this.getMonth(this.displayed.month+1,this.displayed.year):this.getDirectionalStandardMonthHelper(1)}getNextMonthIndex(){let e=this.getNextMonth();return this.data.months.indexOf(e.data)}getPreviousMonth(){return this.plugin.data.showIntercalary?this.getMonth(this.displayed.month-1,this.displayed.year):this.getDirectionalStandardMonthHelper(-1)}getPreviousMonthIndex(){let e=this.getPreviousMonth();return e?this.data.months.indexOf(e.data):1/0}getDirectionalStandardMonthHelper(e,n=this.displayed.year){let a=this.getDirectionalStandardMonth(e);return this.getMonth(a,n)}getDirectionalStandardMonth(e){let n=this.data.months[this.displayed.month],a=this.standardMonths.indexOf(n),r=Mn(a+e,this.standardMonths.length);return this.data.months.indexOf(this.standardMonths[r])}goToNext(){let e=this.getNextMonthIndex();if(e<this.displayed.month){if(!this.canGoToNextYear()){new Er.Notice("This is the last year. Additional years can be created in settings.");return}this.goToNextYear()}this.setCurrentMonth(e)}goToNextYear(){this.displayed.year+=1,this.trigger("year-update")}get prevMonthIndex(){return Mn(this.displayed.month-1,this.data.months.length)}get previousMonth(){return this.getMonth(this.displayed.month-1,this.displayed.year)}goToPrevious(){let e=this.getPreviousMonthIndex();if(e>this.displayed.month){if(this.displayed.year==1){new Er.Notice("This is the earliest year.");return}this.goToPreviousYear()}this.setCurrentMonth(e)}goToPreviousDay(){this.viewing.day-=1,this.viewing.day<1&&(this.goToPrevious(),this.viewing.month=this.displayed.month,this.viewing.year=this.displayed.year,this.viewing.day=this.currentMonth.days.length),this.trigger("day-update")}goToPreviousYear(){this.displayed.year-=1,this.trigger("year-update")}get weekdays(){return this.data.weekdays}get currentMonth(){return this.getMonth(this.displayed.month,this.displayed.year)}testLeapDay(e,n){return e.interval.sort((a,r)=>a.interval-r.interval).some(({interval:a,exclusive:r},i,o)=>{if(r&&i==0)return(n-e.offset)%a!=0;if(!r)return o[i+1]&&o[i+1].exclusive?(n-e.offset)%a==0&&(n-e.offset)%o[i+1].interval!=0:(n-e.offset)%a==0})}leapDaysForYear(e){return this.leapdays.filter(n=>this.testLeapDay(n,e))}leapDaysForMonth(e,n=this.displayed.year){return this.leapdays.filter(a=>a.timespan!=e?!1:this.testLeapDay(a,n))}getMonth(e,n,a=0){let r=this.data.months,i=Mn(e,r.length);if(e<0&&(n-=1),n==0)return null;if(e>=r.length&&(n+=1),this._cache.has(n)){if(this._cache.get(n).months.has(i))return this._cache.get(n).months.get(i)}else this._cache.set(n,{events:[],shouldUpdate:!0,months:new Map});if(r[i].type=="intercalary"&&a!=0)return this.getMonth(e+a,n,a);let o=new Fi(r[i],i,n,this);return this._cache.get(n).months.set(i,o),this._cache.set(n,this._cache.get(n)),o}getPaddedDaysForMonth(e){let n=e.days,a=[],r=this.getMonth(e.index-1,this.displayed.year,-1);e.firstWeekday>0&&e.type=="month"&&(a=r!=null?r.days.slice(-e.firstWeekday):Array(e.firstWeekday).fill(null));let i=[],o=this.getMonth(e.index+1,this.displayed.year,1);return e.lastWeekday<this.weekdays.length-1&&e.type=="month"&&(i=o.days.slice(0,this.weekdays.length-e.lastWeekday-1)),{previous:a,current:n,next:i}}get weeksPerCurrentMonth(){return Math.ceil(this.getMonth(this.displayed.month,this.displayed.year).length/this.data.weekdays.length)}weeksOfMonth(e){return Math.ceil((e.length+e.firstWeekday)/this.data.weekdays.length)}weekNumbersOfMonth(e){let n=e.daysBefore+this.firstDayOfYear(e.year);return Math.floor(n/this.data.weekdays.length)}get daysPerYear(){return this.data.months.filter(e=>e.type==="month").reduce((e,n)=>e+n.length,0)}daysBeforeMonth(e,n,a=!1){return!e||e==0?0:this.data.months.slice(0,e).filter(r=>a?!0:r.type=="month").map((r,i)=>{let o=this.leapDaysForMonth(i,n);return r.length+o.filter(l=>!l.intercalary).length}).reduce((r,i)=>r+i,0)}dayNumberForDate(e){return this.daysBeforeMonth(e.month,e.year,!0)+e.day}get firstWeekday(){return this.data.firstWeekDay}get leapDaysBefore(){return this.displayed.year==1?0:this.leapDaysBeforeYear(this.displayed.year-1)}leapDaysBeforeYear(e){if(e==1)return 0;let n=e-1,a=0;for(let{interval:r,offset:i}of this.leapdays.filter(o=>!o.intercalary)){let o=0;for(let l=0;l<r.length;l++){let s=r[l],c=r.slice(l+1).filter(d=>!d.exclusive).map(d=>Math.floor((n+(d.ignore?0:i))/d.interval)).reduce((d,m)=>d+m,0),u=Math.floor((n+(s.ignore?0:i))/s.interval);s.exclusive?(o-=u,o+=c):(o+=u,o-=c)}a+=o}return a}get totalDaysBefore(){return this.totalDaysBeforeYear(this.displayed.year)}totalDaysBeforeYear(e,n=!1){return e<1?0:Math.abs(e-1)*this.data.months.filter(a=>n||a.type=="month").reduce((a,r)=>a+r.length,0)+this.leapDaysBeforeYear(e)}firstDayOfYear(e=this.displayed.year){return this.data.overflow?e==1?this.firstWeekday:Mn(this.totalDaysBeforeYear(e)%this.data.weekdays.length+this.firstWeekday+(this.data.offset??0),this.data.weekdays.length):0}get moons(){return this.data.moons}getMoonsForMonth(e){let n=[];for(let a of e.days){let r=this.totalDaysBeforeYear(e.year,!0)+this.daysBeforeMonth(e.number,e.year,!0)+a.number-1,i=[];for(let o of this.moons){let{offset:l,cycle:s}=o,c=24,u=(r-l)/s,m=(u-Math.floor(u))*c%c,v=of[c];i.push([o,v[Mn(Math.round(m),v.length)]])}n.push(i)}return n}};var Ga=Ee(require("obsidian"));var Ti=Ee(require("obsidian"));function G1(t){be(t,"svelte-1e1nyi2",".flag.svelte-1e1nyi2.svelte-1e1nyi2{cursor:pointer;position:relative;padding-left:0.125rem;text-align:left;width:100%;background-color:var(--hex-alpha);border-left:2px solid var(--color)}.flag-content.svelte-1e1nyi2.svelte-1e1nyi2{display:flex;gap:0.25rem;align-items:flex-start;justify-content:space-between}.day-view.svelte-1e1nyi2 .flag-content.svelte-1e1nyi2{justify-content:space-between}.clamp.svelte-1e1nyi2.svelte-1e1nyi2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:keep-all;overflow:hidden;text-overflow:ellipsis}.note.svelte-1e1nyi2.svelte-1e1nyi2{display:flex;align-self:center}.multi.svelte-1e1nyi2.svelte-1e1nyi2{flex-shrink:0;overflow:visible;width:unset}.multi.svelte-1e1nyi2 .clamp.svelte-1e1nyi2{-webkit-line-clamp:1;overflow:visible}.multi.start.svelte-1e1nyi2.svelte-1e1nyi2{margin-left:0}.multi.end.svelte-1e1nyi2.svelte-1e1nyi2{margin-right:0}.multi.first.svelte-1e1nyi2.svelte-1e1nyi2{overflow:visible;white-space:nowrap}.multi.svelte-1e1nyi2.svelte-1e1nyi2:not(.first){color:transparent;overflow:hidden}.multi.svelte-1e1nyi2.svelte-1e1nyi2:not(.start){border:0;margin-left:-6px}.multi.svelte-1e1nyi2.svelte-1e1nyi2:not(.end){margin-right:-6px}.start.svelte-1e1nyi2>.flag-content.svelte-1e1nyi2{justify-content:flex-start;gap:1em}")}function jf(t){let e,n,a,r;return{c(){e=B("div"),D(e,"class","note svelte-1e1nyi2")},m(i,o){R(i,e,o),a||(r=ue(n=t[9].call(null,e)),a=!0)},d(i){i&&q(e),a=!1,r()}}}function U1(t){let e,n,a,r=t[0].name+"",i,o,l,s,c,u=t[0].note&&jf(t);return{c(){e=B("div"),n=B("div"),a=B("span"),i=fe(r),o=W(),u&&u.c(),D(a,"class","svelte-1e1nyi2"),me(a,"clamp",!t[1]),me(a,"day-view",t[1]),D(n,"class","flag-content svelte-1e1nyi2"),D(e,"class","flag svelte-1e1nyi2"),D(e,"aria-label",l=t[1]?null:t[0].name),at(e,"--hex-alpha",t[6]+"40"),at(e,"--color",t[6]),me(e,"multi",t[4]),me(e,"start",t[2]),me(e,"end",t[3]),me(e,"first",t[5]),me(e,"day-view",t[1])},m(d,m){R(d,e,m),C(e,n),C(n,a),C(a,i),C(n,o),u&&u.m(n,null),s||(c=[re(e,"click",t[12]),re(e,"mouseover",t[13]),re(e,"focus",z1),re(e,"contextmenu",t[14])],s=!0)},p(d,[m]){m&1&&r!==(r=d[0].name+"")&&ge(i,r),m&2&&me(a,"clamp",!d[1]),m&2&&me(a,"day-view",d[1]),d[0].note?u||(u=jf(d),u.c(),u.m(n,null)):u&&(u.d(1),u=null),m&3&&l!==(l=d[1]?null:d[0].name)&&D(e,"aria-label",l),m&64&&at(e,"--hex-alpha",d[6]+"40"),m&64&&at(e,"--color",d[6]),m&16&&me(e,"multi",d[4]),m&4&&me(e,"start",d[2]),m&8&&me(e,"end",d[3]),m&32&&me(e,"first",d[5]),m&2&&me(e,"day-view",d[1])},i:Q,o:Q,d(d){d&&q(e),u&&u.d(),s=!1,we(c)}}}var z1=()=>{};function Y1(t,e,n){let a=Ve(),{event:r}=e,{date:i}=e,{dayView:o=!1}=e,l=!1,s=!1,c=!1,u=!1,{categories:d}=e,m=d.find(_=>_.id==r.category)?.color??Cs,v=Ti.Platform.isMacOS?"Meta":"Control",h=_=>{(0,Ti.setIcon)(_,"note-glyph")},y=_=>{_.stopPropagation(),a("event-click",{event:r,modifier:_.getModifierState(v)})},p=_=>a("event-mouseover",{target:_.target,event:r}),S=_=>{_.stopPropagation(),a("event-context",{evt:_,event:r})};return t.$$set=_=>{"event"in _&&n(0,r=_.event),"date"in _&&n(10,i=_.date),"dayView"in _&&n(1,o=_.dayView),"categories"in _&&n(11,d=_.categories)},t.$$.update=()=>{if(t.$$.dirty&1039){e:r.end!=null&&!o&&(n(4,l=!0),n(2,s=i.day===r.date.day&&(r.date.month==null||i.month==r.date.month)&&(r.date.year==null||i.year===r.date.year)),n(5,u=s||i.day==1),n(3,c=i.day===r.end.day&&(r.end.month==null||i.month==r.end.month)&&(r.end.year==null||i.year===r.end.year)),s&&c&&(n(4,l=!1),n(2,s=!1),n(3,c=!1)))}if(t.$$.dirty&2049){e:n(6,m=d.find(_=>_.id==r.category)?.color??Cs)}},[r,o,s,c,l,u,m,a,v,h,i,d,y,p,S]}var Vf=class extends de{constructor(e){super();he(this,e,Y1,U1,le,{event:0,date:10,dayView:1,categories:11},G1)}},Hf=Vf;function $1(t){be(t,"svelte-qnut28",".flags-container.svelte-qnut28{height:100%}.flag-container.svelte-qnut28{display:flex;flex-flow:column nowrap;gap:0.25rem}.overflow.svelte-qnut28{color:var(--text-muted);display:flex;justify-content:flex-end;width:100%}")}function Wf(t){let e,n,a,r;return{c(){e=B("div"),D(e,"class","flag-container svelte-qnut28")},m(i,o){R(i,e,o),a||(r=ue(n=t[2].call(null,e)),a=!0)},p:Q,d(i){i&&q(e),a=!1,r()}}}function Gf(t){let e,n,a;return{c(){e=B("span"),n=fe("+"),a=fe(t[1])},m(r,i){R(r,e,i),C(e,n),C(e,a)},p(r,i){i&2&&ge(a,r[1])},d(r){r&&q(e)}}}function Z1(t){let e,n=t[0],a,r,i=Wf(t),o=t[1]>0&&Gf(t);return{c(){e=B("div"),i.c(),a=W(),r=B("div"),o&&o.c(),D(r,"class","overflow svelte-qnut28"),D(e,"class","flags-container svelte-qnut28")},m(l,s){R(l,e,s),i.m(e,null),C(e,a),C(e,r),o&&o.m(r,null)},p(l,[s]){s&1&&le(n,n=l[0])?(i.d(1),i=Wf(l),i.c(),i.m(e,a)):i.p(l,s),l[1]>0?o?o.p(l,s):(o=Gf(l),o.c(),o.m(r,null)):o&&(o.d(1),o=null)},i:Q,o:Q,d(l){l&&q(e),i.d(l),o&&o.d()}}}function K1(t,e,n){let{events:a=[]}=e,{categories:r}=e,{dayView:i=!1}=e,{date:o}=e,{calendar:l}=e,s=0,c=Ve(),u,d=0,m=v=>{if(a.length){let h=v?.parentElement?.getBoundingClientRect()?.height;if(!i&&(h==null||Math.floor(h)==Math.floor(d)))return;d=h,u=v,v.empty(),n(1,s=0);let y=h;for(let p of a){let S=new Hf({target:v,props:{event:p,categories:r,dayView:i,date:o}});if(S.$on("event-click",_=>c("event-click",_.detail)),S.$on("event-mouseover",_=>c("event-mouseover",_.detail)),S.$on("event-context",_=>c("event-context",_.detail)),!i){if(y=h-v.getBoundingClientRect().height,y<0){v.lastElementChild.detach(),n(1,s=a.length-a.indexOf(p));break}else if(y==0){n(1,s=a.length-a.indexOf(p)-1);break}}}}};return l.on("view-resized",()=>{i||m(u)}),t.$$set=v=>{"events"in v&&n(0,a=v.events),"categories"in v&&n(3,r=v.categories),"dayView"in v&&n(4,i=v.dayView),"date"in v&&n(5,o=v.date),"calendar"in v&&n(6,l=v.calendar)},t.$$.update=()=>{if(t.$$.dirty&1){e:n(0,a=[...a])}},[a,s,m,r,i,o,l]}var Uf=class extends de{constructor(e){super();he(this,e,K1,Z1,le,{events:0,categories:3,dayView:4,date:5,calendar:6},$1)}},Si=Uf;function Q1(t){be(t,"svelte-1uhffao",".day-view.svelte-1uhffao{padding:5px 15px;display:flex;flex-flow:column nowrap;gap:0.5rem}.nav.svelte-1uhffao,.date.svelte-1uhffao{display:flex;justify-content:space-between;align-items:center}.left-nav.svelte-1uhffao{display:flex}.left-nav.svelte-1uhffao .clickable-icon{margin-right:0}.calendar-clickable.svelte-1uhffao{align-items:center;cursor:pointer;display:flex;justify-content:center}h3.svelte-1uhffao{margin:0}.day-view.svelte-1uhffao .flag-container > .flag{padding-left:0.5rem}.title-container.svelte-1uhffao{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center}.day-number.svelte-1uhffao{font-size:small}")}function zf(t,e,n){let a=t.slice();return a[24]=e[n][0],a[25]=e[n][1],a}function Yf(t){let e,n,a,r;return{c(){e=B("div"),n=B("em"),a=fe("Day "),r=fe(t[8]),D(e,"class","day-number svelte-1uhffao")},m(i,o){R(i,e,o),C(e,n),C(n,a),C(n,r)},p(i,o){o&256&&ge(r,i[8])},d(i){i&&q(e)}}}function $f(t){let e,n,a=t[5],r=[];for(let o=0;o<a.length;o+=1)r[o]=Zf(zf(t,a,o));let i=o=>G(r[o],1,1,()=>{r[o]=null});return{c(){e=B("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","moon-container")},m(o,l){R(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,l){if(l&32){a=o[5];let s;for(s=0;s<a.length;s+=1){let c=zf(o,a,s);r[s]?(r[s].p(c,l),P(r[s],1)):(r[s]=Zf(c),r[s].c(),P(r[s],1),r[s].m(e,null))}for(De(),s=a.length;s<r.length;s+=1)i(s);_e()}},i(o){if(!n){for(let l=0;l<a.length;l+=1)P(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)G(r[l]);n=!1},d(o){o&&q(e),Ge(r,o)}}}function Zf(t){let e,n;return e=new jn({props:{moon:t[24],phase:t[25]}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r&32&&(i.moon=a[24]),r&32&&(i.phase=a[25]),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function X1(t){let e,n,a,r,i,o,l,s,c,u,d,m,v,h,y,p,S,_,A,L,k,E,w,N,F,j,x,T,I,U,$=t[0]&&Yf(t),ee=t[4]&&t[5]&&t[5].length&&$f(t);return x=new Si({props:{events:t[3].events,categories:t[7],date:t[2],dayView:!0,calendar:t[1]}}),x.$on("event-click",t[19]),x.$on("event-mouseover",t[20]),x.$on("event-context",t[21]),{c(){e=B("div"),n=B("div"),a=B("div"),r=B("div"),o=W(),l=B("div"),c=W(),u=B("div"),m=W(),v=B("div"),h=B("div"),p=W(),S=B("div"),_=B("h3"),A=B("span"),L=fe(t[6]),k=W(),$&&$.c(),E=W(),w=B("div"),F=W(),ee&&ee.c(),j=W(),ne(x.$$.fragment),D(a,"class","left-nav svelte-1uhffao"),D(n,"class","nav svelte-1uhffao"),D(h,"class","arrow calendar-clickable svelte-1uhffao"),D(h,"aria-label","Previous"),D(A,"class","current"),D(_,"class","fantasy-title title svelte-1uhffao"),D(S,"class","title-container svelte-1uhffao"),D(w,"class","arrow right calendar-clickable svelte-1uhffao"),D(w,"aria-label","Next"),D(v,"class","date svelte-1uhffao"),D(e,"class","day-view svelte-1uhffao")},m(Z,K){R(Z,e,K),C(e,n),C(n,a),C(a,r),C(a,o),C(a,l),C(n,c),C(n,u),C(e,m),C(e,v),C(v,h),C(v,p),C(v,S),C(S,_),C(_,A),C(A,L),C(S,k),$&&$.m(S,null),C(v,E),C(v,w),C(e,F),ee&&ee.m(e,null),C(e,j),te(x,e,null),T=!0,I||(U=[ue(i=t[11].call(null,r)),re(r,"click",t[15]),ue(s=t[12].call(null,l)),ue(d=t[10].call(null,u)),re(u,"click",t[16]),ue(y=t[13].call(null,h)),re(h,"click",t[17]),ue(N=t[14].call(null,w)),re(w,"click",t[18])],I=!0)},p(Z,[K]){(!T||K&64)&&ge(L,Z[6]),Z[0]?$?$.p(Z,K):($=Yf(Z),$.c(),$.m(S,null)):$&&($.d(1),$=null),Z[4]&&Z[5]&&Z[5].length?ee?(ee.p(Z,K),K&48&&P(ee,1)):(ee=$f(Z),ee.c(),P(ee,1),ee.m(e,j)):ee&&(De(),G(ee,1,1,()=>{ee=null}),_e());let ve={};K&8&&(ve.events=Z[3].events),K&128&&(ve.categories=Z[7]),K&4&&(ve.date=Z[2]),K&2&&(ve.calendar=Z[1]),x.$set(ve)},i(Z){T||(P(ee),P(x.$$.fragment,Z),T=!0)},o(Z){G(ee),G(x.$$.fragment,Z),T=!1},d(Z){Z&&q(e),$&&$.d(),ee&&ee.d(),J(x),I=!1,we(U)}}}function J1(t,e,n){let a,r,i,o,l,s,{displayDayNumber:c}=e,u=Ne("calendar"),d;u.subscribe(x=>{n(1,d=x)});let m;Ne("displayMoons").subscribe(x=>n(4,m=x)),d.on("day-update",()=>{n(2,r=d.viewing),n(6,a=d.viewedDate),n(3,i=d.getDayForDate(r)),n(5,l=i.moons)});let h=Ve(),y=x=>{new Ga.ExtraButtonComponent(x).setIcon("cross").setTooltip("Close")},p=x=>{new Ga.ExtraButtonComponent(x).setIcon("fantasy-calendar-reveal").setTooltip("Show on Calendar").onClick(()=>{n(1,d.displayed.year=d.viewing.year,d),d.setCurrentMonth(d.viewing.month)})},S=x=>{new Ga.ExtraButtonComponent(x).setIcon("plus-with-circle").setTooltip("New Event").onClick(()=>h("event",r))},_=x=>{new Ga.ExtraButtonComponent(x).setIcon("left-arrow")},A=x=>{new Ga.ExtraButtonComponent(x).setIcon("right-arrow")},L=()=>h("reveal"),k=()=>h("close"),E=()=>d.goToPreviousDay(),w=()=>d.goToNextDay();function N(x){ce.call(this,t,x)}function F(x){ce.call(this,t,x)}function j(x){ce.call(this,t,x)}return t.$$set=x=>{"displayDayNumber"in x&&n(0,c=x.displayDayNumber)},t.$$.update=()=>{if(t.$$.dirty&2){e:n(6,a=d.viewedDate)}if(t.$$.dirty&2){e:n(2,r=d.viewing)}if(t.$$.dirty&6){e:n(3,i=d.getDayForDate(r))}if(t.$$.dirty&6){e:n(8,o=d.dayNumberForDate(r))}if(t.$$.dirty&8){e:n(5,l=i.moons)}if(t.$$.dirty&2){e:n(7,s=d.categories)}},[c,d,r,i,m,l,a,s,o,h,y,p,S,_,A,L,k,E,w,N,F,j]}var Kf=class extends de{constructor(e){super();he(this,e,J1,X1,le,{displayDayNumber:0},Q1)}},Qf=Kf;function eb(t){be(t,"svelte-1gou5hh",".dot.svelte-1gou5hh{display:inline-block;min-height:6px;min-width:6px;height:6px;width:6px;margin:0 2px}.active.svelte-1gou5hh{color:var(--text-on-accent)}")}function tb(t){let e,n,a,r;return{c(){e=sn("svg"),n=sn("circle"),D(n,"stroke",a=t[2]??"currentColor"),D(n,"fill",r=t[2]??"currentColor"),D(n,"cx","3"),D(n,"cy","3"),D(n,"r","2"),D(e,"class","dot svelte-1gou5hh"),D(e,"viewBox","0 0 6 6"),D(e,"xmlns","http://www.w3.org/2000/svg"),me(e,"filled",t[0]),me(e,"active",t[1])},m(i,o){R(i,e,o),C(e,n)},p(i,[o]){o&4&&a!==(a=i[2]??"currentColor")&&D(n,"stroke",a),o&4&&r!==(r=i[2]??"currentColor")&&D(n,"fill",r),o&1&&me(e,"filled",i[0]),o&2&&me(e,"active",i[1])},i:Q,o:Q,d(i){i&&q(e)}}}function nb(t,e,n){let{isFilled:a=!0}=e,{isActive:r=!1}=e,{color:i}=e;return t.$$set=o=>{"isFilled"in o&&n(0,a=o.isFilled),"isActive"in o&&n(1,r=o.isActive),"color"in o&&n(2,i=o.color)},[a,r,i]}var Xf=class extends de{constructor(e){super();he(this,e,nb,tb,le,{isFilled:0,isActive:1,color:2},eb)}},Jf=Xf;function ab(t){be(t,"svelte-1w3ytba",".dots-container.svelte-1w3ytba{width:100%}.dot-container.svelte-1w3ytba{display:flex;flex-flow:row nowrap;width:fit-content;margin:auto;line-height:6px;min-height:6px}.centered.svelte-1w3ytba{justify-content:center;align-items:center}.overflow.svelte-1w3ytba{color:var(--text-muted);font-size:xx-small;display:flex;justify-content:flex-end;width:100%;line-height:1.25}")}function eh(t){let e,n,a,r;return{c(){e=B("div"),D(e,"class","dot-container centered svelte-1w3ytba")},m(i,o){R(i,e,o),a||(r=ue(n=t[2].call(null,e)),a=!0)},p:Q,d(i){i&&q(e),a=!1,r()}}}function th(t){let e,n,a;return{c(){e=B("span"),n=fe("+"),a=fe(t[1])},m(r,i){R(r,e,i),C(e,n),C(e,a)},p(r,i){i&2&&ge(a,r[1])},d(r){r&&q(e)}}}function rb(t){let e,n=t[0],a,r,i=eh(t),o=t[1]>0&&th(t);return{c(){e=B("div"),i.c(),a=W(),r=B("div"),o&&o.c(),D(r,"class","overflow svelte-1w3ytba"),D(e,"class","dots-container svelte-1w3ytba")},m(l,s){R(l,e,s),i.m(e,null),C(e,a),C(e,r),o&&o.m(r,null)},p(l,[s]){s&1&&le(n,n=l[0])?(i.d(1),i=eh(l),i.c(),i.m(e,a)):i.p(l,s),l[1]>0?o?o.p(l,s):(o=th(l),o.c(),o.m(r,null)):o&&(o.d(1),o=null)},i:Q,o:Q,d(l){l&&q(e),i.d(l),o&&o.d()}}}function ib(t,e,n){let{events:a=[]}=e,{categories:r}=e,{calendar:i}=e,o=0,l,s=0,c=d=>{if(l=d,a.length){let m=d.parentElement?.getBoundingClientRect()?.width;if(!m||Math.floor(m)==Math.floor(s))return;s=m;let v=m;d.empty(),n(1,o=0);for(let h of a)if(new Jf({target:d,props:{color:u(h)}}),v=m-d.getBoundingClientRect().width,v<0){d.lastElementChild.detach(),n(1,o=a.length-a.indexOf(h));break}else if(v==0){n(1,o=a.length-a.indexOf(h)-1);break}}};i.on("view-resized",()=>{!l||c(l)});let u=d=>r.find(m=>m.id==d.category)?.color;return t.$$set=d=>{"events"in d&&n(0,a=d.events),"categories"in d&&n(3,r=d.categories),"calendar"in d&&n(4,i=d.calendar)},[a,o,c,r,i]}var nh=class extends de{constructor(e){super();he(this,e,ib,rb,le,{events:0,categories:3,calendar:4},ab)}},ah=nh;function ob(t){be(t,"svelte-3pptg2",".day.svelte-3pptg2{background-color:transparent;border:2px solid transparent;border-radius:4px;color:var(--color-text-day);cursor:pointer;font-size:0.8em;height:100%;padding:2px;position:relative;text-align:center;vertical-align:baseline;overflow:visible;display:flex;flex-flow:column nowrap}.active.svelte-3pptg2{background-color:var(--background-secondary)}.viewing.svelte-3pptg2{border:2px solid var(--background-modifier-border)}.adjacent-month.svelte-3pptg2{opacity:0.25}")}function rh(t,e,n){let a=t.slice();return a[20]=e[n][0],a[21]=e[n][1],a}function sb(t){let e,n;return e=new ah({props:{events:t[4],categories:t[9],calendar:t[0].calendar}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r&16&&(i.events=a[4]),r&512&&(i.categories=a[9]),r&1&&(i.calendar=a[0].calendar),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function lb(t){let e,n,a,r=t[5]&&t[10]&&t[10].length&&ih(t);return n=new Si({props:{events:t[4],categories:t[9],date:t[8],calendar:t[0].calendar}}),n.$on("event-click",t[12]),n.$on("event-mouseover",t[13]),n.$on("event-context",t[14]),{c(){r&&r.c(),e=W(),ne(n.$$.fragment)},m(i,o){r&&r.m(i,o),R(i,e,o),te(n,i,o),a=!0},p(i,o){i[5]&&i[10]&&i[10].length?r?(r.p(i,o),o&1056&&P(r,1)):(r=ih(i),r.c(),P(r,1),r.m(e.parentNode,e)):r&&(De(),G(r,1,1,()=>{r=null}),_e());let l={};o&16&&(l.events=i[4]),o&512&&(l.categories=i[9]),o&256&&(l.date=i[8]),o&1&&(l.calendar=i[0].calendar),n.$set(l)},i(i){a||(P(r),P(n.$$.fragment,i),a=!0)},o(i){G(r),G(n.$$.fragment,i),a=!1},d(i){r&&r.d(i),i&&q(e),J(n,i)}}}function ih(t){let e,n,a=t[10],r=[];for(let o=0;o<a.length;o+=1)r[o]=oh(rh(t,a,o));let i=o=>G(r[o],1,1,()=>{r[o]=null});return{c(){e=B("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","moon-container")},m(o,l){R(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,l){if(l&1024){a=o[10];let s;for(s=0;s<a.length;s+=1){let c=rh(o,a,s);r[s]?(r[s].p(c,l),P(r[s],1)):(r[s]=oh(c),r[s].c(),P(r[s],1),r[s].m(e,null))}for(De(),s=a.length;s<r.length;s+=1)i(s);_e()}},i(o){if(!n){for(let l=0;l<a.length;l+=1)P(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)G(r[l]);n=!1},d(o){o&&q(e),Ge(r,o)}}}function oh(t){let e,n;return e=new jn({props:{moon:t[20],phase:t[21]}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r&1024&&(i.moon=a[20]),r&1024&&(i.phase=a[21]),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function ub(t){let e,n,a=t[0].number+"",r,i,o,l,s,c,u,d,m,v=[lb,sb],h=[];function y(p,S){return p[2]?0:1}return o=y(t,-1),l=h[o]=v[o](t),{c(){e=B("div"),n=B("span"),r=fe(a),i=W(),l.c(),D(e,"class",s=""+(xo(t[1]?"adjacent-month fantasy-adjacent-month":"")+" svelte-3pptg2")),D(e,"aria-label",c=!t[2]&&t[4].length?`${t[4].length} event${t[4].length==1?"":"s"}`:void 0),me(e,"day",!0),me(e,"fantasy-day",!0),me(e,"active",t[7]&&!t[1]),me(e,"viewing",t[3]&&t[6]&&!t[1])},m(p,S){R(p,e,S),C(e,n),C(n,r),C(e,i),h[o].m(e,null),u=!0,d||(m=[re(e,"click",t[15]),re(e,"dblclick",t[16]),re(e,"contextmenu",t[17])],d=!0)},p(p,[S]){(!u||S&1)&&a!==(a=p[0].number+"")&&ge(r,a);let _=o;o=y(p,S),o===_?h[o].p(p,S):(De(),G(h[_],1,1,()=>{h[_]=null}),_e(),l=h[o],l?l.p(p,S):(l=h[o]=v[o](p),l.c()),P(l,1),l.m(e,null)),(!u||S&2&&s!==(s=""+(xo(p[1]?"adjacent-month fantasy-adjacent-month":"")+" svelte-3pptg2")))&&D(e,"class",s),(!u||S&20&&c!==(c=!p[2]&&p[4].length?`${p[4].length} event${p[4].length==1?"":"s"}`:void 0))&&D(e,"aria-label",c),S&2&&me(e,"day",!0),S&2&&me(e,"fantasy-day",!0),S&130&&me(e,"active",p[7]&&!p[1]),S&74&&me(e,"viewing",p[3]&&p[6]&&!p[1])},i(p){u||(P(l),u=!0)},o(p){G(l),u=!1},d(p){p&&q(e),h[o].d(),d=!1,we(m)}}}function cb(t,e,n){let a,r,i,o,l,s=Ve(),{day:c}=e,{adjacent:u}=e,{fullView:d}=e,m=[],v;Ne("dayView").subscribe(w=>n(3,v=w));let y;Ne("displayMoons").subscribe(w=>n(5,y=w)),c.calendar.on("month-update",()=>{n(7,o=c.isCurrentDay),n(6,l=c.isDisplaying),n(4,m=c.events)}),c.calendar.on("day-update",()=>{n(7,o=c.isCurrentDay),n(6,l=c.isDisplaying)});function S(w){ce.call(this,t,w)}function _(w){ce.call(this,t,w)}function A(w){ce.call(this,t,w)}let L=()=>s("day-click",c),k=()=>s("day-doubleclick",c),E=w=>s("day-context-menu",{day:c,evt:w});return t.$$set=w=>{"day"in w&&n(0,c=w.day),"adjacent"in w&&n(1,u=w.adjacent),"fullView"in w&&n(2,d=w.fullView)},t.$$.update=()=>{if(t.$$.dirty&3){e:u||n(4,m=c.events)}if(t.$$.dirty&1){e:n(10,a=c.moons)}if(t.$$.dirty&1){e:n(9,r=c.calendar.categories)}if(t.$$.dirty&1){e:n(8,i=c.date)}if(t.$$.dirty&1){e:n(7,o=c.isCurrentDay)}if(t.$$.dirty&1){e:n(6,l=c.isDisplaying)}if(t.$$.dirty&8){e:n(3,v)}},[c,u,d,v,m,y,l,o,i,r,a,s,S,_,A,L,k,E]}var sh=class extends de{constructor(e){super();he(this,e,cb,ub,le,{day:0,adjacent:1,fullView:2},ob)}},Ar=sh;function db(t){be(t,"svelte-1cfzxxk",`.fantasy-month.svelte-1cfzxxk.svelte-1cfzxxk{display:grid;grid-template-columns:repeat(
var(--calendar-columns),
var(--column-widths)
);grid-auto-rows:var(--calendar-rows)}.intercalary.svelte-1cfzxxk.svelte-1cfzxxk{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;border-top:1px solid var(--background-modifier-border);border-bottom:1px solid var(--background-modifier-border);border-radius:0;align-items:center}.intercalary.svelte-1cfzxxk span.month.svelte-1cfzxxk{text-align:center}.intercalary.svelte-1cfzxxk .fantasy-month.svelte-1cfzxxk{grid-template-columns:unset;grid-auto-columns:var(--column-widths);align-items:center;justify-content:center}.leapday-container.svelte-1cfzxxk.svelte-1cfzxxk{grid-column:span var(--calendar-columns);display:flex;justify-content:center;align-items:center;border-top:1px solid var(--background-modifier-border);border-bottom:1px solid var(--background-modifier-border);color:var(--text-accent)}.full-view.svelte-1cfzxxk.svelte-1cfzxxk{height:100%;margin-bottom:0.5rem}.month.svelte-1cfzxxk.svelte-1cfzxxk{padding:0.25rem}.month-name.svelte-1cfzxxk.svelte-1cfzxxk{margin:0}.month.svelte-1cfzxxk .fantasy-day.day{padding:0px}`)}function lh(t,e,n){let a=t.slice();return a[24]=e[n],a}function uh(t,e,n){let a=t.slice();return a[24]=e[n],a}function ch(t,e,n){let a=t.slice();return a[29]=e[n],a}function dh(t,e,n){let a=t.slice();return a[29]=e[n],a}function fh(t,e,n){let a=t.slice();return a[24]=e[n],a}function hh(t){let e,n=t[1].name+"",a;return{c(){e=B("h3"),a=fe(n),D(e,"class","month-name svelte-1cfzxxk")},m(r,i){R(r,e,i),C(e,a)},p(r,i){i[0]&2&&n!==(n=r[1].name+"")&&ge(a,n)},d(r){r&&q(e)}}}function mh(t){let e,n=t[1].name+"",a;return{c(){e=B("span"),a=fe(n),D(e,"class","month svelte-1cfzxxk")},m(r,i){R(r,e,i),C(e,a)},p(r,i){i[0]&2&&n!==(n=r[1].name+"")&&ge(a,n)},d(r){r&&q(e)}}}function fb(t){let e;return{c(){e=B("div")},m(n,a){R(n,e,a)},p:Q,i:Q,o:Q,d(n){n&&q(e)}}}function hb(t){let e,n;return e=new Ar({props:{day:t[24],adjacent:!0,fullView:t[3]}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r[0]&512&&(i.day=a[24]),r[0]&8&&(i.fullView=a[3]),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function ph(t){let e,n,a,r,i=[hb,fb],o=[];function l(s,c){return s[6]&&s[24]!=null?0:1}return e=l(t,[-1,-1]),n=o[e]=i[e](t),{c(){n.c(),a=Ue()},m(s,c){o[e].m(s,c),R(s,a,c),r=!0},p(s,c){let u=e;e=l(s,c),e===u?o[e].p(s,c):(De(),G(o[u],1,1,()=>{o[u]=null}),_e(),n=o[e],n?n.p(s,c):(n=o[e]=i[e](s),n.c()),P(n,1),n.m(a.parentNode,a))},i(s){r||(P(n),r=!0)},o(s){G(n),r=!1},d(s){o[e].d(s),s&&q(a)}}}function gh(t){let e,n,a,r,i,o,l,s=t[10](t[24]).next,c=[];for(let y=0;y<s.length;y+=1)c[y]=yh(dh(t,s,y));let u=[pb,mb],d=[];function m(y,p){return y[24].leapday.numbered?0:1}a=m(t,[-1,-1]),r=d[a]=u[a](t);let v=t[10](t[24]).prev,h=[];for(let y=0;y<v.length;y+=1)h[y]=vh(ch(t,v,y));return{c(){for(let y=0;y<c.length;y+=1)c[y].c();e=W(),n=B("div"),r.c(),i=W();for(let y=0;y<h.length;y+=1)h[y].c();o=Ue(),D(n,"class","leapday-container svelte-1cfzxxk")},m(y,p){for(let S=0;S<c.length;S+=1)c[S].m(y,p);R(y,e,p),R(y,n,p),d[a].m(n,null),R(y,i,p);for(let S=0;S<h.length;S+=1)h[S].m(y,p);R(y,o,p),l=!0},p(y,p){if(p[0]&256){s=y[10](y[24]).next;let _;for(_=0;_<s.length;_+=1){let A=dh(y,s,_);c[_]?c[_].p(A,p):(c[_]=yh(A),c[_].c(),c[_].m(e.parentNode,e))}for(;_<c.length;_+=1)c[_].d(1);c.length=s.length}let S=a;if(a=m(y,p),a===S?d[a].p(y,p):(De(),G(d[S],1,1,()=>{d[S]=null}),_e(),r=d[a],r?r.p(y,p):(r=d[a]=u[a](y),r.c()),P(r,1),r.m(n,null)),p[0]&256){v=y[10](y[24]).prev;let _;for(_=0;_<v.length;_+=1){let A=ch(y,v,_);h[_]?h[_].p(A,p):(h[_]=vh(A),h[_].c(),h[_].m(o.parentNode,o))}for(;_<h.length;_+=1)h[_].d(1);h.length=v.length}},i(y){l||(P(r),l=!0)},o(y){G(r),l=!1},d(y){Ge(c,y),y&&q(e),y&&q(n),d[a].d(),y&&q(i),Ge(h,y),y&&q(o)}}}function yh(t){let e;return{c(){e=B("div")},m(n,a){R(n,e,a)},p:Q,d(n){n&&q(e)}}}function mb(t){let e=t[24].leapday.name+"",n;return{c(){n=fe(e)},m(a,r){R(a,n,r)},p(a,r){r[0]&256&&e!==(e=a[24].leapday.name+"")&&ge(n,e)},i:Q,o:Q,d(a){a&&q(n)}}}function pb(t){let e=t[24].leapday.name+"",n,a,r,i;return r=new Ar({props:{day:t[24],adjacent:!1,fullView:t[3]}}),r.$on("day-click",t[12]),r.$on("day-doubleclick",t[13]),r.$on("day-context-menu",t[14]),r.$on("event-click",t[15]),r.$on("event-mouseover",t[16]),r.$on("event-context",t[17]),{c(){n=fe(e),a=W(),ne(r.$$.fragment)},m(o,l){R(o,n,l),R(o,a,l),te(r,o,l),i=!0},p(o,l){(!i||l[0]&256)&&e!==(e=o[24].leapday.name+"")&&ge(n,e);let s={};l[0]&256&&(s.day=o[24]),l[0]&8&&(s.fullView=o[3]),r.$set(s)},i(o){i||(P(r.$$.fragment,o),i=!0)},o(o){G(r.$$.fragment,o),i=!1},d(o){o&&q(n),o&&q(a),J(r,o)}}}function vh(t){let e;return{c(){e=B("div")},m(n,a){R(n,e,a)},p:Q,d(n){n&&q(e)}}}function bh(t){let e,n;return e=new Ar({props:{day:t[24],adjacent:!1,fullView:t[3]}}),e.$on("day-click",t[18]),e.$on("day-doubleclick",t[19]),e.$on("day-context-menu",t[20]),e.$on("event-click",t[21]),e.$on("event-mouseover",t[22]),e.$on("event-context",t[23]),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r[0]&256&&(i.day=a[24]),r[0]&8&&(i.fullView=a[3]),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function wh(t){let e,n,a,r=t[24].leapday&&gh(t),i=!t[24].leapday?.numbered&&bh(t);return{c(){r&&r.c(),e=W(),i&&i.c(),n=Ue()},m(o,l){r&&r.m(o,l),R(o,e,l),i&&i.m(o,l),R(o,n,l),a=!0},p(o,l){o[24].leapday?r?(r.p(o,l),l[0]&256&&P(r,1)):(r=gh(o),r.c(),P(r,1),r.m(e.parentNode,e)):r&&(De(),G(r,1,1,()=>{r=null}),_e()),o[24].leapday?.numbered?i&&(De(),G(i,1,1,()=>{i=null}),_e()):i?(i.p(o,l),l[0]&256&&P(i,1)):(i=bh(o),i.c(),P(i,1),i.m(n.parentNode,n))},i(o){a||(P(r),P(i),a=!0)},o(o){G(r),G(i),a=!1},d(o){r&&r.d(o),o&&q(e),i&&i.d(o),o&&q(n)}}}function gb(t){let e;return{c(){e=B("div")},m(n,a){R(n,e,a)},p:Q,i:Q,o:Q,d(n){n&&q(e)}}}function yb(t){let e,n;return e=new Ar({props:{day:t[24],adjacent:!0,fullView:t[3]}}),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r[0]&128&&(i.day=a[24]),r[0]&8&&(i.fullView=a[3]),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Dh(t){let e,n,a,r,i=[yb,gb],o=[];function l(s,c){return s[6]?0:1}return e=l(t,[-1,-1]),n=o[e]=i[e](t),{c(){n.c(),a=Ue()},m(s,c){o[e].m(s,c),R(s,a,c),r=!0},p(s,c){let u=e;e=l(s,c),e===u?o[e].p(s,c):(De(),G(o[u],1,1,()=>{o[u]=null}),_e(),n=o[e],n?n.p(s,c):(n=o[e]=i[e](s),n.c()),P(n,1),n.m(a.parentNode,a))},i(s){r||(P(n),r=!0)},o(s){G(n),r=!1},d(s){o[e].d(s),s&&q(a)}}}function _h(t){let e,n,a,r,i=t[9],o=[];for(let h=0;h<i.length;h+=1)o[h]=ph(fh(t,i,h));let l=h=>G(o[h],1,1,()=>{o[h]=null}),s=t[8],c=[];for(let h=0;h<s.length;h+=1)c[h]=wh(uh(t,s,h));let u=h=>G(c[h],1,1,()=>{c[h]=null}),d=t[7],m=[];for(let h=0;h<d.length;h+=1)m[h]=Dh(lh(t,d,h));let v=h=>G(m[h],1,1,()=>{m[h]=null});return{c(){e=B("div");for(let h=0;h<o.length;h+=1)o[h].c();n=W();for(let h=0;h<c.length;h+=1)c[h].c();a=W();for(let h=0;h<m.length;h+=1)m[h].c();D(e,"class","fantasy-month svelte-1cfzxxk"),at(e,"--calendar-columns",t[2]),at(e,"--calendar-rows",t[3]?`${1/t[4]*100}%`:"1fr"),me(e,"full-view",t[3]),me(e,"year-view",t[0])},m(h,y){R(h,e,y);for(let p=0;p<o.length;p+=1)o[p].m(e,null);C(e,n);for(let p=0;p<c.length;p+=1)c[p].m(e,null);C(e,a);for(let p=0;p<m.length;p+=1)m[p].m(e,null);r=!0},p(h,y){if(y[0]&584){i=h[9];let p;for(p=0;p<i.length;p+=1){let S=fh(h,i,p);o[p]?(o[p].p(S,y),P(o[p],1)):(o[p]=ph(S),o[p].c(),P(o[p],1),o[p].m(e,n))}for(De(),p=i.length;p<o.length;p+=1)l(p);_e()}if(y[0]&1288){s=h[8];let p;for(p=0;p<s.length;p+=1){let S=uh(h,s,p);c[p]?(c[p].p(S,y),P(c[p],1)):(c[p]=wh(S),c[p].c(),P(c[p],1),c[p].m(e,a))}for(De(),p=s.length;p<c.length;p+=1)u(p);_e()}if(y[0]&200){d=h[7];let p;for(p=0;p<d.length;p+=1){let S=lh(h,d,p);m[p]?(m[p].p(S,y),P(m[p],1)):(m[p]=Dh(S),m[p].c(),P(m[p],1),m[p].m(e,null))}for(De(),p=d.length;p<m.length;p+=1)v(p);_e()}(!r||y[0]&4)&&at(e,"--calendar-columns",h[2]),(!r||y[0]&24)&&at(e,"--calendar-rows",h[3]?`${1/h[4]*100}%`:"1fr"),y[0]&8&&me(e,"full-view",h[3]),y[0]&1&&me(e,"year-view",h[0])},i(h){if(!r){for(let y=0;y<i.length;y+=1)P(o[y]);for(let y=0;y<s.length;y+=1)P(c[y]);for(let y=0;y<d.length;y+=1)P(m[y]);r=!0}},o(h){o=o.filter(Boolean);for(let y=0;y<o.length;y+=1)G(o[y]);c=c.filter(Boolean);for(let y=0;y<c.length;y+=1)G(c[y]);m=m.filter(Boolean);for(let y=0;y<m.length;y+=1)G(m[y]);r=!1},d(h){h&&q(e),Ge(o,h),Ge(c,h),Ge(m,h)}}}function vb(t){let e,n,a,r=t[8],i,o,l,s=t[0]&&hh(t),c=t[5]&&mh(t),u=_h(t);return{c(){e=B("div"),s&&s.c(),n=W(),c&&c.c(),a=W(),u.c(),D(e,"class","month svelte-1cfzxxk"),D(e,"data-id",i=t[1].id),D(e,"id",o=`MONTH-${t[1].id}-${t[1].year}`),me(e,"intercalary",t[5]),me(e,"full-view",t[3])},m(d,m){R(d,e,m),s&&s.m(e,null),C(e,n),c&&c.m(e,null),C(e,a),u.m(e,null),l=!0},p(d,m){d[0]?s?s.p(d,m):(s=hh(d),s.c(),s.m(e,n)):s&&(s.d(1),s=null),d[5]?c?c.p(d,m):(c=mh(d),c.c(),c.m(e,a)):c&&(c.d(1),c=null),m[0]&256&&le(r,r=d[8])?(De(),G(u,1,1,Q),_e(),u=_h(d),u.c(),P(u,1),u.m(e,null)):u.p(d,m),(!l||m[0]&2&&i!==(i=d[1].id))&&D(e,"data-id",i),(!l||m[0]&2&&o!==(o=`MONTH-${d[1].id}-${d[1].year}`))&&D(e,"id",o),m[0]&32&&me(e,"intercalary",d[5]),m[0]&8&&me(e,"full-view",d[3])},i(d){l||(P(u),l=!0)},o(d){G(u),l=!1},d(d){d&&q(e),s&&s.d(),c&&c.d(),u.d(d)}}}function bb(t,e,n){let a,r,i,o,{yearView:l=!1}=e,{month:s}=e,{columns:c}=e,{fullView:u=!1}=e,{weeks:d}=e,{intercalary:m=!1}=e,{showPad:v=!0}=e,h=x=>{let T=x.weekday,I=x.calendar.weekdays.length-T,U=[];I!=0&&(U=[...Array(I).keys()]);let $=[];return T!=0&&($=[...Array(T).keys()]),{next:U,prev:$}};function y(x){ce.call(this,t,x)}function p(x){ce.call(this,t,x)}function S(x){ce.call(this,t,x)}function _(x){ce.call(this,t,x)}function A(x){ce.call(this,t,x)}function L(x){ce.call(this,t,x)}function k(x){ce.call(this,t,x)}function E(x){ce.call(this,t,x)}function w(x){ce.call(this,t,x)}function N(x){ce.call(this,t,x)}function F(x){ce.call(this,t,x)}function j(x){ce.call(this,t,x)}return t.$$set=x=>{"yearView"in x&&n(0,l=x.yearView),"month"in x&&n(1,s=x.month),"columns"in x&&n(2,c=x.columns),"fullView"in x&&n(3,u=x.fullView),"weeks"in x&&n(4,d=x.weeks),"intercalary"in x&&n(5,m=x.intercalary),"showPad"in x&&n(6,v=x.showPad)},t.$$.update=()=>{if(t.$$.dirty[0]&2){e:n(11,a=s.calendar.getPaddedDaysForMonth(s))}if(t.$$.dirty[0]&2048){e:n(9,r=a.previous)}if(t.$$.dirty[0]&2){e:n(8,i=s.days)}if(t.$$.dirty[0]&2048){e:n(7,o=a.next)}},[l,s,c,u,d,m,v,o,i,r,h,a,y,p,S,_,A,L,k,E,w,N,F,j]}var Ch=class extends de{constructor(e){super();he(this,e,bb,vb,le,{yearView:0,month:1,columns:2,fullView:3,weeks:4,intercalary:5,showPad:6},db,[-1,-1])}},Vn=Ch;var Bi=Ee(require("obsidian"));function wb(t){be(t,"svelte-131055d",".fantasy-nav.nav.nav.svelte-131055d{padding:10px 0px;margin:0;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:stretch}.container.svelte-131055d{display:flex;align-items:center}.fantasy-title.svelte-131055d{margin:0;line-height:1.25}.fantasy-right-nav.svelte-131055d{display:flex;justify-content:center;align-items:flex-start}.calendar-clickable.svelte-131055d{align-items:center;cursor:pointer;display:flex;justify-content:center}.title-container.svelte-131055d{display:flex;flex-flow:column nowrap;align-items:flex-start}")}function Db(t){let e,n,a,r,i,o,l,s,c,u,d,m,v,h,y,p,S,_,A,L,k,E,w,N,F,j;return{c(){e=B("div"),n=B("div"),a=B("h3"),r=B("span"),i=fe(t[0]),o=W(),l=B("span"),s=fe(t[1]),c=W(),u=B("div"),d=B("div"),m=B("div"),h=W(),y=B("div"),p=B("span"),p.textContent="Today",_=W(),A=B("div"),E=W(),w=B("div"),D(r,"class","fantasy-month month"),D(l,"class","fantasy-year year"),D(a,"class","fantasy-title title svelte-131055d"),D(n,"class","title-container svelte-131055d"),D(m,"class","arrow calendar-clickable svelte-131055d"),D(m,"aria-label",t[4]),D(y,"class","reset-button calendar-clickable svelte-131055d"),D(y,"aria-label",S="Today is "+t[2]),D(A,"class","arrow right calendar-clickable svelte-131055d"),D(A,"aria-label",L=t[3].name),D(w,"class","calendar-clickable svelte-131055d"),D(w,"aria-label","Calendar Settings"),D(d,"class","container svelte-131055d"),D(u,"class","right-nav fantasy-right-nav svelte-131055d"),D(e,"class","fantasy-nav nav svelte-131055d")},m(x,T){R(x,e,T),C(e,n),C(n,a),C(a,r),C(r,i),C(a,o),C(a,l),C(l,s),C(e,c),C(e,u),C(u,d),C(d,m),C(d,h),C(d,y),C(y,p),C(d,_),C(d,A),C(d,E),C(d,w),F||(j=[ue(v=t[6].call(null,m)),re(m,"click",t[10]),re(y,"click",t[11]),ue(k=t[7].call(null,A)),re(A,"click",t[12]),ue(N=t[8].call(null,w)),re(w,"click",t[13])],F=!0)},p(x,[T]){T&1&&ge(i,x[0]),T&2&&ge(s,x[1]),T&16&&D(m,"aria-label",x[4]),T&4&&S!==(S="Today is "+x[2])&&D(y,"aria-label",S),T&8&&L!==(L=x[3].name)&&D(A,"aria-label",L)},i:Q,o:Q,d(x){x&&q(e),F=!1,we(j)}}}function _b(t,e,n){let a,r=Ve(),{month:i}=e,{year:o}=e,{current:l}=e,s=Ne("calendar"),c;s.subscribe(A=>{c=A});let u=c.getPreviousMonth(),d=c.getNextMonth();c.on("month-update",()=>{n(9,u=c.getPreviousMonth()),n(3,d=c.getNextMonth())});let m=A=>{new Bi.ExtraButtonComponent(A).setIcon("left-arrow")},v=A=>{new Bi.ExtraButtonComponent(A).setIcon("right-arrow")},h=A=>{new Bi.ExtraButtonComponent(A).setIcon("gear")},y=()=>r("previous"),p=()=>r("reset"),S=A=>r("next"),_=A=>r("settings",A);return t.$$set=A=>{"month"in A&&n(0,i=A.month),"year"in A&&n(1,o=A.year),"current"in A&&n(2,l=A.current)},t.$$.update=()=>{if(t.$$.dirty&512){e:n(4,a=u?.name??"No Previous Month")}},[i,o,l,d,a,r,m,v,h,u,y,p,S,_]}var Eh=class extends de{constructor(e){super();he(this,e,_b,Db,le,{month:0,year:1,current:2},wb)}},Ah=Eh;var Ni=Ee(require("obsidian"));function Cb(t){be(t,"svelte-i3pajt","#calendar-container .fantasy-nav.nav.nav.svelte-i3pajt{padding:0;margin:0;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2}.fantasy-year-nav.svelte-i3pajt{display:flex;align-items:center;margin-right:auto}.container.svelte-i3pajt{display:flex;align-items:center}.fantasy-title.svelte-i3pajt{margin:0}.fantasy-right-nav.svelte-i3pajt{display:flex;justify-content:center;align-items:flex-start}.calendar-clickable.svelte-i3pajt{align-items:center;cursor:pointer;display:flex;justify-content:center}")}function kh(t){let e,n,a,r;return{c(){e=B("div"),D(e,"class","arrow calendar-clickable svelte-i3pajt"),D(e,"aria-label","Previous Year")},m(i,o){R(i,e,o),a||(r=[ue(n=t[4].call(null,e)),re(e,"click",t[7])],a=!0)},p:Q,d(i){i&&q(e),a=!1,we(r)}}}function xh(t){let e,n,a,r;return{c(){e=B("div"),D(e,"class","arrow right calendar-clickable svelte-i3pajt"),D(e,"aria-label","Next Year")},m(i,o){R(i,e,o),a||(r=[ue(n=t[5].call(null,e)),re(e,"click",t[9])],a=!0)},p:Q,d(i){i&&q(e),a=!1,we(r)}}}function Eb(t){let e,n,a,r,i,o,l,s,c,u,d,m,v,h,y,p,S,_,A=t[1]&&kh(t),L=t[1]&&xh(t);return{c(){e=B("div"),n=B("div"),a=B("h2"),r=B("span"),i=fe(t[0]),o=W(),l=B("div"),s=B("div"),A&&A.c(),c=W(),u=B("div"),d=B("span"),d.textContent="Today",v=W(),L&&L.c(),h=W(),y=B("div"),D(r,"class","fantasy-year"),D(a,"class","fantasy-title svelte-i3pajt"),D(n,"class","fantasy-year-nav svelte-i3pajt"),D(u,"class","reset-button calendar-clickable svelte-i3pajt"),D(u,"aria-label",m="Today is "+t[2]),D(y,"class","calendar-clickable svelte-i3pajt"),D(y,"aria-label","Calendar Settings"),D(s,"class","container svelte-i3pajt"),D(l,"class","right-nav fantasy-right-nav svelte-i3pajt"),D(e,"class","fantasy-nav nav svelte-i3pajt")},m(k,E){R(k,e,E),C(e,n),C(n,a),C(a,r),C(r,i),C(e,o),C(e,l),C(l,s),A&&A.m(s,null),C(s,c),C(s,u),C(u,d),C(s,v),L&&L.m(s,null),C(s,h),C(s,y),S||(_=[re(u,"click",t[8]),ue(p=t[6].call(null,y)),re(y,"click",t[10])],S=!0)},p(k,[E]){E&1&&ge(i,k[0]),k[1]?A?A.p(k,E):(A=kh(k),A.c(),A.m(s,c)):A&&(A.d(1),A=null),E&4&&m!==(m="Today is "+k[2])&&D(u,"aria-label",m),k[1]?L?L.p(k,E):(L=xh(k),L.c(),L.m(s,h)):L&&(L.d(1),L=null)},i:Q,o:Q,d(k){k&&q(e),A&&A.d(),L&&L.d(),S=!1,we(_)}}}function Ab(t,e,n){let a=Ve(),{year:r}=e,{arrows:i=!1}=e,{current:o}=e,l=h=>{new Ni.ExtraButtonComponent(h).setIcon("left-arrow")},s=h=>{new Ni.ExtraButtonComponent(h).setIcon("right-arrow")},c=h=>{new Ni.ExtraButtonComponent(h).setIcon("gear")},u=()=>a("previous"),d=()=>a("reset"),m=h=>a("next"),v=h=>a("settings",h);return t.$$set=h=>{"year"in h&&n(0,r=h.year),"arrows"in h&&n(1,i=h.arrows),"current"in h&&n(2,o=h.current)},[r,i,o,a,l,s,c,u,d,m,v]}var Fh=class extends de{constructor(e){super();he(this,e,Ab,Eb,le,{year:0,arrows:1,current:2},Cb)}},Mi=Fh;function kb(t){be(t,"svelte-15hvixf",".year-view.svelte-15hvixf{height:100%;position:relative;display:flex;flex-direction:column}.year.svelte-15hvixf{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1rem;overflow:auto;flex:1}.year.svelte-15hvixf:not(.full-view){grid-template-columns:1fr}")}function xb(t){let e,n,a,r,i,o,l;return n=new Mi({props:{year:t[3],current:t[0]}}),n.$on("next",t[9]),n.$on("previous",t[10]),n.$on("reset",t[11]),n.$on("settings",t[12]),{c(){e=B("div"),ne(n.$$.fragment),a=W(),r=B("div"),D(r,"class","year svelte-15hvixf"),me(r,"full-view",t[1]),D(e,"class","year-view svelte-15hvixf")},m(s,c){R(s,e,c),te(n,e,null),C(e,a),C(e,r),t[13](r),i=!0,o||(l=re(r,"scroll",t[5],{once:!0}),o=!0)},p(s,[c]){let u={};c&8&&(u.year=s[3]),c&1&&(u.current=s[0]),n.$set(u),c&2&&me(r,"full-view",s[1])},i(s){i||(P(n.$$.fragment,s),i=!0)},o(s){G(n.$$.fragment,s),i=!1},d(s){s&&q(e),J(n),t[13](null),o=!1,l()}}}function Fb(t,e,n){let a,r=Ve(),{current:i}=e,{year:o}=e,{columns:l}=e,{fullView:s}=e,c,u,d,m=Ne("calendar"),v;m.subscribe(K=>{n(8,v=K)});let h=[],y=Ne("dayView"),p=Ne("displayMoons"),S=new IntersectionObserver((K,ve)=>{ve===S&&(!K.length||!K[0].isIntersecting||(S.disconnect(),!(!v.canGoToNextYear(d.year)&&d.number===v.data.months.length-1)&&(L(),j(h.shift()),_())))},{root:c,rootMargin:"0px",threshold:.25}),_=()=>{let K=c.children[c.children.length-2];!K||S.observe(K)},A=new IntersectionObserver((K,ve)=>{if(ve!==A||!K&&!K.length||K[0].isIntersecting)return;let xe=c.getBoundingClientRect();K[0].boundingClientRect.top<xe.top&&(n(6,o+=1),w.observe(K[0].target),A.disconnect())},{root:c,rootMargin:"0px",threshold:0}),L=(K=!0)=>{if(!(!v.canGoToNextYear(d.year)&&d.number===v.data.months.length-1)){if(d=v.getMonth(d.number+1,d.year),d.number===0&&!(c.lastElementChild instanceof HTMLHeadingElement)){let ve=c.createEl("h2",{text:v.getNameForYear(d.year),cls:"fantasy-title"});h.push(ve),A.disconnect(),A.observe(ve)}h.push(F(d,!1)),K&&(u=v.getMonth((u?.number??0)+1,u?.year??1)),E()}},k=new IntersectionObserver((K,ve)=>{ve===k&&(!K.length||!K[0].isIntersecting||(k.disconnect(),!!u&&(N(),j(h.pop()),E())))},{root:c,rootMargin:"0px",threshold:.25}),E=()=>{let K=c.children[1];!K||k.observe(K)},w=new IntersectionObserver((K,ve)=>{ve===w&&(!K&&!K.length||K[0].isIntersecting&&(n(6,o-=1),A.observe(K[0].target),w.disconnect()))},{root:c,rootMargin:"0px",threshold:0}),N=(K=!0)=>{if(u=v.getMonth(u.number-1,u.year),!!u){if(h.unshift(F(u,!0)),u.number===0&&!(c.firstElementChild instanceof HTMLHeadingElement)){let ve=createEl("h2",{text:v.getNameForYear(u.year),cls:"fantasy-title"});c.prepend(ve),h.unshift(ve),w.disconnect(),w.observe(ve)}K&&(d=v.getMonth(d.number-1,d.year)),_()}},F=(K,ve)=>{let xe=new Vn({target:c,anchor:ve?c.children[0]:null,props:{month:K,fullView:!1,yearView:!0,columns:l,weeks:v.weekdays.length,showPad:!1},context:new Map([["dayView",y],["displayMoons",p]])});return xe.$on("day-click",Ae=>r("day-click",Ae.detail)),xe.$on("day-doubleclick",Ae=>r("day-doubleclick",Ae.detail)),xe.$on("day-context-menu",Ae=>r("day-context-menu",Ae.detail)),xe.$on("event-mouseover",Ae=>r("event-mouseover",Ae.detail)),xe.$on("event-mouseover",Ae=>r("event-mouseover",Ae.detail)),xe},j=K=>{K instanceof HTMLHeadingElement?K.detach():K.$destroy()},x=async(K=!1)=>{for(let xe of h)j(xe);h.splice(0,h.length),c.empty(),await Kn(),n(6,o=v.current.year),u=v.getMonth(v.displayed.month-1,v.displayed.year),d=u;for(let xe=0;xe<v.data.months.length;xe++)L(!1);N(!1),await Kn(),c.querySelector(`#MONTH-${v.currentMonth.id}-${o}`).scrollIntoView(!0),K&&T()};Bo(()=>{k.disconnect(),S.disconnect(),w.disconnect(),A.disconnect()}),$n(x);let T=async()=>{await Kn(),k.observe(c.children[1]),S.observe(c.children[c.children.length-2])};function I(K){ce.call(this,t,K)}function U(K){ce.call(this,t,K)}let $=()=>x(!0);function ee(K){ce.call(this,t,K)}function Z(K){Aa[K?"unshift":"push"](()=>{c=K,n(2,c)})}return t.$$set=K=>{"current"in K&&n(0,i=K.current),"year"in K&&n(6,o=K.year),"columns"in K&&n(7,l=K.columns),"fullView"in K&&n(1,s=K.fullView)},t.$$.update=()=>{if(t.$$.dirty&320){e:n(3,a=v.getNameForYear(o))}},[i,s,c,a,x,T,o,l,v,I,U,$,ee,Z]}var Th=class extends de{constructor(e){super();he(this,e,Fb,xb,le,{current:0,year:6,columns:7,fullView:1},kb)}},Sh=Th;var Ss=Ee(require("obsidian"));function Tb(t){be(t,"svelte-ztrrn8",".year.svelte-ztrrn8{display:grid;grid-template-columns:1fr 1fr 1fr;gap:1rem;overflow:auto;flex:1}.year.svelte-ztrrn8:not(.full-view){grid-template-columns:1fr}")}function Bh(t,e,n){let a=t.slice();return a[8]=e[n],a}function Nh(t){let e,n;return e=new Vn({props:{month:t[8],fullView:!1,yearView:!0,columns:t[2],weeks:t[8].calendar.weekdays.length,showPad:!1}}),e.$on("day-click",t[3]),e.$on("day-doubleclick",t[4]),e.$on("day-context-menu",t[5]),e.$on("event-click",t[6]),e.$on("event-mouseover",t[7]),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r&2&&(i.month=a[8]),r&4&&(i.columns=a[2]),r&2&&(i.weeks=a[8].calendar.weekdays.length),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Sb(t){let e,n,a=t[1],r=[];for(let o=0;o<a.length;o+=1)r[o]=Nh(Bh(t,a,o));let i=o=>G(r[o],1,1,()=>{r[o]=null});return{c(){e=B("div");for(let o=0;o<r.length;o+=1)r[o].c();D(e,"class","year svelte-ztrrn8"),me(e,"full-view",t[0])},m(o,l){R(o,e,l);for(let s=0;s<r.length;s+=1)r[s].m(e,null);n=!0},p(o,[l]){if(l&6){a=o[1];let s;for(s=0;s<a.length;s+=1){let c=Bh(o,a,s);r[s]?(r[s].p(c,l),P(r[s],1)):(r[s]=Nh(c),r[s].c(),P(r[s],1),r[s].m(e,null))}for(De(),s=a.length;s<r.length;s+=1)i(s);_e()}l&1&&me(e,"full-view",o[0])},i(o){if(!n){for(let l=0;l<a.length;l+=1)P(r[l]);n=!0}},o(o){r=r.filter(Boolean);for(let l=0;l<r.length;l+=1)G(r[l]);n=!1},d(o){o&&q(e),Ge(r,o)}}}function Bb(t,e,n){let{fullView:a}=e,{months:r}=e,{columns:i}=e;function o(d){ce.call(this,t,d)}function l(d){ce.call(this,t,d)}function s(d){ce.call(this,t,d)}function c(d){ce.call(this,t,d)}function u(d){ce.call(this,t,d)}return t.$$set=d=>{"fullView"in d&&n(0,a=d.fullView),"months"in d&&n(1,r=d.months),"columns"in d&&n(2,i=d.columns)},[a,r,i,o,l,s,c,u]}var Mh=class extends de{constructor(e){super();he(this,e,Bb,Sb,le,{fullView:0,months:1,columns:2},Tb)}},Ih=Mh;function Nb(t){be(t,"svelte-1xpvbi",".year-view.svelte-1xpvbi{height:100%;position:relative;display:flex;flex-direction:column}.year-container.svelte-1xpvbi{flex:1;overflow:auto}")}function Mb(t){let e,n,a,r,i;return n=new Mi({props:{year:t[2],current:t[0],arrows:!0}}),n.$on("next",t[9]),n.$on("previous",t[10]),n.$on("reset",t[11]),n.$on("settings",t[12]),{c(){e=B("div"),ne(n.$$.fragment),a=W(),r=B("div"),D(r,"class","year-container svelte-1xpvbi"),D(e,"class","year-view svelte-1xpvbi")},m(o,l){R(o,e,l),te(n,e,null),C(e,a),C(e,r),t[13](r),i=!0},p(o,[l]){let s={};l&4&&(s.year=o[2]),l&1&&(s.current=o[0]),n.$set(s)},i(o){i||(P(n.$$.fragment,o),i=!0)},o(o){G(n.$$.fragment,o),i=!1},d(o){o&&q(e),J(n),t[13](null)}}}function Ib(t,e,n){let a,r=Ve(),i=Ne("calendar"),o=Ne("dayView"),l=Ne("displayMoons"),s;i.subscribe(F=>{n(8,s=F)});let{year:c}=e,{current:u}=e,{columns:d}=e,m,v=(F,j=!1)=>{let x=s.getMonthsForYear(F),T=new Ih({target:m,anchor:j?m.children[0]:null,props:{months:x,fullView:!0,columns:d},context:new Map([["dayView",o],["displayMoons",l]])});return T.$on("day-click",I=>r("day-click",I.detail)),T.$on("day-doubleclick",I=>r("day-doubleclick",I.detail)),T.$on("day-context-menu",I=>r("day-context-menu",I.detail)),T.$on("event-mouseover",I=>r("event-mouseover",I.detail)),T.$on("event-mouseover",I=>r("event-mouseover",I.detail)),T},h=F=>{F instanceof HTMLHeadingElement?F.detach():F.$destroy()},y=[],p=()=>{if(!s.canGoToNextYear(c)){new Ss.Notice("This is the last year. Additional years can be created in settings.");return}n(6,c=c+1),A(c)},S=()=>{if(c===1){new Ss.Notice("This is the earliest year.");return}n(6,c=c-1),A(c)},_=()=>{n(6,c=s.current.year),A(c)},A=async F=>{y.forEach(j=>h(j)),m.empty(),await Kn(),F=F,y.push(v(F))};$n(()=>y.push(v(c)));let L=()=>p(),k=()=>S(),E=()=>_();function w(F){ce.call(this,t,F)}function N(F){Aa[F?"unshift":"push"](()=>{m=F,n(1,m)})}return t.$$set=F=>{"year"in F&&n(6,c=F.year),"current"in F&&n(0,u=F.current),"columns"in F&&n(7,d=F.columns)},t.$$.update=()=>{if(t.$$.dirty&320){e:n(2,a=s.getNameForYear(c))}},[u,m,a,p,S,_,c,d,s,L,k,E,w,N]}var Oh=class extends de{constructor(e){super();he(this,e,Ib,Mb,le,{year:6,current:0,columns:7},Nb)}},qh=Oh;function Ob(t){be(t,"svelte-li8ss6","#calendar-container.year-view.svelte-li8ss6.svelte-li8ss6{height:100%}#calendar-container.fantasy-calendar.full-view.svelte-li8ss6.svelte-li8ss6{width:100%;padding:0 0.5rem 0.5rem;height:100%;display:flex;flex-flow:column}.fantasy-calendar.full-view.svelte-li8ss6 .month-container.svelte-li8ss6{height:100%}.month-container.svelte-li8ss6.svelte-li8ss6{display:flex}.month-view.svelte-li8ss6.svelte-li8ss6{flex-grow:2}.weeks.svelte-li8ss6.svelte-li8ss6{display:grid;grid-template-rows:auto 1fr}.week-num-container.svelte-li8ss6.svelte-li8ss6{display:grid;grid-template-rows:repeat(var(--calendar-rows), auto);padding:0.25rem 0}.week-num.svelte-li8ss6.svelte-li8ss6{background-color:transparent;border:2px solid transparent;border-radius:4px;color:var(--color-text-day);cursor:pointer;font-size:0.8em;height:100%;padding:2px;position:relative;text-align:center;vertical-align:baseline;overflow:visible}.weekdays.svelte-li8ss6.svelte-li8ss6{display:grid;grid-template-columns:repeat(var(--calendar-columns), 1fr);grid-template-rows:auto;padding:0 0.25rem;gap:2px}.weekday.svelte-li8ss6.svelte-li8ss6{background-color:var(--color-background-heading);color:var(--color-text-heading);font-size:0.6em;letter-spacing:1px;padding:4px;text-transform:uppercase;text-align:center;border:2px solid transparent}hr.svelte-li8ss6.svelte-li8ss6{margin:1rem 0}.moon-container{display:flex;flex-flow:row wrap;align-items:center;justify-content:center}")}function Rh(t,e,n){let a=t.slice();return a[64]=e[n],a}function Lh(t,e,n){let a=t.slice();return a[67]=e[n],a}function qb(t){let e,n,a,r,i,o,l,s,c,u,d;e=new Ah({props:{month:t[6].name,year:t[11],current:t[3].currentDate}}),e.$on("next",t[34]),e.$on("previous",t[35]),e.$on("reset",t[36]),e.$on("settings",t[37]);let m=t[5]&&Ph(t),v=t[9]&&t[9].type=="intercalary"&&!t[14]&&Vh(t),h=t[6].type=="month"&&Hh(t);c=new Vn({props:{columns:t[13].length,weeks:t[7],month:t[6],fullView:t[1]}}),c.$on("day-click",t[44]),c.$on("day-doubleclick",t[45]),c.$on("day-context-menu",t[46]),c.$on("event-click",t[47]),c.$on("event-mouseover",t[48]),c.$on("event-context",t[49]);let y=t[10]&&t[10].type=="intercalary"&&!t[14]&&Gh(t);return{c(){ne(e.$$.fragment),n=W(),a=B("div"),r=B("div"),m&&m.c(),i=W(),o=B("div"),v&&v.c(),l=W(),h&&h.c(),s=W(),ne(c.$$.fragment),u=W(),y&&y.c(),D(r,"class","weeks svelte-li8ss6"),D(o,"class","month-view svelte-li8ss6"),D(a,"class","month-container svelte-li8ss6")},m(p,S){te(e,p,S),R(p,n,S),R(p,a,S),C(a,r),m&&m.m(r,null),C(a,i),C(a,o),v&&v.m(o,null),C(o,l),h&&h.m(o,null),C(o,s),te(c,o,null),C(o,u),y&&y.m(o,null),d=!0},p(p,S){let _={};S[0]&64&&(_.month=p[6].name),S[0]&2048&&(_.year=p[11]),S[0]&8&&(_.current=p[3].currentDate),e.$set(_),p[5]?m?m.p(p,S):(m=Ph(p),m.c(),m.m(r,null)):m&&(m.d(1),m=null),p[9]&&p[9].type=="intercalary"&&!p[14]?v?(v.p(p,S),S[0]&16896&&P(v,1)):(v=Vh(p),v.c(),P(v,1),v.m(o,l)):v&&(De(),G(v,1,1,()=>{v=null}),_e()),p[6].type=="month"?h?h.p(p,S):(h=Hh(p),h.c(),h.m(o,s)):h&&(h.d(1),h=null);let A={};S[0]&8192&&(A.columns=p[13].length),S[0]&128&&(A.weeks=p[7]),S[0]&64&&(A.month=p[6]),S[0]&2&&(A.fullView=p[1]),c.$set(A),p[10]&&p[10].type=="intercalary"&&!p[14]?y?(y.p(p,S),S[0]&17408&&P(y,1)):(y=Gh(p),y.c(),P(y,1),y.m(o,null)):y&&(De(),G(y,1,1,()=>{y=null}),_e())},i(p){d||(P(e.$$.fragment,p),P(v),P(c.$$.fragment,p),P(y),d=!0)},o(p){G(e.$$.fragment,p),G(v),G(c.$$.fragment,p),G(y),d=!1},d(p){J(e,p),p&&q(n),p&&q(a),m&&m.d(),v&&v.d(),h&&h.d(),J(c),y&&y.d()}}}function Rb(t){let e,n;return e=new qh({props:{year:t[12],columns:t[13].length,current:t[3].displayedDate}}),e.$on("next",t[25]),e.$on("previous",t[26]),e.$on("reset",t[27]),e.$on("settings",t[28]),e.$on("day-click",t[29]),e.$on("day-doubleclick",t[30]),e.$on("day-context-menu",t[31]),e.$on("event-click",t[32]),e.$on("event-mouseover",t[33]),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r[0]&4096&&(i.year=a[12]),r[0]&8192&&(i.columns=a[13].length),r[0]&8&&(i.current=a[3].displayedDate),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Lb(t){let e,n;return e=new Sh({props:{year:t[12],fullView:t[1],columns:t[13].length,current:t[3].displayedDate}}),e.$on("next",t[16]),e.$on("previous",t[17]),e.$on("reset",t[18]),e.$on("settings",t[19]),e.$on("day-click",t[20]),e.$on("day-doubleclick",t[21]),e.$on("day-context-menu",t[22]),e.$on("event-click",t[23]),e.$on("event-mouseover",t[24]),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r[0]&4096&&(i.year=a[12]),r[0]&2&&(i.fullView=a[1]),r[0]&8192&&(i.columns=a[13].length),r[0]&8&&(i.current=a[3].displayedDate),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Ph(t){let e,n,a,r=[...Array(t[7]).keys()],i=[];for(let o=0;o<r.length;o+=1)i[o]=jh(Lh(t,r,o));return{c(){e=B("span"),e.textContent="W",n=W(),a=B("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","week-num weekday fantasy-weekday svelte-li8ss6"),D(a,"class","week-num-container svelte-li8ss6")},m(o,l){R(o,e,l),R(o,n,l),R(o,a,l);for(let s=0;s<i.length;s+=1)i[s].m(a,null)},p(o,l){if(l[0]&384){r=[...Array(o[7]).keys()];let s;for(s=0;s<r.length;s+=1){let c=Lh(o,r,s);i[s]?i[s].p(c,l):(i[s]=jh(c),i[s].c(),i[s].m(a,null))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(o){o&&q(e),o&&q(n),o&&q(a),Ge(i,o)}}}function jh(t){let e,n=t[8]+1+t[67]+"",a;return{c(){e=B("span"),a=fe(n),D(e,"class","week-num svelte-li8ss6")},m(r,i){R(r,e,i),C(e,a)},p(r,i){i[0]&384&&n!==(n=r[8]+1+r[67]+"")&&ge(a,n)},d(r){r&&q(e)}}}function Vh(t){let e,n;return e=new Vn({props:{intercalary:!0,columns:t[13].length,weeks:t[7],month:t[9],fullView:t[1]}}),e.$on("day-click",t[38]),e.$on("day-doubleclick",t[39]),e.$on("day-context-menu",t[40]),e.$on("event-click",t[41]),e.$on("event-mouseover",t[42]),e.$on("event-context",t[43]),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r[0]&8192&&(i.columns=a[13].length),r[0]&128&&(i.weeks=a[7]),r[0]&512&&(i.month=a[9]),r[0]&2&&(i.fullView=a[1]),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Hh(t){let e,n=t[13],a=[];for(let r=0;r<n.length;r+=1)a[r]=Wh(Rh(t,n,r));return{c(){e=B("div");for(let r=0;r<a.length;r+=1)a[r].c();D(e,"class","weekdays svelte-li8ss6")},m(r,i){R(r,e,i);for(let o=0;o<a.length;o+=1)a[o].m(e,null)},p(r,i){if(i[0]&8192){n=r[13];let o;for(o=0;o<n.length;o+=1){let l=Rh(r,n,o);a[o]?a[o].p(l,i):(a[o]=Wh(l),a[o].c(),a[o].m(e,null))}for(;o<a.length;o+=1)a[o].d(1);a.length=n.length}},d(r){r&&q(e),Ge(a,r)}}}function Wh(t){let e,n=t[64].name.slice(0,3)+"",a;return{c(){e=B("span"),a=fe(n),D(e,"class","weekday fantasy-weekday svelte-li8ss6")},m(r,i){R(r,e,i),C(e,a)},p(r,i){i[0]&8192&&n!==(n=r[64].name.slice(0,3)+"")&&ge(a,n)},d(r){r&&q(e)}}}function Gh(t){let e,n;return e=new Vn({props:{intercalary:!0,columns:t[13].length,weeks:t[7],month:t[10],fullView:t[1]}}),e.$on("day-click",t[50]),e.$on("day-doubleclick",t[51]),e.$on("day-context-menu",t[52]),e.$on("event-click",t[53]),e.$on("event-mouseover",t[54]),e.$on("event-context",t[55]),{c(){ne(e.$$.fragment)},m(a,r){te(e,a,r),n=!0},p(a,r){let i={};r[0]&8192&&(i.columns=a[13].length),r[0]&128&&(i.weeks=a[7]),r[0]&1024&&(i.month=a[10]),r[0]&2&&(i.fullView=a[1]),e.$set(i)},i(a){n||(P(e.$$.fragment,a),n=!0)},o(a){G(e.$$.fragment,a),n=!1},d(a){J(e,a)}}}function Uh(t){let e,n,a,r;return a=new Qf({props:{displayDayNumber:t[4]}}),a.$on("close",t[56]),a.$on("event-click",t[57]),a.$on("event-mouseover",t[58]),a.$on("event-context",t[59]),a.$on("event",t[60]),{c(){e=B("hr"),n=W(),ne(a.$$.fragment),D(e,"class","svelte-li8ss6")},m(i,o){R(i,e,o),R(i,n,o),te(a,i,o),r=!0},p(i,o){let l={};o[0]&16&&(l.displayDayNumber=i[4]),a.$set(l)},i(i){r||(P(a.$$.fragment,i),r=!0)},o(i){G(a.$$.fragment,i),r=!1},d(i){i&&q(e),i&&q(n),J(a,i)}}}function Pb(t){let e,n,a,r,i,o,l=[Lb,Rb,qb],s=[];function c(d,m){return d[2]&&!d[1]?0:d[2]?1:2}n=c(t,[-1,-1,-1]),a=s[n]=l[n](t);let u=t[0]&&!t[1]&&Uh(t);return{c(){e=B("div"),a.c(),r=W(),u&&u.c(),i=Ue(),D(e,"id","calendar-container"),D(e,"class","fantasy-calendar svelte-li8ss6"),at(e,"--calendar-columns",t[3].weekdays.length),at(e,"--column-widths",1/t[3].weekdays.length*100+"%"),at(e,"--calendar-rows",t[3].weeksPerCurrentMonth),me(e,"full-view",t[1]),me(e,"year-view",t[2])},m(d,m){R(d,e,m),s[n].m(e,null),R(d,r,m),u&&u.m(d,m),R(d,i,m),o=!0},p(d,m){let v=n;n=c(d,m),n===v?s[n].p(d,m):(De(),G(s[v],1,1,()=>{s[v]=null}),_e(),a=s[n],a?a.p(d,m):(a=s[n]=l[n](d),a.c()),P(a,1),a.m(e,null)),(!o||m[0]&8)&&at(e,"--calendar-columns",d[3].weekdays.length),(!o||m[0]&8)&&at(e,"--column-widths",1/d[3].weekdays.length*100+"%"),(!o||m[0]&8)&&at(e,"--calendar-rows",d[3].weeksPerCurrentMonth),m[0]&2&&me(e,"full-view",d[1]),m[0]&4&&me(e,"year-view",d[2]),d[0]&&!d[1]?u?(u.p(d,m),m[0]&3&&P(u,1)):(u=Uh(d),u.c(),P(u,1),u.m(i.parentNode,i)):u&&(De(),G(u,1,1,()=>{u=null}),_e())},i(d){o||(P(a),P(u),o=!0)},o(d){G(a),G(u),o=!1},d(d){d&&q(e),s[n].d(),d&&q(r),u&&u.d(d),d&&q(i)}}}function jb(t,e,n){let a,r,i,o,l,s,c,u,d,{fullView:m=!1}=e,{dayView:v=!1}=e,{yearView:h=!1}=e,{calendar:y}=e,{moons:p}=e,{displayDayNumber:S}=e,{displayWeeks:_}=e,A=pn(v),L=pn(p),k=pn(y);Zn("dayView",A),Zn("displayMoons",L),Zn("calendar",k),y.on("month-update",()=>{n(12,i=y.displayed.year),n(11,o=y.getNameForYear(y.displayed.year)),n(6,l=y.currentMonth),n(10,s=y.nextMonth),n(9,c=y.previousMonth),n(7,d=y.weeksOfMonth(l)),n(8,u=y.weekNumbersOfMonth(l))});let E=()=>y.goToNextYear(),w=()=>y.goToPreviousYear();function N(ie){ce.call(this,t,ie)}function F(ie){ce.call(this,t,ie)}function j(ie){ce.call(this,t,ie)}function x(ie){ce.call(this,t,ie)}function T(ie){ce.call(this,t,ie)}function I(ie){ce.call(this,t,ie)}function U(ie){ce.call(this,t,ie)}let $=()=>y.goToNextYear(),ee=()=>y.goToPreviousYear();function Z(ie){ce.call(this,t,ie)}function K(ie){ce.call(this,t,ie)}function ve(ie){ce.call(this,t,ie)}function xe(ie){ce.call(this,t,ie)}function Ae(ie){ce.call(this,t,ie)}function Oe(ie){ce.call(this,t,ie)}function He(ie){ce.call(this,t,ie)}let st=()=>y.goToNext(),je=()=>y.goToPrevious();function wt(ie){ce.call(this,t,ie)}function Nt(ie){ce.call(this,t,ie)}function Je(ie){ce.call(this,t,ie)}function Te(ie){ce.call(this,t,ie)}function tt(ie){ce.call(this,t,ie)}function Yt(ie){ce.call(this,t,ie)}function $t(ie){ce.call(this,t,ie)}function Rt(ie){ce.call(this,t,ie)}function Ht(ie){ce.call(this,t,ie)}function wn(ie){ce.call(this,t,ie)}function Dn(ie){ce.call(this,t,ie)}function Gn(ie){ce.call(this,t,ie)}function ha(ie){ce.call(this,t,ie)}function ma(ie){ce.call(this,t,ie)}function Ii(ie){ce.call(this,t,ie)}function Oi(ie){ce.call(this,t,ie)}function qi(ie){ce.call(this,t,ie)}function Ri(ie){ce.call(this,t,ie)}function Li(ie){ce.call(this,t,ie)}function Pi(ie){ce.call(this,t,ie)}let ji=()=>n(0,v=!1);function Vi(ie){ce.call(this,t,ie)}function Hi(ie){ce.call(this,t,ie)}function Wi(ie){ce.call(this,t,ie)}function Gi(ie){ce.call(this,t,ie)}return t.$$set=ie=>{"fullView"in ie&&n(1,m=ie.fullView),"dayView"in ie&&n(0,v=ie.dayView),"yearView"in ie&&n(2,h=ie.yearView),"calendar"in ie&&n(3,y=ie.calendar),"moons"in ie&&n(15,p=ie.moons),"displayDayNumber"in ie&&n(4,S=ie.displayDayNumber),"displayWeeks"in ie&&n(5,_=ie.displayWeeks)},t.$$.update=()=>{if(t.$$.dirty[0]&4){e:h&&n(0,v=!1)}if(t.$$.dirty[0]&1){e:A.set(v)}if(t.$$.dirty[0]&32768){e:L.set(p)}if(t.$$.dirty[0]&8){e:k.set(y)}if(t.$$.dirty[0]&8){e:n(14,a=y.plugin.data.showIntercalary)}if(t.$$.dirty[0]&8){e:n(13,r=y.weekdays)}if(t.$$.dirty[0]&8){e:n(12,i=y.displayed.year)}if(t.$$.dirty[0]&8){e:n(11,o=y.getNameForYear(y.displayed.year))}if(t.$$.dirty[0]&8){e:n(6,l=y.currentMonth)}if(t.$$.dirty[0]&8){e:n(10,s=y.nextMonth)}if(t.$$.dirty[0]&8){e:n(9,c=y.previousMonth)}if(t.$$.dirty[0]&72){e:n(8,u=y.weekNumbersOfMonth(l))}if(t.$$.dirty[0]&72){e:n(7,d=y.weeksOfMonth(l))}},[v,m,h,y,S,_,l,d,u,c,s,o,i,r,a,p,E,w,N,F,j,x,T,I,U,$,ee,Z,K,ve,xe,Ae,Oe,He,st,je,wt,Nt,Je,Te,tt,Yt,$t,Rt,Ht,wn,Dn,Gn,ha,ma,Ii,Oi,qi,Ri,Li,Pi,ji,Vi,Hi,Wi,Gi]}var zh=class extends de{constructor(e){super();he(this,e,jb,Pb,le,{fullView:1,dayView:0,yearView:2,calendar:3,moons:15,displayDayNumber:4,displayWeeks:5},Ob,[-1,-1,-1])}},Yh=zh;var Xt="FANTASY_CALENDAR",fa="FANTASY_CALENDAR_FULL_VIEW";(0,qe.addIcon)(Xt,'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="far" data-icon="calendar" class="svg-inline--fa fa-calendar fa-w-14" role="img" viewBox="0 0 448 512"><path xmlns="http://www.w3.org/2000/svg" fill="currentColor" d="M400 64h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V160h352v298c0 3.3-2.7 6-6 6z"/><path fill="currentColor" d="M18.32 255.78L192 223.96l-91.28 68.69c-10.08 10.08-2.94 27.31 11.31 27.31h222.7c-9.44-26.4-14.73-54.47-14.73-83.38v-42.27l-119.73-87.6c-23.82-15.88-55.29-14.01-77.06 4.59L5.81 227.64c-12.38 10.33-3.45 30.42 12.51 28.14zm556.87 34.1l-100.66-50.31A47.992 47.992 0 0 1 448 196.65v-36.69h64l28.09 22.63c6 6 14.14 9.37 22.63 9.37h30.97a32 32 0 0 0 28.62-17.69l14.31-28.62a32.005 32.005 0 0 0-3.02-33.51l-74.53-99.38C553.02 4.7 543.54 0 533.47 0H296.02c-7.13 0-10.7 8.57-5.66 13.61L352 63.96 292.42 88.8c-5.9 2.95-5.9 11.36 0 14.31L352 127.96v108.62c0 72.08 36.03 139.39 96 179.38-195.59 6.81-344.56 41.01-434.1 60.91C5.78 478.67 0 485.88 0 494.2 0 504 7.95 512 17.76 512h499.08c63.29.01 119.61-47.56 122.99-110.76 2.52-47.28-22.73-90.4-64.64-111.36zM489.18 66.25l45.65 11.41c-2.75 10.91-12.47 18.89-24.13 18.26-12.96-.71-25.85-12.53-21.52-29.67z" style="&#10; transform: scale(0.4125) translate(50%, 95%);&#10;"/></svg>');(0,qe.addIcon)("fantasy-calendar-reveal",'<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="calendar-day" class="svg-inline--fa fa-calendar-day fa-w-14" role="img" viewBox="0 0 448 512"><path fill="currentColor" d="M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm64-192c0-8.8 7.2-16 16-16h96c8.8 0 16 7.2 16 16v96c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16v-96zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"/></svg>');var Hn=class extends qe.ItemView{constructor(e,n,a={}){super(n);this.plugin=e;this.leaf=n;this.options=a;this.updateMe=!0;this.yearView=!1;this.moons=!0;this.containerEl.addClass("fantasy-calendar-view"),this.contentEl.addClass("fantasy-calendar-view-content"),this.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-updated",()=>{this.plugin.onSettingsLoad(()=>this.updateCalendars())})),this.registerEvent(this.plugin.app.workspace.on("layout-change",()=>{!this._app||this._app.$set({fullView:this.full,...this.full?{dayView:!1}:{}})}))}get root(){return this.leaf.getRoot()}get full(){return!("collapse"in this.root)}updateCalendars(){if(!this.updateMe){this.updateMe=!0;return}if(!this.plugin.data.calendars.length){this._app?.$destroy(),this.contentEl.empty(),this.noCalendarEl=this.contentEl.createDiv("fantasy-no-calendar"),this.noCalendarEl.createSpan({text:"No calendars created! Create a calendar to see it here."});return}let e=this.plugin.data.calendars.find(n=>n.id==this.calendar?.id)??this.plugin.defaultCalendar??this.plugin.data.calendars[0];this.helper&&this.helper.calendar.id==e.id?this.update(e):this.setCurrentCalendar(e)}update(e){this.calendar=e,this.helper.update(this.calendar),this.registerCalendarInterval(),this._app?this._app.$set({calendar:this.helper}):this.build()}async registerCalendarInterval(){if(this.interval&&(clearInterval(this.interval),this.interval=null),this.calendar.static.incrementDay){let e=new Date;this.calendar.date||(this.calendar.date=e.valueOf());let n=Eo(new Date(this.calendar.date),e);if(n>=1){for(let a=0;a<n;a++)this.helper.goToNextCurrentDay();this.calendar.date=e.valueOf(),await this.saveCalendars()}this.interval=window.setInterval(async()=>{Eo(new Date,e)>=1&&(this.helper.goToNextCurrentDay(),this.helper.current,e=new Date,this.calendar.date=e.valueOf(),await this.saveCalendars())},60*1e3),this.registerInterval(this.interval)}}async saveCalendars(){this.updateMe=!1,await this.plugin.saveCalendar()}setCurrentCalendar(e){this.noCalendarEl?.detach(),this.calendar=e,this.moons=this.calendar.static.displayMoons,this.dayNumber=this.calendar.static.displayDayNumber,this.helper=new Wa(this.calendar,this.plugin),this.registerCalendarInterval(),this.build()}createEventForDay(e){let n=new Pa(this.plugin,this.calendar,null,e);n.onClose=async()=>{!n.saved||(this.calendar.events.push(n.event),this.helper.addEvent(n.event),await this.saveCalendars(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update"))},n.open()}async onOpen(){this.plugin.onSettingsLoad(()=>this.updateCalendars())}build(){this.contentEl.empty(),this._app=new Yh({target:this.contentEl,props:{calendar:this.helper,fullView:this.full,yearView:this.yearView,moons:this.moons,displayWeeks:this.helper.displayWeeks,displayDayNumber:this.dayNumber}}),this._app.$on("day-click",e=>{let n=e.detail;n.events.length||this.createEventForDay(n.date)}),this._app.$on("day-doubleclick",e=>{let n=e.detail;!n.events.length||(this.helper.viewing.day=n.number,this.helper.viewing.month=n.month.number,this.helper.viewing.year=n.month.year,this.yearView=!1,this._app.$set({yearView:!1}),this._app.$set({dayView:!0}),this.triggerHelperEvent("day-update",!1))}),this._app.$on("day-context-menu",e=>{let{day:n,evt:a}=e.detail,r=new qe.Menu(this.app);r.setNoIcon(),this.full||r.addItem(i=>{i.setTitle("Open Day").onClick(()=>{this.openDay({day:n.number,month:this.helper.displayed.month,year:this.helper.displayed.year})})}),r.addItem(i=>{i.setTitle("Set as Today").onClick(async()=>{this.calendar.current=n.date,this.helper.current.day=n.number,this.triggerHelperEvent("day-update"),await this.saveCalendars()})}),r.addItem(i=>i.setTitle("New Event").onClick(()=>{this.createEventForDay(n.date)})),r.showAtMouseEvent(a)}),this._app.$on("settings",e=>{let n=e.detail,a=new qe.Menu(this.app);a.setNoIcon(),a.addItem(r=>{r.setTitle(`${this.calendar.displayWeeks?"Hide":"Show"} Weeks`).onClick(async()=>{this.calendar.displayWeeks=!this.calendar.displayWeeks,this.helper.update(this.calendar),this._app.$set({displayWeeks:this.calendar.displayWeeks}),await this.saveCalendars()})}),a.addItem(r=>{r.setTitle(`Open ${this.yearView?"Month":"Year"}`).onClick(()=>{this.yearView=!this.yearView,this._app.$set({yearView:this.yearView})})}),a.addItem(r=>{r.setTitle(this.moons?"Hide Moons":"Display Moons").onClick(()=>{this.toggleMoons()})}),a.addItem(r=>{r.setTitle(this.dayNumber?"Hide Day Number":"Display Day Number").onClick(async()=>{this.dayNumber=!this.dayNumber,this.calendar.static.displayDayNumber=this.dayNumber,this._app.$set({displayDayNumber:this.dayNumber}),await this.saveCalendars()})}),a.addItem(r=>{r.setTitle("View Day"),r.onClick(()=>{this.openDate()})}),a.addItem(r=>{r.setTitle("Switch Calendars"),r.setDisabled(this.plugin.data.calendars.length<=1),r.onClick(()=>{let i=new $h(this.plugin,this.calendar);i.onClose=()=>{!i.confirmed||this.setCurrentCalendar(i.calendar)},i.open()})}),a.showAtMouseEvent(n)}),this._app.$on("event-click",e=>{let{event:n,modifier:a}=e.detail;if(n.note){let r=[];this.app.workspace.iterateAllLeaves(i=>{i.view instanceof qe.MarkdownView&&i.view.file.basename===n.note&&r.push(i)}),r.length?this.app.workspace.setActiveLeaf(r[0]):this.app.workspace.openLinkText(n.note,"",this.full||a)}else new Kh(n,this.plugin).open()}),this._app.$on("event-mouseover",e=>{if(!this.plugin.data.eventPreview)return;let{target:n,event:a}=e.detail;a.note&&this.app.workspace.trigger("link-hover",this,n,a.note,"")}),this._app.$on("event-context",e=>{let{evt:n,event:a}=e.detail,r=new qe.Menu(this.app);r.setNoIcon(),a.note||r.addItem(i=>{i.setTitle("Create Note").onClick(async()=>{let o=this.app.workspace.getActiveFile()?.path,l=o?this.app.fileManager.getNewFileParent(o)?.parent??"/":"/",s=`${a.date.year}-${a.date.month+1}-${a.date.day}`,c;a.end&&(c=`${a.end.year}-${a.end.month+1}-${a.end.day}`);let u={"fc-calendar":this.calendar.name,"fc-date":s,...a.end?{"fc-end":c}:{},...a.category?{"fc-category":this.calendar.categories.find(m=>m.id==a.category)?.name}:{},"fc-display-name":a.name};a.note=(0,qe.normalizePath)(`${l}/${a.name}.md`);let d=this.app.vault.getAbstractFileByPath(a.note);if(d||(d=await this.app.vault.create(a.note,`---
${(0,qe.stringifyYaml)(u)}
---`)),await this.saveCalendars(),d instanceof qe.TFile){let v=this.app.workspace.getLeavesOfType("markdown").find(h=>{h.view instanceof qe.FileView&&h.view.file.path==a.note});v?this.app.workspace.setActiveLeaf(v):await this.app.workspace.getUnpinnedLeaf().openFile(d,{active:!0})}})}),r.addItem(i=>{i.setTitle("Edit Event").onClick(()=>{let o=new Pa(this.plugin,this.calendar,a);o.onClose=async()=>{if(!o.saved)return;let l=this.calendar.events.find(s=>s.id==a.id);this.calendar.events.splice(this.calendar.events.indexOf(l),1,o.event),this.helper.refreshMonth(o.event.date.month,o.event.date.year),(o.event.date.month!=l.date.month||o.event.date.year!=l.date.year)&&this.helper.refreshMonth(l.date.month,l.date.year),await this.saveCalendars(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update")},o.open()})}),r.addItem(i=>{i.setTitle("Delete Event").onClick(async()=>{if(!this.plugin.data.exit.event&&!await Bd(this.plugin))return;let o=this.calendar.events.find(l=>l.id==a.id);this.calendar.events.splice(this.calendar.events.indexOf(o),1),this.helper.refreshMonth(o.date.month,o.date.year),await this.saveCalendars(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update")})}),r.showAtMouseEvent(n)}),this._app.$on("event",e=>{let n=e.detail;this.createEventForDay(n)}),this._app.$on("reset",()=>{this.helper.reset(),this.yearView=!1,this._app.$set({yearView:!1}),this._app.$set({dayView:!0}),this.triggerHelperEvent("day-update",!1)})}openDay(e){this.helper.viewing.day=e.day,this.helper.viewing.month=e.month,this.helper.viewing.year=e.year,this.yearView=!1,this._app.$set({yearView:!1}),this._app.$set({dayView:!0}),this.triggerHelperEvent("day-update",!1)}openDate(){if(!this.helper||!this.calendar)return;let e=new Zh(this.plugin,this.calendar);e.onClose=async()=>{!e.confirmed||(e.setCurrent?(this.calendar.current={...e.date},this.setCurrentCalendar(this.calendar)):(this.helper.displayed={...e.date},this.helper.update(),this._app.$set({calendar:this.helper})),await this.saveCalendars())},e.open()}toggleMoons(){this.moons=!this.moons,this._app.$set({moons:this.moons})}async onClose(){}onResize(){this.triggerHelperEvent("view-resized",!1)}getViewType(){return Xt}getDisplayText(){return"Fantasy Calendar"}getIcon(){return Xt}triggerHelperEvent(e,n=!0){!this.helper||(this.helper.trigger(e),n&&(this.updateMe=!1,this.plugin.app.workspace.trigger("fantasy-calendars-updated")))}async onunload(){}},$h=class extends lt{constructor(e,n){super(e.app);this.plugin=e;this.calendar=n;this.confirmed=!1}async display(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:"Switch Calendars"});let e=this.contentEl.createDiv("fantasy-calendar-dropdown");e.createEl("label",{text:"Choose a Calendar"}),new qe.DropdownComponent(e).onChange(r=>{this.calendar=this.plugin.data.calendars.find(i=>i.id==r)}).addOptions(Object.fromEntries(this.plugin.data.calendars.map(r=>[r.id,r.name]))).setValue(this.calendar?this.calendar.id:null);let a=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new qe.ButtonComponent(a).setButtonText("Switch").setCta().onClick(()=>{this.confirmed=!0,this.close()}),new qe.ButtonComponent(a).setButtonText("Cancel").onClick(()=>{this.close()})}onOpen(){this.display()}},Zh=class extends lt{constructor(e,n){super(e.app);this.plugin=e;this.calendar=n;this.confirmed=!1;this.setCurrent=!1;this.date={...this.calendar.current},this.tempCurrentDays=this.date.day}async display(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:"View Day"}),this.dateFieldEl=this.contentEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(),new qe.Setting(this.contentEl).setName("Set as Current Date").setDesc("Also set this date to today's date.").addToggle(n=>n.setValue(this.setCurrent).onChange(a=>{this.setCurrent=a}));let e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new qe.ButtonComponent(e).setButtonText("Switch").setCta().onClick(()=>{this.confirmed=!0,this.date.day=this.tempCurrentDays,this.close()}),new qe.ButtonComponent(e).setButtonText("Cancel").onClick(()=>{this.close()})}buildDateFields(){this.dateFieldEl.empty(),this.tempCurrentDays!=null&&this.date.month!=null&&this.tempCurrentDays>this.calendar.static.months[this.date.month]?.length&&(this.tempCurrentDays=this.calendar.static.months[this.date.month]?.length);let e=this.dateFieldEl.createDiv("fantasy-calendar-date-field");e.createEl("label",{text:"Day"}),new qe.TextComponent(e).setPlaceholder("Day").setValue(`${this.tempCurrentDays}`).setDisabled(this.date.month==null).onChange(i=>{if(Number(i)<1||Number(i)>this.calendar.static.months[this.date.month]?.length){new qe.Notice(`The current day must be between 1 and ${this.calendar.static.months[this.date.month].length}`),this.tempCurrentDays=this.date.day,this.buildDateFields();return}this.tempCurrentDays=Number(i)}).inputEl.setAttr("type","number");let a=this.dateFieldEl.createDiv("fantasy-calendar-date-field");a.createEl("label",{text:"Month"}),new qe.DropdownComponent(a).addOptions(Object.fromEntries([["select","Select Month"],...this.calendar.static.months.map(i=>[i.name,i.name])])).setValue(this.date.month!=null?this.calendar.static.months[this.date.month].name:"select").onChange(i=>{i==="select"&&(this.date.month=null);let o=this.calendar.static.months.find(l=>l.name==i);this.date.month=this.calendar.static.months.indexOf(o),this.buildDateFields()});let r=this.dateFieldEl.createDiv("fantasy-calendar-date-field");if(r.createEl("label",{text:"Year"}),this.calendar.static.useCustomYears){let i=new qe.DropdownComponent(r);(this.calendar.static.years??[]).forEach(o=>{i.addOption(o.id,o.name)}),this.date.year>this.calendar.static.years?.length&&(this.date.year=this.calendar.static.years?this.calendar.static.years.length:null),i.setValue(this.calendar.static.years?.[this.date.year-1]?.id).onChange(o=>{this.date.year=this.calendar.static.years.findIndex(l=>l.id==o)+1})}else new qe.TextComponent(r).setPlaceholder("Year").setValue(`${this.date.year}`).onChange(o=>{this.date.year=Number(o)}).inputEl.setAttr("type","number")}onOpen(){this.display()}},Kh=class extends lt{constructor(e,n){super(n.app);this.event=e;this.plugin=n;this.containerEl.addClass("fantasy-calendar-view-event")}async display(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:this.event.name}),await qe.MarkdownRenderer.renderMarkdown(this.event.description,this.contentEl,this.event.note,null)}async onOpen(){await this.display()}};var x9=Ee(require("fs")),Jt=Ee(require("obsidian"));function Bs(t){let e=new Blob([t],{type:"text/javascript"}),n=URL.createObjectURL(e),a=new Worker(n,{name:"Fantasy Calendar File Watcher"});return URL.revokeObjectURL(n),a}function Ns(){return Bs(`var te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Re=te(Ae=>{Ae.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\\xC0",Aacute:"\\xC1",Acirc:"\\xC2",Atilde:"\\xC3",Auml:"\\xC4",Aring:"\\xC5",AElig:"\\xC6",Ccedil:"\\xC7",Egrave:"\\xC8",Eacute:"\\xC9",Ecirc:"\\xCA",Euml:"\\xCB",Igrave:"\\xCC",Iacute:"\\xCD",Icirc:"\\xCE",Iuml:"\\xCF",ETH:"\\xD0",Ntilde:"\\xD1",Ograve:"\\xD2",Oacute:"\\xD3",Ocirc:"\\xD4",Otilde:"\\xD5",Ouml:"\\xD6",Oslash:"\\xD8",Ugrave:"\\xD9",Uacute:"\\xDA",Ucirc:"\\xDB",Uuml:"\\xDC",Yacute:"\\xDD",THORN:"\\xDE",szlig:"\\xDF",agrave:"\\xE0",aacute:"\\xE1",acirc:"\\xE2",atilde:"\\xE3",auml:"\\xE4",aring:"\\xE5",aelig:"\\xE6",ccedil:"\\xE7",egrave:"\\xE8",eacute:"\\xE9",ecirc:"\\xEA",euml:"\\xEB",igrave:"\\xEC",iacute:"\\xED",icirc:"\\xEE",iuml:"\\xEF",eth:"\\xF0",ntilde:"\\xF1",ograve:"\\xF2",oacute:"\\xF3",ocirc:"\\xF4",otilde:"\\xF5",ouml:"\\xF6",oslash:"\\xF8",ugrave:"\\xF9",uacute:"\\xFA",ucirc:"\\xFB",uuml:"\\xFC",yacute:"\\xFD",thorn:"\\xFE",yuml:"\\xFF",nbsp:"\\xA0",iexcl:"\\xA1",cent:"\\xA2",pound:"\\xA3",curren:"\\xA4",yen:"\\xA5",brvbar:"\\xA6",sect:"\\xA7",uml:"\\xA8",copy:"\\xA9",ordf:"\\xAA",laquo:"\\xAB",not:"\\xAC",shy:"\\xAD\\xAD",reg:"\\xAE",macr:"\\xAF",deg:"\\xB0",plusmn:"\\xB1",sup2:"\\xB2",sup3:"\\xB3",acute:"\\xB4",micro:"\\xB5",para:"\\xB6",middot:"\\xB7",cedil:"\\xB8",sup1:"\\xB9",ordm:"\\xBA",raquo:"\\xBB",frac14:"\\xBC",frac12:"\\xBD",frac34:"\\xBE",iquest:"\\xBF",times:"\\xD7",divide:"\\xF7",forall:"\\u2200",part:"\\u2202",exist:"\\u2203",empty:"\\u2205",nabla:"\\u2207",isin:"\\u2208",notin:"\\u2209",ni:"\\u220B",prod:"\\u220F",sum:"\\u2211",minus:"\\u2212",lowast:"\\u2217",radic:"\\u221A",prop:"\\u221D",infin:"\\u221E",ang:"\\u2220",and:"\\u2227",or:"\\u2228",cap:"\\u2229",cup:"\\u222A",int:"\\u222B",there4:"\\u2234",sim:"\\u223C",cong:"\\u2245",asymp:"\\u2248",ne:"\\u2260",equiv:"\\u2261",le:"\\u2264",ge:"\\u2265",sub:"\\u2282",sup:"\\u2283",nsub:"\\u2284",sube:"\\u2286",supe:"\\u2287",oplus:"\\u2295",otimes:"\\u2297",perp:"\\u22A5",sdot:"\\u22C5",Alpha:"\\u0391",Beta:"\\u0392",Gamma:"\\u0393",Delta:"\\u0394",Epsilon:"\\u0395",Zeta:"\\u0396",Eta:"\\u0397",Theta:"\\u0398",Iota:"\\u0399",Kappa:"\\u039A",Lambda:"\\u039B",Mu:"\\u039C",Nu:"\\u039D",Xi:"\\u039E",Omicron:"\\u039F",Pi:"\\u03A0",Rho:"\\u03A1",Sigma:"\\u03A3",Tau:"\\u03A4",Upsilon:"\\u03A5",Phi:"\\u03A6",Chi:"\\u03A7",Psi:"\\u03A8",Omega:"\\u03A9",alpha:"\\u03B1",beta:"\\u03B2",gamma:"\\u03B3",delta:"\\u03B4",epsilon:"\\u03B5",zeta:"\\u03B6",eta:"\\u03B7",theta:"\\u03B8",iota:"\\u03B9",kappa:"\\u03BA",lambda:"\\u03BB",mu:"\\u03BC",nu:"\\u03BD",xi:"\\u03BE",omicron:"\\u03BF",pi:"\\u03C0",rho:"\\u03C1",sigmaf:"\\u03C2",sigma:"\\u03C3",tau:"\\u03C4",upsilon:"\\u03C5",phi:"\\u03C6",chi:"\\u03C7",psi:"\\u03C8",omega:"\\u03C9",thetasym:"\\u03D1",upsih:"\\u03D2",piv:"\\u03D6",OElig:"\\u0152",oelig:"\\u0153",Scaron:"\\u0160",scaron:"\\u0161",Yuml:"\\u0178",fnof:"\\u0192",circ:"\\u02C6",tilde:"\\u02DC",ensp:"\\u2002",emsp:"\\u2003",thinsp:"\\u2009",zwnj:"\\u200C",zwj:"\\u200D",lrm:"\\u200E",rlm:"\\u200F",ndash:"\\u2013",mdash:"\\u2014",lsquo:"\\u2018",rsquo:"\\u2019",sbquo:"\\u201A",ldquo:"\\u201C",rdquo:"\\u201D",bdquo:"\\u201E",dagger:"\\u2020",Dagger:"\\u2021",bull:"\\u2022",hellip:"\\u2026",permil:"\\u2030",prime:"\\u2032",Prime:"\\u2033",lsaquo:"\\u2039",rsaquo:"\\u203A",oline:"\\u203E",euro:"\\u20AC",trade:"\\u2122",larr:"\\u2190",uarr:"\\u2191",rarr:"\\u2192",darr:"\\u2193",harr:"\\u2194",crarr:"\\u21B5",lceil:"\\u2308",rceil:"\\u2309",lfloor:"\\u230A",rfloor:"\\u230B",loz:"\\u25CA",spades:"\\u2660",clubs:"\\u2663",hearts:"\\u2665",diams:"\\u2666"}});var Pe=te(me=>{var pe=/[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,Oe=new RegExp("[\\\\-\\\\.0-9"+pe.source.slice(1,-1)+"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]"),Se=new RegExp("^"+pe.source+Oe.source+"*(?::"+pe.source+Oe.source+"*)?$"),j=0,S=1,F=2,G=3,U=4,L=5,Q=6,ne=7;function P(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,P)}P.prototype=new Error;P.prototype.name=P.name;function Me(){}Me.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),Ue(t,t={}),vt(e,t,n,r,this.errorHandler),r.endDocument()}};function vt(e,t,n,r,i){function s(E){if(E>65535){E-=65536;var x=55296+(E>>10),dt=56320+(E&1023);return String.fromCharCode(x,dt)}else return String.fromCharCode(E)}function a(E){var x=E.slice(1,-1);return x in n?n[x]:x.charAt(0)==="#"?s(parseInt(x.substr(1).replace("x","0x"))):(i.error("entity not found:"+E),E)}function o(E){if(E>g){var x=e.substring(g,E).replace(/&#?\\w+;/g,a);p&&c(g),r.characters(x,0,E-g),g=E}}function c(E,x){for(;E>=u&&(x=m.exec(e));)l=x.index,u=l+x[0].length,p.lineNumber++;p.columnNumber=E-l+1}for(var l=0,u=0,m=/.*(?:\\r\\n?|\\n)|.*$/g,p=r.locator,v=[{currentNSMap:t}],_={},g=0;;){try{var d=e.indexOf("<",g);if(d<0){if(!e.substr(g).match(/^\\s*$/)){var O=r.doc,z=O.createTextNode(e.substr(g));O.appendChild(z),r.currentElement=z}return}switch(d>g&&o(d),e.charAt(d+1)){case"/":var h=e.indexOf(">",d+3),f=e.substring(d+2,h),b=v.pop();h<0?(f=e.substring(d+2).replace(/[\\s<].*/,""),i.error("end tag name: "+f+" is not complete:"+b.tagName),h=d+1+f.length):f.match(/\\s</)&&(f=f.replace(/[\\s<].*/,""),i.error("end tag name: "+f+" maybe not complete"),h=d+1+f.length);var _e=b.localNSMap,Ce=b.tagName==f,pt=Ce||b.tagName&&b.tagName.toLowerCase()==f.toLowerCase();if(pt){if(r.endElement(b.uri,b.localName,f),_e)for(var mt in _e)r.endPrefixMapping(mt);Ce||i.fatalError("end tag name: "+f+" is not match the current start tagName:"+b.tagName)}else v.push(b);h++;break;case"?":p&&c(d),h=Dt(e,d,r);break;case"!":p&&c(d),h=yt(e,d,r,i);break;default:p&&c(d);var C=new Le,ue=v[v.length-1].currentNSMap,h=gt(e,d,C,ue,a,i),xe=C.length;if(!C.closed&&Nt(e,h,C.tagName,_)&&(C.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),p&&xe){for(var ht=$e(p,{}),le=0;le<xe;le++){var Ie=C[le];c(Ie.offset),Ie.locator=$e(p,{})}r.locator=ht,Fe(C,r,ue)&&v.push(C),r.locator=p}else Fe(C,r,ue)&&v.push(C);C.uri==="http://www.w3.org/1999/xhtml"&&!C.closed?h=Et(e,h,C.tagName,a,r):h++}}catch(E){if(E instanceof P)throw E;i.error("element parse error: "+E),h=-1}h>g?g=h:o(Math.max(d,g)+1)}}function $e(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function gt(e,t,n,r,i,s){function a(v,_,g){v in n.attributeNames&&s.fatalError("Attribute "+v+" redefined"),n.addValue(v,_,g)}for(var o,c,l=++t,u=j;;){var m=e.charAt(l);switch(m){case"=":if(u===S)o=e.slice(t,l),u=G;else if(u===F)u=G;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(u===G||u===S)if(u===S&&(s.warning('attribute value must after "="'),o=e.slice(t,l)),t=l+1,l=e.indexOf(m,t),l>0)c=e.slice(t,l).replace(/&#?\\w+;/g,i),a(o,c,t-1),u=L;else throw new Error("attribute value no end '"+m+"' match");else if(u==U)c=e.slice(t,l).replace(/&#?\\w+;/g,i),a(o,c,t),s.warning('attribute "'+o+'" missed start quot('+m+")!!"),t=l+1,u=L;else throw new Error('attribute value must after "="');break;case"/":switch(u){case j:n.setTagName(e.slice(t,l));case L:case Q:case ne:u=ne,n.closed=!0;case U:case S:case F:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),u==j&&n.setTagName(e.slice(t,l)),l;case">":switch(u){case j:n.setTagName(e.slice(t,l));case L:case Q:case ne:break;case U:case S:c=e.slice(t,l),c.slice(-1)==="/"&&(n.closed=!0,c=c.slice(0,-1));case F:u===F&&(c=o),u==U?(s.warning('attribute "'+c+'" missed quot(")!'),a(o,c.replace(/&#?\\w+;/g,i),t)):((r[""]!=="http://www.w3.org/1999/xhtml"||!c.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),a(c,c,t));break;case G:throw new Error("attribute value missed!!")}return l;case"\\x80":m=" ";default:if(m<=" ")switch(u){case j:n.setTagName(e.slice(t,l)),u=Q;break;case S:o=e.slice(t,l),u=F;break;case U:var c=e.slice(t,l).replace(/&#?\\w+;/g,i);s.warning('attribute "'+c+'" missed quot(")!!'),a(o,c,t);case L:u=Q;break}else switch(u){case F:var p=n.tagName;(r[""]!=="http://www.w3.org/1999/xhtml"||!o.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),a(o,o,t),t=l,u=S;break;case L:s.warning('attribute space is required"'+o+'"!!');case Q:u=S,t=l;break;case G:u=U,t=l;break;case ne:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function Fe(e,t,n){for(var r=e.tagName,i=null,s=e.length;s--;){var a=e[s],o=a.qName,c=a.value,p=o.indexOf(":");if(p>0)var l=a.prefix=o.slice(0,p),u=o.slice(p+1),m=l==="xmlns"&&u;else u=o,l=null,m=o==="xmlns"&&"";a.localName=u,m!==!1&&(i==null&&(i={},Ue(n,n={})),n[m]=i[m]=c,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(m,c))}for(var s=e.length;s--;){a=e[s];var l=a.prefix;l&&(l==="xml"&&(a.uri="http://www.w3.org/XML/1998/namespace"),l!=="xmlns"&&(a.uri=n[l||""]))}var p=r.indexOf(":");p>0?(l=e.prefix=r.slice(0,p),u=e.localName=r.slice(p+1)):(l=null,u=e.localName=r);var v=e.uri=n[l||""];if(t.startElement(v,u,r,e),e.closed){if(t.endElement(v,u,r),i)for(l in i)t.endPrefixMapping(l)}else return e.currentNSMap=n,e.localNSMap=i,!0}function Et(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var s=e.indexOf("</"+n+">",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),s):(a=a.replace(/&#?\\w+;/g,r),i.characters(a,0,a.length),s)}return t+1}function Nt(e,t,n,r){var i=r[n];return i==null&&(i=e.lastIndexOf("</"+n+">"),i<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function Ue(e,t){for(var n in e)t[n]=e[n]}function yt(e,t,n,r){var i=e.charAt(t+2);switch(i){case"-":if(e.charAt(t+3)==="-"){var s=e.indexOf("-->",t+4);return s>t?(n.comment(e,t+4,s-t-4),s+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(e.substr(t+3,6)=="CDATA["){var s=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,s-t-9),n.endCDATA(),s+3}var a=bt(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var c=a[1][0],l=!1,u=!1;o>3&&(/^public$/i.test(a[2][0])?(l=a[3][0],u=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(u=a[3][0]));var m=a[o-1];return n.startDTD(c,l,u),n.endDTD(),m.index+m[0].length}}return-1}function Dt(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);if(i){var s=i[0].length;return n.processingInstruction(i[1],i[2]),r+2}else return-1}return-1}function Le(){this.attributeNames={}}Le.prototype={setTagName:function(e){if(!Se.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!Se.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};function bt(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}me.XMLReader=Me;me.ParseError=P});var we=te(J=>{function W(e,t){for(var n in e)t[n]=e[n]}function w(e,t){var n=e.prototype;if(!(n instanceof t)){let i=function(){};var r=i;i.prototype=t.prototype,i=new i,W(n,i),e.prototype=n=i}n.constructor!=e&&(typeof e!="function"&&console.error("unknow Class:"+e),n.constructor=e)}var wt="http://www.w3.org/1999/xhtml",T={},I=T.ELEMENT_NODE=1,k=T.ATTRIBUTE_NODE=2,re=T.TEXT_NODE=3,ke=T.CDATA_SECTION_NODE=4,Ve=T.ENTITY_REFERENCE_NODE=5,Tt=T.ENTITY_NODE=6,qe=T.PROCESSING_INSTRUCTION_NODE=7,Ye=T.COMMENT_NODE=8,Xe=T.DOCUMENT_NODE=9,ze=T.DOCUMENT_TYPE_NODE=10,R=T.DOCUMENT_FRAGMENT_NODE=11,_t=T.NOTATION_NODE=12,y={},N={},qt=y.INDEX_SIZE_ERR=(N[1]="Index size error",1),Yt=y.DOMSTRING_SIZE_ERR=(N[2]="DOMString size error",2),Ct=y.HIERARCHY_REQUEST_ERR=(N[3]="Hierarchy request error",3),Xt=y.WRONG_DOCUMENT_ERR=(N[4]="Wrong document",4),zt=y.INVALID_CHARACTER_ERR=(N[5]="Invalid character",5),jt=y.NO_DATA_ALLOWED_ERR=(N[6]="No data allowed",6),Gt=y.NO_MODIFICATION_ALLOWED_ERR=(N[7]="No modification allowed",7),xt=y.NOT_FOUND_ERR=(N[8]="Not found",8),Qt=y.NOT_SUPPORTED_ERR=(N[9]="Not supported",9),je=y.INUSE_ATTRIBUTE_ERR=(N[10]="Attribute in use",10),Wt=y.INVALID_STATE_ERR=(N[11]="Invalid state",11),Bt=y.SYNTAX_ERR=(N[12]="Syntax error",12),Zt=y.INVALID_MODIFICATION_ERR=(N[13]="Invalid modification",13),Kt=y.NAMESPACE_ERR=(N[14]="Invalid namespace",14),Jt=y.INVALID_ACCESS_ERR=(N[15]="Invalid access",15);function $(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,N[e]),this.message=N[e],Error.captureStackTrace&&Error.captureStackTrace(this,$);return n.code=e,t&&(this.message=this.message+": "+t),n}$.prototype=Error.prototype;W(y,$);function M(){}M.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)Y(this[r],n,e,t);return n.join("")}};function V(e,t){this._node=e,this._refresh=t,he(this)}function he(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);st(e,"length",n.length),W(n,e),e._inc=t}}V.prototype.item=function(e){return he(this),this[e]};w(V,M);function ie(){}function Ge(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function Qe(e,t,n,r){if(r?t[Ge(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&Ke(i,e,r),It(i,e,n))}}function We(e,t,n){var r=Ge(t,n);if(r>=0){for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var s=e.ownerDocument;s&&(Ke(s,e,n),n.ownerElement=null)}}else throw $(xt,new Error(e.tagName+"@"+n))}ie.prototype={length:0,item:M.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new $(je);var n=this.getNamedItem(e.nodeName);return Qe(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t=e.ownerElement,n;if(t&&t!=this._ownerElement)throw new $(je);return n=this.getNamedItemNS(e.namespaceURI,e.localName),Qe(this._ownerElement,this,e,n),n},removeNamedItem:function(e){var t=this.getNamedItem(e);return We(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return We(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}};function Be(e){if(this._features={},e)for(var t in e)this._features=e[t]}Be.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!!(n&&(!t||t in n))},createDocument:function(e,t,n){var r=new Z;if(r.implementation=this,r.childNodes=new M,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new Ne;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}};function D(){}D.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return He(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Je(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(e){return be(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==re&&e.nodeType==re?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n){for(var r in n)if(n[r]==e)return r}t=t.nodeType==k?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==k?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return t==null}};function Ze(e){return e=="<"&&"&lt;"||e==">"&&"&gt;"||e=="&"&&"&amp;"||e=='"'&&"&quot;"||"&#"+e.charCodeAt()+";"}W(T,D);W(T,D.prototype);function B(e,t){if(t(e))return!0;if(e=e.firstChild)do if(B(e,t))return!0;while(e=e.nextSibling)}function Z(){}function It(e,t,n){e&&e._inc++;var r=n.namespaceURI;r=="http://www.w3.org/2000/xmlns/"&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function Ke(e,t,n,r){e&&e._inc++;var i=n.namespaceURI;i=="http://www.w3.org/2000/xmlns/"&&delete t._nsMap[n.prefix?n.localName:""]}function de(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,s=0;i;)r[s++]=i,i=i.nextSibling;r.length=s}}}function Je(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,de(e.ownerDocument,e),t}function He(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===R){var i=t.firstChild;if(i==null)return t;var s=t.lastChild}else i=s=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,s.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,n==null?e.lastChild=s:n.previousSibling=s;do i.parentNode=e;while(i!==s&&(i=i.nextSibling));return de(e.ownerDocument||e,e),t.nodeType==R&&(t.firstChild=t.lastChild=null),t}function At(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,de(e.ownerDocument,e,t),t}Z.prototype={nodeName:"#document",nodeType:Xe,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==R){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return this.documentElement==null&&e.nodeType==I&&(this.documentElement=e),He(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Je(this,e)},importNode:function(e,t){return at(this,e,t)},getElementById:function(e){var t=null;return B(this.documentElement,function(n){if(n.nodeType==I&&n.getAttribute("id")==e)return t=n,!0}),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\\\s)"+e+"(\\\\s|$)");return new V(this,function(n){var r=[];return B(n.documentElement,function(i){i!==n&&i.nodeType==I&&t.test(i.getAttribute("class"))&&r.push(i)}),r})},createElement:function(e){var t=new q;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new M;var n=t.attributes=new ie;return n._ownerElement=t,t},createDocumentFragment:function(){var e=new se;return e.ownerDocument=this,e.childNodes=new M,e},createTextNode:function(e){var t=new ve;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ge;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ee;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new De;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new ae;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ye;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new q,r=t.split(":"),i=n.attributes=new ie;return n.childNodes=new M,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new ae,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}};w(Z,D);function q(){this._nsMap={}}q.prototype={nodeType:I,hasAttribute:function(e){return this.getAttributeNode(e)!=null},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===R?this.insertBefore(e,null):At(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new V(this,function(t){var n=[];return B(t,function(r){r!==t&&r.nodeType==I&&(e==="*"||r.tagName==e)&&n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new V(this,function(n){var r=[];return B(n,function(i){i!==n&&i.nodeType===I&&(e==="*"||i.namespaceURI===e)&&(t==="*"||i.localName==t)&&r.push(i)}),r})}};Z.prototype.getElementsByTagName=q.prototype.getElementsByTagName;Z.prototype.getElementsByTagNameNS=q.prototype.getElementsByTagNameNS;w(q,D);function ae(){}ae.prototype.nodeType=k;w(ae,D);function K(){}K.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(N[Ct])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){var r=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}};w(K,D);function ve(){}ve.prototype={nodeName:"#text",nodeType:re,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}};w(ve,K);function ge(){}ge.prototype={nodeName:"#comment",nodeType:Ye};w(ge,K);function Ee(){}Ee.prototype={nodeName:"#cdata-section",nodeType:ke};w(Ee,K);function Ne(){}Ne.prototype.nodeType=ze;w(Ne,D);function et(){}et.prototype.nodeType=_t;w(et,D);function tt(){}tt.prototype.nodeType=Tt;w(tt,D);function ye(){}ye.prototype.nodeType=Ve;w(ye,D);function se(){}se.prototype.nodeName="#document-fragment";se.prototype.nodeType=R;w(se,D);function De(){}De.prototype.nodeType=qe;w(De,D);function nt(){}nt.prototype.serializeToString=function(e,t,n){return rt.call(e,t,n)};D.prototype.toString=rt;function rt(e,t){var n=[],r=this.nodeType==9&&this.documentElement||this,i=r.prefix,s=r.namespaceURI;if(s&&i==null){var i=r.lookupPrefix(s);if(i==null)var a=[{namespace:s,prefix:null}]}return Y(this,n,e,t,a),n.join("")}function it(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i||r==="xml"&&i==="http://www.w3.org/XML/1998/namespace"||i=="http://www.w3.org/2000/xmlns/")return!1;for(var s=n.length;s--;){var a=n[s];if(a.prefix==r)return a.namespace!=i}return!0}function Y(e,t,n,r,i){if(r)if(e=r(e),e){if(typeof e=="string"){t.push(e);return}}else return;switch(e.nodeType){case I:i||(i=[]);var s=i.length,a=e.attributes,o=a.length,c=e.firstChild,l=e.tagName;n=wt===e.namespaceURI||n,t.push("<",l);for(var u=0;u<o;u++){var m=a.item(u);m.prefix=="xmlns"?i.push({prefix:m.localName,namespace:m.value}):m.nodeName=="xmlns"&&i.push({prefix:"",namespace:m.value})}for(var u=0;u<o;u++){var m=a.item(u);if(it(m,n,i)){var p=m.prefix||"",v=m.namespaceURI,_=p?" xmlns:"+p:" xmlns";t.push(_,'="',v,'"'),i.push({prefix:p,namespace:v})}Y(m,t,n,r,i)}if(it(e,n,i)){var p=e.prefix||"",v=e.namespaceURI;if(v){var _=p?" xmlns:"+p:" xmlns";t.push(_,'="',v,'"'),i.push({prefix:p,namespace:v})}}if(c||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(">"),n&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):Y(c,t,n,r,i),c=c.nextSibling;else for(;c;)Y(c,t,n,r,i),c=c.nextSibling;t.push("</",l,">")}else t.push("/>");return;case Xe:case R:for(var c=e.firstChild;c;)Y(c,t,n,r,i),c=c.nextSibling;return;case k:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,Ze),'"');case re:return t.push(e.data.replace(/[<&]/g,Ze).replace(/]]>/g,"]]&gt;"));case ke:return t.push("<![CDATA[",e.data,"]]>");case Ye:return t.push("<!--",e.data,"-->");case ze:var g=e.publicId,d=e.systemId;if(t.push("<!DOCTYPE ",e.name),g)t.push(" PUBLIC ",g),d&&d!="."&&t.push(" ",d),t.push(">");else if(d&&d!=".")t.push(" SYSTEM ",d,">");else{var O=e.internalSubset;O&&t.push(" [",O,"]"),t.push(">")}return;case qe:return t.push("<?",e.target," ",e.data,"?>");case Ve:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function at(e,t,n){var r;switch(t.nodeType){case I:r=t.cloneNode(!1),r.ownerDocument=e;case R:break;case k:n=!0;break}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(at(e,i,n)),i=i.nextSibling;return r}function be(e,t,n){var r=new t.constructor;for(var i in t){var s=t[i];typeof s!="object"&&s!=r[i]&&(r[i]=s)}switch(t.childNodes&&(r.childNodes=new M),r.ownerDocument=e,r.nodeType){case I:var a=t.attributes,o=r.attributes=new ie,c=a.length;o._ownerElement=r;for(var l=0;l<c;l++)r.setAttributeNode(be(e,a.item(l),!0));break;case k:n=!0}if(n)for(var u=t.firstChild;u;)r.appendChild(be(e,u,n)),u=u.nextSibling;return r}function st(e,t,n){e[t]=n}try{if(Object.defineProperty){let e=function(t){switch(t.nodeType){case I:case R:var n=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}};Ht=e,Object.defineProperty(V.prototype,"length",{get:function(){return he(this),this.$$length}}),Object.defineProperty(D.prototype,"textContent",{get:function(){return e(this)},set:function(t){switch(this.nodeType){case I:case R:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),st=function(t,n,r){t["$$"+n]=r}}}catch(e){}var Ht;J.Node=D;J.DOMException=$;J.DOMImplementation=Be;J.XMLSerializer=nt});var ct=te(ee=>{function ot(e){this.options=e||{locator:{}}}ot.prototype.parseFromString=function(e,t){var n=this.options,r=new St,i=n.domBuilder||new H,s=n.errorHandler,a=n.locator,o=n.xmlns||{},c=/\\/x?html?$/.test(t),l=c?Ot.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return a&&i.setDocumentLocator(a),r.errorHandler=Rt(s,i,a),r.domBuilder=n.domBuilder||i,c&&(o[""]="http://www.w3.org/1999/xhtml"),o.xml=o.xml||"http://www.w3.org/XML/1998/namespace",e&&typeof e=="string"?r.parse(e,o,l):r.errorHandler.error("invalid doc source"),i.doc};function Rt(e,t,n){if(!e){if(t instanceof H)return t;e=t}var r={},i=e instanceof Function;n=n||{};function s(a){var o=e[a];!o&&i&&(o=e.length==2?function(c){e(a,c)}:e),r[a]=o&&function(c){o("[xmldom "+a+"] "+c+Te(n))}||function(){}}return s("warning"),s("error"),s("fatalError"),r}function H(){this.cdata=!1}function X(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}H.prototype={startDocument:function(){this.doc=new $t().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,s=i.createElementNS(e,n||t),a=r.length;oe(this,s),this.currentElement=s,this.locator&&X(this.locator,s);for(var o=0;o<a;o++){var e=r.getURI(o),c=r.getValue(o),n=r.getQName(o),l=i.createAttributeNS(e,n);this.locator&&X(r.getLocator(o),l),l.value=l.nodeValue=c,s.setAttributeNode(l)}},endElement:function(e,t,n){var r=this.currentElement,i=r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&X(this.locator,n),oe(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=ut.apply(this,arguments),e){if(this.cdata)var r=this.doc.createCDATASection(e);else var r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&X(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=ut.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&X(this.locator,r),oe(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&X(this.locator,i),oe(this,i)}},warning:function(e){console.warn("[xmldom warning] "+e,Te(this.locator))},error:function(e){console.error("[xmldom error] "+e,Te(this.locator))},fatalError:function(e){throw new Mt(e,this.locator)}};function Te(e){if(e)return\`
@\`+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function ut(e,t,n){return typeof e=="string"?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\\w+/g,function(e){H.prototype[e]=function(){return null}});function oe(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}var Ot=Re(),lt=Pe(),St=lt.XMLReader,Mt=lt.ParseError,$t=ee.DOMImplementation=we().DOMImplementation;ee.XMLSerializer=we().XMLSerializer;ee.DOMParser=ot;ee.__DOMHandler=H});function ce(e,t){return(e%t+t)%t}function fe(e){return"ID_xyxyxyxyxyxy".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t=="x"?n:n&3|8;return r.toString(16)})}var{DOMParser:Ft}=ct(),Ut=/(<(span|div).*?<\\/(span|div)>)/g,A=self,ft=class{constructor(){this.queue=[];this.parsing=!1;this.parseTitle=!1;A.addEventListener("message",t=>{if(t.data.type=="options"){let{defaultCalendar:n,addToDefaultIfMissing:r,format:i,parseTitle:s,debug:a}=t.data;this.addToDefaultIfMissing=r,this.defaultCalendar=n,this.format=i,this.parseTitle=s,this.debug=a,this.debug&&console.debug("Received options message")}}),A.addEventListener("message",t=>{if(t.data.type=="calendars"){let{calendars:n}=t.data;this.calendars=[...n],this.debug&&console.debug("Received calendars message")}}),A.addEventListener("message",t=>{t.data.type=="queue"&&(this.add(...t.data.paths),this.debug&&console.debug(\`Received queue message for \${t.data.paths.length} paths\`))})}add(...t){this.debug&&console.debug(\`Adding \${t.length} paths to queue\`),this.queue.push(...t),this.parsing||this.parse()}async parse(){for(this.parsing=!0;this.queue.length;){let t=this.queue.shift();this.debug&&console.debug(\`Parsing \${t} for calendar events (\${this.queue.length} to go)\`),await this.getFileData(t)}this.parsing=!1,this.debug&&console.info("Parsing complete"),A.postMessage({type:"save"})}async getFileData(t){let n=this;return new Promise(r=>{function i(s){if(s.data.type=="queue"){A.removeEventListener("message",i),r();return}if(s.data.type!="file"||s.data.path!=t)return;A.removeEventListener("message",i);let{data:a,cache:o,allTags:c,file:l}=s.data;n.parseFileForEvents(a,o,c,l),r()}setTimeout(()=>r(),500),A.addEventListener("message",i),A.postMessage({path:t,type:"get"})})}getDataFromFrontmatter(t){let n,r,i;return t&&"fc-ignore"in t?{}:(t&&(n=t==null?void 0:t["fc-calendar"],r=t==null?void 0:t["fc-category"],i=t==null?void 0:t["fc-display-name"]),this.addToDefaultIfMissing&&(!n||!n.length)&&(n=this.defaultCalendar),n=n==null?void 0:n.toLowerCase(),{calendar:this.calendars.find(a=>n==a.name.toLowerCase()),fcCategory:r,eventDisplayName:i})}removeEventsFromFile(t){for(let n of this.calendars)for(let r=0;r<n.events.length;r++){let i=n.events[r];!i||!i.note||i.note!=t||A.postMessage({event:i,id:n.id,index:r,type:"delete"})}}parseFileForEvents(t,n,r,i){var v,_,g,d,O,z;let s=[],{frontmatter:a}=n!=null?n:{},{calendar:o,fcCategory:c,eventDisplayName:l}=this.getDataFromFrontmatter(a);if(!o){this.debug&&console.info(\`Could not find calendar associated with file \${i.basename}\`),this.removeEventsFromFile(i.path);return}let u=[];o.supportTimelines&&r&&r.map(h=>h.replace(/#/,"")).includes(o.timelineTag.replace(/#/,""))&&(u=this.parseTimelineEvents(o,t,i,c),s.push(...u));let m=this.parseFrontmatterEvents(o,c,a,i,l);if(s.push(...m),!s||!s.length){this.removeEventsFromFile(i.path);return}let p=0;for(let h of s){let f=o.events.find(b=>b.note==i.path&&(!h.timestamp||b.timestamp==h.timestamp));(f==null?void 0:f.date.day)==h.date.day&&(f==null?void 0:f.date.month)==h.date.month&&(f==null?void 0:f.date.year)==h.date.year&&((v=f==null?void 0:f.end)==null?void 0:v.day)==((_=h.end)==null?void 0:_.day)&&((g=f==null?void 0:f.end)==null?void 0:g.month)==((d=h.end)==null?void 0:d.month)&&((O=f==null?void 0:f.end)==null?void 0:O.year)==((z=h.end)==null?void 0:z.year)&&(f==null?void 0:f.category)==h.category&&(f==null?void 0:f.name)==h.name&&(!h.timestamp&&!(f==null?void 0:f.timestamp)||(f==null?void 0:f.timestamp)==h.timestamp)||(A.postMessage({type:"update",id:o.id,index:f?o.events.findIndex(b=>b.id==(f==null?void 0:f.id)):-1,event:h,original:f}),p++)}this.debug&&s.length>0&&console.info(\`\${p}/\${s.length} (\${m.length} from frontmatter, \${u.length} from timelines) event operations completed on \${o.name} for \${i.basename}\`)}parseFrontmatterEvents(t,n,r,i,s){let{date:a,end:o}=this.getDates(r,this.parseTitle?i.basename:"");if(!a)return[];if((a==null?void 0:a.month)&&typeof(a==null?void 0:a.month)=="string"){let u=t.static.months.find(m=>m.name==a.month);u?a.month=t.static.months.indexOf(u):a.month=null}else(a==null?void 0:a.month)&&typeof(a==null?void 0:a.month)=="number"&&(a.month=ce(a.month-1,t.static.months.length));if((o==null?void 0:o.month)&&typeof(o==null?void 0:o.month)=="string"){let u=t.static.months.find(m=>m.name==o.month);u?o.month=t.static.months.indexOf(u):o.month=null}else(o==null?void 0:o.month)&&typeof(o==null?void 0:o.month)=="number"&&(o.month=ce(o.month-1,t.static.months.length));let c=Number(\`\${a.year}\${a.month}\${a.day}00\`),l=t.categories.find(u=>(u==null?void 0:u.name)==n);return[{id:fe(6),name:s!=null?s:i.basename,note:i.path,date:a,end:o,category:l==null?void 0:l.id,description:"",auto:!0}]}parseTimelineEvents(t,n,r,i){var o;let s=[],a=new Ft;for(let c of n.matchAll(Ut)){let l=a.parseFromString(c[0],"text/html"),u={class:l.documentElement.getAttribute("class"),dataset:{date:l.documentElement.getAttribute("data-date"),title:l.documentElement.getAttribute("data-title"),class:l.documentElement.getAttribute("data-class"),end:l.documentElement.getAttribute("data-end")},content:l.documentElement.textContent};if(u.class!=="ob-timelines"||!u.dataset.date)continue;let m=Number(u.dataset.date[0]=="-"?+u.dataset.date.substring(1,u.dataset.date.length).split("-").join("")*-1:+u.dataset.date.split("-").join("")),p=u.dataset.date.split(/(?<!^)-/),v={year:parseInt(p[0]),month:parseInt(p[1]),day:parseInt(p[2])},_;u.dataset.end&&(p=u.dataset.end.split(/(?<!^)-/),_={year:parseInt(p[0]),month:parseInt(p[1]),day:parseInt(p[2])});let g=t.categories.find(d=>(d==null?void 0:d.name)==u.dataset.class);s.push({id:fe(6),name:(o=u.dataset.title)!=null?o:r.basename,note:r.path,date:v,end:_,timestamp:m,category:g==null?void 0:g.id,description:u.content,auto:!0})}return s}parseDate(t){var n;if(typeof t=="string"){if(!/\\d+[./-]\\d+[./-]\\d+/.test(t))return;try{let[r]=(n=t.match(/\\d+[./-]\\d+[./-]\\d+/))!=null?n:[];if(!r)return;let i=r.split(/[.\\-\\/]/).map(a=>Number(a)),s=[...new Set(this.format.replace(/[^\\w]/g,"").toUpperCase().split(""))];return{year:i[s.indexOf("Y")],month:i[s.indexOf("M")],day:i[s.indexOf("D")]}}catch(r){return}}else return t}getDates(t={},n){let r="fc-date"in t?"fc-date":"fc-start",i;t&&r in t&&(i=t[r]),i||(i=n);let s=this.parseDate(i),a="fc-end"in t?t["fc-end"]:null,o=this.parseDate(a);return{date:s,end:o}}};new ft;
`)}var Qh=class extends Jt.FuzzySuggestModal{constructor(e){super(e.app);this.plugin=e}getItems(){return this.plugin.data.calendars}getItemText(e){return e.name}onChooseItem(e,n){this.chosen=e,this.close()}},Ms=class extends Jt.Component{constructor(e){super();this.plugin=e;this.queue=new Set;this.tree=new Map;this.worker=new Ns}get calendars(){return this.plugin.data.calendars}get metadataCache(){return this.plugin.app.metadataCache}get vault(){return this.plugin.app.vault}onload(){this.plugin.addCommand({id:"rescan-events",name:"Rescan Events",callback:()=>{this.plugin.data.debug&&console.info("Beginning full rescan for calendar events"),this.start()}}),this.plugin.addCommand({id:"rescan-events-for-calendar",name:"Rescan Events for Calendar",callback:()=>{let e=new Qh(this.plugin);e.onClose=()=>{e.chosen&&(this.plugin.data.debug&&console.info("Beginning full rescan for calendar events for calendar "+e.chosen.name),this.start(e.chosen))},e.open()}}),this.worker.postMessage({type:"calendars",calendars:this.calendars}),this.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-updated",()=>{this.worker.postMessage({type:"calendars",calendars:this.calendars})})),this.worker.postMessage({type:"options",parseTitle:this.plugin.data.parseDates,addToDefaultIfMissing:this.plugin.data.addToDefaultIfMissing,format:this.plugin.format,defaultCalendar:this.plugin.defaultCalendar?.name,debug:this.plugin.data.debug}),this.registerEvent(this.plugin.app.workspace.on("fantasy-calendar-settings-change",()=>{this.worker.postMessage({type:"options",parseTitle:this.plugin.data.parseDates,addToDefaultIfMissing:this.plugin.data.addToDefaultIfMissing,format:this.plugin.format,defaultCalendar:this.plugin.defaultCalendar?.name,debug:this.plugin.data.debug})})),this.registerEvent(this.metadataCache.on("changed",e=>{this.queue.has(e.path)||this.startParsing([e.path])})),this.registerEvent(this.vault.on("rename",async(e,n)=>{if(!!this.calendars.length&&e instanceof Jt.TFile){for(let a of this.calendars)a.events=a.events.filter(r=>r.note!=n);this.worker.postMessage({type:"calendars",calendars:this.calendars}),this.startParsing([e.path])}})),this.registerEvent(this.vault.on("delete",async e=>{if(e instanceof Jt.TFile){for(let n of this.calendars){let a=n.events.filter(r=>r.note===e.path);n.events=n.events.filter(r=>r.note!=e.path);for(let r of a)this.addToTree(n,r)}await this.plugin.saveCalendar(),this.plugin.app.workspace.trigger("fantasy-calendars-event-update",this.tree),this.tree=new Map}})),this.worker.addEventListener("message",async e=>{if(e.data.type=="get"){let{path:n}=e.data;this.queue.delete(n);let a=this.plugin.app.vault.getAbstractFileByPath(n);if(a instanceof Jt.TFile){let r=this.metadataCache.getFileCache(a),i=(0,Jt.getAllTags)(r),o=await this.vault.cachedRead(a);this.worker.postMessage({type:"file",path:n,cache:r,file:{path:a.path,basename:a.basename},allTags:i,data:o})}else if(a instanceof Jt.TFolder){let r=a.children.map(i=>i.path);this.startParsing(r)}}}),this.worker.addEventListener("message",async e=>{if(e.data.type=="update"){let{id:n,index:a,event:r,original:i}=e.data,o=this.calendars.find(l=>l.id==n);if(!o)return;a==-1?(this.plugin.data.debug&&console.debug(`Adding '${r.name}' to ${o.name}`),o.events.push(r)):(this.plugin.data.debug&&console.debug(`Updating '${r.name}' in calendar ${o.name}`),o.events.splice(a,a>=0?1:0,r)),this.addToTree(o,r),i&&this.addToTree(o,i)}}),this.worker.addEventListener("message",async e=>{if(e.data.type=="delete"){let{id:n,index:a,event:r}=e.data;if(!r)return;let i=this.calendars.find(o=>o.id==n);if(!i)return;this.plugin.data.debug&&console.debug(`Removing '${r.name}' from ${i.name}`),i.events=i.events.filter(o=>o.id!=r.id),this.addToTree(i,r)}}),this.worker.addEventListener("message",async e=>{e.data.type=="save"&&(this.plugin.data.debug&&console.debug("Received save event from file watcher"),this.plugin.app.workspace.trigger("fantasy-calendars-event-update",this.tree),this.tree=new Map,await this.plugin.saveCalendar())}),this.start()}start(e){let n=e?[e]:this.calendars;if(!n.length)return;let a=new Set;for(let r of n){if(!r||!r.autoParse)continue;let i=this.vault.getAbstractFileByPath(r.path);if(!(!i||!(i instanceof Jt.TFolder)))for(let o of i.children)a.add(o.path)}!a.size||(this.plugin.data.debug&&console.info(e?`Starting rescan for ${e.name} (${a.size})`:`Starting rescan for ${n.length} calendars (${a.size})`),this.startParsing([...a]))}addToTree(e,n){this.tree.has(e.id)||this.tree.set(e.id,new Set);let a=this.tree.get(e.id);if(!a.has(n.date.year)&&(a.add(n.date.year),n.end&&n.end.year!=n.date.year))for(let r=n.date.year+1;r<=n.end.year;r++)a.add(n.date.year)}startParsing(e){for(let n of e)this.queue.add(n);this.worker.postMessage({type:"queue",paths:e})}onunload(){this.worker.terminate(),this.worker=null}};var Is=Ee(require("obsidian"));var Os=class{constructor(e){this.plugin=e}getCalendars(){return this.plugin.data.calendars}getMoons(e,n){let a=n?this.plugin.data.calendars.find(({name:s})=>s==n):this.plugin.defaultCalendar??this.plugin.defaultCalendar,r=this.getHelper(a),i=e||r.current,o=r.getDayForDate(i),l=[];for(let[s,c]of o.moons){let u=createSpan();new jn({target:u,props:{moon:s,phase:c}}),l.push({icon:u,moon:s,phase:c})}return l}getDay(e,n=this.plugin.defaultCalendar){if(!e||typeof e!="object"||e.year==null||e.month==null||e.day==null){new Is.Notice("The Date parameter is required and must have the day, month and year.");return}typeof n=="string"&&(n=this.plugin.data.calendars.find(o=>o.name==n)??this.plugin.defaultCalendar);let a=this.getHelper(n),r;if(typeof e.month=="string"?r=a.data.months.findIndex(o=>o.name==e.month):r=e.month,isNaN(e.year)||isNaN(r)||r==-1||isNaN(e.day)){let o=[];isNaN(e.year)&&o.push("The year must be a number."),(isNaN(r)||r==-1)&&(typeof e.month=="string"?o.push(`Could not find ${e.month} in the Months list for ${a.calendar.name}`):o.push("The month must be a number or the name of a month in the list of months for the selected calendar.")),isNaN(e.day)&&o.push("The year must be a number."),new Is.Notice(`There was an issue with the provided date.
${o.join(`
`)}`);return}let i=a.getDayForDate({year:e.year,month:r,day:e.day});return{moons:i.moons,events:i.events,date:i.date,longDate:i.longDate,leapDay:i.leapday,weekday:i.weekday,displayDate:Kt(i.date,a.calendar)}}async addCategoryToCalendar(e,n=this.plugin.defaultCalendar){if(!e)throw new Error("Category is required.");if(!e.name||!e.color)throw new Error("A category requires a name and a color.");if(e.id||(e.id=Ze(6)),typeof n=="string"&&(n=this.plugin.data.calendars.find(a=>a.name==n)??this.plugin.defaultCalendar),!n||typeof n!="object"||!("categories"in n))throw new Error("Invalid calendar provided.");n.categories.push(e),await this.plugin.saveCalendar()}getHelper(e=this.plugin.defaultCalendar){return new Wa(e,this.plugin)}};var qs=Ee(Nn());var Xh=Wn.Platform.isMacOS?"Meta":"Control",ia={name:null,description:null,id:null,static:{incrementDay:!1,firstWeekDay:null,overflow:!0,weekdays:[],months:[],moons:[],displayMoons:!0,displayDayNumber:!1,leapDays:[],eras:[]},current:{year:null,month:null,day:null},events:[],categories:[],autoParse:!1,path:"/",supportTimelines:!1,syncTimelines:!0,timelineTag:"#timeline"},Jh={addToDefaultIfMissing:!0,calendars:[],configDirectory:null,currentCalendar:null,dailyNotes:!1,dateFormat:"YYYY-MM-DD",defaultCalendar:null,eventPreview:!1,exit:{saving:!1,event:!1,calendar:!1},eventFrontmatter:!1,parseDates:!1,settingsToggleState:{calendars:!1,events:!1,advanced:!0},showIntercalary:!1,version:{major:null,minor:null,patch:null},debug:!1},Rs=class extends Wn.Plugin{constructor(){super(...arguments);this.api=new Os(this);this.watcher=new Ms(this);this.save=(0,Wn.debounce)(async e=>{if(this.configDirectory)try{await this.app.vault.adapter.exists(this.configDirectory)||await this.app.vault.adapter.mkdir(this.configDirectory),await this.app.vault.adapter.write(this.configFilePath,JSON.stringify(e))}catch(n){console.error(n),new Wn.Notice("There was an error saving into the configured directory.")}await this.saveData(e)},200)}async addNewCalendar(e,n){let a=!n||e.name!=n?.name||e.autoParse&&!n?.autoParse||e.path!=n?.path;n==null?this.data.calendars.push(e):this.data.calendars.splice(this.data.calendars.indexOf(n),1,e),this.data.defaultCalendar||(this.data.defaultCalendar=e.id),a&&this.watcher.start(e),await this.saveCalendar()}get currentCalendar(){return this.data.calendars.find(e=>e.id==this.data.currentCalendar)}get canUseDailyNotes(){return this.dailyNotes._loaded}get dailyNotes(){return this.app.internalPlugins.getPluginById("daily-notes")}get canUseTimelines(){return this.app.plugins.getPlugin("obsidian-timelines")!=null}syncTimelines(e){return e.syncTimelines&&this.canUseTimelines}timelineTag(e){let n=e.timelineTag;return this.syncTimelines(e)&&(n=this.app.plugins.getPlugin("obsidian-timelines").settings.timelineTag),/^#/.test(n)||(n=`#${n}`),n??e.timelineTag??""}get format(){return(this.data.dailyNotes&&this.canUseDailyNotes?this.dailyNotes.instance.options.format:this.data.dateFormat)??"YYYY-MM-DD"}get defaultCalendar(){return this.data.calendars.find(e=>e.id==this.data.defaultCalendar)??this.data.calendars[0]}get view(){let e=this.app.workspace.getLeavesOfType(Xt),n=e.length?e[0]:null;if(n&&n.view&&n.view instanceof Hn)return n.view}get full(){let e=this.app.workspace.getLeavesOfType(fa),n=e.length?e[0]:null;if(n&&n.view&&n.view instanceof Hn)return n.view}async onload(){console.log("Loading Fantasy Calendars v"+this.manifest.version),(window.FantasyCalendarAPI=this.api)&&this.register(()=>delete window.FantasyCalendarAPI),this.registerView(Xt,e=>new Hn(this,e)),this.registerView(fa,e=>new Hn(this,e,{full:!0})),this.app.workspace.onLayoutReady(async()=>{await this.loadSettings(),this.watcher.load(),this.addCommands(),this.addSettingTab(new xi(this)),this.addCalendarView(!0)}),this.addRibbonIcon(Xt,"Open Large Fantasy Calendar",e=>{this.app.workspace.getLeaf(e.getModifierState(Xh)).setViewState({type:fa})})}async onunload(){console.log("Unloading Fantasy Calendars v"+this.manifest.version),this.app.workspace.getLeavesOfType(Xt).forEach(e=>e.detach()),this.app.workspace.getLeavesOfType(fa).forEach(e=>e.detach()),this.watcher.unload()}addCommands(){this.addCommand({id:"open-fantasy-calendar",name:"Open Fantasy Calendar",callback:()=>{this.addCalendarView()}}),this.addCommand({id:"open-big-fantasy-calendar",name:"Open Large Fantasy Calendar",callback:()=>{this.addFullCalendarView()}}),this.addCommand({id:"toggle-moons",name:"Toggle Moons",checkCallback:e=>{let n=this.app.workspace.getLeavesOfType(Xt);if(n&&n.length)return e||n[0].view.toggleMoons(),!0}}),this.addCommand({id:"view-date",name:"View Date",checkCallback:e=>{let n=this.app.workspace.getLeavesOfType(Xt);if(n&&n.length)return e||n[0].view.openDate(),!0}}),this.addCommand({id:"view-date",name:"View Note Event",checkCallback:e=>{let n=this.app.workspace.getLeavesOfType(Xt);if(n&&n.length&&n[0].view instanceof Hn){let a=this.app.workspace.getActiveFile();if(a){let r=n[0].view.calendar.events.find(i=>i.note==a.path);if(r)return e||n[0].view.openDay(r.date),!0}}}})}async addCalendarView(e=!1){e&&this.app.workspace.getLeavesOfType(Xt)?.length||(await this.app.workspace.getRightLeaf(!1).setViewState({type:Xt}),this.view&&this.app.workspace.revealLeaf(this.view.leaf))}async addFullCalendarView(e=!1){e&&this.app.workspace.getLeavesOfType(fa)?.length||(this.app.workspace.getLeaf(!1).setViewState({type:fa}),this.full&&this.app.workspace.revealLeaf(this.full.leaf))}async loadData(){return this.configDirectory&&await this.app.vault.adapter.exists(this.configFilePath)?JSON.parse(await this.app.vault.adapter.read(this.configFilePath)):await this.app.vault.adapter.exists(`${this.manifest.dir}/temp.json`)?JSON.parse(await this.app.vault.adapter.read(`${this.manifest.dir}/temp.json`)):await super.loadData()}async loadSettings(){if(this.data={...(0,qs.default)(Jh),...await this.loadData()},!this.data.defaultCalendar&&this.data.calendars.length&&(this.data.defaultCalendar=this.data.calendars[0].id),this.data.calendars.length&&!this.data.calendars.find(e=>e.id==this.data.defaultCalendar)&&(this.data.defaultCalendar=this.data.calendars[0].id),this.data.autoParse&&this.data.calendars.length){for(let e of this.data.calendars)e.autoParse=this.data.autoParse,e.path=this.data.path;delete this.data.autoParse,delete this.data.path}for(let e of this.data.calendars)e&&e.static&&e.static.eras&&e.static.eras.length&&e.static.eras.some(n=>!n.id)&&(e.static.eras=e.static.eras.map(n=>({...(0,qs.default)(n),id:n.id??Ze(6),restart:n.restart??!1,endsYear:n.endsYear??!1,event:n.event??!1})));this.data.eventFrontmatter=!1,await this.saveSettings(),this.settingsLoaded=!0,this.app.workspace.trigger("fantasy-calendars-settings-loaded")}onSettingsLoad(e){this.settingsLoaded?e():this.app.workspace.on("fantasy-calendars-settings-loaded",()=>e())}async saveCalendar(){await this.saveSettings(),this.app.workspace.trigger("fantasy-calendars-updated")}get configDirectory(){if(!(!this.data||!this.data.configDirectory))return`${this.data.configDirectory}/plugins/fantasy-calendar`}get configFilePath(){if(!!this.data.configDirectory)return`${this.configDirectory}/data.json`}async saveSettings(){await this.save(this.data),this.app.workspace.trigger("fantasy-calendar-settings-change")}async saveData(e,n=this.manifest.dir){try{await this.app.vault.adapter.write(`${n}/temp.json`,JSON.stringify(e,null,null)),await this.app.vault.adapter.exists(`${n}/data.json`)&&await this.app.vault.adapter.remove(`${n}/data.json`),await this.app.vault.adapter.copy(`${n}/temp.json`,`${n}/data.json`),await this.app.vault.adapter.remove(`${n}/temp.json`)}catch(a){console.log("\u{1F680} ~ file: main.ts:499 ~ e:",a),await super.saveData(e)}}};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/*! https://mths.be/he v1.2.0 by @mathias | MIT license */
/**
* chroma.js - JavaScript library for color conversions
*
* Copyright (c) 2011-2019, Gregor Aisch
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name Gregor Aisch may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* -------------------------------------------------------
*
* chroma.js includes colors from colorbrewer2.org, which are released under
* the following license:
*
* Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
* and The Pennsylvania State University.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the License.
*
* ------------------------------------------------------
*
* Named colors are taken from X11 Color Names.
* http://www.w3.org/TR/css3-color/#svg-color
*
* @preserve
*/