You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
449 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*! For license information please see main.js.LICENSE.txt */
(()=>{var e={792:function(e){e.exports=function(){"use strict";for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e<t?t:e>n?n:e},t={},n=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n<a.length;n+=1){var r=a[n];t["[object "+r+"]"]=r.toLowerCase()}var i=function(e){return t[Object.prototype.toString.call(e)]||"object"},o=Math.PI,s={clip_rgb:function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var n=0;n<=3;n++)n<3?((t[n]<0||t[n]>255)&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},limit:e,type:i,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==i(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==i(e[t])?e[t].toLowerCase():null},PI:o,TWOPI:2*o,PITHIRD:o/3,DEG2RAD:o/180,RAD2DEG:180/o},l={format:{},autodetect:[]},d=s.last,c=s.clip_rgb,u=s.type,h=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===u(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var a=d(e),r=!1;if(!a){r=!0,l.sorted||(l.autodetect=l.autodetect.sort((function(e,t){return t.p-e.p})),l.sorted=!0);for(var i=0,o=l.autodetect;i<o.length;i+=1){var s=o[i];if(a=s.test.apply(s,e))break}}if(!l.format[a])throw new Error("unknown format: "+e);var h=l.format[a].apply(null,r?e:e.slice(0,-1));n._rgb=c(h),3===n._rgb.length&&n._rgb.push(1)};h.prototype.toString=function(){return"function"==u(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var f=h,p=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p.Color,[null].concat(e)))};p.Color=f,p.version="2.1.2";var m=p,g=s.unpack,y=Math.max,v=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=g(e,"rgb"),a=n[0],r=n[1],i=n[2],o=1-y(a/=255,y(r/=255,i/=255)),s=o<1?1/(1-o):0;return[(1-a-o)*s,(1-r-o)*s,(1-i-o)*s,o]},b=s.unpack,w=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=b(e,"cmyk"))[0],a=e[1],r=e[2],i=e[3],o=e.length>4?e[4]:1;return 1===i?[0,0,0,o]:[n>=1?0:255*(1-n)*(1-i),a>=1?0:255*(1-a)*(1-i),r>=1?0:255*(1-r)*(1-i),o]},D=s.unpack,x=s.type;f.prototype.cmyk=function(){return v(this._rgb)},m.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["cmyk"])))},l.format.cmyk=w,l.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=D(e,"cmyk"),"array"===x(e)&&4===e.length)return"cmyk"}});var k=s.unpack,E=s.last,C=function(e){return Math.round(100*e)/100},A=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=k(e,"hsla"),a=E(e)||"lsa";return n[0]=C(n[0]||0),n[1]=C(100*n[1])+"%",n[2]=C(100*n[2])+"%","hsla"===a||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,a="hsla"):n.length=3,a+"("+n.join(",")+")"},T=s.unpack,S=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=T(e,"rgba"))[0],a=e[1],r=e[2];n/=255,a/=255,r/=255;var i,o,s=Math.min(n,a,r),l=Math.max(n,a,r),d=(l+s)/2;return l===s?(i=0,o=Number.NaN):i=d<.5?(l-s)/(l+s):(l-s)/(2-l-s),n==l?o=(a-r)/(l-s):a==l?o=2+(r-n)/(l-s):r==l&&(o=4+(n-a)/(l-s)),(o*=60)<0&&(o+=360),e.length>3&&void 0!==e[3]?[o,i,d,e[3]]:[o,i,d]},$=s.unpack,M=s.last,q=Math.round,I=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=$(e,"rgba"),a=M(e)||"rgb";return"hsl"==a.substr(0,3)?A(S(n),a):(n[0]=q(n[0]),n[1]=q(n[1]),n[2]=q(n[2]),("rgba"===a||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,a="rgba"),a+"("+n.slice(0,"rgb"===a?3:4).join(",")+")")},N=s.unpack,F=Math.round,O=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var a,r,i,o=(t=N(t,"hsl"))[0],s=t[1],l=t[2];if(0===s)a=r=i=255*l;else{var d=[0,0,0],c=[0,0,0],u=l<.5?l*(1+s):l+s-l*s,h=2*l-u,f=o/360;d[0]=f+1/3,d[1]=f,d[2]=f-1/3;for(var p=0;p<3;p++)d[p]<0&&(d[p]+=1),d[p]>1&&(d[p]-=1),6*d[p]<1?c[p]=h+6*(u-h)*d[p]:2*d[p]<1?c[p]=u:3*d[p]<2?c[p]=h+(u-h)*(2/3-d[p])*6:c[p]=h;a=(e=[F(255*c[0]),F(255*c[1]),F(255*c[2])])[0],r=e[1],i=e[2]}return t.length>3?[a,r,i,t[3]]:[a,r,i,1]},L=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,B=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,R=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,_=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,j=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,V=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,P=Math.round,H=function(e){var t;if(e=e.toLowerCase().trim(),l.format.named)try{return l.format.named(e)}catch(e){}if(t=e.match(L)){for(var n=t.slice(1,4),a=0;a<3;a++)n[a]=+n[a];return n[3]=1,n}if(t=e.match(B)){for(var r=t.slice(1,5),i=0;i<4;i++)r[i]=+r[i];return r}if(t=e.match(R)){for(var o=t.slice(1,4),s=0;s<3;s++)o[s]=P(2.55*o[s]);return o[3]=1,o}if(t=e.match(_)){for(var d=t.slice(1,5),c=0;c<3;c++)d[c]=P(2.55*d[c]);return d[3]=+d[3],d}if(t=e.match(j)){var u=t.slice(1,4);u[1]*=.01,u[2]*=.01;var h=O(u);return h[3]=1,h}if(t=e.match(V)){var f=t.slice(1,4);f[1]*=.01,f[2]*=.01;var p=O(f);return p[3]=+t[4],p}};H.test=function(e){return L.test(e)||B.test(e)||R.test(e)||_.test(e)||j.test(e)||V.test(e)};var G=H,W=s.type;f.prototype.css=function(e){return I(this._rgb,e)},m.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["css"])))},l.format.css=G,l.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===W(e)&&G.test(e))return"css"}});var U=s.unpack;l.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=U(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},m.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["gl"])))},f.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var z=s.unpack,Y=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a=z(e,"rgb"),r=a[0],i=a[1],o=a[2],s=Math.min(r,i,o),l=Math.max(r,i,o),d=l-s,c=100*d/255,u=s/(255-d)*100;return 0===d?n=Number.NaN:(r===l&&(n=(i-o)/d),i===l&&(n=2+(o-r)/d),o===l&&(n=4+(r-i)/d),(n*=60)<0&&(n+=360)),[n,c,u]},Z=s.unpack,K=Math.floor,Q=function(){for(var e,t,n,a,r,i,o=[],s=arguments.length;s--;)o[s]=arguments[s];var l,d,c,u=(o=Z(o,"hcg"))[0],h=o[1],f=o[2];f*=255;var p=255*h;if(0===h)l=d=c=f;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var m=K(u/=60),g=u-m,y=f*(1-h),v=y+p*(1-g),b=y+p*g,w=y+p;switch(m){case 0:l=(e=[w,b,y])[0],d=e[1],c=e[2];break;case 1:l=(t=[v,w,y])[0],d=t[1],c=t[2];break;case 2:l=(n=[y,w,b])[0],d=n[1],c=n[2];break;case 3:l=(a=[y,v,w])[0],d=a[1],c=a[2];break;case 4:l=(r=[b,y,w])[0],d=r[1],c=r[2];break;case 5:l=(i=[w,y,v])[0],d=i[1],c=i[2]}}return[l,d,c,o.length>3?o[3]:1]},J=s.unpack,X=s.type;f.prototype.hcg=function(){return Y(this._rgb)},m.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hcg"])))},l.format.hcg=Q,l.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=J(e,"hcg"),"array"===X(e)&&3===e.length)return"hcg"}});var ee=s.unpack,te=s.last,ne=Math.round,ae=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ee(e,"rgba"),a=n[0],r=n[1],i=n[2],o=n[3],s=te(e)||"auto";void 0===o&&(o=1),"auto"===s&&(s=o<1?"rgba":"rgb");var l="000000"+((a=ne(a))<<16|(r=ne(r))<<8|(i=ne(i))).toString(16);l=l.substr(l.length-6);var d="0"+ne(255*o).toString(16);switch(d=d.substr(d.length-2),s.toLowerCase()){case"rgba":return"#"+l+d;case"argb":return"#"+d+l;default:return"#"+l}},re=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,ie=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,oe=function(e){if(e.match(re)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(ie)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},se=s.type;f.prototype.hex=function(e){return ae(this._rgb,e)},m.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hex"])))},l.format.hex=oe,l.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===se(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var le=s.unpack,de=s.TWOPI,ce=Math.min,ue=Math.sqrt,he=Math.acos,fe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a=le(e,"rgb"),r=a[0],i=a[1],o=a[2],s=ce(r/=255,i/=255,o/=255),l=(r+i+o)/3,d=l>0?1-s/l:0;return 0===d?n=NaN:(n=(r-i+(r-o))/2,n/=ue((r-i)*(r-i)+(r-o)*(i-o)),n=he(n),o>i&&(n=de-n),n/=de),[360*n,d,l]},pe=s.unpack,me=s.limit,ge=s.TWOPI,ye=s.PITHIRD,ve=Math.cos,be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,r,i=(e=pe(e,"hsi"))[0],o=e[1],s=e[2];return isNaN(i)&&(i=0),isNaN(o)&&(o=0),i>360&&(i-=360),i<0&&(i+=360),(i/=360)<1/3?a=1-((r=(1-o)/3)+(n=(1+o*ve(ge*i)/ve(ye-ge*i))/3)):i<2/3?r=1-((n=(1-o)/3)+(a=(1+o*ve(ge*(i-=1/3))/ve(ye-ge*i))/3)):n=1-((a=(1-o)/3)+(r=(1+o*ve(ge*(i-=2/3))/ve(ye-ge*i))/3)),[255*(n=me(s*n*3)),255*(a=me(s*a*3)),255*(r=me(s*r*3)),e.length>3?e[3]:1]},we=s.unpack,De=s.type;f.prototype.hsi=function(){return fe(this._rgb)},m.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hsi"])))},l.format.hsi=be,l.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=we(e,"hsi"),"array"===De(e)&&3===e.length)return"hsi"}});var xe=s.unpack,ke=s.type;f.prototype.hsl=function(){return S(this._rgb)},m.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hsl"])))},l.format.hsl=O,l.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=xe(e,"hsl"),"array"===ke(e)&&3===e.length)return"hsl"}});var Ee=s.unpack,Ce=Math.min,Ae=Math.max,Te=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,r,i=(e=Ee(e,"rgb"))[0],o=e[1],s=e[2],l=Ce(i,o,s),d=Ae(i,o,s),c=d-l;return r=d/255,0===d?(n=Number.NaN,a=0):(a=c/d,i===d&&(n=(o-s)/c),o===d&&(n=2+(s-i)/c),s===d&&(n=4+(i-o)/c),(n*=60)<0&&(n+=360)),[n,a,r]},Se=s.unpack,$e=Math.floor,Me=function(){for(var e,t,n,a,r,i,o=[],s=arguments.length;s--;)o[s]=arguments[s];var l,d,c,u=(o=Se(o,"hsv"))[0],h=o[1],f=o[2];if(f*=255,0===h)l=d=c=f;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var p=$e(u/=60),m=u-p,g=f*(1-h),y=f*(1-h*m),v=f*(1-h*(1-m));switch(p){case 0:l=(e=[f,v,g])[0],d=e[1],c=e[2];break;case 1:l=(t=[y,f,g])[0],d=t[1],c=t[2];break;case 2:l=(n=[g,f,v])[0],d=n[1],c=n[2];break;case 3:l=(a=[g,y,f])[0],d=a[1],c=a[2];break;case 4:l=(r=[v,g,f])[0],d=r[1],c=r[2];break;case 5:l=(i=[f,g,y])[0],d=i[1],c=i[2]}}return[l,d,c,o.length>3?o[3]:1]},qe=s.unpack,Ie=s.type;f.prototype.hsv=function(){return Te(this._rgb)},m.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hsv"])))},l.format.hsv=Me,l.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=qe(e,"hsv"),"array"===Ie(e)&&3===e.length)return"hsv"}});var Ne=18,Fe=.95047,Oe=1,Le=1.08883,Be=.137931034,Re=.206896552,_e=.12841855,je=.008856452,Ve=s.unpack,Pe=Math.pow,He=function(e){return(e/=255)<=.04045?e/12.92:Pe((e+.055)/1.055,2.4)},Ge=function(e){return e>je?Pe(e,1/3):e/_e+Be},We=function(e,t,n){return e=He(e),t=He(t),n=He(n),[Ge((.4124564*e+.3575761*t+.1804375*n)/Fe),Ge((.2126729*e+.7151522*t+.072175*n)/Oe),Ge((.0193339*e+.119192*t+.9503041*n)/Le)]},Ue=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ve(e,"rgb"),a=n[0],r=n[1],i=n[2],o=We(a,r,i),s=o[0],l=o[1],d=116*l-16;return[d<0?0:d,500*(s-l),200*(l-o[2])]},ze=s.unpack,Ye=Math.pow,Ze=function(e){return 255*(e<=.00304?12.92*e:1.055*Ye(e,1/2.4)-.055)},Ke=function(e){return e>Re?e*e*e:_e*(e-Be)},Qe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,r,i=(e=ze(e,"lab"))[0],o=e[1],s=e[2];return a=(i+16)/116,n=isNaN(o)?a:a+o/500,r=isNaN(s)?a:a-s/200,a=Oe*Ke(a),n=Fe*Ke(n),r=Le*Ke(r),[Ze(3.2404542*n-1.5371385*a-.4985314*r),Ze(-.969266*n+1.8760108*a+.041556*r),Ze(.0556434*n-.2040259*a+1.0572252*r),e.length>3?e[3]:1]},Je=s.unpack,Xe=s.type;f.prototype.lab=function(){return Ue(this._rgb)},m.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["lab"])))},l.format.lab=Qe,l.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Je(e,"lab"),"array"===Xe(e)&&3===e.length)return"lab"}});var et=s.unpack,tt=s.RAD2DEG,nt=Math.sqrt,at=Math.atan2,rt=Math.round,it=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=et(e,"lab"),a=n[0],r=n[1],i=n[2],o=nt(r*r+i*i),s=(at(i,r)*tt+360)%360;return 0===rt(1e4*o)&&(s=Number.NaN),[a,o,s]},ot=s.unpack,st=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ot(e,"rgb"),a=n[0],r=n[1],i=n[2],o=Ue(a,r,i),s=o[0],l=o[1],d=o[2];return it(s,l,d)},lt=s.unpack,dt=s.DEG2RAD,ct=Math.sin,ut=Math.cos,ht=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=lt(e,"lch"),a=n[0],r=n[1],i=n[2];return isNaN(i)&&(i=0),[a,ut(i*=dt)*r,ct(i)*r]},ft=s.unpack,pt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=ft(e,"lch"))[0],a=e[1],r=e[2],i=ht(n,a,r),o=i[0],s=i[1],l=i[2],d=Qe(o,s,l);return[d[0],d[1],d[2],e.length>3?e[3]:1]},mt=s.unpack,gt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=mt(e,"hcl").reverse();return pt.apply(void 0,n)},yt=s.unpack,vt=s.type;f.prototype.lch=function(){return st(this._rgb)},f.prototype.hcl=function(){return st(this._rgb).reverse()},m.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["lch"])))},m.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hcl"])))},l.format.lch=pt,l.format.hcl=gt,["lch","hcl"].forEach((function(e){return l.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=yt(t,e),"array"===vt(t)&&3===t.length)return e}})}));var bt={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"},wt=s.type;f.prototype.name=function(){for(var e=ae(this._rgb,"rgb"),t=0,n=Object.keys(bt);t<n.length;t+=1){var a=n[t];if(bt[a]===e)return a.toLowerCase()}return e},l.format.named=function(e){if(e=e.toLowerCase(),bt[e])return oe(bt[e]);throw new Error("unknown color name: "+e)},l.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===wt(e)&&bt[e.toLowerCase()])return"named"}});var Dt=s.unpack,xt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Dt(e,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},kt=s.type,Et=s.type;f.prototype.num=function(){return xt(this._rgb)},m.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["num"])))},l.format.num=function(e){if("number"==kt(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},l.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Et(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var Ct=s.unpack,At=s.type,Tt=Math.round;f.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Tt)},f.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:Tt(t):t}))},m.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["rgb"])))},l.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ct(e,"rgba");return void 0===n[3]&&(n[3]=1),n},l.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ct(e,"rgba"),"array"===At(e)&&(3===e.length||4===e.length&&"number"==At(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var St=Math.log,$t=function(e){var t,n,a,r=e/100;return r<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=r-2)+104.49216199393888*St(n),a=r<20?0:.8274096064007395*(a=r-10)-254.76935184120902+115.67994401066147*St(a)):(t=351.97690566805693+.114206453784165*(t=r-55)-40.25366309332127*St(t),n=325.4494125711974+.07943456536662342*(n=r-50)-28.0852963507957*St(n),a=255),[t,n,a,1]},Mt=s.unpack,qt=Math.round,It=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,a=Mt(e,"rgb"),r=a[0],i=a[2],o=1e3,s=4e4,l=.4;s-o>l;){var d=$t(n=.5*(s+o));d[2]/d[0]>=i/r?s=n:o=n}return qt(n)};f.prototype.temp=f.prototype.kelvin=f.prototype.temperature=function(){return It(this._rgb)},m.temp=m.kelvin=m.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["temp"])))},l.format.temp=l.format.kelvin=l.format.temperature=$t;var Nt=s.type;f.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Nt(e)?t?(this._rgb[3]=e,this):new f([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},f.prototype.clipped=function(){return this._rgb._clipped||!1},f.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=Ne*e,new f(t,"lab").alpha(this.alpha(),!0)},f.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},f.prototype.darker=f.prototype.darken,f.prototype.brighter=f.prototype.brighten,f.prototype.get=function(e){var t=e.split("."),n=t[0],a=t[1],r=this[n]();if(a){var i=n.indexOf(a);if(i>-1)return r[i];throw new Error("unknown channel "+a+" in mode "+n)}return r};var Ft=s.type,Ot=Math.pow;f.prototype.luminance=function(e){if(void 0!==e&&"number"===Ft(e)){if(0===e)return new f([0,0,0,this._rgb[3]],"rgb");if(1===e)return new f([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n=20,a=function(t,r){var i=t.interpolate(r,.5,"rgb"),o=i.luminance();return Math.abs(e-o)<1e-7||!n--?i:o>e?a(t,i):a(i,r)},r=(t>e?a(new f([0,0,0]),this):a(this,new f([255,255,255]))).rgb();return new f(r.concat([this._rgb[3]]))}return Lt.apply(void 0,this._rgb.slice(0,3))};var Lt=function(e,t,n){return.2126*(e=Bt(e))+.7152*(t=Bt(t))+.0722*Bt(n)},Bt=function(e){return(e/=255)<=.03928?e/12.92:Ot((e+.055)/1.055,2.4)},Rt={},_t=s.type,jt=function(e,t,n){void 0===n&&(n=.5);for(var a=[],r=arguments.length-3;r-- >0;)a[r]=arguments[r+3];var i=a[0]||"lrgb";if(Rt[i]||a.length||(i=Object.keys(Rt)[0]),!Rt[i])throw new Error("interpolation mode "+i+" is not defined");return"object"!==_t(e)&&(e=new f(e)),"object"!==_t(t)&&(t=new f(t)),Rt[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};f.prototype.mix=f.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],a=arguments.length-2;a-- >0;)n[a]=arguments[a+2];return jt.apply(void 0,[this,e,t].concat(n))},f.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new f([t[0]*n,t[1]*n,t[2]*n,n],"rgb")},f.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Ne*e,t[1]<0&&(t[1]=0),new f(t,"lch").alpha(this.alpha(),!0)},f.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Vt=s.type;f.prototype.set=function(e,t,n){void 0===n&&(n=!1);var a=e.split("."),r=a[0],i=a[1],o=this[r]();if(i){var s=r.indexOf(i);if(s>-1){if("string"==Vt(t))switch(t.charAt(0)){case"+":case"-":o[s]+=+t;break;case"*":o[s]*=+t.substr(1);break;case"/":o[s]/=+t.substr(1);break;default:o[s]=+t}else{if("number"!==Vt(t))throw new Error("unsupported value for Color.set");o[s]=t}var l=new f(o,r);return n?(this._rgb=l._rgb,this):l}throw new Error("unknown channel "+i+" in mode "+r)}return o};Rt.rgb=function(e,t,n){var a=e._rgb,r=t._rgb;return new f(a[0]+n*(r[0]-a[0]),a[1]+n*(r[1]-a[1]),a[2]+n*(r[2]-a[2]),"rgb")};var Pt=Math.sqrt,Ht=Math.pow;Rt.lrgb=function(e,t,n){var a=e._rgb,r=a[0],i=a[1],o=a[2],s=t._rgb,l=s[0],d=s[1],c=s[2];return new f(Pt(Ht(r,2)*(1-n)+Ht(l,2)*n),Pt(Ht(i,2)*(1-n)+Ht(d,2)*n),Pt(Ht(o,2)*(1-n)+Ht(c,2)*n),"rgb")};Rt.lab=function(e,t,n){var a=e.lab(),r=t.lab();return new f(a[0]+n*(r[0]-a[0]),a[1]+n*(r[1]-a[1]),a[2]+n*(r[2]-a[2]),"lab")};var Gt=function(e,t,n,a){var r,i,o,s,l,d,c,u,h,p,m,g;return"hsl"===a?(o=e.hsl(),s=t.hsl()):"hsv"===a?(o=e.hsv(),s=t.hsv()):"hcg"===a?(o=e.hcg(),s=t.hcg()):"hsi"===a?(o=e.hsi(),s=t.hsi()):"lch"!==a&&"hcl"!==a||(a="hcl",o=e.hcl(),s=t.hcl()),"h"===a.substr(0,1)&&(l=(r=o)[0],c=r[1],h=r[2],d=(i=s)[0],u=i[1],p=i[2]),isNaN(l)||isNaN(d)?isNaN(l)?isNaN(d)?g=Number.NaN:(g=d,1!=h&&0!=h||"hsv"==a||(m=u)):(g=l,1!=p&&0!=p||"hsv"==a||(m=c)):g=l+n*(d>l&&d-l>180?d-(l+360):d<l&&l-d>180?d+360-l:d-l),void 0===m&&(m=c+n*(u-c)),new f([g,m,h+n*(p-h)],a)},Wt=function(e,t,n){return Gt(e,t,n,"lch")};Rt.lch=Wt,Rt.hcl=Wt;Rt.num=function(e,t,n){var a=e.num(),r=t.num();return new f(a+n*(r-a),"num")};Rt.hcg=function(e,t,n){return Gt(e,t,n,"hcg")};Rt.hsi=function(e,t,n){return Gt(e,t,n,"hsi")};Rt.hsl=function(e,t,n){return Gt(e,t,n,"hsl")};Rt.hsv=function(e,t,n){return Gt(e,t,n,"hsv")};var Ut=s.clip_rgb,zt=Math.pow,Yt=Math.sqrt,Zt=Math.PI,Kt=Math.cos,Qt=Math.sin,Jt=Math.atan2,Xt=function(e,t){for(var n=e.length,a=[0,0,0,0],r=0;r<e.length;r++){var i=e[r],o=t[r]/n,s=i._rgb;a[0]+=zt(s[0],2)*o,a[1]+=zt(s[1],2)*o,a[2]+=zt(s[2],2)*o,a[3]+=s[3]*o}return a[0]=Yt(a[0]),a[1]=Yt(a[1]),a[2]=Yt(a[2]),a[3]>.9999999&&(a[3]=1),new f(Ut(a))},en=s.type,tn=Math.pow,nn=function(e){var t="rgb",n=m("#ccc"),a=0,r=[0,1],i=[],o=[0,0],s=!1,l=[],d=!1,c=0,u=1,h=!1,f={},p=!0,g=1,y=function(e){if((e=e||["#fff","#000"])&&"string"===en(e)&&m.brewer&&m.brewer[e.toLowerCase()]&&(e=m.brewer[e.toLowerCase()]),"array"===en(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=m(e[t]);i.length=0;for(var n=0;n<e.length;n++)i.push(n/(e.length-1))}return D(),l=e},v=function(e){return e},b=function(e){return e},w=function(e,a){var r,d;if(null==a&&(a=!1),isNaN(e)||null===e)return n;d=a?e:s&&s.length>2?function(e){if(null!=s){for(var t=s.length-1,n=0;n<t&&e>=s[n];)n++;return n-1}return 0}(e)/(s.length-2):u!==c?(e-c)/(u-c):1,d=b(d),a||(d=v(d)),1!==g&&(d=tn(d,g)),d=o[0]+d*(1-o[0]-o[1]),d=Math.min(1,Math.max(0,d));var h=Math.floor(1e4*d);if(p&&f[h])r=f[h];else{if("array"===en(l))for(var y=0;y<i.length;y++){var w=i[y];if(d<=w){r=l[y];break}if(d>=w&&y===i.length-1){r=l[y];break}if(d>w&&d<i[y+1]){d=(d-w)/(i[y+1]-w),r=m.interpolate(l[y],l[y+1],d,t);break}}else"function"===en(l)&&(r=l(d));p&&(f[h]=r)}return r},D=function(){return f={}};y(e);var x=function(e){var t=m(w(e));return d&&t[d]?t[d]():t};return x.classes=function(e){if(null!=e){if("array"===en(e))s=e,r=[e[0],e[e.length-1]];else{var t=m.analyze(r);s=0===e?[t.min,t.max]:m.limits(t,"e",e)}return x}return s},x.domain=function(e){if(!arguments.length)return r;c=e[0],u=e[e.length-1],i=[];var t=l.length;if(e.length===t&&c!==u)for(var n=0,a=Array.from(e);n<a.length;n+=1){var o=a[n];i.push((o-c)/(u-c))}else{for(var s=0;s<t;s++)i.push(s/(t-1));if(e.length>2){var d=e.map((function(t,n){return n/(e.length-1)})),h=e.map((function(e){return(e-c)/(u-c)}));h.every((function(e,t){return d[t]===e}))||(b=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=h[t+1];)t++;var n=(e-h[t])/(h[t+1]-h[t]);return d[t]+n*(d[t+1]-d[t])})}}return r=[c,u],x},x.mode=function(e){return arguments.length?(t=e,D(),x):t},x.range=function(e,t){return y(e),x},x.out=function(e){return d=e,x},x.spread=function(e){return arguments.length?(a=e,x):a},x.correctLightness=function(e){return null==e&&(e=!0),h=e,D(),v=h?function(e){for(var t=w(0,!0).lab()[0],n=w(1,!0).lab()[0],a=t>n,r=w(e,!0).lab()[0],i=t+(n-t)*e,o=r-i,s=0,l=1,d=20;Math.abs(o)>.01&&d-- >0;)a&&(o*=-1),o<0?(s=e,e+=.5*(l-e)):(l=e,e+=.5*(s-e)),o=(r=w(e,!0).lab()[0])-i;return e}:function(e){return e},x},x.padding=function(e){return null!=e?("number"===en(e)&&(e=[e,e]),o=e,x):o},x.colors=function(t,n){arguments.length<2&&(n="hex");var a=[];if(0===arguments.length)a=l.slice(0);else if(1===t)a=[x(.5)];else if(t>1){var i=r[0],o=r[1]-i;a=an(0,t,!1).map((function(e){return x(i+e/(t-1)*o)}))}else{e=[];var d=[];if(s&&s.length>2)for(var c=1,u=s.length,h=1<=u;h?c<u:c>u;h?c++:c--)d.push(.5*(s[c-1]+s[c]));else d=r;a=d.map((function(e){return x(e)}))}return m[n]&&(a=a.map((function(e){return e[n]()}))),a},x.cache=function(e){return null!=e?(p=e,x):p},x.gamma=function(e){return null!=e?(g=e,x):g},x.nodata=function(e){return null!=e?(n=m(e),x):n},x};function an(e,t,n){for(var a=[],r=e<t,i=n?r?t+1:t-1:t,o=e;r?o<i:o>i;r?o++:o--)a.push(o);return a}var rn=function(e){var t,n,a,r,i,o,s;if(2===(e=e.map((function(e){return new f(e)}))).length)t=e.map((function(e){return e.lab()})),i=t[0],o=t[1],r=function(e){var t=[0,1,2].map((function(t){return i[t]+e*(o[t]-i[t])}));return new f(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),i=n[0],o=n[1],s=n[2],r=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*i[t]+2*(1-e)*e*o[t]+e*e*s[t]}));return new f(t,"lab")};else if(4===e.length){var l;a=e.map((function(e){return e.lab()})),i=a[0],o=a[1],s=a[2],l=a[3],r=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*i[t]+3*(1-e)*(1-e)*e*o[t]+3*(1-e)*e*e*s[t]+e*e*e*l[t]}));return new f(t,"lab")}}else if(5===e.length){var d=rn(e.slice(0,3)),c=rn(e.slice(2,5));r=function(e){return e<.5?d(2*e):c(2*(e-.5))}}return r},on=function(e,t,n){if(!on[n])throw new Error("unknown blend mode "+n);return on[n](e,t)},sn=function(e){return function(t,n){var a=m(n).rgb(),r=m(t).rgb();return m.rgb(e(a,r))}},ln=function(e){return function(t,n){var a=[];return a[0]=e(t[0],n[0]),a[1]=e(t[1],n[1]),a[2]=e(t[2],n[2]),a}};on.normal=sn(ln((function(e){return e}))),on.multiply=sn(ln((function(e,t){return e*t/255}))),on.screen=sn(ln((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),on.overlay=sn(ln((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),on.darken=sn(ln((function(e,t){return e>t?t:e}))),on.lighten=sn(ln((function(e,t){return e>t?e:t}))),on.dodge=sn(ln((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),on.burn=sn(ln((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var dn=on,cn=s.type,un=s.clip_rgb,hn=s.TWOPI,fn=Math.pow,pn=Math.sin,mn=Math.cos,gn=Math.floor,yn=Math.random,vn=Math.log,bn=Math.pow,wn=Math.floor,Dn=Math.abs,xn=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===i(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===i(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return kn(n,e,t)},n},kn=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==i(e)&&(e=xn(e));var a=e.min,r=e.max,o=e.values.sort((function(e,t){return e-t}));if(1===n)return[a,r];var s=[];if("c"===t.substr(0,1)&&(s.push(a),s.push(r)),"e"===t.substr(0,1)){s.push(a);for(var l=1;l<n;l++)s.push(a+l/n*(r-a));s.push(r)}else if("l"===t.substr(0,1)){if(a<=0)throw new Error("Logarithmic scales are only possible for values > 0");var d=Math.LOG10E*vn(a),c=Math.LOG10E*vn(r);s.push(a);for(var u=1;u<n;u++)s.push(bn(10,d+u/n*(c-d)));s.push(r)}else if("q"===t.substr(0,1)){s.push(a);for(var h=1;h<n;h++){var f=(o.length-1)*h/n,p=wn(f);if(p===f)s.push(o[p]);else{var m=f-p;s.push(o[p]*(1-m)+o[p+1]*m)}}s.push(r)}else if("k"===t.substr(0,1)){var g,y=o.length,v=new Array(y),b=new Array(n),w=!0,D=0,x=null;(x=[]).push(a);for(var k=1;k<n;k++)x.push(a+k/n*(r-a));for(x.push(r);w;){for(var E=0;E<n;E++)b[E]=0;for(var C=0;C<y;C++)for(var A=o[C],T=Number.MAX_VALUE,S=void 0,$=0;$<n;$++){var M=Dn(x[$]-A);M<T&&(T=M,S=$),b[S]++,v[C]=S}for(var q=new Array(n),I=0;I<n;I++)q[I]=null;for(var N=0;N<y;N++)null===q[g=v[N]]?q[g]=o[N]:q[g]+=o[N];for(var F=0;F<n;F++)q[F]*=1/b[F];w=!1;for(var O=0;O<n;O++)if(q[O]!==x[O]){w=!0;break}x=q,++D>200&&(w=!1)}for(var L={},B=0;B<n;B++)L[B]=[];for(var R=0;R<y;R++)L[g=v[R]].push(o[R]);for(var _=[],j=0;j<n;j++)_.push(L[j][0]),_.push(L[j][L[j].length-1]);_=_.sort((function(e,t){return e-t})),s.push(_[0]);for(var V=1;V<_.length;V+=2){var P=_[V];isNaN(P)||-1!==s.indexOf(P)||s.push(P)}}return s},En={analyze:xn,limits:kn},Cn=Math.sqrt,An=Math.atan2,Tn=Math.abs,Sn=Math.cos,$n=Math.PI,Mn={cool:function(){return nn([m.hsl(180,1,.9),m.hsl(250,.7,.4)])},hot:function(){return nn(["#000","#f00","#ff0","#fff"]).mode("rgb")}},qn={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"]},In=0,Nn=Object.keys(qn);In<Nn.length;In+=1){var Fn=Nn[In];qn[Fn.toLowerCase()]=qn[Fn]}var On=qn;return m.average=function(e,t,n){void 0===t&&(t="lrgb"),void 0===n&&(n=null);var a=e.length;n||(n=Array.from(new Array(a)).map((function(){return 1})));var r=a/n.reduce((function(e,t){return e+t}));if(n.forEach((function(e,t){n[t]*=r})),e=e.map((function(e){return new f(e)})),"lrgb"===t)return Xt(e,n);for(var i=e.shift(),o=i.get(t),s=[],l=0,d=0,c=0;c<o.length;c++)if(o[c]=(o[c]||0)*n[0],s.push(isNaN(o[c])?0:n[0]),"h"===t.charAt(c)&&!isNaN(o[c])){var u=o[c]/180*Zt;l+=Kt(u)*n[0],d+=Qt(u)*n[0]}var h=i.alpha()*n[0];e.forEach((function(e,a){var r=e.get(t);h+=e.alpha()*n[a+1];for(var i=0;i<o.length;i++)if(!isNaN(r[i]))if(s[i]+=n[a+1],"h"===t.charAt(i)){var c=r[i]/180*Zt;l+=Kt(c)*n[a+1],d+=Qt(c)*n[a+1]}else o[i]+=r[i]*n[a+1]}));for(var p=0;p<o.length;p++)if("h"===t.charAt(p)){for(var m=Jt(d/s[p],l/s[p])/Zt*180;m<0;)m+=360;for(;m>=360;)m-=360;o[p]=m}else o[p]=o[p]/s[p];return h/=a,new f(o,t).alpha(h>.99999?1:h,!0)},m.bezier=function(e){var t=rn(e);return t.scale=function(){return nn(t)},t},m.blend=dn,m.cubehelix=function(e,t,n,a,r){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===a&&(a=1),void 0===r&&(r=[0,1]);var i,o=0;"array"===cn(r)?i=r[1]-r[0]:(i=0,r=[r,r]);var s=function(s){var l=hn*((e+120)/360+t*s),d=fn(r[0]+i*s,a),c=(0!==o?n[0]+s*o:n)*d*(1-d)/2,u=mn(l),h=pn(l);return m(un([255*(d+c*(-.14861*u+1.78277*h)),255*(d+c*(-.29227*u-.90649*h)),255*(d+c*(1.97294*u)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?a:(a=e,s)},s.hue=function(e){return null==e?n:("array"===cn(n=e)?0==(o=n[1]-n[0])&&(n=n[1]):o=0,s)},s.lightness=function(e){return null==e?r:("array"===cn(e)?(r=e,i=e[1]-e[0]):(r=[e,e],i=0),s)},s.scale=function(){return m.scale(s)},s.hue(n),s},m.mix=m.interpolate=jt,m.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(gn(16*yn()));return new f(e,"hex")},m.scale=nn,m.analyze=En.analyze,m.contrast=function(e,t){e=new f(e),t=new f(t);var n=e.luminance(),a=t.luminance();return n>a?(n+.05)/(a+.05):(a+.05)/(n+.05)},m.deltaE=function(e,t,n,a){void 0===n&&(n=1),void 0===a&&(a=1),e=new f(e),t=new f(t);for(var r=Array.from(e.lab()),i=r[0],o=r[1],s=r[2],l=Array.from(t.lab()),d=l[0],c=l[1],u=l[2],h=Cn(o*o+s*s),p=Cn(c*c+u*u),m=i<16?.511:.040975*i/(1+.01765*i),g=.0638*h/(1+.0131*h)+.638,y=h<1e-6?0:180*An(s,o)/$n;y<0;)y+=360;for(;y>=360;)y-=360;var v=y>=164&&y<=345?.56+Tn(.2*Sn($n*(y+168)/180)):.36+Tn(.4*Sn($n*(y+35)/180)),b=h*h*h*h,w=Cn(b/(b+1900)),D=g*(w*v+1-w),x=h-p,k=o-c,E=s-u,C=(i-d)/(n*m),A=x/(a*g);return Cn(C*C+A*A+(k*k+E*E-x*x)/(D*D))},m.distance=function(e,t,n){void 0===n&&(n="lab"),e=new f(e),t=new f(t);var a=e.get(n),r=t.get(n),i=0;for(var o in a){var s=(a[o]||0)-(r[o]||0);i+=s*s}return Math.sqrt(i)},m.limits=En.limits,m.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(f,[null].concat(e))),!0}catch(e){return!1}},m.scales=Mn,m.colors=bt,m.brewer=On,m}()},512:(e,t,n)=>{"use strict";t.Z=void 0;var a=s(n(869)),r=s(n(899)),i=s(n(382)),o=s(n(792));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r,i=!0,o=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return i=e.done,e},e:function(e){o=!0,r=e},f:function(){try{i||null==a.return||a.return()}finally{if(o)throw r}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f={count:5,hueMin:0,hueMax:360,chromaMin:0,chromaMax:100,lightMin:0,lightMax:100,quality:50,samples:800},p=function(e,t){for(var n=Number.MAX_SAFE_INTEGER,a=0,r=0;r<e.length;r+=1){var i=e[r],o=Math.sqrt(Math.pow(Math.abs(i[0]-t[0]),2)+Math.pow(Math.abs(i[1]-t[1]),2)+Math.pow(Math.abs(i[2]-t[2]),2));o<n&&(n=o,a=r)}return a},m=function(e,t){var n=o.default.lab(e),a=n.hcl(),r=n.rgb(),i=o.default.rgb(r).lab();return a[0]>=t.hueMin&&a[0]<=t.hueMax&&a[1]>=t.chromaMin&&a[1]<=t.chromaMax&&a[2]>=t.lightMin&&a[2]<=t.lightMax&&i[0]>=e[0]-2&&i[0]<=e[0]+2&&i[1]>=e[1]-2&&i[1]<=e[1]+2&&i[2]>=e[2]-2&&i[2]<=e[2]+2},g=function(e){for(var t=e.slice(0),n=[t.shift()];t.length>0;){for(var a=n[n.length-1],r=0,i=Number.MIN_SAFE_INTEGER,o=0;o<t.length;o+=1){var s=Math.sqrt(Math.pow(Math.abs(a[0]-t[o][0]),2)+Math.pow(Math.abs(a[1]-t[o][1]),2)+Math.pow(Math.abs(a[2]-t[o][2]),2));s>i&&(i=s,r=o)}n.push(t.splice(r,1)[0])}return n};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u({},f,{},e);if(t.count<=0)return[];t.samples<3*t.count&&(t.samples=Math.ceil(3*t.count));var n=[],s=[],d=new Set,c=Math.ceil(Math.cbrt(t.samples)),h=(t.hueMax-t.hueMin)/c,y=(t.chromaMax-t.chromaMin)/c,v=(t.lightMax-t.lightMin)/c;if(h<=0)throw new Error("hueMax must be greater than hueMin!");if(y<=0)throw new Error("chromaMax must be greater than chromaMin!");if(v<=0)throw new Error("lightMax must be greater than lightMin!");for(var b=t.hueMin+h/2;b<=t.hueMax;b+=h)for(var w=t.chromaMin+y/2;w<=t.chromaMax;w+=y)for(var D=t.lightMin+v/2;D<=t.lightMax;D+=v){var x=o.default.hcl(b,w,D).lab();m(x,t)&&d.add(x.toString())}if(d=(d=Array.from(d)).map((function(e){return e.split(",").map((function(e){return parseFloat(e)}))})),d.length<t.count)throw new Error("Not enough samples to generate palette, increase sample count.");for(var k=Math.floor(d.length/t.count),E=0;E<d.length&&(n.push(d[E]),s.push([]),!(n.length>=t.count));E+=k);for(var C=1;C<=t.quality;C+=1){for(var A=(0,r.default)(s),T=(0,r.default)(d),S=0;S<n.length;S+=1){var $=p(T,n[S]);A[S].push(T[$]),T.splice($,1)}for(var M=0;M<T.length;M+=1){var q=d[M],I=p(n,q);A[I].push(d[M])}for(var N=(0,r.default)(n),F=0;F<A.length;F+=1){var O,L=A[F],B=L.length,R=[],_=[],j=[],V=l(L);try{for(V.s();!(O=V.n()).done;){var P=O.value;R.push(P[0]),_.push(P[1]),j.push(P[2])}}catch(e){V.e(e)}finally{V.f()}var H=a.default.sum(R)/B,G=a.default.sum(_)/B,W=a.default.sum(j)/B;n[F]=[H,G,W]}if((0,i.default)(N,n))break}return(n=g(n)).map((function(e){return o.default.lab(e)}))}},869:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={sum:function(e){return e.reduce((function(e,t){return e+t}))}}},346:function(e){var t;t=function(){"use strict";var e=Function.prototype.toString,t=Object.create,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,o=Object.getPrototypeOf,s=Object.prototype,l=s.hasOwnProperty,d=s.propertyIsEnumerable,c="function"==typeof i,u="function"==typeof WeakMap,h=function(n,a){if(!n.constructor)return t(null);var r=n.constructor,i=n.__proto__||o(n);if(r===a.Object)return i===a.Object.prototype?{}:t(i);if(~e.call(r).indexOf("[native code]"))try{return new r}catch(e){}return t(i)},f=function(e,t,n,a){var r=h(e,t);for(var o in a.set(e,r),e)l.call(e,o)&&(r[o]=n(e[o],a));if(c){var s=i(e),u=s.length;if(u)for(var f=0,p=void 0;f<u;f++)p=s[f],d.call(e,p)&&(r[p]=n(e[p],a))}return r},p=function(e,t,o,s){var l=h(e,t);s.set(e,l);var d=c?r(e).concat(i(e)):r(e),u=d.length;if(u)for(var f=0,p=void 0,m=void 0;f<u;f++)if("callee"!==(p=d[f])&&"caller"!==p)if(m=a(e,p)){m.get||m.set||(m.value=o(e[p],s));try{n(l,p,m)}catch(e){l[p]=m.value}}else l[p]=o(e[p],s);return l},m=Array.isArray,g="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(console&&console.error&&console.error('Unable to locate global object, returning "this".'));function y(e,n){var a=!(!n||!n.isStrict),r=n&&n.realm||g,i=a?p:f,o=function(e,t){if(!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);var n,s,l,d=e.constructor;if(d===r.Object)return i(e,r,o,t);if(m(e)){if(a)return p(e,r,o,t);var c=e.length;n=new d,t.set(e,n);for(var u=0;u<c;u++)n[u]=o(e[u],t);return n}if(e instanceof r.Date)return new d(e.getTime());if(e instanceof r.RegExp)return(n=new d(e.source,e.flags||(l="",(s=e).global&&(l+="g"),s.ignoreCase&&(l+="i"),s.multiline&&(l+="m"),s.unicode&&(l+="u"),s.sticky&&(l+="y"),l))).lastIndex=e.lastIndex,n;if(r.Map&&e instanceof r.Map)return n=new d,t.set(e,n),e.forEach((function(e,a){n.set(a,o(e,t))})),n;if(r.Set&&e instanceof r.Set)return n=new d,t.set(e,n),e.forEach((function(e){n.add(o(e,t))})),n;if(r.Blob&&e instanceof r.Blob)return e.slice(0,e.size,e.type);if(r.Buffer&&r.Buffer.isBuffer(e))return n=r.Buffer.allocUnsafe?r.Buffer.allocUnsafe(e.length):new d(e.length),t.set(e,n),e.copy(n),n;if(r.ArrayBuffer){if(r.ArrayBuffer.isView(e))return n=new d(e.buffer.slice(0)),t.set(e,n),n;if(e instanceof r.ArrayBuffer)return n=e.slice(0),t.set(e,n),n}return"function"==typeof e.then||e instanceof Error||r.WeakMap&&e instanceof r.WeakMap||r.WeakSet&&e instanceof r.WeakSet?e:i(e,r,o,t)};return o(e,function(){if(u)return new WeakMap;var e=t({has:function(t){return!!~e._keys.indexOf(t)},set:function(t,n){e._keys.push(t),e._values.push(n)},get:function(t){return e._values[e._keys.indexOf(t)]}});return e._keys=[],e._values=[],e}())}return y.default=y,y.strict=function(e,t){return y(e,{isStrict:!0,realm:t?t.realm:void 0})},y},e.exports=t()},492:function(e,t,n){var a;e=n.nmd(e),function(r){var i=(e&&e.exports,"object"==typeof global&&global);i.global!==i&&i.window;var o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,l=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,d=/<\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,c={"­":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine","":"puncsp","":"MediumSpace","":"thinsp","":"hairsp","":"emsp13","":"ensp","":"emsp14","":"emsp","":"numsp"," ":"nbsp","":"ThickSpace","‾":"oline",_:"lowbar","":"dash","":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","":"lsquo","":"rsquo","":"sbquo","":"lsaquo","":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","":"lbbrk","":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","":"hybull","":"prime","″":"Prime","‴":"tprime","⁗":"qprime","":"bprime","":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon",ˆ:"circ",ˇ:"caron","°":"deg","©":"copy","®":"reg","℗":"copysr",:"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","":"minus","∓":"mp","∔":"plusdo","":"frasl","":"setmn","":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","":"or","∩":"cap","∩︀":"caps","":"cup","":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","":"Vee","⋂":"xcap","":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78",𝒶:"ascr",𝕒:"aopf",𝔞:"afr",𝔸:"Aopf",𝔄:"Afr",𝒜:"Ascr",ª:"ordf",á:"aacute",Á:"Aacute",à:"agrave",À:"Agrave",ă:"abreve",Ă:"Abreve",â:"acirc",Â:"Acirc",å:"aring",Å:"angst",ä:"auml",Ä:"Auml",ã:"atilde",Ã:"Atilde",ą:"aogon",Ą:"Aogon",ā:"amacr",Ā:"Amacr",æ:"aelig",Æ:"AElig",𝒷:"bscr",𝕓:"bopf",𝔟:"bfr",𝔹:"Bopf",:"Bscr",𝔅:"Bfr",𝔠:"cfr",𝒸:"cscr",𝕔:"copf",:"Cfr",𝒞:"Cscr",:"Copf",ć:"cacute",Ć:"Cacute",ĉ:"ccirc",Ĉ:"Ccirc",č:"ccaron",Č:"Ccaron",ċ:"cdot",Ċ:"Cdot",ç:"ccedil",Ç:"Ccedil","℅":"incare",𝔡:"dfr",:"dd",𝕕:"dopf",𝒹:"dscr",𝒟:"Dscr",𝔇:"Dfr",:"DD",𝔻:"Dopf",ď:"dcaron",Ď:"Dcaron",đ:"dstrok",Đ:"Dstrok",ð:"eth",Ð:"ETH",:"ee",:"escr",𝔢:"efr",𝕖:"eopf",:"Escr",𝔈:"Efr",𝔼:"Eopf",é:"eacute",É:"Eacute",è:"egrave",È:"Egrave",ê:"ecirc",Ê:"Ecirc",ě:"ecaron",Ě:"Ecaron",ë:"euml",Ë:"Euml",ė:"edot",Ė:"Edot",ę:"eogon",Ę:"Eogon",ē:"emacr",Ē:"Emacr",𝔣:"ffr",𝕗:"fopf",𝒻:"fscr",𝔉:"Ffr",𝔽:"Fopf",:"Fscr",:"fflig",:"ffilig",:"ffllig",:"filig",fj:"fjlig",:"fllig",ƒ:"fnof",:"gscr",𝕘:"gopf",𝔤:"gfr",𝒢:"Gscr",𝔾:"Gopf",𝔊:"Gfr",ǵ:"gacute",ğ:"gbreve",Ğ:"Gbreve",ĝ:"gcirc",Ĝ:"Gcirc",ġ:"gdot",Ġ:"Gdot",Ģ:"Gcedil",𝔥:"hfr",:"planckh",𝒽:"hscr",𝕙:"hopf",:"Hscr",:"Hfr",:"Hopf",ĥ:"hcirc",Ĥ:"Hcirc",:"hbar",ħ:"hstrok",Ħ:"Hstrok",𝕚:"iopf",𝔦:"ifr",𝒾:"iscr",:"ii",𝕀:"Iopf",:"Iscr",:"Im",í:"iacute",Í:"Iacute",ì:"igrave",Ì:"Igrave",î:"icirc",Î:"Icirc",ï:"iuml",Ï:"Iuml",ĩ:"itilde",Ĩ:"Itilde",İ:"Idot",į:"iogon",Į:"Iogon",ī:"imacr",Ī:"Imacr",ij:"ijlig",IJ:"IJlig",ı:"imath",𝒿:"jscr",𝕛:"jopf",𝔧:"jfr",𝒥:"Jscr",𝔍:"Jfr",𝕁:"Jopf",ĵ:"jcirc",Ĵ:"Jcirc",ȷ:"jmath",𝕜:"kopf",𝓀:"kscr",𝔨:"kfr",𝒦:"Kscr",𝕂:"Kopf",𝔎:"Kfr",ķ:"kcedil",Ķ:"Kcedil",𝔩:"lfr",𝓁:"lscr",:"ell",𝕝:"lopf",:"Lscr",𝔏:"Lfr",𝕃:"Lopf",ĺ:"lacute",Ĺ:"Lacute",ľ:"lcaron",Ľ:"Lcaron",ļ:"lcedil",Ļ:"Lcedil",ł:"lstrok",Ł:"Lstrok",ŀ:"lmidot",Ŀ:"Lmidot",𝔪:"mfr",𝕞:"mopf",𝓂:"mscr",𝔐:"Mfr",𝕄:"Mopf",:"Mscr",𝔫:"nfr",𝕟:"nopf",𝓃:"nscr",:"Nopf",𝒩:"Nscr",𝔑:"Nfr",ń:"nacute",Ń:"Nacute",ň:"ncaron",Ň:"Ncaron",ñ:"ntilde",Ñ:"Ntilde",ņ:"ncedil",Ņ:"Ncedil","№":"numero",ŋ:"eng",Ŋ:"ENG",𝕠:"oopf",𝔬:"ofr",:"oscr",𝒪:"Oscr",𝔒:"Ofr",𝕆:"Oopf",º:"ordm",ó:"oacute",Ó:"Oacute",ò:"ograve",Ò:"Ograve",ô:"ocirc",Ô:"Ocirc",ö:"ouml",Ö:"Ouml",ő:"odblac",Ő:"Odblac",õ:"otilde",Õ:"Otilde",ø:"oslash",Ø:"Oslash",ō:"omacr",Ō:"Omacr",œ:"oelig",Œ:"OElig",𝔭:"pfr",𝓅:"pscr",𝕡:"popf",:"Popf",𝔓:"Pfr",𝒫:"Pscr",𝕢:"qopf",𝔮:"qfr",𝓆:"qscr",𝒬:"Qscr",𝔔:"Qfr",:"Qopf",ĸ:"kgreen",𝔯:"rfr",𝕣:"ropf",𝓇:"rscr",:"Rscr",:"Re",:"Ropf",ŕ:"racute",Ŕ:"Racute",ř:"rcaron",Ř:"Rcaron",ŗ:"rcedil",Ŗ:"Rcedil",𝕤:"sopf",𝓈:"sscr",𝔰:"sfr",𝕊:"Sopf",𝔖:"Sfr",𝒮:"Sscr","Ⓢ":"oS",ś:"sacute",Ś:"Sacute",ŝ:"scirc",Ŝ:"Scirc",š:"scaron",Š:"Scaron",ş:"scedil",Ş:"Scedil",ß:"szlig",𝔱:"tfr",𝓉:"tscr",𝕥:"topf",𝒯:"Tscr",𝔗:"Tfr",𝕋:"Topf",ť:"tcaron",Ť:"Tcaron",ţ:"tcedil",Ţ:"Tcedil","™":"trade",ŧ:"tstrok",Ŧ:"Tstrok",𝓊:"uscr",𝕦:"uopf",𝔲:"ufr",𝕌:"Uopf",𝔘:"Ufr",𝒰:"Uscr",ú:"uacute",Ú:"Uacute",ù:"ugrave",Ù:"Ugrave",ŭ:"ubreve",Ŭ:"Ubreve",û:"ucirc",Û:"Ucirc",ů:"uring",Ů:"Uring",ü:"uuml",Ü:"Uuml",ű:"udblac",Ű:"Udblac",ũ:"utilde",Ũ:"Utilde",ų:"uogon",Ų:"Uogon",ū:"umacr",Ū:"Umacr",𝔳:"vfr",𝕧:"vopf",𝓋:"vscr",𝔙:"Vfr",𝕍:"Vopf",𝒱:"Vscr",𝕨:"wopf",𝓌:"wscr",𝔴:"wfr",𝒲:"Wscr",𝕎:"Wopf",𝔚:"Wfr",ŵ:"wcirc",Ŵ:"Wcirc",𝔵:"xfr",𝓍:"xscr",𝕩:"xopf",𝕏:"Xopf",𝔛:"Xfr",𝒳:"Xscr",𝔶:"yfr",𝓎:"yscr",𝕪:"yopf",𝒴:"Yscr",𝔜:"Yfr",𝕐:"Yopf",ý:"yacute",Ý:"Yacute",ŷ:"ycirc",Ŷ:"Ycirc",ÿ:"yuml",Ÿ:"Yuml",𝓏:"zscr",𝔷:"zfr",𝕫:"zopf",:"Zfr",:"Zopf",𝒵:"Zscr",ź:"zacute",Ź:"Zacute",ž:"zcaron",Ž:"Zcaron",ż:"zdot",Ż:"Zdot",Ƶ:"imped",þ:"thorn",Þ:"THORN",ʼn:"napos",α:"alpha",Α:"Alpha",β:"beta",Β:"Beta",γ:"gamma",Γ:"Gamma",δ:"delta",Δ:"Delta",ε:"epsi",ϵ:"epsiv",Ε:"Epsilon",ϝ:"gammad",Ϝ:"Gammad",ζ:"zeta",Ζ:"Zeta",η:"eta",Η:"Eta",θ:"theta",ϑ:"thetav",Θ:"Theta",ι:"iota",Ι:"Iota",κ:"kappa",ϰ:"kappav",Κ:"Kappa",λ:"lambda",Λ:"Lambda",μ:"mu",µ:"micro",Μ:"Mu",ν:"nu",Ν:"Nu",ξ:"xi",Ξ:"Xi",ο:"omicron",Ο:"Omicron",π:"pi",ϖ:"piv",Π:"Pi",ρ:"rho",ϱ:"rhov",Ρ:"Rho",σ:"sigma",Σ:"Sigma",ς:"sigmaf",τ:"tau",Τ:"Tau",υ:"upsi",Υ:"Upsilon",ϒ:"Upsi",φ:"phi",ϕ:"phiv",Φ:"Phi",χ:"chi",Χ:"Chi",ψ:"psi",Ψ:"Psi",ω:"omega",Ω:"ohm",а:"acy",А:"Acy",б:"bcy",Б:"Bcy",в:"vcy",В:"Vcy",г:"gcy",Г:"Gcy",ѓ:"gjcy",Ѓ:"GJcy",д:"dcy",Д:"Dcy",ђ:"djcy",Ђ:"DJcy",е:"iecy",Е:"IEcy",ё:"iocy",Ё:"IOcy",є:"jukcy",Є:"Jukcy",ж:"zhcy",Ж:"ZHcy",з:"zcy",З:"Zcy",ѕ:"dscy",Ѕ:"DScy",и:"icy",И:"Icy",і:"iukcy",І:"Iukcy",ї:"yicy",Ї:"YIcy",й:"jcy",Й:"Jcy",ј:"jsercy",Ј:"Jsercy",к:"kcy",К:"Kcy",ќ:"kjcy",Ќ:"KJcy",л:"lcy",Л:"Lcy",љ:"ljcy",Љ:"LJcy",м:"mcy",М:"Mcy",н:"ncy",Н:"Ncy",њ:"njcy",Њ:"NJcy",о:"ocy",О:"Ocy",п:"pcy",П:"Pcy",р:"rcy",Р:"Rcy",с:"scy",С:"Scy",т:"tcy",Т:"Tcy",ћ:"tshcy",Ћ:"TSHcy",у:"ucy",У:"Ucy",ў:"ubrcy",Ў:"Ubrcy",ф:"fcy",Ф:"Fcy",х:"khcy",Х:"KHcy",ц:"tscy",Ц:"TScy",ч:"chcy",Ч:"CHcy",џ:"dzcy",Џ:"DZcy",ш:"shcy",Ш:"SHcy",щ:"shchcy",Щ:"SHCHcy",ъ:"hardcy",Ъ:"HARDcy",ы:"ycy",Ы:"Ycy",ь:"softcy",Ь:"SOFTcy",э:"ecy",Э:"Ecy",ю:"yucy",Ю:"YUcy",я:"yacy",Я:"YAcy",:"aleph",:"beth",:"gimel",:"daleth"},u=/["&'<>`]/g,h={'"':"&quot;","&":"&amp;","'":"&#x27;","<":"&lt;",">":"&gt;","`":"&#x60;"},f=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,p=/[\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]/,m=/&(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,g={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"",DD:"",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:"",emsp13:"",emsp14:"",eng:"ŋ",ENG:"Ŋ",ensp:"",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"",Escr:"",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"",exponentiale:"",ExponentialE:"",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"",frown:"⌢",fscr:"𝒻",Fscr:"",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:"",half:"½",hamilt:"",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"",HilbertSpace:"",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"",hyphen:"",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"",igrave:"ì",Igrave:"Ì",ii:"",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"",imacr:"ī",Imacr:"Ī",image:"",ImaginaryI:"",imagline:"",imagpart:"",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"",lscr:"𝓁",Lscr:"",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"",lsquor:"",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"",Mellintrf:"",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"",midast:"*",midcir:"⫰",middot:"·",minus:"",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:"",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"",operp:"⦹",oplus:"⊕",or:"",Or:"⩔",orarr:"↻",ord:"⩝",order:"",orderof:"",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"",pointint:"⨕",popf:"𝕡",Popf:"",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"",Prime:"″",primes:"",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:"",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"",rationals:"",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"",real:"",realine:"",realpart:"",reals:"",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"",rscr:"𝓇",Rscr:"",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"",rsquor:"",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"",setmn:"",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"",smashp:"⨳",smeparsl:"⧤",smid:"",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"",ThickSpace:"",thinsp:"",ThinSpace:"",thkap:"≈",thksim:"",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"",Vee:"",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:"",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},y={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},v={0:"<22>",128:"€",130:"",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"",140:"Œ",142:"Ž",145:"",146:"",147:"“",148:"”",149:"•",150:"",151:"—",152:"˜",153:"™",154:"š",155:"",156:"œ",158:"ž",159:"Ÿ"},b=[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],w=String.fromCharCode,D={}.hasOwnProperty,x=function(e,t){return D.call(e,t)},k=function(e,t){if(!e)return t;var n,a={};for(n in t)a[n]=x(e,n)?e[n]:t[n];return a},E=function(e,t){var n="";return e>=55296&&e<=57343||e>1114111?(t&&T("character reference outside the permissible Unicode range"),"<22>"):x(v,e)?(t&&T("disallowed character reference"),v[e]):(t&&function(e,t){for(var n=-1,a=e.length;++n<a;)if(e[n]==t)return!0;return!1}(b,e)&&T("disallowed character reference"),e>65535&&(n+=w((e-=65536)>>>10&1023|55296),e=56320|1023&e),n+=w(e))},C=function(e){return"&#x"+e.toString(16).toUpperCase()+";"},A=function(e){return"&#"+e+";"},T=function(e){throw Error("Parse error: "+e)},S=function(e,t){(t=k(t,S.options)).strict&&p.test(e)&&T("forbidden code point");var n=t.encodeEverything,a=t.useNamedReferences,r=t.allowUnsafeSymbols,i=t.decimal?A:C,h=function(e){return i(e.charCodeAt(0))};return n?(e=e.replace(s,(function(e){return a&&x(c,e)?"&"+c[e]+";":h(e)})),a&&(e=e.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;").replace(/&#x66;&#x6A;/g,"&fjlig;")),a&&(e=e.replace(d,(function(e){return"&"+c[e]+";"})))):a?(r||(e=e.replace(u,(function(e){return"&"+c[e]+";"}))),e=(e=e.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;")).replace(d,(function(e){return"&"+c[e]+";"}))):r||(e=e.replace(u,h)),e.replace(o,(function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return i(1024*(t-55296)+n-56320+65536)})).replace(l,h)};S.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var $=function(e,t){var n=(t=k(t,$.options)).strict;return n&&f.test(e)&&T("malformed character reference"),e.replace(m,(function(e,a,r,i,o,s,l,d,c){var u,h,f,p,m,v;return a?g[m=a]:r?(m=r,(v=i)&&t.isAttributeValue?(n&&"="==v&&T("`&` did not start a character reference"),e):(n&&T("named character reference was not terminated by a semicolon"),y[m]+(v||""))):o?(f=o,h=s,n&&!h&&T("character reference was not terminated by a semicolon"),u=parseInt(f,10),E(u,n)):l?(p=l,h=d,n&&!h&&T("character reference was not terminated by a semicolon"),u=parseInt(p,16),E(u,n)):(n&&T("named character reference was not terminated by a semicolon"),e)}))};$.options={isAttributeValue:!1,strict:!1};var M={version:"1.2.0",encode:S,decode:$,escape:function(e){return e.replace(u,(function(e){return h[e]}))},unescape:$};void 0===(a=function(){return M}.call(t,n,t,e))||(e.exports=a)}()},349:(e,t,n)=>{var a=n(536),r=n(775),i=n(310);e.exports=function(e,t,n){return n=n||a,r(e)&&r(t)?e.length===t.length&&i(e,function(e){return function(t,n){return n in this&&e(t,this[n])}}(n),t):n(e,t)}},310:(e,t,n)=>{var a=n(891);e.exports=function(e,t,n){t=a(t,n);var r=!0;if(null==e)return r;for(var i=-1,o=e.length;++i<o;)if(!t(e[i],i,e)){r=!1;break}return r}},761:e=>{e.exports=function(e){return e}},891:(e,t,n)=>{var a=n(761),r=n(437),i=n(614);e.exports=function(e,t){if(null==e)return a;switch(typeof e){case"function":return void 0!==t?function(n,a,r){return e.call(t,n,a,r)}:e;case"object":return function(t){return i(t,e)};case"string":case"number":return r(e)}}},437:e=>{e.exports=function(e){return function(t){return t[e]}}},769:(e,t,n)=>{var a=n(224),r=n(274),i=n(29);e.exports=function(e){switch(a(e)){case"Object":return r(o=e)?i({},o):o;case"Array":return e.slice();case"RegExp":return n="",n+=(t=e).multiline?"m":"",n+=t.global?"g":"",n+=t.ignoreCase?"i":"",new RegExp(t.source,n);case"Date":return new Date(+e);default:return e}var t,n,o}},899:(e,t,n)=>{var a=n(769),r=n(463),i=n(224),o=n(274);e.exports=function e(t,n){switch(i(t)){case"Object":return function(t,n){if(o(t)){var a={};return r(t,(function(t,a){this[a]=e(t,n)}),a),a}return n?n(t):t}(t,n);case"Array":return function(t,n){for(var a=[],r=-1,i=t.length;++r<i;)a[r]=e(t[r],n);return a}(t,n);default:return a(t)}}},382:(e,t,n)=>{var a=n(536),r=n(7),i=n(775),o=n(661),s=n(349);e.exports=function e(t,n,l){l=l||a;var d=r(t)&&r(n),c=!d&&i(t)&&i(n);return d||c?(d?o:s)(t,n,(function(t,n){return e(t,n,l)})):l(t,n)}},536:e=>{e.exports=function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},775:(e,t,n)=>{var a=n(813),r=Array.isArray||function(e){return a(e,"Array")};e.exports=r},813:(e,t,n)=>{var a=n(224);e.exports=function(e,t){return a(e)===t}},7:(e,t,n)=>{var a=n(813);e.exports=function(e){return a(e,"Object")}},274:e=>{e.exports=function(e){return!!e&&"object"==typeof e&&e.constructor===Object}},224:e=>{e.exports=function(e){return Object.prototype.toString.call(e).slice(8,-1)}},614:(e,t,n)=>{var a=n(463),r=n(775);function i(e,t){for(var n=-1,a=e.length;++n<a;)if(o(e[n],t))return!0;return!1}function o(e,t){return e&&"object"==typeof e&&t&&"object"==typeof t?r(e)&&r(t)?function(e,t){for(var n=-1,a=t.length;++n<a;)if(!i(e,t[n]))return!1;return!0}(e,t):function(e,t){var n=!0;return a(t,(function(t,a){if(!o(e[a],t))return n=!1})),n}(e,t):e===t}e.exports=o},661:(e,t,n)=>{var a=n(683),r=n(808),i=n(7),o=n(536);function s(e,t){return a(this,t)}e.exports=function(e,t,n){return n=n||o,i(e)&&i(t)?r(e,function(e){return function(t,n){return a(this,n)&&e(t,this[n])}}(n),t)&&r(t,s,e):n(e,t)}},808:(e,t,n)=>{var a=n(463),r=n(891);e.exports=function(e,t,n){t=r(t,n);var i=!0;return a(e,(function(n,a){if(!t(n,a,e))return i=!1,!1})),i}},473:(e,t,n)=>{var a,r,i=n(683);function o(e,t,n,a){return e.call(a,t[n],n,t)}e.exports=function(e,t,n){var s,l=0;for(s in null==a&&function(){for(var e in r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=!0,{toString:null})a=!1}(),e)if(!1===o(t,e,s,n))break;if(a)for(var d=e.constructor,c=!!d&&e===d.prototype;(s=r[l++])&&("constructor"===s&&(c||!i(e,s))||e[s]===Object.prototype[s]||!1!==o(t,e,s,n)););}},463:(e,t,n)=>{var a=n(683),r=n(473);e.exports=function(e,t,n){r(e,(function(r,i){if(a(e,i))return t.call(n,e[i],i,e)}))}},683:e=>{e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},29:(e,t,n)=>{var a=n(463);function r(e,t){this[t]=e}e.exports=function(e,t){for(var n,i=0,o=arguments.length;++i<o;)null!=(n=arguments[i])&&a(n,r,e);return e}},477:e=>{"use strict";e.exports=function(e,t,n,a){var r=self||window;try{try{var i;try{i=new r.Blob([e])}catch(t){(i=new(r.BlobBuilder||r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder)).append(e),i=i.getBlob()}var o=r.URL||r.webkitURL,s=o.createObjectURL(i),l=new r[t](s,n);return o.revokeObjectURL(s),l}catch(a){return new r[t]("data:application/javascript,".concat(encodeURIComponent(e)),n)}}catch(e){if(!a)throw Error("Inline worker is not supported");return new r[t](a,n)}}}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var i=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var a={};(()=>{"use strict";function e(e,t,n,a){return new(n||(n=Promise))((function(r,i){function o(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((a=a.apply(e,t||[])).next())}))}n.r(a),n.d(a,{DEFAULT_CALENDAR:()=>ol,DEFAULT_DATA:()=>sl,MODIFIER_KEY:()=>il,default:()=>ll}),Object.create,Object.create;const t=require("obsidian");var r=n(346),i=n.n(r),o=n(512);function s(e,t){const n=window.moment(e),a=window.moment(t);let 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 l(e,t){return(e%t+t)%t}function d(e){return"ID_xyxyxyxyxyxy".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}function c(e){var t;if(!(null===(t=e.interval)||void 0===t?void 0:t.length))return"";const n=e.interval.sort(((e,t)=>e.interval-t.interval));let a=[];for(let t of n){const r=t.interval+(t.ignore?0:e.offset);if(t.exclusive)a.push(`not every ${u(r)} year`);else{const e=n.indexOf(t),i=e>0&&n[e-1].exclusive;a.push(`${i?"also ":""}every ${u(r)} year`)}}const r=a.join(", but ");return r[0].toUpperCase()+r.slice(1).toLowerCase()}function u(e){const t=e%10,n=e%100;return 1==t&&11!=n?e+"st":2==t&&12!=n?e+"nd":3==t&&13!=n?e+"rd":e+"th"}function h(e,t,n){if(!e||null==e.day)return"";const{day:a,month:r,year:i}=e;if(null!=r&&!t[r])return"Invalid Date";if(n&&n.day){const e=n.day,o=n.month,s=n.year;if(null!=o&&null!=s&&null!=r&&null!=i)return i!=s?`${t[r].name} ${u(a)}, ${i} - ${t[o].name} ${u(e)}, ${s}`:o==r?`${t[r].name} ${u(a)}-${u(e)}, ${i}`:null!=r&&null!=i?`${t[r].name} ${u(a)}-${t[o].name} ${u(e)}, ${i}`:null!=r?`${t[r].name} ${u(a)}-${t[o].name} ${u(e)} of every year`:`${u(a)}-${u(e)} of every month`}return null!=r&&null!=i?`${t[r].name} ${u(a)}, ${i}`:null!=r?`${t[r].name} ${u(a)} of every year`:`${u(a)} of every month`}var f=n(492);const p={"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"},m=[{name:"Gregorian Calendar",description:"A calendar for the real world. Note: May not be 100% accurate.",static:{displayDayNumber:!1,incrementDay:!0,displayMoons:!0,firstWeekDay:6,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",description:"",format:"Year {{abs_year}} - {{era_name}}",start:{year:-1,month:0,day:31}},{name:"Anno Domini",description:"",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1}}],offset:2},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.",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",description:"",format:"Year {{year}} CY",start:{year:1,month:0,day: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.\n\nAlso 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:"\tAt 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.\n\nIt 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.\n\nThe 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.\n\nMost 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.\n\nIggwilv 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.\n\nThis 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.\n\nDemonic forces sent by Iuz destroyed the leadership of the Horned Society during the Blood Moon Festival of 583 CY.\n\nIt'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.\n\nThis 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.\n\nThe 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.\n\nThe 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.\n\nThe 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.\n\nEdoira 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.\n\nThis 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.\n\nBecause 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.\n\nPublic 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.\n\nPriests 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.\n\nSome 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.",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",description:"",format:"Year {{year}} - {{era_name}}",start:{year:4720,month:8,day:15}},{name:"Age of Darkness",description:"",format:"Year {{abs_year}} - {{era_name}}",start:{year:-5300,month:0,day:1}},{name:"Age of Anguish",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-4500,month:8,day:1}},{name:"Age of Destiny",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-3500,month:8,day:1}},{name:"Age of Enthronement",description:"",format:"Year {{year}} AR - {{era_name}}",start:{year:1,month:8,day:1}},{name:"Age of Lost Omens",description:"",format:"Year {{year}} AR - {{era_name}}",start:{year:4606,month:8,day: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\n\nCulminating 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\n\nFoundation 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\n\nPjallarane 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\n\nVault 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\n\nThe 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\n\nA 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.\n\nIn 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\n\nKing 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\n\nLoyalty 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\n\nFollowers 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\n\nThe 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\n\nPriests 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\n\nSable 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\n\nThe 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\n\nKaliashahrim 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\n\nEvery year, on the 26th of Pharast, Elder Architect Oblosk — oldest member of Nex's Council of Three and Nine — 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.\n\nOn 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—which 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\n\nThe 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.\n\nIn 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.\n\nThe 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\n\nFirstbloom 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\n\nThe 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\n\nOn 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\n\nNo 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.\n\nThe Business of the Day\n\nFrom 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.\n\nThe Celebrations of the Day\n\nAt 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.\n\nThe 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.\n\nFor 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—or in some regions, pinch—a cleric of Abadar, leading to many a rosy-cheeked cleric.\n\nEven 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.\n\nFor 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\n\nThis 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\n\nOne 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\n\nA 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\n\nAngel 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\n\nShizuru\n\nCelebrates the longest day.\n\nFounder's FollyUlar Kel\n\nAdventurers and children follow a hallucinatory red stripe along zigzagging paths, amusing residents.\n\nHarvest Bounty Festival\n\nSegada\n\nMarking the beginning of the harvest season, this festival involves sporting tournaments, dancing, storytelling, and feasts. Celebrants give thanks and eliminate grudges.\n\nLongwalk\n\nGrandmother Spider, Nurvatchta; southern hemisphere winter solstice\n\nCelebrates the escape of Nurvatchta's anadi people from bondage, in part thanks to Grandmother Spider lengthening their cover of darkness in their escape.\n\nRitual of Stardust\n\nDesna\n\nFestival held in the evening and through the night, where Desna's faithful sing songs and throw sand and powdered gems into bonfires.\n\nRunefeast\n\nMagrim\n\nDay marking the day dwarves learnt the first runes and the proper way to pray.\n\nSunwrought FestivalSarenrae, Brigh\n\nDay 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\n\nThe 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\n\nHoliday 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\n\nThe 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\n\nAn 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\n\nInheritor'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\n\nHoliday 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\n\nThe 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\n\nFestival 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\n\nThe raucous, week-long festival known as Armasse is held each year beginning on 16 Arodus. The celebration — once dedicated to the god Aroden — 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\n\nQuiet 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\n\nArcher'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.\n\nWhile 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.\n\nWhile 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\n\nFounding 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\n\nItems 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\n\nThe 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\n\nNidal\n\nCelebrated throughout Nidal, this holiday involves the burning of effigies and self-flagellation.\n\nSwallowtail Festival\n\nDesna\n\nHoliday celebrated with storytelling, feasting, and the release of butterflies.\n\nWaning Light Festival\n\nSegada\n\nAlso 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\n\nSigning 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.\n\nOriginally, 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.\n\nAs 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\n\nCrabfest 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\n\nThis "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\n\nOnce 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\n\nAdmani 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\n\nAscendance 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.\n\nCelebration\n\nThe day is a joyous celebration for the faithful, with singing, pledging of friendships, and forgiving of old grudges.\n\nTo 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.\n\nThe celebration takes place in several stages. Early in the day, troupes of performers—as often passionate amateurs as professionals—stage 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.\n\nAs 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—representing the Inheritor at peace—styled 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.\n\nThe 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\n\nBastion 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\n\nJestercap 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).\n\nHistory\n\nWhile 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.\n\nOver 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.\n\nIn Religion\n\nFollowers of Chaldira Zuzaristan, a halfling deity of mischief, treat Jestercap as a holy day and their pranks — often elaborate and extravagant in nature and plotted for months in advance — 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\n\nA 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\n\nThe 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\n\nMarks the beginning of the Red Revolution.",id:"824549",note:null,date:{day:5,year:null,month:10},category:null},{name:"Seven Veils",description:"Sivanah\n\nThe 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 — 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.\n\nHistorians note that the original \"Dance of the Seven Veils\" has a much different genesis than one promoting diversity — 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\n\nAbjurant 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\n\nGreat 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\n\nObserved on 14 of Neth, Even-Tongued Day was once a day of joy and celebration in Cheliax, but has become instead one of mourning.\n\nOriginally, 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).\n\nCitizens 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\n\nA 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.\n\nIn 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.\n\nIt 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.\n\nThough 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\n\nIn 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\n\nTransmutatum 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\n\nCommemorating 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\n\nKorvosa'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—even those domesticated—to 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\n\nMuch 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\n\nHoliday 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\n\nCultists 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—a holiday that traditionally takes place on the last day of the year, the 31st of Kuthona—has 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.\n\nOn 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.\n\nThe 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.\n\nThe morning after a Night of the Pale is also the first day of the new year—a 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\n\nThe 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\n\nThe 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.\n\nFollowers 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\n\nThis 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\n\nDay 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\n\nCelebration 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\n\nA 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\n\nYearly 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\n\nSilverglazer 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\n\nBatul 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.",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.\n\n",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.  ",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. \n\nIn 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.  ",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. \n\n\n\n*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. \n\nIn 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. \n\n\n\n*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. \n\nIn Sharn, a great feast is held at the Pavilion of the Host with goods and services donated  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:"\tAt 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.",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",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-9e3,month:0,day:0}},{name:"Anno Domini",description:"",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day: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 \nsunrise and sunset. Many western cultures consider it the official start\n of summer.",id:"824456",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Spring Equinox",description:"The Spring Equinox,\nalso called the Vernal Equinox, is the day between the winter and\nsummer solstices where the day is the exact same length as the night.\nMany western cultures consider it the official start of Spring.\n",id:"824457",note:null,date:{day:null,year:null,month:null},category:"natural-event"},{name:"Autumnal Equinox",description:"The Autumnal Equinox,\nalso called the Fall Equinox, is the midpoint between the summer and\nwinter solstices, where the day is the exact same length as the night.\nMany western cultures consider it the official start of Autumn.\n",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.",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",description:"",format:"Year {{year}} - {{era_name}}",start:{year:1,month:0,day:1}},{name:"Age of Arcanum",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-1500,month:0,day:1}},{name:"The Calamity",description:"",format:"Year {{year}} - {{era_name}}",start:{year:-665,month:0,day:1}},{name:"Post-Divergence",description:"",format:"Year {{year}} P.D.",start:{year:1,month:0,day: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:"\tAt 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.\n\nIn 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.\n\nOn 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.\n\nThe 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 Kord to root for their favored deity's champion, particularly the chosen champions of the Storm Lord and the All-Hammer. ",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.\n\nThe 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.\n\nThe 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.\n\nThe dwarven communities across Exandria, such as the ones in Grimgolir and Kraghammer, celebrate with a full day of feasting and drinking. ",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,\nor Midsummer. It is celebrated on the twentieth day\nof the sixth month, and commemorates the elves' first\nemergence from the Feywild.\n\nIn Syngorn, the Elves open small doorways into the Feywild and celebrate alongside the wild fey with uncharacteristic vigor.\n\nThough the Dwendalian\nEmpire doesn't promote the worship of the Arch Heart,\nthe elves of Bysaes Tyl quietly celebrate in private by\nopening small doors to the Feywild and having a little\nmore wine than usual. ",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.\n\nEmon 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).\n\nWhitestone (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.\n\nWhile other parts of Exandria feast, the Dwendalian\nEmpire uses this day as an opportunity to enlist more\nsoldiers in its army. The military holds great feasts and\nhands out toy soldiers and other propaganda, encouraging people to enlist and help fight against the evil that\nthreatens the king. ",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 and is typically celebrated with feasting in rural regions and with carnivals in the cities. ",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\nDawn, which is celebrated on the autumnal equinox,\nusually the twenty-second day of the ninth month.\n\nEmon celebrates with a great bonfire in the square of each neighborhood, around which each community dances and gives gifts.\n\nIn the\nDwendalian Empire, people celebrate by having feasts \nin honor of the laws of the Dwendal bloodline. One seat\nat every table is left open for the king, who eats in spirit\nwith the people he rules. ",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.\n\nThough 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.\n\nWhat 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, and is celebrated on the fifth day of Duscar. This is a day of remembrance, solemnity, and respect for those who have 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.\n\nHowever, 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ûn of the Forgotten Realms.",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úne",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.\n\nThe 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.\n\nIn Faerûn, 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ââ¬â€after recently slain soldiers had joined the ranks of the deadââ¬â€was thus practical, if sadly ironic.\n\nThe Heralds of Faerûn 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.\n\nPriests 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.\n\nPreparations 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.\n\nThis 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.\n\nAccording 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.\n\nIt 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.\n\nOn 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.\n\nThe 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"}]}];function g(){}const y=e=>e;function v(e){return e()}function b(){return Object.create(null)}function w(e){e.forEach(v)}function D(e){return"function"==typeof e}function x(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function k(e){return 0===Object.keys(e).length}function E(e,t,n,a){if(e){const r=C(e,t,n,a);return e[0](r)}}function C(e,t,n,a){return e[1]&&a?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](a(t))):n.ctx}function A(e,t,n,a){if(e[2]&&a){const r=e[2](a(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let a=0;a<n;a+=1)e[a]=t.dirty[a]|r[a];return e}return t.dirty|r}return t.dirty}function T(e,t,n,a,r,i){if(r){const o=C(t,n,a,i);e.p(o,r)}}function S(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}function $(e){return null==e?"":e}function M(e){return e&&D(e.destroy)?e.destroy:g}const q="undefined"!=typeof window;let I=q?()=>window.performance.now():()=>Date.now(),N=q?e=>requestAnimationFrame(e):g;const F=new Set;function O(e){F.forEach((t=>{t.c(e)||(F.delete(t),t.f())})),0!==F.size&&N(O)}let L=!1;function B(e,t){e.appendChild(t)}function R(e,t,n){const a=_(e);if(!a.getElementById(t)){const e=G("style");e.id=t,e.textContent=n,j(a,e)}}function _(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function j(e,t){B(e.head||e,t)}function V(e,t,n){e.insertBefore(t,n||null)}function P(e){e.parentNode.removeChild(e)}function H(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function G(e){return document.createElement(e)}function W(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function U(e){return document.createTextNode(e)}function z(){return U(" ")}function Y(){return U("")}function Z(e,t,n,a){return e.addEventListener(t,n,a),()=>e.removeEventListener(t,n,a)}function K(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Q(e){return""===e?null:+e}function J(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function X(e,t){e.value=null==t?"":t}function ee(e,t,n,a){e.style.setProperty(t,n,a?"important":"")}function te(e,t){for(let n=0;n<e.options.length;n+=1){const a=e.options[n];if(a.__value===t)return void(a.selected=!0)}e.selectedIndex=-1}function ne(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}function ae(e,t,n){e.classList[n?"add":"remove"](t)}const re=new Set;let ie,oe=0;function se(e,t,n,a){if(!t)return g;const r=e.getBoundingClientRect();if(t.left===r.left&&t.right===r.right&&t.top===r.top&&t.bottom===r.bottom)return g;const{delay:i=0,duration:o=300,easing:s=y,start:l=I()+i,end:d=l+o,tick:c=g,css:u}=n(e,{from:t,to:r},a);let h,f=!0,p=!1;function m(){u&&function(e,t){const n=(e.style.animation||"").split(", "),a=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),r=n.length-a.length;r&&(e.style.animation=a.join(", "),oe-=r,oe||N((()=>{oe||(re.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),re.clear())})))}(e,h),f=!1}return function(e){let t;0===F.size&&N(O),new Promise((n=>{F.add(t={c:e,f:n})}))}((e=>{if(!p&&e>=l&&(p=!0),p&&e>=d&&(c(1,0),m()),!f)return!1;if(p){const t=0+1*s((e-l)/o);c(t,1-t)}return!0})),u&&(h=function(e,t,n,a,r,i,o,s=0){const l=16.666/a;let d="{\n";for(let e=0;e<=1;e+=l){const a=t+(n-t)*i(e);d+=100*e+`%{${o(a,1-a)}}\n`}const c=d+`100% {${o(n,1-n)}}\n}`,u=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(c)}_${s}`,h=_(e);re.add(h);const f=h.__svelte_stylesheet||(h.__svelte_stylesheet=function(e){const t=G("style");return j(_(e),t),t}(e).sheet),p=h.__svelte_rules||(h.__svelte_rules={});p[u]||(p[u]=!0,f.insertRule(`@keyframes ${u} ${c}`,f.cssRules.length));const m=e.style.animation||"";return e.style.animation=`${m?`${m}, `:""}${u} ${a}ms linear ${r}ms 1 both`,oe+=1,u}(e,0,1,o,i,s,u)),i||(p=!0),c(0,1),m}function le(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:a}=t,r=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=a,function(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const a=getComputedStyle(e),r="none"===a.transform?"":a.transform;e.style.transform=`${r} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}(e,r)}}function de(e){ie=e}function ce(){if(!ie)throw new Error("Function called outside component initialization");return ie}function ue(e){ce().$$.on_mount.push(e)}function he(){const e=ce();return(t,n)=>{const a=e.$$.callbacks[t];if(a){const r=function(e,t,n=!1){const a=document.createEvent("CustomEvent");return a.initCustomEvent(e,n,!1,t),a}(t,n);a.slice().forEach((t=>{t.call(e,r)}))}}}function fe(e,t){ce().$$.context.set(e,t)}function pe(e){return ce().$$.context.get(e)}function me(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}const ge=[],ye=[],ve=[],be=[],we=Promise.resolve();let De=!1;function xe(){De||(De=!0,we.then(Te))}function ke(){return xe(),we}function Ee(e){ve.push(e)}let Ce=!1;const Ae=new Set;function Te(){if(!Ce){Ce=!0;do{for(let e=0;e<ge.length;e+=1){const t=ge[e];de(t),Se(t.$$)}for(de(null),ge.length=0;ye.length;)ye.pop()();for(let e=0;e<ve.length;e+=1){const t=ve[e];Ae.has(t)||(Ae.add(t),t())}ve.length=0}while(ge.length);for(;be.length;)be.pop()();De=!1,Ce=!1,Ae.clear()}}function Se(e){if(null!==e.fragment){e.update(),w(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Ee)}}const $e=new Set;let Me,qe;function Ie(){Me={r:0,c:[],p:Me}}function Ne(){Me.r||w(Me.c),Me=Me.p}function Fe(e,t){e&&e.i&&($e.delete(e),e.i(t))}function Oe(e,t,n,a){if(e&&e.o){if($e.has(e))return;$e.add(e),Me.c.push((()=>{$e.delete(e),a&&(n&&e.d(1),a())})),e.o(t)}}function Le(e,t){e.f(),function(e,t){e.d(1),t.delete(e.key)}(e,t)}function Be(e,t){e.f(),function(e,t){Oe(e,1,1,(()=>{t.delete(e.key)}))}(e,t)}function Re(e,t,n,a,r,i,o,s,l,d,c,u){let h=e.length,f=i.length,p=h;const m={};for(;p--;)m[e[p].key]=p;const g=[],y=new Map,v=new Map;for(p=f;p--;){const e=u(r,i,p),s=n(e);let l=o.get(s);l?a&&l.p(e,t):(l=d(s,e),l.c()),y.set(s,g[p]=l),s in m&&v.set(s,Math.abs(p-m[s]))}const b=new Set,w=new Set;function D(e){Fe(e,1),e.m(s,c),o.set(e.key,e),c=e.first,f--}for(;h&&f;){const t=g[f-1],n=e[h-1],a=t.key,r=n.key;t===n?(c=t.first,h--,f--):y.has(r)?!o.has(a)||b.has(a)?D(t):w.has(r)?h--:v.get(a)>v.get(r)?(w.add(a),D(t)):(b.add(r),h--):(l(n,o),h--)}for(;h--;){const t=e[h];y.has(t.key)||l(t,o)}for(;f;)D(g[f-1]);return g}function _e(e){e&&e.c()}function je(e,t,n,a){const{fragment:r,on_mount:i,on_destroy:o,after_update:s}=e.$$;r&&r.m(t,n),a||Ee((()=>{const t=i.map(v).filter(D);o?o.push(...t):w(t),e.$$.on_mount=[]})),s.forEach(Ee)}function Ve(e,t){const n=e.$$;null!==n.fragment&&(w(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Pe(e,t,n,a,r,i,o,s=[-1]){const l=ie;de(e);const d=e.$$={fragment:null,ctx:null,props:i,update:g,not_equal:r,bound:b(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:b(),dirty:s,skip_bound:!1,root:t.target||l.$$.root};o&&o(d.root);let c=!1;if(d.ctx=n?n(e,t.props||{},((t,n,...a)=>{const i=a.length?a[0]:n;return d.ctx&&r(d.ctx[t],d.ctx[t]=i)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](i),c&&function(e,t){-1===e.$$.dirty[0]&&(ge.push(e),xe(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],d.update(),c=!0,w(d.before_update),d.fragment=!!a&&a(d.ctx),t.target){if(t.hydrate){L=!0;const e=(u=t.target,Array.from(u.childNodes));d.fragment&&d.fragment.l(e),e.forEach(P)}else d.fragment&&d.fragment.c();t.intro&&Fe(e.$$.fragment),je(e,t.target,t.anchor,t.customElement),L=!1,Te()}var u;de(l)}"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global,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"==typeof HTMLElement&&(qe=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(v).filter(D);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){w(this.$$.on_disconnect)}$destroy(){Ve(this,1),this.$destroy=g}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!k(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class He{$destroy(){Ve(this,1),this.$destroy=g}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!k(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Ge(e){const t=e-1;return t*t*t+1}function We(e,{from:t,to:n},a={}){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform,[o,s]=r.transformOrigin.split(" ").map(parseFloat),l=t.left+t.width*o/n.width-(n.left+o),d=t.top+t.height*s/n.height-(n.top+s),{delay:c=0,duration:u=(e=>120*Math.sqrt(e)),easing:h=Ge}=a;return{delay:c,duration:D(u)?u(Math.sqrt(l*l+d*d)):u,easing:h,css:(e,a)=>{const r=a*l,o=a*d,s=e+a*t.width/n.width,c=e+a*t.height/n.height;return`transform: ${i} translate(${r}px, ${o}px) scale(${s}, ${c});`}}}function Ue(e,t,n){e.dispatchEvent(new CustomEvent("finalize",{detail:{items:t,info:n}}))}function ze(e,t,n){e.dispatchEvent(new CustomEvent("consider",{detail:{items:t,info:n}}))}const Ye="draggedEntered",Ze="draggedLeft",Ke="draggedOverIndex",Qe="draggedLeftDocument",Je="leftForAnother",Xe="outsideOfAny";function et(e,t,n){e.dispatchEvent(new CustomEvent(Ye,{detail:{indexObj:t,draggedEl:n}}))}function tt(e,t,n){e.dispatchEvent(new CustomEvent(Ze,{detail:{draggedEl:t,type:Je,theOtherDz:n}}))}function nt(e,t,n){e.dispatchEvent(new CustomEvent(Ke,{detail:{indexObj:t,draggedEl:n}}))}const at="dragStarted",rt="droppedIntoZone",it="droppedIntoAnother",ot="dragStopped",st="pointer",lt="keyboard",dt="data-is-dnd-shadow-item",ct="id:dnd-shadow-placeholder-0000";let ut="id",ht=0;function ft(){ht++}function pt(){if(0===ht)throw new Error("Bug! trying to decrement when there are no dropzones");ht--}const mt="undefined"==typeof window;let gt;function yt(e){let t;const n=e.getBoundingClientRect(),a=getComputedStyle(e),r=a.transform;if(r){let i,o,s,l;if(r.startsWith("matrix3d("))t=r.slice(9,-1).split(/, /),i=+t[0],o=+t[5],s=+t[12],l=+t[13];else{if(!r.startsWith("matrix("))return n;t=r.slice(7,-1).split(/, /),i=+t[0],o=+t[3],s=+t[4],l=+t[5]}const d=a.transformOrigin,c=n.x-s-(1-i)*parseFloat(d),u=n.y-l-(1-o)*parseFloat(d.slice(d.indexOf(" ")+1)),h=i?n.width/i:e.offsetWidth,f=o?n.height/o:e.offsetHeight;return{x:c,y:u,width:h,height:f,top:u,right:c+h,bottom:u+f,left:c}}return n}function vt(e){const t=yt(e);return{top:t.top+window.scrollY,bottom:t.bottom+window.scrollY,left:t.left+window.scrollX,right:t.right+window.scrollX}}function bt(e){const t=e.getBoundingClientRect();return{top:t.top+window.scrollY,bottom:t.bottom+window.scrollY,left:t.left+window.scrollX,right:t.right+window.scrollX}}function wt(e){return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function Dt(e,t){return e.y<=t.bottom&&e.y>=t.top&&e.x>=t.left&&e.x<=t.right}function xt(e){return wt(bt(e))}function kt(e,t){return Dt(xt(e),vt(t))}function Et(){gt=new Map}function Ct(e,t){if(!kt(e,t))return null;const n=t.children;if(0===n.length)return{index:0,isProximityBased:!0};const a=function(e){const t=Array.from(e.children).findIndex((e=>e.getAttribute(dt)));if(t>=0)return gt.has(e)||gt.set(e,new Map),gt.get(e).set(t,vt(e.children[t])),t}(t);for(let r=0;r<n.length;r++)if(kt(e,n[r])){const n=gt.has(t)&&gt.get(t).get(r);return n&&!Dt(xt(e),n)?{index:a,isProximityBased:!1}:{index:r,isProximityBased:!1}}let r,i=Number.MAX_VALUE;for(let t=0;t<n.length;t++){const a=(o=e,s=n[t],l=void 0,d=void 0,l=xt(o),d=xt(s),Math.sqrt(Math.pow(l.x-d.x,2)+Math.pow(l.y-d.y,2)));a<i&&(i=a,r=t)}var o,s,l,d;return{index:r,isProximityBased:!0}}function At(){let e;function t(){e={directionObj:void 0,stepPx:0}}function n(t){const{directionObj:a,stepPx:r}=e;a&&(t.scrollBy(a.x*r,a.y*r),window.requestAnimationFrame((()=>n(t))))}function a(e){return 25-e}return t(),{scrollIfNeeded:function(r,i){if(!i)return!1;const o=function(e,t){const n=bt(t);return Dt(e,n)?{top:e.y-n.top,bottom:n.bottom-e.y,left:e.x-n.left,right:Math.min(n.right,document.documentElement.clientWidth)-e.x}:null}(r,i);if(null===o)return t(),!1;const s=!!e.directionObj;let[l,d]=[!1,!1];return i.scrollHeight>i.clientHeight&&(o.bottom<25?(l=!0,e.directionObj={x:0,y:1},e.stepPx=a(o.bottom)):o.top<25&&(l=!0,e.directionObj={x:0,y:-1},e.stepPx=a(o.top)),!s&&l)||i.scrollWidth>i.clientWidth&&(o.right<25?(d=!0,e.directionObj={x:1,y:0},e.stepPx=a(o.right)):o.left<25&&(d=!0,e.directionObj={x:-1,y:0},e.stepPx=a(o.left)),!s&&d)?(n(i),!0):(t(),!1)},resetScrolling:t}}function Tt(e){return JSON.stringify(e,null,2)}function St(e){if(!e)throw new Error("cannot get depth of a falsy node");return $t(e,0)}function $t(e,t=0){return e.parentElement?$t(e.parentElement,t+1):t-1}Et();const{scrollIfNeeded:Mt,resetScrolling:qt}=At();let It,Nt;function Ft(e){const t=e.touches?e.touches[0]:e;Nt={x:t.clientX,y:t.clientY}}const{scrollIfNeeded:Ot,resetScrolling:Lt}=At();let Bt;function Rt(){Nt&&Ot(Nt,document.documentElement),Bt=window.setTimeout(Rt,300)}function _t(e){return`${e} 0.2s ease`}function jt(e,t,n,a,r){const i=t.getBoundingClientRect(),o=e.getBoundingClientRect(),s=i.width-o.width,l=i.height-o.height;if(s||l){const t={left:(n-o.left)/o.width,top:(a-o.top)/o.height};e.style.height=`${i.height}px`,e.style.width=`${i.width}px`,e.style.left=parseFloat(e.style.left)-t.left*s+"px",e.style.top=parseFloat(e.style.top)-t.top*l+"px"}Vt(t,e),r()}function Vt(e,t){const n=window.getComputedStyle(e);Array.from(n).filter((e=>e.startsWith("background")||e.startsWith("padding")||e.startsWith("font")||e.startsWith("text")||e.startsWith("align")||e.startsWith("justify")||e.startsWith("display")||e.startsWith("flex")||e.startsWith("border")||"opacity"===e||"color"===e||"list-style-type"===e)).forEach((e=>t.style.setProperty(e,n.getPropertyValue(e),n.getPropertyPriority(e))))}function Pt(e,t){e.draggable=!1,e.ondragstart=()=>!1,t?(e.style.userSelect="",e.style.WebkitUserSelect="",e.style.cursor=""):(e.style.userSelect="none",e.style.WebkitUserSelect="none",e.style.cursor="grab")}function Ht(e,t=(()=>{}),n=(()=>[])){e.forEach((e=>{const a=t(e);Object.keys(a).forEach((t=>{e.style[t]=a[t]})),n(e).forEach((t=>e.classList.add(t)))}))}function Gt(e,t=(()=>{}),n=(()=>[])){e.forEach((e=>{const a=t(e);Object.keys(a).forEach((t=>{e.style[t]=""})),n(e).forEach((t=>e.classList.contains(t)&&e.classList.remove(t)))}))}const Wt={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let Ut,zt,Yt,Zt,Kt,Qt,Jt,Xt,en,tn,nn,an=!1,rn=!1,on=!1;const sn=new Map,ln=new Map,dn=new WeakMap;function cn(e,t){sn.get(t).delete(e),pt(),0===sn.get(t).size&&sn.delete(t)}function un(){window.addEventListener("mousemove",Ft),window.addEventListener("touchmove",Ft),Rt();const e=sn.get(Zt);for(const t of e)t.addEventListener(Ye,fn),t.addEventListener(Ze,pn),t.addEventListener(Ke,mn);window.addEventListener(Qe,yn);const t=Math.max(100,...Array.from(e.keys()).map((e=>ln.get(e).dropAnimationDurationMs)));!function(e,t,n=200){let a,r,i,o=!1;const s=Array.from(t).sort(((e,t)=>St(t)-St(e)));!function t(){const l=xt(e);if(!Mt(l,a)&&i&&Math.abs(i.x-l.x)<10&&Math.abs(i.y-l.y)<10)return void(It=window.setTimeout(t,n));if(function(e){const t=bt(e);return t.right<0||t.left>document.documentElement.scrollWidth||t.bottom<0||t.top>document.documentElement.scrollHeight}(e))return void function(e){window.dispatchEvent(new CustomEvent(Qe,{detail:{draggedEl:e}}))}(e);i=l;let d=!1;for(const t of s){const n=Ct(e,t);if(null===n)continue;const{index:i}=n;d=!0,t!==a?(a&&tt(a,e,t),et(t,n,e),a=t):i!==r&&(nt(t,n,e),r=i);break}!d&&o&&a?(function(e,t){e.dispatchEvent(new CustomEvent(Ze,{detail:{draggedEl:t,type:Xe}}))}(a,e),a=void 0,r=void 0,o=!1):o=!0,It=window.setTimeout(t,n)}()}(zt,e,1.07*t)}function hn(e){return e.findIndex((e=>!!e.isDndShadowItem&&e.id!==ct))}function fn(e){let{items:t,dropFromOthersDisabled:n}=ln.get(e.currentTarget);if(n&&e.currentTarget!==Kt)return;if(on=!1,t=t.filter((e=>e.id!==Jt.id)),Kt!==e.currentTarget){const e=ln.get(Kt).items.filter((e=>!e.isDndShadowItem));ze(Kt,e,{trigger:"dragEnteredAnother",id:Yt.id,source:st})}else{const e=function(e){return e.findIndex((e=>e.id===ct))}(t);-1!==e&&t.splice(e,1)}const{index:a,isProximityBased:r}=e.detail.indexObj,i=r&&a===e.currentTarget.children.length-1?a+1:a;Xt=e.currentTarget,t.splice(i,0,Jt),ze(e.currentTarget,t,{trigger:"draggedEntered",id:Yt.id,source:st})}function pn(e){if(!an)return;const{items:t,dropFromOthersDisabled:n}=ln.get(e.currentTarget);if(n&&e.currentTarget!==Kt&&e.currentTarget!==Xt)return;const a=hn(t),r=t.splice(a,1)[0];Xt=void 0;const{type:i,theOtherDz:o}=e.detail;if(i===Xe||i===Je&&o!==Kt&&ln.get(o).dropFromOthersDisabled){on=!0,Xt=Kt;const e=ln.get(Kt).items;e.splice(Qt,0,r),ze(Kt,e,{trigger:"draggedLeftAll",id:Yt.id,source:st})}ze(e.currentTarget,t,{trigger:"draggedLeft",id:Yt.id,source:st})}function mn(e){const{items:t,dropFromOthersDisabled:n}=ln.get(e.currentTarget);if(n&&e.currentTarget!==Kt)return;on=!1;const{index:a}=e.detail.indexObj,r=hn(t);t.splice(r,1),t.splice(a,0,Jt),ze(e.currentTarget,t,{trigger:"draggedOverIndex",id:Yt.id,source:st})}function gn(e){e.preventDefault();const t=e.touches?e.touches[0]:e;tn={x:t.clientX,y:t.clientY},zt.style.transform=`translate3d(${tn.x-en.x}px, ${tn.y-en.y}px, 0)`}function yn(){rn=!0,window.removeEventListener("mousemove",gn),window.removeEventListener("touchmove",gn),window.removeEventListener("mouseup",yn),window.removeEventListener("touchend",yn),function(){window.removeEventListener("mousemove",Ft),window.removeEventListener("touchmove",Ft),Nt=void 0,window.clearTimeout(Bt),Lt();const e=sn.get(Zt);for(const t of e)t.removeEventListener(Ye,fn),t.removeEventListener(Ze,pn),t.removeEventListener(Ke,mn);window.removeEventListener(Qe,yn),clearTimeout(It),qt(),Et()}(),function(e){e.style.cursor="grab"}(zt),Xt||(Xt=Kt);let{items:e,type:t}=ln.get(Xt);Gt(sn.get(t),(e=>ln.get(e).dropTargetStyle),(e=>ln.get(e).dropTargetClasses));let n=hn(e);-1===n&&(n=Qt),e=e.map((e=>e.isDndShadowItem?Yt:e)),function(e,t){const n=yt(Xt.children[e]),a=n.left-parseFloat(zt.style.left),r=n.top-parseFloat(zt.style.top),{dropAnimationDurationMs:i}=ln.get(Xt),o=`transform ${i}ms ease`;zt.style.transition=zt.style.transition?zt.style.transition+","+o:o,zt.style.transform=`translate3d(${a}px, ${r}px, 0)`,window.setTimeout(t,i)}(n,(function(){var t;nn(),Ue(Xt,e,{trigger:on?"droppedOutsideOfAny":rt,id:Yt.id,source:st}),Xt!==Kt&&Ue(Kt,ln.get(Kt).items,{trigger:it,id:Yt.id,source:st}),(t=Xt.children[n]).style.visibility="",t.removeAttribute(dt),zt.remove(),Ut.remove(),zt=void 0,Ut=void 0,Yt=void 0,Zt=void 0,Kt=void 0,Qt=void 0,Jt=void 0,Xt=void 0,en=void 0,tn=void 0,an=!1,rn=!1,nn=void 0,on=!1}))}const vn={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},bn={[vn.DND_ZONE_ACTIVE]:"Tab to one the items and press space-bar or enter to start dragging it",[vn.DND_ZONE_DRAG_DISABLED]:"This is a disabled drag and drop list"};let wn;function Dn(){wn=document.createElement("div"),wn.id="dnd-action-aria-alert",wn.style.position="fixed",wn.style.bottom="0",wn.style.left="0",wn.style.zIndex="-5",wn.style.opacity="0",wn.style.height="0",wn.style.width="0",wn.setAttribute("role","alert"),document.body.prepend(wn),Object.entries(bn).forEach((([e,t])=>document.body.prepend(function(e,t){const n=document.createElement("div");return n.id=e,n.innerHTML=`<p>${t}</p>`,n.style.display="none",n.style.position="fixed",n.style.zIndex="-5",n}(e,t))))}function xn(e){wn.innerHTML="";const t=document.createTextNode(e);wn.appendChild(t),wn.style.display="none",wn.style.display="inline"}const kn={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let En,Cn,An,Tn,Sn=!1,$n="",Mn="";const qn=new WeakSet,In=new WeakMap,Nn=new WeakMap,Fn=new Map,On=new Map,Ln=new Map,Bn=mt?null:("complete"===document.readyState?Dn():window.addEventListener("DOMContentLoaded",Dn),{...vn});function Rn(e,t){Cn===e&&Hn(),Ln.get(t).delete(e),pt(),0===Ln.get(t).size&&Ln.delete(t),0===Ln.size&&(window.removeEventListener("keydown",_n),window.removeEventListener("click",jn))}function _n(e){Sn&&"Escape"===e.key&&Hn()}function jn(){Sn&&(qn.has(document.activeElement)||Hn())}function Vn(e){if(!Sn)return;const t=e.currentTarget;if(t===Cn)return;$n=t.getAttribute("aria-label")||"";const{items:n}=On.get(Cn),a=n.find((e=>e.id===Tn)),r=n.indexOf(a),i=n.splice(r,1)[0],{items:o,autoAriaDisabled:s}=On.get(t);t.getBoundingClientRect().top<Cn.getBoundingClientRect().top||t.getBoundingClientRect().left<Cn.getBoundingClientRect().left?(o.push(i),s||xn(`Moved item ${Mn} to the end of the list ${$n}`)):(o.unshift(i),s||xn(`Moved item ${Mn} to the beginning of the list ${$n}`)),Ue(Cn,n,{trigger:it,id:Tn,source:lt}),Ue(t,o,{trigger:rt,id:Tn,source:lt}),Cn=t}function Pn(){Fn.forEach((({update:e},t)=>e(On.get(t))))}function Hn(e=!0){On.get(Cn).autoAriaDisabled||xn(`Stopped dragging item ${Mn}`),qn.has(document.activeElement)&&document.activeElement.blur(),e&&ze(Cn,On.get(Cn).items,{trigger:ot,id:Tn,source:lt}),Gt(Ln.get(En),(e=>On.get(e).dropTargetStyle),(e=>On.get(e).dropTargetClasses)),An=null,Tn=null,Mn="",En=null,Cn=null,$n="",Sn=!1,Pn()}function Gn(e,t){Wn(t);const n=function(e,t){const n={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:Wt,dropTargetClasses:[],transformDraggedElement:()=>{},centreDraggedOnCursor:!1};let a=new Map;function r(){window.removeEventListener("mousemove",o),window.removeEventListener("touchmove",o),window.removeEventListener("mouseup",i),window.removeEventListener("touchend",i)}function i(){r(),Ut=void 0,en=void 0,tn=void 0}function o(e){e.preventDefault();const t=e.touches?e.touches[0]:e;tn={x:t.clientX,y:t.clientY},(Math.abs(tn.x-en.x)>=3||Math.abs(tn.y-en.y)>=3)&&(r(),function(){an=!0;const e=a.get(Ut);Qt=e,Kt=Ut.parentElement;const t=Kt.getRootNode(),r=t.body||t,{items:i,type:o,centreDraggedOnCursor:s}=n;Yt={...i[e]},Zt=o,Jt={...Yt,isDndShadowItem:!0};const l={...Jt,[ut]:ct};zt=function(e,t){const n=e.getBoundingClientRect(),a=e.cloneNode(!0);Vt(e,a),a.id="dnd-action-dragged-el",a.style.position="fixed";let r=n.top,i=n.left;if(a.style.top=`${r}px`,a.style.left=`${i}px`,t){const e=wt(n);r-=e.y-t.y,i-=e.x-t.x,window.setTimeout((()=>{a.style.top=`${r}px`,a.style.left=`${i}px`}),0)}return a.style.margin="0",a.style.boxSizing="border-box",a.style.height=`${n.height}px`,a.style.width=`${n.width}px`,a.style.transition=`${_t("top")}, ${_t("left")}, ${_t("background-color")}, ${_t("opacity")}, ${_t("color")} `,window.setTimeout((()=>a.style.transition+=`, ${_t("width")}, ${_t("height")}`),0),a.style.zIndex="9999",a.style.cursor="grabbing",a}(Ut,s&&tn),window.requestAnimationFrame((function e(){var t;zt.parentElement?window.requestAnimationFrame(e):(r.appendChild(zt),zt.focus(),un(),(t=Ut).style.display="none",t.style.position="fixed",t.style.zIndex="-5",r.appendChild(Ut))})),Ht(Array.from(sn.get(n.type)).filter((e=>e===Kt||!ln.get(e).dropFromOthersDisabled)),(e=>ln.get(e).dropTargetStyle),(e=>ln.get(e).dropTargetClasses)),i.splice(e,1,l),nn=function(e){const t=e.style.minHeight;e.style.minHeight=window.getComputedStyle(e).getPropertyValue("height");const n=e.style.minWidth;return e.style.minWidth=window.getComputedStyle(e).getPropertyValue("width"),function(){e.style.minHeight=t,e.style.minWidth=n}}(Kt),ze(Kt,i,{trigger:at,id:Yt.id,source:st}),window.addEventListener("mousemove",gn,{passive:!1}),window.addEventListener("touchmove",gn,{passive:!1,capture:!1}),window.addEventListener("mouseup",yn,{passive:!1}),window.addEventListener("touchend",yn,{passive:!1})}())}function s(e){if(e.target!==e.currentTarget&&(void 0!==e.target.value||e.target.isContentEditable))return;if(e.button)return;if(an)return;e.stopPropagation();const t=e.touches?e.touches[0]:e;en={x:t.clientX,y:t.clientY},tn={...en},Ut=e.currentTarget,window.addEventListener("mousemove",o,{passive:!1}),window.addEventListener("touchmove",o,{passive:!1,capture:!1}),window.addEventListener("mouseup",i,{passive:!1}),window.addEventListener("touchend",i,{passive:!1})}function l({items:t,flipDurationMs:r=0,type:i="--any--",dragDisabled:o=!1,morphDisabled:l=!1,dropFromOthersDisabled:d=!1,dropTargetStyle:c=Wt,dropTargetClasses:u=[],transformDraggedElement:h=(()=>{}),centreDraggedOnCursor:f=!1}){var p,m;function g(e,t){return ln.get(e)?ln.get(e)[t]:n[t]}n.dropAnimationDurationMs=r,n.type&&i!==n.type&&cn(e,n.type),n.type=i,p=e,m=i,sn.has(m)||sn.set(m,new Set),sn.get(m).has(p)||(sn.get(m).add(p),ft()),n.items=[...t],n.dragDisabled=o,n.morphDisabled=l,n.transformDraggedElement=h,n.centreDraggedOnCursor=f,!an||rn||function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!{}.hasOwnProperty.call(t,n)||t[n]!==e[n])return!1;return!0}(c,n.dropTargetStyle)&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(u,n.dropTargetClasses)||(Gt([e],(()=>n.dropTargetStyle),(()=>u)),Ht([e],(()=>c),(()=>u))),n.dropTargetStyle=c,n.dropTargetClasses=[...u],an&&n.dropFromOthersDisabled!==d&&(d?Gt([e],(e=>g(e,"dropTargetStyle")),(e=>g(e,"dropTargetClasses"))):Ht([e],(e=>g(e,"dropTargetStyle")),(e=>g(e,"dropTargetClasses")))),n.dropFromOthersDisabled=d,ln.set(e,n);const y=hn(n.items);for(let t=0;t<e.children.length;t++){const r=e.children[t];Pt(r,o),t!==y?(r.removeEventListener("mousedown",dn.get(r)),r.removeEventListener("touchstart",dn.get(r)),o||(r.addEventListener("mousedown",s),r.addEventListener("touchstart",s),dn.set(r,s)),a.set(r,t)):(l||jt(zt,r,tn.x,tn.y,(()=>n.transformDraggedElement(zt,Yt,t))),(v=r).style.visibility="hidden",v.setAttribute(dt,"true"))}var v}return l(t),{update:e=>{l(e)},destroy:()=>{cn(e,n.type),ln.delete(e)}}}(e,t),a=function(e,t){const n={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:kn,dropTargetClasses:[],autoAriaDisabled:!1};function a(e,t,n){e.length<=1||e.splice(n,1,e.splice(t,1,e[n])[0])}function r(t){switch(t.key){case"Enter":case" ":if((void 0!==t.target.disabled||t.target.href||t.target.isContentEditable)&&!qn.has(t.target))return;t.preventDefault(),t.stopPropagation(),Sn?Hn():i(t);break;case"ArrowDown":case"ArrowRight":{if(!Sn)return;t.preventDefault(),t.stopPropagation();const{items:r}=On.get(e),i=Array.from(e.children),o=i.indexOf(t.currentTarget);o<i.length-1&&(n.autoAriaDisabled||xn(`Moved item ${Mn} to position ${o+2} in the list ${$n}`),a(r,o,o+1),Ue(e,r,{trigger:rt,id:Tn,source:lt}));break}case"ArrowUp":case"ArrowLeft":{if(!Sn)return;t.preventDefault(),t.stopPropagation();const{items:r}=On.get(e),i=Array.from(e.children).indexOf(t.currentTarget);i>0&&(n.autoAriaDisabled||xn(`Moved item ${Mn} to position ${i} in the list ${$n}`),a(r,i,i-1),Ue(e,r,{trigger:rt,id:Tn,source:lt}));break}}}function i(t){(function(t){const{items:n}=On.get(e),a=Array.from(e.children),r=a.indexOf(t);An=t,An.tabIndex=0,Tn=n[r].id,Mn=a[r].getAttribute("aria-label")||""})(t.currentTarget),Cn=e,En=n.type,Sn=!0;const a=Array.from(Ln.get(n.type)).filter((e=>e===Cn||!On.get(e).dropFromOthersDisabled));if(Ht(a,(e=>On.get(e).dropTargetStyle),(e=>On.get(e).dropTargetClasses)),!n.autoAriaDisabled){let e=`Started dragging item ${Mn}. Use the arrow keys to move it within its list ${$n}`;a.length>1&&(e+=", or tab to another list in order to move the item into it"),xn(e)}ze(e,On.get(e).items,{trigger:at,id:Tn,source:lt}),Pn()}function o(e){Sn&&e.currentTarget!==An&&(e.stopPropagation(),Hn(!1),i(e))}function s({items:t=[],type:a="--any--",dragDisabled:i=!1,zoneTabIndex:s=0,dropFromOthersDisabled:l=!1,dropTargetStyle:d=kn,dropTargetClasses:c=[],autoAriaDisabled:u=!1}){var h,f;n.items=[...t],n.dragDisabled=i,n.dropFromOthersDisabled=l,n.zoneTabIndex=s,n.dropTargetStyle=d,n.dropTargetClasses=c,n.autoAriaDisabled=u,u||(e.setAttribute("aria-disabled",i),e.setAttribute("role","list"),e.setAttribute("aria-describedby",i?Bn.DND_ZONE_DRAG_DISABLED:Bn.DND_ZONE_ACTIVE)),n.type&&a!==n.type&&Rn(e,n.type),n.type=a,h=e,f=a,0===Ln.size&&(window.addEventListener("keydown",_n),window.addEventListener("click",jn)),Ln.has(f)||Ln.set(f,new Set),Ln.get(f).has(h)||(Ln.get(f).add(h),ft()),On.set(e,n),e.tabIndex=Sn?e===Cn||An.contains(e)||n.dropFromOthersDisabled||Cn&&n.type!==On.get(Cn).type?-1:0:n.zoneTabIndex,e.addEventListener("focus",Vn);for(let t=0;t<e.children.length;t++){const a=e.children[t];qn.add(a),a.tabIndex=Sn?-1:0,u||a.setAttribute("role","listitem"),a.removeEventListener("keydown",In.get(a)),a.removeEventListener("click",Nn.get(a)),i||(a.addEventListener("keydown",r),In.set(a,r),a.addEventListener("click",o),Nn.set(a,o)),Sn&&n.items[t].id===Tn&&(An=a,An.tabIndex=0,a.focus())}}s(t);const l={update:e=>{s(e)},destroy:()=>{Rn(e,n.type),On.delete(e),Fn.delete(e)}};return Fn.set(e,l),l}(e,t);return{update:e=>{Wn(e),n.update(e),a.update(e)},destroy:()=>{n.destroy(),a.destroy()}}}function Wn(e){const{items:t,flipDurationMs:n,type:a,dragDisabled:r,morphDisabled:i,dropFromOthersDisabled:o,zoneTabIndex:s,dropTargetStyle:l,dropTargetClasses:d,transformDraggedElement:c,autoAriaDisabled:u,centreDraggedOnCursor:h,...f}=e;if(Object.keys(f).length>0&&console.warn("dndzone will ignore unknown options",f),!t)throw new Error("no 'items' key provided to dndzone");const p=t.find((e=>!{}.hasOwnProperty.call(e,ut)));if(p)throw new Error(`missing 'id' property for item ${Tt(p)}`);if(d&&!Array.isArray(d))throw new Error(`dropTargetClasses should be an array but instead it is a ${typeof d}, ${Tt(d)}`);if(s&&(m=s,isNaN(m)||(0|(g=parseFloat(m)))!==g))throw new Error(`zoneTabIndex should be a number but instead it is a ${typeof s}, ${Tt(s)}`);var m,g}function Un(e){R(e,"svelte-lbt0gy",".add-new.svelte-lbt0gy{padding-top:0.75rem;padding-bottom:0.75rem;display:flex;width:100%}")}const zn=e=>({}),Yn=e=>({});function Zn(e){let t,n,a,r,i,o,s,l,d,c,u,h,f;const p=e[6]["pre-add"],m=E(p,e,e[5],Yn),g=e[6].default,y=E(g,e,e[5],null);return{c(){t=G("details"),n=G("summary"),a=G("h4"),r=U(e[0]),i=z(),m&&m.c(),o=z(),s=G("div"),d=z(),c=G("div"),y&&y.c(),K(s,"class","add-new svelte-lbt0gy"),K(c,"class","fantasy-calendar-container"),t.open=e[1]},m(p,g){V(p,t,g),B(t,n),B(n,a),B(a,r),B(t,i),m&&m.m(t,null),B(t,o),B(t,s),B(t,d),B(t,c),y&&y.m(c,null),u=!0,h||(f=M(l=e[2].call(null,s)),h=!0)},p(e,[n]){(!u||1&n)&&J(r,e[0]),m&&m.p&&(!u||32&n)&&T(m,p,e,e[5],u?A(p,e[5],n,zn):S(e[5]),Yn),y&&y.p&&(!u||32&n)&&T(y,g,e,e[5],u?A(g,e[5],n,null):S(e[5]),null),(!u||2&n)&&(t.open=e[1])},i(e){u||(Fe(m,e),Fe(y,e),u=!0)},o(e){Oe(m,e),Oe(y,e),u=!1},d(e){e&&P(t),m&&m.d(e),y&&y.d(e),h=!1,f()}}}function Kn(n,a,r){let{$$slots:i={},$$scope:o}=a;const s=he();let l,{label:d}=a,{open:c=!1}=a,{disabled:u=!1}=a;return n.$$set=e=>{"label"in e&&r(0,d=e.label),"open"in e&&r(1,c=e.open),"disabled"in e&&r(3,u=e.disabled),"$$scope"in e&&r(5,o=e.$$scope)},n.$$.update=()=>{24&n.$$.dirty&&l&&l.setDisabled(u)},[d,c,n=>{r(4,l=new t.ButtonComponent(n).setTooltip("Add New").setButtonText("+").setDisabled(u).onClick((()=>e(void 0,void 0,void 0,(function*(){s("new-item")}))))),r(4,l.buttonEl.style.width="100%",l)},u,l,o,i]}const Qn=class extends He{constructor(e){super(),Pe(this,e,Kn,Zn,x,{label:0,open:1,disabled:3},Un)}};function Jn(e){R(e,"svelte-1xaj2n2",".overflow.svelte-1xaj2n2.svelte-1xaj2n2{padding-top:0.75rem}.weekday.svelte-1xaj2n2.svelte-1xaj2n2{display:grid;grid-template-columns:auto 1fr auto;align-items:center;justify-content:space-between;gap:1rem}.weekday.svelte-1xaj2n2 .icon.svelte-1xaj2n2{align-items:center}.weekday.svelte-1xaj2n2.svelte-1xaj2n2{margin-top:0.5rem}")}function Xn(e,t,n){const a=e.slice();return a[17]=t[n],a}function ea(e,t,n){const a=e.slice();return a[14]=t[n],a[16]=n,a}function ta(e){let t,n,a,r,i=[],o=new Map,s=e[2];const l=e=>e[17].id;for(let t=0;t<s.length;t+=1){let n=Xn(e,s,t),a=l(n);o.set(a,i[t]=aa(a,n))}return{c(){t=G("div");for(let e=0;e<i.length;e+=1)i[e].c();K(t,"class","existing-items")},m(o,s){V(o,t,s);for(let e=0;e<i.length;e+=1)i[e].m(t,null);a||(r=[M(n=Gn.call(null,t,{items:e[2],flipDurationMs:da,dragDisabled:e[3]})),Z(t,"consider",e[10]),Z(t,"finalize",e[11])],a=!0)},p(e,a){if(516&a){s=e[2];for(let e=0;e<i.length;e+=1)i[e].r();i=Re(i,a,l,1,e,s,o,t,Le,aa,null,Xn);for(let e=0;e<i.length;e+=1)i[e].a()}n&&D(n.update)&&12&a&&n.update.call(null,{items:e[2],flipDurationMs:da,dragDisabled:e[3]})},d(e){e&&P(t);for(let e=0;e<i.length;e+=1)i[e].d();a=!1,w(r)}}}function na(e){let t;return{c(){t=G("div"),t.innerHTML="<span>Create a new weekday to see it here.</span>",K(t,"class","existing-items")},m(e,n){V(e,t,n)},p:g,d(e){e&&P(t)}}}function aa(e,t){let n,a,r,i,o,s,l,d,c,u,h,f,p,m=g;return{key:e,first:null,c(){n=G("div"),a=G("div"),i=z(),o=G("div"),l=z(),d=G("div"),u=z(),K(a,"class","icon svelte-1xaj2n2"),K(d,"class","icon svelte-1xaj2n2"),K(n,"class","weekday svelte-1xaj2n2"),this.first=n},m(e,h){V(e,n,h),B(n,a),B(n,i),B(n,o),B(n,l),B(n,d),B(n,u),f||(p=[M(r=t[5].call(null,a)),Z(a,"mousedown",t[9]),Z(a,"touchstart",t[9]),M(s=t[7].call(null,o,t[17])),M(c=t[6].call(null,d,t[17]))],f=!0)},p(e,n){t=e,s&&D(s.update)&&4&n&&s.update.call(null,t[17]),c&&D(c.update)&&4&n&&c.update.call(null,t[17])},r(){h=n.getBoundingClientRect()},f(){le(n),m()},a(){m(),m=se(n,h,We,{duration:da})},d(e){e&&P(n),f=!1,w(p)}}}function ra(e){let t;function n(e,t){return e[2].length?ta:na}let a=n(e),r=a(e);return{c(){r.c(),t=Y()},m(e,n){r.m(e,n),V(e,t,n)},p(e,i){a===(a=n(e))&&r?r.p(e,i):(r.d(1),r=a(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&P(t)}}}function ia(e){let t,n,a,r,i,o,s,l,d,c=e[2],u=[];for(let t=0;t<c.length;t+=1)u[t]=oa(ea(e,c,t));return{c(){t=G("div"),n=G("div"),a=G("div"),a.innerHTML='<div class="setting-item-name">First Day</div> \n <div class="setting-item-description">This only effects which day of the week the first\n year starts on.</div>',r=z(),i=G("div"),o=G("select");for(let e=0;e<u.length;e+=1)u[e].c();K(a,"class","setting-item-info"),K(o,"class","dropdown"),K(o,"aria-label",s=e[1]?void 0:"Cannot be modified without overflow."),void 0===e[0]&&Ee((()=>e[12].call(o))),K(i,"class","setting-item-control"),K(n,"class","setting-item"),K(t,"class","first-weekday")},m(s,c){V(s,t,c),B(t,n),B(n,a),B(n,r),B(n,i),B(i,o);for(let e=0;e<u.length;e+=1)u[e].m(o,null);te(o,e[0]),l||(d=Z(o,"change",e[12]),l=!0)},p(e,t){if(7&t){let n;for(c=e[2],n=0;n<c.length;n+=1){const a=ea(e,c,n);u[n]?u[n].p(a,t):(u[n]=oa(a),u[n].c(),u[n].m(o,null))}for(;n<u.length;n+=1)u[n].d(1);u.length=c.length}2&t&&s!==(s=e[1]?void 0:"Cannot be modified without overflow.")&&K(o,"aria-label",s),1&t&&te(o,e[0])},d(e){e&&P(t),H(u,e),l=!1,d()}}}function oa(e){let t,n,a,r,i,o=(e[14].name??"")+"";return{c(){t=G("option"),n=U(o),t.disabled=a=!e[1],t.__value=r=e[16],t.value=t.__value,t.selected=i=e[16]==e[0]},m(e,a){V(e,t,a),B(t,n)},p(e,r){4&r&&o!==(o=(e[14].name??"")+"")&&J(n,o),2&r&&a!==(a=!e[1])&&(t.disabled=a),1&r&&i!==(i=e[16]==e[0])&&(t.selected=i)},d(e){e&&P(t)}}}function sa(e){let t,n,a,r,i,o,s=e[2].length&&ia(e);return{c(){t=G("div"),a=z(),s&&s.c(),r=Y(),K(t,"class","overflow svelte-1xaj2n2")},m(l,d){V(l,t,d),V(l,a,d),s&&s.m(l,d),V(l,r,d),i||(o=M(n=e[8].call(null,t)),i=!0)},p(e,t){e[2].length?s?s.p(e,t):(s=ia(e),s.c(),s.m(r.parentNode,r)):s&&(s.d(1),s=null)},d(e){e&&P(t),e&&P(a),s&&s.d(e),e&&P(r),i=!1,o()}}}function la(e){let t,n;return t=new Qn({props:{label:"Weekdays",$$slots:{"pre-add":[sa],default:[ra]},$$scope:{ctx:e}}}),t.$on("new-item",e[4]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,[n]){const a={};1048591&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}const da=300;function ca(e,n,a){let{firstWeekday:r=0}=n,{overflow:i=!0}=n,o=!1;const s=he();let{weekdays:l=[]}=n;return e.$$set=e=>{"firstWeekday"in e&&a(0,r=e.firstWeekday),"overflow"in e&&a(1,i=e.overflow),"weekdays"in e&&a(2,l=e.weekdays)},e.$$.update=()=>{4&e.$$.dirty&&s("weekday-update",l),1&e.$$.dirty&&s("first-weekday-update",r),2&e.$$.dirty&&s("overflow-update",i)},[r,i,l,o,()=>{a(2,l=[...l,{type:"day",name:null,id:d()}])},e=>{(0,t.setIcon)(e,"fantasy-calendar-grip")},(e,n)=>{new t.ExtraButtonComponent(e).setIcon("trash").onClick((()=>a(2,l=l.filter((e=>e.id!==n.id)))))},(e,n)=>{new t.TextComponent(e).setValue(n.name).setPlaceholder("Name").onChange((e=>{n.name=e,s("weekday-update",l),a(2,l)})).inputEl.setAttr("style","width: 100%;")},e=>{new t.Setting(e).setName("Overflow Weeks").setDesc("Turn this off to make each month start on the first of the week.").addToggle((e=>{e.setValue(i).onChange((e=>{a(1,i=e)}))}))},function(e){e.preventDefault(),a(3,o=!1)},function(e){const{items:t,info:{source:n,trigger:r}}=e.detail;a(2,l=t),n===lt&&r===ot&&a(3,o=!0)},function(e){const{items:t,info:{source:n}}=e.detail;a(2,l=t),n===st&&a(3,o=!0)},function(){r=ne(this),a(0,r)}]}const ua=class extends He{constructor(e){super(),Pe(this,e,ca,la,x,{firstWeekday:0,overflow:1,weekdays:2},Jn)}};function ha(e){R(e,"svelte-1nt6wkb",".month.svelte-1nt6wkb.svelte-1nt6wkb{display:grid;grid-template-columns:1fr 1fr auto auto;align-items:center;justify-content:space-between;gap:1rem}.month.svelte-1nt6wkb .icon.svelte-1nt6wkb{align-items:center}")}function fa(e){let t,n,a,r,i,o,s,l,d,c,u,h,f;return{c(){t=G("div"),n=G("input"),a=z(),r=G("input"),i=z(),o=G("select"),s=G("option"),s.textContent="Month",l=G("option"),l.textContent="Intercalary",d=z(),c=G("div"),K(n,"type","text"),K(n,"spellcheck","false"),K(n,"placeholder","Name"),ee(n,"width","100%"),K(r,"type","number"),K(r,"spellcheck","false"),K(r,"placeholder","Length"),ee(r,"width","100%"),K(r,"min","0"),s.__value="month",s.value=s.__value,l.__value="intercalary",l.value=l.__value,K(o,"class","dropdown"),void 0===e[0]&&Ee((()=>e[8].call(o))),K(c,"class","icon svelte-1nt6wkb"),K(t,"class","month svelte-1nt6wkb")},m(p,m){V(p,t,m),B(t,n),X(n,e[1]),B(t,a),B(t,r),X(r,e[2]),B(t,i),B(t,o),B(o,s),B(o,l),te(o,e[0]),B(t,d),B(t,c),h||(f=[Z(n,"input",e[6]),Z(n,"input",e[4]),Z(r,"input",e[7]),Z(r,"input",e[4]),Z(o,"change",e[8]),Z(o,"input",e[4]),M(u=e[3].call(null,c))],h=!0)},p(e,[t]){2&t&&n.value!==e[1]&&X(n,e[1]),4&t&&Q(r.value)!==e[2]&&X(r,e[2]),1&t&&te(o,e[0])},i:g,o:g,d(e){e&&P(t),h=!1,w(f)}}}function pa(e,n,a){const r=he();let{month:i}=n,o=i.name,s=i.type,l=i.length;const d=(0,t.debounce)((()=>{a(5,i.name=o,i),a(5,i.type=s,i),a(5,i.length=l,i),r("month-update")}),300,!0);return e.$$set=e=>{"month"in e&&a(5,i=e.month)},e.$$.update=()=>{1&e.$$.dirty&&a(5,i.type=s,i)},[s,o,l,e=>{new t.ExtraButtonComponent(e).setIcon("trash").onClick((()=>{r("month-delete")}))},d,i,function(){o=this.value,a(1,o)},function(){l=Q(this.value),a(2,l)},function(){s=ne(this),a(0,s)}]}const ma=class extends He{constructor(e){super(),Pe(this,e,pa,fa,x,{month:5},ha)}};function ga(e){R(e,"svelte-xv4vbj",".month.svelte-xv4vbj{display:flex;align-items:center;margin-top:0.5rem;gap:1rem}")}function ya(e,t,n){const a=e.slice();return a[12]=t[n],a}function va(e){let t,n,a,r,i,o=[],s=new Map,l=e[0];const d=e=>e[12].id;for(let t=0;t<l.length;t+=1){let n=ya(e,l,t),a=d(n);s.set(a,o[t]=wa(a,n))}return{c(){t=G("div");for(let e=0;e<o.length;e+=1)o[e].c();K(t,"class","existing-items")},m(s,l){V(s,t,l);for(let e=0;e<o.length;e+=1)o[e].m(t,null);a=!0,r||(i=[M(n=Gn.call(null,t,{items:e[0],flipDurationMs:ka,dragDisabled:e[1]})),Z(t,"consider",e[6]),Z(t,"finalize",e[7])],r=!0)},p(e,a){if(297&a){l=e[0],Ie();for(let e=0;e<o.length;e+=1)o[e].r();o=Re(o,a,d,1,e,l,s,t,Be,wa,null,ya);for(let e=0;e<o.length;e+=1)o[e].a();Ne()}n&&D(n.update)&&3&a&&n.update.call(null,{items:e[0],flipDurationMs:ka,dragDisabled:e[1]})},i(e){if(!a){for(let e=0;e<l.length;e+=1)Fe(o[e]);a=!0}},o(e){for(let e=0;e<o.length;e+=1)Oe(o[e]);a=!1},d(e){e&&P(t);for(let e=0;e<o.length;e+=1)o[e].d();r=!1,w(i)}}}function ba(e){let t;return{c(){t=G("div"),t.innerHTML="<span>Create a new month to see it here.</span>",K(t,"class","existing-items")},m(e,n){V(e,t,n)},p:g,i:g,o:g,d(e){e&&P(t)}}}function wa(e,t){let n,a,r,i,o,s,l,d,c,u,h=g;return o=new ma({props:{month:t[12]}}),o.$on("mousedown",t[5]),o.$on("month-delete",(function(){return t[9](t[12])})),o.$on("month-update",t[10]),{key:e,first:null,c(){n=G("div"),a=G("div"),i=z(),_e(o.$$.fragment),s=z(),K(a,"class","icon"),K(n,"class","month svelte-xv4vbj"),this.first=n},m(e,l){V(e,n,l),B(n,a),B(n,i),je(o,n,null),B(n,s),d=!0,c||(u=[M(r=t[4].call(null,a)),Z(a,"mousedown",t[5]),Z(a,"touchstart",t[5])],c=!0)},p(e,n){t=e;const a={};1&n&&(a.month=t[12]),o.$set(a)},r(){l=n.getBoundingClientRect()},f(){le(n),h()},a(){h(),h=se(n,l,We,{duration:ka})},i(e){d||(Fe(o.$$.fragment,e),d=!0)},o(e){Oe(o.$$.fragment,e),d=!1},d(e){e&&P(n),Ve(o),c=!1,w(u)}}}function Da(e){let t,n,a,r;const i=[ba,va],o=[];function s(e,t){return e[0].length?1:0}return t=s(e),n=o[t]=i[t](e),{c(){n.c(),a=Y()},m(e,n){o[t].m(e,n),V(e,a,n),r=!0},p(e,r){let l=t;t=s(e),t===l?o[t].p(e,r):(Ie(),Oe(o[l],1,1,(()=>{o[l]=null})),Ne(),n=o[t],n?n.p(e,r):(n=o[t]=i[t](e),n.c()),Fe(n,1),n.m(a.parentNode,a))},i(e){r||(Fe(n),r=!0)},o(e){Oe(n),r=!1},d(e){o[t].d(e),e&&P(a)}}}function xa(e){let t,n;return t=new Qn({props:{label:"Months",$$slots:{default:[Da]},$$scope:{ctx:e}}}),t.$on("new-item",e[2]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,[n]){const a={};32771&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}const ka=300;function Ea(e,n,a){const r=e=>{a(0,s=s.filter((t=>t.id!=e.id))),o("month-update",s)};let i=!1;const o=he();let{months:s=[]}=n;return e.$$set=e=>{"months"in e&&a(0,s=e.months)},[s,i,()=>{a(0,s=[...s,{type:"month",name:null,length:null,id:d()}]),o("month-update",s)},r,e=>{(0,t.setIcon)(e,"fantasy-calendar-grip")},function(e){e.preventDefault(),a(1,i=!1)},function(e){const{items:t,info:{source:n,trigger:r}}=e.detail;a(0,s=t),n===lt&&r===ot&&a(1,i=!0)},function(e){const{items:t,info:{source:n}}=e.detail;a(0,s=t),o("month-update",s),n===st&&a(1,i=!0)},o,e=>r(e),()=>o("month-update",s)]}const Ca=class extends He{constructor(e){super(),Pe(this,e,Ea,xa,x,{months:0},ga)}};function Aa(e){R(e,"svelte-1ldxqlp",".dot.svelte-1ldxqlp{display:inline-block;height:0.875em;width:0.875em;margin:0 1px}")}function Ta(e){let t,n;return{c(){t=W("svg"),n=W("circle"),K(n,"stroke",e[0]),K(n,"fill",e[0]),K(n,"cx","3"),K(n,"cy","3"),K(n,"r","2"),K(t,"class","dot svelte-1ldxqlp"),K(t,"viewBox","0 0 6 6"),K(t,"xmlns","http://www.w3.org/2000/svg"),K(t,"aria-label",e[1])},m(e,a){V(e,t,a),B(t,n)},p(e,[a]){1&a&&K(n,"stroke",e[0]),1&a&&K(n,"fill",e[0]),2&a&&K(t,"aria-label",e[1])},i:g,o:g,d(e){e&&P(t)}}}function Sa(e,t,n){let{color:a}=t,{label:r}=t;return e.$$set=e=>{"color"in e&&n(0,a=e.color),"label"in e&&n(1,r=e.label)},[a,r]}const $a=class extends He{constructor(e){super(),Pe(this,e,Sa,Ta,x,{color:0,label:1},Aa)}};function Ma(e){R(e,"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 qa(e){let t,n;return t=new $a({props:{color:e[1].color,label:e[1].name}}),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};2&n&&(a.color=e[1].color),2&n&&(a.label=e[1].name),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Ia(e){let t,n,a,r,i,o,s,l,d,c,u,h,f,p,m,g,y,v,b,D,x,k,E=e[0].name+"",C=(e[0].description??"")+"",A=null!=e[1]&&qa(e);return{c(){t=G("div"),n=G("div"),a=G("span"),A&&A.c(),r=z(),i=U(E),o=z(),s=G("div"),l=G("div"),d=U(e[2]),c=z(),u=G("span"),h=U(C),f=z(),p=G("div"),m=G("div"),y=z(),v=G("div"),K(a,"class","setting-item-name"),K(l,"class","date svelte-3snb0d"),K(u,"class","clamp svelte-3snb0d"),K(s,"class","setting-item-description"),K(n,"class","event-info svelte-3snb0d"),K(m,"class","icon svelte-3snb0d"),K(v,"class","icon svelte-3snb0d"),K(p,"class","icons svelte-3snb0d"),K(t,"class","event svelte-3snb0d")},m(w,E){V(w,t,E),B(t,n),B(n,a),A&&A.m(a,null),B(a,r),B(a,i),B(n,o),B(n,s),B(s,l),B(l,d),B(s,c),B(s,u),B(u,h),B(t,f),B(t,p),B(p,m),B(p,y),B(p,v),D=!0,x||(k=[M(g=e[5].call(null,m)),Z(m,"click",e[6]),M(b=e[4].call(null,v)),Z(v,"click",e[7])],x=!0)},p(e,[t]){null!=e[1]?A?(A.p(e,t),2&t&&Fe(A,1)):(A=qa(e),A.c(),Fe(A,1),A.m(a,r)):A&&(Ie(),Oe(A,1,1,(()=>{A=null})),Ne()),(!D||1&t)&&E!==(E=e[0].name+"")&&J(i,E),(!D||4&t)&&J(d,e[2]),(!D||1&t)&&C!==(C=(e[0].description??"")+"")&&J(h,C)},i(e){D||(Fe(A),D=!0)},o(e){Oe(A),D=!1},d(e){e&&P(t),A&&A.d(),x=!1,w(k)}}}function Na(e,n,a){const r=he();let{event:i}=n,{category:o}=n,{date:s}=n;return e.$$set=e=>{"event"in e&&a(0,i=e.event),"category"in e&&a(1,o=e.category),"date"in e&&a(2,s=e.date)},[i,o,s,r,e=>{new t.ExtraButtonComponent(e).setIcon("trash").setTooltip("Delete").extraSettingsEl.setAttr("style","margin-left: 0;")},e=>{new t.ExtraButtonComponent(e).setIcon("pencil").setTooltip("Edit")},()=>r("edit"),()=>r("delete")]}const Fa=class extends He{constructor(e){super(),Pe(this,e,Na,Ia,x,{event:0,category:1,date:2},Ma)}};function Oa(e,t,n){const a=e.slice();return a[10]=t[n],a}function La(e){let t,n,a=e[0],r=[];for(let t=0;t<a.length;t+=1)r[t]=Ra(Oa(e,a,t));const i=e=>Oe(r[e],1,1,(()=>{r[e]=null}));return{c(){t=G("div");for(let e=0;e<r.length;e+=1)r[e].c();K(t,"class","existing-items")},m(e,a){V(e,t,a);for(let e=0;e<r.length;e+=1)r[e].m(t,null);n=!0},p(e,n){if(31&n){let o;for(a=e[0],o=0;o<a.length;o+=1){const i=Oa(e,a,o);r[o]?(r[o].p(i,n),Fe(r[o],1)):(r[o]=Ra(i),r[o].c(),Fe(r[o],1),r[o].m(t,null))}for(Ie(),o=a.length;o<r.length;o+=1)i(o);Ne()}},i(e){if(!n){for(let e=0;e<a.length;e+=1)Fe(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Oe(r[e]);n=!1},d(e){e&&P(t),H(r,e)}}}function Ba(e){let t;return{c(){t=G("div"),t.innerHTML="<span>Create a new event to see it here.</span>",K(t,"class","existing-items")},m(e,n){V(e,t,n)},p:g,i:g,o:g,d(e){e&&P(t)}}}function Ra(e){let t,n;return t=new Fa({props:{event:e[10],category:e[4](e[10].category),date:h(e[10].date,e[1],e[10].end)}}),t.$on("edit",(function(){return e[6](e[10])})),t.$on("delete",(function(){return e[7](e[10])})),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(n,a){e=n;const r={};1&a&&(r.event=e[10]),1&a&&(r.category=e[4](e[10].category)),3&a&&(r.date=h(e[10].date,e[1],e[10].end)),t.$set(r)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function _a(e){let t,n,a,r;const i=[Ba,La],o=[];function s(e,t){return e[0].length?1:0}return t=s(e),n=o[t]=i[t](e),{c(){n.c(),a=Y()},m(e,n){o[t].m(e,n),V(e,a,n),r=!0},p(e,r){let l=t;t=s(e),t===l?o[t].p(e,r):(Ie(),Oe(o[l],1,1,(()=>{o[l]=null})),Ne(),n=o[t],n?n.p(e,r):(n=o[t]=i[t](e),n.c()),Fe(n,1),n.m(a.parentNode,a))},i(e){r||(Fe(n),r=!0)},o(e){Oe(n),r=!1},d(e){o[t].d(e),e&&P(a)}}}function ja(e){let t,n;return t=new Qn({props:{label:"Event",$$slots:{default:[_a]},$$scope:{ctx:e}}}),t.$on("new-item",e[8]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,[n]){const a={};8195&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Va(e,t,n){let{categories:a=[]}=t,{events:r=[]}=t,{months:i=[]}=t;const o=he(),s=e=>{o("new-item",e)},l=e=>{n(0,r=r.filter((t=>t.id!==e.id))),o("edit-events",r)};return e.$$set=e=>{"categories"in e&&n(5,a=e.categories),"events"in e&&n(0,r=e.events),"months"in e&&n(1,i=e.months)},e.$$.update=()=>{1&e.$$.dirty&&r.sort(((e,t)=>e.date.year!=t.date.year?e.date.year-t.date.year:e.date.month!=t.date.month?e.date.month-t.date.month:e.date.day-t.date.day))},[r,i,s,l,e=>a.find((({id:t})=>t==e)),a,e=>s(e),e=>l(e),function(t){me.call(this,e,t)}]}const Pa=class extends He{constructor(e){super(),Pe(this,e,Va,ja,x,{categories:5,events:0,months:1})}},Ha="#808080",Ga=["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"],Wa={"New Moon":Ga[0],"New Moon Fading":Ga[1],"New Moon Faded":Ga[2],"Waxing Crescent Rising":Ga[3],"Waxing Crescent Risen":Ga[4],"Waxing Crescent":Ga[6],"Waxing Crescent Fading":Ga[7],"Waxing Crescent Faded":Ga[8],"First Quarter Rising":Ga[9],"First Quarter Risen":Ga[10],"First Quarter":Ga[12],"First Quarter Fading":Ga[13],"First Quarter Faded":Ga[14],"Waxing Gibbous Rising":Ga[15],"Waxing Gibbous Risen":Ga[16],"Waxing Gibbous":Ga[18],"Waxing Gibbous Fading":Ga[19],"Waxing Gibbous Faded":Ga[20],"Full Moon Rising":Ga[21],"Full Moon Risen":Ga[22],"Full Moon":Ga[24],"Full Moon Fading":Ga[25],"Full Moon Faded":Ga[26],"Waning Gibbous Rising":Ga[27],"Waning Gibbous Risen":Ga[28],"Waning Gibbous":Ga[30],"Waning Gibbous Fading":Ga[31],"Waning Gibbous Faded":Ga[32],"Last Quarter Rising":Ga[33],"Last Quarter Risen":Ga[34],"Last Quarter":Ga[36],"Last Quarter Fading":Ga[37],"Last Quarter Faded":Ga[38],"Waning Crescent Rising":Ga[39],"Waning Crescent Risen":Ga[40],"Waning Crescent":Ga[42],"Waning Crescent Fading":Ga[43],"Waning Crescent Faded":Ga[44],"New Moon Rising":Ga[45],"New Moon Risen":Ga[46]},Ua={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 za(e){R(e,"svelte-1ok7o99",".category.svelte-1ok7o99{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:0.5rem;padding-top:0.75rem}")}function Ya(e,t,n){const a=e.slice();return a[7]=t[n],a}function Za(e){let t,n=e[0],a=[];for(let t=0;t<n.length;t+=1)a[t]=Qa(Ya(e,n,t));return{c(){t=G("div");for(let e=0;e<a.length;e+=1)a[e].c();K(t,"class","existing-items")},m(e,n){V(e,t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null)},p(e,r){if(9&r){let i;for(n=e[0],i=0;i<n.length;i+=1){const o=Ya(e,n,i);a[i]?a[i].p(o,r):(a[i]=Qa(o),a[i].c(),a[i].m(t,null))}for(;i<a.length;i+=1)a[i].d(1);a.length=n.length}},d(e){e&&P(t),H(a,e)}}}function Ka(e){let t;return{c(){t=G("div"),t.innerHTML="<span>Create a new category to see it here.</span>",K(t,"class","existing-items")},m(e,n){V(e,t,n)},p:g,d(e){e&&P(t)}}}function Qa(e){let t,n,a,r,i,o,s,l,d,c,u,h,f;function p(...t){return e[5](e[7],...t)}return{c(){t=G("div"),n=G("div"),r=z(),i=G("div"),o=G("input"),l=z(),d=G("div"),u=z(),K(o,"type","color"),o.value=s=e[7].color,K(i,"class","color"),K(t,"class","category svelte-1ok7o99")},m(s,m){V(s,t,m),B(t,n),B(t,r),B(t,i),B(i,o),B(t,l),B(t,d),B(t,u),h||(f=[M(a=e[1].call(null,n,e[7])),Z(o,"change",p),M(c=e[2].call(null,d,e[7]))],h=!0)},p(t,n){e=t,a&&D(a.update)&&1&n&&a.update.call(null,e[7]),1&n&&s!==(s=e[7].color)&&(o.value=s),c&&D(c.update)&&1&n&&c.update.call(null,e[7])},d(e){e&&P(t),h=!1,w(f)}}}function Ja(e){let t;function n(e,t){return e[0].length?Za:Ka}let a=n(e),r=a(e);return{c(){r.c(),t=Y()},m(e,n){r.m(e,n),V(e,t,n)},p(e,i){a===(a=n(e))&&r?r.p(e,i):(r.d(1),r=a(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&P(t)}}}function Xa(e){let t,n;return t=new Qn({props:{label:"Event Categories",$$slots:{default:[Ja]},$$scope:{ctx:e}}}),t.$on("new-item",e[4]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,[n]){const a={};1025&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function er(e,n,a){const r=he();let{categories:i=[]}=n;const o=(e,t)=>{const{target:n}=e;n instanceof HTMLInputElement&&(t.color=n.value,r("update",t))};return e.$$set=e=>{"categories"in e&&a(0,i=e.categories)},[i,(e,n)=>{new t.TextComponent(e).setValue(n.name).setPlaceholder("Name").onChange((e=>{n.name=e,r("update",n)})).inputEl.setAttr("style","width: 100%;")},(e,n)=>{new t.ExtraButtonComponent(e).setIcon("trash").onClick((()=>{a(0,i=i.filter((e=>e.id!==n.id))),r("delete",n)}))},o,()=>{const e={id:d(),color:Ha,name:"Category"};a(0,i),r("new",e)},(e,t)=>o(t,e)]}const tr=class extends He{constructor(e){super(),Pe(this,e,er,Xa,x,{categories:0},za)}};function nr(t,n,a={cta:"Yes",secondary:"No"}){return e(this,void 0,void 0,(function*(){return new Promise(((e,r)=>{const i=new ar(t,n,a);i.onClose=()=>{e(i.confirmed)},i.open()}))}))}class ar extends t.Modal{constructor(e,t,n){super(e),this.text=t,this.buttons=n,this.confirmed=!1}display(){return e(this,void 0,void 0,(function*(){new Promise((e=>{this.contentEl.empty(),this.contentEl.addClass("confirm-modal"),this.contentEl.createEl("p",{text:this.text});const n=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new t.ButtonComponent(n).setButtonText(this.buttons.cta).setCta().onClick((()=>{this.confirmed=!0,this.close()})),new t.ButtonComponent(n).setButtonText(this.buttons.secondary).onClick((()=>{this.close()}))}))}))}onOpen(){this.display()}}function rr(e){R(e,"svelte-1f06yhl",".use-custom.svelte-1f06yhl.svelte-1f06yhl{padding-top:0.75rem}.weekday.svelte-1f06yhl.svelte-1f06yhl{display:grid;grid-template-columns:auto 1fr auto;align-items:center;justify-content:space-between;gap:1rem}.weekday.svelte-1f06yhl .icon.svelte-1f06yhl{align-items:center}.weekday.svelte-1f06yhl.svelte-1f06yhl{margin-top:0.5rem}")}function ir(e,t,n){const a=e.slice();return a[13]=t[n],a}function or(e){let t,n,a,r,i=[],o=new Map,s=e[1];const l=e=>e[13].id;for(let t=0;t<s.length;t+=1){let n=ir(e,s,t),a=l(n);o.set(a,i[t]=lr(a,n))}return{c(){t=G("div");for(let e=0;e<i.length;e+=1)i[e].c();K(t,"class","existing-items")},m(o,s){V(o,t,s);for(let e=0;e<i.length;e+=1)i[e].m(t,null);a||(r=[M(n=Gn.call(null,t,{items:e[1],flipDurationMs:hr,dragDisabled:e[2]})),Z(t,"consider",e[9]),Z(t,"finalize",e[10])],a=!0)},p(e,a){if(258&a){s=e[1];for(let e=0;e<i.length;e+=1)i[e].r();i=Re(i,a,l,1,e,s,o,t,Le,lr,null,ir);for(let e=0;e<i.length;e+=1)i[e].a()}n&&D(n.update)&&6&a&&n.update.call(null,{items:e[1],flipDurationMs:hr,dragDisabled:e[2]})},d(e){e&&P(t);for(let e=0;e<i.length;e+=1)i[e].d();a=!1,w(r)}}}function sr(e){let t;return{c(){t=G("div"),t.innerHTML="<span>Create a new year to see it here.</span>",K(t,"class","existing-items")},m(e,n){V(e,t,n)},p:g,d(e){e&&P(t)}}}function lr(e,t){let n,a,r,i,o,s,l,d,c,u,h,f,p,m=g;return{key:e,first:null,c(){n=G("div"),a=G("div"),i=z(),o=G("div"),l=z(),d=G("div"),u=z(),K(a,"class","icon svelte-1f06yhl"),K(d,"class","icon svelte-1f06yhl"),K(n,"class","weekday svelte-1f06yhl"),this.first=n},m(e,h){V(e,n,h),B(n,a),B(n,i),B(n,o),B(n,l),B(n,d),B(n,u),f||(p=[M(r=t[4].call(null,a)),Z(a,"mousedown",t[8]),Z(a,"touchstart",t[8]),M(s=t[6].call(null,o,t[13])),M(c=t[5].call(null,d,t[13]))],f=!0)},p(e,n){t=e,s&&D(s.update)&&2&n&&s.update.call(null,t[13]),c&&D(c.update)&&2&n&&c.update.call(null,t[13])},r(){h=n.getBoundingClientRect()},f(){le(n),m()},a(){m(),m=se(n,h,We,{duration:hr})},d(e){e&&P(n),f=!1,w(p)}}}function dr(e){let t;function n(e,t){return e[1]&&e[1].length?or:sr}let a=n(e),r=a(e);return{c(){r.c(),t=Y()},m(e,n){r.m(e,n),V(e,t,n)},p(e,i){a===(a=n(e))&&r?r.p(e,i):(r.d(1),r=a(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&P(t)}}}function cr(e){let t,n,a,r;return{c(){t=G("div"),K(t,"class","use-custom svelte-1f06yhl")},m(i,o){V(i,t,o),a||(r=M(n=e[7].call(null,t)),a=!0)},d(e){e&&P(t),a=!1,r()}}}function ur(e){let t,n;return t=new Qn({props:{label:"Years",disabled:!e[0],$$slots:{"pre-add":[cr],default:[dr]},$$scope:{ctx:e}}}),t.$on("new-item",e[3]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,[n]){const a={};1&n&&(a.disabled=!e[0]),65542&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}const hr=300;function fr(n,a,r){let{useCustomYears:i}=a,{years:o}=a,{app:s}=a,l=!1;const c=he();return n.$$set=e=>{"useCustomYears"in e&&r(0,i=e.useCustomYears),"years"in e&&r(1,o=e.years),"app"in e&&r(11,s=e.app)},n.$$.update=()=>{2&n.$$.dirty&&c("years-update",o),1&n.$$.dirty&&c("use-custom-update",i)},[i,o,l,()=>{o||r(1,o=[]),r(1,o=[...o,{name:null,id:d(),type:"year"}])},e=>{(0,t.setIcon)(e,"fantasy-calendar-grip")},(e,n)=>{new t.ExtraButtonComponent(e).setIcon("trash").onClick((()=>r(1,o=o.filter((e=>e.id!==n.id)))))},(e,n)=>{new t.TextComponent(e).setValue(n.name).setPlaceholder("Name").onChange((e=>{n.name=e,c("years-update",o),r(1,o)})).inputEl.setAttr("style","width: 100%;")},n=>{new t.Setting(n).setName("Use Custom Years").setDesc(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)))).addToggle((t=>{let n=!1;t.setValue(i).onChange((a=>e(void 0,void 0,void 0,(function*(){!n&&i&&(null==o?void 0:o.length)?((yield nr(s,"The custom years you have created will be removed. Proceed?"))&&(r(1,o=[]),r(0,i=a),n=!1),n=!0,t.setValue(i)):(n=!1,r(0,i=a))}))))}))},function(e){e.preventDefault(),r(2,l=!1)},function(e){const{items:t,info:{source:n,trigger:a}}=e.detail;r(1,o=t),n===lt&&a===ot&&r(2,l=!0)},function(e){const{items:t,info:{source:n}}=e.detail;r(1,o=t),n===st&&r(2,l=!0)},s]}const pr=class extends He{constructor(e){super(),Pe(this,e,fr,ur,x,{useCustomYears:0,years:1,app:11},rr)}};function mr(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect();return{width:n.width/1,height:n.height/1,top:n.top/1,right:n.right/1,bottom:n.bottom/1,left:n.left/1,x:n.left/1,y:n.top/1}}function gr(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function yr(e){var t=gr(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vr(e){return e instanceof gr(e).Element||e instanceof Element}function br(e){return e instanceof gr(e).HTMLElement||e instanceof HTMLElement}function wr(e){return"undefined"!=typeof ShadowRoot&&(e instanceof gr(e).ShadowRoot||e instanceof ShadowRoot)}function Dr(e){return e?(e.nodeName||"").toLowerCase():null}function xr(e){return((vr(e)?e.ownerDocument:e.document)||window.document).documentElement}function kr(e){return mr(xr(e)).left+yr(e).scrollLeft}function Er(e){return gr(e).getComputedStyle(e)}function Cr(e){var t=Er(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Ar(e,t,n){void 0===n&&(n=!1);var a,r,i=br(t),o=br(t)&&function(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,a=t.height/e.offsetHeight||1;return 1!==n||1!==a}(t),s=xr(t),l=mr(e,o),d={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(i||!i&&!n)&&(("body"!==Dr(t)||Cr(s))&&(d=(a=t)!==gr(a)&&br(a)?{scrollLeft:(r=a).scrollLeft,scrollTop:r.scrollTop}:yr(a)),br(t)?((c=mr(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=kr(s))),{x:l.left+d.scrollLeft-c.x,y:l.top+d.scrollTop-c.y,width:l.width,height:l.height}}function Tr(e){var t=mr(e),n=e.offsetWidth,a=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-a)<=1&&(a=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:a}}function Sr(e){return"html"===Dr(e)?e:e.assignedSlot||e.parentNode||(wr(e)?e.host:null)||xr(e)}function $r(e){return["html","body","#document"].indexOf(Dr(e))>=0?e.ownerDocument.body:br(e)&&Cr(e)?e:$r(Sr(e))}function Mr(e,t){var n;void 0===t&&(t=[]);var a=$r(e),r=a===(null==(n=e.ownerDocument)?void 0:n.body),i=gr(a),o=r?[i].concat(i.visualViewport||[],Cr(a)?a:[]):a,s=t.concat(o);return r?s:s.concat(Mr(Sr(o)))}function qr(e){return["table","td","th"].indexOf(Dr(e))>=0}function Ir(e){return br(e)&&"fixed"!==Er(e).position?e.offsetParent:null}function Nr(e){for(var t=gr(e),n=Ir(e);n&&qr(n)&&"static"===Er(n).position;)n=Ir(n);return n&&("html"===Dr(n)||"body"===Dr(n)&&"static"===Er(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&br(e)&&"fixed"===Er(e).position)return null;for(var n=Sr(e);br(n)&&["html","body"].indexOf(Dr(n))<0;){var a=Er(n);if("none"!==a.transform||"none"!==a.perspective||"paint"===a.contain||-1!==["transform","perspective"].indexOf(a.willChange)||t&&"filter"===a.willChange||t&&a.filter&&"none"!==a.filter)return n;n=n.parentNode}return null}(e)||t}var Fr="top",Or="bottom",Lr="right",Br="left",Rr="auto",_r=[Fr,Or,Lr,Br],jr="start",Vr="end",Pr="viewport",Hr="popper",Gr=_r.reduce((function(e,t){return e.concat([t+"-"+jr,t+"-"+Vr])}),[]),Wr=[].concat(_r,[Rr]).reduce((function(e,t){return e.concat([t,t+"-"+jr,t+"-"+Vr])}),[]),Ur=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zr(e){var t=new Map,n=new Set,a=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var a=t.get(e);a&&r(a)}})),a.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),a}var Yr={placement:"bottom",modifiers:[],strategy:"absolute"};function Zr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Kr(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,a=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?Yr:r;return function(e,t,n){void 0===n&&(n=i);var r,o,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Yr,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],d=!1,c={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;u(),s.options=Object.assign({},i,s.options,r),s.scrollParents={reference:vr(e)?Mr(e):e.contextElement?Mr(e.contextElement):[],popper:Mr(t)};var o,d,h=function(e){var t=zr(e);return Ur.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((o=[].concat(a,s.options.modifiers),d=o.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(d).map((function(e){return d[e]}))));return s.orderedModifiers=h.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,a=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var i=r({state:s,name:t,instance:c,options:a});l.push(i||function(){})}})),c.update()},forceUpdate:function(){if(!d){var e=s.elements,t=e.reference,n=e.popper;if(Zr(t,n)){s.rects={reference:Ar(t,Nr(n),"fixed"===s.options.strategy),popper:Tr(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var a=0;a<s.orderedModifiers.length;a++)if(!0!==s.reset){var r=s.orderedModifiers[a],i=r.fn,o=r.options,l=void 0===o?{}:o,u=r.name;"function"==typeof i&&(s=i({state:s,options:l,name:u,instance:c})||s)}else s.reset=!1,a=-1}}},update:(r=function(){return new Promise((function(e){c.forceUpdate(),e(s)}))},function(){return o||(o=new Promise((function(e){Promise.resolve().then((function(){o=void 0,e(r())}))}))),o}),destroy:function(){u(),d=!0}};if(!Zr(e,t))return c;function u(){l.forEach((function(e){return e()})),l=[]}return c.setOptions(n).then((function(e){!d&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var Qr={passive:!0};const Jr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,a=e.options,r=a.scroll,i=void 0===r||r,o=a.resize,s=void 0===o||o,l=gr(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&d.forEach((function(e){e.addEventListener("scroll",n.update,Qr)})),s&&l.addEventListener("resize",n.update,Qr),function(){i&&d.forEach((function(e){e.removeEventListener("scroll",n.update,Qr)})),s&&l.removeEventListener("resize",n.update,Qr)}},data:{}};function Xr(e){return e.split("-")[0]}function ei(e){return e.split("-")[1]}function ti(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ni(e){var t,n=e.reference,a=e.element,r=e.placement,i=r?Xr(r):null,o=r?ei(r):null,s=n.x+n.width/2-a.width/2,l=n.y+n.height/2-a.height/2;switch(i){case Fr:t={x:s,y:n.y-a.height};break;case Or:t={x:s,y:n.y+n.height};break;case Lr:t={x:n.x+n.width,y:l};break;case Br:t={x:n.x-a.width,y:l};break;default:t={x:n.x,y:n.y}}var d=i?ti(i):null;if(null!=d){var c="y"===d?"height":"width";switch(o){case jr:t[d]=t[d]-(n[c]/2-a[c]/2);break;case Vr:t[d]=t[d]+(n[c]/2-a[c]/2)}}return t}const ai={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ni({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var ri=Math.max,ii=Math.min,oi=Math.round,si={top:"auto",right:"auto",bottom:"auto",left:"auto"};function li(e){var t,n=e.popper,a=e.popperRect,r=e.placement,i=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,d=e.adaptive,c=e.roundOffsets,u=!0===c?function(e){var t=e.x,n=e.y,a=window.devicePixelRatio||1;return{x:oi(oi(t*a)/a)||0,y:oi(oi(n*a)/a)||0}}(o):"function"==typeof c?c(o):o,h=u.x,f=void 0===h?0:h,p=u.y,m=void 0===p?0:p,g=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=Br,b=Fr,w=window;if(d){var D=Nr(n),x="clientHeight",k="clientWidth";D===gr(n)&&"static"!==Er(D=xr(n)).position&&"absolute"===s&&(x="scrollHeight",k="scrollWidth"),D=D,r!==Fr&&(r!==Br&&r!==Lr||i!==Vr)||(b=Or,m-=D[x]-a.height,m*=l?1:-1),r!==Br&&(r!==Fr&&r!==Or||i!==Vr)||(v=Lr,f-=D[k]-a.width,f*=l?1:-1)}var E,C=Object.assign({position:s},d&&si);return l?Object.assign({},C,((E={})[b]=y?"0":"",E[v]=g?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",E)):Object.assign({},C,((t={})[b]=y?m+"px":"",t[v]=g?f+"px":"",t.transform="",t))}var di={left:"right",right:"left",bottom:"top",top:"bottom"};function ci(e){return e.replace(/left|right|bottom|top/g,(function(e){return di[e]}))}var ui={start:"end",end:"start"};function hi(e){return e.replace(/start|end/g,(function(e){return ui[e]}))}function fi(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&wr(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function pi(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mi(e,t){return t===Pr?pi(function(e){var t=gr(e),n=xr(e),a=t.visualViewport,r=n.clientWidth,i=n.clientHeight,o=0,s=0;return a&&(r=a.width,i=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=a.offsetLeft,s=a.offsetTop)),{width:r,height:i,x:o+kr(e),y:s}}(e)):br(t)?function(e){var t=mr(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):pi(function(e){var t,n=xr(e),a=yr(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=ri(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=ri(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-a.scrollLeft+kr(e),l=-a.scrollTop;return"rtl"===Er(r||n).direction&&(s+=ri(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}(xr(e)))}function gi(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function yi(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function vi(e,t){void 0===t&&(t={});var n=t,a=n.placement,r=void 0===a?e.placement:a,i=n.boundary,o=void 0===i?"clippingParents":i,s=n.rootBoundary,l=void 0===s?Pr:s,d=n.elementContext,c=void 0===d?Hr:d,u=n.altBoundary,h=void 0!==u&&u,f=n.padding,p=void 0===f?0:f,m=gi("number"!=typeof p?p:yi(p,_r)),g=c===Hr?"reference":Hr,y=e.rects.popper,v=e.elements[h?g:c],b=function(e,t,n){var a="clippingParents"===t?function(e){var t=Mr(Sr(e)),n=["absolute","fixed"].indexOf(Er(e).position)>=0&&br(e)?Nr(e):e;return vr(n)?t.filter((function(e){return vr(e)&&fi(e,n)&&"body"!==Dr(e)})):[]}(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce((function(t,n){var a=mi(e,n);return t.top=ri(a.top,t.top),t.right=ii(a.right,t.right),t.bottom=ii(a.bottom,t.bottom),t.left=ri(a.left,t.left),t}),mi(e,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}(vr(v)?v:v.contextElement||xr(e.elements.popper),o,l),w=mr(e.elements.reference),D=ni({reference:w,element:y,strategy:"absolute",placement:r}),x=pi(Object.assign({},y,D)),k=c===Hr?x:w,E={top:b.top-k.top+m.top,bottom:k.bottom-b.bottom+m.bottom,left:b.left-k.left+m.left,right:k.right-b.right+m.right},C=e.modifiersData.offset;if(c===Hr&&C){var A=C[r];Object.keys(E).forEach((function(e){var t=[Lr,Or].indexOf(e)>=0?1:-1,n=[Fr,Or].indexOf(e)>=0?"y":"x";E[e]+=A[n]*t}))}return E}const bi={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var r=n.mainAxis,i=void 0===r||r,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,d=n.padding,c=n.boundary,u=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,y=Xr(g),v=l||(y!==g&&p?function(e){if(Xr(e)===Rr)return[];var t=ci(e);return[hi(e),t,hi(t)]}(g):[ci(g)]),b=[g].concat(v).reduce((function(e,n){return e.concat(Xr(n)===Rr?function(e,t){void 0===t&&(t={});var n=t,a=n.placement,r=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,d=void 0===l?Wr:l,c=ei(a),u=c?s?Gr:Gr.filter((function(e){return ei(e)===c})):_r,h=u.filter((function(e){return d.indexOf(e)>=0}));0===h.length&&(h=u);var f=h.reduce((function(t,n){return t[n]=vi(e,{placement:n,boundary:r,rootBoundary:i,padding:o})[Xr(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:c,rootBoundary:u,padding:d,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,D=t.rects.popper,x=new Map,k=!0,E=b[0],C=0;C<b.length;C++){var A=b[C],T=Xr(A),S=ei(A)===jr,$=[Fr,Or].indexOf(T)>=0,M=$?"width":"height",q=vi(t,{placement:A,boundary:c,rootBoundary:u,altBoundary:h,padding:d}),I=$?S?Lr:Br:S?Or:Fr;w[M]>D[M]&&(I=ci(I));var N=ci(I),F=[];if(i&&F.push(q[T]<=0),s&&F.push(q[I]<=0,q[N]<=0),F.every((function(e){return e}))){E=A,k=!1;break}x.set(A,F)}if(k)for(var O=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},L=p?3:1;L>0&&"break"!==O(L);L--);t.placement!==E&&(t.modifiersData[a]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function wi(e,t,n){return ri(e,ii(t,n))}function Di(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xi(e){return[Fr,Lr,Or,Br].some((function(t){return e[t]>=0}))}var ki=Kr({defaultModifiers:[Jr,ai,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,a=n.gpuAcceleration,r=void 0===a||a,i=n.adaptive,o=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,d={placement:Xr(t.placement),variation:ei(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,li(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,li(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},a=t.attributes[e]||{},r=t.elements[e];br(r)&&Dr(r)&&(Object.assign(r.style,n),Object.keys(a).forEach((function(e){var t=a[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var a=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});br(a)&&Dr(a)&&(Object.assign(a.style,i),Object.keys(r).forEach((function(e){a.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=void 0===r?[0,0]:r,o=Wr.reduce((function(e,n){return e[n]=function(e,t,n){var a=Xr(e),r=[Br,Fr].indexOf(a)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,o=i[0],s=i[1];return o=o||0,s=(s||0)*r,[Br,Lr].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,i),e}),{}),s=o[t.placement],l=s.x,d=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[a]=o}},bi,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,a=e.name,r=n.mainAxis,i=void 0===r||r,o=n.altAxis,s=void 0!==o&&o,l=n.boundary,d=n.rootBoundary,c=n.altBoundary,u=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,m=void 0===p?0:p,g=vi(t,{boundary:l,rootBoundary:d,padding:u,altBoundary:c}),y=Xr(t.placement),v=ei(t.placement),b=!v,w=ti(y),D="x"===w?"y":"x",x=t.modifiersData.popperOffsets,k=t.rects.reference,E=t.rects.popper,C="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,A={x:0,y:0};if(x){if(i||s){var T="y"===w?Fr:Br,S="y"===w?Or:Lr,$="y"===w?"height":"width",M=x[w],q=x[w]+g[T],I=x[w]-g[S],N=f?-E[$]/2:0,F=v===jr?k[$]:E[$],O=v===jr?-E[$]:-k[$],L=t.elements.arrow,B=f&&L?Tr(L):{width:0,height:0},R=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},_=R[T],j=R[S],V=wi(0,k[$],B[$]),P=b?k[$]/2-N-V-_-C:F-V-_-C,H=b?-k[$]/2+N+V+j+C:O+V+j+C,G=t.elements.arrow&&Nr(t.elements.arrow),W=G?"y"===w?G.clientTop||0:G.clientLeft||0:0,U=t.modifiersData.offset?t.modifiersData.offset[t.placement][w]:0,z=x[w]+P-U-W,Y=x[w]+H-U;if(i){var Z=wi(f?ii(q,z):q,M,f?ri(I,Y):I);x[w]=Z,A[w]=Z-M}if(s){var K="x"===w?Fr:Br,Q="x"===w?Or:Lr,J=x[D],X=J+g[K],ee=J-g[Q],te=wi(f?ii(X,z):X,J,f?ri(ee,Y):ee);x[D]=te,A[D]=te-J}}t.modifiersData[a]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,a=e.name,r=e.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Xr(n.placement),l=ti(s),d=[Br,Lr].indexOf(s)>=0?"height":"width";if(i&&o){var c=function(e,t){return gi("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:yi(e,_r))}(r.padding,n),u=Tr(i),h="y"===l?Fr:Br,f="y"===l?Or:Lr,p=n.rects.reference[d]+n.rects.reference[l]-o[l]-n.rects.popper[d],m=o[l]-n.rects.reference[l],g=Nr(i),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=p/2-m/2,b=c[h],w=y-u[d]-c[f],D=y/2-u[d]/2+v,x=wi(b,D,w),k=l;n.modifiersData[a]=((t={})[k]=x,t.centerOffset=x-D,t)}},effect:function(e){var t=e.state,n=e.options.element,a=void 0===n?"[data-popper-arrow]":n;null!=a&&("string"!=typeof a||(a=t.elements.popper.querySelector(a)))&&fi(t.elements.popper,a)&&(t.elements.arrow=a)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=vi(t,{elementContext:"reference"}),s=vi(t,{altBoundary:!0}),l=Di(o,a),d=Di(s,r,i),c=xi(l),u=xi(d);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":u})}}]});class Ei{constructor(e,t,n){this.containerEl=t,this.owner=e,t.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),t.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),n.register([],"ArrowUp",(()=>(this.setSelectedItem(this.selectedItem-1,!0),!1))),n.register([],"ArrowDown",(()=>(this.setSelectedItem(this.selectedItem+1,!0),!1))),n.register([],"Enter",(e=>(this.useSelectedItem(e),!1))),n.register([],"Tab",(e=>(this.chooseSuggestion(e),!1)))}chooseSuggestion(e){if(!this.items||!this.items.length)return;const t=this.items[this.selectedItem];t&&this.owner.onChooseSuggestion(t,e)}onSuggestionClick(e,t){if(e.preventDefault(),!this.suggestions||!this.suggestions.length)return;const n=this.suggestions.indexOf(t);this.setSelectedItem(n,!1),this.useSelectedItem(e)}onSuggestionMouseover(e,t){if(!this.suggestions||!this.suggestions.length)return;const n=this.suggestions.indexOf(t);this.setSelectedItem(n,!1)}empty(){this.containerEl.empty()}setSuggestions(e){this.containerEl.empty();const t=[];e.forEach((e=>{const n=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(e,n),t.push(n)})),this.items=e,this.suggestions=t,this.setSelectedItem(0,!1)}useSelectedItem(e){if(!this.items||!this.items.length)return;const t=this.items[this.selectedItem];t&&this.owner.selectSuggestion(t,e)}wrap(e,t){return(e%t+t)%t}setSelectedItem(e,t){const n=this.wrap(e,this.suggestions.length),a=this.suggestions[this.selectedItem],r=this.suggestions[n];a&&a.removeClass("is-selected"),r&&r.addClass("is-selected"),this.selectedItem=n,t&&r.scrollIntoView(!1)}}class Ci extends t.FuzzySuggestModal{constructor(e,n,a){super(e),this.items=[],this.scope=new t.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 Ei(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",(e=>{e.preventDefault()}))}empty(){this.suggester.empty()}onInputChanged(){if(this.shouldNotOpen)return;const e=this.modifyInput(this.inputEl.value),t=this.getSuggestions(e);t.length>0?this.suggester.setSuggestions(t.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=ki(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 t=this.promptEl.createDiv("prompt-instruction");for(let n of e)t.appendChild(n)}}class Ai extends Ci{constructor(e,t,n){super(e,t.inputEl,n),this.files=[...n],this.text=t,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(){const e=this.inputEl.value,t=this.app.metadataCache.getFirstLinkpathDest(e.split(/[\^#]/).shift()||"","");t!=this.file&&(this.file=t,this.file&&(this.cache=this.app.metadataCache.getFileCache(this.file)),this.onInputChanged())}getItemText(e){return e instanceof t.TFile?e.path:Object.prototype.hasOwnProperty.call(e,"heading")?e.heading:Object.prototype.hasOwnProperty.call(e,"id")?e.id:void 0}onChooseItem(e){e instanceof t.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 t.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),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)return i.setText(this.emptyStateText),void i.parentElement.addClass("is-selected");if(a instanceof t.TFile){let e=a.path.length-a.name.length;const t=r.matches.map((e=>createSpan("suggestion-highlight")));for(let n=e;n<a.path.length-a.extension.length-1;n++){let e=r.matches.find((e=>e[0]===n));if(e){let o=t[r.matches.indexOf(e)];i.appendChild(o),o.appendText(a.path.substring(e[0],e[1])),n+=e[1]-e[0]-1}else i.appendText(a.path[n])}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(){const e=this.inputEl.value;return/#/.test(e)?(this.modifyInput=e=>e.split(/#/).pop(),this.headings):/\^/.test(e)?(this.modifyInput=e=>e.split(/\^/).pop(),this.blocks):this.files}}class Ti extends t.Modal{constructor(e,t,n,a){super(e),this.calendar=t,this.saved=!1,this.event={name:null,description:null,date:{month:null,day:null,year:null},id:d(),note:null,category:null},n&&(this.event=Object.assign({},n),this.editing=!0),a&&(this.event.date=Object.assign({},a)),this.containerEl.addClass("fantasy-calendar-create-event")}display(){return e(this,void 0,void 0,(function*(){this.contentEl.empty(),this.contentEl.createEl("h3",{text: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 t.Setting(this.contentEl).addButton((e=>{e.setButtonText("Save").setCta().onClick((()=>{var e,n,a,r,i,o;if(null===(e=this.event.name)||void 0===e?void 0:e.length){if(this.event.end){this.event.end={year:null!==(n=this.event.end.year)&&void 0!==n?n:this.event.date.year,month:null!==(a=this.event.end.month)&&void 0!==a?a:this.event.date.month,day:null!==(r=this.event.end.day)&&void 0!==r?r:this.event.date.day};const e=this.event.date,t=this.event.end,s=Math.max(...this.calendar.static.months.map((e=>e.length))),l=s*this.calendar.static.months.length;if((e.year-1)*l+(null!==(i=e.month)&&void 0!==i?i:-1)*s+e.day>(t.year-1)*l+(null!==(o=t.month)&&void 0!==o?o:-1)*s+t.day){const e=Object.assign({},this.event.end);this.event.end=Object.assign({},this.event.date),this.event.date=Object.assign({},e)}}this.saved=!0,this.close()}else new t.Notice("The event must have a name.")}))})).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 t.Setting(this.endEl).setName("Add End Date").addToggle((e=>{e.setValue(!1).onChange((e=>this.buildEndDate()))})),this.stringEl=this.dateEl.createDiv("event-date-string setting-item-description"),this.buildDateString()}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(){var e;this.event.end=null!==(e=this.event.end)&&void 0!==e?e:Object.assign({},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:h(this.event.date,this.calendar.static.months,this.event.end)})}buildDateFields(e,n=this.event.date){e.empty();const a=e.createDiv("fantasy-calendar-date-field");a.createEl("label",{text:"Day"}),new t.TextComponent(a).setPlaceholder("Day").setValue(`${n.day}`).onChange((e=>{n.day=Number(e),this.buildDateString()})).inputEl.setAttr("type","number");const r=e.createDiv("fantasy-calendar-date-field");r.createEl("label",{text:"Month"}),new t.DropdownComponent(r).addOptions(Object.fromEntries([["select","Select Month"],...this.calendar.static.months.map((e=>[e.name,e.name]))])).setValue(null!=n.month?this.calendar.static.months[n.month].name:"select").onChange((e=>{"select"===e&&(n.month=null);const t=this.calendar.static.months.find((t=>t.name==e));n.month=this.calendar.static.months.indexOf(t),this.buildDateString()}));const i=e.createDiv("fantasy-calendar-date-field");i.createEl("label",{text:"Year"}),new t.TextComponent(i).setPlaceholder("Year").setValue(`${n.year}`).onChange((e=>{n.year=e&&null!=e?Number(e):void 0,this.buildDateString()})).inputEl.setAttr("type","number")}buildInfo(){this.infoEl.empty(),new t.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){const e=this.app.vault.getAbstractFileByPath(this.event.note);e&&e instanceof t.TFile&&n.setValue(e.basename)}const r=new Ai(this.app,n,[...a]);r.onClose=()=>e(this,void 0,void 0,(function*(){n.inputEl.blur(),this.event.note=r.file.path,this.tryParse(r.file)}))})),new t.Setting(this.infoEl).setName("Event Name").addText((e=>e.setPlaceholder("Event Name").setValue(this.event.name).onChange((e=>{this.event.name=e}))));const n=this.infoEl.createDiv("event-description");n.createEl("label",{text:"Event Description"}),new t.TextAreaComponent(n).setPlaceholder("Event Description").setValue(this.event.description).onChange((e=>{this.event.description=e})),new t.Setting(this.infoEl).setName("Event Category").addDropdown((e=>{const t=Object.fromEntries(this.calendar.categories.map((e=>[e.id,e.name])));e.addOptions(t).setValue(this.event.category).onChange((e=>this.event.category=e))}))}tryParse(t){var n,a,r,i,o;return e(this,void 0,void 0,(function*(){this.event.name=t.basename;const e=this.app.metadataCache.getFileCache(t),{frontmatter:s}=e;if(s){if("fc-date"in s){const{day:e,month:t,year:o}=s["fc-date"];if(e&&(this.event.date.day=e),t){if("string"==typeof t){const e=null!==(a=null===(n=this.calendar.static.months)||void 0===n?void 0:n.find((e=>e.name==t)))&&void 0!==a?a:null===(r=this.calendar.static.months)||void 0===r?void 0:r[0];this.event.date.month=null===(i=this.calendar.static.months)||void 0===i?void 0:i.indexOf(e)}"number"==typeof t&&(this.event.date.month=t-1)}o&&(this.event.date.year=o)}"fc-category"in s&&(this.calendar.categories.find((e=>e.name===s["fc-category"]))||this.calendar.categories.push({name:s["fantasy-category"],color:"#808080",id:d()}),this.event.category=null===(o=this.calendar.categories.find((e=>e.name===s["fc-category"])))||void 0===o?void 0:o.id)}yield this.display()}))}onOpen(){return e(this,void 0,void 0,(function*(){yield this.display()}))}}function Si(e){let t,n,a,r,i,o,s,l;return{c(){t=W("svg"),n=W("circle"),r=W("path"),o=W("circle"),K(n,"cx","16"),K(n,"cy","16"),K(n,"r","10"),K(n,"fill",a=e[0].faceColor),K(r,"class","shadow"),K(r,"fill",i=e[0].shadowColor),K(r,"d",e[4]),K(o,"cx","16"),K(o,"cy","16"),K(o,"r","10"),K(o,"fill","none"),K(o,"stroke","#000"),K(o,"stroke-width","2px"),K(t,"class","moon"),K(t,"id",s=e[0].id),K(t,"preserveAspectRatio","xMidYMid"),K(t,"aria-label",l=e[1]?`${e[0].name}\n${e[3]}`:null),K(t,"width",e[2]),K(t,"height",e[2]),K(t,"viewBox","0 0 32 32")},m(e,a){V(e,t,a),B(t,n),B(t,r),B(t,o)},p(e,[o]){1&o&&a!==(a=e[0].faceColor)&&K(n,"fill",a),1&o&&i!==(i=e[0].shadowColor)&&K(r,"fill",i),16&o&&K(r,"d",e[4]),1&o&&s!==(s=e[0].id)&&K(t,"id",s),11&o&&l!==(l=e[1]?`${e[0].name}\n${e[3]}`:null)&&K(t,"aria-label",l),4&o&&K(t,"width",e[2]),4&o&&K(t,"height",e[2])},i:g,o:g,d(e){e&&P(t)}}}function $i(e,t,n){let a,{moon:r}=t,{label:i=!0}=t,{size:o=28}=t,{phase:s}=t;return e.$$set=e=>{"moon"in e&&n(0,r=e.moon),"label"in e&&n(1,i=e.label),"size"in e&&n(2,o=e.size),"phase"in e&&n(3,s=e.phase)},e.$$.update=()=>{8&e.$$.dirty&&n(4,a=Wa[s])},[r,i,o,s,a]}const Mi=class extends He{constructor(e){super(),Pe(this,e,$i,Si,x,{moon:0,label:1,size:2,phase:3})}};function qi(e){R(e,"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 Ii(e,t,n){const a=e.slice();return a[10]=t[n],a}function Ni(e){let t,n,a=e[0],r=[];for(let t=0;t<a.length;t+=1)r[t]=Oi(Ii(e,a,t));const i=e=>Oe(r[e],1,1,(()=>{r[e]=null}));return{c(){t=G("div");for(let e=0;e<r.length;e+=1)r[e].c();K(t,"class","existing-items")},m(e,a){V(e,t,a);for(let e=0;e<r.length;e+=1)r[e].m(t,null);n=!0},p(e,n){if(35&n){let o;for(a=e[0],o=0;o<a.length;o+=1){const i=Ii(e,a,o);r[o]?(r[o].p(i,n),Fe(r[o],1)):(r[o]=Oi(i),r[o].c(),Fe(r[o],1),r[o].m(t,null))}for(Ie(),o=a.length;o<r.length;o+=1)i(o);Ne()}},i(e){if(!n){for(let e=0;e<a.length;e+=1)Fe(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Oe(r[e]);n=!1},d(e){e&&P(t),H(r,e)}}}function Fi(e){let t;return{c(){t=G("div"),t.innerHTML="<span>Create a new moon to see it here.</span>",K(t,"class","existing-items")},m(e,n){V(e,t,n)},p:g,i:g,o:g,d(e){e&&P(t)}}}function Oi(e){let t,n,a,r,i,o,s,l,d,c,u,h,f,p,m,g,y,v,b,D,x,k,E,C=e[10].name+"",A=e[10].cycle+"";function T(){return e[7](e[10])}function S(){return e[8](e[10])}return r=new Mi({props:{moon:e[10],phase:"First Quarter",label:!1,size:20}}),{c(){t=G("div"),n=G("div"),a=G("span"),_e(r.$$.fragment),i=z(),o=U(C),s=z(),l=G("div"),d=G("div"),c=U("Cycle: "),u=U(A),h=U(" days"),f=z(),p=G("div"),m=G("div"),y=z(),v=G("div"),D=z(),K(a,"class","setting-item-name svelte-v24qmo"),K(d,"class","date"),K(l,"class","setting-item-description"),K(n,"class","moon-info"),K(m,"class","icon svelte-v24qmo"),K(v,"class","icon svelte-v24qmo"),K(p,"class","icons svelte-v24qmo"),K(t,"class","moon svelte-v24qmo")},m(w,C){V(w,t,C),B(t,n),B(n,a),je(r,a,null),B(a,i),B(a,o),B(n,s),B(n,l),B(l,d),B(d,c),B(d,u),B(d,h),B(t,f),B(t,p),B(p,m),B(p,y),B(p,v),B(t,D),x=!0,k||(E=[M(g=e[4].call(null,m)),Z(m,"click",T),M(b=e[3].call(null,v)),Z(v,"click",S)],k=!0)},p(t,n){e=t;const a={};1&n&&(a.moon=e[10]),r.$set(a),(!x||1&n)&&C!==(C=e[10].name+"")&&J(o,C),(!x||1&n)&&A!==(A=e[10].cycle+"")&&J(u,A)},i(e){x||(Fe(r.$$.fragment,e),x=!0)},o(e){Oe(r.$$.fragment,e),x=!1},d(e){e&&P(t),Ve(r),k=!1,w(E)}}}function Li(e){let t,n,a,r;const i=[Fi,Ni],o=[];function s(e,t){return e[0].length?1:0}return t=s(e),n=o[t]=i[t](e),{c(){n.c(),a=Y()},m(e,n){o[t].m(e,n),V(e,a,n),r=!0},p(e,r){let l=t;t=s(e),t===l?o[t].p(e,r):(Ie(),Oe(o[l],1,1,(()=>{o[l]=null})),Ne(),n=o[t],n?n.p(e,r):(n=o[t]=i[t](e),n.c()),Fe(n,1),n.m(a.parentNode,a))},i(e){r||(Fe(n),r=!0)},o(e){Oe(n),r=!1},d(e){o[t].d(e),e&&P(a)}}}function Bi(e){let t,n,a,r;return{c(){t=G("div")},m(i,o){V(i,t,o),a||(r=M(n=e[2].call(null,t)),a=!0)},d(e){e&&P(t),a=!1,r()}}}function Ri(e){let t,n;return t=new Qn({props:{label:"Moons",$$slots:{"pre-add":[Bi],default:[Li]},$$scope:{ctx:e}}}),t.$on("new-item",e[9]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,[n]){const a={};8193&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function _i(e,n,a){let{moons:r=[]}=n,{displayMoons:i=!0}=n;const o=he(),s=e=>{a(0,r=r.filter((t=>t.id!==e.id))),o("edit-moons",r)};return e.$$set=e=>{"moons"in e&&a(0,r=e.moons),"displayMoons"in e&&a(6,i=e.displayMoons)},[r,o,e=>{new t.Setting(e).setName("Display Moons").setDesc("Display moons by default when viewing this calendar.").addToggle((e=>{e.setValue(i).onChange((e=>o("display-toggle",e)))}))},e=>{new t.ExtraButtonComponent(e).setIcon("trash").setTooltip("Delete").extraSettingsEl.setAttr("style","margin-left: 0;")},e=>{new t.ExtraButtonComponent(e).setIcon("pencil").setTooltip("Edit")},s,i,e=>o("new-item",e),e=>s(e),function(t){me.call(this,e,t)}]}const ji=class extends He{constructor(e){super(),Pe(this,e,_i,Ri,x,{moons:0,displayMoons:6},qi)}};function Vi(e){R(e,"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 Pi(e){let t,n,a,r,i,o,s,l,d,c,u,h,f,p,m,y,v=e[0].name+"";return{c(){t=G("div"),n=G("div"),a=G("span"),r=U(v),i=z(),o=G("div"),s=U(e[1]),l=z(),d=G("div"),c=G("div"),h=z(),f=G("div"),K(a,"class","setting-item-name"),K(o,"class","setting-item-description"),K(n,"class","leapday-info svelte-1rh93fc"),K(c,"class","icon svelte-1rh93fc"),K(f,"class","icon svelte-1rh93fc"),K(d,"class","icons svelte-1rh93fc"),K(t,"class","leapday svelte-1rh93fc")},m(g,v){V(g,t,v),B(t,n),B(n,a),B(a,r),B(n,i),B(n,o),B(o,s),B(t,l),B(t,d),B(d,c),B(d,h),B(d,f),m||(y=[M(u=e[4].call(null,c)),Z(c,"click",e[5]),M(p=e[3].call(null,f)),Z(f,"click",e[6])],m=!0)},p(e,[t]){1&t&&v!==(v=e[0].name+"")&&J(r,v),2&t&&J(s,e[1])},i:g,o:g,d(e){e&&P(t),m=!1,w(y)}}}function Hi(e,n,a){let r;const i=he();let{leapday:o}=n;return e.$$set=e=>{"leapday"in e&&a(0,o=e.leapday)},e.$$.update=()=>{1&e.$$.dirty&&a(1,r=c(o))},[o,r,i,e=>{new t.ExtraButtonComponent(e).setIcon("trash").setTooltip("Delete").extraSettingsEl.setAttr("style","margin-left: 0;")},e=>{new t.ExtraButtonComponent(e).setIcon("pencil").setTooltip("Edit")},()=>i("edit"),()=>i("delete")]}const Gi=class extends He{constructor(e){super(),Pe(this,e,Hi,Pi,x,{leapday:0},Vi)}};function Wi(e,t,n){const a=e.slice();return a[7]=t[n],a}function Ui(e){let t,n,a=e[0],r=[];for(let t=0;t<a.length;t+=1)r[t]=Yi(Wi(e,a,t));const i=e=>Oe(r[e],1,1,(()=>{r[e]=null}));return{c(){t=G("div");for(let e=0;e<r.length;e+=1)r[e].c();K(t,"class","existing-items")},m(e,a){V(e,t,a);for(let e=0;e<r.length;e+=1)r[e].m(t,null);n=!0},p(e,n){if(7&n){let o;for(a=e[0],o=0;o<a.length;o+=1){const i=Wi(e,a,o);r[o]?(r[o].p(i,n),Fe(r[o],1)):(r[o]=Yi(i),r[o].c(),Fe(r[o],1),r[o].m(t,null))}for(Ie(),o=a.length;o<r.length;o+=1)i(o);Ne()}},i(e){if(!n){for(let e=0;e<a.length;e+=1)Fe(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Oe(r[e]);n=!1},d(e){e&&P(t),H(r,e)}}}function zi(e){let t;return{c(){t=G("div"),t.innerHTML="<span>Create a new leap day to see it here.</span>",K(t,"class","existing-items")},m(e,n){V(e,t,n)},p:g,i:g,o:g,d(e){e&&P(t)}}}function Yi(e){let t,n;return t=new Gi({props:{leapday:e[7]}}),t.$on("edit",(function(){return e[3](e[7])})),t.$on("delete",(function(){return e[4](e[7])})),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(n,a){e=n;const r={};1&a&&(r.leapday=e[7]),t.$set(r)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Zi(e){let t,n,a,r;const i=[zi,Ui],o=[];function s(e,t){return e[0].length?1:0}return t=s(e),n=o[t]=i[t](e),{c(){n.c(),a=Y()},m(e,n){o[t].m(e,n),V(e,a,n),r=!0},p(e,r){let l=t;t=s(e),t===l?o[t].p(e,r):(Ie(),Oe(o[l],1,1,(()=>{o[l]=null})),Ne(),n=o[t],n?n.p(e,r):(n=o[t]=i[t](e),n.c()),Fe(n,1),n.m(a.parentNode,a))},i(e){r||(Fe(n),r=!0)},o(e){Oe(n),r=!1},d(e){o[t].d(e),e&&P(a)}}}function Ki(e){let t,n;return t=new Qn({props:{label:"Leap Days",$$slots:{default:[Zi]},$$scope:{ctx:e}}}),t.$on("new-item",e[5]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,[n]){const a={};1025&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Qi(e,t,n){let{leapdays:a=[]}=t;const r=he(),i=e=>{r("new-item",e)},o=e=>{n(0,a=a.filter((t=>t.id!==e.id))),r("edit-leapdays",a)};return e.$$set=e=>{"leapdays"in e&&n(0,a=e.leapdays)},[a,i,o,e=>i(e),e=>o(e),function(t){me.call(this,e,t)}]}const Ji=class extends He{constructor(e){super(),Pe(this,e,Qi,Ki,x,{leapdays:0})}};class Xi extends t.Modal{constructor(e,t,n){super(e),this.calendar=t,this.saved=!1,this.moon={name:null,cycle:null,offset:null,faceColor:"#fff",shadowColor:"#000",id:d()},n&&(this.moon=Object.assign({},n),this.editing=!0),this.containerEl.addClass("fantasy-calendar-create-moon")}display(){return e(this,void 0,void 0,(function*(){this.contentEl.empty(),this.contentEl.createEl("h3",{text:this.editing?"Edit Moon":"New Moon"}),this.infoEl=this.contentEl.createDiv("moon-info"),this.buildInfo(),new t.Setting(this.contentEl).addButton((e=>{e.setButtonText("Save").setCta().onClick((()=>{var e;(null===(e=this.moon.name)||void 0===e?void 0:e.length)?this.moon.cycle?(this.saved=!0,this.close()):new t.Notice("The moon must have a positive cycle."):new t.Notice("The moon must have a name.")}))})).addExtraButton((e=>{e.setIcon("cross").setTooltip("Cancel").onClick((()=>this.close()))}))}))}buildInfo(){this.infoEl.empty(),new t.Setting(this.infoEl).setName("Name").addText((e=>{e.setValue(this.moon.name).onChange((e=>{this.moon.name=e}))})),new t.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((e=>{isNaN(Number(e))||(this.moon.cycle=Number(e))}))})),new t.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((e=>{isNaN(Number(e))||(this.moon.offset=Number(e))}))})),new t.Setting(this.infoEl).setName("Face Color").addText((e=>{e.inputEl.setAttr("type","color"),e.setValue(this.moon.faceColor).onChange((e=>{this.moon.faceColor=e}))})),new t.Setting(this.infoEl).setName("Shadow Color").addText((e=>{e.inputEl.setAttr("type","color"),e.setValue(this.moon.shadowColor).onChange((e=>{this.moon.shadowColor=e}))}))}onOpen(){return e(this,void 0,void 0,(function*(){yield this.display()}))}}class eo extends t.Modal{constructor(e,t,n){super(e),this.calendar=t,this.saved=!1,this.leapday={id:d(),name:"Leap Day",interval:[],intercalary:!1,timespan:null,offset:0,type:"leapday"},n&&(this.leapday=Object.assign({},n),this.editing=!0),this.containerEl.addClass("fantasy-calendar-create-leapday")}display(){return e(this,void 0,void 0,(function*(){this.contentEl.empty(),this.contentEl.createEl("h3",{text:this.editing?"Edit Leap Day":"New Leap Day"}),this.infoEl=this.contentEl.createDiv("leapday-info"),this.buildInfo(),new t.Setting(this.contentEl).addButton((e=>{e.setButtonText("Save").setCta().onClick((()=>{this.leapday.interval.length?null!=this.leapday.timespan?(this.saved=!0,this.close()):new t.Notice("The leap day must be attached to a Month."):new t.Notice("The leap day must have an interval.")}))})).addExtraButton((e=>{e.setIcon("cross").setTooltip("Cancel").onClick((()=>this.close()))}))}))}buildInfo(){this.infoEl.empty(),new t.Setting(this.infoEl).setName("Name").addText((e=>{e.setValue(this.leapday.name).onChange((e=>{this.leapday.name=e}))})),new t.Setting(this.infoEl).setName("Month").setDesc("The leap day will be added to this month.").addDropdown((e=>{for(let t of this.calendar.static.months){const n=this.calendar.static.months.indexOf(t);e.addOption(`${n}`,t.name)}e.setValue(`${this.leapday.timespan}`).onChange((e=>this.leapday.timespan=Number(e)))})),new t.Setting(this.infoEl).setName("Offset").setDesc("Shift the years the leap day is applied to.").addText((e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.leapday.offset}`).onChange((e=>{isNaN(Number(e))||(this.leapday.offset=Number(e))}))})),this.conditionsEl=this.infoEl.createDiv(),this.buildConditions()}buildConditions(){this.conditionsEl.empty(),new t.ButtonComponent(this.conditionsEl).setTooltip("Add New").setButtonText("+").onClick((()=>e(this,void 0,void 0,(function*(){const e=new to(this.app,this.intervals.length>0);e.onClose=()=>{e.saved&&(this.leapday.interval.push(e.condition),this.buildConditions())},e.open()})))).buttonEl.style.width="100%",this.conditionsEl.createSpan({text:c(this.leapday),cls:"fantasy-leap-day-interval-description setting-item"});for(let e of this.intervals)new t.Setting(this.conditionsEl).setName(this.getIntervalName(e)).addExtraButton((t=>{t.setIcon("pencil").setTooltip("Edit").onClick((()=>{const t=new to(this.app,0!=this.intervals.indexOf(e),e);t.onClose=()=>{t.saved&&(this.leapday.interval.splice(this.leapday.interval.indexOf(e),1,t.condition),this.buildConditions())},t.open()}))})).addExtraButton((t=>{t.setIcon("trash").setTooltip("Delete").onClick((()=>{this.leapday.interval.splice(this.leapday.interval.indexOf(e),1),this.intervals.length&&this.intervals[0].exclusive&&(this.intervals[0].exclusive=!1),this.buildConditions()}))}))}get intervals(){return this.leapday.interval.sort(((e,t)=>e.interval-t.interval))}getIntervalName(e){const t=[`${e.interval}`];return e.exclusive&&t.push("(Exclusive)"),e.ignore&&t.push(" - Ignoring Offset"),t.join(" ")}onOpen(){return e(this,void 0,void 0,(function*(){yield this.display()}))}}class to extends t.Modal{constructor(e,t,n){super(e),this.app=e,this.canBeExclusive=t,this.saved=!1,this.editing=!1,this.condition={interval:null,exclusive:!1,ignore:!1},n&&(this.condition=Object.assign({},n),this.editing=!0)}onOpen(){this.contentEl.empty(),this.contentEl.createEl("h3",{text:"Leap Day Condition"}),new t.Setting(this.contentEl).setName("Interval").setDesc("How often the condition applies.").addText((e=>{e.inputEl.setAttr("type","number"),e.setValue(`${this.condition.interval}`).onChange((e=>{isNaN(Number(e))||(this.condition.interval=Number(e))}))})),new t.Setting(this.contentEl).setName("Exclusive").setDesc("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.").addToggle((e=>e.setDisabled(!this.canBeExclusive).setValue(this.condition.exclusive).onChange((e=>this.condition.exclusive=e)))),new t.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((e=>this.condition.ignore=e)))),this.buttonsEl=this.contentEl.createDiv("fantasy-context-buttons"),new t.ButtonComponent(this.buttonsEl).setCta().setButtonText(this.editing?"Save":"Create").onClick((()=>{this.condition.interval?(this.saved=!0,this.close()):new t.Notice("The condition requires an interval.")})),new t.ExtraButtonComponent(this.buttonsEl).setTooltip("Cancel").setIcon("cross").onClick((()=>this.close()))}}class no extends Ci{constructor(e,t,n){super(e,t.inputEl,n),this.folders=[...n],this.text=t,this.inputEl.addEventListener("input",(()=>this.getFolder()))}getFolder(){const e=this.inputEl.value,n=this.app.vault.getAbstractFileByPath(e);n!=this.folder&&n instanceof t.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 t=e.path;this.text.setValue(t),this.onClose(),this.close()}renderSuggestion(e,t){let{item:n,match:a}=e||{},r=t.createDiv({cls:"suggestion-content"});if(!n)return r.setText(this.emptyStateText),void r.parentElement.addClass("is-selected");let i=n.path.length-n.name.length;const o=a.matches.map((e=>createSpan("suggestion-highlight")));for(let e=i;e<n.path.length;e++){let t=a.matches.find((t=>t[0]===e));if(t){let i=o[a.matches.indexOf(t)];r.appendChild(i),i.appendText(n.path.substring(t[0],t[1])),e+=t[1]-t[0]-1}else r.appendText(n.path[e])}t.createDiv({cls:"suggestion-note",text:n.path})}getItems(){return this.folders}}var ao;!function(e){e.none="None",e.monthly="Monthly",e.yearly="Yearly"}(ao||(ao={})),(0,t.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,t.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>');class ro extends t.PluginSettingTab{constructor(e){super(e.app,e),this.plugin=e}get data(){return this.plugin.data}display(){return e(this,void 0,void 0,(function*(){this.containerEl.empty(),this.containerEl.createEl("h2",{text:"Fantasy Calendars"}),this.containerEl.addClass("fantasy-calendar-settings"),this.infoEl=this.containerEl.createDiv(),this.buildInfo();const n=new t.Setting(this.containerEl).setName("Import Calendar").setDesc("Import calendar from ");n.descEl.createEl("a",{href:"https://app.fantasy-calendar.com",text:"Fantasy Calendar",cls:"external-link"});const a=createEl("input",{attr:{type:"file",name:"merge",accept:".json",multiple:!0,style:"display: none;"}});a.onchange=()=>e(this,void 0,void 0,(function*(){const{files:e}=a;if(e.length){try{const t=[];for(let n of Array.from(e))t.push(JSON.parse(yield n.text()));const n=class{static import(e){var t,n,a,r,i,s,l,c,u,h,m,g,y,v,b,w,D,x,k,E,C,A,T,S,$,M,q,I;const N=[];for(let F of e){const e=null!==(t=F.name)&&void 0!==t?t:"Imported Calendar",O=F.static_data;if(!O)continue;const L=O.year_data;if(!L)continue;const B=null!==(n=L.first_day-1)&&void 0!==n?n:0,R=null===(a=L.overflow)||void 0===a||a,_=L.global_week;if(!_)continue;const j=_.map((e=>({type:"day",name:e,id:d()}))),V=L.timespans;if(!V)continue;const P=V.map((e=>({name:(0,f.decode)(e.name),type:e.type,length:e.length,id:d()}))),H=P.reduce(((e,t)=>"month"==t.type?e+t.length:e),0),G=[];if("leap_days"in L)for(let e of L.leap_days){const t=(null!==(r=e.interval.split(","))&&void 0!==r?r:["1"]).map((e=>{const t=/\+/.test(e),n=/\!/.test(e),a=e.match(/(\d+)/).first();return{ignore:t,exclusive:n,interval:Number(a)}}));G.push({name:null!==(i=e.name)&&void 0!==i?i:`Leap Day ${G.length+1}`,type:"leapday",interval:t,timespan:null!==(s=e.timespan)&&void 0!==s?s:0,intercalary:null!==(l=e.intercalary)&&void 0!==l&&l,offset:null!==(c=e.offset)&&void 0!==c?c:0,id:d()})}const W=[];if("moons"in O)for(let e of O.moons)W.push({name:null!==(u=e.name)&&void 0!==u?u:`Moon ${W.length+1}`,cycle:null!==(h=Number(e.cycle))&&void 0!==h?h:H,offset:null!==(m=e.shift)&&void 0!==m?m:0,faceColor:null!==(g=e.color)&&void 0!==g?g:"#ffffff",shadowColor:null!==(y=e.shadow_color)&&void 0!==y?y:"#000000",id:d()});const U=[];if("eras"in O)for(let e of O.eras)U.push({name:null!==(v=e.name)&&void 0!==v?v:`Era ${U.length+1}`,description:e.description,format:null!==(b=e.formatting)&&void 0!==b?b:"Year {{year}} - {{era_name}}",start:{year:null!==(D=null===(w=e.date)||void 0===w?void 0:w.year)&&void 0!==D?D:1,month:null!==(k=null===(x=e.date)||void 0===x?void 0:x.timespan)&&void 0!==k?k:0,day:null!==(C=null===(E=e.date)||void 0===E?void 0:E.day)&&void 0!==C?C:0}});const z={firstWeekDay:B,overflow:R,weekdays:j,months:P,moons:W,leapDays:G,eras:U,displayMoons:!0,incrementDay:!1,displayDayNumber:!1},Y={year:1,day:1,month:0};F.dynamic_data&&(Y.year=null!==(A=F.dynamic_data.year)&&void 0!==A?A:Y.year,Y.day=null!==(T=F.dynamic_data.day)&&void 0!==T?T:Y.day,Y.month=null!==(S=F.dynamic_data.month)&&void 0!==S?S:Y.month);const Z=[],K=new Map;if("categories"in F)for(let e of F.categories){const t=e.name,n=null!==($=null==t?void 0:t.split(" ").join("-").toLowerCase())&&void 0!==$?$:d();let a=e.event_settings.color;if(a in p)a=p[a];else{a=a.split("-").join("");const e=createEl("canvas"),t=e.getContext("2d");t.fillStyle=a,a=t.fillStyle,e.detach()}K.set(n,{name:t,id:n,color:a})}if(F.events&&Array.isArray(F.events)&&F.events.length)for(let e of F.events){const t={day:null,year:null,month:null};if(e.data&&e.data.date&&Array.isArray(null===(M=e.data)||void 0===M?void 0:M.date)&&e.data.date.length)t.day=e.data.date[2],t.month=e.data.date[1],t.year=e.data.date[0];else if(e.data&&e.data.conditions&&Array.isArray(e.data.conditions)){const n=e.data.conditions;try{const e=n.find((e=>"Year"===e[0])),a=n.find((e=>"Month"===e[0])),r=n.find((e=>"Day"===e[0]));e&&(t.year=Number(e[2][0])),a&&(t.month=Number(a[2][0])),r&&(t.day=Number(r[2][0]))}catch(e){}}let n;if(e.description){const t=createDiv();t.innerHTML=e.description,n=t.textContent}Z.push({name:e.name,description:n,id:e.id,note:null,date:t,category:null!==(I=null===(q=K.get(e.event_category_id))||void 0===q?void 0:q.id)&&void 0!==I?I:null})}const Q=(0,o.Z)({count:K.size});for(let e of K.keys()){const t=K.get(e);t.color||(t.color=Q.shift().hex(),K.set(e,t))}const J={name:e,description:null,static:z,current:Y,events:Z,id:d(),categories:Array.from(K.values())};N.push(J)}return N}}.import(t);this.plugin.data.calendars.push(...n),yield this.plugin.saveCalendar(),this.buildCalendarUI()}catch(n){new t.Notice(`There was an error while importing the calendar${1==e.length?"":"s"}.`),console.error(n)}a.value=null}})),n.addButton((e=>{e.setButtonText("Choose Files"),e.buttonEl.addClass("calendar-file-upload"),e.buttonEl.appendChild(a),e.onClick((()=>a.click()))})),this.calendarUI=this.containerEl.createDiv("fantasy-calendars"),this.buildCalendarUI()}))}buildInfo(){this.infoEl.empty(),new t.Setting(this.infoEl).setName("Default Calendar to Open").setDesc("Views will open to this calendar by default.").addDropdown((e=>{e.addOption("none","None");for(let t of this.data.calendars)e.addOption(t.id,t.name);e.setValue(this.plugin.data.defaultCalendar),e.onChange((e=>{if("none"===e)return this.plugin.data.defaultCalendar=null,void this.plugin.saveSettings();this.plugin.data.defaultCalendar=e,this.plugin.saveSettings()}))})),new t.Setting(this.infoEl).setName("Display Event Previews").setDesc("Use the core Note Preview plugin to display event notes when hovered.").addToggle((e=>{e.setValue(this.data.eventPreview).onChange((e=>{this.data.eventPreview=e,this.plugin.saveSettings()}))})),new t.Setting(this.infoEl).setName("Parse Note Titles for Dates").setDesc("The plugin will parse note titles for event dates.").addToggle((e=>{e.setValue(this.data.parseDates).onChange((e=>{this.data.parseDates=e,this.plugin.saveSettings()}))})),new t.Setting(this.infoEl).setName("Date format").setClass(this.data.dailyNotes?"daily-notes":"no-daily-notes").setDesc(createFragment((e=>{e.createSpan({text:"Dates will be parsed per this format."}),e.createEl("br"),e.createSpan({text:"Dates must include the "}),e.createEl("strong",{text:"full "}),e.createSpan({text:"year."})}))).addText((e=>{e.setDisabled(this.data.dailyNotes).setValue(this.plugin.format).onChange((e=>{this.data.dateFormat=e,this.plugin.saveSettings()}))})).addExtraButton((e=>{this.data.dailyNotes?e.setIcon("checkmark").setTooltip("Unlink from Daily Notes").onClick((()=>{this.data.dailyNotes=!1,this.buildInfo()})):e.setIcon("paper-plane-glyph").setTooltip("Link with Daily Notes").onClick((()=>{this.data.dailyNotes=!0,this.buildInfo()}))})),new t.Setting(this.infoEl).setName("Folder to Watch").setDesc("The plugin will only watch for changes in this folder.").addText((n=>{var a;let r=this.app.vault.getAllLoadedFiles().filter((e=>e instanceof t.TFolder));n.setPlaceholder(null!==(a=this.plugin.data.path)&&void 0!==a?a:"/"),new no(this.app,n,[...r]).onClose=()=>e(this,void 0,void 0,(function*(){var e;const a=(null===(e=n.inputEl.value)||void 0===e?void 0:e.trim())?n.inputEl.value.trim():"/";this.plugin.data.path=(0,t.normalizePath)(a)})),n.inputEl.onblur=()=>e(this,void 0,void 0,(function*(){var e;const a=(null===(e=n.inputEl.value)||void 0===e?void 0:e.trim())?n.inputEl.value.trim():"/";this.plugin.data.path=(0,t.normalizePath)(a)}))})),new t.Setting(this.infoEl).setClass("fantasy-calendar-config").setName(createFragment((e=>{(0,t.setIcon)(e.createSpan(),"fantasy-calendar-warning"),e.createSpan({text:"Default Config Directory"})}))).setDesc(createFragment((e=>{var t;e.createSpan({text:"Please back up your data before changing this setting. Hidden directories must be manually entered."}),e.createEl("br"),e.createSpan({text:"Current directory: "});const n=null!==(t=this.data.configDirectory)&&void 0!==t?t:this.app.vault.configDir;e.createEl("code",{text:n})}))).addText((n=>e(this,void 0,void 0,(function*(){var a;let r=this.app.vault.getAllLoadedFiles().filter((e=>e instanceof t.TFolder));n.setPlaceholder(null!==(a=this.data.configDirectory)&&void 0!==a?a:this.app.vault.configDir),new no(this.app,n,[...r]).onClose=()=>e(this,void 0,void 0,(function*(){n.inputEl.value?(yield this.app.vault.adapter.exists(n.inputEl.value))||(this.data.configDirectory=n.inputEl.value,yield this.plugin.saveSettings()):this.data.configDirectory=null})),n.inputEl.onblur=()=>e(this,void 0,void 0,(function*(){n.inputEl.value&&(yield this.app.vault.adapter.exists(n.inputEl.value),this.data.configDirectory=n.inputEl.value,yield this.plugin.saveSettings(),this.display())}))})))).addExtraButton((t=>{t.setTooltip("Reset to Default").setIcon("undo-glyph").onClick((()=>e(this,void 0,void 0,(function*(){this.data.configDirectory=null,yield this.plugin.saveSettings(),this.display()}))))}))}buildCalendarUI(){this.calendarUI.empty(),new t.Setting(this.calendarUI).setHeading().setName("Add New Calendar").addButton((t=>t.setTooltip("Add Calendar").setButtonText("+").onClick((()=>{const t=new io(this.plugin);t.onClose=()=>e(this,void 0,void 0,(function*(){if(!t.saved)return;const e=i()(t.calendar);e.current.year||(e.current.year=1),yield this.plugin.addNewCalendar(e),this.showCalendars(n)})),t.open()}))));const n=this.calendarUI.createDiv("existing-calendars");this.showCalendars(n)}showCalendars(n){var a;if(n.empty(),this.data.calendars.length)for(let r of this.data.calendars)new t.Setting(n).setName(r.name).setDesc(null!==(a=r.description)&&void 0!==a?a:"").addExtraButton((t=>{t.setIcon("pencil").onClick((()=>{const t=new io(this.plugin,r);t.onClose=()=>e(this,void 0,void 0,(function*(){t.saved?(this.data.calendars.splice(this.data.calendars.indexOf(r),1,i()(t.calendar)),yield this.plugin.saveCalendar(),this.showCalendars(n)):this.showCalendars(n)})),t.open()}))})).addExtraButton((t=>{t.setIcon("trash").onClick((()=>e(this,void 0,void 0,(function*(){(yield nr(this.app,"Are you sure you want to delete this calendar?",{cta:"Delete",secondary:"Cancel"}))&&(this.plugin.data.calendars=this.plugin.data.calendars.filter((e=>e.id!=r.id)),yield this.plugin.saveCalendar(),this.buildInfo(),this.showCalendars(n))}))))}));else n.createSpan({text:"No calendars created! Create a calendar to see it here."})}}class io extends t.Modal{constructor(e,t){super(e.app),this.plugin=e,this.calendar=Object.assign({},ol),this.saved=!1,this.editing=!1,this.canSave=!1,this.tempCurrentDays=this.calendar.current.day,this.calendar.id=d(),t&&(this.editing=!0,this.calendar=i()(t)),this.containerEl.addClass("fantasy-calendar-create-calendar")}get static(){return this.calendar.static}get week(){return this.static.weekdays}get months(){return this.static.months}get events(){return this.calendar.events}display(){return e(this,void 0,void 0,(function*(){this.contentEl.empty(),this.contentEl.createEl("h3",{text:this.editing?"Edit Calendar":"New Calendar"});const e=this.contentEl.createDiv("fantasy-calendar-apply-preset");new t.Setting(e).setName("Apply Preset").setDesc("Apply a common fantasy calendar as a preset.").addButton((e=>{e.setCta().setButtonText("Choose Preset").onClick((()=>{const e=new oo(this.app);e.onClose=()=>{var t;if(e.saved){if("Gregorian Calendar"==(null===(t=e.preset)||void 0===t?void 0:t.name)){const t=new Date;e.preset.current={year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}}this.calendar=Object.assign(Object.assign({},e.preset),{id:this.calendar.id}),this.display()}},e.open()}))})),this.uiEl=this.contentEl.createDiv("fantasy-calendar-ui"),this.buttonsEl=this.contentEl.createDiv("fantasy-context-buttons"),this.buildButtons(),this.infoEl=this.uiEl.createDiv("calendar-info"),this.buildInfo(),this.weekdayEl=this.uiEl.createDiv(),this.buildWeekdays(),this.monthEl=this.uiEl.createDiv("fantasy-calendar-element"),this.buildMonths(),this.yearEl=this.uiEl.createDiv("fantasy-calendar-element"),this.buildYear(),this.leapdayEl=this.uiEl.createDiv("fantasy-calendar-element"),this.buildLeapDays(),this.eventEl=this.uiEl.createDiv("fantasy-calendar-element"),this.buildEvents(),this.categoryEl=this.uiEl.createDiv("fantasy-calendar-element"),this.buildCategories(),this.moonEl=this.uiEl.createDiv("fantasy-calendar-element"),this.buildMoons()}))}buildInfo(){this.infoEl.empty(),this.infoDetailEl=this.infoEl.createEl("details",{attr:{open:!0}}),this.infoDetailEl.createEl("summary").createEl("h4",{text:"Basic Info"}),new t.Setting(this.infoDetailEl).setName("Calendar Name").addText((e=>{e.setValue(this.calendar.name).onChange((e=>this.calendar.name=e))}));const e=this.infoDetailEl.createDiv("calendar-description");e.createEl("label",{text:"Calendar Description"}),new t.TextAreaComponent(e).setPlaceholder("Calendar Description").setValue(this.calendar.description).onChange((e=>{this.calendar.description=e})),new t.Setting(this.infoDetailEl).setName("Display Day Number").setDesc("Display the day of the year.").addToggle((e=>{e.setValue(this.static.displayDayNumber).onChange((e=>{this.static.displayDayNumber=e,this.buildInfo()}))})),new t.Setting(this.infoDetailEl).setName("Auto Increment Day").setDesc("Automatically increment the calendar day every real day.").addToggle((e=>{e.setValue(this.static.incrementDay).onChange((e=>{this.static.incrementDay=e}))})),this.dateFieldEl=this.infoDetailEl.createDiv(),this.buildDateFields()}buildDateFields(){var e,n,a,r,i,o;this.dateFieldEl.empty(),new t.Setting(this.dateFieldEl).setClass("fantasy-calendar-date-fields-heading").setHeading().setName("Current Date");const s=this.dateFieldEl.createDiv("fantasy-calendar-date-fields");null==this.tempCurrentDays&&this.calendar.current.day&&(this.tempCurrentDays=this.calendar.current.day),null!=this.tempCurrentDays&&null!=this.calendar.current.month&&this.tempCurrentDays>(null===(e=this.calendar.static.months[this.calendar.current.month])||void 0===e?void 0:e.length)&&(this.tempCurrentDays=null===(n=this.calendar.static.months[this.calendar.current.month])||void 0===n?void 0:n.length);const l=s.createDiv("fantasy-calendar-date-field");l.createEl("label",{text:"Day"});const d=new t.TextComponent(l).setPlaceholder("Day").setValue(`${this.tempCurrentDays}`).setDisabled(null==this.calendar.current.month).onChange((e=>{var n,a;if(Number(e)<1||(null!==(a=Number(e)>(null===(n=this.calendar.static.months[this.calendar.current.month])||void 0===n?void 0:n.length))&&void 0!==a?a:1/0))return new t.Notice(`The current day must be between 1 and ${this.calendar.static.months[this.calendar.current.month].length}`),this.tempCurrentDays=this.calendar.current.day,void this.buildDateFields();this.tempCurrentDays=Number(e)}));d.inputEl.setAttr("type","number");const c=s.createDiv("fantasy-calendar-date-field");c.createEl("label",{text:"Month"}),new t.DropdownComponent(c).addOptions(Object.fromEntries([["select","Select Month"],...this.calendar.static.months.map((e=>[e.name,e.name]))])).setValue(null!=this.calendar.current.month?this.calendar.static.months[this.calendar.current.month].name:"select").onChange((e=>{"select"===e&&(this.calendar.current.month=null);const t=this.calendar.static.months.find((t=>t.name==e));this.calendar.current.month=this.calendar.static.months.indexOf(t),this.buildDateFields()}));const u=s.createDiv("fantasy-calendar-date-field");if(u.createEl("label",{text:"Year"}),this.calendar.static.useCustomYears){const e=new t.DropdownComponent(u);(null!==(a=this.calendar.static.years)&&void 0!==a?a:[]).forEach((t=>{e.addOption(t.id,t.name)})),this.calendar.current.year>(null===(r=this.calendar.static.years)||void 0===r?void 0:r.length)&&(this.calendar.current.year=this.calendar.static.years?this.calendar.static.years.length:null),e.setValue(null===(o=null===(i=this.calendar.static.years)||void 0===i?void 0:i[this.calendar.current.year-1])||void 0===o?void 0:o.id).onChange((e=>{this.calendar.current.year=this.calendar.static.years.findIndex((t=>t.id==e))+1}))}else new t.TextComponent(u).setPlaceholder("Year").setValue(`${this.calendar.current.year}`).onChange((e=>{this.calendar.current.year=Number(e)})).inputEl.setAttr("type","number")}buildWeekdays(){this.weekdayEl.empty();const e=new ua({target:this.weekdayEl,props:{weekdays:this.week,firstWeekday:this.calendar.static.firstWeekDay,overflow:this.calendar.static.overflow}});e.$on("weekday-update",(t=>{this.calendar.static.weekdays=t.detail,!this.calendar.static.firstWeekDay&&this.calendar.static.weekdays.length&&(this.calendar.static.firstWeekDay=0,e.$set({firstWeekday:this.calendar.static.firstWeekDay})),this.checkCanSave()})),e.$on("first-weekday-update",(e=>{this.calendar.static.firstWeekDay=e.detail})),e.$on("overflow-update",(t=>{this.calendar.static.overflow=t.detail,this.calendar.static.overflow||(this.calendar.static.firstWeekDay=0),e.$set({firstWeekday:this.calendar.static.firstWeekDay})}))}buildMonths(){this.monthEl.empty(),new Ca({target:this.monthEl,props:{months:this.months}}).$on("month-update",(e=>{this.calendar.static.months=e.detail,this.buildDateFields(),this.checkCanSave()}))}buildYear(){this.yearEl.empty();const e=new pr({target:this.yearEl,props:{useCustomYears:this.static.useCustomYears,years:this.static.years,app:this.app}});e.$on("years-update",(e=>{this.calendar.static.years=e.detail,this.buildDateFields(),this.buildEvents()})),e.$on("use-custom-update",(e=>{this.calendar.static.useCustomYears=e.detail,this.buildDateFields(),this.buildEvents()}))}buildLeapDays(){this.leapdayEl.empty();const t=new Ji({target:this.leapdayEl,props:{leapdays:this.static.leapDays}});t.$on("new-item",(n=>e(this,void 0,void 0,(function*(){const e=new eo(this.app,this.calendar,n.detail);e.onClose=()=>{if(e.saved){if(e.editing){const t=this.calendar.static.moons.indexOf(this.calendar.static.moons.find((t=>t.id===e.leapday.id)));this.calendar.static.leapDays.splice(t,1,Object.assign({},e.leapday))}else this.calendar.static.leapDays.push(Object.assign({},e.leapday));t.$set({leapdays:this.calendar.static.leapDays}),this.plugin.saveCalendar()}},e.open()})))),t.$on("edit-leapdays",(e=>{this.calendar.static.leapDays=e.detail}))}buildEvents(){this.eventEl.empty(),this.eventsUI=new Pa({target:this.eventEl,props:{events:this.events,months:this.calendar.static.months,categories:this.calendar.categories}}),this.eventsUI.$on("new-item",(t=>e(this,void 0,void 0,(function*(){const e=new Ti(this.app,this.calendar,t.detail);e.onClose=()=>{if(e.saved){if(e.editing){const t=this.calendar.events.indexOf(this.calendar.events.find((t=>t.id===e.event.id)));this.calendar.events.splice(t,1,Object.assign({},e.event))}else this.calendar.events.push(Object.assign({},e.event));this.eventsUI.$set({events:this.events}),this.plugin.saveCalendar()}},e.open()})))),this.eventsUI.$on("edit-events",(e=>{this.calendar.events=e.detail})),this.eventEl.setAttr("style",`--event-max-width: ${this.eventEl.getBoundingClientRect().width}px;`)}buildCategories(){this.categoryEl.empty();const e=new tr({target:this.categoryEl,props:{categories:this.calendar.categories}});e.$on("new",(e=>{this.calendar.categories.push(e.detail),this.eventsUI.$set({categories:this.calendar.categories})})),e.$on("update",(e=>{const t=this.calendar.categories.find((t=>t.id==e.detail.id));this.calendar.categories.splice(this.calendar.categories.indexOf(t),1,e.detail),this.eventsUI.$set({categories:this.calendar.categories,events:this.events})})),e.$on("delete",(e=>{this.calendar.categories.splice(this.calendar.categories.indexOf(e.detail),1),this.eventsUI.$set({categories:this.calendar.categories,events:this.events})}))}buildMoons(){var t;this.moonEl.empty(),this.static.displayMoons=null===(t=this.static.displayMoons)||void 0===t||t;const n=new ji({target:this.moonEl,props:{moons:this.static.moons,displayMoons:this.static.displayMoons}});n.$on("display-toggle",(e=>{this.static.displayMoons=e.detail,n.$set({displayMoons:this.static.displayMoons})})),n.$on("new-item",(t=>e(this,void 0,void 0,(function*(){const e=new Xi(this.app,this.calendar,t.detail);e.onClose=()=>{if(e.saved){if(e.editing){const t=this.calendar.static.moons.indexOf(this.calendar.static.moons.find((t=>t.id===e.moon.id)));this.calendar.static.moons.splice(t,1,Object.assign({},e.moon))}else this.calendar.static.moons.push(Object.assign({},e.moon));n.$set({moons:this.calendar.static.moons}),this.plugin.saveCalendar()}},e.open()})))),n.$on("edit-moons",(e=>{this.calendar.static.moons=e.detail}))}checkCanSave(){var e,t,n,a,r,i,o,s,l;(null===(e=this.months)||void 0===e?void 0:e.length)&&(null===(t=this.months)||void 0===t?void 0:t.every((e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.length})))&&(null===(n=this.months)||void 0===n?void 0:n.every((e=>e.length>0)))&&(null===(a=this.week)||void 0===a?void 0:a.length)&&(null===(r=this.week)||void 0===r?void 0:r.every((e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.length})))&&(null===(i=this.calendar.name)||void 0===i?void 0:i.length)&&this.calendar.static.firstWeekDay<(null!==(s=null===(o=this.week)||void 0===o?void 0:o.length)&&void 0!==s?s:1/0)&&(!this.calendar.static.useCustomYears||this.calendar.static.useCustomYears&&(null===(l=this.calendar.static.years)||void 0===l?void 0:l.length)&&this.calendar.static.years.every((e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.length})))&&(this.canSave=!0)}buildButtons(){this.buttonsEl.empty(),new t.ButtonComponent(this.buttonsEl).setCta().setButtonText(this.editing?"Save":"Create").onClick((()=>{var e,n;this.canSave||this.checkCanSave(),this.canSave?(this.calendar.current.day=this.tempCurrentDays,this.saved=!0,this.close()):(null===(e=this.calendar.name)||void 0===e?void 0:e.length)?this.week.length?this.week.every((e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.length}))?this.months.length?this.months.every((e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.length}))?this.months.every((e=>e.length))?this.calendar.static.useCustomYears&&!(null===(n=this.calendar.static.years)||void 0===n?void 0:n.length)?new t.Notice("Custom years must be defined."):this.calendar.static.useCustomYears&&!this.calendar.static.years.every((e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.length}))?new t.Notice("Each custom year must be named."):this.calendar.static.firstWeekDay>=this.week.length&&new t.Notice("The first day of the week must be a valid weekday."):new t.Notice("Every month must have a length."):new t.Notice("Every month must have a name."):new t.Notice("At least one month is required."):new t.Notice("Every weekday must have a name."):new t.Notice("At least one weekday is required."):new t.Notice("The calendar name is required!")})),new t.ExtraButtonComponent(this.buttonsEl).setTooltip("Cancel").setIcon("cross").onClick((()=>this.close()))}onOpen(){this.display()}}class oo extends t.Modal{onOpen(){return e(this,void 0,void 0,(function*(){yield this.display()}))}display(){return e(this,void 0,void 0,(function*(){this.containerEl.addClass("fantasy-calendar-choose-preset"),this.contentEl.empty(),this.contentEl.createEl("h3",{text:"Choose a Preset Calendar"});const e=this.contentEl.createDiv("fantasy-calendar-preset-container");for(const n of m){const a=new t.ButtonComponent(e).onClick((()=>{this.preset=n,this.display()}));this.preset==n&&a.setCta(),a.buttonEl.createDiv({cls:"setting-item-name",text:n.name}),a.buttonEl.createDiv({cls:"setting-item-description",text:n.description})}const n=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new t.ButtonComponent(n).setButtonText("Apply").onClick((()=>{this.saved=!0,this.close()})).setCta(),new t.ExtraButtonComponent(n).setIcon("cross").onClick((()=>{this.close()}))}))}}class so{constructor(e,t,n,a){this.data=e,this.number=t,this.year=n,this.calendar=a,this.days=[],this.leapDays=[],this.leapDays=this.calendar.leapDaysForMonth(this,n),this.days=[...new Array(e.length+this.leapDays.length).keys()].map((e=>new lo(this,e+1)))}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 daysBefore(){return this.calendar.daysBeforeMonth(this)}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}}class lo{constructor(e,t){this.month=e,this.number=t}get calendar(){return this.month.calendar}get date(){return{day:this.number,month:this.month.number,year:this.year}}get events(){return this.calendar.getEventsOnDate(this.date)}get longDate(){return{day:this.number,month:this.month.name,year:this.year}}get daysBefore(){return this.month.daysBefore+this.number-1}get year(){return this.month.year}get weekday(){const e=this.calendar.firstDayOfYear(this.year);return l(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.calendar.displayed.year==this.calendar.viewing.year&&this.calendar.displayed.month==this.calendar.viewing.month}get moons(){return this.calendar.getMoonsForDate(this.date)}}class co extends t.Events{constructor(e,t){super(),this.object=e,this.plugin=t,this.displayed={year:null,month:null,day:null},this.viewing={year:null,month:null,day:null},this.displayed=Object.assign({},this.current),this.update(this.object)}getNameForYear(e){var t;return this.data.useCustomYears?this.data.useCustomYears&&e-1>=0&&e<=(null===(t=this.data.years)||void 0===t?void 0:t.length)?this.data.years[e-1].name:void 0:`${e}`}get displayWeeks(){return this.object.displayWeeks}getMonthsForYear(e){return this.data.months.map(((t,n)=>new so(t,n,e,this)))}update(e){this.object=null!=e?e:this.object,this.maxDays=Math.max(...this.data.months.map((e=>e.length))),this.trigger("month-update"),this.trigger("day-update")}get data(){return this.object.static}get current(){return this.object.current}get leapdays(){return this.data.leapDays}getEventsOnDate(e){return[]}get currentDate(){return h(this.current,this.data.months)}get displayedDate(){return h(this.displayed,this.data.months)}get viewedDate(){return h(this.viewing,this.data.months)}reset(){this.displayed=Object.assign({},this.current),this.viewing=Object.assign({},this.current),this.trigger("month-update"),this.trigger("day-update")}setCurrentMonth(e){this.displayed.month=e,this.trigger("month-update")}goToNextDay(){this.viewing.day+=1;const e=this.getMonth(this.displayed.month,this.displayed.year);this.viewing.day>e.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;const 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 l(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}goToNext(){if(this.nextMonthIndex<this.displayed.month){if(!this.canGoToNextYear())return void new t.Notice("This is the last year. Additional years can be created in settings.");this.goToNextYear()}this.setCurrentMonth(this.nextMonthIndex)}goToNextYear(){this.displayed.year+=1,this.trigger("year-update")}get prevMonthIndex(){return l(this.displayed.month-1,this.data.months.length)}get previousMonth(){return this.getMonth(this.displayed.month-1,this.displayed.year)}goToPrevious(){if(this.prevMonthIndex>this.displayed.month){if(1==this.displayed.year)return void new t.Notice("This is the earliest year.");this.goToPreviousYear()}this.setCurrentMonth(this.prevMonthIndex)}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)}leapDaysForYear(e){return this.leapdays.filter((t=>t.interval.sort(((e,t)=>e.interval-t.interval)).some((({interval:n,exclusive:a},r,i)=>{var o,s,l,d;return a&&0==r?(null!==(o=e-t.offset)&&void 0!==o?o:0)%n!=0:a?void 0:i[r+1]&&i[r+1].exclusive?(null!==(s=e-t.offset)&&void 0!==s?s:0)%n==0&&(null!==(l=e-t.offset)&&void 0!==l?l:0)%i[r+1].interval!=0:(null!==(d=e-t.offset)&&void 0!==d?d:0)%n==0}))))}leapDaysForMonth(e,t=this.displayed.year){return this.leapdays.filter((t=>t.timespan==e.number)).filter((e=>e.interval.sort(((e,t)=>e.interval-t.interval)).some((({interval:n,exclusive:a},r,i)=>{var o,s,l,d;return a&&0==r?(null!==(o=t-e.offset)&&void 0!==o?o:0)%n!=0:a?void 0:i[r+1]&&i[r+1].exclusive?(null!==(s=t-e.offset)&&void 0!==s?s:0)%n==0&&(null!==(l=t-e.offset)&&void 0!==l?l:0)%i[r+1].interval!=0:(null!==(d=t-e.offset)&&void 0!==d?d:0)%n==0}))))}getMonth(e,t,n=0){const a=this.data.months;let r=l(e,a.length);return e<0&&(t-=1),0==t?null:(e>=a.length&&(t+=1),"intercalary"==a[r].type&&0!=n?this.getMonth(e+n,t,n):new so(a[r],r,t,this))}getPaddedDaysForMonth(e){let t=e.days,n=[];const a=this.getMonth(e.index-1,this.displayed.year,-1);e.firstWeekday>0&&"month"==e.type&&(n=null!=a?a.days.slice(-e.firstWeekday):Array(e.firstWeekday).fill(null));let r=[];const i=this.getMonth(e.index+1,this.displayed.year,1);return e.lastWeekday<this.weekdays.length-1&&"month"==e.type&&(r=i.days.slice(0,this.weekdays.length-e.lastWeekday-1)),{previous:n,current:t,next:r}}get paddedDays(){return this.getPaddedDaysForMonth(this.currentMonth)}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){const t=e.daysBefore+this.firstDayOfYear(e.year);return Math.floor(t/this.data.weekdays.length)}get daysPerYear(){return this.data.months.filter((e=>"month"===e.type)).reduce(((e,t)=>e+t.length),0)}daysBeforeMonth(e,t=!1){if(!e)return 0;if(0==e.number)return 0;const n=this.getMonthsForYear(e.year),a=t?n:n.filter((e=>"month"==e.type)),r=a.find((t=>t.data.id==e.data.id));return a.slice(0,a.indexOf(r)).reduce(((e,t)=>e+t.length),0)}areDatesEqual(e,t){return!(e.day!=t.day||e.month!=t.month&&null!=e.month&&null!=t.month||e.year!=t.year&&null!=e.year&&null!=t.year)}daysBeforeDate(e){return this.daysBeforeYear(e.year)+this.daysBeforeMonth(this.getMonth(e.month,e.year),!0)+e.day}dayNumberForDate(e){return this.daysBeforeMonth(this.getMonth(e.month,e.year),!0)+e.day}get firstWeekday(){return this.data.firstWeekDay}get leapDaysBefore(){return 1==this.displayed.year?0:[...Array(this.displayed.year-1).keys()].map((e=>this.leapDaysForYear(e+1))).reduce(((e,t)=>e+t.length),0)}leapDaysBeforeYear(e){return 1==e?0:[...Array(e-1).keys()].map((e=>this.leapDaysForYear(e+1))).reduce(((e,t)=>e+t.length),0)}get daysBefore(){return this.daysBeforeYear(this.displayed.year)}get totalDaysBefore(){return this.daysBefore+this.leapDaysBefore}daysBeforeYear(e){return e<1?0:Math.abs(e-1)*this.daysPerYear}totalDaysBeforeYear(e,t=!1){return e<1?0:Math.abs(e-1)*this.data.months.filter((e=>t||"month"==e.type)).reduce(((e,t)=>e+t.length),0)+this.leapDaysBeforeYear(e)}firstDayOfYear(e=this.displayed.year){var t;return this.data.overflow?1==e?this.firstWeekday:l(this.totalDaysBeforeYear(e)%this.data.weekdays.length+this.firstWeekday+(null!==(t=this.data.offset)&&void 0!==t?t:0),this.data.weekdays.length):0}get moons(){return this.data.moons}getMoonsForDate(e){const t=[],n=this.getMonth(e.month,e.year),a=n.days[e.day-1],r=this.totalDaysBeforeYear(e.year,!0)+this.daysBeforeMonth(n,!0)+a.number-1;for(let e of this.moons){const{offset:n,cycle:a}=e,i=24;let o=(r-n)/a;const s=(o-Math.floor(o))*i%i,d=Ua[i];t.push([e,d[l(Math.round(s),d.length)]])}return t}}const uo=[];function ho(e,t=g){let n;const a=new Set;function r(t){if(x(e,t)&&(e=t,n)){const t=!uo.length;for(const t of a)t[1](),uo.push(t,e);if(t){for(let e=0;e<uo.length;e+=2)uo[e][0](uo[e+1]);uo.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(i,o=g){const s=[i,o];return a.add(s),1===a.size&&(n=t(r)||g),i(e),()=>{a.delete(s),0===a.size&&(n(),n=null)}}}}function fo(e){R(e,"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 po(e){let t,n,a,r;return{c(){t=G("div"),K(t,"class","note svelte-1e1nyi2")},m(i,o){V(i,t,o),a||(r=M(n=e[9].call(null,t)),a=!0)},d(e){e&&P(t),a=!1,r()}}}function mo(e){let t,n,a,r,i,o,s,l,d=e[0].name+"",c=e[0].note&&po(e);return{c(){t=G("div"),n=G("div"),a=G("span"),r=U(d),i=z(),c&&c.c(),K(a,"class","svelte-1e1nyi2"),ae(a,"clamp",!e[1]),ae(a,"day-view",e[1]),K(n,"class","flag-content svelte-1e1nyi2"),K(t,"class","flag svelte-1e1nyi2"),K(t,"aria-label",o=e[1]?null:e[0].name),ee(t,"--hex-alpha",e[6]+"40"),ee(t,"--color",e[6]),ae(t,"multi",e[4]),ae(t,"start",e[2]),ae(t,"end",e[3]),ae(t,"first",e[5]),ae(t,"day-view",e[1])},m(o,d){V(o,t,d),B(t,n),B(n,a),B(a,r),B(n,i),c&&c.m(n,null),s||(l=[Z(t,"click",e[14]),Z(t,"mouseover",e[15]),Z(t,"focus",go),Z(t,"contextmenu",e[16])],s=!0)},p(e,[i]){1&i&&d!==(d=e[0].name+"")&&J(r,d),2&i&&ae(a,"clamp",!e[1]),2&i&&ae(a,"day-view",e[1]),e[0].note?c||(c=po(e),c.c(),c.m(n,null)):c&&(c.d(1),c=null),3&i&&o!==(o=e[1]?null:e[0].name)&&K(t,"aria-label",o),64&i&&ee(t,"--hex-alpha",e[6]+"40"),64&i&&ee(t,"--color",e[6]),16&i&&ae(t,"multi",e[4]),4&i&&ae(t,"start",e[2]),8&i&&ae(t,"end",e[3]),32&i&&ae(t,"first",e[5]),2&i&&ae(t,"day-view",e[1])},i:g,o:g,d(e){e&&P(t),c&&c.d(),s=!1,w(l)}}}const go=()=>{};function yo(e,n,a){var r,i,o,s;const l=he();let{event:d}=n,{date:c}=n,{dayView:u=!1}=n,h=!1,f=!1,p=!1,m=!1,{categories:g}=n,y=null!==(i=null===(r=g.find((e=>e.id==d.category)))||void 0===r?void 0:r.color)&&void 0!==i?i:Ha;const v=t.Platform.isMacOS?"Meta":"Control";return e.$$set=e=>{"event"in e&&a(0,d=e.event),"date"in e&&a(10,c=e.date),"dayView"in e&&a(1,u=e.dayView),"categories"in e&&a(11,g=e.categories)},e.$$.update=()=>{1039&e.$$.dirty&&(null==d.end||u||(a(4,h=!0),a(2,f=!(c.day!==d.date.day||null!=d.date.month&&c.month!=d.date.month||null!=d.date.year&&c.year!==d.date.year)),a(5,m=f||1==c.day),a(3,p=!(c.day!==d.end.day||null!=d.end.month&&c.month!=d.end.month||null!=d.end.year&&c.year!==d.end.year)),f&&p&&(a(4,h=!1),a(2,f=!1),a(3,p=!1)))),14337&e.$$.dirty&&a(6,y=null!==a(13,s=null===a(12,o=g.find((e=>e.id==d.category)))||void 0===o?void 0:o.color)&&void 0!==s?s:Ha)},[d,u,f,p,h,m,y,l,v,e=>{(0,t.setIcon)(e,"note-glyph")},c,g,o,s,e=>{e.stopPropagation(),l("event-click",{event:d,modifier:e.getModifierState(v)})},e=>l("event-mouseover",{target:e.target,event:d}),e=>{e.stopPropagation(),l("event-context",{evt:e,event:d})}]}const vo=class extends He{constructor(e){super(),Pe(this,e,yo,mo,x,{event:0,date:10,dayView:1,categories:11},fo)}};function bo(e){R(e,"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 wo(e){let t,n,a;return{c(){t=G("span"),n=U("+"),a=U(e[2])},m(e,r){V(e,t,r),B(t,n),B(t,a)},p(e,t){4&t&&J(a,e[2])},d(e){e&&P(t)}}}function Do(e){let t,n,a,r,i=e[2]>0&&wo(e);return{c(){t=G("div"),n=G("div"),a=z(),r=G("div"),i&&i.c(),K(n,"class","flag-container svelte-qnut28"),K(r,"class","overflow svelte-qnut28"),K(t,"class","flags-container svelte-qnut28")},m(o,s){V(o,t,s),B(t,n),e[8](n),B(t,a),B(t,r),i&&i.m(r,null),e[9](t)},p(e,[t]){e[2]>0?i?i.p(e,t):(i=wo(e),i.c(),i.m(r,null)):i&&(i.d(1),i=null)},i:g,o:g,d(n){n&&P(t),e[8](null),i&&i.d(),e[9](null)}}}function xo(t,n,a){let r,i,{events:o=[]}=n,{categories:s}=n,{dayView:l=!1}=n,{date:d}=n,{calendar:c}=n,u=0;const h=he(),f=()=>e(void 0,void 0,void 0,(function*(){if(null==i||i.empty(),a(2,u=0),o.length&&r&&i){const e=r.getBoundingClientRect().height;let t=e;for(const n of o){const r=new vo({target:i,props:{event:n,categories:s,dayView:l,date:d}});if(r.$on("event-click",(e=>h("event-click",e.detail))),r.$on("event-mouseover",(e=>h("event-mouseover",e.detail))),r.$on("event-context",(e=>h("event-context",e.detail))),t=e-i.getBoundingClientRect().height,!l){if(t<0){i.lastElementChild.detach(),a(2,u=o.length-o.indexOf(n));break}if(0==t){a(2,u=o.length-o.indexOf(n)-1);break}}}}}));return c.on("view-resized",(()=>{l||f()})),ue(f),t.$$set=e=>{"events"in e&&a(3,o=e.events),"categories"in e&&a(4,s=e.categories),"dayView"in e&&a(5,l=e.dayView),"date"in e&&a(6,d=e.date),"calendar"in e&&a(7,c=e.calendar)},t.$$.update=()=>{8&t.$$.dirty&&a(3,o),11&t.$$.dirty&&o&&r&&i&&f()},[r,i,u,o,s,l,d,c,function(e){ye[e?"unshift":"push"]((()=>{i=e,a(1,i)}))},function(e){ye[e?"unshift":"push"]((()=>{r=e,a(0,r)}))}]}const ko=class extends He{constructor(e){super(),Pe(this,e,xo,Do,x,{events:3,categories:4,dayView:5,date:6,calendar:7},bo)}};function Eo(e){R(e,"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 Co(e,t,n){const a=e.slice();return a[24]=t[n][0],a[25]=t[n][1],a}function Ao(e){let t,n,a,r;return{c(){t=G("div"),n=G("em"),a=U("Day "),r=U(e[8]),K(t,"class","day-number svelte-1uhffao")},m(e,i){V(e,t,i),B(t,n),B(n,a),B(n,r)},p(e,t){256&t&&J(r,e[8])},d(e){e&&P(t)}}}function To(e){let t,n,a=e[4],r=[];for(let t=0;t<a.length;t+=1)r[t]=So(Co(e,a,t));const i=e=>Oe(r[e],1,1,(()=>{r[e]=null}));return{c(){t=G("div");for(let e=0;e<r.length;e+=1)r[e].c();K(t,"class","moon-container")},m(e,a){V(e,t,a);for(let e=0;e<r.length;e+=1)r[e].m(t,null);n=!0},p(e,n){if(16&n){let o;for(a=e[4],o=0;o<a.length;o+=1){const i=Co(e,a,o);r[o]?(r[o].p(i,n),Fe(r[o],1)):(r[o]=So(i),r[o].c(),Fe(r[o],1),r[o].m(t,null))}for(Ie(),o=a.length;o<r.length;o+=1)i(o);Ne()}},i(e){if(!n){for(let e=0;e<a.length;e+=1)Fe(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Oe(r[e]);n=!1},d(e){e&&P(t),H(r,e)}}}function So(e){let t,n;return t=new Mi({props:{moon:e[24],phase:e[25]}}),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};16&n&&(a.moon=e[24]),16&n&&(a.phase=e[25]),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function $o(e){let t,n,a,r,i,o,s,l,d,c,u,h,f,p,m,g,y,v,b,D,x,k,E,C,A,T,S,$,q,I,N=e[0]&&Ao(e),F=e[3]&&e[4]&&e[4].length&&To(e);return S=new ko({props:{events:e[5],categories:e[7],date:e[2],dayView:!0,calendar:e[1]}}),S.$on("event-click",e[19]),S.$on("event-mouseover",e[20]),S.$on("event-context",e[21]),{c(){t=G("div"),n=G("div"),a=G("div"),r=G("div"),o=z(),s=G("div"),d=z(),c=G("div"),h=z(),f=G("div"),p=G("div"),g=z(),y=G("div"),v=G("h3"),b=G("span"),D=U(e[6]),x=z(),N&&N.c(),k=z(),E=G("div"),A=z(),F&&F.c(),T=z(),_e(S.$$.fragment),K(a,"class","left-nav svelte-1uhffao"),K(n,"class","nav svelte-1uhffao"),K(p,"class","arrow calendar-clickable svelte-1uhffao"),K(p,"aria-label","Previous"),K(b,"class","current"),K(v,"class","fantasy-title title svelte-1uhffao"),K(y,"class","title-container svelte-1uhffao"),K(E,"class","arrow right calendar-clickable svelte-1uhffao"),K(E,"aria-label","Next"),K(f,"class","date svelte-1uhffao"),K(t,"class","day-view svelte-1uhffao")},m(w,O){V(w,t,O),B(t,n),B(n,a),B(a,r),B(a,o),B(a,s),B(n,d),B(n,c),B(t,h),B(t,f),B(f,p),B(f,g),B(f,y),B(y,v),B(v,b),B(b,D),B(y,x),N&&N.m(y,null),B(f,k),B(f,E),B(t,A),F&&F.m(t,null),B(t,T),je(S,t,null),$=!0,q||(I=[M(i=e[11].call(null,r)),Z(r,"click",e[15]),M(l=e[12].call(null,s)),M(u=e[10].call(null,c)),Z(c,"click",e[16]),M(m=e[13].call(null,p)),Z(p,"click",e[17]),M(C=e[14].call(null,E)),Z(E,"click",e[18])],q=!0)},p(e,[n]){(!$||64&n)&&J(D,e[6]),e[0]?N?N.p(e,n):(N=Ao(e),N.c(),N.m(y,null)):N&&(N.d(1),N=null),e[3]&&e[4]&&e[4].length?F?(F.p(e,n),24&n&&Fe(F,1)):(F=To(e),F.c(),Fe(F,1),F.m(t,T)):F&&(Ie(),Oe(F,1,1,(()=>{F=null})),Ne());const a={};32&n&&(a.events=e[5]),128&n&&(a.categories=e[7]),4&n&&(a.date=e[2]),2&n&&(a.calendar=e[1]),S.$set(a)},i(e){$||(Fe(F),Fe(S.$$.fragment,e),$=!0)},o(e){Oe(F),Oe(S.$$.fragment,e),$=!1},d(e){e&&P(t),N&&N.d(),F&&F.d(),Ve(S),q=!1,w(I)}}}function Mo(e,n,a){let r,i,o,s,l,d,c,u,{displayDayNumber:h}=n;pe("calendar").subscribe((e=>{a(1,c=e)})),pe("displayMoons").subscribe((e=>a(3,u=e))),c.on("day-update",(()=>{a(2,i=c.viewing),a(6,r=c.viewedDate),a(5,s=c.getEventsOnDate(c.viewing)),a(4,l=c.getMoonsForDate(c.viewing))}));const f=he();return e.$$set=e=>{"displayDayNumber"in e&&a(0,h=e.displayDayNumber)},e.$$.update=()=>{2&e.$$.dirty&&a(6,r=c.viewedDate),2&e.$$.dirty&&a(2,i=c.viewing),6&e.$$.dirty&&a(8,o=c.dayNumberForDate(i)),2&e.$$.dirty&&a(5,s=c.getEventsOnDate(c.viewing)),2&e.$$.dirty&&a(4,l=c.getMoonsForDate(c.viewing)),2&e.$$.dirty&&a(7,d=c.object.categories)},[h,c,i,u,l,s,r,d,o,f,e=>{new t.ExtraButtonComponent(e).setIcon("cross").setTooltip("Close")},e=>{new t.ExtraButtonComponent(e).setIcon("fantasy-calendar-reveal").setTooltip("Show on Calendar").onClick((()=>{a(1,c.displayed.year=c.viewing.year,c),c.setCurrentMonth(c.viewing.month)}))},e=>{new t.ExtraButtonComponent(e).setIcon("plus-with-circle").setTooltip("New Event").onClick((()=>f("event",i)))},e=>{new t.ExtraButtonComponent(e).setIcon("left-arrow")},e=>{new t.ExtraButtonComponent(e).setIcon("right-arrow")},()=>f("reveal"),()=>f("close"),()=>c.goToPreviousDay(),()=>c.goToNextDay(),function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)}]}const qo=class extends He{constructor(e){super(),Pe(this,e,Mo,$o,x,{displayDayNumber:0},Eo)}};function Io(e){R(e,"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 No(e){let t,n,a,r;return{c(){t=W("svg"),n=W("circle"),K(n,"stroke",a=e[2]??"currentColor"),K(n,"fill",r=e[2]??"currentColor"),K(n,"cx","3"),K(n,"cy","3"),K(n,"r","2"),K(t,"class","dot svelte-1gou5hh"),K(t,"viewBox","0 0 6 6"),K(t,"xmlns","http://www.w3.org/2000/svg"),ae(t,"filled",e[0]),ae(t,"active",e[1])},m(e,a){V(e,t,a),B(t,n)},p(e,[i]){4&i&&a!==(a=e[2]??"currentColor")&&K(n,"stroke",a),4&i&&r!==(r=e[2]??"currentColor")&&K(n,"fill",r),1&i&&ae(t,"filled",e[0]),2&i&&ae(t,"active",e[1])},i:g,o:g,d(e){e&&P(t)}}}function Fo(e,t,n){let{isFilled:a=!0}=t,{isActive:r=!1}=t,{color:i}=t;return e.$$set=e=>{"isFilled"in e&&n(0,a=e.isFilled),"isActive"in e&&n(1,r=e.isActive),"color"in e&&n(2,i=e.color)},[a,r,i]}const Oo=class extends He{constructor(e){super(),Pe(this,e,Fo,No,x,{isFilled:0,isActive:1,color:2},Io)}};function Lo(e){R(e,"svelte-2o3rj3",".dots-container.svelte-2o3rj3{width:100%}.dot-container.svelte-2o3rj3{display:flex;flex-flow:row nowrap;width:fit-content;margin:auto;line-height:6px;min-height:6px}.centered.svelte-2o3rj3{justify-content:center;align-items:center}.overflow.svelte-2o3rj3{color:var(--text-muted);font-size:xx-small;display:flex;justify-content:flex-end;width:100%}")}function Bo(e){let t,n,a;return{c(){t=G("span"),n=U("+"),a=U(e[2])},m(e,r){V(e,t,r),B(t,n),B(t,a)},p(e,t){4&t&&J(a,e[2])},d(e){e&&P(t)}}}function Ro(e){let t,n,a,r,i=e[2]>0&&Bo(e);return{c(){t=G("div"),n=G("div"),a=z(),r=G("div"),i&&i.c(),K(n,"class","dot-container centered svelte-2o3rj3"),K(r,"class","overflow svelte-2o3rj3"),K(t,"class","dots-container svelte-2o3rj3")},m(o,s){V(o,t,s),B(t,n),e[6](n),B(t,a),B(t,r),i&&i.m(r,null),e[7](t)},p(e,[t]){e[2]>0?i?i.p(e,t):(i=Bo(e),i.c(),i.m(r,null)):i&&(i.d(1),i=null)},i:g,o:g,d(n){n&&P(t),e[6](null),i&&i.d(),e[7](null)}}}function _o(t,n,a){let r,i,{events:o=[]}=n,{categories:s}=n,{calendar:l}=n,d=0;he();const c=()=>e(void 0,void 0,void 0,(function*(){if(a(2,d=0),o.length){i.empty();const e=r.getBoundingClientRect().width;let t=e;for(const n of o){if(new Oo({target:i,props:{color:u(n)}}),t=e-i.getBoundingClientRect().width,t<0){i.lastElementChild.detach(),a(2,d=o.length-o.indexOf(n));break}if(0==t){a(2,d=o.length-o.indexOf(n)-1);break}}}}));l.on("view-resized",(()=>{r&&i&&c()})),ue(c);const u=e=>{var t;return null===(t=s.find((t=>t.id==e.category)))||void 0===t?void 0:t.color};return t.$$set=e=>{"events"in e&&a(3,o=e.events),"categories"in e&&a(4,s=e.categories),"calendar"in e&&a(5,l=e.calendar)},t.$$.update=()=>{11&t.$$.dirty&&o&&r&&i&&c()},[r,i,d,o,s,l,function(e){ye[e?"unshift":"push"]((()=>{i=e,a(1,i)}))},function(e){ye[e?"unshift":"push"]((()=>{r=e,a(0,r)}))}]}const jo=class extends He{constructor(e){super(),Pe(this,e,_o,Ro,x,{events:3,categories:4,calendar:5},Lo)}};function Vo(e){R(e,"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 Po(e,t,n){const a=e.slice();return a[20]=t[n][0],a[21]=t[n][1],a}function Ho(e){let t,n;return t=new jo({props:{events:e[4],categories:e[9],calendar:e[0].calendar}}),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};16&n&&(a.events=e[4]),512&n&&(a.categories=e[9]),1&n&&(a.calendar=e[0].calendar),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Go(e){let t,n,a,r=e[5]&&e[10]&&e[10].length&&Wo(e);return n=new ko({props:{events:e[4],categories:e[9],date:e[8],calendar:e[0].calendar}}),n.$on("event-click",e[12]),n.$on("event-mouseover",e[13]),n.$on("event-context",e[14]),{c(){r&&r.c(),t=z(),_e(n.$$.fragment)},m(e,i){r&&r.m(e,i),V(e,t,i),je(n,e,i),a=!0},p(e,a){e[5]&&e[10]&&e[10].length?r?(r.p(e,a),1056&a&&Fe(r,1)):(r=Wo(e),r.c(),Fe(r,1),r.m(t.parentNode,t)):r&&(Ie(),Oe(r,1,1,(()=>{r=null})),Ne());const i={};16&a&&(i.events=e[4]),512&a&&(i.categories=e[9]),256&a&&(i.date=e[8]),1&a&&(i.calendar=e[0].calendar),n.$set(i)},i(e){a||(Fe(r),Fe(n.$$.fragment,e),a=!0)},o(e){Oe(r),Oe(n.$$.fragment,e),a=!1},d(e){r&&r.d(e),e&&P(t),Ve(n,e)}}}function Wo(e){let t,n,a=e[10],r=[];for(let t=0;t<a.length;t+=1)r[t]=Uo(Po(e,a,t));const i=e=>Oe(r[e],1,1,(()=>{r[e]=null}));return{c(){t=G("div");for(let e=0;e<r.length;e+=1)r[e].c();K(t,"class","moon-container")},m(e,a){V(e,t,a);for(let e=0;e<r.length;e+=1)r[e].m(t,null);n=!0},p(e,n){if(1024&n){let o;for(a=e[10],o=0;o<a.length;o+=1){const i=Po(e,a,o);r[o]?(r[o].p(i,n),Fe(r[o],1)):(r[o]=Uo(i),r[o].c(),Fe(r[o],1),r[o].m(t,null))}for(Ie(),o=a.length;o<r.length;o+=1)i(o);Ne()}},i(e){if(!n){for(let e=0;e<a.length;e+=1)Fe(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Oe(r[e]);n=!1},d(e){e&&P(t),H(r,e)}}}function Uo(e){let t,n;return t=new Mi({props:{moon:e[20],phase:e[21]}}),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};1024&n&&(a.moon=e[20]),1024&n&&(a.phase=e[21]),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function zo(e){let t,n,a,r,i,o,s,l,d,c,u,h=e[0].number+"";const f=[Go,Ho],p=[];function m(e,t){return e[2]?0:1}return i=m(e),o=p[i]=f[i](e),{c(){t=G("div"),n=G("span"),a=U(h),r=z(),o.c(),K(t,"class",s=$(e[1]?"adjacent-month fantasy-adjacent-month":"")+" svelte-3pptg2"),K(t,"aria-label",l=!e[2]&&e[0].events.length?`${e[0].events.length} event${1==e[0].events.length?"":"s"}`:void 0),ae(t,"day",!0),ae(t,"fantasy-day",!0),ae(t,"active",e[7]&&!e[1]),ae(t,"viewing",e[3]&&e[6]&&!e[1])},m(o,s){V(o,t,s),B(t,n),B(n,a),B(t,r),p[i].m(t,null),d=!0,c||(u=[Z(t,"click",e[15]),Z(t,"dblclick",e[16]),Z(t,"contextmenu",e[17])],c=!0)},p(e,[n]){(!d||1&n)&&h!==(h=e[0].number+"")&&J(a,h);let r=i;i=m(e),i===r?p[i].p(e,n):(Ie(),Oe(p[r],1,1,(()=>{p[r]=null})),Ne(),o=p[i],o?o.p(e,n):(o=p[i]=f[i](e),o.c()),Fe(o,1),o.m(t,null)),(!d||2&n&&s!==(s=$(e[1]?"adjacent-month fantasy-adjacent-month":"")+" svelte-3pptg2"))&&K(t,"class",s),(!d||5&n&&l!==(l=!e[2]&&e[0].events.length?`${e[0].events.length} event${1==e[0].events.length?"":"s"}`:void 0))&&K(t,"aria-label",l),2&n&&ae(t,"day",!0),2&n&&ae(t,"fantasy-day",!0),130&n&&ae(t,"active",e[7]&&!e[1]),74&n&&ae(t,"viewing",e[3]&&e[6]&&!e[1])},i(e){d||(Fe(o),d=!0)},o(e){Oe(o),d=!1},d(e){e&&P(t),p[i].d(),c=!1,w(u)}}}function Yo(e,t,n){let a,r,i,o,s;const l=he();let d,c,{day:u}=t,{adjacent:h}=t,{fullView:f}=t,p=[];return pe("dayView").subscribe((e=>n(3,d=e))),pe("displayMoons").subscribe((e=>n(5,c=e))),u.calendar.on("month-update",(()=>{n(7,o=u.isCurrentDay),n(6,s=u.isDisplaying)})),u.calendar.on("day-update",(()=>{n(7,o=u.isCurrentDay),n(6,s=u.isDisplaying)})),e.$$set=e=>{"day"in e&&n(0,u=e.day),"adjacent"in e&&n(1,h=e.adjacent),"fullView"in e&&n(2,f=e.fullView)},e.$$.update=()=>{3&e.$$.dirty&&(h||n(4,p=u.events)),1&e.$$.dirty&&n(10,a=u.moons),1&e.$$.dirty&&n(9,r=u.calendar.object.categories),1&e.$$.dirty&&n(8,i=u.date),1&e.$$.dirty&&n(7,o=u.isCurrentDay),1&e.$$.dirty&&n(6,s=u.isDisplaying),8&e.$$.dirty&&n(3,d)},[u,h,f,d,p,c,s,o,i,r,a,l,function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},()=>l("day-click",u),()=>l("day-doubleclick",u),e=>l("day-context-menu",{day:u,evt:e})]}const Zo=class extends He{constructor(e){super(),Pe(this,e,Yo,zo,x,{day:0,adjacent:1,fullView:2},Vo)}};function Ko(e){R(e,"svelte-1xujcmn",".fantasy-month.svelte-1xujcmn{display:grid;grid-template-columns:repeat(\n var(--calendar-columns),\n var(--column-widths)\n );grid-auto-rows:var(--calendar-rows)}.full-view.svelte-1xujcmn{height:100%;margin-bottom:0.5rem}.month.svelte-1xujcmn{border-radius:1rem;padding:0.25rem}.month-name.svelte-1xujcmn{margin:0}.month.svelte-1xujcmn .fantasy-day.day{padding:0px}")}function Qo(e,t,n){const a=e.slice();return a[16]=t[n],a}function Jo(e,t,n){const a=e.slice();return a[16]=t[n],a}function Xo(e,t,n){const a=e.slice();return a[16]=t[n],a}function es(e){let t,n,a=e[1].name+"";return{c(){t=G("h3"),n=U(a),K(t,"class","month-name svelte-1xujcmn")},m(e,a){V(e,t,a),B(t,n)},p(e,t){2&t&&a!==(a=e[1].name+"")&&J(n,a)},d(e){e&&P(t)}}}function ts(e){let t;return{c(){t=G("div")},m(e,n){V(e,t,n)},p:g,i:g,o:g,d(e){e&&P(t)}}}function ns(e){let t,n;return t=new Zo({props:{day:e[16],adjacent:!0,fullView:e[3]}}),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};256&n&&(a.day=e[16]),8&n&&(a.fullView=e[3]),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function as(e){let t,n,a,r;const i=[ns,ts],o=[];function s(e,t){return e[5]&&null!=e[16]?0:1}return t=s(e),n=o[t]=i[t](e),{c(){n.c(),a=Y()},m(e,n){o[t].m(e,n),V(e,a,n),r=!0},p(e,r){let l=t;t=s(e),t===l?o[t].p(e,r):(Ie(),Oe(o[l],1,1,(()=>{o[l]=null})),Ne(),n=o[t],n?n.p(e,r):(n=o[t]=i[t](e),n.c()),Fe(n,1),n.m(a.parentNode,a))},i(e){r||(Fe(n),r=!0)},o(e){Oe(n),r=!1},d(e){o[t].d(e),e&&P(a)}}}function rs(e){let t,n;return t=new Zo({props:{day:e[16],adjacent:!1,fullView:e[3]}}),t.$on("day-click",e[10]),t.$on("day-doubleclick",e[11]),t.$on("day-context-menu",e[12]),t.$on("event-click",e[13]),t.$on("event-mouseover",e[14]),t.$on("event-context",e[15]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};128&n&&(a.day=e[16]),8&n&&(a.fullView=e[3]),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function is(e){let t;return{c(){t=G("div")},m(e,n){V(e,t,n)},p:g,i:g,o:g,d(e){e&&P(t)}}}function os(e){let t,n;return t=new Zo({props:{day:e[16],adjacent:!0,fullView:e[3]}}),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};64&n&&(a.day=e[16]),8&n&&(a.fullView=e[3]),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function ss(e){let t,n,a,r;const i=[os,is],o=[];function s(e,t){return e[5]?0:1}return t=s(e),n=o[t]=i[t](e),{c(){n.c(),a=Y()},m(e,n){o[t].m(e,n),V(e,a,n),r=!0},p(e,r){let l=t;t=s(e),t===l?o[t].p(e,r):(Ie(),Oe(o[l],1,1,(()=>{o[l]=null})),Ne(),n=o[t],n?n.p(e,r):(n=o[t]=i[t](e),n.c()),Fe(n,1),n.m(a.parentNode,a))},i(e){r||(Fe(n),r=!0)},o(e){Oe(n),r=!1},d(e){o[t].d(e),e&&P(a)}}}function ls(e){let t,n,a,r,i=e[8],o=[];for(let t=0;t<i.length;t+=1)o[t]=as(Xo(e,i,t));const s=e=>Oe(o[e],1,1,(()=>{o[e]=null}));let l=e[7],d=[];for(let t=0;t<l.length;t+=1)d[t]=rs(Jo(e,l,t));const c=e=>Oe(d[e],1,1,(()=>{d[e]=null}));let u=e[6],h=[];for(let t=0;t<u.length;t+=1)h[t]=ss(Qo(e,u,t));const f=e=>Oe(h[e],1,1,(()=>{h[e]=null}));return{c(){t=G("div");for(let e=0;e<o.length;e+=1)o[e].c();n=z();for(let e=0;e<d.length;e+=1)d[e].c();a=z();for(let e=0;e<h.length;e+=1)h[e].c();K(t,"class","fantasy-month svelte-1xujcmn"),ee(t,"--calendar-columns",e[2]),ee(t,"--calendar-rows",e[3]?1/e[4]*100+"%":"1fr"),ae(t,"full-view",e[3]),ae(t,"year-view",e[0])},m(e,i){V(e,t,i);for(let e=0;e<o.length;e+=1)o[e].m(t,null);B(t,n);for(let e=0;e<d.length;e+=1)d[e].m(t,null);B(t,a);for(let e=0;e<h.length;e+=1)h[e].m(t,null);r=!0},p(e,p){if(296&p){let a;for(i=e[8],a=0;a<i.length;a+=1){const r=Xo(e,i,a);o[a]?(o[a].p(r,p),Fe(o[a],1)):(o[a]=as(r),o[a].c(),Fe(o[a],1),o[a].m(t,n))}for(Ie(),a=i.length;a<o.length;a+=1)s(a);Ne()}if(136&p){let n;for(l=e[7],n=0;n<l.length;n+=1){const r=Jo(e,l,n);d[n]?(d[n].p(r,p),Fe(d[n],1)):(d[n]=rs(r),d[n].c(),Fe(d[n],1),d[n].m(t,a))}for(Ie(),n=l.length;n<d.length;n+=1)c(n);Ne()}if(104&p){let n;for(u=e[6],n=0;n<u.length;n+=1){const a=Qo(e,u,n);h[n]?(h[n].p(a,p),Fe(h[n],1)):(h[n]=ss(a),h[n].c(),Fe(h[n],1),h[n].m(t,null))}for(Ie(),n=u.length;n<h.length;n+=1)f(n);Ne()}(!r||4&p)&&ee(t,"--calendar-columns",e[2]),(!r||24&p)&&ee(t,"--calendar-rows",e[3]?1/e[4]*100+"%":"1fr"),8&p&&ae(t,"full-view",e[3]),1&p&&ae(t,"year-view",e[0])},i(e){if(!r){for(let e=0;e<i.length;e+=1)Fe(o[e]);for(let e=0;e<l.length;e+=1)Fe(d[e]);for(let e=0;e<u.length;e+=1)Fe(h[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)Oe(o[e]);d=d.filter(Boolean);for(let e=0;e<d.length;e+=1)Oe(d[e]);h=h.filter(Boolean);for(let e=0;e<h.length;e+=1)Oe(h[e]);r=!1},d(e){e&&P(t),H(o,e),H(d,e),H(h,e)}}}function ds(e){let t,n,a,r,i,o=e[7],s=e[0]&&es(e),l=ls(e);return{c(){t=G("div"),s&&s.c(),n=z(),l.c(),K(t,"class","month svelte-1xujcmn"),K(t,"data-id",a=e[1].id),K(t,"id",r=`MONTH-${e[1].id}-${e[1].year}`),ae(t,"full-view",e[3])},m(e,a){V(e,t,a),s&&s.m(t,null),B(t,n),l.m(t,null),i=!0},p(e,[d]){e[0]?s?s.p(e,d):(s=es(e),s.c(),s.m(t,n)):s&&(s.d(1),s=null),128&d&&x(o,o=e[7])?(Ie(),Oe(l,1,1,g),Ne(),l=ls(e),l.c(),Fe(l),l.m(t,null)):l.p(e,d),(!i||2&d&&a!==(a=e[1].id))&&K(t,"data-id",a),(!i||2&d&&r!==(r=`MONTH-${e[1].id}-${e[1].year}`))&&K(t,"id",r),8&d&&ae(t,"full-view",e[3])},i(e){i||(Fe(l),i=!0)},o(e){Oe(l),i=!1},d(e){e&&P(t),s&&s.d(),l.d(e)}}}function cs(e,t,n){let a,r,i,o,{yearView:s=!1}=t,{month:l}=t,{columns:d}=t,{fullView:c=!1}=t,{weeks:u}=t,{showPad:h=!0}=t;return e.$$set=e=>{"yearView"in e&&n(0,s=e.yearView),"month"in e&&n(1,l=e.month),"columns"in e&&n(2,d=e.columns),"fullView"in e&&n(3,c=e.fullView),"weeks"in e&&n(4,u=e.weeks),"showPad"in e&&n(5,h=e.showPad)},e.$$.update=()=>{2&e.$$.dirty&&n(9,a=l.calendar.getPaddedDaysForMonth(l)),512&e.$$.dirty&&n(8,r=a.previous),2&e.$$.dirty&&n(7,i=l.days),512&e.$$.dirty&&n(6,o=a.next)},[s,l,d,c,u,h,o,i,r,a,function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)}]}const us=class extends He{constructor(e){super(),Pe(this,e,cs,ds,x,{yearView:0,month:1,columns:2,fullView:3,weeks:4,showPad:5},Ko)}};function hs(e){R(e,"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 fs(e){let t,n,a,r,i,o,s,l,d,c,u,h,f,p,m,y,v,b,D,x,k,E,C,A,T;return{c(){t=G("div"),n=G("div"),a=G("h3"),r=G("span"),i=U(e[0]),o=z(),s=G("span"),l=U(e[1]),d=z(),c=G("div"),u=G("div"),h=G("div"),p=z(),m=G("div"),y=G("span"),y.textContent="Today",b=z(),D=G("div"),k=z(),E=G("div"),K(r,"class","fantasy-month month"),K(s,"class","fantasy-year year"),K(a,"class","fantasy-title title svelte-131055d"),K(n,"class","title-container svelte-131055d"),K(h,"class","arrow calendar-clickable svelte-131055d"),K(h,"aria-label","Previous Month"),K(m,"class","reset-button calendar-clickable svelte-131055d"),K(m,"aria-label",v="Today is "+e[2]),K(D,"class","arrow right calendar-clickable svelte-131055d"),K(D,"aria-label","Next Month"),K(E,"class","calendar-clickable svelte-131055d"),K(E,"aria-label","Calendar Settings"),K(u,"class","container svelte-131055d"),K(c,"class","right-nav fantasy-right-nav svelte-131055d"),K(t,"class","fantasy-nav nav svelte-131055d")},m(g,v){V(g,t,v),B(t,n),B(n,a),B(a,r),B(r,i),B(a,o),B(a,s),B(s,l),B(t,d),B(t,c),B(c,u),B(u,h),B(u,p),B(u,m),B(m,y),B(u,b),B(u,D),B(u,k),B(u,E),A||(T=[M(f=e[4].call(null,h)),Z(h,"click",e[7]),Z(m,"click",e[8]),M(x=e[5].call(null,D)),Z(D,"click",e[9]),M(C=e[6].call(null,E)),Z(E,"click",e[10])],A=!0)},p(e,[t]){1&t&&J(i,e[0]),2&t&&J(l,e[1]),4&t&&v!==(v="Today is "+e[2])&&K(m,"aria-label",v)},i:g,o:g,d(e){e&&P(t),A=!1,w(T)}}}function ps(e,n,a){const r=he();let{month:i}=n,{year:o}=n,{current:s}=n;return e.$$set=e=>{"month"in e&&a(0,i=e.month),"year"in e&&a(1,o=e.year),"current"in e&&a(2,s=e.current)},[i,o,s,r,e=>{new t.ExtraButtonComponent(e).setIcon("left-arrow")},e=>{new t.ExtraButtonComponent(e).setIcon("right-arrow")},e=>{new t.ExtraButtonComponent(e).setIcon("gear")},()=>r("previous"),()=>r("reset"),e=>r("next"),e=>r("settings",e)]}const ms=class extends He{constructor(e){super(),Pe(this,e,ps,fs,x,{month:0,year:1,current:2},hs)}};function gs(e){R(e,"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 ys(e){let t,n,a,r;return{c(){t=G("div"),K(t,"class","arrow calendar-clickable svelte-i3pajt"),K(t,"aria-label","Previous Year")},m(i,o){V(i,t,o),a||(r=[M(n=e[4].call(null,t)),Z(t,"click",e[7])],a=!0)},p:g,d(e){e&&P(t),a=!1,w(r)}}}function vs(e){let t,n,a,r;return{c(){t=G("div"),K(t,"class","arrow right calendar-clickable svelte-i3pajt"),K(t,"aria-label","Next Year")},m(i,o){V(i,t,o),a||(r=[M(n=e[5].call(null,t)),Z(t,"click",e[9])],a=!0)},p:g,d(e){e&&P(t),a=!1,w(r)}}}function bs(e){let t,n,a,r,i,o,s,l,d,c,u,h,f,p,m,y,v,b,D=e[1]&&ys(e),x=e[1]&&vs(e);return{c(){t=G("div"),n=G("div"),a=G("h2"),r=G("span"),i=U(e[0]),o=z(),s=G("div"),l=G("div"),D&&D.c(),d=z(),c=G("div"),u=G("span"),u.textContent="Today",f=z(),x&&x.c(),p=z(),m=G("div"),K(r,"class","fantasy-year"),K(a,"class","fantasy-title svelte-i3pajt"),K(n,"class","fantasy-year-nav svelte-i3pajt"),K(c,"class","reset-button calendar-clickable svelte-i3pajt"),K(c,"aria-label",h="Today is "+e[2]),K(m,"class","calendar-clickable svelte-i3pajt"),K(m,"aria-label","Calendar Settings"),K(l,"class","container svelte-i3pajt"),K(s,"class","right-nav fantasy-right-nav svelte-i3pajt"),K(t,"class","fantasy-nav nav svelte-i3pajt")},m(h,g){V(h,t,g),B(t,n),B(n,a),B(a,r),B(r,i),B(t,o),B(t,s),B(s,l),D&&D.m(l,null),B(l,d),B(l,c),B(c,u),B(l,f),x&&x.m(l,null),B(l,p),B(l,m),v||(b=[Z(c,"click",e[8]),M(y=e[6].call(null,m)),Z(m,"click",e[10])],v=!0)},p(e,[t]){1&t&&J(i,e[0]),e[1]?D?D.p(e,t):(D=ys(e),D.c(),D.m(l,d)):D&&(D.d(1),D=null),4&t&&h!==(h="Today is "+e[2])&&K(c,"aria-label",h),e[1]?x?x.p(e,t):(x=vs(e),x.c(),x.m(l,p)):x&&(x.d(1),x=null)},i:g,o:g,d(e){e&&P(t),D&&D.d(),x&&x.d(),v=!1,w(b)}}}function ws(e,n,a){const r=he();let{year:i}=n,{arrows:o=!1}=n,{current:s}=n;return e.$$set=e=>{"year"in e&&a(0,i=e.year),"arrows"in e&&a(1,o=e.arrows),"current"in e&&a(2,s=e.current)},[i,o,s,r,e=>{new t.ExtraButtonComponent(e).setIcon("left-arrow")},e=>{new t.ExtraButtonComponent(e).setIcon("right-arrow")},e=>{new t.ExtraButtonComponent(e).setIcon("gear")},()=>r("previous"),()=>r("reset"),e=>r("next"),e=>r("settings",e)]}const Ds=class extends He{constructor(e){super(),Pe(this,e,ws,bs,x,{year:0,arrows:1,current:2},gs)}};function xs(e){R(e,"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 ks(e){let t,n,a,r,i,o,s;return n=new Ds({props:{year:e[3],current:e[0]}}),n.$on("next",e[9]),n.$on("previous",e[10]),n.$on("reset",e[11]),n.$on("settings",e[12]),{c(){t=G("div"),_e(n.$$.fragment),a=z(),r=G("div"),K(r,"class","year svelte-15hvixf"),ae(r,"full-view",e[1]),K(t,"class","year-view svelte-15hvixf")},m(l,d){V(l,t,d),je(n,t,null),B(t,a),B(t,r),e[13](r),i=!0,o||(s=Z(r,"scroll",e[5],{once:!0}),o=!0)},p(e,[t]){const a={};8&t&&(a.year=e[3]),1&t&&(a.current=e[0]),n.$set(a),2&t&&ae(r,"full-view",e[1])},i(e){i||(Fe(n.$$.fragment,e),i=!0)},o(e){Oe(n.$$.fragment,e),i=!1},d(a){a&&P(t),Ve(n),e[13](null),o=!1,s()}}}function Es(t,n,a){let r;const i=he();let o,s,l,d,{current:c}=n,{year:u}=n,{columns:h}=n,{fullView:f}=n;pe("calendar").subscribe((e=>{a(8,d=e)}));const p=[],m=pe("dayView"),g=pe("displayMoons"),y=new IntersectionObserver(((e,t)=>{t===y&&e.length&&e[0].isIntersecting&&(y.disconnect(),(d.canGoToNextYear(l.year)||l.number!==d.data.months.length-1)&&(w(),A(p.shift()),v()))}),{root:o,rootMargin:"0px",threshold:.25}),v=()=>{const e=o.children[o.children.length-2];e&&y.observe(e)},b=new IntersectionObserver(((e,t)=>{if(t!==b)return;if(!e&&!e.length)return;if(e[0].isIntersecting)return;const n=o.getBoundingClientRect();e[0].boundingClientRect.top<n.top&&(a(6,u+=1),k.observe(e[0].target),b.disconnect())}),{root:o,rootMargin:"0px",threshold:0}),w=(e=!0)=>{var t,n;if(d.canGoToNextYear(l.year)||l.number!==d.data.months.length-1){if(l=d.getMonth(l.number+1,l.year),0===l.number&&!(o.lastElementChild instanceof HTMLHeadingElement)){const e=o.createEl("h2",{text:d.getNameForYear(l.year),cls:"fantasy-title"});p.push(e),b.disconnect(),b.observe(e)}p.push(C(l,!1)),e&&(s=d.getMonth((null!==(t=null==s?void 0:s.number)&&void 0!==t?t:0)+1,null!==(n=null==s?void 0:s.year)&&void 0!==n?n:1)),x()}},D=new IntersectionObserver(((e,t)=>{t===D&&e.length&&e[0].isIntersecting&&(D.disconnect(),s&&(E(),A(p.pop()),x()))}),{root:o,rootMargin:"0px",threshold:.25}),x=()=>{const e=o.children[1];e&&D.observe(e)},k=new IntersectionObserver(((e,t)=>{t===k&&(e||e.length)&&e[0].isIntersecting&&(a(6,u-=1),b.observe(e[0].target),k.disconnect())}),{root:o,rootMargin:"0px",threshold:0}),E=(e=!0)=>{if(s=d.getMonth(s.number-1,s.year),s){if(p.unshift(C(s,!0)),0===s.number&&!(o.firstElementChild instanceof HTMLHeadingElement)){const e=createEl("h2",{text:d.getNameForYear(s.year),cls:"fantasy-title"});o.prepend(e),p.unshift(e),k.disconnect(),k.observe(e)}e&&(l=d.getMonth(l.number-1,l.year)),v()}},C=(e,t)=>{const n=new us({target:o,anchor:t?o.children[0]:null,props:{month:e,fullView:!1,yearView:!0,columns:h,weeks:d.weekdays.length,showPad:!1},context:new Map([["dayView",m],["displayMoons",g]])});return n.$on("day-click",(e=>i("day-click",e.detail))),n.$on("day-doubleclick",(e=>i("day-doubleclick",e.detail))),n.$on("day-context-menu",(e=>i("day-context-menu",e.detail))),n.$on("event-mouseover",(e=>i("event-mouseover",e.detail))),n.$on("event-mouseover",(e=>i("event-mouseover",e.detail))),n},A=e=>{e instanceof HTMLHeadingElement?e.detach():e.$destroy()},T=(t=!1)=>e(void 0,void 0,void 0,(function*(){for(let e of p)A(e);p.splice(0,p.length),o.empty(),yield ke(),a(6,u=d.current.year),s=d.getMonth(d.displayed.month-1,d.displayed.year),l=s;for(let e=0;e<d.data.months.length;e++)w(!1);E(!1),yield ke(),o.querySelector(`#MONTH-${d.currentMonth.id}-${u}`).scrollIntoView(!0),t&&$()}));var S;S=()=>{D.disconnect(),y.disconnect(),k.disconnect(),b.disconnect()},ce().$$.on_destroy.push(S),ue(T);const $=()=>e(void 0,void 0,void 0,(function*(){yield ke(),D.observe(o.children[1]),y.observe(o.children[o.children.length-2])}));return t.$$set=e=>{"current"in e&&a(0,c=e.current),"year"in e&&a(6,u=e.year),"columns"in e&&a(7,h=e.columns),"fullView"in e&&a(1,f=e.fullView)},t.$$.update=()=>{320&t.$$.dirty&&a(3,r=d.getNameForYear(u))},[c,f,o,r,T,$,u,h,d,function(e){me.call(this,t,e)},function(e){me.call(this,t,e)},()=>T(!0),function(e){me.call(this,t,e)},function(e){ye[e?"unshift":"push"]((()=>{o=e,a(2,o)}))}]}const Cs=class extends He{constructor(e){super(),Pe(this,e,Es,ks,x,{current:0,year:6,columns:7,fullView:1},xs)}};function As(e){R(e,"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 Ts(e,t,n){const a=e.slice();return a[8]=t[n],a}function Ss(e){let t,n;return t=new us({props:{month:e[8],fullView:!1,yearView:!0,columns:e[2],weeks:e[8].calendar.weekdays.length,showPad:!1}}),t.$on("day-click",e[3]),t.$on("day-doubleclick",e[4]),t.$on("day-context-menu",e[5]),t.$on("event-click",e[6]),t.$on("event-mouseover",e[7]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};2&n&&(a.month=e[8]),4&n&&(a.columns=e[2]),2&n&&(a.weeks=e[8].calendar.weekdays.length),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function $s(e){let t,n,a=e[1],r=[];for(let t=0;t<a.length;t+=1)r[t]=Ss(Ts(e,a,t));const i=e=>Oe(r[e],1,1,(()=>{r[e]=null}));return{c(){t=G("div");for(let e=0;e<r.length;e+=1)r[e].c();K(t,"class","year svelte-ztrrn8"),ae(t,"full-view",e[0])},m(e,a){V(e,t,a);for(let e=0;e<r.length;e+=1)r[e].m(t,null);n=!0},p(e,[n]){if(6&n){let o;for(a=e[1],o=0;o<a.length;o+=1){const i=Ts(e,a,o);r[o]?(r[o].p(i,n),Fe(r[o],1)):(r[o]=Ss(i),r[o].c(),Fe(r[o],1),r[o].m(t,null))}for(Ie(),o=a.length;o<r.length;o+=1)i(o);Ne()}1&n&&ae(t,"full-view",e[0])},i(e){if(!n){for(let e=0;e<a.length;e+=1)Fe(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)Oe(r[e]);n=!1},d(e){e&&P(t),H(r,e)}}}function Ms(e,t,n){let{fullView:a}=t,{months:r}=t,{columns:i}=t;return e.$$set=e=>{"fullView"in e&&n(0,a=e.fullView),"months"in e&&n(1,r=e.months),"columns"in e&&n(2,i=e.columns)},[a,r,i,function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)}]}const qs=class extends He{constructor(e){super(),Pe(this,e,Ms,$s,x,{fullView:0,months:1,columns:2},As)}};function Is(e){R(e,"svelte-1xpvbi",".year-view.svelte-1xpvbi{height:100%;position:relative;display:flex;flex-direction:column}.year-container.svelte-1xpvbi{flex:1;overflow:auto}")}function Ns(e){let t,n,a,r,i;return n=new Ds({props:{year:e[2],current:e[0],arrows:!0}}),n.$on("next",e[9]),n.$on("previous",e[10]),n.$on("reset",e[11]),n.$on("settings",e[12]),{c(){t=G("div"),_e(n.$$.fragment),a=z(),r=G("div"),K(r,"class","year-container svelte-1xpvbi"),K(t,"class","year-view svelte-1xpvbi")},m(o,s){V(o,t,s),je(n,t,null),B(t,a),B(t,r),e[13](r),i=!0},p(e,[t]){const a={};4&t&&(a.year=e[2]),1&t&&(a.current=e[0]),n.$set(a)},i(e){i||(Fe(n.$$.fragment,e),i=!0)},o(e){Oe(n.$$.fragment,e),i=!1},d(a){a&&P(t),Ve(n),e[13](null)}}}function Fs(n,a,r){let i;const o=he(),s=pe("calendar"),l=pe("dayView"),d=pe("displayMoons");let c;s.subscribe((e=>{r(8,c=e)}));let u,{year:h}=a,{current:f}=a,{columns:p}=a;const m=(e,t=!1)=>{const n=c.getMonthsForYear(e),a=new qs({target:u,anchor:t?u.children[0]:null,props:{months:n,fullView:!0,columns:p},context:new Map([["dayView",l],["displayMoons",d]])});return a.$on("day-click",(e=>o("day-click",e.detail))),a.$on("day-doubleclick",(e=>o("day-doubleclick",e.detail))),a.$on("day-context-menu",(e=>o("day-context-menu",e.detail))),a.$on("event-mouseover",(e=>o("event-mouseover",e.detail))),a.$on("event-mouseover",(e=>o("event-mouseover",e.detail))),a},g=[],y=()=>{c.canGoToNextYear(h)?(r(6,h+=1),w(h)):new t.Notice("This is the last year. Additional years can be created in settings.")},v=()=>{1!==h?(r(6,h-=1),w(h)):new t.Notice("This is the earliest year.")},b=()=>{r(6,h=c.current.year),w(h)},w=t=>e(void 0,void 0,void 0,(function*(){g.forEach((e=>{var t;(t=e)instanceof HTMLHeadingElement?t.detach():t.$destroy()})),u.empty(),yield ke(),t=t,g.push(m(t))}));return ue((()=>g.push(m(h)))),n.$$set=e=>{"year"in e&&r(6,h=e.year),"current"in e&&r(0,f=e.current),"columns"in e&&r(7,p=e.columns)},n.$$.update=()=>{320&n.$$.dirty&&r(2,i=c.getNameForYear(h))},[f,u,i,y,v,b,h,p,c,()=>y(),()=>v(),()=>b(),function(e){me.call(this,n,e)},function(e){ye[e?"unshift":"push"]((()=>{u=e,r(1,u)}))}]}const Os=class extends He{constructor(e){super(),Pe(this,e,Fs,Ns,x,{year:6,current:0,columns:7},Is)}};function Ls(e){R(e,"svelte-1kty1w6","#calendar-container.year-view.svelte-1kty1w6.svelte-1kty1w6{height:100%}#calendar-container.fantasy-calendar.full-view.svelte-1kty1w6.svelte-1kty1w6{width:100%;padding:0 0.5rem 0.5rem;height:100%;display:flex;flex-flow:column}.fantasy-calendar.full-view.svelte-1kty1w6 .month-container.svelte-1kty1w6{height:100%}.month-container.svelte-1kty1w6.svelte-1kty1w6{display:flex}.month-view.svelte-1kty1w6.svelte-1kty1w6{flex-grow:2}.weeks.svelte-1kty1w6.svelte-1kty1w6{display:grid;grid-template-rows:auto 1fr}.week-num-container.svelte-1kty1w6.svelte-1kty1w6{display:grid;grid-template-rows:repeat(var(--calendar-rows), auto);padding:0.25rem 0}.week-num.svelte-1kty1w6.svelte-1kty1w6{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-1kty1w6.svelte-1kty1w6{display:grid;grid-template-columns:repeat(var(--calendar-columns), 1fr);grid-template-rows:auto;padding:0 0.25rem;gap:2px}.weekday.svelte-1kty1w6.svelte-1kty1w6{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-1kty1w6.svelte-1kty1w6{margin:1rem 0}.moon-container{display:flex;flex-flow:row wrap;align-items:center;justify-content:center}")}function Bs(e,t,n){const a=e.slice();return a[50]=t[n],a}function Rs(e,t,n){const a=e.slice();return a[53]=t[n],a}function _s(e){let t,n,a,r,i,o,s,l,d,c;t=new ms({props:{month:e[6].name,year:e[9],current:e[3].displayedDate}}),t.$on("next",e[31]),t.$on("previous",e[32]),t.$on("reset",e[33]),t.$on("settings",e[34]);let u=e[5]&&Ps(e),h=e[11],f=[];for(let t=0;t<h.length;t+=1)f[t]=Gs(Bs(e,h,t));return d=new us({props:{columns:e[11].length,weeks:e[7],month:e[6],fullView:e[1]}}),d.$on("day-click",e[35]),d.$on("day-doubleclick",e[36]),d.$on("day-context-menu",e[37]),d.$on("event-click",e[38]),d.$on("event-mouseover",e[39]),d.$on("event-context",e[40]),{c(){_e(t.$$.fragment),n=z(),a=G("div"),r=G("div"),u&&u.c(),i=z(),o=G("div"),s=G("div");for(let e=0;e<f.length;e+=1)f[e].c();l=z(),_e(d.$$.fragment),K(r,"class","weeks svelte-1kty1w6"),K(s,"class","weekdays svelte-1kty1w6"),K(o,"class","month-view svelte-1kty1w6"),K(a,"class","month-container svelte-1kty1w6")},m(e,h){je(t,e,h),V(e,n,h),V(e,a,h),B(a,r),u&&u.m(r,null),B(a,i),B(a,o),B(o,s);for(let e=0;e<f.length;e+=1)f[e].m(s,null);B(o,l),je(d,o,null),c=!0},p(e,n){const a={};if(64&n[0]&&(a.month=e[6].name),512&n[0]&&(a.year=e[9]),8&n[0]&&(a.current=e[3].displayedDate),t.$set(a),e[5]?u?u.p(e,n):(u=Ps(e),u.c(),u.m(r,null)):u&&(u.d(1),u=null),2048&n[0]){let t;for(h=e[11],t=0;t<h.length;t+=1){const a=Bs(e,h,t);f[t]?f[t].p(a,n):(f[t]=Gs(a),f[t].c(),f[t].m(s,null))}for(;t<f.length;t+=1)f[t].d(1);f.length=h.length}const i={};2048&n[0]&&(i.columns=e[11].length),128&n[0]&&(i.weeks=e[7]),64&n[0]&&(i.month=e[6]),2&n[0]&&(i.fullView=e[1]),d.$set(i)},i(e){c||(Fe(t.$$.fragment,e),Fe(d.$$.fragment,e),c=!0)},o(e){Oe(t.$$.fragment,e),Oe(d.$$.fragment,e),c=!1},d(e){Ve(t,e),e&&P(n),e&&P(a),u&&u.d(),H(f,e),Ve(d)}}}function js(e){let t,n;return t=new Os({props:{year:e[10],columns:e[11].length,current:e[3].displayedDate}}),t.$on("next",e[22]),t.$on("previous",e[23]),t.$on("reset",e[24]),t.$on("settings",e[25]),t.$on("day-click",e[26]),t.$on("day-doubleclick",e[27]),t.$on("day-context-menu",e[28]),t.$on("event-click",e[29]),t.$on("event-mouseover",e[30]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};1024&n[0]&&(a.year=e[10]),2048&n[0]&&(a.columns=e[11].length),8&n[0]&&(a.current=e[3].displayedDate),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Vs(e){let t,n;return t=new Cs({props:{year:e[10],fullView:e[1],columns:e[11].length,current:e[3].displayedDate}}),t.$on("next",e[13]),t.$on("previous",e[14]),t.$on("reset",e[15]),t.$on("settings",e[16]),t.$on("day-click",e[17]),t.$on("day-doubleclick",e[18]),t.$on("day-context-menu",e[19]),t.$on("event-click",e[20]),t.$on("event-mouseover",e[21]),{c(){_e(t.$$.fragment)},m(e,a){je(t,e,a),n=!0},p(e,n){const a={};1024&n[0]&&(a.year=e[10]),2&n[0]&&(a.fullView=e[1]),2048&n[0]&&(a.columns=e[11].length),8&n[0]&&(a.current=e[3].displayedDate),t.$set(a)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){Oe(t.$$.fragment,e),n=!1},d(e){Ve(t,e)}}}function Ps(e){let t,n,a,r=[...Array(e[7]).keys()],i=[];for(let t=0;t<r.length;t+=1)i[t]=Hs(Rs(e,r,t));return{c(){t=G("span"),t.textContent="W",n=z(),a=G("div");for(let e=0;e<i.length;e+=1)i[e].c();K(t,"class","week-num weekday fantasy-weekday svelte-1kty1w6"),K(a,"class","week-num-container svelte-1kty1w6")},m(e,r){V(e,t,r),V(e,n,r),V(e,a,r);for(let e=0;e<i.length;e+=1)i[e].m(a,null)},p(e,t){if(384&t[0]){let n;for(r=[...Array(e[7]).keys()],n=0;n<r.length;n+=1){const o=Rs(e,r,n);i[n]?i[n].p(o,t):(i[n]=Hs(o),i[n].c(),i[n].m(a,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=r.length}},d(e){e&&P(t),e&&P(n),e&&P(a),H(i,e)}}}function Hs(e){let t,n,a=e[8]+1+e[53]+"";return{c(){t=G("span"),n=U(a),K(t,"class","week-num svelte-1kty1w6")},m(e,a){V(e,t,a),B(t,n)},p(e,t){384&t[0]&&a!==(a=e[8]+1+e[53]+"")&&J(n,a)},d(e){e&&P(t)}}}function Gs(e){let t,n,a=e[50].name.slice(0,3)+"";return{c(){t=G("span"),n=U(a),K(t,"class","weekday fantasy-weekday svelte-1kty1w6")},m(e,a){V(e,t,a),B(t,n)},p(e,t){2048&t[0]&&a!==(a=e[50].name.slice(0,3)+"")&&J(n,a)},d(e){e&&P(t)}}}function Ws(e){let t,n,a,r;return a=new qo({props:{displayDayNumber:e[4]}}),a.$on("close",e[41]),a.$on("event-click",e[42]),a.$on("event-mouseover",e[43]),a.$on("event-context",e[44]),a.$on("event",e[45]),{c(){t=G("hr"),n=z(),_e(a.$$.fragment),K(t,"class","svelte-1kty1w6")},m(e,i){V(e,t,i),V(e,n,i),je(a,e,i),r=!0},p(e,t){const n={};16&t[0]&&(n.displayDayNumber=e[4]),a.$set(n)},i(e){r||(Fe(a.$$.fragment,e),r=!0)},o(e){Oe(a.$$.fragment,e),r=!1},d(e){e&&P(t),e&&P(n),Ve(a,e)}}}function Us(e){let t,n,a,r,i,o;const s=[Vs,js,_s],l=[];function d(e,t){return e[2]&&!e[1]?0:e[2]?1:2}n=d(e),a=l[n]=s[n](e);let c=e[0]&&!e[1]&&Ws(e);return{c(){t=G("div"),a.c(),r=z(),c&&c.c(),i=Y(),K(t,"id","calendar-container"),K(t,"class","fantasy-calendar svelte-1kty1w6"),ee(t,"--calendar-columns",e[3].weekdays.length),ee(t,"--column-widths",1/e[3].weekdays.length*100+"%"),ee(t,"--calendar-rows",e[3].weeksPerCurrentMonth),ae(t,"full-view",e[1]),ae(t,"year-view",e[2])},m(e,a){V(e,t,a),l[n].m(t,null),V(e,r,a),c&&c.m(e,a),V(e,i,a),o=!0},p(e,r){let u=n;n=d(e),n===u?l[n].p(e,r):(Ie(),Oe(l[u],1,1,(()=>{l[u]=null})),Ne(),a=l[n],a?a.p(e,r):(a=l[n]=s[n](e),a.c()),Fe(a,1),a.m(t,null)),(!o||8&r[0])&&ee(t,"--calendar-columns",e[3].weekdays.length),(!o||8&r[0])&&ee(t,"--column-widths",1/e[3].weekdays.length*100+"%"),(!o||8&r[0])&&ee(t,"--calendar-rows",e[3].weeksPerCurrentMonth),2&r[0]&&ae(t,"full-view",e[1]),4&r[0]&&ae(t,"year-view",e[2]),e[0]&&!e[1]?c?(c.p(e,r),3&r[0]&&Fe(c,1)):(c=Ws(e),c.c(),Fe(c,1),c.m(i.parentNode,i)):c&&(Ie(),Oe(c,1,1,(()=>{c=null})),Ne())},i(e){o||(Fe(a),Fe(c),o=!0)},o(e){Oe(a),Oe(c),o=!1},d(e){e&&P(t),l[n].d(),e&&P(r),c&&c.d(e),e&&P(i)}}}function zs(e,t,n){let a,r,i,o,s,l,d,{fullView:c=!1}=t,{dayView:u=!1}=t,{yearView:h=!1}=t,{calendar:f}=t,{moons:p}=t,{displayDayNumber:m}=t,{displayWeeks:g}=t;const y=ho(u),v=ho(p),b=ho(f);return fe("dayView",y),fe("displayMoons",v),fe("calendar",b),f.on("month-update",(()=>{n(10,r=f.displayed.year),n(9,i=f.getNameForYear(f.displayed.year)),n(6,o=f.currentMonth),n(7,l=f.weeksOfMonth(o)),n(8,s=f.weekNumbersOfMonth(o)),d=f.dayNumberForDate(f.current)})),f.on("day-update",(()=>{d=f.dayNumberForDate(f.current)})),e.$$set=e=>{"fullView"in e&&n(1,c=e.fullView),"dayView"in e&&n(0,u=e.dayView),"yearView"in e&&n(2,h=e.yearView),"calendar"in e&&n(3,f=e.calendar),"moons"in e&&n(12,p=e.moons),"displayDayNumber"in e&&n(4,m=e.displayDayNumber),"displayWeeks"in e&&n(5,g=e.displayWeeks)},e.$$.update=()=>{4&e.$$.dirty[0]&&h&&n(0,u=!1),1&e.$$.dirty[0]&&y.set(u),4096&e.$$.dirty[0]&&v.set(p),8&e.$$.dirty[0]&&b.set(f),8&e.$$.dirty[0]&&n(11,a=f.weekdays),8&e.$$.dirty[0]&&n(10,r=f.displayed.year),8&e.$$.dirty[0]&&n(9,i=f.getNameForYear(f.displayed.year)),8&e.$$.dirty[0]&&n(6,o=f.currentMonth),72&e.$$.dirty[0]&&n(8,s=f.weekNumbersOfMonth(o)),72&e.$$.dirty[0]&&n(7,l=f.weeksOfMonth(o)),8&e.$$.dirty[0]&&(d=f.dayNumberForDate(f.current))},[u,c,h,f,m,g,o,l,s,i,r,a,p,()=>f.goToNextYear(),()=>f.goToPreviousYear(),function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},()=>f.goToNextYear(),()=>f.goToPreviousYear(),function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},()=>f.goToNext(),()=>f.goToPrevious(),function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},()=>n(0,u=!1),function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)},function(t){me.call(this,e,t)}]}const Ys=class extends He{constructor(e){super(),Pe(this,e,zs,Us,x,{fullView:1,dayView:0,yearView:2,calendar:3,moons:12,displayDayNumber:4,displayWeeks:5},Ls,[-1,-1])}},Zs="FANTASY_CALENDAR",Ks="FANTASY_CALENDAR_FULL_VIEW";(0,t.addIcon)(Zs,'<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,t.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>');class Qs extends t.ItemView{constructor(e,t,n={}){super(t),this.plugin=e,this.leaf=t,this.options=n,this.updateMe=!0,this.yearView=!1,this.moons=!0,this.registerEvent(this.plugin.app.workspace.on("fantasy-calendars-updated",(()=>{this.updateCalendars()}))),this.registerEvent(this.plugin.app.workspace.on("layout-change",(()=>{this._app&&this._app.$set(Object.assign({fullView:this.full},this.full?{dayView:!1}:{}))})))}get root(){return this.leaf.getRoot()}get full(){return!("collapse"in this.root)}updateCalendars(){var e,t,n;if(!this.updateMe)return void(this.updateMe=!0);if(!this.plugin.data.calendars.length)return null===(e=this._app)||void 0===e||e.$destroy(),this.contentEl.empty(),this.noCalendarEl=this.contentEl.createDiv("fantasy-no-calendar"),void this.noCalendarEl.createSpan({text:"No calendars created! Create a calendar to see it here."});const a=null!==(n=null!==(t=this.plugin.data.calendars.find((e=>{var t;return e.id==(null===(t=this.calendar)||void 0===t?void 0:t.id)})))&&void 0!==t?t:this.plugin.defaultCalendar)&&void 0!==n?n:this.plugin.data.calendars[0];this.helper&&this.helper.object.id==a.id?this.update(a):this.setCurrentCalendar(a)}update(e){this.calendar=e,this.helper.update(this.calendar),this.registerCalendarInterval(),this._app?this._app.$set({calendar:this.helper}):this.build()}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());const t=s(new Date(this.calendar.date),e);if(t>=1){for(let e=0;e<t;e++)this.helper.goToNextCurrentDay();this.calendar.date=e.valueOf(),this.plugin.saveSettings()}this.interval=window.setInterval((()=>{s(new Date,e)>=1&&(this.helper.goToNextCurrentDay(),this.helper.current,e=new Date,this.calendar.date=e.valueOf(),this.plugin.saveSettings())}),6e4),this.registerInterval(this.interval)}}setCurrentCalendar(e){var t;null===(t=this.noCalendarEl)||void 0===t||t.detach(),this.calendar=e,this.moons=this.calendar.static.displayMoons,this.dayNumber=this.calendar.static.displayDayNumber,this.helper=new co(this.calendar,this.plugin),this.registerCalendarInterval(),this.build()}createEventForDay(e){const t=new Ti(this.app,this.calendar,null,e);t.onClose=()=>{t.saved&&(this.calendar.events.push(t.event),this.plugin.saveSettings(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update"))},t.open()}onOpen(){return e(this,void 0,void 0,(function*(){this.updateCalendars()}))}build(){this.contentEl.empty(),this._app=new Ys({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=>{const t=e.detail;t.events.length||this.createEventForDay(t.date)})),this._app.$on("day-doubleclick",(e=>{const t=e.detail;t.events.length&&(this.helper.viewing.day=t.number,this.helper.viewing.month=this.helper.displayed.month,this.helper.viewing.year=this.helper.displayed.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=>{const{day:n,evt:a}=e.detail,r=new t.Menu(this.app);r.setNoIcon(),this.full||r.addItem((e=>{e.setTitle("Open Day").onClick((()=>{this.openDay({day:n.number,month:this.helper.displayed.month,year:this.helper.displayed.year})}))})),r.addItem((e=>{e.setTitle("Set as Today").onClick((()=>{this.calendar.current=n.date,this.helper.current.day=n.number,this.triggerHelperEvent("day-update"),this.plugin.saveSettings()}))})),r.addItem((e=>e.setTitle("New Event").onClick((()=>{this.createEventForDay(n.date)})))),r.showAtMouseEvent(a)})),this._app.$on("settings",(e=>{const n=e.detail,a=new t.Menu(this.app);a.setNoIcon(),a.addItem((e=>{e.setTitle((this.calendar.displayWeeks?"Hide":"Show")+" Weeks").onClick((()=>{this.calendar.displayWeeks=!this.calendar.displayWeeks,this.helper.update(this.calendar),this._app.$set({displayWeeks:this.calendar.displayWeeks}),this.plugin.saveSettings()}))})),a.addItem((e=>{e.setTitle("Open "+(this.yearView?"Month":"Year")).onClick((()=>{this.yearView=!this.yearView,this._app.$set({yearView:this.yearView})}))})),a.addItem((e=>{e.setTitle(this.moons?"Hide Moons":"Display Moons").onClick((()=>{this.toggleMoons()}))})),a.addItem((e=>{e.setTitle(this.dayNumber?"Hide Day Number":"Display Day Number").onClick((()=>{this.dayNumber=!this.dayNumber,this.calendar.static.displayDayNumber=this.dayNumber,this._app.$set({displayDayNumber:this.dayNumber}),this.plugin.saveSettings()}))})),a.addItem((e=>{e.setTitle("View Day"),e.onClick((()=>{this.openDate()}))})),a.addItem((e=>{e.setTitle("Switch Calendars"),e.setDisabled(this.plugin.data.calendars.length<=1),e.onClick((()=>{const e=new Js(this.plugin,this.calendar);e.onClose=()=>{e.confirmed&&this.setCurrentCalendar(e.calendar)},e.open()}))})),a.showAtMouseEvent(n)})),this._app.$on("event-click",(e=>{const{event:n,modifier:a}=e.detail;if(n.note){let e=[];this.app.workspace.iterateAllLeaves((a=>{a.view instanceof t.MarkdownView&&a.view.file.basename===n.note&&e.push(a)})),e.length?this.app.workspace.setActiveLeaf(e[0]):this.app.workspace.openLinkText(n.note,"",this.full||a)}else new el(n,this.plugin).open()})),this._app.$on("event-mouseover",(e=>{if(!this.plugin.data.eventPreview)return;const{target:t,event:n}=e.detail;n.note&&this.app.workspace.trigger("link-hover",this,t,n.note,"")})),this._app.$on("event-context",(n=>{const{evt:a,event:r}=n.detail,i=new t.Menu(this.app);i.setNoIcon(),r.note||i.addItem((n=>{n.setTitle("Create Note").onClick((()=>e(this,void 0,void 0,(function*(){var e,n,a,i;const o=null===(e=this.app.workspace.getActiveFile())||void 0===e?void 0:e.path,s=o&&null!==(a=null===(n=this.app.fileManager.getNewFileParent(o))||void 0===n?void 0:n.parent)&&void 0!==a?a:"/",l=`${r.date.year}-${r.date.month+1}-${r.date.day}`;let d;r.end&&(d=`${r.end.year}-${r.end.month+1}-${r.end.day}`);const c=Object.assign(Object.assign({"fc-calendar":this.calendar.name,"fc-date":l},r.end?{"fc-end":d}:{}),r.category?{"fc-category":null===(i=this.calendar.categories.find((e=>e.id==r.category)))||void 0===i?void 0:i.name}:{});r.note=(0,t.normalizePath)(`${s}/${r.name}.md`);let u=this.app.vault.getAbstractFileByPath(r.note);if(u||(u=yield this.app.vault.create(r.note,`---\n${(0,t.stringifyYaml)(c)}\n---`)),this.plugin.saveCalendar(),u instanceof t.TFile){const e=this.app.workspace.getLeavesOfType("markdown").find((e=>{e.view instanceof t.FileView&&(e.view.file.path,r.note)}));e?this.app.workspace.setActiveLeaf(e):yield this.app.workspace.getUnpinnedLeaf().openFile(u,{active:!0})}}))))})),i.addItem((e=>{e.setTitle("Edit Event").onClick((()=>{const e=new Ti(this.app,this.calendar,r);e.onClose=()=>{if(!e.saved)return;const t=this.calendar.events.find((e=>e.id==r.id));this.calendar.events.splice(this.calendar.events.indexOf(t),1,e.event),this.plugin.saveSettings(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update")},e.open()}))})),i.addItem((t=>{t.setTitle("Delete Event").onClick((()=>e(this,void 0,void 0,(function*(){if(yield nr(this.app,"Are you sure you wish to delete this event?",{cta:"Delete",secondary:"Cancel"})){const e=this.calendar.events.find((e=>e.id==r.id));this.calendar.events.splice(this.calendar.events.indexOf(e),1),this.plugin.saveSettings(),this._app.$set({calendar:this.helper}),this.triggerHelperEvent("day-update")}}))))})),i.showAtMouseEvent(a)})),this._app.$on("event",(e=>{const t=e.detail;this.createEventForDay(t)})),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)return;if(!this.calendar)return;const e=new Xs(this.plugin,this.calendar);e.onClose=()=>{e.confirmed&&(e.setCurrent?(this.calendar.current=Object.assign({},e.date),this.setCurrentCalendar(this.calendar)):(this.helper.displayed=Object.assign({},e.date),this.helper.update(),this._app.$set({calendar:this.helper})),this.plugin.saveSettings())},e.open()}toggleMoons(){this.moons=!this.moons,this._app.$set({moons:this.moons})}onClose(){return e(this,void 0,void 0,(function*(){}))}onResize(){this.triggerHelperEvent("view-resized",!1)}getViewType(){return Zs}getDisplayText(){return"Fantasy Calendar"}getIcon(){return Zs}triggerHelperEvent(e,t=!0){this.helper&&(this.helper.trigger(e),t&&(this.updateMe=!1,this.plugin.app.workspace.trigger("fantasy-calendars-updated")))}onunload(){return e(this,void 0,void 0,(function*(){}))}}class Js extends t.Modal{constructor(e,t){super(e.app),this.plugin=e,this.calendar=t,this.confirmed=!1}display(){return e(this,void 0,void 0,(function*(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:"Switch Calendars"});const e=this.contentEl.createDiv("fantasy-calendar-dropdown");e.createEl("label",{text:"Choose a Calendar"}),new t.DropdownComponent(e).onChange((e=>{this.calendar=this.plugin.data.calendars.find((t=>t.id==e))})).addOptions(Object.fromEntries(this.plugin.data.calendars.map((e=>[e.id,e.name])))).setValue(this.calendar?this.calendar.id:null);const n=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new t.ButtonComponent(n).setButtonText("Switch").setCta().onClick((()=>{this.confirmed=!0,this.close()})),new t.ButtonComponent(n).setButtonText("Cancel").onClick((()=>{this.close()}))}))}onOpen(){this.display()}}class Xs extends t.Modal{constructor(e,t){super(e.app),this.plugin=e,this.calendar=t,this.confirmed=!1,this.setCurrent=!1,this.date=Object.assign({},this.calendar.current),this.tempCurrentDays=this.date.day}display(){return e(this,void 0,void 0,(function*(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:"View Day"}),this.dateFieldEl=this.contentEl.createDiv("fantasy-calendar-date-fields"),this.buildDateFields(),new t.Setting(this.contentEl).setName("Set as Current Date").setDesc("Also set this date to today's date.").addToggle((e=>e.setValue(this.setCurrent).onChange((e=>{this.setCurrent=e}))));const e=this.contentEl.createDiv("fantasy-calendar-confirm-buttons");new t.ButtonComponent(e).setButtonText("Switch").setCta().onClick((()=>{this.confirmed=!0,this.date.day=this.tempCurrentDays,this.close()})),new t.ButtonComponent(e).setButtonText("Cancel").onClick((()=>{this.close()}))}))}buildDateFields(){var e,n,a,r,i,o;this.dateFieldEl.empty(),null!=this.tempCurrentDays&&null!=this.date.month&&this.tempCurrentDays>(null===(e=this.calendar.static.months[this.date.month])||void 0===e?void 0:e.length)&&(this.tempCurrentDays=null===(n=this.calendar.static.months[this.date.month])||void 0===n?void 0:n.length);const s=this.dateFieldEl.createDiv("fantasy-calendar-date-field");s.createEl("label",{text:"Day"});const l=new t.TextComponent(s).setPlaceholder("Day").setValue(`${this.tempCurrentDays}`).setDisabled(null==this.date.month).onChange((e=>{var n,a;if(Number(e)<1||(null!==(a=Number(e)>(null===(n=this.calendar.static.months[this.date.month])||void 0===n?void 0:n.length))&&void 0!==a?a:1/0))return new t.Notice(`The current day must be between 1 and ${this.calendar.static.months[this.date.month].length}`),this.tempCurrentDays=this.date.day,void this.buildDateFields();this.tempCurrentDays=Number(e)}));l.inputEl.setAttr("type","number");const d=this.dateFieldEl.createDiv("fantasy-calendar-date-field");d.createEl("label",{text:"Month"}),new t.DropdownComponent(d).addOptions(Object.fromEntries([["select","Select Month"],...this.calendar.static.months.map((e=>[e.name,e.name]))])).setValue(null!=this.date.month?this.calendar.static.months[this.date.month].name:"select").onChange((e=>{"select"===e&&(this.date.month=null);const t=this.calendar.static.months.find((t=>t.name==e));this.date.month=this.calendar.static.months.indexOf(t),this.buildDateFields()}));const c=this.dateFieldEl.createDiv("fantasy-calendar-date-field");if(c.createEl("label",{text:"Year"}),this.calendar.static.useCustomYears){const e=new t.DropdownComponent(c);(null!==(a=this.calendar.static.years)&&void 0!==a?a:[]).forEach((t=>{e.addOption(t.id,t.name)})),this.date.year>(null===(r=this.calendar.static.years)||void 0===r?void 0:r.length)&&(this.date.year=this.calendar.static.years?this.calendar.static.years.length:null),e.setValue(null===(o=null===(i=this.calendar.static.years)||void 0===i?void 0:i[this.date.year-1])||void 0===o?void 0:o.id).onChange((e=>{this.date.year=this.calendar.static.years.findIndex((t=>t.id==e))+1}))}else new t.TextComponent(c).setPlaceholder("Year").setValue(`${this.date.year}`).onChange((e=>{this.date.year=Number(e)})).inputEl.setAttr("type","number")}onOpen(){this.display()}}class el extends t.Modal{constructor(e,t){super(t.app),this.event=e,this.plugin=t,this.containerEl.addClass("fantasy-calendar-view-event")}display(){return e(this,void 0,void 0,(function*(){this.contentEl.empty(),this.contentEl.createEl("h4",{text:this.event.name}),yield t.MarkdownRenderer.renderMarkdown(this.event.description,this.contentEl,this.event.note,null)}))}onOpen(){return e(this,void 0,void 0,(function*(){yield this.display()}))}}var tl=n(477),nl=n.n(tl);function al(){return nl()('(()=>{"use strict";function n(n,t,e,l){return new(e||(e=Promise))((function(o,i){function a(n){try{s(l.next(n))}catch(n){i(n)}}function d(n){try{s(l.throw(n))}catch(n){i(n)}}function s(n){var t;n.done?o(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(a,d)}s((l=l.apply(n,t||[])).next())}))}function t(n,t){return(n%t+t)%t}Object.create,Object.create;const e=self;e.addEventListener("message",(o=>n(void 0,void 0,void 0,(function*(){var n,i,a,d,s,r,u;if("parse"===o.data.type){const{file:c,cache:f,sourceCalendars:v,defaultCalendar:m,format:h,parseTitle:p}=o.data;let y,g,{frontmatter:x}=null!=f?f:{};x&&(y=null==x?void 0:x["fc-calendar"],g=null==x?void 0:x["fc-category"]),y||(y=[m]),Array.isArray(y)||(y=[y]),y=y.map((n=>n.toLowerCase()));const O=v.filter((n=>y.includes(n.name.toLowerCase()))),{start:b,end:w}=l(x,p?c.basename:"",h);if(!b.length)return;let C=!1;for(let l of O){let o=y.indexOf(l.name.toLowerCase());(o>=b.length||-1==o)&&(o=b.length-1);let f=null!==(n=b[o])&&void 0!==n?n:{day:null,month:null,year:null},v=w.length?null!==(i=w[o])&&void 0!==i?i:w[w.length-1]:null;if((null==f?void 0:f.month)&&"string"==typeof(null==f?void 0:f.month)){let n=l.static.months.find((n=>n.name==f.month));f.month=n?l.static.months.indexOf(n):null}else(null==f?void 0:f.month)&&"number"==typeof(null==f?void 0:f.month)&&(f.month=t(f.month-1,l.static.months.length));if((null==v?void 0:v.month)&&"string"==typeof(null==v?void 0:v.month)){let n=l.static.months.find((n=>n.name==v.month));v.month=n?l.static.months.indexOf(n):null}else(null==v?void 0:v.month)&&"number"==typeof(null==v?void 0:v.month)&&(v.month=t(v.month-1,l.static.months.length));const m=l.categories.find((n=>(null==n?void 0:n.name)==g)),h=l.events.find((n=>n.note==c.path));(null==h?void 0:h.date.day)==f.day&&(null==h?void 0:h.date.month)==f.month&&(null==h?void 0:h.date.year)==f.year&&(null===(a=null==h?void 0:h.end)||void 0===a?void 0:a.day)==(null==v?void 0:v.day)&&(null===(d=null==h?void 0:h.end)||void 0===d?void 0:d.month)==(null==v?void 0:v.month)&&(null===(s=null==h?void 0:h.end)||void 0===s?void 0:s.year)==(null==v?void 0:v.year)&&(null==h?void 0:h.category)==(null==m?void 0:m.id)||(C=!0,e.postMessage({type:"update",id:l.id,index:l.events.indexOf(h),event:Object.assign(Object.assign({id:null!==(r=null==h?void 0:h.id)&&void 0!==r?r:"ID_xyxyxyxyxyxy".replace(/[xy]/g,(function(n){var t=16*Math.random()|0;return("x"==n?t:3&t|8).toString(16)})),name:null!==(u=null==h?void 0:h.name)&&void 0!==u?u:c.basename,note:c.path,date:f},v?{end:v}:{}),{category:null==m?void 0:m.id,description:null==h?void 0:h.description})}))}C&&e.postMessage({type:"save",id:null,index:null,event:null})}})))),e.addEventListener("message",(t=>n(void 0,void 0,void 0,(function*(){if("rename"===t.data.type){const{sourceCalendars:n,file:l}=t.data,o=l.oldPath.split("/").pop().split(".").shift();for(let t of n){const n=t.events.filter((n=>n.note==l.oldPath||n.note===o));for(let o of n)e.postMessage({type:"update",id:t.id,index:t.events.indexOf(o),event:Object.assign(Object.assign({},o),{note:l.path,name:l.basename})})}e.postMessage({type:"save",id:null,index:null,event:null})}}))));const l=(n={},t,e)=>{const l="fc-date"in n?"fc-date":"fc-start";let i;return n&&l in n&&(i=n[l]),i||(i=t),{start:[i].flat(2).map((n=>o(n,e))).filter((n=>n)),end:["fc-end"in n?n["fc-end"]:[]].flat(2).map((n=>o(n,e))).filter((n=>n))}},o=(n,t)=>{var e;if("string"!=typeof n)return n;if(/\\d+[./-]\\d+[./-]\\d+/.test(n))try{const[l]=null!==(e=n.match(/\\d+[./-]\\d+[./-]\\d+/))&&void 0!==e?e:[];if(!l)return;const o=l.split(/[.\\-\\/]/).map((n=>Number(n))),i=[...new Set(t.replace(/[^\\w]/g,"").toUpperCase().split(""))];return{year:o[i.indexOf("Y")],month:o[i.indexOf("M")],day:o[i.indexOf("D")]}}catch(n){return}}})();',"Worker",{name:"Fantasy Calendar Watcher",esModule:!1},void 0)}class rl extends t.Component{constructor(e){super(),this.plugin=e,this.worker=new al,this.files=new Map}get calendars(){return this.plugin.data.calendars}get vault(){return this.plugin.app.vault}get metadataCache(){return this.plugin.app.metadataCache}onload(){this.recurseFiles(),this.registerEvent(this.metadataCache.on("changed",(e=>{this.parseFileForEvents(e)}))),this.registerEvent(this.vault.on("rename",((e,n)=>{this.calendars.length&&e instanceof t.TFile&&this.worker.postMessage({type:"rename",file:{path:e.path,basename:e.basename,oldPath:n},sourceCalendars:this.calendars})}))),this.registerEvent(this.vault.on("delete",(e=>{if(e instanceof t.TFile){for(let t of this.calendars)for(let n of t.events)n.note&&n.note===e.path&&(n.note=null);this.plugin.saveCalendar()}}))),this.worker.onmessage=t=>e(this,void 0,void 0,(function*(){if("save"===t.data.type)return void this.plugin.saveCalendar();const{id:e,index:n,event:a}=t.data;this.calendars.find((t=>t.id==e)).events.splice(n,n>=0?1:0,a)}))}recurseFiles(){if(!this.calendars.length)return;const e=this.vault.getAbstractFileByPath(this.plugin.data.path);e&&e instanceof t.TFolder&&(this.recurseFolder(e),this.plugin.saveCalendar())}registerCalendar(e){console.log("[Fantasy Calendar] Parsing files for events.");const n=this.vault.getAbstractFileByPath(this.plugin.data.path);n&&n instanceof t.TFolder&&(this.recurseFolder(n,e),console.log("[Fantasy Calendar] Parsing complete."))}recurseFolder(e,n){t.Vault.recurseChildren(e,(e=>{e&&e instanceof t.TFile&&this.parseFileForEvents(e,n)}))}testPath(e){return null!=`/${e}`.match(new RegExp(`^${this.plugin.data.path}`))}parseFileForEvents(e,t){if(!this.calendars.length)return;if(!this.testPath(e.path))return;const n=this.metadataCache.getFileCache(e);this.worker.postMessage({type:"parse",file:{path:e.path,basename:e.basename},cache:n,sourceCalendars:t?[t]:this.calendars,defaultCalendar:this.plugin.defaultCalendar.name,format:this.plugin.format,parseTitle:this.plugin.data.parseDates})}onunload(){this.worker.terminate(),this.worker=null}}const il=t.Platform.isMacOS?"Meta":"Control",ol={name:null,description:null,id:null,static:{incrementDay:!1,firstWeekDay:null,overflow:!0,weekdays:[],months:[],moons:[],displayMoons:!0,displayDayNumber:!1,leapDays:[],eras:[]},current:{year:1,month:null,day:null},events:[],categories:[]},sl={calendars:[],currentCalendar:null,defaultCalendar:null,eventPreview:!1,configDirectory:null,path:"/",parseDates:!1,dateFormat:"YYYY-MM-DD",dailyNotes:!1,version:{major:null,minor:null,patch:null}};class ll extends t.Plugin{constructor(){super(...arguments),this.watcher=new rl(this)}addNewCalendar(t){return e(this,void 0,void 0,(function*(){this.data.calendars.push(Object.assign({},t)),this.data.defaultCalendar||(this.data.defaultCalendar=t.id),yield this.saveCalendar(),this.watcher.registerCalendar(t)}))}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 format(){var e;return null!==(e=this.data.dailyNotes&&this.canUseDailyNotes?this.dailyNotes.instance.options.format:this.data.dateFormat)&&void 0!==e?e:"YYYY-MM-DD"}get defaultCalendar(){var e;return null!==(e=this.data.calendars.find((e=>e.id==this.data.defaultCalendar)))&&void 0!==e?e:this.data.calendars[0]}get view(){const e=this.app.workspace.getLeavesOfType(Zs),t=e.length?e[0]:null;if(t&&t.view&&t.view instanceof Qs)return t.view}get full(){const e=this.app.workspace.getLeavesOfType(Ks),t=e.length?e[0]:null;if(t&&t.view&&t.view instanceof Qs)return t.view}onload(){return e(this,void 0,void 0,(function*(){console.log("Loading Fantasy Calendars v"+this.manifest.version),yield this.loadSettings(),this.watcher.load(),this.addSettingTab(new ro(this)),this.registerView(Zs,(e=>new Qs(this,e))),this.app.workspace.onLayoutReady((()=>this.addCalendarView(!0))),this.addRibbonIcon(Zs,"Open Large Fantasy Calendar",(e=>{this.app.workspace.getLeaf(e.getModifierState(il)).setViewState({type:Ks})})),this.registerView(Ks,(e=>new Qs(this,e,{full:!0}))),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=>{const t=this.app.workspace.getLeavesOfType(Zs);if(t&&t.length)return e||t[0].view.toggleMoons(),!0}}),this.addCommand({id:"view-date",name:"View Date",checkCallback:e=>{const t=this.app.workspace.getLeavesOfType(Zs);if(t&&t.length)return e||t[0].view.openDate(),!0}}),this.addCommand({id:"view-date",name:"View Note Event",checkCallback:e=>{const t=this.app.workspace.getLeavesOfType(Zs);if(t&&t.length&&t[0].view instanceof Qs){const n=this.app.workspace.getActiveFile();if(n){const a=t[0].view.calendar.events.find((e=>e.note==n.path));if(a)return e||t[0].view.openDay(a.date),!0}}}})}))}onunload(){return e(this,void 0,void 0,(function*(){console.log("Unloading Fantasy Calendars v"+this.manifest.version),this.app.workspace.getLeavesOfType(Zs).forEach((e=>e.detach())),this.app.workspace.getLeavesOfType(Ks).forEach((e=>e.detach())),this.watcher.unload()}))}addCalendarView(t=!1){var n;return e(this,void 0,void 0,(function*(){t&&(null===(n=this.app.workspace.getLeavesOfType(Zs))||void 0===n?void 0:n.length)||(yield this.app.workspace.getRightLeaf(!1).setViewState({type:Zs}),this.view&&this.app.workspace.revealLeaf(this.view.leaf))}))}addFullCalendarView(t=!1){var n;return e(this,void 0,void 0,(function*(){t&&(null===(n=this.app.workspace.getLeavesOfType(Ks))||void 0===n?void 0:n.length)||(this.app.workspace.getLeaf(!1).setViewState({type:Ks}),this.full&&this.app.workspace.revealLeaf(this.full.leaf))}))}loadSettings(){return e(this,void 0,void 0,(function*(){this.data=Object.assign(Object.assign({},sl),yield this.loadData()),this.configDirectory&&(yield this.app.vault.adapter.exists(this.configFilePath))&&(this.data=Object.assign({},this.data,JSON.parse(yield this.app.vault.adapter.read(this.configFilePath)))),!this.data.defaultCalendar&&this.data.calendars.length&&(this.data.defaultCalendar=this.data.calendars[0].id)}))}saveCalendar(){return e(this,void 0,void 0,(function*(){yield 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`}saveSettings(){return e(this,void 0,void 0,(function*(){this.saveData(this.data)}))}saveData(n){const a=Object.create(null,{saveData:{get:()=>super.saveData}});return e(this,void 0,void 0,(function*(){if(this.configDirectory)try{(yield this.app.vault.adapter.exists(this.configDirectory))||(yield this.app.vault.adapter.mkdir(this.configDirectory)),yield this.app.vault.adapter.write(this.configFilePath,JSON.stringify(n))}catch(e){console.error(e),new t.Notice("There was an error saving into the configured directory.")}yield a.saveData.call(this,n)}))}}})();var r=exports;for(var i in a)r[i]=a[i];a.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();