@event-calendar/build 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- EventCalendar v2.4.0
2
+ EventCalendar v2.5.0
3
3
  https://github.com/vkurko/calendar
4
4
  */
5
- var EventCalendar=function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function r(t){t.forEach(n)}function l(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function i(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];if(null==e){for(const t of o)t(void 0);return t}const l=e.subscribe(...o);return l.unsubscribe?()=>l.unsubscribe():l}function c(t){let e;return i(t,(t=>e=t))(),e}function a(t,e,n){t.$$.on_destroy.push(i(e,n))}function u(t,e,n,o){if(t){const r=d(t,e,n,o);return t[0](r)}}function d(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function f(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|r[o];return t}return e.dirty|r}return e.dirty}function h(t,e,n,o,r,l){if(r){const s=d(e,n,o,l);t.p(s,r)}}function p(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function g(t,e,n){return t.set(n),e}function $(e){return e&&l(e.destroy)?e.destroy:t}const m="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function v(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode&&t.parentNode.removeChild(t)}function b(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function k(t){return document.createElement(t)}function x(t){return document.createTextNode(t)}function C(){return x(" ")}function _(){return x("")}function T(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function D(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function E(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e){e=""+e,t.data!==e&&(t.data=e)}function M(t,e,n,o){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function U(t,e){return new t(e)}let B;function N(t){B=t}function L(){if(!B)throw new Error("Function called outside component initialization");return B}function H(t){L().$$.on_mount.push(t)}function P(t){L().$$.after_update.push(t)}function R(){const t=L();return function(e,n){let{cancelable:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.$$.callbacks[e];if(r){const l=function(t,e){let{bubbles:n=!1,cancelable:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new CustomEvent(t,{detail:e,bubbles:n,cancelable:o})}(e,n,{cancelable:o});return r.slice().forEach((e=>{e.call(t,l)})),!l.defaultPrevented}return!0}}function z(t){return L().$$.context.get(t)}function F(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const I=[],G=[];let j=[];const O=[],A=Promise.resolve();let W=!1;function Y(){W||(W=!0,A.then(K))}function q(){return Y(),A}function X(t){j.push(t)}const V=new Set;let J=0;function K(){if(0!==J)return;const t=B;do{try{for(;J<I.length;){const t=I[J];J++,N(t),Q(t.$$)}}catch(t){throw I.length=0,J=0,t}for(N(null),I.length=0,J=0;G.length;)G.pop()();for(let t=0;t<j.length;t+=1){const e=j[t];V.has(e)||(V.add(e),e())}j.length=0}while(I.length);for(;O.length;)O.pop()();W=!1,V.clear(),N(t)}function Q(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(X)}}const Z=new Set;let tt;function et(){tt={r:0,c:[],p:tt}}function nt(){tt.r||r(tt.c),tt=tt.p}function ot(t,e){t&&t.i&&(Z.delete(t),t.i(e))}function rt(t,e,n,o){if(t&&t.o){if(Z.has(t))return;Z.add(t),tt.c.push((()=>{Z.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}else o&&o()}function lt(t){return void 0!==t?.length?t:Array.from(t)}function st(t,e){rt(t,1,1,(()=>{e.delete(t.key)}))}function it(t,e,n,o,l,s,i,c,a,u,d,f){let h=t.length,p=s.length,g=h;const $={};for(;g--;)$[t[g].key]=g;const m=[],v=new Map,y=new Map,w=[];for(g=p;g--;){const t=f(l,s,g),r=n(t);let c=i.get(r);c?o&&w.push((()=>c.p(t,e))):(c=u(r,t),c.c()),v.set(r,m[g]=c),r in $&&y.set(r,Math.abs(g-$[r]))}const b=new Set,k=new Set;function x(t){ot(t,1),t.m(c,d),i.set(t.key,t),d=t.first,p--}for(;h&&p;){const e=m[p-1],n=t[h-1],o=e.key,r=n.key;e===n?(d=e.first,h--,p--):v.has(r)?!i.has(o)||b.has(o)?x(e):k.has(r)?h--:y.get(o)>y.get(r)?(k.add(o),x(e)):(b.add(r),h--):(a(n,i),h--)}for(;h--;){const e=t[h];v.has(e.key)||a(e,i)}for(;p;)x(m[p-1]);return r(w),m}function ct(t){t&&t.c()}function at(t,e,o){const{fragment:s,after_update:i}=t.$$;s&&s.m(e,o),X((()=>{const e=t.$$.on_mount.map(n).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):r(e),t.$$.on_mount=[]})),i.forEach(X)}function ut(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];j.forEach((o=>-1===t.indexOf(o)?e.push(o):n.push(o))),n.forEach((t=>t())),j=e}(n.after_update),r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function dt(e,n,l,s,i,c){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1];const d=B;N(e);const f=e.$$={fragment:null,ctx:[],props:c,update:t,not_equal:i,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:o(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};a&&a(f.root);let h=!1;if(f.ctx=l?l(e,n.props||{},(function(t,n){const o=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return f.ctx&&i(f.ctx[t],f.ctx[t]=o)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](o),h&&function(t,e){-1===t.$$.dirty[0]&&(I.push(t),Y(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(e,t)),n})):[],f.update(),h=!0,r(f.before_update),f.fragment=!!s&&s(f.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);f.fragment&&f.fragment.l(t),t.forEach(w)}else f.fragment&&f.fragment.c();n.intro&&ot(e.$$.fragment),at(e,n.target,n.anchor),K()}N(d)}class ft{$$=void 0;$$set=void 0;$destroy(){ut(this,1),this.$destroy=t}$on(e,n){if(!l(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ht=[];function pt(t,e){return{subscribe:gt(t,e).subscribe}}function gt(e){let n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;const r=new Set;function l(t){if(s(e,t)&&(e=t,n)){const t=!ht.length;for(const t of r)t[1](),ht.push(t,e);if(t){for(let t=0;t<ht.length;t+=2)ht[t][0](ht[t+1]);ht.length=0}}}function i(t){l(t(e))}return{set:l,update:i,subscribe:function(s){const c=[s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t];return r.add(c),1===r.size&&(n=o(l,i)||t),s(e),()=>{r.delete(c),0===r.size&&n&&(n(),n=null)}}}}function $t(e,n,o){const s=!Array.isArray(e),c=s?[e]:e;if(!c.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=n.length<2;return pt(o,((e,o)=>{let u=!1;const d=[];let f=0,h=t;const p=()=>{if(f)return;h();const r=n(s?d[0]:d,e,o);a?e(r):h=l(r)?r:t},g=c.map(((t,e)=>i(t,(t=>{d[e]=t,f&=~(1<<e),u&&p()}),(()=>{f|=1<<e}))));return u=!0,p(),function(){r(g),h(),u=!1}}))}function mt(t){return function(e){return"Enter"===e.key||" "===e.key?t.call(this,e):void 0}}function vt(t,e){let n={update(e){"string"==typeof e?t.innerText=e:e?.domNodes?t.replaceChildren(...e.domNodes):e?.html&&(t.innerHTML=e.html)}};return n.update(e),n}function yt(t,e){const n=n=>{t&&!t.contains(n.target)&&t.dispatchEvent(new CustomEvent(e+"outside",{detail:{jsEvent:n}}))};return document.addEventListener(e,n,!0),{destroy(){document.removeEventListener(e,n,!0)}}}const wt=86400;function bt(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return void 0!==t?t instanceof Date?Lt(t):function(t){const e=t.match(/\d+/g);return new Date(Date.UTC(Number(e[0]),Number(e[1])-1,Number(e[2]),Number(e[3]||0),Number(e[4]||0),Number(e[5]||0)))}(t):Lt(new Date)}function kt(t){if("number"==typeof t)t={seconds:t};else if("string"==typeof t){let e=0,n=2;for(let o of t.split(":",3))e+=parseInt(o,10)*Math.pow(60,n--);t={seconds:e}}else t instanceof Date&&(t={hours:t.getUTCHours(),minutes:t.getUTCMinutes(),seconds:t.getUTCSeconds()});let e=t.weeks||t.week||0;return{years:t.years||t.year||0,months:t.months||t.month||0,days:7*e+(t.days||t.day||0),seconds:60*(t.hours||t.hour||0)*60+60*(t.minutes||t.minute||0)+(t.seconds||t.second||0),inWeeks:!!e}}function xt(t){return new Date(t.getTime())}function Ct(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.setUTCFullYear(t.getUTCFullYear()+n*e.years);let o=t.getUTCMonth()+n*e.months;for(t.setUTCMonth(o),o%=12,o<0&&(o+=12);t.getUTCMonth()!==o;)Dt(t);return t.setUTCDate(t.getUTCDate()+n*e.days),t.setUTCSeconds(t.getUTCSeconds()+n*e.seconds),t}function _t(t,e){return Ct(t,e,-(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1))}function Tt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.setUTCDate(t.getUTCDate()+e),t}function Dt(t){return Tt(t,-(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1))}function Et(t){return t.setUTCHours(0,0,0,0),t}function St(t){return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())}function Mt(t){return t.toISOString().substring(0,19)}function Ut(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return n.every((e=>t.getTime()===e.getTime()))}function Bt(t,e){let n=e-t.getUTCDay();return t.setUTCDate(t.getUTCDate()+(n<=0?n:n-7)),t}function Nt(t){return"string"==typeof t&&t.length<=10}function Lt(t){return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()))}function Ht(t,e,n){n.update((n=>n.set(e,t)))}function Pt(){return Object.assign(...arguments)}function Rt(t){return Object.keys(t)}function zt(t){return Math.floor(t)}function Ft(){return Math.min(...arguments)}function It(){return Math.max(...arguments)}function Gt(t,e,n){let o=document.createElement(t);return o.className=e,"string"==typeof n?o.innerText=n:n.domNodes?o.replaceChildren(...n.domNodes):n.html&&(o.innerHTML=n.html),o}function jt(t){return t.getBoundingClientRect()}function Ot(t,e){for(;e--;)t=t.parentElement;return t}function At(t){return jt(t).height}let Wt=Symbol("ec");function Yt(t,e){t[Wt]=e}function qt(t){return!!t?.[Wt]}function Xt(t){return t[Wt]}function Vt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;for(let o of n.elementsFromPoint(t,e)){if(qt(o))return o;if(o.shadowRoot){let n=Vt(t,e,o.shadowRoot);if(n)return n}}return null}function Jt(t){return(t=Pt({},t)).currentStart=St(t.currentStart),t.currentEnd=St(t.currentEnd),t.activeStart=St(t.activeStart),t.activeEnd=St(t.activeEnd),t}let Kt=1;function Qt(t){return t.map((t=>({id:"id"in t?String(t.id):`{generated-${Kt++}}`,resourceIds:Array.isArray(t.resourceIds)?t.resourceIds.map(String):"resourceId"in t?[String(t.resourceId)]:[],allDay:t.allDay??(Nt(t.start)&&Nt(t.end)),start:bt(t.start),end:bt(t.end),title:t.title||"",titleHTML:t.titleHTML||"",editable:t.editable,startEditable:t.startEditable,durationEditable:t.durationEditable,display:t.display||"auto",extendedProps:t.extendedProps||{},backgroundColor:t.backgroundColor||t.color,textColor:t.textColor})))}function Zt(t){return t.map((t=>({events:t.events,url:t.url&&t.url.trimEnd("&")||"",method:t.method&&t.method.toUpperCase()||"GET",extraParams:t.extraParams||{}})))}function te(t,e,n){return{start:t.start>e?t.start:e,end:t.end<n?t.end:n,event:t}}function ee(t){t.sort(((t,e)=>t.start-e.start||e.event.allDay-t.event.allDay))}function ne(t,e){let n={};if(t.length){let o;ee(t);for(let r of t){let t=[],l=Et(xt(r.start));for(;r.end>l;){if(!e.includes(l.getUTCDay())&&(t.push(xt(l)),t.length>1)){let t=l.getTime();n[t]?n[t].chunks.push(r):n[t]={sorted:!1,chunks:[r]}}Tt(l)}t.length?(r.date=t[0],r.days=t.length,r.dates=t,r.start<t[0]&&(r.start=t[0]),Et(xt(r.end))>t[t.length-1]&&(r.end=t[t.length-1])):(r.date=Et(xt(r.start)),r.days=1,r.dates=[r.date]),o&&Ut(o.date,r.date)&&(r.prev=o),o=r}}return n}function oe(t,e,n){t.top=0,t.prev&&(t.top=t.prev.bottom+1),t.bottom=t.top+n;let o=1,r=t.date.getTime();if(e[r]?.sorted||e[r]?.chunks.every((t=>"top"in t))){e[r].sorted||(e[r].chunks.sort(((t,e)=>t.top-e.top)),e[r].sorted=!0);for(let n of e[r].chunks)if(t.top<n.bottom&&t.bottom>n.top){let e=n.bottom-t.top+1;o+=e,t.top+=e,t.bottom+=e}}return o}function re(t,e,n,o,r,s){let i=r.formatRange(t.start,e&&"pointer"!==t.event.display?(c=xt(t.start),a=t.end,c.setUTCHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),0),c):t.start);var c,a;let u;if(n)u=l(n)?n({event:se(t.event),timeText:i,view:Jt(s)}):n;else switch(t.event.display){case"background":u="";break;case"pointer":u={domNodes:[Gt("div",o.eventTime,i)]};break;default:u={domNodes:[...t.event.allDay?[]:[Gt("div",o.eventTime,i)],Gt("div",o.eventTitle,t.event.title)]}}return[i,u]}function le(t,e,n){return t?(l(t)&&(t=t({event:se(e),view:Jt(n)})),Array.isArray(t)?t:[t]):[]}function se(t){return ce(t,St)}function ie(t){return ce(t,xt)}function ce(t,e){return(t=Pt({},t)).start=e(t.start),t.end=e(t.end),t}function ae(t,e,n,o,r){return(t.start<n&&t.end>e||!r&&Ut(t.start,t.end,e))&&(void 0===o||t.resourceIds.includes(o.id))}function ue(t){return fe(t)||he(t)||function(t){return"pointer"===t}(t)}function de(t){return"background"===t}function fe(t){return"preview"===t}function he(t){return"ghost"===t}function pe(t){return ve(t,"day")}function ge(t){return ve(t,"week")}function $e(t){return ve(t,"month")}function me(t){return ve(t,"year")}function ve(t,e){return{...t,next:"Next "+e,prev:"Previous "+e}}function ye(t){return e=>({...e,view:t})}function we(t,e){return $t([t,e],(t=>{let[e,n]=t,o=l(n)?{format:n}:new Intl.DateTimeFormat(e,n);return{format:t=>o.format(St(t))}}))}function be(t,e){return $t([t,e],(t=>{let[e,n]=t,o=l(n)?{formatRange:n}:new Intl.DateTimeFormat(e,n);return{formatRange:(t,e)=>o.formatRange(St(t),St(e))}}))}class ke{constructor(n,o){let r=function(t){let e={allDayContent:void 0,allDaySlot:!0,buttonText:{today:"today"},date:new Date,datesSet:void 0,dayHeaderFormat:{weekday:"short",month:"numeric",day:"numeric"},displayEventEnd:!0,duration:{weeks:1},events:[],eventBackgroundColor:void 0,eventTextColor:void 0,eventClassNames:void 0,eventClick:void 0,eventColor:void 0,eventContent:void 0,eventDidMount:void 0,eventMouseEnter:void 0,eventMouseLeave:void 0,eventSources:[],eventTimeFormat:{hour:"numeric",minute:"2-digit"},firstDay:0,flexibleSlotTimeLimits:!1,headerToolbar:{start:"title",center:"",end:"today prev,next"},height:void 0,hiddenDays:[],highlightedDates:[],lazyFetching:!0,loading:void 0,locale:void 0,nowIndicator:!1,selectable:!1,scrollTime:"06:00:00",slotDuration:"00:30:00",slotEventOverlap:!0,slotHeight:24,slotLabelFormat:{hour:"numeric",minute:"2-digit"},slotMaxTime:"24:00:00",slotMinTime:"00:00:00",theme:{allDay:"ec-all-day",active:"ec-active",bgEvent:"ec-bg-event",bgEvents:"ec-bg-events",body:"ec-body",button:"ec-button",buttonGroup:"ec-button-group",calendar:"ec",compact:"ec-compact",content:"ec-content",day:"ec-day",dayHead:"ec-day-head",days:"ec-days",event:"ec-event",eventBody:"ec-event-body",eventTime:"ec-event-time",eventTitle:"ec-event-title",events:"ec-events",extra:"ec-extra",handle:"ec-handle",header:"ec-header",hiddenScroll:"ec-hidden-scroll",highlight:"ec-highlight",icon:"ec-icon",line:"ec-line",lines:"ec-lines",nowIndicator:"ec-now-indicator",otherMonth:"ec-other-month",sidebar:"ec-sidebar",sidebarTitle:"ec-sidebar-title",today:"ec-today",time:"ec-time",title:"ec-title",toolbar:"ec-toolbar",view:"",weekdays:["ec-sun","ec-mon","ec-tue","ec-wed","ec-thu","ec-fri","ec-sat"],withScroll:"ec-with-scroll"},titleFormat:{year:"numeric",month:"short",day:"numeric"},view:void 0,viewDidMount:void 0,views:{}};for(let n of t)n.createOptions?.(e);return e}(n=n||[]),s=function(t){let e={date:t=>Et(bt(t)),duration:kt,events:Qt,eventSources:Zt,hiddenDays:t=>[...new Set(t)],highlightedDates:t=>t.map(bt),scrollTime:kt,slotDuration:kt,slotMaxTime:kt,slotMinTime:kt};for(let n of t)n.createParsers?.(e);return e}(n);r=xe(r,s),o=xe(o,s);for(let[t,e]of Object.entries(r))this[t]=gt(e);this._queue=gt(new Map),this._auxiliary=gt([]),this._dayGrid=$t(this.view,(t=>t?.startsWith("dayGrid"))),this._currentRange=function(t){return $t([t.date,t.duration,t.firstDay,t._dayGrid],(t=>{let e,[n,o,r,l]=t,s=xt(n);return l?s.setUTCDate(1):o.inWeeks&&Bt(s,r),e=Ct(xt(s),o),{start:s,end:e}}))}(this),this._activeRange=function(t){return $t([t._currentRange,t.firstDay,t.slotMaxTime,t._dayGrid],(t=>{let[e,n,o,r]=t,l=xt(e.start),s=xt(e.end);if(r)Bt(l,n),function(t,e){let n=e-t.getUTCDay();t.setUTCDate(t.getUTCDate()+(n>=0?n:n+7))}(s,n);else if(o.days||o.seconds>wt){Ct(Dt(s),o);let t=Dt(xt(s));t<l&&(l=t)}return{start:l,end:s}}))}(this),this._fetchedRange=gt({start:void 0,end:void 0}),this._events=function(t){let e,n=gt([]),o=0,r={};return $t([t.events,t.eventSources,t._activeRange,t._fetchedRange,t.lazyFetching,t.loading],((n,s)=>Ht((()=>{let[t,r,i,c,a,u]=n;if(r.length){if(!c.start||c.start>i.start||c.end<i.end||!a){e&&e.abort(),e=new AbortController,l(u)&&!o&&u(!0);let t=()=>{0==--o&&l(u)&&u(!1)},n=[],a=e=>t(),d=e=>{n=n.concat(Qt(e)),s(n),t()},f=Mt(i.start),h=Mt(i.end);for(let t of r){if(l(t.events)){let e=t.events({start:St(i.start),end:St(i.end),startStr:f,endStr:h},d,a);void 0!==e&&Promise.resolve(e).then(d,a)}else{let n=l(t.extraParams)?t.extraParams():Pt({},t.extraParams);n.start=f,n.end=h,n=new URLSearchParams(n);let o,r=t.url,s={};["GET","HEAD"].includes(t.method)?r+=(r.includes("?")?"&":"?")+n:(s["content-type"]="application/x-www-form-urlencoded;charset=UTF-8",o=String(n)),fetch(r,{method:t.method,headers:s,body:o,signal:e.signal,credentials:"same-origin"}).then((t=>t.json())).then(d).catch(a)}++o}c.start=i.start,c.end=i.end}}else s(t)}),r,t._queue)),[]).subscribe(n.set),n}(this),this._now=pt(bt(),(t=>{let e=setInterval((()=>{t(bt())}),1e3);return()=>clearInterval(e)})),this._today=function(t){return $t(t._now,(t=>Et(xt(t))))}(this),this._intlEventTime=be(this.locale,this.eventTimeFormat),this._intlSlotLabel=we(this.locale,this.slotLabelFormat),this._intlDayHeader=we(this.locale,this.dayHeaderFormat),this._intlTitle=be(this.locale,this.titleFormat),this._bodyEl=gt(void 0),this._scrollable=gt(!1),this._viewTitle=function(t){return $t([t.date,t._activeRange,t._intlTitle,t._dayGrid],(t=>{let[e,n,o,r]=t;return r?o.formatRange(e,e):o.formatRange(n.start,Dt(xt(n.end)))}))}(this),this._viewDates=function(t){return $t([t._activeRange,t.hiddenDays],(e=>{let[n,o]=e,r=[],l=Et(xt(n.start)),s=Et(xt(n.end));for(;l<s;)o.includes(l.getUTCDay())||r.push(xt(l)),Tt(l);return!r.length&&o.length&&o.length<7&&(t.date.update((t=>{for(;o.includes(t.getUTCDay());)Tt(t);return t})),r=c(t._viewDates)),r}))}(this),this._view=function(t){return $t([t.view,t._viewTitle,t._currentRange,t._activeRange],(t=>function(t,e,n,o){return{type:t,title:e,currentStart:n.start,currentEnd:n.end,activeStart:o.start,activeEnd:o.end,calendar:void 0}}(...t)))}(this),this._viewComponent=gt(void 0),this._resBgColor=gt(t),this._resTxtColor=gt(t),this._interaction=gt({}),this._iEvents=gt([null,null]),this._iClasses=gt(e),this._iClass=gt(void 0),this._set=(t,e)=>{Te(t,this)&&(s[t]&&(e=s[t](e)),this[t].set(e))},this._get=t=>Te(t,this)?c(this[t]):void 0;for(let t of n)t.createStores?.(this);o.view&&this.view.set(o.view);let i=new Set([...Rt(r.views),...Rt(o.views??{})]);for(let t of i){let e=Ce(r,r.views[t]??{}),n=Ce(e,o,o.views?.[t]??{}),s=n.component;_e(n,this);for(let t of Rt(n)){let{set:o,_set:r=o,...s}=this[t];this[t]={set:["buttonText","theme"].includes(t)?s=>{if(l(s)){let l=s(e[t]);n[t]=l,o(o===r?l:s)}else n[t]=s,o(s)}:e=>{n[t]=e,o(e)},_set:r,...s}}this.view.subscribe((e=>{if(e===t){this._viewComponent.set(s),l(n.viewDidMount)&&q().then((()=>n.viewDidMount(c(this._view))));for(let t of Rt(n))this[t]._set(n[t])}}))}}}function xe(t,e){let n={...t};for(let t of Rt(e))t in n&&(n[t]=e[t](n[t]));if(t.views){n.views={};for(let o of Rt(t.views))n.views[o]=xe(t.views[o],e)}return n}function Ce(){let t={};for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];for(let e of n){let n={};for(let o of["buttonText","theme"])l(e[o])&&(n[o]=e[o](t[o]));t={...t,...e,...n}}return t}function _e(t,e){Rt(t).filter((t=>!Te(t,e)||"view"==t)).forEach((e=>delete t[e]))}function Te(t,e){return e.hasOwnProperty(t)&&"_"!==t[0]}function De(t,e,n){const o=t.slice();return o[23]=e[n],o}function Ee(t){let e,n,o,r,l,s=t[5][t[23]]+"";function i(){return t[20](t[23])}return{c(){e=k("button"),n=x(s),E(e,"class",o=t[3].button+(t[6]===t[23]?" "+t[3].active:"")+" ec-"+t[23])},m(t,o){y(t,e,o),v(e,n),r||(l=T(e,"click",i),r=!0)},p(r,l){t=r,33&l&&s!==(s=t[5][t[23]]+"")&&S(n,s),73&l&&o!==(o=t[3].button+(t[6]===t[23]?" "+t[3].active:"")+" ec-"+t[23])&&E(e,"class",o)},d(t){t&&w(e),r=!1,l()}}}function Se(t){let e,n,o,r,l,s=t[5][t[23]]+"";return{c(){e=k("button"),n=x(s),E(e,"class",o=t[3].button+" ec-"+t[23]),e.disabled=t[1]},m(o,s){y(o,e,s),v(e,n),r||(l=T(e,"click",t[19]),r=!0)},p(t,r){33&r&&s!==(s=t[5][t[23]]+"")&&S(n,s),9&r&&o!==(o=t[3].button+" ec-"+t[23])&&E(e,"class",o),2&r&&(e.disabled=t[1])},d(t){t&&w(e),r=!1,l()}}}function Me(t){let e,n,o,r,l,s,i,c;return{c(){e=k("button"),n=k("i"),E(n,"class",o=t[3].icon+" ec-"+t[23]),E(e,"class",r=t[3].button+" ec-"+t[23]),E(e,"aria-label",l=t[5].next),E(e,"title",s=t[5].next)},m(o,r){y(o,e,r),v(e,n),i||(c=T(e,"click",t[17]),i=!0)},p(t,i){9&i&&o!==(o=t[3].icon+" ec-"+t[23])&&E(n,"class",o),9&i&&r!==(r=t[3].button+" ec-"+t[23])&&E(e,"class",r),32&i&&l!==(l=t[5].next)&&E(e,"aria-label",l),32&i&&s!==(s=t[5].next)&&E(e,"title",s)},d(t){t&&w(e),i=!1,c()}}}function Ue(t){let e,n,o,r,l,s,i,c;return{c(){e=k("button"),n=k("i"),E(n,"class",o=t[3].icon+" ec-"+t[23]),E(e,"class",r=t[3].button+" ec-"+t[23]),E(e,"aria-label",l=t[5].prev),E(e,"title",s=t[5].prev)},m(o,r){y(o,e,r),v(e,n),i||(c=T(e,"click",t[16]),i=!0)},p(t,i){9&i&&o!==(o=t[3].icon+" ec-"+t[23])&&E(n,"class",o),9&i&&r!==(r=t[3].button+" ec-"+t[23])&&E(e,"class",r),32&i&&l!==(l=t[5].prev)&&E(e,"aria-label",l),32&i&&s!==(s=t[5].prev)&&E(e,"title",s)},d(t){t&&w(e),i=!1,c()}}}function Be(t){let e,n,o,r,s;return{c(){e=k("h2"),E(e,"class",n=t[3].title)},m(n,l){y(n,e,l),r||(s=$(o=vt.call(null,e,t[4])),r=!0)},p(t,r){8&r&&n!==(n=t[3].title)&&E(e,"class",n),o&&l(o.update)&&16&r&&o.update.call(null,t[4])},d(t){t&&w(e),r=!1,s()}}}function Ne(t){let e;function n(t,e){return"title"==t[23]?Be:"prev"==t[23]?Ue:"next"==t[23]?Me:"today"==t[23]?Se:""!=t[23]?Ee:void 0}let o=n(t),r=o&&o(t);return{c(){r&&r.c(),e=_()},m(t,n){r&&r.m(t,n),y(t,e,n)},p(t,l){o===(o=n(t))&&r?r.p(t,l):(r&&r.d(1),r=o&&o(t),r&&(r.c(),r.m(e.parentNode,e)))},d(t){t&&w(e),r&&r.d(t)}}}function Le(e){let n,o=lt(e[0]),r=[];for(let t=0;t<o.length;t+=1)r[t]=Ne(De(e,o,t));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();n=_()},m(t,e){for(let n=0;n<r.length;n+=1)r[n]&&r[n].m(t,e);y(t,n,e)},p(t,e){let[l]=e;if(229503&l){let e;for(o=lt(t[0]),e=0;e<o.length;e+=1){const s=De(t,o,e);r[e]?r[e].p(s,l):(r[e]=Ne(s),r[e].c(),r[e].m(n.parentNode,n))}for(;e<r.length;e+=1)r[e].d(1);r.length=o.length}},i:t,o:t,d(t){t&&w(n),b(r,t)}}}function He(t,e,n){let o,r,l,s,i,c,u,d,{buttons:f}=e,{_currentRange:h,_viewTitle:p,buttonText:$,date:m,duration:v,hiddenDays:y,theme:w,view:b}=z("state");a(t,h,(t=>n(18,s=t))),a(t,p,(t=>n(4,c=t))),a(t,$,(t=>n(5,u=t))),a(t,m,(t=>n(2,r=t))),a(t,v,(t=>n(21,o=t))),a(t,y,(t=>n(22,l=t))),a(t,w,(t=>n(3,i=t))),a(t,b,(t=>n(6,d=t)));let k,x=Et(bt());return t.$$set=t=>{"buttons"in t&&n(0,f=t.buttons)},t.$$.update=()=>{262144&t.$$.dirty&&n(1,k=x>=s.start&&x<s.end||null)},[f,k,r,i,c,u,d,h,p,$,m,v,y,w,b,x,function(){let t=_t(r,o);if(l.length&&l.length<7)for(;l.includes(t.getUTCDay());)Dt(t);g(m,r=t,r)},function(){g(m,r=Ct(r,o),r)},s,()=>g(m,r=xt(x),r),t=>g(b,d=t,d)]}class Pe extends ft{constructor(t){super(),dt(this,t,He,Le,s,{buttons:0})}}function Re(t,e,n){const o=t.slice();return o[5]=e[n],o}function ze(t,e,n){const o=t.slice();return o[8]=e[n],o}function Fe(t){let e,n;return e=new Pe({props:{buttons:t[8]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.buttons=t[8]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Ie(t){let e,n,o,r;return n=new Pe({props:{buttons:t[8]}}),{c(){e=k("div"),ct(n.$$.fragment),E(e,"class",o=t[1].buttonGroup)},m(t,o){y(t,e,o),at(n,e,null),r=!0},p(t,l){const s={};1&l&&(s.buttons=t[8]),n.$set(s),(!r||2&l&&o!==(o=t[1].buttonGroup))&&E(e,"class",o)},i(t){r||(ot(n.$$.fragment,t),r=!0)},o(t){rt(n.$$.fragment,t),r=!1},d(t){t&&w(e),ut(n)}}}function Ge(t){let e,n,o,r;const l=[Ie,Fe],s=[];function i(t,e){return t[8].length>1?0:1}return e=i(t),n=s[e]=l[e](t),{c(){n.c(),o=_()},m(t,n){s[e].m(t,n),y(t,o,n),r=!0},p(t,r){let c=e;e=i(t),e===c?s[e].p(t,r):(et(),rt(s[c],1,1,(()=>{s[c]=null})),nt(),n=s[e],n?n.p(t,r):(n=s[e]=l[e](t),n.c()),ot(n,1),n.m(o.parentNode,o))},i(t){r||(ot(n),r=!0)},o(t){rt(n),r=!1},d(t){t&&w(o),s[e].d(t)}}}function je(t){let e,n,o,r=lt(t[0][t[5]]),l=[];for(let e=0;e<r.length;e+=1)l[e]=Ge(ze(t,r,e));const s=t=>rt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=k("div");for(let t=0;t<l.length;t+=1)l[t].c();n=C()},m(t,r){y(t,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);v(e,n),o=!0},p(t,o){if(3&o){let i;for(r=lt(t[0][t[5]]),i=0;i<r.length;i+=1){const s=ze(t,r,i);l[i]?(l[i].p(s,o),ot(l[i],1)):(l[i]=Ge(s),l[i].c(),ot(l[i],1),l[i].m(e,n))}for(et(),i=r.length;i<l.length;i+=1)s(i);nt()}},i(t){if(!o){for(let t=0;t<r.length;t+=1)ot(l[t]);o=!0}},o(t){l=l.filter(Boolean);for(let t=0;t<l.length;t+=1)rt(l[t]);o=!1},d(t){t&&w(e),b(l,t)}}}function Oe(t){let e,n,o,r=lt(Object.keys(t[0])),l=[];for(let e=0;e<r.length;e+=1)l[e]=je(Re(t,r,e));const s=t=>rt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=k("div");for(let t=0;t<l.length;t+=1)l[t].c();E(e,"class",n=t[1].toolbar)},m(t,n){y(t,e,n);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);o=!0},p(t,i){let[c]=i;if(3&c){let n;for(r=lt(Object.keys(t[0])),n=0;n<r.length;n+=1){const o=Re(t,r,n);l[n]?(l[n].p(o,c),ot(l[n],1)):(l[n]=je(o),l[n].c(),ot(l[n],1),l[n].m(e,null))}for(et(),n=r.length;n<l.length;n+=1)s(n);nt()}(!o||2&c&&n!==(n=t[1].toolbar))&&E(e,"class",n)},i(t){if(!o){for(let t=0;t<r.length;t+=1)ot(l[t]);o=!0}},o(t){l=l.filter(Boolean);for(let t=0;t<l.length;t+=1)rt(l[t]);o=!1},d(t){t&&w(e),b(l,t)}}}function Ae(t,e,n){let o,r,{headerToolbar:l,theme:s}=z("state");a(t,l,(t=>n(4,o=t))),a(t,s,(t=>n(1,r=t)));let i={start:[],center:[],end:[]};return t.$$.update=()=>{if(17&t.$$.dirty)for(let t of Object.keys(i))n(0,i[t]=o[t].split(" ").map((t=>t.split(","))),i)},[i,r,l,s,o]}class We extends ft{constructor(t){super(),dt(this,t,Ae,Oe,s,{})}}function Ye(t,e,n){const o=t.slice();return o[11]=e[n],o}function qe(t){let e,n,o;var r=t[11];return r&&(e=U(r,{})),{c(){e&&ct(e.$$.fragment),n=_()},m(t,r){e&&at(e,t,r),y(t,n,r),o=!0},p(t,o){if(1&o&&r!==(r=t[11])){if(e){et();const t=e;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}r?(e=U(r,{}),ct(e.$$.fragment),ot(e.$$.fragment,1),at(e,n.parentNode,n)):e=null}},i(t){o||(e&&ot(e.$$.fragment,t),o=!0)},o(t){e&&rt(e.$$.fragment,t),o=!1},d(t){t&&w(n),e&&ut(e,t)}}}function Xe(t){let e,n,o=lt(t[0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=qe(Ye(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){let[s]=n;if(1&s){let n;for(o=lt(t[0]),n=0;n<o.length;n+=1){const l=Ye(t,o,n);r[n]?(r[n].p(l,s),ot(r[n],1)):(r[n]=qe(l),r[n].c(),ot(r[n],1),r[n].m(e.parentNode,e))}for(et(),n=o.length;n<r.length;n+=1)l(n);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Ve(t,e,n){let o,r,s,i,{datesSet:c,_auxiliary:u,_activeRange:d,_queue:f,_view:h}=z("state");a(t,c,(t=>n(7,r=t))),a(t,u,(t=>n(0,i=t))),a(t,d,(t=>n(5,s=t))),a(t,h,(t=>n(6,o=t)));let p={};return t.$$.update=()=>{32&t.$$.dirty&&function(t){l(r)&&Ht((()=>r({start:St(t.start),end:St(t.end),startStr:Mt(t.start),endStr:Mt(t.end),view:Jt(o)})),p,f)}(s)},[i,c,u,d,h,s]}let Je=class extends ft{constructor(t){super(),dt(this,t,Ve,Xe,s,{})}};function Ke(t){let e,n,o,r,l,s,i,c,a,u;n=new We({});var d=t[4];return d&&(r=U(d,{})),i=new Je({}),{c(){e=k("div"),ct(n.$$.fragment),o=C(),r&&ct(r.$$.fragment),s=C(),ct(i.$$.fragment),E(e,"class",l=t[1].calendar+" "+t[1].view+(t[0]?" "+t[1].withScroll:"")+(t[2]?" "+t[1][t[2]]:"")),M(e,"height",t[3])},m(l,d){y(l,e,d),at(n,e,null),v(e,o),r&&at(r,e,null),y(l,s,d),at(i,l,d),c=!0,a||(u=T(window,"resize",t[14]),a=!0)},p(t,n){if(16&n[0]&&d!==(d=t[4])){if(r){et();const t=r;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}d?(r=U(d,{}),ct(r.$$.fragment),ot(r.$$.fragment,1),at(r,e,null)):r=null}(!c||7&n[0]&&l!==(l=t[1].calendar+" "+t[1].view+(t[0]?" "+t[1].withScroll:"")+(t[2]?" "+t[1][t[2]]:"")))&&E(e,"class",l),8&n[0]&&M(e,"height",t[3])},i(t){c||(ot(n.$$.fragment,t),r&&ot(r.$$.fragment,t),ot(i.$$.fragment,t),c=!0)},o(t){rt(n.$$.fragment,t),r&&rt(r.$$.fragment,t),rt(i.$$.fragment,t),c=!1},d(t){t&&(w(e),w(s)),ut(n),r&&ut(r),ut(i,t),a=!1,u()}}}function Qe(t,e,n){let o,l,s,i,u,d,f,h,p,{plugins:$=[]}=e,{options:m={}}=e,v=L(),y=new ke($,m);var w,b;w="state",b=y,L().$$.context.set(w,b);let{_viewComponent:k,_bodyEl:x,_interaction:C,_iClass:_,_events:T,_queue:D,_scrollable:E,events:S,eventSources:M,height:U,theme:B}=y;a(t,k,(t=>n(4,p=t))),a(t,x,(t=>n(29,o=t))),a(t,C,(t=>n(31,i=t))),a(t,_,(t=>n(2,f=t))),a(t,T,(t=>n(32,u=t))),a(t,D,(t=>n(30,s=t))),a(t,E,(t=>n(0,l=t))),a(t,U,(t=>n(3,h=t))),a(t,B,(t=>n(1,d=t)));let N={...m};function H(t,e){return y._set(t,e),this}var P;function R(){var t;o&&g(E,l=(t=o).scrollHeight>t.clientHeight,l)}return P=()=>{var t;r(t=s),t.clear(),setTimeout(R)},L().$$.before_update.push(P),t.$$set=t=>{"plugins"in t&&n(15,$=t.plugins),"options"in t&&n(16,m=t.options)},t.$$.update=()=>{if(65536&t.$$.dirty[0])for(let[t,e]of function(t,e){let n=[];for(let o of Rt(t))t[o]!==e[o]&&n.push([o,t[o]]);return Pt(e,t),n}(m,N))H(t,e)},[l,d,f,h,p,k,x,C,_,T,D,E,U,B,R,$,m,H,function(t){let e=y._get(t);return e instanceof Date?St(e):e},function(){return y._fetchedRange.set({start:void 0,end:void 0}),this},function(){return u.map(se)},function(t){for(let e of u)if(e.id==t)return se(e);return null},function(t){return u.push(Qt([t])[0]),T.set(u),this},function(t){for(let e of u)if(e.id==t.id){Pt(e,Qt([t])[0]),T.set(u);break}return this},function(t){let e=u.findIndex((e=>e.id==t));return e>=0&&(u.splice(e,1),T.set(u)),this},function(){return Jt(c(y._view))},function(){return i.action&&i.action.unselect(),this},function(t,e){let n=Vt(t,e);return n?Xt(n)(e):null},function(){ut(v,!0)}]}class Ze extends ft{constructor(t){super(),dt(this,t,Qe,Ke,s,{plugins:15,options:16,setOption:17,getOption:18,refetchEvents:19,getEvents:20,getEventById:21,addEvent:22,updateEvent:23,removeEventById:24,getView:25,unselect:26,dateFromPoint:27,destroy:28},null,[-1,-1])}get setOption(){return this.$$.ctx[17]}get getOption(){return this.$$.ctx[18]}get refetchEvents(){return this.$$.ctx[19]}get getEvents(){return this.$$.ctx[20]}get getEventById(){return this.$$.ctx[21]}get addEvent(){return this.$$.ctx[22]}get updateEvent(){return this.$$.ctx[23]}get removeEventById(){return this.$$.ctx[24]}get getView(){return this.$$.ctx[25]}get unselect(){return this.$$.ctx[26]}get dateFromPoint(){return this.$$.ctx[27]}get destroy(){return this.$$.ctx[28]}}function tn(t,e,n){const o=t.slice();return o[6]=e[n],o}function en(t){let e,n,o,r,s;return{c(){e=k("div"),E(e,"class",n=t[0].day+" "+t[0].weekdays?.[t[6].getUTCDay()])},m(n,l){y(n,e,l),r||(s=$(o=vt.call(null,e,t[2].format(t[6]))),r=!0)},p(r,s){t=r,3&s&&n!==(n=t[0].day+" "+t[0].weekdays?.[t[6].getUTCDay()])&&E(e,"class",n),o&&l(o.update)&&6&s&&o.update.call(null,t[2].format(t[6]))},d(t){t&&w(e),r=!1,s()}}}function nn(e){let n,o,r,l,s,i,c,a=lt(e[1]),u=[];for(let t=0;t<a.length;t+=1)u[t]=en(tn(e,a,t));return{c(){n=k("div"),o=k("div");for(let t=0;t<u.length;t+=1)u[t].c();l=C(),s=k("div"),E(o,"class",r=e[0].days),E(s,"class",i=e[0].hiddenScroll),E(n,"class",c=e[0].header)},m(t,e){y(t,n,e),v(n,o);for(let t=0;t<u.length;t+=1)u[t]&&u[t].m(o,null);v(n,l),v(n,s)},p(t,e){let[l]=e;if(7&l){let e;for(a=lt(t[1]),e=0;e<a.length;e+=1){const n=tn(t,a,e);u[e]?u[e].p(n,l):(u[e]=en(n),u[e].c(),u[e].m(o,null))}for(;e<u.length;e+=1)u[e].d(1);u.length=a.length}1&l&&r!==(r=t[0].days)&&E(o,"class",r),1&l&&i!==(i=t[0].hiddenScroll)&&E(s,"class",i),1&l&&c!==(c=t[0].header)&&E(n,"class",c)},i:t,o:t,d(t){t&&w(n),b(u,t)}}}function on(t,e,n){let o,r,l,{theme:s,_intlDayHeader:i,_days:c}=z("state");return a(t,s,(t=>n(0,o=t))),a(t,i,(t=>n(2,l=t))),a(t,c,(t=>n(1,r=t))),[o,r,l,s,i,c]}class rn extends ft{constructor(t){super(),dt(this,t,on,nn,s,{})}}function ln(t){let e,n,o,r,l;const s=t[7].default,i=u(s,t,t[6],null);return{c(){e=k("div"),n=k("div"),i&&i.c(),E(n,"class",o=t[0].content),E(e,"class",r=t[0].body+(!0===t[1]?" "+t[0].uniform:""))},m(o,r){y(o,e,r),v(e,n),i&&i.m(n,null),t[8](e),l=!0},p(t,c){let[a]=c;i&&i.p&&(!l||64&a)&&h(i,s,t,t[6],l?f(s,t[6],a,null):p(t[6]),null),(!l||1&a&&o!==(o=t[0].content))&&E(n,"class",o),(!l||3&a&&r!==(r=t[0].body+(!0===t[1]?" "+t[0].uniform:"")))&&E(e,"class",r)},i(t){l||(ot(i,t),l=!0)},o(t){rt(i,t),l=!1},d(n){n&&w(e),i&&i.d(n),t[8](null)}}}function sn(t,e,n){let o,r,l,{$$slots:s={},$$scope:i}=e,{dayMaxEvents:c,_bodyEl:u,theme:d}=z("state");return a(t,c,(t=>n(1,r=t))),a(t,u,(t=>n(2,l=t))),a(t,d,(t=>n(0,o=t))),t.$$set=t=>{"$$scope"in t&&n(6,i=t.$$scope)},[o,r,l,c,u,d,i,s,function(t){G[t?"unshift":"push"]((()=>{l=t,u.set(l)}))}]}let cn=class extends ft{constructor(t){super(),dt(this,t,sn,ln,s,{})}};function an(t){let e,n,o,s,i,c,a,u,d;var f=t[7].resizer;function h(t,e){return{props:{event:t[0]}}}return f&&(c=U(f,h(t)),c.$on("pointerdown",(function(){l(t[32](t[7],!0))&&t[32](t[7],!0).apply(this,arguments)}))),{c(){e=k("div"),n=k("div"),i=C(),c&&ct(c.$$.fragment),E(n,"class",o=t[1].eventBody),E(e,"class",t[3]),E(e,"style",t[4])},m(o,r){y(o,e,r),v(e,n),v(e,i),c&&at(c,e,null),t[50](e),a=!0,u||(d=[$(s=vt.call(null,n,t[5])),T(e,"click",(function(){l(t[31](t[8],t[6]))&&t[31](t[8],t[6]).apply(this,arguments)})),T(e,"mouseenter",(function(){l(t[31](t[9],t[6]))&&t[31](t[9],t[6]).apply(this,arguments)})),T(e,"mouseleave",(function(){l(t[31](t[10],t[6]))&&t[31](t[10],t[6]).apply(this,arguments)})),T(e,"pointerdown",(function(){l(!ue(t[6])&&t[32](t[7]))&&(!ue(t[6])&&t[32](t[7])).apply(this,arguments)}))],u=!0)},p(r,i){if(t=r,(!a||2&i[0]&&o!==(o=t[1].eventBody))&&E(n,"class",o),s&&l(s.update)&&32&i[0]&&s.update.call(null,t[5]),128&i[0]&&f!==(f=t[7].resizer)){if(c){et();const t=c;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}f?(c=U(f,h(t)),c.$on("pointerdown",(function(){l(t[32](t[7],!0))&&t[32](t[7],!0).apply(this,arguments)})),ct(c.$$.fragment),ot(c.$$.fragment,1),at(c,e,null)):c=null}else if(f){const e={};1&i[0]&&(e.event=t[0]),c.$set(e)}(!a||8&i[0])&&E(e,"class",t[3]),(!a||16&i[0])&&E(e,"style",t[4])},i(t){a||(c&&ot(c.$$.fragment,t),a=!0)},o(t){c&&rt(c.$$.fragment,t),a=!1},d(n){n&&w(e),c&&ut(c),t[50](null),u=!1,r(d)}}}function un(t,e,n){let o,r,s,i,c,u,d,f,h,p,g,$,m,v,y,w,b,k,x,C,_,T,D,E,S,M,{chunk:U}=e,{longChunks:B={}}=e,{inPopup:N=!1}=e,{dayMaxEvents:L,displayEventEnd:P,eventBackgroundColor:R,eventTextColor:F,eventClick:I,eventColor:j,eventContent:O,eventClassNames:A,eventDidMount:W,eventMouseEnter:Y,eventMouseLeave:q,theme:X,_view:V,_intlEventTime:J,_interaction:K,_iClasses:Q,_resBgColor:Z,_resTxtColor:tt,_hiddenEvents:et,_popupDate:nt}=z("state");a(t,L,(t=>n(53,r=t))),a(t,P,(t=>n(42,p=t))),a(t,R,(t=>n(48,w=t))),a(t,F,(t=>n(45,m=t))),a(t,I,(t=>n(8,k=t))),a(t,j,(t=>n(47,y=t))),a(t,O,(t=>n(41,h=t))),a(t,A,(t=>n(43,g=t))),a(t,W,(t=>n(55,u=t))),a(t,Y,(t=>n(9,x=t))),a(t,q,(t=>n(10,C=t))),a(t,X,(t=>n(1,f=t))),a(t,V,(t=>n(39,c=t))),a(t,J,(t=>n(40,d=t))),a(t,K,(t=>n(7,i=t))),a(t,Q,(t=>n(44,$=t))),a(t,Z,(t=>n(49,b=t))),a(t,tt,(t=>n(46,v=t))),a(t,et,(t=>n(52,o=t))),a(t,nt,(t=>n(54,s=t)));let ot,rt=1,lt=!1;return H((()=>{l(u)&&u({event:se(T),timeText:M,el:_,view:Jt(c)})})),t.$$set=t=>{"chunk"in t&&n(33,U=t.chunk),"longChunks"in t&&n(34,B=t.longChunks),"inPopup"in t&&n(35,N=t.inPopup)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&n(0,T=U.event),19&t.$$.dirty[0]|520644&t.$$.dirty[1]){n(6,ot=T.display);let t=T.backgroundColor||b(T)||w||y,e=T.textColor||v(T)||m;n(4,E=`width:calc(${100*U.days}% + ${7*(U.days-1)}px);margin-top:${rt}px;`),t&&n(4,E+=`background-color:${t};`),e&&n(4,E+=`color:${e};`),lt&&n(4,E+="visibility:hidden;"),n(3,D=[f.event,...$([],T),...le(g,T,c)].join(" "))}2&t.$$.dirty[0]|3844&t.$$.dirty[1]&&n(5,[M,S]=re(U,p,h,f,d,c),S)},[T,f,_,D,E,S,ot,i,k,x,C,L,P,R,F,I,j,O,A,W,Y,q,X,V,J,K,Q,Z,tt,et,nt,function(t,e){return!ue(e)&&l(t)?e=>t({event:se(T),el:_,jsEvent:e,view:Jt(c)}):void 0},function(t,e){return t.action?t=>i.action.drag(T,t,e,N?s:void 0):void 0},U,B,N,function(){!_||fe(ot)||N||(n(37,rt=oe(U,B,At(_))),!0===r?function(){let t=Ot(_,2),e=At(t)-At(t.firstElementChild)-function(t){let e=0;for(let n=0;n<U.days&&(e=It(e,At(t.lastElementChild)),t=t.nextElementSibling);++n);return e}(t);n(38,lt=U.bottom>e);let r=!1;for(let t of U.dates){let e=o[t.getTime()];if(e){let t=e.size;lt?e.add(U.event):e.delete(U.event),t!==e.size&&(r=!0)}}r&&et.set(o)}():n(38,lt=!1))},rt,lt,c,d,h,p,g,$,m,v,y,w,b,function(t){G[t?"unshift":"push"]((()=>{_=t,n(2,_)}))}]}let dn=class extends ft{constructor(t){super(),dt(this,t,un,an,s,{chunk:33,longChunks:34,inPopup:35,reposition:36},null,[-1,-1])}get reposition(){return this.$$.ctx[36]}};function fn(t,e,n){const o=t.slice();return o[20]=e[n],o}function hn(t,e){let n,o,r;return o=new dn({props:{chunk:e[20],inPopup:!0}}),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){e=t;const r={};1&n&&(r.chunk=e[20]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(o,t)}}}function pn(t){let e,n,o,s,i,c,a,u,d,f,h,p,g,m,b,_,S=[],M=new Map,U=lt(t[0]);const B=t=>t[20].event;for(let e=0;e<U.length;e+=1){let n=fn(t,U,e),o=B(n);M.set(o,S[e]=hn(o,n))}return{c(){e=k("div"),n=k("div"),o=k("span"),i=C(),c=k("a"),a=x("×"),f=C(),h=k("div");for(let t=0;t<S.length;t+=1)S[t].c();E(c,"role","button"),E(c,"tabindex","0"),E(c,"aria-label",u=t[6].close),E(n,"class",d=t[4].dayHead),E(h,"class",p=t[4].events),E(e,"class",g=t[4].popup),E(e,"style",t[2])},m(r,l){y(r,e,l),v(e,n),v(n,o),v(n,i),v(n,c),v(c,a),v(e,f),v(e,h);for(let t=0;t<S.length;t+=1)S[t]&&S[t].m(h,null);t[16](e),m=!0,b||(_=[$(s=vt.call(null,o,t[5].format(t[3]))),T(c,"click",D(t[13])),T(c,"keydown",mt(t[13])),$(yt.call(null,e,"pointerdown")),T(e,"pointerdown",D(t[15])),T(e,"pointerdownoutside",t[14])],b=!0)},p(t,o){let[r]=o;s&&l(s.update)&&40&r&&s.update.call(null,t[5].format(t[3])),(!m||64&r&&u!==(u=t[6].close))&&E(c,"aria-label",u),(!m||16&r&&d!==(d=t[4].dayHead))&&E(n,"class",d),1&r&&(U=lt(t[0]),et(),S=it(S,r,B,1,t,U,M,h,st,hn,null,fn),nt()),(!m||16&r&&p!==(p=t[4].events))&&E(h,"class",p),(!m||16&r&&g!==(g=t[4].popup))&&E(e,"class",g),(!m||4&r)&&E(e,"style",t[2])},i(t){if(!m){for(let t=0;t<U.length;t+=1)ot(S[t]);m=!0}},o(t){for(let t=0;t<S.length;t+=1)rt(S[t]);m=!1},d(n){n&&w(e);for(let t=0;t<S.length;t+=1)S[t].d();t[16](null),b=!1,r(_)}}}function gn(t,e,n){let o,r,l,s,i,c,u,{buttonText:d,theme:f,_interaction:h,_intlDayPopover:p,_popupDate:$,_popupChunks:m}=z("state");a(t,d,(t=>n(6,c=t))),a(t,f,(t=>n(4,s=t))),a(t,h,(t=>n(17,o=t))),a(t,p,(t=>n(5,i=t))),a(t,$,(t=>n(3,r=t))),a(t,m,(t=>n(0,l=t)));let v="";function y(){u&&(n(2,v=""),q().then((()=>{l.length?function(){let t,e=Ot(u,1),o=Ot(e,3),r=jt(u),l=jt(e),s=jt(o);if(e.previousElementSibling)if(e.nextElementSibling){let t=(e.offsetWidth-r.width)/2;n(2,v=`left:${t}px;`)}else n(2,v="right:0;");else n(2,v="left:0;");if(r.height>=s.height){t=s.top-l.top;let e=l.bottom-s.bottom;n(2,v+=`bottom:${e}px;`)}else t=(l.height-r.height)/2,l.top+t<s.top?t=s.top-l.top:l.top+t+r.height>s.bottom&&(t=s.bottom-l.top-r.height);n(2,v+=`top:${t}px;`)}():w()})))}function w(t){g($,r=null,r)}return t.$$.update=()=>{1&t.$$.dirty&&l&&y()},[l,u,v,r,s,i,c,d,f,h,p,$,m,w,function(t){w(),o.action?.noClick()},function(e){F.call(this,t,e)},function(t){G[t?"unshift":"push"]((()=>{u=t,n(1,u)}))}]}class $n extends ft{constructor(t){super(),dt(this,t,gn,pn,s,{})}}function mn(t,e,n){const o=t.slice();return o[43]=e[n],o[44]=e,o[45]=n,o}function vn(t){let e,n,o,r;return n=new dn({props:{chunk:t[2][1]}}),{c(){e=k("div"),ct(n.$$.fragment),E(e,"class",o=t[12].events)},m(t,o){y(t,e,o),at(n,e,null),r=!0},p(t,l){const s={};4&l[0]&&(s.chunk=t[2][1]),n.$set(s),(!r||4096&l[0]&&o!==(o=t[12].events))&&E(e,"class",o)},i(t){r||(ot(n.$$.fragment,t),r=!0)},o(t){rt(n.$$.fragment,t),r=!1},d(t){t&&w(e),ut(n)}}}function yn(t){let e,n,o,r;return n=new dn({props:{chunk:t[2][0]}}),{c(){e=k("div"),ct(n.$$.fragment),E(e,"class",o=t[12].events+" "+t[12].preview)},m(t,o){y(t,e,o),at(n,e,null),r=!0},p(t,l){const s={};4&l[0]&&(s.chunk=t[2][0]),n.$set(s),(!r||4096&l[0]&&o!==(o=t[12].events+" "+t[12].preview))&&E(e,"class",o)},i(t){r||(ot(n.$$.fragment,t),r=!0)},o(t){rt(n.$$.fragment,t),r=!1},d(t){t&&w(e),ut(n)}}}function wn(t,e){let n,o,r,l=e[45];const s=()=>e[36](o,l),i=()=>e[36](null,l);let c={chunk:e[43],longChunks:e[1]};return o=new dn({props:c}),s(),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){l!==(e=t)[45]&&(i(),l=e[45],s());const r={};16&n[0]&&(r.chunk=e[43]),2&n[0]&&(r.longChunks=e[1]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),i(),ut(o,t)}}}function bn(t){let e,n;return e=new $n({}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function kn(t){let e,n,o,s;return{c(){e=k("a"),E(e,"role","button"),E(e,"tabindex","0"),E(e,"aria-haspopup","true")},m(r,l){y(r,e,l),o||(s=[T(e,"click",D(t[26])),T(e,"keydown",mt(t[26])),T(e,"pointerdown",D(t[35])),$(n=vt.call(null,e,t[6]))],o=!0)},p(t,e){n&&l(n.update)&&64&e[0]&&n.update.call(null,t[6])},d(t){t&&w(e),o=!1,r(s)}}}function xn(t){let e,n,o,s,i,c,a,u,d,f,h,p,g,m,b,x,_,D=t[2][1]&&Ut(t[2][1].date,t[0]),S=t[2][0]&&Ut(t[2][0].date,t[0]),M=[],U=new Map,B=D&&vn(t),N=S&&yn(t),L=lt(t[4]);const H=t=>t[43].event;for(let e=0;e<L.length;e+=1){let n=mn(t,L,e),o=H(n);U.set(o,M[e]=wn(o,n))}let P=t[7]&&bn(),R=t[5].size&&kn(t);return{c(){e=k("div"),n=k("div"),i=C(),B&&B.c(),c=C(),N&&N.c(),a=C(),u=k("div");for(let t=0;t<M.length;t+=1)M[t].c();f=C(),P&&P.c(),h=C(),p=k("div"),R&&R.c(),E(n,"class",o=t[12].dayHead),E(u,"class",d=t[12].events),E(p,"class",g=t[12].dayFoot),E(e,"class",m=t[12].day+" "+t[12].weekdays?.[t[0].getUTCDay()]+(t[8]?" "+t[12].today:"")+(t[9]?" "+t[12].otherMonth:"")+(t[10]?" "+t[12].highlight:""))},m(o,r){y(o,e,r),v(e,n),v(e,i),B&&B.m(e,null),v(e,c),N&&N.m(e,null),v(e,a),v(e,u);for(let t=0;t<M.length;t+=1)M[t]&&M[t].m(u,null);v(e,f),P&&P.m(e,null),v(e,h),v(e,p),R&&R.m(p,null),t[37](e),b=!0,x||(_=[T(window,"resize",t[27]),$(s=vt.call(null,n,t[14].format(t[0]))),T(e,"pointerenter",(function(){l(t[25](t[13]))&&t[25](t[13]).apply(this,arguments)})),T(e,"pointerleave",(function(){l(t[13].pointer?.leave)&&t[13].pointer?.leave.apply(this,arguments)})),T(e,"pointerdown",(function(){l(t[13].action?.select)&&t[13].action?.select.apply(this,arguments)}))],x=!0)},p(r,i){t=r,(!b||4096&i[0]&&o!==(o=t[12].dayHead))&&E(n,"class",o),s&&l(s.update)&&16385&i[0]&&s.update.call(null,t[14].format(t[0])),5&i[0]&&(D=t[2][1]&&Ut(t[2][1].date,t[0])),D?B?(B.p(t,i),5&i[0]&&ot(B,1)):(B=vn(t),B.c(),ot(B,1),B.m(e,c)):B&&(et(),rt(B,1,1,(()=>{B=null})),nt()),5&i[0]&&(S=t[2][0]&&Ut(t[2][0].date,t[0])),S?N?(N.p(t,i),5&i[0]&&ot(N,1)):(N=yn(t),N.c(),ot(N,1),N.m(e,a)):N&&(et(),rt(N,1,1,(()=>{N=null})),nt()),2066&i[0]&&(L=lt(t[4]),et(),M=it(M,i,H,1,t,L,U,u,st,wn,null,mn),nt()),(!b||4096&i[0]&&d!==(d=t[12].events))&&E(u,"class",d),t[7]?P?128&i[0]&&ot(P,1):(P=bn(),P.c(),ot(P,1),P.m(e,h)):P&&(et(),rt(P,1,1,(()=>{P=null})),nt()),t[5].size?R?R.p(t,i):(R=kn(t),R.c(),R.m(p,null)):R&&(R.d(1),R=null),(!b||4096&i[0]&&g!==(g=t[12].dayFoot))&&E(p,"class",g),(!b||5889&i[0]&&m!==(m=t[12].day+" "+t[12].weekdays?.[t[0].getUTCDay()]+(t[8]?" "+t[12].today:"")+(t[9]?" "+t[12].otherMonth:"")+(t[10]?" "+t[12].highlight:"")))&&E(e,"class",m)},i(t){if(!b){ot(B),ot(N);for(let t=0;t<L.length;t+=1)ot(M[t]);ot(P),b=!0}},o(t){rt(B),rt(N);for(let t=0;t<M.length;t+=1)rt(M[t]);rt(P),b=!1},d(n){n&&w(e),B&&B.d(),N&&N.d();for(let t=0;t<M.length;t+=1)M[t].d();P&&P.d(),R&&R.d(),t[37](null),x=!1,r(_)}}}function Cn(t,e,n){let o,r,s,i,c,u,d,f,h,p,$,m,v,y,w,{date:b}=e,{chunks:k}=e,{longChunks:x}=e,{iChunks:C=[]}=e,{date:_,dayMaxEvents:T,highlightedDates:D,moreLinkContent:E,theme:S,_hiddenEvents:M,_intlDayCell:U,_popupDate:B,_popupChunks:N,_today:L,_interaction:H,_queue:R}=z("state");a(t,_,(t=>n(33,u=t))),a(t,D,(t=>n(32,c=t))),a(t,E,(t=>n(31,i=t))),a(t,S,(t=>n(12,f=t))),a(t,M,(t=>n(29,o=t))),a(t,U,(t=>n(14,p=t))),a(t,B,(t=>n(30,s=t))),a(t,N,(t=>n(38,r=t))),a(t,L,(t=>n(34,d=t))),a(t,H,(t=>n(13,h=t)));let I,j=new Set,O="",A=[];function W(){let t=Tt(xt(b)),e=m.concat(x[b.getTime()]?.chunks||[]);g(N,r=e.map((e=>Pt({},e,te(e.event,b,t),{days:1,dates:[b]}))).sort(((t,e)=>t.top-e.top)),r)}function Y(){n(11,A.length=m.length,A);for(let t of A)t?.reposition?.()}P(Y);let X={};return t.$$set=t=>{"date"in t&&n(0,b=t.date),"chunks"in t&&n(28,k=t.chunks),"longChunks"in t&&n(1,x=t.longChunks),"iChunks"in t&&n(2,C=t.iChunks)},t.$$.update=()=>{if(268435505&t.$$.dirty[0]){n(4,m=[]),j.clear(),n(5,j),n(28,k),n(0,b),n(4,m);for(let t of k)Ut(t.date,b)&&m.push(t)}if(33&t.$$.dirty[0]&&g(M,o[b.getTime()]=j,o),1&t.$$.dirty[0]|8&t.$$.dirty[1]&&n(8,v=Ut(b,d)),1&t.$$.dirty[0]|6&t.$$.dirty[1]&&(n(9,y=b.getUTCMonth()!==u.getUTCMonth()),n(10,w=c.some((t=>Ut(t,b))))),536871008&t.$$.dirty[0]|1&t.$$.dirty[1]&&o&&j.size){let t="+"+j.size+" more";i?(n(6,O=l(i)?i({num:j.size,text:t}):i),"string"==typeof O&&n(6,O={html:O})):n(6,O={html:t})}1073741825&t.$$.dirty[0]&&n(7,I=s&&Ut(b,s)),146&t.$$.dirty[0]&&I&&x&&m&&q().then(W),9&t.$$.dirty[0]&&$&&Yt($,(()=>({allDay:!0,date:b,resource:void 0,dayEl:$}))),536870912&t.$$.dirty[0]&&o&&Ht(Y,X,R)},[b,x,C,$,m,j,O,I,v,y,w,A,f,h,p,_,D,E,S,M,U,B,N,L,H,function(t){return t.pointer?e=>t.pointer.enterDayGrid(b,e):void 0},function(){g(B,s=b,s)},Y,k,o,s,i,c,u,d,function(e){F.call(this,t,e)},function(t,e){G[t?"unshift":"push"]((()=>{A[e]=t,n(11,A)}))},function(t){G[t?"unshift":"push"]((()=>{$=t,n(3,$)}))}]}let _n=class extends ft{constructor(t){super(),dt(this,t,Cn,xn,s,{date:0,chunks:28,longChunks:1,iChunks:2},null,[-1,-1])}};function Tn(t,e,n){const o=t.slice();return o[14]=e[n],o}function Dn(t){let e,n;return e=new _n({props:{date:t[14],chunks:t[1],longChunks:t[2],iChunks:t[3]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.date=t[14]),2&n&&(o.chunks=t[1]),4&n&&(o.longChunks=t[2]),8&n&&(o.iChunks=t[3]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function En(t){let e,n,o,r=lt(t[0]),l=[];for(let e=0;e<r.length;e+=1)l[e]=Dn(Tn(t,r,e));const s=t=>rt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=k("div");for(let t=0;t<l.length;t+=1)l[t].c();E(e,"class",n=t[4].days)},m(t,n){y(t,e,n);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);o=!0},p(t,i){let[c]=i;if(15&c){let n;for(r=lt(t[0]),n=0;n<r.length;n+=1){const o=Tn(t,r,n);l[n]?(l[n].p(o,c),ot(l[n],1)):(l[n]=Dn(o),l[n].c(),ot(l[n],1),l[n].m(e,null))}for(et(),n=r.length;n<l.length;n+=1)s(n);nt()}(!o||16&c&&n!==(n=t[4].days))&&E(e,"class",n)},i(t){if(!o){for(let t=0;t<r.length;t+=1)ot(l[t]);o=!0}},o(t){l=l.filter(Boolean);for(let t=0;t<l.length;t+=1)rt(l[t]);o=!1},d(t){t&&w(e),b(l,t)}}}function Sn(t,e,n){let o,r,l,s,{dates:i}=e,{_events:c,_iEvents:u,hiddenDays:d,theme:f}=z("state");a(t,c,(t=>n(13,l=t))),a(t,u,(t=>n(12,r=t))),a(t,d,(t=>n(11,o=t))),a(t,f,(t=>n(4,s=t)));let h,p,g,$,m=[];return t.$$set=t=>{"dates"in t&&n(0,i=t.dates)},t.$$.update=()=>{if(1&t.$$.dirty&&(n(9,g=i[0]),n(10,$=Tt(xt(i[i.length-1])))),11778&t.$$.dirty){n(1,h=[]);for(let t of l)if(!de(t.display)&&ae(t,g,$)){let e=te(t,g,$);h.push(e)}n(2,p=ne(h,o))}7680&t.$$.dirty&&n(3,m=r.map((t=>{let e;return t&&ae(t,g,$)?(e=te(t,g,$),ne([e],o)):e=null,e})))},[i,h,p,m,s,c,u,d,f,g,$,o,r,l]}let Mn=class extends ft{constructor(t){super(),dt(this,t,Sn,En,s,{dates:0})}};function Un(t,e,n){const o=t.slice();return o[10]=e[n],o}function Bn(t){let e,n;return e=new Mn({props:{dates:t[10]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.dates=t[10]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Nn(t){let e,n,o=lt(t[0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Bn(Un(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(1&n){let s;for(o=lt(t[0]),s=0;s<o.length;s+=1){const l=Un(t,o,s);r[s]?(r[s].p(l,n),ot(r[s],1)):(r[s]=Bn(l),r[s].c(),ot(r[s],1),r[s].m(e.parentNode,e))}for(et(),s=o.length;s<r.length;s+=1)l(s);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Ln(t){let e,n,o,r;return e=new rn({}),o=new cn({props:{$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){ct(e.$$.fragment),n=C(),ct(o.$$.fragment)},m(t,l){at(e,t,l),y(t,n,l),at(o,t,l),r=!0},p(t,e){let[n]=e;const r={};8193&n&&(r.$$scope={dirty:n,ctx:t}),o.$set(r)},i(t){r||(ot(e.$$.fragment,t),ot(o.$$.fragment,t),r=!0)},o(t){rt(e.$$.fragment,t),rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(e,t),ut(o,t)}}}function Hn(t,e,n){let o,r,l,s,i,c,{_viewDates:u,_hiddenEvents:d,dayMaxEvents:f,hiddenDays:h}=z("state");return a(t,u,(t=>n(6,o=t))),a(t,d,(t=>n(9,l=t))),a(t,f,(t=>n(7,r=t))),a(t,h,(t=>n(8,s=t))),t.$$.update=()=>{if(481&t.$$.dirty){n(0,i=[]),n(5,c=7-s.length),g(d,l={},l);for(let t=0;t<o.length/c;++t){let e=[];for(let n=0;n<c;++n)e.push(o[t*c+n]);i.push(e)}}},[i,u,d,f,h,c,o,r,s]}let Pn=class extends ft{constructor(t){super(),dt(this,t,Hn,Ln,s,{})}};var Rn={createOptions(t){t.dayMaxEvents=!1,t.dayCellFormat={day:"numeric"},t.dayPopoverFormat={month:"long",day:"numeric",year:"numeric"},t.moreLinkContent=void 0,t.buttonText.dayGridMonth="month",t.buttonText.close="Close",t.theme.uniform="ec-uniform",t.theme.dayFoot="ec-day-foot",t.theme.popup="ec-popup",t.view="dayGridMonth",t.views.dayGridMonth={buttonText:$e,component:Pn,dayHeaderFormat:{weekday:"short"},displayEventEnd:!1,duration:{months:1},theme:ye("ec-day-grid ec-month-view"),titleFormat:{year:"numeric",month:"long"}}},createStores(t){t._days=function(t){return $t([t.date,t.firstDay,t.hiddenDays],(t=>{let[e,n,o]=t,r=[],l=xt(e),s=7;for(;l.getUTCDay()!==n&&s;)Dt(l),--s;for(let t=0;t<7;++t)o.includes(l.getUTCDay())||r.push(xt(l)),Tt(l);return r}))}(t),t._intlDayCell=we(t.locale,t.dayCellFormat),t._intlDayPopover=we(t.locale,t.dayPopoverFormat),t._hiddenEvents=gt({}),t._popupDate=gt(null),t._popupChunks=gt([])}};function zn(t){let e,n,o,r,l;const s=t[5].default,i=u(s,t,t[4],null);return{c(){e=k("div"),n=k("div"),i&&i.c(),E(n,"class",o=t[0].content),E(e,"class",r=t[0].body)},m(o,r){y(o,e,r),v(e,n),i&&i.m(n,null),t[6](e),l=!0},p(t,c){let[a]=c;i&&i.p&&(!l||16&a)&&h(i,s,t,t[4],l?f(s,t[4],a,null):p(t[4]),null),(!l||1&a&&o!==(o=t[0].content))&&E(n,"class",o),(!l||1&a&&r!==(r=t[0].body))&&E(e,"class",r)},i(t){l||(ot(i,t),l=!0)},o(t){rt(i,t),l=!1},d(n){n&&w(e),i&&i.d(n),t[6](null)}}}function Fn(t,e,n){let o,r,{$$slots:l={},$$scope:s}=e,{_bodyEl:i,theme:c}=z("state");return a(t,i,(t=>n(1,r=t))),a(t,c,(t=>n(0,o=t))),t.$$set=t=>{"$$scope"in t&&n(4,s=t.$$scope)},[o,r,i,c,s,l,function(t){G[t?"unshift":"push"]((()=>{r=t,i.set(r)}))}]}let In=class extends ft{constructor(t){super(),dt(this,t,Fn,zn,s,{})}};function Gn(e){let n,o,s,i,c,a,u,d,f;return{c(){n=k("div"),o=k("div"),i=C(),c=k("div"),E(o,"class",s=e[0].eventTag),E(o,"style",e[3]),E(c,"class",a=e[0].eventBody),E(n,"class",e[2])},m(t,r){y(t,n,r),v(n,o),v(n,i),v(n,c),e[36](n),d||(f=[$(u=vt.call(null,c,e[4])),T(n,"click",(function(){l(e[23](e[5]))&&e[23](e[5]).apply(this,arguments)})),T(n,"mouseenter",(function(){l(e[23](e[6]))&&e[23](e[6]).apply(this,arguments)})),T(n,"mouseleave",(function(){l(e[23](e[7]))&&e[23](e[7]).apply(this,arguments)}))],d=!0)},p(t,r){e=t,1&r[0]&&s!==(s=e[0].eventTag)&&E(o,"class",s),8&r[0]&&E(o,"style",e[3]),1&r[0]&&a!==(a=e[0].eventBody)&&E(c,"class",a),u&&l(u.update)&&16&r[0]&&u.update.call(null,e[4]),4&r[0]&&E(n,"class",e[2])},i:t,o:t,d(t){t&&w(n),e[36](null),d=!1,r(f)}}}function jn(t,e,n){let o,r,s,i,c,u,d,f,h,p,g,$,m,v,y,w,b,k,x,C,_,{chunk:T}=e,{displayEventEnd:D,eventBackgroundColor:E,eventTextColor:S,eventColor:M,eventContent:U,eventClassNames:B,eventClick:N,eventDidMount:L,eventMouseEnter:P,eventMouseLeave:R,theme:F,_view:I,_intlEventTime:j,_resBgColor:O,_resTxtColor:A}=z("state");return a(t,D,(t=>n(29,u=t))),a(t,E,(t=>n(34,g=t))),a(t,S,(t=>n(31,f=t))),a(t,M,(t=>n(33,p=t))),a(t,U,(t=>n(28,c=t))),a(t,B,(t=>n(30,d=t))),a(t,N,(t=>n(5,m=t))),a(t,L,(t=>n(38,r=t))),a(t,P,(t=>n(6,v=t))),a(t,R,(t=>n(7,y=t))),a(t,F,(t=>n(0,i=t))),a(t,I,(t=>n(26,o=t))),a(t,j,(t=>n(27,s=t))),a(t,O,(t=>n(35,$=t))),a(t,A,(t=>n(32,h=t))),H((()=>{l(r)&&r({event:se(b),timeText:_,el:w,view:Jt(o)})})),t.$$set=t=>{"chunk"in t&&n(24,T=t.chunk)},t.$$.update=()=>{if(16777216&t.$$.dirty[0]&&n(25,b=T.event),1174405129&t.$$.dirty[0]|31&t.$$.dirty[1]){n(3,x="");let t=b.backgroundColor||$(b)||g||p;t&&n(3,x=`background-color:${t};`);let e=b.textColor||h(b)||f;e&&n(3,x+=`color:${e};`),n(2,k=[i.event,...le(d,b,o)].join(" "))}1023410177&t.$$.dirty[0]&&n(4,[_,C]=re(T,u,c,i,s,o),C)},[i,w,k,x,C,m,v,y,D,E,S,M,U,B,N,L,P,R,F,I,j,O,A,function(t){return e=>{l(t)&&t({event:se(b),el:w,jsEvent:e,view:Jt(o)})}},T,b,o,s,c,u,d,f,h,p,g,$,function(t){G[t?"unshift":"push"]((()=>{w=t,n(1,w)}))}]}let On=class extends ft{constructor(t){super(),dt(this,t,jn,Gn,s,{chunk:24},null,[-1,-1])}};function An(t,e,n){const o=t.slice();return o[20]=e[n],o}function Wn(t){let e,n,o,s,i,c,a,u,d,f,h,p,g,m=[],b=new Map,x=lt(t[2]);const D=t=>t[20].event;for(let e=0;e<x.length;e+=1){let n=An(t,x,e),o=D(n);b.set(o,m[e]=Yn(o,n))}return{c(){e=k("div"),n=k("span"),s=C(),i=k("span"),d=C();for(let t=0;t<m.length;t+=1)m[t].c();f=_(),E(i,"class",c=t[5].daySide),E(e,"class",u=t[5].day+" "+t[5].weekdays?.[t[0].getUTCDay()]+(t[3]?" "+t[5].today:"")+(t[4]?" "+t[5].highlight:""))},m(r,c){y(r,e,c),v(e,n),v(e,s),v(e,i),t[19](e),y(r,d,c);for(let t=0;t<m.length;t+=1)m[t]&&m[t].m(r,c);y(r,f,c),h=!0,p||(g=[$(o=vt.call(null,n,t[7].format(t[0]))),$(a=vt.call(null,i,t[8].format(t[0]))),T(e,"pointerdown",(function(){l(t[6].action?.select)&&t[6].action?.select.apply(this,arguments)}))],p=!0)},p(n,r){t=n,o&&l(o.update)&&129&r&&o.update.call(null,t[7].format(t[0])),(!h||32&r&&c!==(c=t[5].daySide))&&E(i,"class",c),a&&l(a.update)&&257&r&&a.update.call(null,t[8].format(t[0])),(!h||57&r&&u!==(u=t[5].day+" "+t[5].weekdays?.[t[0].getUTCDay()]+(t[3]?" "+t[5].today:"")+(t[4]?" "+t[5].highlight:"")))&&E(e,"class",u),4&r&&(x=lt(t[2]),et(),m=it(m,r,D,1,t,x,b,f.parentNode,st,Yn,f,An),nt())},i(t){if(!h){for(let t=0;t<x.length;t+=1)ot(m[t]);h=!0}},o(t){for(let t=0;t<m.length;t+=1)rt(m[t]);h=!1},d(n){n&&(w(e),w(d),w(f)),t[19](null);for(let t=0;t<m.length;t+=1)m[t].d(n);p=!1,r(g)}}}function Yn(t,e){let n,o,r;return o=new On({props:{chunk:e[20]}}),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){e=t;const r={};4&n&&(r.chunk=e[20]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(o,t)}}}function qn(t){let e,n,o=t[2].length&&Wn(t);return{c(){o&&o.c(),e=_()},m(t,r){o&&o.m(t,r),y(t,e,r),n=!0},p(t,n){let[r]=n;t[2].length?o?(o.p(t,r),4&r&&ot(o,1)):(o=Wn(t),o.c(),ot(o,1),o.m(e.parentNode,e)):o&&(et(),rt(o,1,1,(()=>{o=null})),nt())},i(t){n||(ot(o),n=!0)},o(t){rt(o),n=!1},d(t){t&&w(e),o&&o.d(t)}}}function Xn(t,e,n){let o,r,l,s,i,c,u,d,f,h,p,{date:g}=e,{_events:$,_interaction:m,_intlListDay:v,_intlListDaySide:y,_today:w,highlightedDates:b,theme:k}=z("state");return a(t,$,(t=>n(18,l=t))),a(t,m,(t=>n(6,i=t))),a(t,v,(t=>n(7,c=t))),a(t,y,(t=>n(8,u=t))),a(t,w,(t=>n(17,r=t))),a(t,b,(t=>n(16,o=t))),a(t,k,(t=>n(5,s=t))),t.$$set=t=>{"date"in t&&n(0,g=t.date)},t.$$.update=()=>{if(262149&t.$$.dirty){n(2,f=[]);let t=g,e=Tt(xt(g));for(let n of l)if(!de(n.display)&&ae(n,t,e)){let o=te(n,t,e);f.push(o)}ee(f)}131073&t.$$.dirty&&n(3,h=Ut(g,r)),65537&t.$$.dirty&&n(4,p=o.some((t=>Ut(t,g)))),3&t.$$.dirty&&d&&Yt(d,(()=>({allDay:!0,date:g,resource:void 0,dayEl:d})))},[g,d,f,h,p,s,i,c,u,$,m,v,y,w,b,k,o,r,l,function(t){G[t?"unshift":"push"]((()=>{d=t,n(1,d)}))}]}let Vn=class extends ft{constructor(t){super(),dt(this,t,Xn,qn,s,{date:0})}};function Jn(t,e,n){const o=t.slice();return o[15]=e[n],o}function Kn(t){let e,n,o=lt(t[1]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Zn(Jn(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(2&n){let s;for(o=lt(t[1]),s=0;s<o.length;s+=1){const l=Jn(t,o,s);r[s]?(r[s].p(l,n),ot(r[s],1)):(r[s]=Zn(l),r[s].c(),ot(r[s],1),r[s].m(e.parentNode,e))}for(et(),s=o.length;s<r.length;s+=1)l(s);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Qn(e){let n,o,s,i,c;return{c(){n=k("div"),E(n,"class",o=e[3].noEvents)},m(t,o){y(t,n,o),i||(c=[$(s=vt.call(null,n,e[0])),T(n,"click",e[10])],i=!0)},p(t,e){8&e&&o!==(o=t[3].noEvents)&&E(n,"class",o),s&&l(s.update)&&1&e&&s.update.call(null,t[0])},i:t,o:t,d(t){t&&w(n),i=!1,r(c)}}}function Zn(t){let e,n;return e=new Vn({props:{date:t[15]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.date=t[15]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function to(t){let e,n,o,r;const l=[Qn,Kn],s=[];function i(t,e){return t[2]?0:1}return e=i(t),n=s[e]=l[e](t),{c(){n.c(),o=_()},m(t,n){s[e].m(t,n),y(t,o,n),r=!0},p(t,r){let c=e;e=i(t),e===c?s[e].p(t,r):(et(),rt(s[c],1,1,(()=>{s[c]=null})),nt(),n=s[e],n?n.p(t,r):(n=s[e]=l[e](t),n.c()),ot(n,1),n.m(o.parentNode,o))},i(t){r||(ot(n),r=!0)},o(t){rt(n),r=!1},d(t){t&&w(o),s[e].d(t)}}}function eo(t){let e,n;return e=new In({props:{$$slots:{default:[to]},$$scope:{ctx:t}}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){let[o]=n;const r={};262159&o&&(r.$$scope={dirty:o,ctx:t}),e.$set(r)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function no(t,e,n){let o,r,s,i,c,u,d,f,{_events:h,_view:p,_viewDates:g,noEventsClick:$,noEventsContent:m,theme:v}=z("state");return a(t,h,(t=>n(12,i=t))),a(t,p,(t=>n(13,o=t))),a(t,g,(t=>n(1,c=t))),a(t,$,(t=>n(14,r=t))),a(t,m,(t=>n(11,s=t))),a(t,v,(t=>n(3,u=t))),t.$$.update=()=>{if(4098&t.$$.dirty&&(n(2,d=!0),c.length)){let t=c[0],e=Tt(xt(c[c.length-1]));for(let o of i)if(!de(o.display)&&o.start<e&&o.end>t){n(2,d=!1);break}}2049&t.$$.dirty&&(n(0,f=l(s)?s():s),"string"==typeof f&&n(0,f={html:f}))},[f,c,d,u,h,p,g,$,m,v,function(t){l(r)&&r({jsEvent:t,view:Jt(o)})},s,i]}let oo=class extends ft{constructor(t){super(),dt(this,t,no,eo,s,{})}};var ro={createOptions(t){t.buttonText.listDay="list",t.buttonText.listWeek="list",t.buttonText.listMonth="list",t.buttonText.listYear="list",t.listDayFormat={weekday:"long"},t.listDaySideFormat={year:"numeric",month:"long",day:"numeric"},t.noEventsClick=void 0,t.noEventsContent="No events",t.theme.daySide="ec-day-side",t.theme.eventTag="ec-event-tag",t.theme.noEvents="ec-no-events",t.view="listWeek",t.views.listDay={buttonText:pe,component:oo,duration:{days:1},theme:ye("ec-list ec-day-view")},t.views.listWeek={buttonText:ge,component:oo,duration:{weeks:1},theme:ye("ec-list ec-week-view")},t.views.listMonth={buttonText:$e,component:oo,duration:{months:1},theme:ye("ec-list ec-month-view")},t.views.listYear={buttonText:me,component:oo,duration:{years:1},theme:ye("ec-list ec-year-view")}},createStores(t){t._intlListDay=we(t.locale,t.listDayFormat),t._intlListDaySide=we(t.locale,t.listDaySideFormat)}};const lo=t=>({}),so=t=>({});function io(t,e,n){const o=t.slice();return o[9]=e[n],o}function co(t){let e,n,o,r,s;return{c(){e=k("div"),E(e,"class",n=t[1].time)},m(n,l){y(n,e,l),r||(s=$(o=vt.call(null,e,t[9])),r=!0)},p(r,s){t=r,2&s&&n!==(n=t[1].time)&&E(e,"class",n),o&&l(o.update)&&4&s&&o.update.call(null,t[9])},d(t){t&&w(e),r=!1,s()}}}function ao(t){let e,n,o,r,s,i,c,a,d,g,m,x,_,T,D,S=lt(t[2]),M=[];for(let e=0;e<S.length;e+=1)M[e]=co(io(t,S,e));const U=t[8].lines,B=u(U,t,t[7],so),N=t[8].default,L=u(N,t,t[7],null);return{c(){e=k("div"),n=k("div"),s=C();for(let t=0;t<M.length;t+=1)M[t].c();c=C(),a=k("div"),d=k("div"),B&&B.c(),m=C(),L&&L.c(),E(n,"class",o=t[1].sidebarTitle),E(e,"class",i=t[1].sidebar),E(d,"class",g=t[1].lines),E(a,"class",x=t[1].days)},m(o,l){y(o,e,l),v(e,n),v(e,s);for(let t=0;t<M.length;t+=1)M[t]&&M[t].m(e,null);y(o,c,l),y(o,a,l),v(a,d),B&&B.m(d,null),v(a,m),L&&L.m(a,null),_=!0,T||(D=$(r=vt.call(null,n,t[0])),T=!0)},p(t,s){let[c]=s;if((!_||2&c&&o!==(o=t[1].sidebarTitle))&&E(n,"class",o),r&&l(r.update)&&1&c&&r.update.call(null,t[0]),6&c){let n;for(S=lt(t[2]),n=0;n<S.length;n+=1){const o=io(t,S,n);M[n]?M[n].p(o,c):(M[n]=co(o),M[n].c(),M[n].m(e,null))}for(;n<M.length;n+=1)M[n].d(1);M.length=S.length}(!_||2&c&&i!==(i=t[1].sidebar))&&E(e,"class",i),B&&B.p&&(!_||128&c)&&h(B,U,t,t[7],_?f(U,t[7],c,lo):p(t[7]),so),(!_||2&c&&g!==(g=t[1].lines))&&E(d,"class",g),L&&L.p&&(!_||128&c)&&h(L,N,t,t[7],_?f(N,t[7],c,null):p(t[7]),null),(!_||2&c&&x!==(x=t[1].days))&&E(a,"class",x)},i(t){_||(ot(B,t),ot(L,t),_=!0)},o(t){rt(B,t),rt(L,t),_=!1},d(t){t&&(w(e),w(c),w(a)),b(M,t),B&&B.d(t),L&&L.d(t),T=!1,D()}}}function uo(t,e,n){let o,r,s,i,{$$slots:c={},$$scope:u}=e,{allDayContent:d,theme:f,_times:h}=z("state");return a(t,d,(t=>n(6,o=t))),a(t,f,(t=>n(1,r=t))),a(t,h,(t=>n(2,s=t))),t.$$set=t=>{"$$scope"in t&&n(7,u=t.$$scope)},t.$$.update=()=>{64&t.$$.dirty&&n(0,i=function(t){let e,n="all-day";return t?(e=l(t)?t({text:n}):t,"string"==typeof e&&(e={html:e})):e={html:n},e}(o))},[i,r,s,d,f,h,o,u,c]}class fo extends ft{constructor(t){super(),dt(this,t,uo,ao,s,{})}}function ho(t,e,n){const o=t.slice();return o[24]=e[n],o}function po(t){let e;const n=t[16].default,o=u(n,t,t[18],null);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,r){o&&o.p&&(!e||262144&r)&&h(o,n,t,t[18],e?f(n,t[18],r,null):p(t[18]),null)},i(t){e||(ot(o,t),e=!0)},o(t){rt(o,t),e=!1},d(t){o&&o.d(t)}}}function go(t){let e,n;return{c(){e=k("div"),E(e,"class",n=t[3].line)},m(t,n){y(t,e,n)},p(t,o){8&o&&n!==(n=t[3].line)&&E(e,"class",n)},d(t){t&&w(e)}}}function $o(t){let e,n=lt(t[2]),o=[];for(let e=0;e<n.length;e+=1)o[e]=go(ho(t,n,e));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=_()},m(t,n){for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,n);y(t,e,n)},p(t,r){if(12&r){let l;for(n=lt(t[2]),l=0;l<n.length;l+=1){const s=ho(t,n,l);o[l]?o[l].p(s,r):(o[l]=go(s),o[l].c(),o[l].m(e.parentNode,e))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(t){t&&w(e),b(o,t)}}}function mo(t){let e,n,o,r,l,s;return o=new fo({props:{$$slots:{lines:[$o],default:[po]},$$scope:{ctx:t}}}),{c(){e=k("div"),n=k("div"),ct(o.$$.fragment),E(n,"class",r=t[3].content),E(e,"class",l=t[3].body+(t[1]?" "+t[3].compact:""))},m(r,l){y(r,e,l),v(e,n),at(o,n,null),t[17](e),s=!0},p(t,i){let[c]=i;const a={};262156&c&&(a.$$scope={dirty:c,ctx:t}),o.$set(a),(!s||8&c&&r!==(r=t[3].content))&&E(n,"class",r),(!s||10&c&&l!==(l=t[3].body+(t[1]?" "+t[3].compact:"")))&&E(e,"class",l)},i(t){s||(ot(o.$$.fragment,t),s=!0)},o(t){rt(o.$$.fragment,t),s=!1},d(n){n&&w(e),ut(o),t[17](null)}}}function vo(t,e,n){let o,r,l,s,i,c,u,d,f,h,{$$slots:p={},$$scope:$}=e,{_bodyEl:m,_viewDates:v,_slotTimeLimits:y,_times:w,scrollTime:b,slotDuration:k,slotHeight:x,theme:C}=z("state");a(t,m,(t=>n(22,u=t))),a(t,v,(t=>n(13,s=t))),a(t,y,(t=>n(14,i=t))),a(t,w,(t=>n(15,c=t))),a(t,b,(t=>n(21,l=t))),a(t,k,(t=>n(12,r=t))),a(t,x,(t=>n(20,o=t))),a(t,C,(t=>n(3,d=t)));let _,T=[];return t.$$set=t=>{"$$scope"in t&&n(18,$=t.$$scope)},t.$$.update=()=>{1&t.$$.dirty&&g(m,u=f,u),53248&t.$$.dirty&&(n(1,h=r.seconds>=3600),n(2,T.length=c.length,T),_=i.min.seconds),8193&t.$$.dirty&&f&&s&&n(0,f.scrollTop=((l.seconds-_)/r.seconds-.5)*o,f)},[f,h,T,d,m,v,y,w,b,k,x,C,r,s,i,c,p,function(t){G[t?"unshift":"push"]((()=>{f=t,n(0,f)}))},$]}class yo extends ft{constructor(t){super(),dt(this,t,vo,mo,s,{})}}function wo(t){let e,n,o,s,i,c,a,u,d;var f=t[10].resizer;function h(t,e){return{props:{event:t[0]}}}return f&&(c=U(f,h(t)),c.$on("pointerdown",(function(){l(t[33](t[10],!0))&&t[33](t[10],!0).apply(this,arguments)}))),{c(){e=k("div"),n=k("div"),i=C(),c&&ct(c.$$.fragment),E(n,"class",o=t[2].eventBody),E(e,"class",t[4]),E(e,"style",t[5])},m(o,r){y(o,e,r),v(e,n),v(e,i),c&&at(c,e,null),t[51](e),a=!0,u||(d=[$(s=vt.call(null,n,t[6])),T(e,"click",(function(){l(!de(t[1])&&t[32](t[7],t[1]))&&(!de(t[1])&&t[32](t[7],t[1])).apply(this,arguments)})),T(e,"mouseenter",(function(){l(t[32](t[8],t[1]))&&t[32](t[8],t[1]).apply(this,arguments)})),T(e,"mouseleave",(function(){l(t[32](t[9],t[1]))&&t[32](t[9],t[1]).apply(this,arguments)})),T(e,"pointerdown",(function(){l(!de(t[1])&&!ue(t[1])&&t[33](t[10]))&&(!de(t[1])&&!ue(t[1])&&t[33](t[10])).apply(this,arguments)}))],u=!0)},p(r,i){if(t=r,(!a||4&i[0]&&o!==(o=t[2].eventBody))&&E(n,"class",o),s&&l(s.update)&&64&i[0]&&s.update.call(null,t[6]),1024&i[0]&&f!==(f=t[10].resizer)){if(c){et();const t=c;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}f?(c=U(f,h(t)),c.$on("pointerdown",(function(){l(t[33](t[10],!0))&&t[33](t[10],!0).apply(this,arguments)})),ct(c.$$.fragment),ot(c.$$.fragment,1),at(c,e,null)):c=null}else if(f){const e={};1&i[0]&&(e.event=t[0]),c.$set(e)}(!a||16&i[0])&&E(e,"class",t[4]),(!a||32&i[0])&&E(e,"style",t[5])},i(t){a||(c&&ot(c.$$.fragment,t),a=!0)},o(t){c&&rt(c.$$.fragment,t),a=!1},d(n){n&&w(e),c&&ut(c),t[51](null),u=!1,r(d)}}}function bo(t,e,n){let o,r,s,i,c,u,d,f,h,p,g,$,m,v,y,w,b,k,x,C,_,T,D,E,S,M,U,B,{date:N}=e,{chunk:L}=e,{displayEventEnd:P,eventBackgroundColor:R,eventTextColor:F,eventColor:I,eventContent:j,eventClick:O,eventDidMount:A,eventClassNames:W,eventMouseEnter:Y,eventMouseLeave:q,slotEventOverlap:X,slotDuration:V,slotHeight:J,theme:K,_view:Q,_intlEventTime:Z,_interaction:tt,_iClasses:et,_resBgColor:nt,_resTxtColor:ot,_slotTimeLimits:rt}=z("state");return a(t,P,(t=>n(39,u=t))),a(t,R,(t=>n(46,m=t))),a(t,F,(t=>n(43,p=t))),a(t,I,(t=>n(45,$=t))),a(t,j,(t=>n(38,c=t))),a(t,O,(t=>n(7,k=t))),a(t,A,(t=>n(53,r=t))),a(t,W,(t=>n(40,d=t))),a(t,Y,(t=>n(8,x=t))),a(t,q,(t=>n(9,C=t))),a(t,X,(t=>n(42,h=t))),a(t,V,(t=>n(50,b=t))),a(t,J,(t=>n(48,y=t))),a(t,K,(t=>n(2,i=t))),a(t,Q,(t=>n(36,o=t))),a(t,Z,(t=>n(37,s=t))),a(t,tt,(t=>n(10,_=t))),a(t,et,(t=>n(41,f=t))),a(t,nt,(t=>n(47,v=t))),a(t,ot,(t=>n(44,g=t))),a(t,rt,(t=>n(49,w=t))),H((()=>{l(r)&&r({event:se(D),timeText:B,el:T,view:Jt(o)})})),t.$$set=t=>{"date"in t&&n(34,N=t.date),"chunk"in t&&n(35,L=t.chunk)},t.$$.update=()=>{if(16&t.$$.dirty[1]&&n(0,D=L.event),39&t.$$.dirty[0]|1048120&t.$$.dirty[1]){n(1,E=D.display);let t=b.seconds/60,e=w.min.seconds/60,r=(L.start-N)/1e3/60,l=(L.end-N)/1e3/60,s=(r-e)/t*y,c=(l-r)/t*y,a=(w.max.seconds/60-r)/t*y,u=D.backgroundColor||v(D)||m||$,k=D.textColor||g(D)||p;n(5,M=`top:${s}px;min-height:${c}px;height:${c}px;max-height:${a}px;`),u&&n(5,M+=`background-color:${u};`),k&&n(5,M+=`color:${k};`),(!de(E)&&!ue(E)||he(E))&&n(5,M+=`z-index:${L.column+1};left:${100/L.group.columns.length*L.column}%;width:${100/L.group.columns.length*(h?.5*(1+L.group.columns.length-L.column):1)}%;`),n(4,S=[de(E)?i.bgEvent:i.event,...f([],D),...le(d,D,o)].join(" "))}4&t.$$.dirty[0]|496&t.$$.dirty[1]&&n(6,[B,U]=re(L,u,c,i,s,o),U)},[D,E,i,T,S,M,U,k,x,C,_,P,R,F,I,j,O,A,W,Y,q,X,V,J,K,Q,Z,tt,et,nt,ot,rt,function(t,e){return!ue(e)&&l(t)?e=>t({event:se(D),el:T,jsEvent:e,view:Jt(o)}):void 0},function(t,e){return t.action?n=>t.action.drag(D,n,e):void 0},N,L,o,s,c,u,d,f,h,p,g,$,m,v,y,w,b,function(t){G[t?"unshift":"push"]((()=>{T=t,n(3,T)}))}]}let ko=class extends ft{constructor(t){super(),dt(this,t,bo,wo,s,{date:34,chunk:35},null,[-1,-1])}};function xo(e){let n,o;return{c(){n=k("div"),E(n,"class",o=e[1].nowIndicator),M(n,"top",e[0]+"px")},m(t,e){y(t,n,e)},p(t,e){let[r]=e;2&r&&o!==(o=t[1].nowIndicator)&&E(n,"class",o),1&r&&M(n,"top",t[0]+"px")},i:t,o:t,d(t){t&&w(n)}}}function Co(t,e,n){let o,r,l,s,i,c,u,{slotDuration:d,slotHeight:f,theme:h,_now:p,_today:g,_slotTimeLimits:$}=z("state");a(t,d,(t=>n(11,l=t))),a(t,f,(t=>n(9,o=t))),a(t,h,(t=>n(1,c=t))),a(t,p,(t=>n(13,i=t))),a(t,g,(t=>n(12,s=t))),a(t,$,(t=>n(10,r=t)));let m=0;return t.$$.update=()=>{if(12288&t.$$.dirty&&n(8,u=(i-s)/1e3/60),3840&t.$$.dirty){let t=l.seconds/60,e=r.min.seconds/60;n(0,m=(u-e)/t*o)}},[m,c,d,f,h,p,g,$,u,o,r,l,s,i]}class _o extends ft{constructor(t){super(),dt(this,t,Co,xo,s,{})}}function To(t,e,n){const o=t.slice();return o[33]=e[n],o}function Do(t,e,n){const o=t.slice();return o[33]=e[n],o}function Eo(t,e){let n,o,r;return o=new ko({props:{date:e[0],chunk:e[33]}}),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){e=t;const r={};1&n[0]&&(r.date=e[0]),8&n[0]&&(r.chunk=e[33]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(o,t)}}}function So(t){let e,n;return e=new ko({props:{date:t[0],chunk:t[4][1]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.date=t[0]),16&n[0]&&(o.chunk=t[4][1]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Mo(t,e){let n,o,r;return o=new ko({props:{date:e[0],chunk:e[33]}}),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){e=t;const r={};1&n[0]&&(r.date=e[0]),4&n[0]&&(r.chunk=e[33]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(o,t)}}}function Uo(t){let e,n;return e=new ko({props:{date:t[0],chunk:t[4][0]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.date=t[0]),16&n[0]&&(o.chunk=t[4][0]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Bo(t){let e,n;return e=new _o({}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function No(t){let e,n,o,s,i,c,a,u,d,f,h,p,g,$,m,b=[],x=new Map,_=[],D=new Map,S=lt(t[3]);const M=t=>t[33].event;for(let e=0;e<S.length;e+=1){let n=Do(t,S,e),o=M(n);x.set(o,b[e]=Eo(o,n))}let U=t[4][1]&&So(t),B=lt(t[2]);const N=t=>t[33].event;for(let e=0;e<B.length;e+=1){let n=To(t,B,e),o=N(n);D.set(o,_[e]=Mo(o,n))}let L=t[4][0]&&!t[4][0].event.allDay&&Uo(t),H=t[9]&&t[5]&&Bo();return{c(){e=k("div"),n=k("div");for(let t=0;t<b.length;t+=1)b[t].c();s=C(),i=k("div"),U&&U.c(),c=C();for(let t=0;t<_.length;t+=1)_[t].c();a=C(),L&&L.c(),d=C(),f=k("div"),H&&H.c(),E(n,"class",o=t[7].bgEvents),E(i,"class",u=t[7].events),E(f,"class",h=t[7].extra),E(e,"class",p=t[7].day+" "+t[7].weekdays?.[t[0].getUTCDay()]+(t[5]?" "+t[7].today:"")+(t[6]?" "+t[7].highlight:""))},m(o,r){y(o,e,r),v(e,n);for(let t=0;t<b.length;t+=1)b[t]&&b[t].m(n,null);v(e,s),v(e,i),U&&U.m(i,null),v(i,c);for(let t=0;t<_.length;t+=1)_[t]&&_[t].m(i,null);v(i,a),L&&L.m(i,null),v(e,d),v(e,f),H&&H.m(f,null),t[29](e),g=!0,$||(m=[T(e,"pointerenter",(function(){l(t[20](t[8]))&&t[20](t[8]).apply(this,arguments)})),T(e,"pointerleave",(function(){l(t[8].pointer?.leave)&&t[8].pointer?.leave.apply(this,arguments)})),T(e,"pointerdown",(function(){l(t[8].action?.select)&&t[8].action?.select.apply(this,arguments)}))],$=!0)},p(r,l){t=r,9&l[0]&&(S=lt(t[3]),et(),b=it(b,l,M,1,t,S,x,n,st,Eo,null,Do),nt()),(!g||128&l[0]&&o!==(o=t[7].bgEvents))&&E(n,"class",o),t[4][1]?U?(U.p(t,l),16&l[0]&&ot(U,1)):(U=So(t),U.c(),ot(U,1),U.m(i,c)):U&&(et(),rt(U,1,1,(()=>{U=null})),nt()),5&l[0]&&(B=lt(t[2]),et(),_=it(_,l,N,1,t,B,D,i,st,Mo,a,To),nt()),t[4][0]&&!t[4][0].event.allDay?L?(L.p(t,l),16&l[0]&&ot(L,1)):(L=Uo(t),L.c(),ot(L,1),L.m(i,null)):L&&(et(),rt(L,1,1,(()=>{L=null})),nt()),(!g||128&l[0]&&u!==(u=t[7].events))&&E(i,"class",u),t[9]&&t[5]?H?544&l[0]&&ot(H,1):(H=Bo(),H.c(),ot(H,1),H.m(f,null)):H&&(et(),rt(H,1,1,(()=>{H=null})),nt()),(!g||128&l[0]&&h!==(h=t[7].extra))&&E(f,"class",h),(!g||225&l[0]&&p!==(p=t[7].day+" "+t[7].weekdays?.[t[0].getUTCDay()]+(t[5]?" "+t[7].today:"")+(t[6]?" "+t[7].highlight:"")))&&E(e,"class",p)},i(t){if(!g){for(let t=0;t<S.length;t+=1)ot(b[t]);ot(U);for(let t=0;t<B.length;t+=1)ot(_[t]);ot(L),ot(H),g=!0}},o(t){for(let t=0;t<b.length;t+=1)rt(b[t]);rt(U);for(let t=0;t<_.length;t+=1)rt(_[t]);rt(L),rt(H),g=!1},d(n){n&&w(e);for(let t=0;t<b.length;t+=1)b[t].d();U&&U.d();for(let t=0;t<_.length;t+=1)_[t].d();L&&L.d(),H&&H.d(),t[29](null),$=!1,r(m)}}}function Lo(t,e,n){let o,r,l,s,i,c,u,d,f,h,p,{date:g}=e,{resource:$}=e,{_events:m,_iEvents:v,highlightedDates:y,nowIndicator:w,slotDuration:b,slotHeight:k,theme:x,_interaction:C,_today:_,_slotTimeLimits:T}=z("state");a(t,m,(t=>n(28,u=t))),a(t,v,(t=>n(27,c=t))),a(t,y,(t=>n(25,s=t))),a(t,w,(t=>n(9,h=t))),a(t,b,(t=>n(31,r=t))),a(t,k,(t=>n(30,o=t))),a(t,x,(t=>n(7,d=t))),a(t,C,(t=>n(8,f=t))),a(t,_,(t=>n(26,i=t))),a(t,T,(t=>n(24,l=t)));let D,E,S,M,U,B,N=[];function L(t){return t-=jt(p).top,{allDay:!1,date:Ct(Ct(xt(g),l.min),r,zt(t/o)),resource:$,dayEl:p}}return t.$$set=t=>{"date"in t&&n(0,g=t.date),"resource"in t&&n(21,$=t.resource)},t.$$.update=()=>{if(16777217&t.$$.dirty[0]&&(n(22,U=Ct(xt(g),l.min)),n(23,B=Ct(xt(g),l.max))),283115532&t.$$.dirty[0]){n(2,D=[]),n(3,E=[]);for(let t of u)if(!t.allDay&&ae(t,U,B,$,!0)){let e=te(t,U,B);if("background"===t.display)E.push(e);else D.push(e)}!function(t){if(!t.length)return;ee(t);let e={columns:[],end:t[0].end};for(let n of t){let t=0;if(n.start<e.end){for(;t<e.columns.length&&!(e.columns[t][e.columns[t].length-1].end<=n.start);++t);n.end>e.end&&(e.end=n.end)}else e={columns:[],end:n.end};e.columns.length<t+1&&e.columns.push([]),e.columns[t].push(n),n.group=e,n.column=t}}(D)}148897792&t.$$.dirty[0]&&n(4,N=c.map((t=>t&&ae(t,U,B,$,!0)?te(t,U,B):null))),67108865&t.$$.dirty[0]&&n(5,S=Ut(g,i)),33554433&t.$$.dirty[0]&&n(6,M=s.some((t=>Ut(t,g)))),2&t.$$.dirty[0]&&p&&Yt(p,L)},[g,p,D,E,N,S,M,d,f,h,m,v,y,w,b,k,x,C,_,T,function(t){return t.pointer?e=>t.pointer.enterTimeGrid(g,p,e,$):void 0},$,U,B,l,s,i,c,u,function(t){G[t?"unshift":"push"]((()=>{p=t,n(1,p)}))}]}let Ho=class extends ft{constructor(t){super(),dt(this,t,Lo,No,s,{date:0,resource:21},null,[-1,-1])}};function Po(t){let e,n,o,s,i,c,a,u,d;var f=t[10].resizer;function h(t,e){return{props:{event:t[0]}}}return f&&(c=U(f,h(t)),c.$on("pointerdown",(function(){l(t[29](t[10],!0))&&t[29](t[10],!0).apply(this,arguments)}))),{c(){e=k("div"),n=k("div"),i=C(),c&&ct(c.$$.fragment),E(n,"class",o=t[1].eventBody),E(e,"class",t[3]),E(e,"style",t[4])},m(o,r){y(o,e,r),v(e,n),v(e,i),c&&at(c,e,null),t[45](e),a=!0,u||(d=[$(s=vt.call(null,n,t[5])),T(e,"click",(function(){l(t[28](t[7],t[6]))&&t[28](t[7],t[6]).apply(this,arguments)})),T(e,"mouseenter",(function(){l(t[28](t[8],t[6]))&&t[28](t[8],t[6]).apply(this,arguments)})),T(e,"mouseleave",(function(){l(t[28](t[9],t[6]))&&t[28](t[9],t[6]).apply(this,arguments)})),T(e,"pointerdown",(function(){l(!ue(t[6])&&t[29](t[10]))&&(!ue(t[6])&&t[29](t[10])).apply(this,arguments)}))],u=!0)},p(r,i){if(t=r,(!a||2&i[0]&&o!==(o=t[1].eventBody))&&E(n,"class",o),s&&l(s.update)&&32&i[0]&&s.update.call(null,t[5]),1024&i[0]&&f!==(f=t[10].resizer)){if(c){et();const t=c;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}f?(c=U(f,h(t)),c.$on("pointerdown",(function(){l(t[29](t[10],!0))&&t[29](t[10],!0).apply(this,arguments)})),ct(c.$$.fragment),ot(c.$$.fragment,1),at(c,e,null)):c=null}else if(f){const e={};1&i[0]&&(e.event=t[0]),c.$set(e)}(!a||8&i[0])&&E(e,"class",t[3]),(!a||16&i[0])&&E(e,"style",t[4])},i(t){a||(c&&ot(c.$$.fragment,t),a=!0)},o(t){c&&rt(c.$$.fragment,t),a=!1},d(n){n&&w(e),c&&ut(c),t[45](null),u=!1,r(d)}}}function Ro(t,e,n){let o,r,s,i,c,u,d,f,h,p,g,$,m,v,y,w,b,k,x,C,_,T,D,{chunk:E}=e,{longChunks:S={}}=e,{displayEventEnd:M,eventBackgroundColor:U,eventTextColor:B,eventClick:N,eventColor:L,eventContent:P,eventClassNames:F,eventDidMount:I,eventMouseEnter:j,eventMouseLeave:O,theme:A,_view:W,_intlEventTime:Y,_interaction:q,_iClasses:X,_resBgColor:V,_resTxtColor:J}=z("state");a(t,M,(t=>n(37,u=t))),a(t,U,(t=>n(43,$=t))),a(t,B,(t=>n(40,h=t))),a(t,N,(t=>n(7,v=t))),a(t,L,(t=>n(42,g=t))),a(t,P,(t=>n(36,c=t))),a(t,F,(t=>n(38,d=t))),a(t,I,(t=>n(47,r=t))),a(t,j,(t=>n(8,y=t))),a(t,O,(t=>n(9,w=t))),a(t,A,(t=>n(1,i=t))),a(t,W,(t=>n(34,o=t))),a(t,Y,(t=>n(35,s=t))),a(t,q,(t=>n(10,b=t))),a(t,X,(t=>n(39,f=t))),a(t,V,(t=>n(44,m=t))),a(t,J,(t=>n(41,p=t))),R();let K,Q=1;return H((()=>{l(r)&&r({event:se(x),timeText:D,el:k,view:Jt(o)})})),t.$$set=t=>{"chunk"in t&&n(30,E=t.chunk),"longChunks"in t&&n(31,S=t.longChunks)},t.$$.update=()=>{if(1073741824&t.$$.dirty[0]&&n(0,x=E.event),1073741843&t.$$.dirty[0]|16268&t.$$.dirty[1]){n(6,K=x.display);let t=x.backgroundColor||m(x)||$||g,e=x.textColor||p(x)||h;n(4,_=`width:calc(${100*E.days}% + ${7*(E.days-1)}px);margin-top:${Q}px;`),t&&n(4,_+=`background-color:${t};`),e&&n(4,_+=`color:${e};`),n(3,C=[i.event,...f([],x),...le(d,x,o)].join(" "))}1073741826&t.$$.dirty[0]|120&t.$$.dirty[1]&&n(5,[D,T]=re(E,u,c,i,s,o),T)},[x,i,k,C,_,T,K,v,y,w,b,M,U,B,N,L,P,F,I,j,O,A,W,Y,q,X,V,J,function(t,e){return!ue(e)&&l(t)?e=>t({event:se(x),el:k,jsEvent:e,view:Jt(o)}):void 0},function(t,e){return t.action?n=>t.action.drag(x,n,e):void 0},E,S,function(){k&&!fe(K)&&n(33,Q=oe(E,S,At(k)))},Q,o,s,c,u,d,f,h,p,g,$,m,function(t){G[t?"unshift":"push"]((()=>{k=t,n(2,k)}))}]}class zo extends ft{constructor(t){super(),dt(this,t,Ro,Po,s,{chunk:30,longChunks:31,reposition:32},null,[-1,-1])}get reposition(){return this.$$.ctx[32]}}function Fo(t,e,n){const o=t.slice();return o[21]=e[n],o[22]=e,o[23]=n,o}function Io(t){let e,n,o,r;return n=new zo({props:{chunk:t[2][0]}}),{c(){e=k("div"),ct(n.$$.fragment),E(e,"class",o=t[8].events+" "+t[8].preview)},m(t,o){y(t,e,o),at(n,e,null),r=!0},p(t,l){const s={};4&l&&(s.chunk=t[2][0]),n.$set(s),(!r||256&l&&o!==(o=t[8].events+" "+t[8].preview))&&E(e,"class",o)},i(t){r||(ot(n.$$.fragment,t),r=!0)},o(t){rt(n.$$.fragment,t),r=!1},d(t){t&&w(e),ut(n)}}}function Go(t,e){let n,o,r,l=e[23];const s=()=>e[19](o,l),i=()=>e[19](null,l);let c={chunk:e[21],longChunks:e[1]};return o=new zo({props:c}),s(),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){l!==(e=t)[23]&&(i(),l=e[23],s());const r={};16&n&&(r.chunk=e[21]),2&n&&(r.longChunks=e[1]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),i(),ut(o,t)}}}function jo(t){let e,n,o,s,i,c,a,u,d=t[2][0]&&Ut(t[2][0].date,t[0]),f=[],h=new Map,p=d&&Io(t),g=lt(t[4]);const $=t=>t[21].event;for(let e=0;e<g.length;e+=1){let n=Fo(t,g,e),o=$(n);h.set(o,f[e]=Go(o,n))}return{c(){e=k("div"),p&&p.c(),n=C(),o=k("div");for(let t=0;t<f.length;t+=1)f[t].c();E(o,"class",s=t[8].events),E(e,"class",i=t[8].day+" "+t[8].weekdays?.[t[0].getUTCDay()]+(t[5]?" "+t[8].today:"")+(t[6]?" "+t[8].highlight:""))},m(r,s){y(r,e,s),p&&p.m(e,null),v(e,n),v(e,o);for(let t=0;t<f.length;t+=1)f[t]&&f[t].m(o,null);t[20](e),c=!0,a||(u=[T(window,"resize",t[14]),T(e,"pointerdown",(function(){l(t[9].action?.select)&&t[9].action?.select.apply(this,arguments)}))],a=!0)},p(r,l){let[a]=l;t=r,5&a&&(d=t[2][0]&&Ut(t[2][0].date,t[0])),d?p?(p.p(t,a),5&a&&ot(p,1)):(p=Io(t),p.c(),ot(p,1),p.m(e,n)):p&&(et(),rt(p,1,1,(()=>{p=null})),nt()),146&a&&(g=lt(t[4]),et(),f=it(f,a,$,1,t,g,h,o,st,Go,null,Fo),nt()),(!c||256&a&&s!==(s=t[8].events))&&E(o,"class",s),(!c||353&a&&i!==(i=t[8].day+" "+t[8].weekdays?.[t[0].getUTCDay()]+(t[5]?" "+t[8].today:"")+(t[6]?" "+t[8].highlight:"")))&&E(e,"class",i)},i(t){if(!c){ot(p);for(let t=0;t<g.length;t+=1)ot(f[t]);c=!0}},o(t){rt(p);for(let t=0;t<f.length;t+=1)rt(f[t]);c=!1},d(n){n&&w(e),p&&p.d();for(let t=0;t<f.length;t+=1)f[t].d();t[20](null),a=!1,r(u)}}}function Oo(t,e,n){let o,r,l,s,i,c,u,d,{date:f}=e,{chunks:h}=e,{longChunks:p}=e,{iChunks:g=[]}=e,{resource:$}=e,{highlightedDates:m,theme:v,_interaction:y,_today:w}=z("state");a(t,m,(t=>n(17,o=t))),a(t,v,(t=>n(8,l=t))),a(t,y,(t=>n(9,s=t))),a(t,w,(t=>n(18,r=t)));let b=[];function k(){n(7,b.length=c.length,b);for(let t of b)t&&t.reposition&&t.reposition()}return P(k),t.$$set=t=>{"date"in t&&n(0,f=t.date),"chunks"in t&&n(15,h=t.chunks),"longChunks"in t&&n(1,p=t.longChunks),"iChunks"in t&&n(2,g=t.iChunks),"resource"in t&&n(16,$=t.resource)},t.$$.update=()=>{if(32785&t.$$.dirty){n(4,c=[]);for(let t of h)Ut(t.date,f)&&c.push(t)}262145&t.$$.dirty&&n(5,u=Ut(f,r)),131073&t.$$.dirty&&n(6,d=o.some((t=>Ut(t,f)))),65545&t.$$.dirty&&i&&Yt(i,(()=>({allDay:!0,date:f,resource:$,dayEl:i})))},[f,p,g,i,c,u,d,b,l,s,m,v,y,w,k,h,$,o,r,function(t,e){G[t?"unshift":"push"]((()=>{b[e]=t,n(7,b)}))},function(t){G[t?"unshift":"push"]((()=>{i=t,n(3,i)}))}]}class Ao extends ft{constructor(t){super(),dt(this,t,Oo,jo,s,{date:0,chunks:15,longChunks:1,iChunks:2,resource:16})}}function Wo(t,e,n){const o=t.slice();return o[14]=e[n],o}function Yo(t){let e,n;return e=new Ao({props:{date:t[14],chunks:t[2],longChunks:t[3],iChunks:t[4],resource:t[1]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.date=t[14]),4&n&&(o.chunks=t[2]),8&n&&(o.longChunks=t[3]),16&n&&(o.iChunks=t[4]),2&n&&(o.resource=t[1]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function qo(t){let e,n,o=lt(t[0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Yo(Wo(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){let[s]=n;if(31&s){let n;for(o=lt(t[0]),n=0;n<o.length;n+=1){const l=Wo(t,o,n);r[n]?(r[n].p(l,s),ot(r[n],1)):(r[n]=Yo(l),r[n].c(),ot(r[n],1),r[n].m(e.parentNode,e))}for(et(),n=o.length;n<r.length;n+=1)l(n);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Xo(t,e,n){let o,r,l,{dates:s}=e,{resource:i}=e,{_events:c,_iEvents:u,hiddenDays:d,theme:f}=z("state");a(t,c,(t=>n(12,l=t))),a(t,u,(t=>n(11,r=t))),a(t,d,(t=>n(10,o=t)));let h,p,g,$,m=[];return t.$$set=t=>{"dates"in t&&n(0,s=t.dates),"resource"in t&&n(1,i=t.resource)},t.$$.update=()=>{if(1&t.$$.dirty&&(n(8,g=s[0]),n(9,$=Tt(xt(s[s.length-1])))),5894&t.$$.dirty){n(2,h=[]);for(let t of l)if(t.allDay&&"background"!==t.display&&ae(t,g,$,i)){let e=te(t,g,$);h.push(e)}n(3,p=ne(h,o))}3842&t.$$.dirty&&n(4,m=r.map((t=>{let e;return t&&t.allDay&&ae(t,g,$,i)?(e=te(t,g,$),ne([e],o)):e=null,e})))},[s,i,h,p,m,c,u,d,g,$,o,r,l]}class Vo extends ft{constructor(t){super(),dt(this,t,Xo,qo,s,{dates:0,resource:1})}}function Jo(t,e,n){const o=t.slice();return o[8]=e[n],o}function Ko(t,e,n){const o=t.slice();return o[8]=e[n],o}function Qo(t){let e,n,o,r,s;return{c(){e=k("div"),E(e,"class",n=t[0].day+" "+t[0].weekdays?.[t[8].getUTCDay()])},m(n,l){y(n,e,l),r||(s=$(o=vt.call(null,e,t[2].format(t[8]))),r=!0)},p(r,s){t=r,3&s&&n!==(n=t[0].day+" "+t[0].weekdays?.[t[8].getUTCDay()])&&E(e,"class",n),o&&l(o.update)&&6&s&&o.update.call(null,t[2].format(t[8]))},d(t){t&&w(e),r=!1,s()}}}function Zo(t){let e,n=lt(t[1]),o=[];for(let e=0;e<n.length;e+=1)o[e]=Qo(Ko(t,n,e));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=_()},m(t,n){for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,n);y(t,e,n)},p(t,r){if(7&r){let l;for(n=lt(t[1]),l=0;l<n.length;l+=1){const s=Ko(t,n,l);o[l]?o[l].p(s,r):(o[l]=Qo(s),o[l].c(),o[l].m(e.parentNode,e))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(t){t&&w(e),b(o,t)}}}function tr(t){let e,n,o,r,l,s,i,c,a;return o=new fo({props:{$$slots:{default:[er]},$$scope:{ctx:t}}}),{c(){e=k("div"),n=k("div"),ct(o.$$.fragment),r=C(),l=k("div"),E(l,"class",s=t[0].hiddenScroll),E(n,"class",i=t[0].content),E(e,"class",c=t[0].allDay)},m(t,s){y(t,e,s),v(e,n),at(o,n,null),v(n,r),v(n,l),a=!0},p(t,r){const u={};8194&r&&(u.$$scope={dirty:r,ctx:t}),o.$set(u),(!a||1&r&&s!==(s=t[0].hiddenScroll))&&E(l,"class",s),(!a||1&r&&i!==(i=t[0].content))&&E(n,"class",i),(!a||1&r&&c!==(c=t[0].allDay))&&E(e,"class",c)},i(t){a||(ot(o.$$.fragment,t),a=!0)},o(t){rt(o.$$.fragment,t),a=!1},d(t){t&&w(e),ut(o)}}}function er(t){let e,n;return e=new Vo({props:{dates:t[1]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.dates=t[1]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function nr(t){let e,n;return e=new Ho({props:{date:t[8]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.date=t[8]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function or(t){let e,n,o=lt(t[1]),r=[];for(let e=0;e<o.length;e+=1)r[e]=nr(Jo(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(2&n){let s;for(o=lt(t[1]),s=0;s<o.length;s+=1){const l=Jo(t,o,s);r[s]?(r[s].p(l,n),ot(r[s],1)):(r[s]=nr(l),r[s].c(),ot(r[s],1),r[s].m(e.parentNode,e))}for(et(),s=o.length;s<r.length;s+=1)l(s);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function rr(t){let e,n,o,r,l,s,i,c,a,u;n=new fo({props:{$$slots:{default:[Zo]},$$scope:{ctx:t}}});let d=t[3]&&tr(t);return a=new yo({props:{$$slots:{default:[or]},$$scope:{ctx:t}}}),{c(){e=k("div"),ct(n.$$.fragment),o=C(),r=k("div"),i=C(),d&&d.c(),c=C(),ct(a.$$.fragment),E(r,"class",l=t[0].hiddenScroll),E(e,"class",s=t[0].header)},m(t,l){y(t,e,l),at(n,e,null),v(e,o),v(e,r),y(t,i,l),d&&d.m(t,l),y(t,c,l),at(a,t,l),u=!0},p(t,o){let[i]=o;const f={};8199&i&&(f.$$scope={dirty:i,ctx:t}),n.$set(f),(!u||1&i&&l!==(l=t[0].hiddenScroll))&&E(r,"class",l),(!u||1&i&&s!==(s=t[0].header))&&E(e,"class",s),t[3]?d?(d.p(t,i),8&i&&ot(d,1)):(d=tr(t),d.c(),ot(d,1),d.m(c.parentNode,c)):d&&(et(),rt(d,1,1,(()=>{d=null})),nt());const h={};8194&i&&(h.$$scope={dirty:i,ctx:t}),a.$set(h)},i(t){u||(ot(n.$$.fragment,t),ot(d),ot(a.$$.fragment,t),u=!0)},o(t){rt(n.$$.fragment,t),rt(d),rt(a.$$.fragment,t),u=!1},d(t){t&&(w(e),w(i),w(c)),ut(n),d&&d.d(t),ut(a,t)}}}function lr(t,e,n){let o,r,l,s,{_viewDates:i,_intlDayHeader:c,allDaySlot:u,theme:d}=z("state");return a(t,i,(t=>n(1,r=t))),a(t,c,(t=>n(2,l=t))),a(t,u,(t=>n(3,s=t))),a(t,d,(t=>n(0,o=t))),[o,r,l,s,i,c,u,d]}let sr=class extends ft{constructor(t){super(),dt(this,t,lr,rr,s,{})}};var ir={createOptions(t){t.buttonText.timeGridDay="day",t.buttonText.timeGridWeek="week",t.view="timeGridWeek",t.views.timeGridDay={buttonText:pe,component:sr,dayHeaderFormat:{weekday:"long"},duration:{days:1},theme:ye("ec-time-grid ec-day-view"),titleFormat:{year:"numeric",month:"long",day:"numeric"}},t.views.timeGridWeek={buttonText:ge,component:sr,duration:{weeks:1},theme:ye("ec-time-grid ec-week-view")}},createStores(t){t._slotTimeLimits=function(t){return $t([t._events,t._viewDates,t.flexibleSlotTimeLimits,t.slotMinTime,t.slotMaxTime],(t=>{let[e,n,o,r,s]=t,i=kt(r),c=kt(s);if(o){let t=kt(Ft(i.seconds,It(0,c.seconds-wt))),r=kt(It(c.seconds,t.seconds+wt)),s=l(o?.eventFilter)?o.eventFilter:t=>!de(t.display);t:for(let o of n){let n=Ct(xt(o),i),l=Ct(xt(o),c),a=Ct(xt(o),t),u=Ct(xt(o),r);for(let d of e)if(!d.allDay&&s(d)&&d.start<u&&d.end>a){if(d.start<n){let e=It((d.start-o)/1e3,t.seconds);e<i.seconds&&(i.seconds=e)}if(d.end>l){let t=Ft((d.end-o)/1e3,r.seconds);t>c.seconds&&(c.seconds=t)}if(i.seconds===t.seconds&&c.seconds===r.seconds)break t}}}return{min:i,max:c}}))}(t),t._times=function(t){return $t([t._slotTimeLimits,t._intlSlotLabel,t.slotDuration],(t=>{let[e,n,o]=t,r=o.seconds>=3600,l=[],s=Et(bt()),i=xt(s),c=1;for(Ct(s,e.min),Ct(i,e.max);s<i;)l.push(l.length&&(c||r)?n.format(s):""),Ct(s,o),c=1-c;return l}))}(t)}};function cr(e){let n,o,r,s,i;return{c(){n=k("div"),E(n,"class",o=e[2].day)},m(t,o){y(t,n,o),e[9](n),s||(i=$(r=vt.call(null,n,e[1])),s=!0)},p(t,e){let[s]=e;4&s&&o!==(o=t[2].day)&&E(n,"class",o),r&&l(r.update)&&2&s&&r.update.call(null,t[1])},i:t,o:t,d(t){t&&w(n),e[9](null),s=!1,i()}}}function ar(t,e,n){let o,r,s,i,c,{resource:u}=e,{date:d}=e,{resourceLabelContent:f,resourceLabelDidMount:h,theme:p}=z("state");return a(t,f,(t=>n(8,r=t))),a(t,h,(t=>n(10,o=t))),a(t,p,(t=>n(2,s=t))),H((()=>{l(o)&&o({resource:u,date:d?St(d):void 0,el:i})})),t.$$set=t=>{"resource"in t&&n(6,u=t.resource),"date"in t&&n(7,d=t.date)},t.$$.update=()=>{448&t.$$.dirty&&n(1,c=r?l(r)?r({resource:u,date:d?St(d):void 0}):r:u.titleHTML?{html:u.titleHTML}:u.title)},[i,c,s,f,h,p,u,d,r,function(t){G[t?"unshift":"push"]((()=>{i=t,n(0,i)}))}]}class ur extends ft{constructor(t){super(),dt(this,t,ar,cr,s,{resource:6,date:7})}}function dr(t,e,n){const o=t.slice();return o[13]=e[n],o}function fr(t,e,n){const o=t.slice();return o[16]=e[n],o}function hr(t,e,n){const o=t.slice();return o[22]=e[n],o}function pr(t,e,n){const o=t.slice();return o[19]=e[n],o}function gr(t,e,n){const o=t.slice();return o[22]=e[n],o}function $r(t,e,n){const o=t.slice();return o[13]=e[n],o}function mr(t,e,n){const o=t.slice();return o[16]=e[n],o}function vr(t){let e,n;return e=new ur({props:{resource:t[13]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};8&n[0]&&(o.resource=t[13]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function yr(e){let n,o,r,s,i;return{c(){n=k("div"),E(n,"class",o=e[4].day)},m(t,o){y(t,n,o),s||(i=$(r=vt.call(null,n,e[5].format(e[13]))),s=!0)},p(t,s){e=t,16&s[0]&&o!==(o=e[4].day)&&E(n,"class",o),r&&l(r.update)&&40&s[0]&&r.update.call(null,e[5].format(e[13]))},i:t,o:t,d(t){t&&w(n),s=!1,i()}}}function wr(t){let e,n,o,r=lt(t[3][1]),l=[];for(let e=0;e<r.length;e+=1)l[e]=xr(mr(t,r,e));const s=t=>rt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=k("div");for(let t=0;t<l.length;t+=1)l[t].c();E(e,"class",n=t[4].days)},m(t,n){y(t,e,n);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);o=!0},p(t,i){if(60&i[0]){let n;for(r=lt(t[3][1]),n=0;n<r.length;n+=1){const o=mr(t,r,n);l[n]?(l[n].p(o,i),ot(l[n],1)):(l[n]=xr(o),l[n].c(),ot(l[n],1),l[n].m(e,null))}for(et(),n=r.length;n<l.length;n+=1)s(n);nt()}(!o||16&i[0]&&n!==(n=t[4].days))&&E(e,"class",n)},i(t){if(!o){for(let t=0;t<r.length;t+=1)ot(l[t]);o=!0}},o(t){l=l.filter(Boolean);for(let t=0;t<l.length;t+=1)rt(l[t]);o=!1},d(t){t&&w(e),b(l,t)}}}function br(e){let n,o,r,s,i;return{c(){n=k("div"),E(n,"class",o=e[4].day)},m(t,o){y(t,n,o),s||(i=$(r=vt.call(null,n,e[5].format(e[16]))),s=!0)},p(t,s){e=t,16&s[0]&&o!==(o=e[4].day)&&E(n,"class",o),r&&l(r.update)&&40&s[0]&&r.update.call(null,e[5].format(e[16]))},i:t,o:t,d(t){t&&w(n),s=!1,i()}}}function kr(t){let e,n;return e=new ur({props:{resource:t[16],date:t[13]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};8&n[0]&&(o.resource=t[16]),8&n[0]&&(o.date=t[13]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function xr(t){let e,n,o,r;const l=[kr,br],s=[];function i(t,e){return t[2]?0:1}return e=i(t),n=s[e]=l[e](t),{c(){n.c(),o=_()},m(t,n){s[e].m(t,n),y(t,o,n),r=!0},p(t,r){let c=e;e=i(t),e===c?s[e].p(t,r):(et(),rt(s[c],1,1,(()=>{s[c]=null})),nt(),n=s[e],n?n.p(t,r):(n=s[e]=l[e](t),n.c()),ot(n,1),n.m(o.parentNode,o))},i(t){r||(ot(n),r=!0)},o(t){rt(n),r=!1},d(t){t&&w(o),s[e].d(t)}}}function Cr(t){let e,n,o,r,l,s,i;const c=[yr,vr],a=[];function u(t,e){return t[2]?0:1}n=u(t),o=a[n]=c[n](t);let d=t[3][1].length>1&&wr(t);return{c(){e=k("div"),o.c(),r=C(),d&&d.c(),l=C(),E(e,"class",s=t[4].resource)},m(t,o){y(t,e,o),a[n].m(e,null),v(e,r),d&&d.m(e,null),v(e,l),i=!0},p(t,f){let h=n;n=u(t),n===h?a[n].p(t,f):(et(),rt(a[h],1,1,(()=>{a[h]=null})),nt(),o=a[n],o?o.p(t,f):(o=a[n]=c[n](t),o.c()),ot(o,1),o.m(e,r)),t[3][1].length>1?d?(d.p(t,f),8&f[0]&&ot(d,1)):(d=wr(t),d.c(),ot(d,1),d.m(e,l)):d&&(et(),rt(d,1,1,(()=>{d=null})),nt()),(!i||16&f[0]&&s!==(s=t[4].resource))&&E(e,"class",s)},i(t){i||(ot(o),ot(d),i=!0)},o(t){rt(o),rt(d),i=!1},d(t){t&&w(e),a[n].d(),d&&d.d()}}}function _r(t){let e,n,o=lt(t[3][0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Cr($r(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(60&n[0]){let s;for(o=lt(t[3][0]),s=0;s<o.length;s+=1){const l=$r(t,o,s);r[s]?(r[s].p(l,n),ot(r[s],1)):(r[s]=Cr(l),r[s].c(),ot(r[s],1),r[s].m(e.parentNode,e))}for(et(),s=o.length;s<r.length;s+=1)l(s);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Tr(t){let e,n,o,r,l,s,i,c,a;return o=new fo({props:{$$slots:{default:[Br]},$$scope:{ctx:t}}}),{c(){e=k("div"),n=k("div"),ct(o.$$.fragment),r=C(),l=k("div"),E(l,"class",s=t[4].hiddenScroll),E(n,"class",i=t[4].content),E(e,"class",c=t[4].allDay)},m(t,s){y(t,e,s),v(e,n),at(o,n,null),v(n,r),v(n,l),a=!0},p(t,r){const u={};23&r[0]|1&r[1]&&(u.$$scope={dirty:r,ctx:t}),o.$set(u),(!a||16&r[0]&&s!==(s=t[4].hiddenScroll))&&E(l,"class",s),(!a||16&r[0]&&i!==(i=t[4].content))&&E(n,"class",i),(!a||16&r[0]&&c!==(c=t[4].allDay))&&E(e,"class",c)},i(t){a||(ot(o.$$.fragment,t),a=!0)},o(t){rt(o.$$.fragment,t),a=!1},d(t){t&&w(e),ut(o)}}}function Dr(t){let e,n,o=lt(t[1]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Sr(hr(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(19&n[0]){let s;for(o=lt(t[1]),s=0;s<o.length;s+=1){const l=hr(t,o,s);r[s]?(r[s].p(l,n),ot(r[s],1)):(r[s]=Sr(l),r[s].c(),ot(r[s],1),r[s].m(e.parentNode,e))}for(et(),s=o.length;s<r.length;s+=1)l(s);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Er(t){let e,n,o=lt(t[0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Ur(pr(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(19&n[0]){let s;for(o=lt(t[0]),s=0;s<o.length;s+=1){const l=pr(t,o,s);r[s]?(r[s].p(l,n),ot(r[s],1)):(r[s]=Ur(l),r[s].c(),ot(r[s],1),r[s].m(e.parentNode,e))}for(et(),s=o.length;s<r.length;s+=1)l(s);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Sr(t){let e,n,o,r,l;return n=new Vo({props:{dates:t[0],resource:t[22]}}),{c(){e=k("div"),ct(n.$$.fragment),o=C(),E(e,"class",r=t[4].resource)},m(t,r){y(t,e,r),at(n,e,null),v(e,o),l=!0},p(t,o){const s={};1&o[0]&&(s.dates=t[0]),2&o[0]&&(s.resource=t[22]),n.$set(s),(!l||16&o[0]&&r!==(r=t[4].resource))&&E(e,"class",r)},i(t){l||(ot(n.$$.fragment,t),l=!0)},o(t){rt(n.$$.fragment,t),l=!1},d(t){t&&w(e),ut(n)}}}function Mr(t){let e,n;return e=new Vo({props:{dates:[t[19]],resource:t[22]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.dates=[t[19]]),2&n[0]&&(o.resource=t[22]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Ur(t){let e,n,o,r,l=lt(t[1]),s=[];for(let e=0;e<l.length;e+=1)s[e]=Mr(gr(t,l,e));const i=t=>rt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=k("div");for(let t=0;t<s.length;t+=1)s[t].c();n=C(),E(e,"class",o=t[4].resource)},m(t,o){y(t,e,o);for(let t=0;t<s.length;t+=1)s[t]&&s[t].m(e,null);v(e,n),r=!0},p(t,c){if(3&c[0]){let o;for(l=lt(t[1]),o=0;o<l.length;o+=1){const r=gr(t,l,o);s[o]?(s[o].p(r,c),ot(s[o],1)):(s[o]=Mr(r),s[o].c(),ot(s[o],1),s[o].m(e,n))}for(et(),o=l.length;o<s.length;o+=1)i(o);nt()}(!r||16&c[0]&&o!==(o=t[4].resource))&&E(e,"class",o)},i(t){if(!r){for(let t=0;t<l.length;t+=1)ot(s[t]);r=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)rt(s[t]);r=!1},d(t){t&&w(e),b(s,t)}}}function Br(t){let e,n,o,r;const l=[Er,Dr],s=[];function i(t,e){return t[2]?0:1}return e=i(t),n=s[e]=l[e](t),{c(){n.c(),o=_()},m(t,n){s[e].m(t,n),y(t,o,n),r=!0},p(t,r){let c=e;e=i(t),e===c?s[e].p(t,r):(et(),rt(s[c],1,1,(()=>{s[c]=null})),nt(),n=s[e],n?n.p(t,r):(n=s[e]=l[e](t),n.c()),ot(n,1),n.m(o.parentNode,o))},i(t){r||(ot(n),r=!0)},o(t){rt(n),r=!1},d(t){t&&w(o),s[e].d(t)}}}function Nr(t){let e,n;return e=new Ho({props:{date:t[2]?t[13]:t[16],resource:t[2]?t[16]:t[13]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};12&n[0]&&(o.date=t[2]?t[13]:t[16]),12&n[0]&&(o.resource=t[2]?t[16]:t[13]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Lr(t){let e,n,o,r,l=lt(t[3][1]),s=[];for(let e=0;e<l.length;e+=1)s[e]=Nr(fr(t,l,e));const i=t=>rt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=k("div");for(let t=0;t<s.length;t+=1)s[t].c();n=C(),E(e,"class",o=t[4].resource)},m(t,o){y(t,e,o);for(let t=0;t<s.length;t+=1)s[t]&&s[t].m(e,null);v(e,n),r=!0},p(t,c){if(12&c[0]){let o;for(l=lt(t[3][1]),o=0;o<l.length;o+=1){const r=fr(t,l,o);s[o]?(s[o].p(r,c),ot(s[o],1)):(s[o]=Nr(r),s[o].c(),ot(s[o],1),s[o].m(e,n))}for(et(),o=l.length;o<s.length;o+=1)i(o);nt()}(!r||16&c[0]&&o!==(o=t[4].resource))&&E(e,"class",o)},i(t){if(!r){for(let t=0;t<l.length;t+=1)ot(s[t]);r=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)rt(s[t]);r=!1},d(t){t&&w(e),b(s,t)}}}function Hr(t){let e,n,o=lt(t[3][0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Lr(dr(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(28&n[0]){let s;for(o=lt(t[3][0]),s=0;s<o.length;s+=1){const l=dr(t,o,s);r[s]?(r[s].p(l,n),ot(r[s],1)):(r[s]=Lr(l),r[s].c(),ot(r[s],1),r[s].m(e.parentNode,e))}for(et(),s=o.length;s<r.length;s+=1)l(s);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Pr(t){let e,n,o,r,l,s,i,c,a,u;n=new fo({props:{$$slots:{default:[_r]},$$scope:{ctx:t}}});let d=t[6]&&Tr(t);return a=new yo({props:{$$slots:{default:[Hr]},$$scope:{ctx:t}}}),{c(){e=k("div"),ct(n.$$.fragment),o=C(),r=k("div"),i=C(),d&&d.c(),c=C(),ct(a.$$.fragment),E(r,"class",l=t[4].hiddenScroll),E(e,"class",s=t[4].header)},m(t,l){y(t,e,l),at(n,e,null),v(e,o),v(e,r),y(t,i,l),d&&d.m(t,l),y(t,c,l),at(a,t,l),u=!0},p(t,o){const i={};60&o[0]|1&o[1]&&(i.$$scope={dirty:o,ctx:t}),n.$set(i),(!u||16&o[0]&&l!==(l=t[4].hiddenScroll))&&E(r,"class",l),(!u||16&o[0]&&s!==(s=t[4].header))&&E(e,"class",s),t[6]?d?(d.p(t,o),64&o[0]&&ot(d,1)):(d=Tr(t),d.c(),ot(d,1),d.m(c.parentNode,c)):d&&(et(),rt(d,1,1,(()=>{d=null})),nt());const f={};28&o[0]|1&o[1]&&(f.$$scope={dirty:o,ctx:t}),a.$set(f)},i(t){u||(ot(n.$$.fragment,t),ot(d),ot(a.$$.fragment,t),u=!0)},o(t){rt(n.$$.fragment,t),rt(d),rt(a.$$.fragment,t),u=!1},d(t){t&&(w(e),w(i),w(c)),ut(n),d&&d.d(t),ut(a,t)}}}function Rr(t,e,n){let o,r,l,s,i,c,u,{datesAboveResources:d,_viewDates:f,_viewResources:h,_intlDayHeader:p,allDaySlot:g,theme:$}=z("state");return a(t,d,(t=>n(2,l=t))),a(t,f,(t=>n(0,o=t))),a(t,h,(t=>n(1,r=t))),a(t,p,(t=>n(5,i=t))),a(t,g,(t=>n(6,c=t))),a(t,$,(t=>n(4,s=t))),t.$$.update=()=>{7&t.$$.dirty[0]&&n(3,u=l?[o,r]:[r,o])},[o,r,l,u,s,i,c,d,f,h,p,g,$]}class zr extends ft{constructor(t){super(),dt(this,t,Rr,Pr,s,{},null,[-1,-1])}}function Fr(t,e,n){let o,r,l,{resources:s,_resBgColor:i,_resTxtColor:c}=z("state");return a(t,s,(t=>n(3,o=t))),a(t,i,(t=>n(5,l=t))),a(t,c,(t=>n(4,r=t))),g(i,l=t=>{let e=o.find((e=>t.resourceIds.includes(e.id)));return e?.eventBackgroundColor},l),g(c,r=t=>{let e=o.find((e=>t.resourceIds.includes(e.id)));return e?.eventTextColor},r),[s,i,c]}let Ir=class extends ft{constructor(t){super(),dt(this,t,Fr,null,s,{})}};var Gr={createOptions(t){t.resources=[],t.datesAboveResources=!1,t.filterResourcesWithEvents=!1,t.resourceLabelContent=void 0,t.resourceLabelDidMount=void 0,t.buttonText.resourceTimeGridDay="day",t.buttonText.resourceTimeGridWeek="week",t.theme.resource="ec-resource",t.theme.resourceTitle="ec-resource-title",t.view="resourceTimeGridWeek",t.views.resourceTimeGridDay={buttonText:pe,component:zr,duration:{days:1},theme:ye("ec-time-grid ec-resource-day-view")},t.views.resourceTimeGridWeek={buttonText:ge,component:zr,duration:{weeks:1},theme:ye("ec-time-grid ec-resource-week-view")}},createParsers(t){t.resources=jr},createStores(t){"_times"in t||ir.createStores(t),t._auxiliary.update((t=>[...t,Ir])),t._viewResources=function(t){return $t([t.resources,t.filterResourcesWithEvents,t._events,t._activeRange],(e=>{let[n,o,r,l]=e,s=n;return o&&(s=n.filter((t=>{for(let e of r)if("background"!==e.display&&e.resourceIds.includes(t.id)&&e.start<l.end&&e.end>l.start)return!0;return!1}))),s.length||(s=t.resources.parse([{}])),s}))}(t)}};function jr(t){return t.map((t=>({id:String(t.id),title:t.title||"",titleHTML:t.titleHTML||"",eventBackgroundColor:t.eventBackgroundColor,eventTextColor:t.eventTextColor})))}let Or=!1;function Ar(t,e,n){return It(e,Ft(n,t))}const{window:Wr}=m;function Yr(e){let n,o;return{c:t,m(t,r){n||(o=[T(Wr,"pointermove",e[31]),T(Wr,"pointerup",e[32]),T(Wr,"pointercancel",e[32]),T(Wr,"scroll",e[0]),T(Wr,"selectstart",Xr(e[33])),T(Wr,"contextmenu",(function(){l(Xr(e[40]))&&Xr(e[40]).apply(this,arguments)})),T(Wr,"touchstart",e[34]),T(Wr,"touchmove",e[39],{passive:!1})],n=!0)},p(t,n){e=t},i:t,o:t,d(t){n=!1,r(o)}}}function qr(t){return t.isPrimary&&("mouse"!==t.pointerType||1&t.buttons)}function Xr(t){return e=>{t()&&e.preventDefault()}}function Vr(t,e,n){let o,s,i,c,u,d,f,h,p,$,m,v,y,w,b,k,x,C,_,D,E,S,M,U,B,N,L,H,P,R,I,G,j,O,A,W,Y,q,X,V,J,K,Q,Z,tt,et,nt,ot,rt,lt,st,it,ct,at,{_iEvents:ut,_iClass:dt,_events:ft,_view:ht,_dayGrid:pt,_draggable:gt,dateClick:$t,dragScroll:mt,datesAboveResources:vt,eventDragMinDistance:yt,eventDragStart:wt,eventDragStop:bt,eventDrop:Dt,eventLongPressDelay:Et,eventResizeStart:Ut,eventResizeStop:Bt,eventResize:Nt,longPressDelay:Lt,selectable:Ht,select:Rt,selectBackgroundColor:zt,selectLongPressDelay:Gt,selectMinDistance:At,slotDuration:Wt,slotHeight:Yt,unselect:qt,unselectAuto:Kt,unselectCancel:Qt,view:Zt}=z("state");function te(t){window.getSelection().removeAllRanges(),q=V=t.clientX,X=J=t.clientY;let e=Vt(V,J);({allDay:nt,date:O,resource:W}=Xt(e)(J)),K=Ot(e,W?4:3),Z=Ot(e,W&&(1===R||B)?2:1),ne(),"mouse"!==t.pointerType&&n(1,ct=setTimeout((()=>{R&&(I=!0,ee(t))}),(ce()?U:M)??S))}function ee(t){if(I||t&&"mouse"===t.pointerType&&Math.sqrt(Math.pow(V-q,2)+Math.pow(J-X,2))>=(ce()?E:D)){I=!0,ue(t),g(dt,f=ot,f),c[0]||(ce()?g(ut,c[0]={id:"{select}",allDay:G.allDay,start:G.start,title:"",display:"preview",extendedProps:{},backgroundColor:u,resourceIds:G.resourceIds},c):function(t,e){l(e)&&e({event:se(G),jsEvent:t,view:Jt(o)});j=G.display,G.display="preview",g(ut,c[0]=ie(G),c),G.display="ghost",ft.set(i)}(t,le()?_:C));let e=Vt(Ar(V,at[0],at[1]),Ar(J,at[2],at[3]));if(e){let t;({allDay:t,date:A,resource:Y}=Xt(e)(J)),t===nt&&(et=kt((A-O)/1e3),g(ut,c[0].end=Ct(xt(G.end),et),c),le()?c[0].end<rt&&g(ut,c[0].end=rt,c):ce()?c[0].end<G.end?(g(ut,c[0].start=_t(c[0].end,lt),c),g(ut,c[0].end=G.end,c)):g(ut,c[0].start=G.start,c):(g(ut,c[0].start=Ct(xt(G.start),et),c),W&&(g(ut,c[0].resourceIds=G.resourceIds.filter((t=>t!==W.id)),c),c[0].resourceIds.push(Y.id))))}}if(x){let t=2*k;e=()=>{K&&(J<t&&window.scrollBy(0,It(-10,(J-t)/3)),J<Q.top+t&&(K.scrollTop+=It(-10,(J-Q.top-t)/3)),J>window.innerHeight-t&&window.scrollBy(0,Ft(10,(J-window.innerHeight+t)/3)),J>Q.bottom-t&&(K.scrollTop+=Ft(10,(J-Q.bottom+t)/3)))},Or||(Or=!0,window.requestAnimationFrame((()=>{e(),Or=!1})))}var e}function ne(){Q=jt(K),tt=jt(Z),at=[It(0,tt.left+(d?0:8)),Ft(document.documentElement.clientWidth,tt.right)-2,It(0,Q.top),Ft(document.documentElement.clientHeight,Q.bottom)-2]}function oe(){g(ut,c[0]=null,c)}function re(t,e){t.start=e.start,t.end=e.end,t.resourceIds=e.resourceIds,ft.set(i)}function le(){return 2===R}function ce(){return 3===R}function ae(){return R&&R<4}function ue(t){st&&(st=!1,oe(),l(s)&&s({jsEvent:t,view:Jt(o)}))}a(t,ut,(t=>n(68,c=t))),a(t,dt,(t=>n(71,f=t))),a(t,ft,(t=>n(67,i=t))),a(t,ht,(t=>n(65,o=t))),a(t,pt,(t=>n(70,d=t))),a(t,gt,(t=>n(93,P=t))),a(t,$t,(t=>n(72,h=t))),a(t,mt,(t=>n(81,x=t))),a(t,vt,(t=>n(89,B=t))),a(t,yt,(t=>n(84,D=t))),a(t,wt,(t=>n(82,C=t))),a(t,bt,(t=>n(75,m=t))),a(t,Dt,(t=>n(73,p=t))),a(t,Et,(t=>n(87,M=t))),a(t,Ut,(t=>n(83,_=t))),a(t,Bt,(t=>n(76,v=t))),a(t,Nt,(t=>n(74,$=t))),a(t,Lt,(t=>n(86,S=t))),a(t,Ht,(t=>n(92,H=t))),a(t,Rt,(t=>n(77,y=t))),a(t,zt,(t=>n(69,u=t))),a(t,Gt,(t=>n(88,U=t))),a(t,At,(t=>n(85,E=t))),a(t,Wt,(t=>n(90,N=t))),a(t,Yt,(t=>n(80,k=t))),a(t,qt,(t=>n(66,s=t))),a(t,Kt,(t=>n(79,b=t))),a(t,Qt,(t=>n(78,w=t))),a(t,Zt,(t=>n(91,L=t))),ht.subscribe(ue);return[function(){ae()&&(ne(),ee())},ct,ut,dt,ft,ht,pt,gt,$t,mt,vt,yt,wt,bt,Dt,Et,Ut,Bt,Nt,Lt,Ht,Rt,zt,Gt,At,Wt,Yt,qt,Kt,Qt,Zt,function(t){ae()&&t.isPrimary&&(V=t.clientX,J=t.clientY,ee(t))},function(t){if(!st||!b||w&&t.target.closest(w)||ue(t),R&&t.isPrimary){if(I)if(ce()){if(st=!0,l(y)){let{start:e,end:n}=se(c[0]);y({start:e,end:n,startStr:Mt(c[0].start),endStr:Mt(c[0].end),allDay:nt,jsEvent:t,view:Jt(o),resource:W})}}else{G.display=j;let e=le()?v:m;l(e)&&e({event:se(G),jsEvent:t,view:Jt(o)});let n=ie(G);if(re(G,c[0]),oe(),e=le()?$:p,l(e)){let r,l=G;r=le()?{endDelta:et}:{delta:et,oldResource:W!==Y?W:void 0,newResource:W!==Y?Y:void 0},e(Pt(r,{event:se(G),oldEvent:se(n),jsEvent:t,view:Jt(o),revert(){re(l,n)}}))}}else if((4===R||ce())&&l(h)&&!it){V=t.clientX,J=t.clientY;let e=Vt(V,J);if(e){let{allDay:n,date:r,resource:l}=Xt(e)(J);h({allDay:n,date:St(r),dateStr:Mt(r),dayEl:e,jsEvent:t,view:Jt(o),resource:l})}}I=!1,R=q=X=V=J=G=j=O=A=W=Y=et=nt=g(dt,f=rt=lt=void 0,f),K=Z=Q=tt=void 0,ct&&(clearTimeout(ct),n(1,ct=void 0))}it=!1},ae,function(t){if(ae()){let e=t.target,n=[],o=()=>r(n);n.push(T(e,"touchmove",Xr((()=>I)))),n.push(T(e,"touchend",o)),n.push(T(e,"touchcancel",o))}},function(t,e,n,o){R||(R=qr(e)?n?2:P(t)?1:5:5,ae()&&(G=t,te(e),o&&(O=o),ot=n?nt?"resizingX":"resizingY":"dragging",n&&(rt=xt(G.start),nt?(rt.setUTCHours(G.end.getUTCHours(),G.end.getUTCMinutes(),G.end.getUTCSeconds(),0),rt<G.start&&Tt(rt)):Ct(rt,N)),ee(e)))},function(t){R||(R=qr(t)?H&&!L.startsWith("list")?3:4:5,ae()&&(te(t),ot="selecting",lt=nt?kt({day:1}):N,G={allDay:nt,start:O,end:Ct(xt(O),lt),resourceIds:W?[W.id]:[]},ee(t)))},ue,function(){it=!0},function(e){F.call(this,t,e)},()=>ct]}class Jr extends ft{constructor(t){super(),dt(this,t,Vr,Yr,s,{drag:35,select:36,handleScroll:0,unselect:37,noClick:38},null,[-1,-1,-1,-1])}get drag(){return this.$$.ctx[35]}get select(){return this.$$.ctx[36]}get handleScroll(){return this.$$.ctx[0]}get unselect(){return this.$$.ctx[37]}get noClick(){return this.$$.ctx[38]}}function Kr(e){let n,o;return{c:t,m(t,r){n||(o=[T(window,"pointermove",e[5]),T(window,"scroll",e[0])],n=!0)},p:t,i:t,o:t,d(t){n=!1,r(o)}}}function Qr(t){return t.isPrimary&&"mouse"===t.pointerType}function Zr(t,e,n){let o,r,l,s,i,c,u,d,f,h,{_iEvents:p,_events:$,_viewDates:m,_slotTimeLimits:v,slotDuration:y,slotHeight:w,hiddenDays:b,_view:k,datesAboveResources:x,theme:C}=z("state");function _(){if(c){if(u){let t=i-d.top;h=Ct(Ct(xt(c),s.min),r,zt(t/l))}else h=c;o[1]||g(p,o[1]={id:"{pointer}",title:"",display:"pointer",extendedProps:{},backgroundColor:"transparent"},o),g(p,o[1].start=h,o),g(p,o[1].end=Ct(xt(h),r),o),g(p,o[1].resourceIds=f?[f.id]:[],o)}}function T(){c=u=g(p,o[1]=null,o)}return a(t,p,(t=>n(9,o=t))),a(t,v,(t=>n(18,s=t))),a(t,y,(t=>n(16,r=t))),a(t,w,(t=>n(17,l=t))),t.$$.update=()=>{512&t.$$.dirty&&o[0]&&T()},[function(){u&&(d=jt(u),_())},p,v,y,w,function(t){Qr(t)&&(i=t.clientY,_())},function(t,e,n,o){Qr(n)&&(c=t,u=e,d=jt(u),i=n.clientY,f=o)},function(t,e){Qr(e)&&(c=t,u=null,i=f=void 0)},function(t){Qr(t)&&T()},o]}class tl extends ft{constructor(t){super(),dt(this,t,Zr,Kr,s,{enterTimeGrid:6,enterDayGrid:7,leave:8,handleScroll:0})}get enterTimeGrid(){return this.$$.ctx[6]}get enterDayGrid(){return this.$$.ctx[7]}get leave(){return this.$$.ctx[8]}get handleScroll(){return this.$$.ctx[0]}}function el(t){let e,n,o,r;return{c(){e=k("div"),E(e,"class",n=t[1].resizer)},m(n,l){y(n,e,l),o||(r=T(e,"pointerdown",t[8]),o=!0)},p(t,o){2&o&&n!==(n=t[1].resizer)&&E(e,"class",n)},d(t){t&&w(e),o=!1,r()}}}function nl(e){let n,o=e[0]&&el(e);return{c(){o&&o.c(),n=_()},m(t,e){o&&o.m(t,e),y(t,n,e)},p(t,e){let[r]=e;t[0]?o?o.p(t,r):(o=el(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},i:t,o:t,d(t){t&&w(n),o&&o.d(t)}}}function ol(t,e,n){let o,r,l,s,{event:i}=e,{theme:c,eventDurationEditable:u,editable:d}=z("state");return a(t,c,(t=>n(1,l=t))),a(t,u,(t=>n(7,r=t))),a(t,d,(t=>n(6,o=t))),t.$$set=t=>{"event"in t&&n(5,i=t.event)},t.$$.update=()=>{224&t.$$.dirty&&n(0,s=!de(i.display)&&!ue(i.display)&&((i.durationEditable??r)||(i.editable??o)))},[s,l,c,u,d,i,o,r,function(e){F.call(this,t,e)}]}class rl extends ft{constructor(t){super(),dt(this,t,ol,nl,s,{event:5})}}function ll(t){let e,n;return e=new tl({props:{}}),t[16](e),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){e.$set({})},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(n){t[16](null),ut(e,n)}}}function sl(t){let e,n,o,r;e=new Jr({props:{}}),t[15](e);let l=t[1]&&ll(t);return{c(){ct(e.$$.fragment),n=C(),l&&l.c(),o=_()},m(t,s){at(e,t,s),y(t,n,s),l&&l.m(t,s),y(t,o,s),r=!0},p(t,n){let[r]=n;e.$set({}),t[1]?l?(l.p(t,r),2&r&&ot(l,1)):(l=ll(t),l.c(),ot(l,1),l.m(o.parentNode,o)):l&&(et(),rt(l,1,1,(()=>{l=null})),nt())},i(t){r||(ot(e.$$.fragment,t),ot(l),r=!0)},o(t){rt(e.$$.fragment,t),rt(l),r=!1},d(r){r&&(w(n),w(o)),t[15](null),ut(e,r),l&&l.d(r)}}}function il(t,e,n){let o,r,l,s,i,c,u,d,{theme:f,editable:h,eventStartEditable:p,eventDurationEditable:$,pointer:m,_bodyEl:v,_interaction:y,_iClasses:w,_draggable:b}=z("state");function k(){for(let t of Object.values(o))t?.handleScroll?.()}return a(t,f,(t=>n(11,l=t))),a(t,h,(t=>n(13,c=t))),a(t,p,(t=>n(14,u=t))),a(t,m,(t=>n(1,d=t))),a(t,v,(t=>n(10,r=t))),a(t,y,(t=>n(0,o=t))),a(t,w,(t=>n(17,i=t))),a(t,b,(t=>n(12,s=t))),g(y,o.resizer=rl,o),t.$$.update=()=>{24576&t.$$.dirty&&g(b,s=t=>(t.startEditable??u)||(t.editable??c),s),6144&t.$$.dirty&&g(w,i=(t,e)=>{let{display:n}=e;return ue(n)?[l[n]]:!de(n)&&s(e)?[l.draggable]:[]},i),1024&t.$$.dirty&&r&&T(r,"scroll",k)},[o,d,f,h,p,m,v,y,w,b,r,l,s,c,u,function(t){G[t?"unshift":"push"]((()=>{o.action=t,y.set(o)}))},function(t){G[t?"unshift":"push"]((()=>{o.pointer=t,y.set(o)}))}]}class cl extends ft{constructor(t){super(),dt(this,t,il,sl,s,{})}}var al={createOptions(t){t.dateClick=void 0,t.dragScroll=!0,t.editable=!1,t.eventDragMinDistance=5,t.eventDragStart=void 0,t.eventDragStop=void 0,t.eventDrop=void 0,t.eventDurationEditable=!0,t.eventLongPressDelay=void 0,t.eventResizeStart=void 0,t.eventResizeStop=void 0,t.eventResize=void 0,t.eventStartEditable=!0,t.longPressDelay=1e3,t.pointer=!1,t.select=void 0,t.selectBackgroundColor=void 0,t.selectLongPressDelay=void 0,t.selectMinDistance=5,t.unselect=void 0,t.unselectAuto=!0,t.unselectCancel="",t.theme.draggable="ec-draggable",t.theme.ghost="ec-ghost",t.theme.preview="ec-preview",t.theme.pointer="ec-pointer",t.theme.resizer="ec-resizer",t.theme.dragging="ec-dragging",t.theme.resizingY="ec-resizing-y",t.theme.resizingX="ec-resizing-x",t.theme.selecting="ec-selecting"},createStores(e){e._draggable=gt(t),e._auxiliary.update((t=>[...t,cl]))}};return class extends Ze{constructor(t,e){super({target:t,props:{plugins:[Rn,ro,ir,Gr,al],options:e}})}get view(){return this.getView()}}}();
5
+ var EventCalendar=function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function r(t){t.forEach(n)}function l(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];if(null==e){for(const t of o)t(void 0);return t}const l=e.subscribe(...o);return l.unsubscribe?()=>l.unsubscribe():l}function c(t){let e;return s(t,(t=>e=t))(),e}function a(t,e,n){t.$$.on_destroy.push(s(e,n))}function u(t,e,n,o){if(t){const r=d(t,e,n,o);return t[0](r)}}function d(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function f(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|r[o];return t}return e.dirty|r}return e.dirty}function h(t,e,n,o,r,l){if(r){const i=d(e,n,o,l);t.p(i,r)}}function p(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function m(t,e,n){return t.set(n),e}function $(e){return e&&l(e.destroy)?e.destroy:t}const g="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function v(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function w(t){t.parentNode&&t.parentNode.removeChild(t)}function b(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function k(t){return document.createElement(t)}function x(t){return document.createTextNode(t)}function C(){return x(" ")}function _(){return x("")}function T(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function D(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function E(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e){e=""+e,t.data!==e&&(t.data=e)}function M(t,e,n,o){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function U(t,e){return new t(e)}let L;function H(t){L=t}function B(){if(!L)throw new Error("Function called outside component initialization");return L}function N(t){B().$$.on_mount.push(t)}function F(t){B().$$.after_update.push(t)}function P(){const t=B();return function(e,n){let{cancelable:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.$$.callbacks[e];if(r){const l=function(t,e){let{bubbles:n=!1,cancelable:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new CustomEvent(t,{detail:e,bubbles:n,cancelable:o})}(e,n,{cancelable:o});return r.slice().forEach((e=>{e.call(t,l)})),!l.defaultPrevented}return!0}}function R(t){return B().$$.context.get(t)}function z(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const A=[],I=[];let G=[];const j=[],O=Promise.resolve();let W=!1;function Y(){W||(W=!0,O.then(K))}function q(){return Y(),O}function X(t){G.push(t)}const V=new Set;let J=0;function K(){if(0!==J)return;const t=L;do{try{for(;J<A.length;){const t=A[J];J++,H(t),Q(t.$$)}}catch(t){throw A.length=0,J=0,t}for(H(null),A.length=0,J=0;I.length;)I.pop()();for(let t=0;t<G.length;t+=1){const e=G[t];V.has(e)||(V.add(e),e())}G.length=0}while(A.length);for(;j.length;)j.pop()();W=!1,V.clear(),H(t)}function Q(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(X)}}const Z=new Set;let tt;function et(){tt={r:0,c:[],p:tt}}function nt(){tt.r||r(tt.c),tt=tt.p}function ot(t,e){t&&t.i&&(Z.delete(t),t.i(e))}function rt(t,e,n,o){if(t&&t.o){if(Z.has(t))return;Z.add(t),tt.c.push((()=>{Z.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}else o&&o()}function lt(t){return void 0!==t?.length?t:Array.from(t)}function it(t,e){rt(t,1,1,(()=>{e.delete(t.key)}))}function st(t,e,n,o,l,i,s,c,a,u,d,f){let h=t.length,p=i.length,m=h;const $={};for(;m--;)$[t[m].key]=m;const g=[],v=new Map,y=new Map,w=[];for(m=p;m--;){const t=f(l,i,m),r=n(t);let c=s.get(r);c?o&&w.push((()=>c.p(t,e))):(c=u(r,t),c.c()),v.set(r,g[m]=c),r in $&&y.set(r,Math.abs(m-$[r]))}const b=new Set,k=new Set;function x(t){ot(t,1),t.m(c,d),s.set(t.key,t),d=t.first,p--}for(;h&&p;){const e=g[p-1],n=t[h-1],o=e.key,r=n.key;e===n?(d=e.first,h--,p--):v.has(r)?!s.has(o)||b.has(o)?x(e):k.has(r)?h--:y.get(o)>y.get(r)?(k.add(o),x(e)):(b.add(r),h--):(a(n,s),h--)}for(;h--;){const e=t[h];v.has(e.key)||a(e,s)}for(;p;)x(g[p-1]);return r(w),g}function ct(t){t&&t.c()}function at(t,e,o){const{fragment:i,after_update:s}=t.$$;i&&i.m(e,o),X((()=>{const e=t.$$.on_mount.map(n).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):r(e),t.$$.on_mount=[]})),s.forEach(X)}function ut(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];G.forEach((o=>-1===t.indexOf(o)?e.push(o):n.push(o))),n.forEach((t=>t())),G=e}(n.after_update),r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function dt(e,n,l,i,s,c){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1];const d=L;H(e);const f=e.$$={fragment:null,ctx:[],props:c,update:t,not_equal:s,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:o(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};a&&a(f.root);let h=!1;if(f.ctx=l?l(e,n.props||{},(function(t,n){const o=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return f.ctx&&s(f.ctx[t],f.ctx[t]=o)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](o),h&&function(t,e){-1===t.$$.dirty[0]&&(A.push(t),Y(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(e,t)),n})):[],f.update(),h=!0,r(f.before_update),f.fragment=!!i&&i(f.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);f.fragment&&f.fragment.l(t),t.forEach(w)}else f.fragment&&f.fragment.c();n.intro&&ot(e.$$.fragment),at(e,n.target,n.anchor),K()}H(d)}class ft{$$=void 0;$$set=void 0;$destroy(){ut(this,1),this.$destroy=t}$on(e,n){if(!l(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ht=[];function pt(t,e){return{subscribe:mt(t,e).subscribe}}function mt(e){let n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;const r=new Set;function l(t){if(i(e,t)&&(e=t,n)){const t=!ht.length;for(const t of r)t[1](),ht.push(t,e);if(t){for(let t=0;t<ht.length;t+=2)ht[t][0](ht[t+1]);ht.length=0}}}function s(t){l(t(e))}return{set:l,update:s,subscribe:function(i){const c=[i,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t];return r.add(c),1===r.size&&(n=o(l,s)||t),i(e),()=>{r.delete(c),0===r.size&&n&&(n(),n=null)}}}}function $t(e,n,o){const i=!Array.isArray(e),c=i?[e]:e;if(!c.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=n.length<2;return pt(o,((e,o)=>{let u=!1;const d=[];let f=0,h=t;const p=()=>{if(f)return;h();const r=n(i?d[0]:d,e,o);a?e(r):h=l(r)?r:t},m=c.map(((t,e)=>s(t,(t=>{d[e]=t,f&=~(1<<e),u&&p()}),(()=>{f|=1<<e}))));return u=!0,p(),function(){r(m),h(),u=!1}}))}function gt(t){return function(e){return"Enter"===e.key||" "===e.key&&!e.preventDefault()?t.call(this,e):void 0}}function vt(t,e){let n={update(e){"string"==typeof e?t.innerText=e:e?.domNodes?t.replaceChildren(...e.domNodes):e?.html&&(t.innerHTML=e.html)}};return n.update(e),n}function yt(t,e){const n=n=>{t&&!t.contains(n.target)&&t.dispatchEvent(new CustomEvent(e+"outside",{detail:{jsEvent:n}}))};return document.addEventListener(e,n,!0),{destroy(){document.removeEventListener(e,n,!0)}}}const wt=86400;function bt(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return void 0!==t?t instanceof Date?Bt(t):function(t){const e=t.match(/\d+/g);return new Date(Date.UTC(Number(e[0]),Number(e[1])-1,Number(e[2]),Number(e[3]||0),Number(e[4]||0),Number(e[5]||0)))}(t):Bt(new Date)}function kt(t){if("number"==typeof t)t={seconds:t};else if("string"==typeof t){let e=0,n=2;for(let o of t.split(":",3))e+=parseInt(o,10)*Math.pow(60,n--);t={seconds:e}}else t instanceof Date&&(t={hours:t.getUTCHours(),minutes:t.getUTCMinutes(),seconds:t.getUTCSeconds()});let e=t.weeks||t.week||0;return{years:t.years||t.year||0,months:t.months||t.month||0,days:7*e+(t.days||t.day||0),seconds:60*(t.hours||t.hour||0)*60+60*(t.minutes||t.minute||0)+(t.seconds||t.second||0),inWeeks:!!e}}function xt(t){return new Date(t.getTime())}function Ct(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.setUTCFullYear(t.getUTCFullYear()+n*e.years);let o=t.getUTCMonth()+n*e.months;for(t.setUTCMonth(o),o%=12,o<0&&(o+=12);t.getUTCMonth()!==o;)Dt(t);return t.setUTCDate(t.getUTCDate()+n*e.days),t.setUTCSeconds(t.getUTCSeconds()+n*e.seconds),t}function _t(t,e){return Ct(t,e,-(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1))}function Tt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.setUTCDate(t.getUTCDate()+e),t}function Dt(t){return Tt(t,-(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1))}function Et(t){return t.setUTCHours(0,0,0,0),t}function St(t){return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())}function Mt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:19;return t.toISOString().substring(0,e)}function Ut(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return n.every((e=>t.getTime()===e.getTime()))}function Lt(t,e){let n=e-t.getUTCDay();return t.setUTCDate(t.getUTCDate()+(n<=0?n:n-7)),t}function Ht(t){return"string"==typeof t&&t.length<=10}function Bt(t){return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()))}function Nt(t,e,n){n.update((n=>n.set(e,t)))}function Ft(){return Object.assign(...arguments)}function Pt(t){return Object.keys(t)}function Rt(t){return Math.floor(t)}function zt(){return Math.min(...arguments)}function At(){return Math.max(...arguments)}function It(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=document.createElement(t);r.className=e,"string"==typeof n?r.innerText=n:n.domNodes?r.replaceChildren(...n.domNodes):n.html&&(r.innerHTML=n.html);for(let t of o)r.setAttribute(...t);return r}function Gt(t){return t.getBoundingClientRect()}function jt(t,e){for(;e--;)t=t.parentElement;return t}function Ot(t){return Gt(t).height}let Wt=Symbol("ec");function Yt(t,e){t[Wt]=e}function qt(t){return!!t?.[Wt]}function Xt(t){return t[Wt]}function Vt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;for(let o of n.elementsFromPoint(t,e)){if(qt(o))return o;if(o.shadowRoot){let n=Vt(t,e,o.shadowRoot);if(n)return n}}return null}function Jt(t){return(t=Ft({},t)).currentStart=St(t.currentStart),t.currentEnd=St(t.currentEnd),t.activeStart=St(t.activeStart),t.activeEnd=St(t.activeEnd),t}function Kt(t){return t.startsWith("list")}let Qt=1;function Zt(t){return t.map((t=>({id:"id"in t?String(t.id):`{generated-${Qt++}}`,resourceIds:Array.isArray(t.resourceIds)?t.resourceIds.map(String):"resourceId"in t?[String(t.resourceId)]:[],allDay:t.allDay??(Ht(t.start)&&Ht(t.end)),start:bt(t.start),end:bt(t.end),title:t.title||"",titleHTML:t.titleHTML||"",editable:t.editable,startEditable:t.startEditable,durationEditable:t.durationEditable,display:t.display||"auto",extendedProps:t.extendedProps||{},backgroundColor:t.backgroundColor||t.color,textColor:t.textColor})))}function te(t){return t.map((t=>({events:t.events,url:t.url&&t.url.trimEnd("&")||"",method:t.method&&t.method.toUpperCase()||"GET",extraParams:t.extraParams||{}})))}function ee(t,e,n){return{start:t.start>e?t.start:e,end:t.end<n?t.end:n,event:t}}function ne(t){t.sort(((t,e)=>t.start-e.start||e.event.allDay-t.event.allDay))}function oe(t,e){let n={};if(t.length){let o;ne(t);for(let r of t){let t=[],l=Et(xt(r.start));for(;r.end>l;){if(!e.includes(l.getUTCDay())&&(t.push(xt(l)),t.length>1)){let t=l.getTime();n[t]?n[t].chunks.push(r):n[t]={sorted:!1,chunks:[r]}}Tt(l)}t.length?(r.date=t[0],r.days=t.length,r.dates=t,r.start<t[0]&&(r.start=t[0]),Et(xt(r.end))>t[t.length-1]&&(r.end=t[t.length-1])):(r.date=Et(xt(r.start)),r.days=1,r.dates=[r.date]),o&&Ut(o.date,r.date)&&(r.prev=o),o=r}}return n}function re(t,e,n){t.top=0,t.prev&&(t.top=t.prev.bottom+1),t.bottom=t.top+n;let o=1,r=t.date.getTime();if(e[r]?.sorted||e[r]?.chunks.every((t=>"top"in t))){e[r].sorted||(e[r].chunks.sort(((t,e)=>t.top-e.top)),e[r].sorted=!0);for(let n of e[r].chunks)if(t.top<n.bottom&&t.bottom>n.top){let e=n.bottom-t.top+1;o+=e,t.top+=e,t.bottom+=e}}return o}function le(t,e,n,o,r,i){let s=r.formatRange(t.start,e&&"pointer"!==t.event.display?(c=xt(t.start),a=t.end,c.setUTCHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),0),c):t.start);var c,a;let u;if(n)u=l(n)?n({event:ce(t.event),timeText:s,view:Jt(i)}):n;else{let e;switch(t.event.display){case"background":e=[];break;case"pointer":e=[ie(s,t,o)];break;default:e=[...t.event.allDay?[]:[ie(s,t,o)],It("h4",o.eventTitle,t.event.title)]}u={domNodes:e}}return[s,u]}function ie(t,e,n){return It("time",n.eventTime,t,[["datetime",Mt(e.start)]])}function se(t,e,n){return t?(l(t)&&(t=t({event:ce(e),view:Jt(n)})),Array.isArray(t)?t:[t]):[]}function ce(t){return ue(t,St)}function ae(t){return ue(t,xt)}function ue(t,e){return(t=Ft({},t)).start=e(t.start),t.end=e(t.end),t}function de(t,e,n,o,r){return(t.start<n&&t.end>e||!r&&Ut(t.start,t.end,e))&&(void 0===o||t.resourceIds.includes(o.id))}function fe(t){return pe(t)||me(t)||function(t){return"pointer"===t}(t)}function he(t){return"background"===t}function pe(t){return"preview"===t}function me(t){return"ghost"===t}function $e(t){return we(t,"day")}function ge(t){return we(t,"week")}function ve(t){return we(t,"month")}function ye(t){return we(t,"year")}function we(t,e){return{...t,next:"Next "+e,prev:"Previous "+e}}function be(t){return e=>({...e,view:t})}function ke(t,e){return $t([t,e],(t=>{let[e,n]=t,o=l(n)?{format:n}:new Intl.DateTimeFormat(e,n);return{format:t=>o.format(St(t))}}))}function xe(t,e){return $t([t,e],(t=>{let[e,n]=t,o=l(n)?{formatRange:n}:new Intl.DateTimeFormat(e,n);return{formatRange:(t,e)=>o.formatRange(St(t),St(e))}}))}class Ce{constructor(n,o){let r=function(t){let e={allDayContent:void 0,allDaySlot:!0,buttonText:{today:"today"},date:new Date,datesSet:void 0,dayHeaderFormat:{weekday:"short",month:"numeric",day:"numeric"},dayHeaderAriaLabelFormat:{dateStyle:"long"},displayEventEnd:!0,duration:{weeks:1},events:[],eventBackgroundColor:void 0,eventTextColor:void 0,eventClassNames:void 0,eventClick:void 0,eventColor:void 0,eventContent:void 0,eventDidMount:void 0,eventMouseEnter:void 0,eventMouseLeave:void 0,eventSources:[],eventTimeFormat:{hour:"numeric",minute:"2-digit"},firstDay:0,flexibleSlotTimeLimits:!1,headerToolbar:{start:"title",center:"",end:"today prev,next"},height:void 0,hiddenDays:[],highlightedDates:[],lazyFetching:!0,loading:void 0,locale:void 0,nowIndicator:!1,selectable:!1,scrollTime:"06:00:00",slotDuration:"00:30:00",slotEventOverlap:!0,slotHeight:24,slotLabelFormat:{hour:"numeric",minute:"2-digit"},slotMaxTime:"24:00:00",slotMinTime:"00:00:00",theme:{allDay:"ec-all-day",active:"ec-active",bgEvent:"ec-bg-event",bgEvents:"ec-bg-events",body:"ec-body",button:"ec-button",buttonGroup:"ec-button-group",calendar:"ec",compact:"ec-compact",content:"ec-content",day:"ec-day",dayHead:"ec-day-head",days:"ec-days",event:"ec-event",eventBody:"ec-event-body",eventTime:"ec-event-time",eventTitle:"ec-event-title",events:"ec-events",extra:"ec-extra",handle:"ec-handle",header:"ec-header",hiddenScroll:"ec-hidden-scroll",highlight:"ec-highlight",icon:"ec-icon",line:"ec-line",lines:"ec-lines",nowIndicator:"ec-now-indicator",otherMonth:"ec-other-month",sidebar:"ec-sidebar",sidebarTitle:"ec-sidebar-title",today:"ec-today",time:"ec-time",title:"ec-title",toolbar:"ec-toolbar",view:"",weekdays:["ec-sun","ec-mon","ec-tue","ec-wed","ec-thu","ec-fri","ec-sat"],withScroll:"ec-with-scroll"},titleFormat:{year:"numeric",month:"short",day:"numeric"},view:void 0,viewDidMount:void 0,views:{}};for(let n of t)n.createOptions?.(e);return e}(n=n||[]),i=function(t){let e={date:t=>Et(bt(t)),duration:kt,events:Zt,eventSources:te,hiddenDays:t=>[...new Set(t)],highlightedDates:t=>t.map(bt),scrollTime:kt,slotDuration:kt,slotMaxTime:kt,slotMinTime:kt};for(let n of t)n.createParsers?.(e);return e}(n);r=_e(r,i),o=_e(o,i);for(let[t,e]of Object.entries(r))this[t]=mt(e);this._queue=mt(new Map),this._auxiliary=mt([]),this._dayGrid=$t(this.view,(t=>t?.startsWith("dayGrid"))),this._currentRange=function(t){return $t([t.date,t.duration,t.firstDay,t._dayGrid],(t=>{let e,[n,o,r,l]=t,i=xt(n);return l?i.setUTCDate(1):o.inWeeks&&Lt(i,r),e=Ct(xt(i),o),{start:i,end:e}}))}(this),this._activeRange=function(t){return $t([t._currentRange,t.firstDay,t.slotMaxTime,t._dayGrid],(t=>{let[e,n,o,r]=t,l=xt(e.start),i=xt(e.end);if(r)Lt(l,n),function(t,e){let n=e-t.getUTCDay();t.setUTCDate(t.getUTCDate()+(n>=0?n:n+7))}(i,n);else if(o.days||o.seconds>wt){Ct(Dt(i),o);let t=Dt(xt(i));t<l&&(l=t)}return{start:l,end:i}}))}(this),this._fetchedRange=mt({start:void 0,end:void 0}),this._events=function(t){let e,n=mt([]),o=0,r={};return $t([t.events,t.eventSources,t._activeRange,t._fetchedRange,t.lazyFetching,t.loading],((n,i)=>Nt((()=>{let[t,r,s,c,a,u]=n;if(r.length){if(!c.start||c.start>s.start||c.end<s.end||!a){e&&e.abort(),e=new AbortController,l(u)&&!o&&u(!0);let t=()=>{0==--o&&l(u)&&u(!1)},n=[],a=e=>t(),d=e=>{n=n.concat(Zt(e)),i(n),t()},f=Mt(s.start),h=Mt(s.end);for(let t of r){if(l(t.events)){let e=t.events({start:St(s.start),end:St(s.end),startStr:f,endStr:h},d,a);void 0!==e&&Promise.resolve(e).then(d,a)}else{let n=l(t.extraParams)?t.extraParams():Ft({},t.extraParams);n.start=f,n.end=h,n=new URLSearchParams(n);let o,r=t.url,i={};["GET","HEAD"].includes(t.method)?r+=(r.includes("?")?"&":"?")+n:(i["content-type"]="application/x-www-form-urlencoded;charset=UTF-8",o=String(n)),fetch(r,{method:t.method,headers:i,body:o,signal:e.signal,credentials:"same-origin"}).then((t=>t.json())).then(d).catch(a)}++o}c.start=s.start,c.end=s.end}}else i(t)}),r,t._queue)),[]).subscribe(n.set),n}(this),this._now=pt(bt(),(t=>{let e=setInterval((()=>{t(bt())}),1e3);return()=>clearInterval(e)})),this._today=function(t){return $t(t._now,(t=>Et(xt(t))))}(this),this._intlEventTime=xe(this.locale,this.eventTimeFormat),this._intlSlotLabel=ke(this.locale,this.slotLabelFormat),this._intlDayHeader=ke(this.locale,this.dayHeaderFormat),this._intlDayHeaderAL=ke(this.locale,this.dayHeaderAriaLabelFormat),this._intlTitle=xe(this.locale,this.titleFormat),this._bodyEl=mt(void 0),this._scrollable=mt(!1),this._viewTitle=function(t){return $t([t.date,t._activeRange,t._intlTitle,t._dayGrid],(t=>{let[e,n,o,r]=t;return r?o.formatRange(e,e):o.formatRange(n.start,Dt(xt(n.end)))}))}(this),this._viewDates=function(t){return $t([t._activeRange,t.hiddenDays],(e=>{let[n,o]=e,r=[],l=Et(xt(n.start)),i=Et(xt(n.end));for(;l<i;)o.includes(l.getUTCDay())||r.push(xt(l)),Tt(l);return!r.length&&o.length&&o.length<7&&(t.date.update((t=>{for(;o.includes(t.getUTCDay());)Tt(t);return t})),r=c(t._viewDates)),r}))}(this),this._view=function(t){return $t([t.view,t._viewTitle,t._currentRange,t._activeRange],(t=>function(t,e,n,o){return{type:t,title:e,currentStart:n.start,currentEnd:n.end,activeStart:o.start,activeEnd:o.end,calendar:void 0}}(...t)))}(this),this._viewComponent=mt(void 0),this._resBgColor=mt(t),this._resTxtColor=mt(t),this._interaction=mt({}),this._iEvents=mt([null,null]),this._iClasses=mt(e),this._iClass=mt(void 0),this._set=(t,e)=>{Ee(t,this)&&(i[t]&&(e=i[t](e)),this[t].set(e))},this._get=t=>Ee(t,this)?c(this[t]):void 0;for(let t of n)t.createStores?.(this);o.view&&this.view.set(o.view);let s=new Set([...Pt(r.views),...Pt(o.views??{})]);for(let t of s){let e=Te(r,r.views[t]??{}),n=Te(e,o,o.views?.[t]??{}),i=n.component;De(n,this);for(let t of Pt(n)){let{set:o,_set:r=o,...i}=this[t];this[t]={set:["buttonText","theme"].includes(t)?i=>{if(l(i)){let l=i(e[t]);n[t]=l,o(o===r?l:i)}else n[t]=i,o(i)}:e=>{n[t]=e,o(e)},_set:r,...i}}this.view.subscribe((e=>{if(e===t){this._viewComponent.set(i),l(n.viewDidMount)&&q().then((()=>n.viewDidMount(c(this._view))));for(let t of Pt(n))this[t]._set(n[t])}}))}}}function _e(t,e){let n={...t};for(let t of Pt(e))t in n&&(n[t]=e[t](n[t]));if(t.views){n.views={};for(let o of Pt(t.views))n.views[o]=_e(t.views[o],e)}return n}function Te(){let t={};for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];for(let e of n){let n={};for(let o of["buttonText","theme"])l(e[o])&&(n[o]=e[o](t[o]));t={...t,...e,...n}}return t}function De(t,e){Pt(t).filter((t=>!Ee(t,e)||"view"==t)).forEach((e=>delete t[e]))}function Ee(t,e){return e.hasOwnProperty(t)&&"_"!==t[0]}function Se(t,e,n){const o=t.slice();return o[23]=e[n],o}function Me(t){let e,n,o,r,l,i=t[5][t[23]]+"";function s(){return t[20](t[23])}return{c(){e=k("button"),n=x(i),E(e,"class",o=t[3].button+(t[6]===t[23]?" "+t[3].active:"")+" ec-"+t[23])},m(t,o){y(t,e,o),v(e,n),r||(l=T(e,"click",s),r=!0)},p(r,l){t=r,33&l&&i!==(i=t[5][t[23]]+"")&&S(n,i),73&l&&o!==(o=t[3].button+(t[6]===t[23]?" "+t[3].active:"")+" ec-"+t[23])&&E(e,"class",o)},d(t){t&&w(e),r=!1,l()}}}function Ue(t){let e,n,o,r,l,i=t[5][t[23]]+"";return{c(){e=k("button"),n=x(i),E(e,"class",o=t[3].button+" ec-"+t[23]),e.disabled=t[1]},m(o,i){y(o,e,i),v(e,n),r||(l=T(e,"click",t[19]),r=!0)},p(t,r){33&r&&i!==(i=t[5][t[23]]+"")&&S(n,i),9&r&&o!==(o=t[3].button+" ec-"+t[23])&&E(e,"class",o),2&r&&(e.disabled=t[1])},d(t){t&&w(e),r=!1,l()}}}function Le(t){let e,n,o,r,l,i,s,c;return{c(){e=k("button"),n=k("i"),E(n,"class",o=t[3].icon+" ec-"+t[23]),E(e,"class",r=t[3].button+" ec-"+t[23]),E(e,"aria-label",l=t[5].next),E(e,"title",i=t[5].next)},m(o,r){y(o,e,r),v(e,n),s||(c=T(e,"click",t[17]),s=!0)},p(t,s){9&s&&o!==(o=t[3].icon+" ec-"+t[23])&&E(n,"class",o),9&s&&r!==(r=t[3].button+" ec-"+t[23])&&E(e,"class",r),32&s&&l!==(l=t[5].next)&&E(e,"aria-label",l),32&s&&i!==(i=t[5].next)&&E(e,"title",i)},d(t){t&&w(e),s=!1,c()}}}function He(t){let e,n,o,r,l,i,s,c;return{c(){e=k("button"),n=k("i"),E(n,"class",o=t[3].icon+" ec-"+t[23]),E(e,"class",r=t[3].button+" ec-"+t[23]),E(e,"aria-label",l=t[5].prev),E(e,"title",i=t[5].prev)},m(o,r){y(o,e,r),v(e,n),s||(c=T(e,"click",t[16]),s=!0)},p(t,s){9&s&&o!==(o=t[3].icon+" ec-"+t[23])&&E(n,"class",o),9&s&&r!==(r=t[3].button+" ec-"+t[23])&&E(e,"class",r),32&s&&l!==(l=t[5].prev)&&E(e,"aria-label",l),32&s&&i!==(i=t[5].prev)&&E(e,"title",i)},d(t){t&&w(e),s=!1,c()}}}function Be(t){let e,n,o,r,i;return{c(){e=k("h2"),E(e,"class",n=t[3].title)},m(n,l){y(n,e,l),r||(i=$(o=vt.call(null,e,t[4])),r=!0)},p(t,r){8&r&&n!==(n=t[3].title)&&E(e,"class",n),o&&l(o.update)&&16&r&&o.update.call(null,t[4])},d(t){t&&w(e),r=!1,i()}}}function Ne(t){let e;function n(t,e){return"title"==t[23]?Be:"prev"==t[23]?He:"next"==t[23]?Le:"today"==t[23]?Ue:""!=t[23]?Me:void 0}let o=n(t),r=o&&o(t);return{c(){r&&r.c(),e=_()},m(t,n){r&&r.m(t,n),y(t,e,n)},p(t,l){o===(o=n(t))&&r?r.p(t,l):(r&&r.d(1),r=o&&o(t),r&&(r.c(),r.m(e.parentNode,e)))},d(t){t&&w(e),r&&r.d(t)}}}function Fe(e){let n,o=lt(e[0]),r=[];for(let t=0;t<o.length;t+=1)r[t]=Ne(Se(e,o,t));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();n=_()},m(t,e){for(let n=0;n<r.length;n+=1)r[n]&&r[n].m(t,e);y(t,n,e)},p(t,e){let[l]=e;if(229503&l){let e;for(o=lt(t[0]),e=0;e<o.length;e+=1){const i=Se(t,o,e);r[e]?r[e].p(i,l):(r[e]=Ne(i),r[e].c(),r[e].m(n.parentNode,n))}for(;e<r.length;e+=1)r[e].d(1);r.length=o.length}},i:t,o:t,d(t){t&&w(n),b(r,t)}}}function Pe(t,e,n){let o,r,l,i,s,c,u,d,{buttons:f}=e,{_currentRange:h,_viewTitle:p,buttonText:$,date:g,duration:v,hiddenDays:y,theme:w,view:b}=R("state");a(t,h,(t=>n(18,i=t))),a(t,p,(t=>n(4,c=t))),a(t,$,(t=>n(5,u=t))),a(t,g,(t=>n(2,r=t))),a(t,v,(t=>n(21,o=t))),a(t,y,(t=>n(22,l=t))),a(t,w,(t=>n(3,s=t))),a(t,b,(t=>n(6,d=t)));let k,x=Et(bt());return t.$$set=t=>{"buttons"in t&&n(0,f=t.buttons)},t.$$.update=()=>{262144&t.$$.dirty&&n(1,k=x>=i.start&&x<i.end||null)},[f,k,r,s,c,u,d,h,p,$,g,v,y,w,b,x,function(){let t=_t(r,o);if(l.length&&l.length<7)for(;l.includes(t.getUTCDay());)Dt(t);m(g,r=t,r)},function(){m(g,r=Ct(r,o),r)},i,()=>m(g,r=xt(x),r),t=>m(b,d=t,d)]}class Re extends ft{constructor(t){super(),dt(this,t,Pe,Fe,i,{buttons:0})}}function ze(t,e,n){const o=t.slice();return o[5]=e[n],o}function Ae(t,e,n){const o=t.slice();return o[8]=e[n],o}function Ie(t){let e,n;return e=new Re({props:{buttons:t[8]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.buttons=t[8]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Ge(t){let e,n,o,r;return n=new Re({props:{buttons:t[8]}}),{c(){e=k("div"),ct(n.$$.fragment),E(e,"class",o=t[1].buttonGroup)},m(t,o){y(t,e,o),at(n,e,null),r=!0},p(t,l){const i={};1&l&&(i.buttons=t[8]),n.$set(i),(!r||2&l&&o!==(o=t[1].buttonGroup))&&E(e,"class",o)},i(t){r||(ot(n.$$.fragment,t),r=!0)},o(t){rt(n.$$.fragment,t),r=!1},d(t){t&&w(e),ut(n)}}}function je(t){let e,n,o,r;const l=[Ge,Ie],i=[];function s(t,e){return t[8].length>1?0:1}return e=s(t),n=i[e]=l[e](t),{c(){n.c(),o=_()},m(t,n){i[e].m(t,n),y(t,o,n),r=!0},p(t,r){let c=e;e=s(t),e===c?i[e].p(t,r):(et(),rt(i[c],1,1,(()=>{i[c]=null})),nt(),n=i[e],n?n.p(t,r):(n=i[e]=l[e](t),n.c()),ot(n,1),n.m(o.parentNode,o))},i(t){r||(ot(n),r=!0)},o(t){rt(n),r=!1},d(t){t&&w(o),i[e].d(t)}}}function Oe(t){let e,n,o,r=lt(t[0][t[5]]),l=[];for(let e=0;e<r.length;e+=1)l[e]=je(Ae(t,r,e));const i=t=>rt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=k("div");for(let t=0;t<l.length;t+=1)l[t].c();n=C()},m(t,r){y(t,e,r);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);v(e,n),o=!0},p(t,o){if(3&o){let s;for(r=lt(t[0][t[5]]),s=0;s<r.length;s+=1){const i=Ae(t,r,s);l[s]?(l[s].p(i,o),ot(l[s],1)):(l[s]=je(i),l[s].c(),ot(l[s],1),l[s].m(e,n))}for(et(),s=r.length;s<l.length;s+=1)i(s);nt()}},i(t){if(!o){for(let t=0;t<r.length;t+=1)ot(l[t]);o=!0}},o(t){l=l.filter(Boolean);for(let t=0;t<l.length;t+=1)rt(l[t]);o=!1},d(t){t&&w(e),b(l,t)}}}function We(t){let e,n,o,r=lt(Object.keys(t[0])),l=[];for(let e=0;e<r.length;e+=1)l[e]=Oe(ze(t,r,e));const i=t=>rt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=k("nav");for(let t=0;t<l.length;t+=1)l[t].c();E(e,"class",n=t[1].toolbar)},m(t,n){y(t,e,n);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);o=!0},p(t,s){let[c]=s;if(3&c){let n;for(r=lt(Object.keys(t[0])),n=0;n<r.length;n+=1){const o=ze(t,r,n);l[n]?(l[n].p(o,c),ot(l[n],1)):(l[n]=Oe(o),l[n].c(),ot(l[n],1),l[n].m(e,null))}for(et(),n=r.length;n<l.length;n+=1)i(n);nt()}(!o||2&c&&n!==(n=t[1].toolbar))&&E(e,"class",n)},i(t){if(!o){for(let t=0;t<r.length;t+=1)ot(l[t]);o=!0}},o(t){l=l.filter(Boolean);for(let t=0;t<l.length;t+=1)rt(l[t]);o=!1},d(t){t&&w(e),b(l,t)}}}function Ye(t,e,n){let o,r,{headerToolbar:l,theme:i}=R("state");a(t,l,(t=>n(4,o=t))),a(t,i,(t=>n(1,r=t)));let s={start:[],center:[],end:[]};return t.$$.update=()=>{if(17&t.$$.dirty)for(let t of Object.keys(s))n(0,s[t]=o[t].split(" ").map((t=>t.split(","))),s)},[s,r,l,i,o]}class qe extends ft{constructor(t){super(),dt(this,t,Ye,We,i,{})}}function Xe(t,e,n){const o=t.slice();return o[11]=e[n],o}function Ve(t){let e,n,o;var r=t[11];return r&&(e=U(r,{})),{c(){e&&ct(e.$$.fragment),n=_()},m(t,r){e&&at(e,t,r),y(t,n,r),o=!0},p(t,o){if(1&o&&r!==(r=t[11])){if(e){et();const t=e;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}r?(e=U(r,{}),ct(e.$$.fragment),ot(e.$$.fragment,1),at(e,n.parentNode,n)):e=null}},i(t){o||(e&&ot(e.$$.fragment,t),o=!0)},o(t){e&&rt(e.$$.fragment,t),o=!1},d(t){t&&w(n),e&&ut(e,t)}}}function Je(t){let e,n,o=lt(t[0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Ve(Xe(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){let[i]=n;if(1&i){let n;for(o=lt(t[0]),n=0;n<o.length;n+=1){const l=Xe(t,o,n);r[n]?(r[n].p(l,i),ot(r[n],1)):(r[n]=Ve(l),r[n].c(),ot(r[n],1),r[n].m(e.parentNode,e))}for(et(),n=o.length;n<r.length;n+=1)l(n);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Ke(t,e,n){let o,r,i,s,{datesSet:c,_auxiliary:u,_activeRange:d,_queue:f,_view:h}=R("state");a(t,c,(t=>n(7,r=t))),a(t,u,(t=>n(0,s=t))),a(t,d,(t=>n(5,i=t))),a(t,h,(t=>n(6,o=t)));let p={};return t.$$.update=()=>{32&t.$$.dirty&&function(t){l(r)&&Nt((()=>r({start:St(t.start),end:St(t.end),startStr:Mt(t.start),endStr:Mt(t.end),view:Jt(o)})),p,f)}(i)},[s,c,u,d,h,i]}let Qe=class extends ft{constructor(t){super(),dt(this,t,Ke,Je,i,{})}};function Ze(t){let e,n,o,r,l,i,s,c,a,u,d;n=new qe({});var f=t[5];return f&&(r=U(f,{})),c=new Qe({}),{c(){e=k("div"),ct(n.$$.fragment),o=C(),r&&ct(r.$$.fragment),s=C(),ct(c.$$.fragment),E(e,"class",l=t[1].calendar+" "+t[1].view+(t[0]?" "+t[1].withScroll:"")+(t[2]?" "+t[1][t[2]]:"")),E(e,"role",i=Kt(t[4])?"list":"table"),M(e,"height",t[3])},m(l,i){y(l,e,i),at(n,e,null),v(e,o),r&&at(r,e,null),y(l,s,i),at(c,l,i),a=!0,u||(d=T(window,"resize",t[16]),u=!0)},p(t,n){if(32&n[0]&&f!==(f=t[5])){if(r){et();const t=r;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}f?(r=U(f,{}),ct(r.$$.fragment),ot(r.$$.fragment,1),at(r,e,null)):r=null}(!a||7&n[0]&&l!==(l=t[1].calendar+" "+t[1].view+(t[0]?" "+t[1].withScroll:"")+(t[2]?" "+t[1][t[2]]:"")))&&E(e,"class",l),(!a||16&n[0]&&i!==(i=Kt(t[4])?"list":"table"))&&E(e,"role",i),8&n[0]&&M(e,"height",t[3])},i(t){a||(ot(n.$$.fragment,t),r&&ot(r.$$.fragment,t),ot(c.$$.fragment,t),a=!0)},o(t){rt(n.$$.fragment,t),r&&rt(r.$$.fragment,t),rt(c.$$.fragment,t),a=!1},d(t){t&&(w(e),w(s)),ut(n),r&&ut(r),ut(c,t),u=!1,d()}}}function tn(t,e,n){let o,l,i,s,u,d,f,h,p,$,{plugins:g=[]}=e,{options:v={}}=e,y=B(),w=new Ce(g,v);var b,k;b="state",k=w,B().$$.context.set(b,k);let{_viewComponent:x,_bodyEl:C,_interaction:_,_iClass:T,_events:D,_queue:E,_scrollable:S,height:M,theme:U,view:L}=w;a(t,x,(t=>n(5,$=t))),a(t,C,(t=>n(31,o=t))),a(t,_,(t=>n(33,s=t))),a(t,T,(t=>n(2,f=t))),a(t,D,(t=>n(34,u=t))),a(t,E,(t=>n(32,i=t))),a(t,S,(t=>n(0,l=t))),a(t,M,(t=>n(3,h=t))),a(t,U,(t=>n(1,d=t))),a(t,L,(t=>n(4,p=t)));let H={...v};function N(t,e){return w._set(t,e),this}var F;function P(){var t;o&&m(S,l=(t=o).scrollHeight>t.clientHeight,l)}return F=()=>{var t;r(t=i),t.clear(),setTimeout(P)},B().$$.before_update.push(F),t.$$set=t=>{"plugins"in t&&n(17,g=t.plugins),"options"in t&&n(18,v=t.options)},t.$$.update=()=>{if(262144&t.$$.dirty[0])for(let[t,e]of function(t,e){let n=[];for(let o of Pt(t))t[o]!==e[o]&&n.push([o,t[o]]);return Ft(e,t),n}(v,H))N(t,e)},[l,d,f,h,p,$,x,C,_,T,D,E,S,M,U,L,P,g,v,N,function(t){let e=w._get(t);return e instanceof Date?St(e):e},function(){return w._fetchedRange.set({start:void 0,end:void 0}),this},function(){return u.map(ce)},function(t){for(let e of u)if(e.id==t)return ce(e);return null},function(t){return u.push(Zt([t])[0]),D.set(u),this},function(t){for(let e of u)if(e.id==t.id){Ft(e,Zt([t])[0]),D.set(u);break}return this},function(t){let e=u.findIndex((e=>e.id==t));return e>=0&&(u.splice(e,1),D.set(u)),this},function(){return Jt(c(w._view))},function(){return s.action&&s.action.unselect(),this},function(t,e){let n=Vt(t,e);return n?Xt(n)(e):null},function(){ut(y,!0)}]}class en extends ft{constructor(t){super(),dt(this,t,tn,Ze,i,{plugins:17,options:18,setOption:19,getOption:20,refetchEvents:21,getEvents:22,getEventById:23,addEvent:24,updateEvent:25,removeEventById:26,getView:27,unselect:28,dateFromPoint:29,destroy:30},null,[-1,-1])}get setOption(){return this.$$.ctx[19]}get getOption(){return this.$$.ctx[20]}get refetchEvents(){return this.$$.ctx[21]}get getEvents(){return this.$$.ctx[22]}get getEventById(){return this.$$.ctx[23]}get addEvent(){return this.$$.ctx[24]}get updateEvent(){return this.$$.ctx[25]}get removeEventById(){return this.$$.ctx[26]}get getView(){return this.$$.ctx[27]}get unselect(){return this.$$.ctx[28]}get dateFromPoint(){return this.$$.ctx[29]}get destroy(){return this.$$.ctx[30]}}function nn(t,e,n){const o=t.slice();return o[8]=e[n],o}function on(t){let e,n,o,r,i,s,c,a;return{c(){e=k("div"),n=k("span"),i=C(),E(n,"aria-label",o=t[2].format(t[8])),E(e,"class",s=t[0].day+" "+t[0].weekdays?.[t[8].getUTCDay()]),E(e,"role","columnheader")},m(o,l){y(o,e,l),v(e,n),v(e,i),c||(a=$(r=vt.call(null,n,t[3].format(t[8]))),c=!0)},p(i,c){t=i,6&c&&o!==(o=t[2].format(t[8]))&&E(n,"aria-label",o),r&&l(r.update)&&10&c&&r.update.call(null,t[3].format(t[8])),3&c&&s!==(s=t[0].day+" "+t[0].weekdays?.[t[8].getUTCDay()])&&E(e,"class",s)},d(t){t&&w(e),c=!1,a()}}}function rn(e){let n,o,r,l,i,s,c,a=lt(e[1]),u=[];for(let t=0;t<a.length;t+=1)u[t]=on(nn(e,a,t));return{c(){n=k("div"),o=k("div");for(let t=0;t<u.length;t+=1)u[t].c();l=C(),i=k("div"),E(o,"class",r=e[0].days),E(o,"role","row"),E(i,"class",s=e[0].hiddenScroll),E(n,"class",c=e[0].header)},m(t,e){y(t,n,e),v(n,o);for(let t=0;t<u.length;t+=1)u[t]&&u[t].m(o,null);v(n,l),v(n,i)},p(t,e){let[l]=e;if(15&l){let e;for(a=lt(t[1]),e=0;e<a.length;e+=1){const n=nn(t,a,e);u[e]?u[e].p(n,l):(u[e]=on(n),u[e].c(),u[e].m(o,null))}for(;e<u.length;e+=1)u[e].d(1);u.length=a.length}1&l&&r!==(r=t[0].days)&&E(o,"class",r),1&l&&s!==(s=t[0].hiddenScroll)&&E(i,"class",s),1&l&&c!==(c=t[0].header)&&E(n,"class",c)},i:t,o:t,d(t){t&&w(n),b(u,t)}}}function ln(t,e,n){let o,r,l,i,{theme:s,_intlDayHeader:c,_intlDayHeaderAL:u,_days:d}=R("state");return a(t,s,(t=>n(0,o=t))),a(t,c,(t=>n(3,i=t))),a(t,u,(t=>n(2,l=t))),a(t,d,(t=>n(1,r=t))),[o,r,l,i,s,c,u,d]}class sn extends ft{constructor(t){super(),dt(this,t,ln,rn,i,{})}}function cn(t){let e,n,o,r,l;const i=t[7].default,s=u(i,t,t[6],null);return{c(){e=k("div"),n=k("div"),s&&s.c(),E(n,"class",o=t[0].content),E(e,"class",r=t[0].body+(!0===t[1]?" "+t[0].uniform:""))},m(o,r){y(o,e,r),v(e,n),s&&s.m(n,null),t[8](e),l=!0},p(t,c){let[a]=c;s&&s.p&&(!l||64&a)&&h(s,i,t,t[6],l?f(i,t[6],a,null):p(t[6]),null),(!l||1&a&&o!==(o=t[0].content))&&E(n,"class",o),(!l||3&a&&r!==(r=t[0].body+(!0===t[1]?" "+t[0].uniform:"")))&&E(e,"class",r)},i(t){l||(ot(s,t),l=!0)},o(t){rt(s,t),l=!1},d(n){n&&w(e),s&&s.d(n),t[8](null)}}}function an(t,e,n){let o,r,l,{$$slots:i={},$$scope:s}=e,{dayMaxEvents:c,_bodyEl:u,theme:d}=R("state");return a(t,c,(t=>n(1,r=t))),a(t,u,(t=>n(2,l=t))),a(t,d,(t=>n(0,o=t))),t.$$set=t=>{"$$scope"in t&&n(6,s=t.$$scope)},[o,r,l,c,u,d,s,i,function(t){I[t?"unshift":"push"]((()=>{l=t,u.set(l)}))}]}let un=class extends ft{constructor(t){super(),dt(this,t,an,cn,i,{})}};function dn(t){let e,n,o,i,s,c,a,u,d,f,h;var p=t[8].resizer;function m(t,e){return{props:{event:t[0]}}}return p&&(c=U(p,m(t)),c.$on("pointerdown",(function(){l(t[32](t[8],!0))&&t[32](t[8],!0).apply(this,arguments)}))),{c(){e=k("article"),n=k("div"),s=C(),c&&ct(c.$$.fragment),E(n,"class",o=t[2].eventBody),E(e,"class",t[4]),E(e,"style",t[5]),E(e,"role",a=t[7]?"button":void 0),E(e,"tabindex",u=t[7]?0:void 0)},m(o,r){y(o,e,r),v(e,n),v(e,s),c&&at(c,e,null),t[51](e),d=!0,f||(h=[$(i=vt.call(null,n,t[6])),T(e,"click",(function(){l(t[7])&&t[7].apply(this,arguments)})),T(e,"keydown",(function(){l(t[7]&&gt(t[7]))&&(t[7]&&gt(t[7])).apply(this,arguments)})),T(e,"mouseenter",(function(){l(t[31](t[9],t[1]))&&t[31](t[9],t[1]).apply(this,arguments)})),T(e,"mouseleave",(function(){l(t[31](t[10],t[1]))&&t[31](t[10],t[1]).apply(this,arguments)})),T(e,"pointerdown",(function(){l(!fe(t[1])&&t[32](t[8]))&&(!fe(t[1])&&t[32](t[8])).apply(this,arguments)}))],f=!0)},p(r,s){if(t=r,(!d||4&s[0]&&o!==(o=t[2].eventBody))&&E(n,"class",o),i&&l(i.update)&&64&s[0]&&i.update.call(null,t[6]),256&s[0]&&p!==(p=t[8].resizer)){if(c){et();const t=c;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}p?(c=U(p,m(t)),c.$on("pointerdown",(function(){l(t[32](t[8],!0))&&t[32](t[8],!0).apply(this,arguments)})),ct(c.$$.fragment),ot(c.$$.fragment,1),at(c,e,null)):c=null}else if(p){const e={};1&s[0]&&(e.event=t[0]),c.$set(e)}(!d||16&s[0])&&E(e,"class",t[4]),(!d||32&s[0])&&E(e,"style",t[5]),(!d||128&s[0]&&a!==(a=t[7]?"button":void 0))&&E(e,"role",a),(!d||128&s[0]&&u!==(u=t[7]?0:void 0))&&E(e,"tabindex",u)},i(t){d||(c&&ot(c.$$.fragment,t),d=!0)},o(t){c&&rt(c.$$.fragment,t),d=!1},d(n){n&&w(e),c&&ut(c),t[51](null),f=!1,r(h)}}}function fn(t,e,n){let o,r,i,s,c,u,d,f,h,p,m,$,g,v,y,w,b,k,x,C,_,T,D,E,S,M,{chunk:U}=e,{longChunks:L={}}=e,{inPopup:H=!1}=e,{dayMaxEvents:B,displayEventEnd:F,eventBackgroundColor:P,eventTextColor:z,eventClick:A,eventColor:G,eventContent:j,eventClassNames:O,eventDidMount:W,eventMouseEnter:Y,eventMouseLeave:q,theme:X,_view:V,_intlEventTime:J,_interaction:K,_iClasses:Q,_resBgColor:Z,_resTxtColor:tt,_hiddenEvents:et,_popupDate:nt}=R("state");a(t,B,(t=>n(54,i=t))),a(t,F,(t=>n(43,m=t))),a(t,P,(t=>n(49,b=t))),a(t,z,(t=>n(46,v=t))),a(t,A,(t=>n(39,o=t))),a(t,G,(t=>n(48,w=t))),a(t,j,(t=>n(42,p=t))),a(t,O,(t=>n(44,$=t))),a(t,W,(t=>n(56,d=t))),a(t,Y,(t=>n(9,x=t))),a(t,q,(t=>n(10,C=t))),a(t,X,(t=>n(2,h=t))),a(t,V,(t=>n(40,u=t))),a(t,J,(t=>n(41,f=t))),a(t,K,(t=>n(8,c=t))),a(t,Q,(t=>n(45,g=t))),a(t,Z,(t=>n(50,k=t))),a(t,tt,(t=>n(47,y=t))),a(t,et,(t=>n(53,r=t))),a(t,nt,(t=>n(55,s=t)));let ot,rt,lt=1,it=!1;function st(t,e){return!fe(e)&&l(t)?e=>t({event:ce(T),el:_,jsEvent:e,view:Jt(u)}):void 0}return N((()=>{l(d)&&d({event:ce(T),timeText:M,el:_,view:Jt(u)})})),t.$$set=t=>{"chunk"in t&&n(33,U=t.chunk),"longChunks"in t&&n(34,L=t.longChunks),"inPopup"in t&&n(35,H=t.inPopup)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&n(0,T=U.event),37&t.$$.dirty[0]|1041092&t.$$.dirty[1]){n(1,ot=T.display);let t=T.backgroundColor||k(T)||b||w,e=T.textColor||y(T)||v;n(5,E=`width:calc(${100*U.days}% + ${7*(U.days-1)}px);margin-top:${lt}px;`),t&&n(5,E+=`background-color:${t};`),e&&n(5,E+=`color:${e};`),it&&n(5,E+="visibility:hidden;"),n(4,D=[h.event,...g([],T),...se($,T,u)].join(" "))}4&t.$$.dirty[0]|7684&t.$$.dirty[1]&&n(6,[M,S]=le(U,m,p,h,f,u),S),2&t.$$.dirty[0]|256&t.$$.dirty[1]&&n(7,rt=st(o,ot))},[T,ot,h,_,D,E,S,rt,c,x,C,B,F,P,z,A,G,j,O,W,Y,q,X,V,J,K,Q,Z,tt,et,nt,st,function(t,e){return t.action?t=>c.action.drag(T,t,e,H?s:void 0):void 0},U,L,H,function(){!_||pe(ot)||H||(n(37,lt=re(U,L,Ot(_))),!0===i?function(){let t=jt(_,2),e=Ot(t)-Ot(t.firstElementChild)-function(t){let e=0;for(let n=0;n<U.days&&(e=At(e,Ot(t.lastElementChild)),t=t.nextElementSibling);++n);return e}(t);n(38,it=U.bottom>e);let o=!1;for(let t of U.dates){let e=r[t.getTime()];if(e){let t=e.size;it?e.add(U.event):e.delete(U.event),t!==e.size&&(o=!0)}}o&&et.set(r)}():n(38,it=!1))},lt,it,o,u,f,p,m,$,g,v,y,w,b,k,function(t){I[t?"unshift":"push"]((()=>{_=t,n(3,_)}))}]}let hn=class extends ft{constructor(t){super(),dt(this,t,fn,dn,i,{chunk:33,longChunks:34,inPopup:35,reposition:36},null,[-1,-1])}get reposition(){return this.$$.ctx[36]}};function pn(t,e,n){const o=t.slice();return o[20]=e[n],o}function mn(t,e){let n,o,r;return o=new hn({props:{chunk:e[20],inPopup:!0}}),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){e=t;const r={};1&n&&(r.chunk=e[20]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(o,t)}}}function $n(t){let e,n,o,i,s,c,a,u,d,f,h,p,m,g,b,_,S,M=[],U=new Map,L=lt(t[0]);const H=t=>t[20].event;for(let e=0;e<L.length;e+=1){let n=pn(t,L,e),o=H(n);U.set(o,M[e]=mn(o,n))}return{c(){e=k("div"),n=k("div"),o=k("time"),c=C(),a=k("a"),u=x("×"),h=C(),p=k("div");for(let t=0;t<M.length;t+=1)M[t].c();E(o,"datetime",i=Mt(t[3],10)),E(a,"role","button"),E(a,"tabindex","0"),E(a,"aria-label",d=t[6].close),E(n,"class",f=t[4].dayHead),E(p,"class",m=t[4].events),E(e,"class",g=t[4].popup),E(e,"style",t[2])},m(r,l){y(r,e,l),v(e,n),v(n,o),v(n,c),v(n,a),v(a,u),v(e,h),v(e,p);for(let t=0;t<M.length;t+=1)M[t]&&M[t].m(p,null);t[16](e),b=!0,_||(S=[$(s=vt.call(null,o,t[5].format(t[3]))),T(a,"click",D(t[13])),T(a,"keydown",gt(t[13])),$(yt.call(null,e,"pointerdown")),T(e,"pointerdown",D(t[15])),T(e,"pointerdownoutside",t[14])],_=!0)},p(t,r){let[c]=r;(!b||8&c&&i!==(i=Mt(t[3],10)))&&E(o,"datetime",i),s&&l(s.update)&&40&c&&s.update.call(null,t[5].format(t[3])),(!b||64&c&&d!==(d=t[6].close))&&E(a,"aria-label",d),(!b||16&c&&f!==(f=t[4].dayHead))&&E(n,"class",f),1&c&&(L=lt(t[0]),et(),M=st(M,c,H,1,t,L,U,p,it,mn,null,pn),nt()),(!b||16&c&&m!==(m=t[4].events))&&E(p,"class",m),(!b||16&c&&g!==(g=t[4].popup))&&E(e,"class",g),(!b||4&c)&&E(e,"style",t[2])},i(t){if(!b){for(let t=0;t<L.length;t+=1)ot(M[t]);b=!0}},o(t){for(let t=0;t<M.length;t+=1)rt(M[t]);b=!1},d(n){n&&w(e);for(let t=0;t<M.length;t+=1)M[t].d();t[16](null),_=!1,r(S)}}}function gn(t,e,n){let o,r,l,i,s,c,u,{buttonText:d,theme:f,_interaction:h,_intlDayPopover:p,_popupDate:$,_popupChunks:g}=R("state");a(t,d,(t=>n(6,c=t))),a(t,f,(t=>n(4,i=t))),a(t,h,(t=>n(17,o=t))),a(t,p,(t=>n(5,s=t))),a(t,$,(t=>n(3,r=t))),a(t,g,(t=>n(0,l=t)));let v="";function y(){u&&(n(2,v=""),q().then((()=>{l.length?function(){let t,e,o=jt(u,1),r=jt(o,3),l=Gt(u),i=Gt(o),s=Gt(r);if(n(2,v=""),l.width>=s.width){t=s.left-i.left;let e=i.right-s.right;n(2,v+=`right:${e}px;`)}else t=(i.width-l.width)/2,i.left+t<s.left?t=s.left-i.left:i.left+t+l.width>s.right&&(t=s.right-i.left-l.width);if(n(2,v+=`left:${t}px;`),l.height>=s.height){e=s.top-i.top;let t=i.bottom-s.bottom;n(2,v+=`bottom:${t}px;`)}else e=(i.height-l.height)/2,i.top+e<s.top?e=s.top-i.top:i.top+e+l.height>s.bottom&&(e=s.bottom-i.top-l.height);n(2,v+=`top:${e}px;`)}():w()})))}function w(t){m($,r=null,r)}return t.$$.update=()=>{1&t.$$.dirty&&l&&y()},[l,u,v,r,i,s,c,d,f,h,p,$,g,w,function(t){w(),o.action?.noClick()},function(e){z.call(this,t,e)},function(t){I[t?"unshift":"push"]((()=>{u=t,n(1,u)}))}]}class vn extends ft{constructor(t){super(),dt(this,t,gn,$n,i,{})}}function yn(t,e,n){const o=t.slice();return o[43]=e[n],o[44]=e,o[45]=n,o}function wn(t){let e,n,o,r;return n=new hn({props:{chunk:t[2][1]}}),{c(){e=k("div"),ct(n.$$.fragment),E(e,"class",o=t[12].events)},m(t,o){y(t,e,o),at(n,e,null),r=!0},p(t,l){const i={};4&l[0]&&(i.chunk=t[2][1]),n.$set(i),(!r||4096&l[0]&&o!==(o=t[12].events))&&E(e,"class",o)},i(t){r||(ot(n.$$.fragment,t),r=!0)},o(t){rt(n.$$.fragment,t),r=!1},d(t){t&&w(e),ut(n)}}}function bn(t){let e,n,o,r;return n=new hn({props:{chunk:t[2][0]}}),{c(){e=k("div"),ct(n.$$.fragment),E(e,"class",o=t[12].events+" "+t[12].preview)},m(t,o){y(t,e,o),at(n,e,null),r=!0},p(t,l){const i={};4&l[0]&&(i.chunk=t[2][0]),n.$set(i),(!r||4096&l[0]&&o!==(o=t[12].events+" "+t[12].preview))&&E(e,"class",o)},i(t){r||(ot(n.$$.fragment,t),r=!0)},o(t){rt(n.$$.fragment,t),r=!1},d(t){t&&w(e),ut(n)}}}function kn(t,e){let n,o,r,l=e[45];const i=()=>e[36](o,l),s=()=>e[36](null,l);let c={chunk:e[43],longChunks:e[1]};return o=new hn({props:c}),i(),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){l!==(e=t)[45]&&(s(),l=e[45],i());const r={};16&n[0]&&(r.chunk=e[43]),2&n[0]&&(r.longChunks=e[1]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),s(),ut(o,t)}}}function xn(t){let e,n;return e=new vn({}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Cn(t){let e,n,o,i;return{c(){e=k("a"),E(e,"role","button"),E(e,"tabindex","0"),E(e,"aria-haspopup","true")},m(r,l){y(r,e,l),o||(i=[T(e,"click",D(t[26])),T(e,"keydown",gt(t[26])),T(e,"pointerdown",D(t[35])),$(n=vt.call(null,e,t[6]))],o=!0)},p(t,e){n&&l(n.update)&&64&e[0]&&n.update.call(null,t[6])},d(t){t&&w(e),o=!1,r(i)}}}function _n(t){let e,n,o,i,s,c,a,u,d,f,h,p,m,g,b,x,_,D,S=t[2][1]&&Ut(t[2][1].date,t[0]),M=t[2][0]&&Ut(t[2][0].date,t[0]),U=[],L=new Map,H=S&&wn(t),B=M&&bn(t),N=lt(t[4]);const F=t=>t[43].event;for(let e=0;e<N.length;e+=1){let n=yn(t,N,e),o=F(n);L.set(o,U[e]=kn(o,n))}let P=t[7]&&xn(),R=t[5].size&&Cn(t);return{c(){e=k("div"),n=k("time"),c=C(),H&&H.c(),a=C(),B&&B.c(),u=C(),d=k("div");for(let t=0;t<U.length;t+=1)U[t].c();h=C(),P&&P.c(),p=C(),m=k("div"),R&&R.c(),E(n,"class",o=t[12].dayHead),E(n,"datetime",i=Mt(t[0],10)),E(d,"class",f=t[12].events),E(m,"class",g=t[12].dayFoot),E(e,"class",b=t[12].day+" "+t[12].weekdays?.[t[0].getUTCDay()]+(t[8]?" "+t[12].today:"")+(t[9]?" "+t[12].otherMonth:"")+(t[10]?" "+t[12].highlight:"")),E(e,"role","cell")},m(o,r){y(o,e,r),v(e,n),v(e,c),H&&H.m(e,null),v(e,a),B&&B.m(e,null),v(e,u),v(e,d);for(let t=0;t<U.length;t+=1)U[t]&&U[t].m(d,null);v(e,h),P&&P.m(e,null),v(e,p),v(e,m),R&&R.m(m,null),t[37](e),x=!0,_||(D=[T(window,"resize",t[27]),$(s=vt.call(null,n,t[14].format(t[0]))),T(e,"pointerenter",(function(){l(t[25](t[13]))&&t[25](t[13]).apply(this,arguments)})),T(e,"pointerleave",(function(){l(t[13].pointer?.leave)&&t[13].pointer?.leave.apply(this,arguments)})),T(e,"pointerdown",(function(){l(t[13].action?.select)&&t[13].action?.select.apply(this,arguments)}))],_=!0)},p(r,c){t=r,(!x||4096&c[0]&&o!==(o=t[12].dayHead))&&E(n,"class",o),(!x||1&c[0]&&i!==(i=Mt(t[0],10)))&&E(n,"datetime",i),s&&l(s.update)&&16385&c[0]&&s.update.call(null,t[14].format(t[0])),5&c[0]&&(S=t[2][1]&&Ut(t[2][1].date,t[0])),S?H?(H.p(t,c),5&c[0]&&ot(H,1)):(H=wn(t),H.c(),ot(H,1),H.m(e,a)):H&&(et(),rt(H,1,1,(()=>{H=null})),nt()),5&c[0]&&(M=t[2][0]&&Ut(t[2][0].date,t[0])),M?B?(B.p(t,c),5&c[0]&&ot(B,1)):(B=bn(t),B.c(),ot(B,1),B.m(e,u)):B&&(et(),rt(B,1,1,(()=>{B=null})),nt()),2066&c[0]&&(N=lt(t[4]),et(),U=st(U,c,F,1,t,N,L,d,it,kn,null,yn),nt()),(!x||4096&c[0]&&f!==(f=t[12].events))&&E(d,"class",f),t[7]?P?128&c[0]&&ot(P,1):(P=xn(),P.c(),ot(P,1),P.m(e,p)):P&&(et(),rt(P,1,1,(()=>{P=null})),nt()),t[5].size?R?R.p(t,c):(R=Cn(t),R.c(),R.m(m,null)):R&&(R.d(1),R=null),(!x||4096&c[0]&&g!==(g=t[12].dayFoot))&&E(m,"class",g),(!x||5889&c[0]&&b!==(b=t[12].day+" "+t[12].weekdays?.[t[0].getUTCDay()]+(t[8]?" "+t[12].today:"")+(t[9]?" "+t[12].otherMonth:"")+(t[10]?" "+t[12].highlight:"")))&&E(e,"class",b)},i(t){if(!x){ot(H),ot(B);for(let t=0;t<N.length;t+=1)ot(U[t]);ot(P),x=!0}},o(t){rt(H),rt(B);for(let t=0;t<U.length;t+=1)rt(U[t]);rt(P),x=!1},d(n){n&&w(e),H&&H.d(),B&&B.d();for(let t=0;t<U.length;t+=1)U[t].d();P&&P.d(),R&&R.d(),t[37](null),_=!1,r(D)}}}function Tn(t,e,n){let o,r,i,s,c,u,d,f,h,p,$,g,v,y,w,{date:b}=e,{chunks:k}=e,{longChunks:x}=e,{iChunks:C=[]}=e,{date:_,dayMaxEvents:T,highlightedDates:D,moreLinkContent:E,theme:S,_hiddenEvents:M,_intlDayCell:U,_popupDate:L,_popupChunks:H,_today:B,_interaction:N,_queue:P}=R("state");a(t,_,(t=>n(33,u=t))),a(t,D,(t=>n(32,c=t))),a(t,E,(t=>n(31,s=t))),a(t,S,(t=>n(12,f=t))),a(t,M,(t=>n(29,o=t))),a(t,U,(t=>n(14,p=t))),a(t,L,(t=>n(30,i=t))),a(t,H,(t=>n(38,r=t))),a(t,B,(t=>n(34,d=t))),a(t,N,(t=>n(13,h=t)));let A,G=new Set,j="",O=[];function W(){let t=Tt(xt(b)),e=g.concat(x[b.getTime()]?.chunks||[]);m(H,r=e.map((e=>Ft({},e,ee(e.event,b,t),{days:1,dates:[b]}))).sort(((t,e)=>t.top-e.top)),r)}function Y(){n(11,O.length=g.length,O);for(let t of O)t?.reposition?.()}F(Y);let X={};return t.$$set=t=>{"date"in t&&n(0,b=t.date),"chunks"in t&&n(28,k=t.chunks),"longChunks"in t&&n(1,x=t.longChunks),"iChunks"in t&&n(2,C=t.iChunks)},t.$$.update=()=>{if(268435505&t.$$.dirty[0]){n(4,g=[]),G.clear(),n(5,G),n(28,k),n(0,b),n(4,g);for(let t of k)Ut(t.date,b)&&g.push(t)}if(33&t.$$.dirty[0]&&m(M,o[b.getTime()]=G,o),1&t.$$.dirty[0]|8&t.$$.dirty[1]&&n(8,v=Ut(b,d)),1&t.$$.dirty[0]|6&t.$$.dirty[1]&&(n(9,y=b.getUTCMonth()!==u.getUTCMonth()),n(10,w=c.some((t=>Ut(t,b))))),536871008&t.$$.dirty[0]|1&t.$$.dirty[1]&&o&&G.size){let t="+"+G.size+" more";s?(n(6,j=l(s)?s({num:G.size,text:t}):s),"string"==typeof j&&n(6,j={html:j})):n(6,j={html:t})}1073741825&t.$$.dirty[0]&&n(7,A=i&&Ut(b,i)),146&t.$$.dirty[0]&&A&&x&&g&&q().then(W),9&t.$$.dirty[0]&&$&&Yt($,(()=>({allDay:!0,date:b,resource:void 0,dayEl:$}))),536870912&t.$$.dirty[0]&&o&&Nt(Y,X,P)},[b,x,C,$,g,G,j,A,v,y,w,O,f,h,p,_,D,E,S,M,U,L,H,B,N,function(t){return t.pointer?e=>t.pointer.enterDayGrid(b,e):void 0},function(){m(L,i=b,i)},Y,k,o,i,s,c,u,d,function(e){z.call(this,t,e)},function(t,e){I[t?"unshift":"push"]((()=>{O[e]=t,n(11,O)}))},function(t){I[t?"unshift":"push"]((()=>{$=t,n(3,$)}))}]}let Dn=class extends ft{constructor(t){super(),dt(this,t,Tn,_n,i,{date:0,chunks:28,longChunks:1,iChunks:2},null,[-1,-1])}};function En(t,e,n){const o=t.slice();return o[14]=e[n],o}function Sn(t){let e,n;return e=new Dn({props:{date:t[14],chunks:t[1],longChunks:t[2],iChunks:t[3]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.date=t[14]),2&n&&(o.chunks=t[1]),4&n&&(o.longChunks=t[2]),8&n&&(o.iChunks=t[3]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Mn(t){let e,n,o,r=lt(t[0]),l=[];for(let e=0;e<r.length;e+=1)l[e]=Sn(En(t,r,e));const i=t=>rt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=k("div");for(let t=0;t<l.length;t+=1)l[t].c();E(e,"class",n=t[4].days),E(e,"role","row")},m(t,n){y(t,e,n);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);o=!0},p(t,s){let[c]=s;if(15&c){let n;for(r=lt(t[0]),n=0;n<r.length;n+=1){const o=En(t,r,n);l[n]?(l[n].p(o,c),ot(l[n],1)):(l[n]=Sn(o),l[n].c(),ot(l[n],1),l[n].m(e,null))}for(et(),n=r.length;n<l.length;n+=1)i(n);nt()}(!o||16&c&&n!==(n=t[4].days))&&E(e,"class",n)},i(t){if(!o){for(let t=0;t<r.length;t+=1)ot(l[t]);o=!0}},o(t){l=l.filter(Boolean);for(let t=0;t<l.length;t+=1)rt(l[t]);o=!1},d(t){t&&w(e),b(l,t)}}}function Un(t,e,n){let o,r,l,i,{dates:s}=e,{_events:c,_iEvents:u,hiddenDays:d,theme:f}=R("state");a(t,c,(t=>n(13,l=t))),a(t,u,(t=>n(12,r=t))),a(t,d,(t=>n(11,o=t))),a(t,f,(t=>n(4,i=t)));let h,p,m,$,g=[];return t.$$set=t=>{"dates"in t&&n(0,s=t.dates)},t.$$.update=()=>{if(1&t.$$.dirty&&(n(9,m=s[0]),n(10,$=Tt(xt(s[s.length-1])))),11778&t.$$.dirty){n(1,h=[]);for(let t of l)if(!he(t.display)&&de(t,m,$)){let e=ee(t,m,$);h.push(e)}n(2,p=oe(h,o))}7680&t.$$.dirty&&n(3,g=r.map((t=>{let e;return t&&de(t,m,$)?(e=ee(t,m,$),oe([e],o)):e=null,e})))},[s,h,p,g,i,c,u,d,f,m,$,o,r,l]}let Ln=class extends ft{constructor(t){super(),dt(this,t,Un,Mn,i,{dates:0})}};function Hn(t,e,n){const o=t.slice();return o[10]=e[n],o}function Bn(t){let e,n;return e=new Ln({props:{dates:t[10]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.dates=t[10]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Nn(t){let e,n,o=lt(t[0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Bn(Hn(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(1&n){let i;for(o=lt(t[0]),i=0;i<o.length;i+=1){const l=Hn(t,o,i);r[i]?(r[i].p(l,n),ot(r[i],1)):(r[i]=Bn(l),r[i].c(),ot(r[i],1),r[i].m(e.parentNode,e))}for(et(),i=o.length;i<r.length;i+=1)l(i);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Fn(t){let e,n,o,r;return e=new sn({}),o=new un({props:{$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){ct(e.$$.fragment),n=C(),ct(o.$$.fragment)},m(t,l){at(e,t,l),y(t,n,l),at(o,t,l),r=!0},p(t,e){let[n]=e;const r={};8193&n&&(r.$$scope={dirty:n,ctx:t}),o.$set(r)},i(t){r||(ot(e.$$.fragment,t),ot(o.$$.fragment,t),r=!0)},o(t){rt(e.$$.fragment,t),rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(e,t),ut(o,t)}}}function Pn(t,e,n){let o,r,l,i,s,c,{_viewDates:u,_hiddenEvents:d,dayMaxEvents:f,hiddenDays:h}=R("state");return a(t,u,(t=>n(6,o=t))),a(t,d,(t=>n(9,l=t))),a(t,f,(t=>n(7,r=t))),a(t,h,(t=>n(8,i=t))),t.$$.update=()=>{if(481&t.$$.dirty){n(0,s=[]),n(5,c=7-i.length),m(d,l={},l);for(let t=0;t<o.length/c;++t){let e=[];for(let n=0;n<c;++n)e.push(o[t*c+n]);s.push(e)}}},[s,u,d,f,h,c,o,r,i]}let Rn=class extends ft{constructor(t){super(),dt(this,t,Pn,Fn,i,{})}};var zn={createOptions(t){t.dayMaxEvents=!1,t.dayCellFormat={day:"numeric"},t.dayPopoverFormat={month:"long",day:"numeric",year:"numeric"},t.moreLinkContent=void 0,t.buttonText.dayGridMonth="month",t.buttonText.close="Close",t.theme.uniform="ec-uniform",t.theme.dayFoot="ec-day-foot",t.theme.popup="ec-popup",t.view="dayGridMonth",t.views.dayGridMonth={buttonText:ve,component:Rn,dayHeaderFormat:{weekday:"short"},dayHeaderAriaLabelFormat:{weekday:"long"},displayEventEnd:!1,duration:{months:1},theme:be("ec-day-grid ec-month-view"),titleFormat:{year:"numeric",month:"long"}}},createStores(t){t._days=function(t){return $t([t.date,t.firstDay,t.hiddenDays],(t=>{let[e,n,o]=t,r=[],l=xt(e),i=7;for(;l.getUTCDay()!==n&&i;)Dt(l),--i;for(let t=0;t<7;++t)o.includes(l.getUTCDay())||r.push(xt(l)),Tt(l);return r}))}(t),t._intlDayCell=ke(t.locale,t.dayCellFormat),t._intlDayPopover=ke(t.locale,t.dayPopoverFormat),t._hiddenEvents=mt({}),t._popupDate=mt(null),t._popupChunks=mt([])}};function An(t){let e,n,o,r,l;const i=t[5].default,s=u(i,t,t[4],null);return{c(){e=k("div"),n=k("div"),s&&s.c(),E(n,"class",o=t[0].content),E(e,"class",r=t[0].body)},m(o,r){y(o,e,r),v(e,n),s&&s.m(n,null),t[6](e),l=!0},p(t,c){let[a]=c;s&&s.p&&(!l||16&a)&&h(s,i,t,t[4],l?f(i,t[4],a,null):p(t[4]),null),(!l||1&a&&o!==(o=t[0].content))&&E(n,"class",o),(!l||1&a&&r!==(r=t[0].body))&&E(e,"class",r)},i(t){l||(ot(s,t),l=!0)},o(t){rt(s,t),l=!1},d(n){n&&w(e),s&&s.d(n),t[6](null)}}}function In(t,e,n){let o,r,{$$slots:l={},$$scope:i}=e,{_bodyEl:s,theme:c}=R("state");return a(t,s,(t=>n(1,r=t))),a(t,c,(t=>n(0,o=t))),t.$$set=t=>{"$$scope"in t&&n(4,i=t.$$scope)},[o,r,s,c,i,l,function(t){I[t?"unshift":"push"]((()=>{r=t,s.set(r)}))}]}let Gn=class extends ft{constructor(t){super(),dt(this,t,In,An,i,{})}};function jn(e){let n,o,i,s,c,a,u,d,f,h,p;return{c(){n=k("article"),o=k("div"),s=C(),c=k("div"),E(o,"class",i=e[0].eventTag),E(o,"style",e[3]),E(c,"class",a=e[0].eventBody),E(n,"class",e[2]),E(n,"role",d=e[5]?"button":void 0),E(n,"tabindex",f=e[5]?0:void 0)},m(t,r){y(t,n,r),v(n,o),v(n,s),v(n,c),e[39](n),h||(p=[$(u=vt.call(null,c,e[4])),T(n,"click",(function(){l(e[5])&&e[5].apply(this,arguments)})),T(n,"keydown",(function(){l(e[5]&&gt(e[5]))&&(e[5]&&gt(e[5])).apply(this,arguments)})),T(n,"mouseenter",(function(){l(e[25](e[6]))&&e[25](e[6]).apply(this,arguments)})),T(n,"mouseleave",(function(){l(e[25](e[7]))&&e[25](e[7]).apply(this,arguments)})),T(n,"pointerdown",(function(){l(e[8].action?.noAction)&&e[8].action?.noAction.apply(this,arguments)}))],h=!0)},p(t,r){e=t,1&r[0]&&i!==(i=e[0].eventTag)&&E(o,"class",i),8&r[0]&&E(o,"style",e[3]),1&r[0]&&a!==(a=e[0].eventBody)&&E(c,"class",a),u&&l(u.update)&&16&r[0]&&u.update.call(null,e[4]),4&r[0]&&E(n,"class",e[2]),32&r[0]&&d!==(d=e[5]?"button":void 0)&&E(n,"role",d),32&r[0]&&f!==(f=e[5]?0:void 0)&&E(n,"tabindex",f)},i:t,o:t,d(t){t&&w(n),e[39](null),h=!1,r(p)}}}function On(t,e,n){let o,r,i,s,c,u,d,f,h,p,m,$,g,v,y,w,b,k,x,C,_,T,D,{chunk:E}=e,{displayEventEnd:S,eventBackgroundColor:M,eventTextColor:U,eventColor:L,eventContent:H,eventClassNames:B,eventClick:F,eventDidMount:P,eventMouseEnter:z,eventMouseLeave:A,theme:G,_view:j,_intlEventTime:O,_resBgColor:W,_resTxtColor:Y,_interaction:q}=R("state");function X(t){return e=>{l(t)&&t({event:ce(k),el:b,jsEvent:e,view:Jt(r)})}}return a(t,S,(t=>n(32,d=t))),a(t,M,(t=>n(37,$=t))),a(t,U,(t=>n(34,h=t))),a(t,L,(t=>n(36,m=t))),a(t,H,(t=>n(31,u=t))),a(t,B,(t=>n(33,f=t))),a(t,F,(t=>n(28,o=t))),a(t,P,(t=>n(41,i=t))),a(t,z,(t=>n(6,v=t))),a(t,A,(t=>n(7,y=t))),a(t,G,(t=>n(0,c=t))),a(t,j,(t=>n(29,r=t))),a(t,O,(t=>n(30,s=t))),a(t,W,(t=>n(38,g=t))),a(t,Y,(t=>n(35,p=t))),a(t,q,(t=>n(8,w=t))),N((()=>{l(i)&&i({event:ce(k),timeText:T,el:b,view:Jt(r)})})),t.$$set=t=>{"chunk"in t&&n(26,E=t.chunk)},t.$$.update=()=>{if(67108864&t.$$.dirty[0]&&n(27,k=E.event),671088649&t.$$.dirty[0]|252&t.$$.dirty[1]){n(3,C="");let t=k.backgroundColor||g(k)||$||m;t&&n(3,C=`background-color:${t};`);let e=k.textColor||p(k)||h;e&&n(3,C+=`color:${e};`),n(2,x=[c.event,...se(f,k,r)].join(" "))}1677721601&t.$$.dirty[0]|3&t.$$.dirty[1]&&n(4,[T,_]=le(E,d,u,c,s,r),_),268435456&t.$$.dirty[0]&&n(5,D=X(o))},[c,b,x,C,_,D,v,y,w,S,M,U,L,H,B,F,P,z,A,G,j,O,W,Y,q,X,E,k,o,r,s,u,d,f,h,p,m,$,g,function(t){I[t?"unshift":"push"]((()=>{b=t,n(1,b)}))}]}let Wn=class extends ft{constructor(t){super(),dt(this,t,On,jn,i,{chunk:26},null,[-1,-1])}};function Yn(t,e,n){const o=t.slice();return o[21]=e[n],o}function qn(t){let e,n,o,i,s,c,a,u,d,f,h,p,m,g,b=[],x=new Map,_=lt(t[2]);const D=t=>t[21].event;for(let e=0;e<_.length;e+=1){let n=Yn(t,_,e),o=D(n);x.set(o,b[e]=Xn(o,n))}return{c(){e=k("div"),n=k("h4"),o=k("time"),s=C(),c=k("time"),f=C();for(let t=0;t<b.length;t+=1)b[t].c();E(o,"datetime",t[5]),E(c,"class",a=t[6].daySide),E(c,"datetime",t[5]),E(n,"class",d=t[6].dayHead),E(e,"class",h=t[6].day+" "+t[6].weekdays?.[t[0].getUTCDay()]+(t[3]?" "+t[6].today:"")+(t[4]?" "+t[6].highlight:"")),E(e,"role","listitem")},m(r,a){y(r,e,a),v(e,n),v(n,o),v(n,s),v(n,c),v(e,f);for(let t=0;t<b.length;t+=1)b[t]&&b[t].m(e,null);t[20](e),p=!0,m||(g=[$(i=vt.call(null,o,t[8].format(t[0]))),$(u=vt.call(null,c,t[9].format(t[0]))),T(e,"pointerdown",(function(){l(t[7].action?.select)&&t[7].action?.select.apply(this,arguments)}))],m=!0)},p(r,s){t=r,(!p||32&s)&&E(o,"datetime",t[5]),i&&l(i.update)&&257&s&&i.update.call(null,t[8].format(t[0])),(!p||64&s&&a!==(a=t[6].daySide))&&E(c,"class",a),(!p||32&s)&&E(c,"datetime",t[5]),u&&l(u.update)&&513&s&&u.update.call(null,t[9].format(t[0])),(!p||64&s&&d!==(d=t[6].dayHead))&&E(n,"class",d),4&s&&(_=lt(t[2]),et(),b=st(b,s,D,1,t,_,x,e,it,Xn,null,Yn),nt()),(!p||89&s&&h!==(h=t[6].day+" "+t[6].weekdays?.[t[0].getUTCDay()]+(t[3]?" "+t[6].today:"")+(t[4]?" "+t[6].highlight:"")))&&E(e,"class",h)},i(t){if(!p){for(let t=0;t<_.length;t+=1)ot(b[t]);p=!0}},o(t){for(let t=0;t<b.length;t+=1)rt(b[t]);p=!1},d(n){n&&w(e);for(let t=0;t<b.length;t+=1)b[t].d();t[20](null),m=!1,r(g)}}}function Xn(t,e){let n,o,r;return o=new Wn({props:{chunk:e[21]}}),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){e=t;const r={};4&n&&(r.chunk=e[21]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(o,t)}}}function Vn(t){let e,n,o=t[2].length&&qn(t);return{c(){o&&o.c(),e=_()},m(t,r){o&&o.m(t,r),y(t,e,r),n=!0},p(t,n){let[r]=n;t[2].length?o?(o.p(t,r),4&r&&ot(o,1)):(o=qn(t),o.c(),ot(o,1),o.m(e.parentNode,e)):o&&(et(),rt(o,1,1,(()=>{o=null})),nt())},i(t){n||(ot(o),n=!0)},o(t){rt(o),n=!1},d(t){t&&w(e),o&&o.d(t)}}}function Jn(t,e,n){let o,r,l,i,s,c,u,d,f,h,p,m,{date:$}=e,{_events:g,_interaction:v,_intlListDay:y,_intlListDaySide:w,_today:b,highlightedDates:k,theme:x}=R("state");return a(t,g,(t=>n(19,l=t))),a(t,v,(t=>n(7,s=t))),a(t,y,(t=>n(8,c=t))),a(t,w,(t=>n(9,u=t))),a(t,b,(t=>n(18,r=t))),a(t,k,(t=>n(17,o=t))),a(t,x,(t=>n(6,i=t))),t.$$set=t=>{"date"in t&&n(0,$=t.date)},t.$$.update=()=>{if(524293&t.$$.dirty){n(2,f=[]);let t=$,e=Tt(xt($));for(let n of l)if(!he(n.display)&&de(n,t,e)){let o=ee(n,t,e);f.push(o)}ne(f)}262145&t.$$.dirty&&n(3,h=Ut($,r)),131073&t.$$.dirty&&n(4,p=o.some((t=>Ut(t,$)))),1&t.$$.dirty&&n(5,m=Mt($,10)),3&t.$$.dirty&&d&&Yt(d,(()=>({allDay:!0,date:$,resource:void 0,dayEl:d})))},[$,d,f,h,p,m,i,s,c,u,g,v,y,w,b,k,x,o,r,l,function(t){I[t?"unshift":"push"]((()=>{d=t,n(1,d)}))}]}let Kn=class extends ft{constructor(t){super(),dt(this,t,Jn,Vn,i,{date:0})}};function Qn(t,e,n){const o=t.slice();return o[15]=e[n],o}function Zn(t){let e,n,o=lt(t[1]),r=[];for(let e=0;e<o.length;e+=1)r[e]=eo(Qn(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(2&n){let i;for(o=lt(t[1]),i=0;i<o.length;i+=1){const l=Qn(t,o,i);r[i]?(r[i].p(l,n),ot(r[i],1)):(r[i]=eo(l),r[i].c(),ot(r[i],1),r[i].m(e.parentNode,e))}for(et(),i=o.length;i<r.length;i+=1)l(i);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function to(e){let n,o,i,s,c;return{c(){n=k("div"),E(n,"class",o=e[3].noEvents)},m(t,o){y(t,n,o),s||(c=[$(i=vt.call(null,n,e[0])),T(n,"click",e[10])],s=!0)},p(t,e){8&e&&o!==(o=t[3].noEvents)&&E(n,"class",o),i&&l(i.update)&&1&e&&i.update.call(null,t[0])},i:t,o:t,d(t){t&&w(n),s=!1,r(c)}}}function eo(t){let e,n;return e=new Kn({props:{date:t[15]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.date=t[15]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function no(t){let e,n,o,r;const l=[to,Zn],i=[];function s(t,e){return t[2]?0:1}return e=s(t),n=i[e]=l[e](t),{c(){n.c(),o=_()},m(t,n){i[e].m(t,n),y(t,o,n),r=!0},p(t,r){let c=e;e=s(t),e===c?i[e].p(t,r):(et(),rt(i[c],1,1,(()=>{i[c]=null})),nt(),n=i[e],n?n.p(t,r):(n=i[e]=l[e](t),n.c()),ot(n,1),n.m(o.parentNode,o))},i(t){r||(ot(n),r=!0)},o(t){rt(n),r=!1},d(t){t&&w(o),i[e].d(t)}}}function oo(t){let e,n;return e=new Gn({props:{$$slots:{default:[no]},$$scope:{ctx:t}}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){let[o]=n;const r={};262159&o&&(r.$$scope={dirty:o,ctx:t}),e.$set(r)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function ro(t,e,n){let o,r,i,s,c,u,d,f,{_events:h,_view:p,_viewDates:m,noEventsClick:$,noEventsContent:g,theme:v}=R("state");return a(t,h,(t=>n(12,s=t))),a(t,p,(t=>n(13,o=t))),a(t,m,(t=>n(1,c=t))),a(t,$,(t=>n(14,r=t))),a(t,g,(t=>n(11,i=t))),a(t,v,(t=>n(3,u=t))),t.$$.update=()=>{if(4098&t.$$.dirty&&(n(2,d=!0),c.length)){let t=c[0],e=Tt(xt(c[c.length-1]));for(let o of s)if(!he(o.display)&&o.start<e&&o.end>t){n(2,d=!1);break}}2049&t.$$.dirty&&(n(0,f=l(i)?i():i),"string"==typeof f&&n(0,f={html:f}))},[f,c,d,u,h,p,m,$,g,v,function(t){l(r)&&r({jsEvent:t,view:Jt(o)})},i,s]}let lo=class extends ft{constructor(t){super(),dt(this,t,ro,oo,i,{})}};var io={createOptions(t){t.buttonText.listDay="list",t.buttonText.listWeek="list",t.buttonText.listMonth="list",t.buttonText.listYear="list",t.listDayFormat={weekday:"long"},t.listDaySideFormat={year:"numeric",month:"long",day:"numeric"},t.noEventsClick=void 0,t.noEventsContent="No events",t.theme.daySide="ec-day-side",t.theme.eventTag="ec-event-tag",t.theme.noEvents="ec-no-events",t.view="listWeek",t.views.listDay={buttonText:$e,component:lo,duration:{days:1},theme:be("ec-list ec-day-view")},t.views.listWeek={buttonText:ge,component:lo,duration:{weeks:1},theme:be("ec-list ec-week-view")},t.views.listMonth={buttonText:ve,component:lo,duration:{months:1},theme:be("ec-list ec-month-view")},t.views.listYear={buttonText:ye,component:lo,duration:{years:1},theme:be("ec-list ec-year-view")}},createStores(t){t._intlListDay=ke(t.locale,t.listDayFormat),t._intlListDaySide=ke(t.locale,t.listDaySideFormat)}};const so=t=>({}),co=t=>({});function ao(t,e,n){const o=t.slice();return o[9]=e[n],o}function uo(t){let e,n,o,r,i,s;return{c(){e=k("time"),E(e,"class",n=t[1].time),E(e,"datetime",o=t[9][0])},m(n,o){y(n,e,o),i||(s=$(r=vt.call(null,e,t[9][1])),i=!0)},p(i,s){t=i,2&s&&n!==(n=t[1].time)&&E(e,"class",n),4&s&&o!==(o=t[9][0])&&E(e,"datetime",o),r&&l(r.update)&&4&s&&r.update.call(null,t[9][1])},d(t){t&&w(e),i=!1,s()}}}function fo(t){let e,n,o,r,i,s,c,a,d,m,g,x,_,T,D,S=lt(t[2]),M=[];for(let e=0;e<S.length;e+=1)M[e]=uo(ao(t,S,e));const U=t[8].lines,L=u(U,t,t[7],co),H=t[8].default,B=u(H,t,t[7],null);return{c(){e=k("div"),n=k("div"),i=C();for(let t=0;t<M.length;t+=1)M[t].c();c=C(),a=k("div"),d=k("div"),L&&L.c(),g=C(),B&&B.c(),E(n,"class",o=t[1].sidebarTitle),E(e,"class",s=t[1].sidebar),E(d,"class",m=t[1].lines),E(a,"class",x=t[1].days),E(a,"role","row")},m(o,l){y(o,e,l),v(e,n),v(e,i);for(let t=0;t<M.length;t+=1)M[t]&&M[t].m(e,null);y(o,c,l),y(o,a,l),v(a,d),L&&L.m(d,null),v(a,g),B&&B.m(a,null),_=!0,T||(D=$(r=vt.call(null,n,t[0])),T=!0)},p(t,i){let[c]=i;if((!_||2&c&&o!==(o=t[1].sidebarTitle))&&E(n,"class",o),r&&l(r.update)&&1&c&&r.update.call(null,t[0]),6&c){let n;for(S=lt(t[2]),n=0;n<S.length;n+=1){const o=ao(t,S,n);M[n]?M[n].p(o,c):(M[n]=uo(o),M[n].c(),M[n].m(e,null))}for(;n<M.length;n+=1)M[n].d(1);M.length=S.length}(!_||2&c&&s!==(s=t[1].sidebar))&&E(e,"class",s),L&&L.p&&(!_||128&c)&&h(L,U,t,t[7],_?f(U,t[7],c,so):p(t[7]),co),(!_||2&c&&m!==(m=t[1].lines))&&E(d,"class",m),B&&B.p&&(!_||128&c)&&h(B,H,t,t[7],_?f(H,t[7],c,null):p(t[7]),null),(!_||2&c&&x!==(x=t[1].days))&&E(a,"class",x)},i(t){_||(ot(L,t),ot(B,t),_=!0)},o(t){rt(L,t),rt(B,t),_=!1},d(t){t&&(w(e),w(c),w(a)),b(M,t),L&&L.d(t),B&&B.d(t),T=!1,D()}}}function ho(t,e,n){let o,r,i,s,{$$slots:c={},$$scope:u}=e,{allDayContent:d,theme:f,_times:h}=R("state");return a(t,d,(t=>n(6,o=t))),a(t,f,(t=>n(1,r=t))),a(t,h,(t=>n(2,i=t))),t.$$set=t=>{"$$scope"in t&&n(7,u=t.$$scope)},t.$$.update=()=>{64&t.$$.dirty&&n(0,s=function(t){let e,n="all-day";return t?(e=l(t)?t({text:n}):t,"string"==typeof e&&(e={html:e})):e={html:n},e}(o))},[s,r,i,d,f,h,o,u,c]}class po extends ft{constructor(t){super(),dt(this,t,ho,fo,i,{})}}function mo(t,e,n){const o=t.slice();return o[24]=e[n],o}function $o(t){let e;const n=t[16].default,o=u(n,t,t[18],null);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,r){o&&o.p&&(!e||262144&r)&&h(o,n,t,t[18],e?f(n,t[18],r,null):p(t[18]),null)},i(t){e||(ot(o,t),e=!0)},o(t){rt(o,t),e=!1},d(t){o&&o.d(t)}}}function go(t){let e,n;return{c(){e=k("div"),E(e,"class",n=t[3].line)},m(t,n){y(t,e,n)},p(t,o){8&o&&n!==(n=t[3].line)&&E(e,"class",n)},d(t){t&&w(e)}}}function vo(t){let e,n=lt(t[2]),o=[];for(let e=0;e<n.length;e+=1)o[e]=go(mo(t,n,e));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=_()},m(t,n){for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,n);y(t,e,n)},p(t,r){if(12&r){let l;for(n=lt(t[2]),l=0;l<n.length;l+=1){const i=mo(t,n,l);o[l]?o[l].p(i,r):(o[l]=go(i),o[l].c(),o[l].m(e.parentNode,e))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(t){t&&w(e),b(o,t)}}}function yo(t){let e,n,o,r,l,i;return o=new po({props:{$$slots:{lines:[vo],default:[$o]},$$scope:{ctx:t}}}),{c(){e=k("div"),n=k("div"),ct(o.$$.fragment),E(n,"class",r=t[3].content),E(e,"class",l=t[3].body+(t[1]?" "+t[3].compact:""))},m(r,l){y(r,e,l),v(e,n),at(o,n,null),t[17](e),i=!0},p(t,s){let[c]=s;const a={};262156&c&&(a.$$scope={dirty:c,ctx:t}),o.$set(a),(!i||8&c&&r!==(r=t[3].content))&&E(n,"class",r),(!i||10&c&&l!==(l=t[3].body+(t[1]?" "+t[3].compact:"")))&&E(e,"class",l)},i(t){i||(ot(o.$$.fragment,t),i=!0)},o(t){rt(o.$$.fragment,t),i=!1},d(n){n&&w(e),ut(o),t[17](null)}}}function wo(t,e,n){let o,r,l,i,s,c,u,d,f,h,{$$slots:p={},$$scope:$}=e,{_bodyEl:g,_viewDates:v,_slotTimeLimits:y,_times:w,scrollTime:b,slotDuration:k,slotHeight:x,theme:C}=R("state");a(t,g,(t=>n(22,u=t))),a(t,v,(t=>n(13,i=t))),a(t,y,(t=>n(14,s=t))),a(t,w,(t=>n(15,c=t))),a(t,b,(t=>n(21,l=t))),a(t,k,(t=>n(12,r=t))),a(t,x,(t=>n(20,o=t))),a(t,C,(t=>n(3,d=t)));let _,T=[];return t.$$set=t=>{"$$scope"in t&&n(18,$=t.$$scope)},t.$$.update=()=>{1&t.$$.dirty&&m(g,u=f,u),53248&t.$$.dirty&&(n(1,h=r.seconds>=3600),n(2,T.length=c.length,T),_=s.min.seconds),8193&t.$$.dirty&&f&&i&&n(0,f.scrollTop=((l.seconds-_)/r.seconds-.5)*o,f)},[f,h,T,d,g,v,y,w,b,k,x,C,r,i,s,c,p,function(t){I[t?"unshift":"push"]((()=>{f=t,n(0,f)}))},$]}class bo extends ft{constructor(t){super(),dt(this,t,wo,yo,i,{})}}function ko(t){let e,n,o,i,s,c,a,u,d,f,h;var p=t[10].resizer;function m(t,e){return{props:{event:t[0]}}}return p&&(c=U(p,m(t)),c.$on("pointerdown",(function(){l(t[33](t[10],!0))&&t[33](t[10],!0).apply(this,arguments)}))),{c(){e=k("article"),n=k("div"),s=C(),c&&ct(c.$$.fragment),E(n,"class",o=t[2].eventBody),E(e,"class",t[4]),E(e,"style",t[5]),E(e,"role",a=t[7]?"button":void 0),E(e,"tabindex",u=t[7]?0:void 0)},m(o,r){y(o,e,r),v(e,n),v(e,s),c&&at(c,e,null),t[52](e),d=!0,f||(h=[$(i=vt.call(null,n,t[6])),T(e,"click",(function(){l(t[7])&&t[7].apply(this,arguments)})),T(e,"keydown",(function(){l(t[7]&&gt(t[7]))&&(t[7]&&gt(t[7])).apply(this,arguments)})),T(e,"mouseenter",(function(){l(t[32](t[8],t[1]))&&t[32](t[8],t[1]).apply(this,arguments)})),T(e,"mouseleave",(function(){l(t[32](t[9],t[1]))&&t[32](t[9],t[1]).apply(this,arguments)})),T(e,"pointerdown",(function(){l(!he(t[1])&&!fe(t[1])&&t[33](t[10]))&&(!he(t[1])&&!fe(t[1])&&t[33](t[10])).apply(this,arguments)}))],f=!0)},p(r,s){if(t=r,(!d||4&s[0]&&o!==(o=t[2].eventBody))&&E(n,"class",o),i&&l(i.update)&&64&s[0]&&i.update.call(null,t[6]),1024&s[0]&&p!==(p=t[10].resizer)){if(c){et();const t=c;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}p?(c=U(p,m(t)),c.$on("pointerdown",(function(){l(t[33](t[10],!0))&&t[33](t[10],!0).apply(this,arguments)})),ct(c.$$.fragment),ot(c.$$.fragment,1),at(c,e,null)):c=null}else if(p){const e={};1&s[0]&&(e.event=t[0]),c.$set(e)}(!d||16&s[0])&&E(e,"class",t[4]),(!d||32&s[0])&&E(e,"style",t[5]),(!d||128&s[0]&&a!==(a=t[7]?"button":void 0))&&E(e,"role",a),(!d||128&s[0]&&u!==(u=t[7]?0:void 0))&&E(e,"tabindex",u)},i(t){d||(c&&ot(c.$$.fragment,t),d=!0)},o(t){c&&rt(c.$$.fragment,t),d=!1},d(n){n&&w(e),c&&ut(c),t[52](null),f=!1,r(h)}}}function xo(t,e,n){let o,r,i,s,c,u,d,f,h,p,m,$,g,v,y,w,b,k,x,C,_,T,D,E,S,M,U,L,H,{date:B}=e,{chunk:F}=e,{displayEventEnd:P,eventBackgroundColor:z,eventTextColor:A,eventColor:G,eventContent:j,eventClick:O,eventDidMount:W,eventClassNames:Y,eventMouseEnter:q,eventMouseLeave:X,slotEventOverlap:V,slotDuration:J,slotHeight:K,theme:Q,_view:Z,_intlEventTime:tt,_interaction:et,_iClasses:nt,_resBgColor:ot,_resTxtColor:rt,_slotTimeLimits:lt}=R("state");function it(t,e){return!fe(e)&&l(t)?e=>t({event:ce(D),el:T,jsEvent:e,view:Jt(r)}):void 0}return a(t,P,(t=>n(40,d=t))),a(t,z,(t=>n(47,v=t))),a(t,A,(t=>n(44,m=t))),a(t,G,(t=>n(46,g=t))),a(t,j,(t=>n(39,u=t))),a(t,O,(t=>n(36,o=t))),a(t,W,(t=>n(54,i=t))),a(t,Y,(t=>n(41,f=t))),a(t,q,(t=>n(8,x=t))),a(t,X,(t=>n(9,C=t))),a(t,V,(t=>n(43,p=t))),a(t,J,(t=>n(51,k=t))),a(t,K,(t=>n(49,w=t))),a(t,Q,(t=>n(2,c=t))),a(t,Z,(t=>n(37,r=t))),a(t,tt,(t=>n(38,s=t))),a(t,et,(t=>n(10,_=t))),a(t,nt,(t=>n(42,h=t))),a(t,ot,(t=>n(48,y=t))),a(t,rt,(t=>n(45,$=t))),a(t,lt,(t=>n(50,b=t))),N((()=>{l(i)&&i({event:ce(D),timeText:L,el:T,view:Jt(r)})})),t.$$set=t=>{"date"in t&&n(34,B=t.date),"chunk"in t&&n(35,F=t.chunk)},t.$$.update=()=>{if(16&t.$$.dirty[1]&&n(0,D=F.event),39&t.$$.dirty[0]|2096216&t.$$.dirty[1]){n(1,E=D.display);let t=k.seconds/60,e=b.min.seconds/60,o=(F.start-B)/1e3/60,l=(F.end-B)/1e3/60,i=(o-e)/t*w,s=(l-o)/t*w,a=(b.max.seconds/60-o)/t*w,u=D.backgroundColor||y(D)||v||g,d=D.textColor||$(D)||m;n(5,M=`top:${i}px;min-height:${s}px;height:${s}px;max-height:${a}px;`),u&&n(5,M+=`background-color:${u};`),d&&n(5,M+=`color:${d};`),(!he(E)&&!fe(E)||me(E))&&n(5,M+=`z-index:${F.column+1};left:${100/F.group.columns.length*F.column}%;width:${100/F.group.columns.length*(p?.5*(1+F.group.columns.length-F.column):1)}%;`),n(4,S=[he(E)?c.bgEvent:c.event,...h([],D),...se(f,D,r)].join(" "))}4&t.$$.dirty[0]|976&t.$$.dirty[1]&&n(6,[L,U]=le(F,d,u,c,s,r),U),2&t.$$.dirty[0]|32&t.$$.dirty[1]&&n(7,H=!he(E)&&it(o,E))},[D,E,c,T,S,M,U,H,x,C,_,P,z,A,G,j,O,W,Y,q,X,V,J,K,Q,Z,tt,et,nt,ot,rt,lt,it,function(t,e){return t.action?n=>t.action.drag(D,n,e):void 0},B,F,o,r,s,u,d,f,h,p,m,$,g,v,y,w,b,k,function(t){I[t?"unshift":"push"]((()=>{T=t,n(3,T)}))}]}let Co=class extends ft{constructor(t){super(),dt(this,t,xo,ko,i,{date:34,chunk:35},null,[-1,-1])}};function _o(e){let n,o;return{c(){n=k("div"),E(n,"class",o=e[1].nowIndicator),M(n,"top",e[0]+"px")},m(t,e){y(t,n,e)},p(t,e){let[r]=e;2&r&&o!==(o=t[1].nowIndicator)&&E(n,"class",o),1&r&&M(n,"top",t[0]+"px")},i:t,o:t,d(t){t&&w(n)}}}function To(t,e,n){let o,r,l,i,s,c,u,{slotDuration:d,slotHeight:f,theme:h,_now:p,_today:m,_slotTimeLimits:$}=R("state");a(t,d,(t=>n(11,l=t))),a(t,f,(t=>n(9,o=t))),a(t,h,(t=>n(1,c=t))),a(t,p,(t=>n(13,s=t))),a(t,m,(t=>n(12,i=t))),a(t,$,(t=>n(10,r=t)));let g=0;return t.$$.update=()=>{if(12288&t.$$.dirty&&n(8,u=(s-i)/1e3/60),3840&t.$$.dirty){let t=l.seconds/60,e=r.min.seconds/60;n(0,g=(u-e)/t*o)}},[g,c,d,f,h,p,m,$,u,o,r,l,i,s]}class Do extends ft{constructor(t){super(),dt(this,t,To,_o,i,{})}}function Eo(t,e,n){const o=t.slice();return o[33]=e[n],o}function So(t,e,n){const o=t.slice();return o[33]=e[n],o}function Mo(t,e){let n,o,r;return o=new Co({props:{date:e[0],chunk:e[33]}}),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){e=t;const r={};1&n[0]&&(r.date=e[0]),8&n[0]&&(r.chunk=e[33]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(o,t)}}}function Uo(t){let e,n;return e=new Co({props:{date:t[0],chunk:t[4][1]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.date=t[0]),16&n[0]&&(o.chunk=t[4][1]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Lo(t,e){let n,o,r;return o=new Co({props:{date:e[0],chunk:e[33]}}),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){e=t;const r={};1&n[0]&&(r.date=e[0]),4&n[0]&&(r.chunk=e[33]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),ut(o,t)}}}function Ho(t){let e,n;return e=new Co({props:{date:t[0],chunk:t[4][0]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.date=t[0]),16&n[0]&&(o.chunk=t[4][0]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Bo(t){let e,n;return e=new Do({}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function No(t){let e,n,o,i,s,c,a,u,d,f,h,p,m,$,g,b=[],x=new Map,_=[],D=new Map,S=lt(t[3]);const M=t=>t[33].event;for(let e=0;e<S.length;e+=1){let n=So(t,S,e),o=M(n);x.set(o,b[e]=Mo(o,n))}let U=t[4][1]&&Uo(t),L=lt(t[2]);const H=t=>t[33].event;for(let e=0;e<L.length;e+=1){let n=Eo(t,L,e),o=H(n);D.set(o,_[e]=Lo(o,n))}let B=t[4][0]&&!t[4][0].event.allDay&&Ho(t),N=t[9]&&t[5]&&Bo();return{c(){e=k("div"),n=k("div");for(let t=0;t<b.length;t+=1)b[t].c();i=C(),s=k("div"),U&&U.c(),c=C();for(let t=0;t<_.length;t+=1)_[t].c();a=C(),B&&B.c(),d=C(),f=k("div"),N&&N.c(),E(n,"class",o=t[7].bgEvents),E(s,"class",u=t[7].events),E(f,"class",h=t[7].extra),E(e,"class",p=t[7].day+" "+t[7].weekdays?.[t[0].getUTCDay()]+(t[5]?" "+t[7].today:"")+(t[6]?" "+t[7].highlight:"")),E(e,"role","cell")},m(o,r){y(o,e,r),v(e,n);for(let t=0;t<b.length;t+=1)b[t]&&b[t].m(n,null);v(e,i),v(e,s),U&&U.m(s,null),v(s,c);for(let t=0;t<_.length;t+=1)_[t]&&_[t].m(s,null);v(s,a),B&&B.m(s,null),v(e,d),v(e,f),N&&N.m(f,null),t[29](e),m=!0,$||(g=[T(e,"pointerenter",(function(){l(t[20](t[8]))&&t[20](t[8]).apply(this,arguments)})),T(e,"pointerleave",(function(){l(t[8].pointer?.leave)&&t[8].pointer?.leave.apply(this,arguments)})),T(e,"pointerdown",(function(){l(t[8].action?.select)&&t[8].action?.select.apply(this,arguments)}))],$=!0)},p(r,l){t=r,9&l[0]&&(S=lt(t[3]),et(),b=st(b,l,M,1,t,S,x,n,it,Mo,null,So),nt()),(!m||128&l[0]&&o!==(o=t[7].bgEvents))&&E(n,"class",o),t[4][1]?U?(U.p(t,l),16&l[0]&&ot(U,1)):(U=Uo(t),U.c(),ot(U,1),U.m(s,c)):U&&(et(),rt(U,1,1,(()=>{U=null})),nt()),5&l[0]&&(L=lt(t[2]),et(),_=st(_,l,H,1,t,L,D,s,it,Lo,a,Eo),nt()),t[4][0]&&!t[4][0].event.allDay?B?(B.p(t,l),16&l[0]&&ot(B,1)):(B=Ho(t),B.c(),ot(B,1),B.m(s,null)):B&&(et(),rt(B,1,1,(()=>{B=null})),nt()),(!m||128&l[0]&&u!==(u=t[7].events))&&E(s,"class",u),t[9]&&t[5]?N?544&l[0]&&ot(N,1):(N=Bo(),N.c(),ot(N,1),N.m(f,null)):N&&(et(),rt(N,1,1,(()=>{N=null})),nt()),(!m||128&l[0]&&h!==(h=t[7].extra))&&E(f,"class",h),(!m||225&l[0]&&p!==(p=t[7].day+" "+t[7].weekdays?.[t[0].getUTCDay()]+(t[5]?" "+t[7].today:"")+(t[6]?" "+t[7].highlight:"")))&&E(e,"class",p)},i(t){if(!m){for(let t=0;t<S.length;t+=1)ot(b[t]);ot(U);for(let t=0;t<L.length;t+=1)ot(_[t]);ot(B),ot(N),m=!0}},o(t){for(let t=0;t<b.length;t+=1)rt(b[t]);rt(U);for(let t=0;t<_.length;t+=1)rt(_[t]);rt(B),rt(N),m=!1},d(n){n&&w(e);for(let t=0;t<b.length;t+=1)b[t].d();U&&U.d();for(let t=0;t<_.length;t+=1)_[t].d();B&&B.d(),N&&N.d(),t[29](null),$=!1,r(g)}}}function Fo(t,e,n){let o,r,l,i,s,c,u,d,f,h,p,{date:m}=e,{resource:$}=e,{_events:g,_iEvents:v,highlightedDates:y,nowIndicator:w,slotDuration:b,slotHeight:k,theme:x,_interaction:C,_today:_,_slotTimeLimits:T}=R("state");a(t,g,(t=>n(28,u=t))),a(t,v,(t=>n(27,c=t))),a(t,y,(t=>n(25,i=t))),a(t,w,(t=>n(9,h=t))),a(t,b,(t=>n(31,r=t))),a(t,k,(t=>n(30,o=t))),a(t,x,(t=>n(7,d=t))),a(t,C,(t=>n(8,f=t))),a(t,_,(t=>n(26,s=t))),a(t,T,(t=>n(24,l=t)));let D,E,S,M,U,L,H=[];function B(t){return t-=Gt(p).top,{allDay:!1,date:Ct(Ct(xt(m),l.min),r,Rt(t/o)),resource:$,dayEl:p}}return t.$$set=t=>{"date"in t&&n(0,m=t.date),"resource"in t&&n(21,$=t.resource)},t.$$.update=()=>{if(16777217&t.$$.dirty[0]&&(n(22,U=Ct(xt(m),l.min)),n(23,L=Ct(xt(m),l.max))),283115532&t.$$.dirty[0]){n(2,D=[]),n(3,E=[]);for(let t of u)if(!t.allDay&&de(t,U,L,$,!0)){let e=ee(t,U,L);if("background"===t.display)E.push(e);else D.push(e)}!function(t){if(!t.length)return;ne(t);let e={columns:[],end:t[0].end};for(let n of t){let t=0;if(n.start<e.end){for(;t<e.columns.length&&!(e.columns[t][e.columns[t].length-1].end<=n.start);++t);n.end>e.end&&(e.end=n.end)}else e={columns:[],end:n.end};e.columns.length<t+1&&e.columns.push([]),e.columns[t].push(n),n.group=e,n.column=t}}(D)}148897792&t.$$.dirty[0]&&n(4,H=c.map((t=>t&&de(t,U,L,$,!0)?ee(t,U,L):null))),67108865&t.$$.dirty[0]&&n(5,S=Ut(m,s)),33554433&t.$$.dirty[0]&&n(6,M=i.some((t=>Ut(t,m)))),2&t.$$.dirty[0]&&p&&Yt(p,B)},[m,p,D,E,H,S,M,d,f,h,g,v,y,w,b,k,x,C,_,T,function(t){return t.pointer?e=>t.pointer.enterTimeGrid(m,p,e,$):void 0},$,U,L,l,i,s,c,u,function(t){I[t?"unshift":"push"]((()=>{p=t,n(1,p)}))}]}let Po=class extends ft{constructor(t){super(),dt(this,t,Fo,No,i,{date:0,resource:21},null,[-1,-1])}};function Ro(t){let e,n,o,i,s,c,a,u,d,f,h;var p=t[10].resizer;function m(t,e){return{props:{event:t[0]}}}return p&&(c=U(p,m(t)),c.$on("pointerdown",(function(){l(t[29](t[10],!0))&&t[29](t[10],!0).apply(this,arguments)}))),{c(){e=k("article"),n=k("div"),s=C(),c&&ct(c.$$.fragment),E(n,"class",o=t[2].eventBody),E(e,"class",t[4]),E(e,"style",t[5]),E(e,"role",a=t[7]?"button":void 0),E(e,"tabindex",u=t[7]?0:void 0)},m(o,r){y(o,e,r),v(e,n),v(e,s),c&&at(c,e,null),t[46](e),d=!0,f||(h=[$(i=vt.call(null,n,t[6])),T(e,"click",(function(){l(t[7])&&t[7].apply(this,arguments)})),T(e,"keydown",(function(){l(t[7]&&gt(t[7]))&&(t[7]&&gt(t[7])).apply(this,arguments)})),T(e,"mouseenter",(function(){l(t[28](t[8],t[1]))&&t[28](t[8],t[1]).apply(this,arguments)})),T(e,"mouseleave",(function(){l(t[28](t[9],t[1]))&&t[28](t[9],t[1]).apply(this,arguments)})),T(e,"pointerdown",(function(){l(!fe(t[1])&&t[29](t[10]))&&(!fe(t[1])&&t[29](t[10])).apply(this,arguments)}))],f=!0)},p(r,s){if(t=r,(!d||4&s[0]&&o!==(o=t[2].eventBody))&&E(n,"class",o),i&&l(i.update)&&64&s[0]&&i.update.call(null,t[6]),1024&s[0]&&p!==(p=t[10].resizer)){if(c){et();const t=c;rt(t.$$.fragment,1,0,(()=>{ut(t,1)})),nt()}p?(c=U(p,m(t)),c.$on("pointerdown",(function(){l(t[29](t[10],!0))&&t[29](t[10],!0).apply(this,arguments)})),ct(c.$$.fragment),ot(c.$$.fragment,1),at(c,e,null)):c=null}else if(p){const e={};1&s[0]&&(e.event=t[0]),c.$set(e)}(!d||16&s[0])&&E(e,"class",t[4]),(!d||32&s[0])&&E(e,"style",t[5]),(!d||128&s[0]&&a!==(a=t[7]?"button":void 0))&&E(e,"role",a),(!d||128&s[0]&&u!==(u=t[7]?0:void 0))&&E(e,"tabindex",u)},i(t){d||(c&&ot(c.$$.fragment,t),d=!0)},o(t){c&&rt(c.$$.fragment,t),d=!1},d(n){n&&w(e),c&&ut(c),t[46](null),f=!1,r(h)}}}function zo(t,e,n){let o,r,i,s,c,u,d,f,h,p,m,$,g,v,y,w,b,k,x,C,_,T,D,{chunk:E}=e,{longChunks:S={}}=e,{displayEventEnd:M,eventBackgroundColor:U,eventTextColor:L,eventClick:H,eventColor:B,eventContent:F,eventClassNames:P,eventDidMount:z,eventMouseEnter:A,eventMouseLeave:G,theme:j,_view:O,_intlEventTime:W,_interaction:Y,_iClasses:q,_resBgColor:X,_resTxtColor:V}=R("state");a(t,M,(t=>n(38,d=t))),a(t,U,(t=>n(44,g=t))),a(t,L,(t=>n(41,p=t))),a(t,H,(t=>n(34,o=t))),a(t,B,(t=>n(43,$=t))),a(t,F,(t=>n(37,u=t))),a(t,P,(t=>n(39,f=t))),a(t,z,(t=>n(48,i=t))),a(t,A,(t=>n(8,y=t))),a(t,G,(t=>n(9,w=t))),a(t,j,(t=>n(2,c=t))),a(t,O,(t=>n(35,r=t))),a(t,W,(t=>n(36,s=t))),a(t,Y,(t=>n(10,b=t))),a(t,q,(t=>n(40,h=t))),a(t,X,(t=>n(45,v=t))),a(t,V,(t=>n(42,m=t)));let J,K,Q=1;function Z(t,e){return!fe(e)&&l(t)?e=>t({event:ce(x),el:k,jsEvent:e,view:Jt(r)}):void 0}return N((()=>{l(i)&&i({event:ce(x),timeText:D,el:k,view:Jt(r)})})),t.$$set=t=>{"chunk"in t&&n(30,E=t.chunk),"longChunks"in t&&n(31,S=t.longChunks)},t.$$.update=()=>{if(1073741824&t.$$.dirty[0]&&n(0,x=E.event),1073741861&t.$$.dirty[0]|32532&t.$$.dirty[1]){n(1,J=x.display);let t=x.backgroundColor||v(x)||g||$,e=x.textColor||m(x)||p;n(5,_=`width:calc(${100*E.days}% + ${7*(E.days-1)}px);margin-top:${Q}px;`),t&&n(5,_+=`background-color:${t};`),e&&n(5,_+=`color:${e};`),n(4,C=[c.event,...h([],x),...se(f,x,r)].join(" "))}1073741828&t.$$.dirty[0]|240&t.$$.dirty[1]&&n(6,[D,T]=le(E,d,u,c,s,r),T),2&t.$$.dirty[0]|8&t.$$.dirty[1]&&n(7,K=Z(o,J))},[x,J,c,k,C,_,T,K,y,w,b,M,U,L,H,B,F,P,z,A,G,j,O,W,Y,q,X,V,Z,function(t,e){return t.action?n=>t.action.drag(x,n,e):void 0},E,S,function(){k&&!pe(J)&&n(33,Q=re(E,S,Ot(k)))},Q,o,r,s,u,d,f,h,p,m,$,g,v,function(t){I[t?"unshift":"push"]((()=>{k=t,n(3,k)}))}]}class Ao extends ft{constructor(t){super(),dt(this,t,zo,Ro,i,{chunk:30,longChunks:31,reposition:32},null,[-1,-1])}get reposition(){return this.$$.ctx[32]}}function Io(t,e,n){const o=t.slice();return o[21]=e[n],o[22]=e,o[23]=n,o}function Go(t){let e,n,o,r;return n=new Ao({props:{chunk:t[2][0]}}),{c(){e=k("div"),ct(n.$$.fragment),E(e,"class",o=t[8].events+" "+t[8].preview)},m(t,o){y(t,e,o),at(n,e,null),r=!0},p(t,l){const i={};4&l&&(i.chunk=t[2][0]),n.$set(i),(!r||256&l&&o!==(o=t[8].events+" "+t[8].preview))&&E(e,"class",o)},i(t){r||(ot(n.$$.fragment,t),r=!0)},o(t){rt(n.$$.fragment,t),r=!1},d(t){t&&w(e),ut(n)}}}function jo(t,e){let n,o,r,l=e[23];const i=()=>e[19](o,l),s=()=>e[19](null,l);let c={chunk:e[21],longChunks:e[1]};return o=new Ao({props:c}),i(),{key:t,first:null,c(){n=_(),ct(o.$$.fragment),this.first=n},m(t,e){y(t,n,e),at(o,t,e),r=!0},p(t,n){l!==(e=t)[23]&&(s(),l=e[23],i());const r={};16&n&&(r.chunk=e[21]),2&n&&(r.longChunks=e[1]),o.$set(r)},i(t){r||(ot(o.$$.fragment,t),r=!0)},o(t){rt(o.$$.fragment,t),r=!1},d(t){t&&w(n),s(),ut(o,t)}}}function Oo(t){let e,n,o,i,s,c,a,u,d=t[2][0]&&Ut(t[2][0].date,t[0]),f=[],h=new Map,p=d&&Go(t),m=lt(t[4]);const $=t=>t[21].event;for(let e=0;e<m.length;e+=1){let n=Io(t,m,e),o=$(n);h.set(o,f[e]=jo(o,n))}return{c(){e=k("div"),p&&p.c(),n=C(),o=k("div");for(let t=0;t<f.length;t+=1)f[t].c();E(o,"class",i=t[8].events),E(e,"class",s=t[8].day+" "+t[8].weekdays?.[t[0].getUTCDay()]+(t[5]?" "+t[8].today:"")+(t[6]?" "+t[8].highlight:"")),E(e,"role","cell")},m(r,i){y(r,e,i),p&&p.m(e,null),v(e,n),v(e,o);for(let t=0;t<f.length;t+=1)f[t]&&f[t].m(o,null);t[20](e),c=!0,a||(u=[T(window,"resize",t[14]),T(e,"pointerdown",(function(){l(t[9].action?.select)&&t[9].action?.select.apply(this,arguments)}))],a=!0)},p(r,l){let[a]=l;t=r,5&a&&(d=t[2][0]&&Ut(t[2][0].date,t[0])),d?p?(p.p(t,a),5&a&&ot(p,1)):(p=Go(t),p.c(),ot(p,1),p.m(e,n)):p&&(et(),rt(p,1,1,(()=>{p=null})),nt()),146&a&&(m=lt(t[4]),et(),f=st(f,a,$,1,t,m,h,o,it,jo,null,Io),nt()),(!c||256&a&&i!==(i=t[8].events))&&E(o,"class",i),(!c||353&a&&s!==(s=t[8].day+" "+t[8].weekdays?.[t[0].getUTCDay()]+(t[5]?" "+t[8].today:"")+(t[6]?" "+t[8].highlight:"")))&&E(e,"class",s)},i(t){if(!c){ot(p);for(let t=0;t<m.length;t+=1)ot(f[t]);c=!0}},o(t){rt(p);for(let t=0;t<f.length;t+=1)rt(f[t]);c=!1},d(n){n&&w(e),p&&p.d();for(let t=0;t<f.length;t+=1)f[t].d();t[20](null),a=!1,r(u)}}}function Wo(t,e,n){let o,r,l,i,s,c,u,d,{date:f}=e,{chunks:h}=e,{longChunks:p}=e,{iChunks:m=[]}=e,{resource:$}=e,{highlightedDates:g,theme:v,_interaction:y,_today:w}=R("state");a(t,g,(t=>n(17,o=t))),a(t,v,(t=>n(8,l=t))),a(t,y,(t=>n(9,i=t))),a(t,w,(t=>n(18,r=t)));let b=[];function k(){n(7,b.length=c.length,b);for(let t of b)t&&t.reposition&&t.reposition()}return F(k),t.$$set=t=>{"date"in t&&n(0,f=t.date),"chunks"in t&&n(15,h=t.chunks),"longChunks"in t&&n(1,p=t.longChunks),"iChunks"in t&&n(2,m=t.iChunks),"resource"in t&&n(16,$=t.resource)},t.$$.update=()=>{if(32785&t.$$.dirty){n(4,c=[]);for(let t of h)Ut(t.date,f)&&c.push(t)}262145&t.$$.dirty&&n(5,u=Ut(f,r)),131073&t.$$.dirty&&n(6,d=o.some((t=>Ut(t,f)))),65545&t.$$.dirty&&s&&Yt(s,(()=>({allDay:!0,date:f,resource:$,dayEl:s})))},[f,p,m,s,c,u,d,b,l,i,g,v,y,w,k,h,$,o,r,function(t,e){I[t?"unshift":"push"]((()=>{b[e]=t,n(7,b)}))},function(t){I[t?"unshift":"push"]((()=>{s=t,n(3,s)}))}]}class Yo extends ft{constructor(t){super(),dt(this,t,Wo,Oo,i,{date:0,chunks:15,longChunks:1,iChunks:2,resource:16})}}function qo(t,e,n){const o=t.slice();return o[14]=e[n],o}function Xo(t){let e,n;return e=new Yo({props:{date:t[14],chunks:t[2],longChunks:t[3],iChunks:t[4],resource:t[1]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.date=t[14]),4&n&&(o.chunks=t[2]),8&n&&(o.longChunks=t[3]),16&n&&(o.iChunks=t[4]),2&n&&(o.resource=t[1]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Vo(t){let e,n,o=lt(t[0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Xo(qo(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){let[i]=n;if(31&i){let n;for(o=lt(t[0]),n=0;n<o.length;n+=1){const l=qo(t,o,n);r[n]?(r[n].p(l,i),ot(r[n],1)):(r[n]=Xo(l),r[n].c(),ot(r[n],1),r[n].m(e.parentNode,e))}for(et(),n=o.length;n<r.length;n+=1)l(n);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Jo(t,e,n){let o,r,l,{dates:i}=e,{resource:s}=e,{_events:c,_iEvents:u,hiddenDays:d,theme:f}=R("state");a(t,c,(t=>n(12,l=t))),a(t,u,(t=>n(11,r=t))),a(t,d,(t=>n(10,o=t)));let h,p,m,$,g=[];return t.$$set=t=>{"dates"in t&&n(0,i=t.dates),"resource"in t&&n(1,s=t.resource)},t.$$.update=()=>{if(1&t.$$.dirty&&(n(8,m=i[0]),n(9,$=Tt(xt(i[i.length-1])))),5894&t.$$.dirty){n(2,h=[]);for(let t of l)if(t.allDay&&"background"!==t.display&&de(t,m,$,s)){let e=ee(t,m,$);h.push(e)}n(3,p=oe(h,o))}3842&t.$$.dirty&&n(4,g=r.map((t=>{let e;return t&&t.allDay&&de(t,m,$,s)?(e=ee(t,m,$),oe([e],o)):e=null,e})))},[i,s,h,p,g,c,u,d,m,$,o,r,l]}class Ko extends ft{constructor(t){super(),dt(this,t,Jo,Vo,i,{dates:0,resource:1})}}function Qo(t,e,n){const o=t.slice();return o[10]=e[n],o}function Zo(t,e,n){const o=t.slice();return o[10]=e[n],o}function tr(t){let e,n,o,r,i,s,c,a,u;return{c(){e=k("div"),n=k("time"),s=C(),E(n,"datetime",o=Mt(t[10],10)),E(n,"aria-label",r=t[2].format(t[10])),E(e,"class",c=t[0].day+" "+t[0].weekdays?.[t[10].getUTCDay()]),E(e,"role","columnheader")},m(o,r){y(o,e,r),v(e,n),v(e,s),a||(u=$(i=vt.call(null,n,t[3].format(t[10]))),a=!0)},p(s,a){t=s,2&a&&o!==(o=Mt(t[10],10))&&E(n,"datetime",o),6&a&&r!==(r=t[2].format(t[10]))&&E(n,"aria-label",r),i&&l(i.update)&&10&a&&i.update.call(null,t[3].format(t[10])),3&a&&c!==(c=t[0].day+" "+t[0].weekdays?.[t[10].getUTCDay()])&&E(e,"class",c)},d(t){t&&w(e),a=!1,u()}}}function er(t){let e,n=lt(t[1]),o=[];for(let e=0;e<n.length;e+=1)o[e]=tr(Zo(t,n,e));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=_()},m(t,n){for(let e=0;e<o.length;e+=1)o[e]&&o[e].m(t,n);y(t,e,n)},p(t,r){if(15&r){let l;for(n=lt(t[1]),l=0;l<n.length;l+=1){const i=Zo(t,n,l);o[l]?o[l].p(i,r):(o[l]=tr(i),o[l].c(),o[l].m(e.parentNode,e))}for(;l<o.length;l+=1)o[l].d(1);o.length=n.length}},d(t){t&&w(e),b(o,t)}}}function nr(t){let e,n,o,r,l,i,s,c,a;return o=new po({props:{$$slots:{default:[or]},$$scope:{ctx:t}}}),{c(){e=k("div"),n=k("div"),ct(o.$$.fragment),r=C(),l=k("div"),E(l,"class",i=t[0].hiddenScroll),E(n,"class",s=t[0].content),E(e,"class",c=t[0].allDay)},m(t,i){y(t,e,i),v(e,n),at(o,n,null),v(n,r),v(n,l),a=!0},p(t,r){const u={};32770&r&&(u.$$scope={dirty:r,ctx:t}),o.$set(u),(!a||1&r&&i!==(i=t[0].hiddenScroll))&&E(l,"class",i),(!a||1&r&&s!==(s=t[0].content))&&E(n,"class",s),(!a||1&r&&c!==(c=t[0].allDay))&&E(e,"class",c)},i(t){a||(ot(o.$$.fragment,t),a=!0)},o(t){rt(o.$$.fragment,t),a=!1},d(t){t&&w(e),ut(o)}}}function or(t){let e,n;return e=new Ko({props:{dates:t[1]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.dates=t[1]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function rr(t){let e,n;return e=new Po({props:{date:t[10]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.date=t[10]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function lr(t){let e,n,o=lt(t[1]),r=[];for(let e=0;e<o.length;e+=1)r[e]=rr(Qo(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(2&n){let i;for(o=lt(t[1]),i=0;i<o.length;i+=1){const l=Qo(t,o,i);r[i]?(r[i].p(l,n),ot(r[i],1)):(r[i]=rr(l),r[i].c(),ot(r[i],1),r[i].m(e.parentNode,e))}for(et(),i=o.length;i<r.length;i+=1)l(i);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function ir(t){let e,n,o,r,l,i,s,c,a,u;n=new po({props:{$$slots:{default:[er]},$$scope:{ctx:t}}});let d=t[4]&&nr(t);return a=new bo({props:{$$slots:{default:[lr]},$$scope:{ctx:t}}}),{c(){e=k("div"),ct(n.$$.fragment),o=C(),r=k("div"),s=C(),d&&d.c(),c=C(),ct(a.$$.fragment),E(r,"class",l=t[0].hiddenScroll),E(e,"class",i=t[0].header)},m(t,l){y(t,e,l),at(n,e,null),v(e,o),v(e,r),y(t,s,l),d&&d.m(t,l),y(t,c,l),at(a,t,l),u=!0},p(t,o){let[s]=o;const f={};32783&s&&(f.$$scope={dirty:s,ctx:t}),n.$set(f),(!u||1&s&&l!==(l=t[0].hiddenScroll))&&E(r,"class",l),(!u||1&s&&i!==(i=t[0].header))&&E(e,"class",i),t[4]?d?(d.p(t,s),16&s&&ot(d,1)):(d=nr(t),d.c(),ot(d,1),d.m(c.parentNode,c)):d&&(et(),rt(d,1,1,(()=>{d=null})),nt());const h={};32770&s&&(h.$$scope={dirty:s,ctx:t}),a.$set(h)},i(t){u||(ot(n.$$.fragment,t),ot(d),ot(a.$$.fragment,t),u=!0)},o(t){rt(n.$$.fragment,t),rt(d),rt(a.$$.fragment,t),u=!1},d(t){t&&(w(e),w(s),w(c)),ut(n),d&&d.d(t),ut(a,t)}}}function sr(t,e,n){let o,r,l,i,s,{_viewDates:c,_intlDayHeader:u,_intlDayHeaderAL:d,allDaySlot:f,theme:h}=R("state");return a(t,c,(t=>n(1,r=t))),a(t,u,(t=>n(3,i=t))),a(t,d,(t=>n(2,l=t))),a(t,f,(t=>n(4,s=t))),a(t,h,(t=>n(0,o=t))),[o,r,l,i,s,c,u,d,f,h]}let cr=class extends ft{constructor(t){super(),dt(this,t,sr,ir,i,{})}};var ar={createOptions(t){t.buttonText.timeGridDay="day",t.buttonText.timeGridWeek="week",t.view="timeGridWeek",t.views.timeGridDay={buttonText:$e,component:cr,dayHeaderFormat:{weekday:"long"},duration:{days:1},theme:be("ec-time-grid ec-day-view"),titleFormat:{year:"numeric",month:"long",day:"numeric"}},t.views.timeGridWeek={buttonText:ge,component:cr,duration:{weeks:1},theme:be("ec-time-grid ec-week-view")}},createStores(t){t._slotTimeLimits=function(t){return $t([t._events,t._viewDates,t.flexibleSlotTimeLimits,t.slotMinTime,t.slotMaxTime],(t=>{let[e,n,o,r,i]=t,s=kt(r),c=kt(i);if(o){let t=kt(zt(s.seconds,At(0,c.seconds-wt))),r=kt(At(c.seconds,t.seconds+wt)),i=l(o?.eventFilter)?o.eventFilter:t=>!he(t.display);t:for(let o of n){let n=Ct(xt(o),s),l=Ct(xt(o),c),a=Ct(xt(o),t),u=Ct(xt(o),r);for(let d of e)if(!d.allDay&&i(d)&&d.start<u&&d.end>a){if(d.start<n){let e=At((d.start-o)/1e3,t.seconds);e<s.seconds&&(s.seconds=e)}if(d.end>l){let t=zt((d.end-o)/1e3,r.seconds);t>c.seconds&&(c.seconds=t)}if(s.seconds===t.seconds&&c.seconds===r.seconds)break t}}}return{min:s,max:c}}))}(t),t._times=function(t){return $t([t._slotTimeLimits,t._intlSlotLabel,t.slotDuration],(t=>{let[e,n,o]=t,r=o.seconds>=3600,l=[],i=Et(bt()),s=xt(i),c=1;for(Ct(i,e.min),Ct(s,e.max);i<s;)l.push([Mt(i),l.length&&(c||r)?n.format(i):""]),Ct(i,o),c=1-c;return l}))}(t)}};function ur(t){return t.map((t=>({id:String(t.id),title:t.title||"",titleHTML:t.titleHTML||"",eventBackgroundColor:t.eventBackgroundColor,eventTextColor:t.eventTextColor})))}function dr(e){let n,o,r,i;return{c(){n=k("span"),E(n,"aria-label",e[2])},m(t,l){y(t,n,l),e[9](n),r||(i=$(o=vt.call(null,n,e[1])),r=!0)},p(t,e){let[r]=e;4&r&&E(n,"aria-label",t[2]),o&&l(o.update)&&2&r&&o.update.call(null,t[1])},i:t,o:t,d(t){t&&w(n),e[9](null),r=!1,i()}}}function fr(t,e,n){let o,r,i,{resource:s}=e,{date:c}=e,{resourceLabelContent:u,resourceLabelDidMount:d,_intlDayHeaderAL:f}=R("state");a(t,u,(t=>n(8,i=t))),a(t,d,(t=>n(11,r=t))),a(t,f,(t=>n(10,o=t)));const h=P();let p,m,$;return N((()=>{l(r)&&r({resource:s,date:c?St(c):void 0,el:p})})),F((()=>{c?n(2,$=o.format(c)+", "+p.innerText):(n(2,$=void 0),h("text",p.innerText))})),t.$$set=t=>{"resource"in t&&n(6,s=t.resource),"date"in t&&n(7,c=t.date)},t.$$.update=()=>{448&t.$$.dirty&&n(1,m=i?l(i)?i({resource:s,date:c?St(c):void 0}):i:s.titleHTML?{html:s.titleHTML}:s.title)},[p,m,$,u,d,f,s,c,i,function(t){I[t?"unshift":"push"]((()=>{p=t,n(0,p)}))}]}class hr extends ft{constructor(t){super(),dt(this,t,fr,dr,i,{resource:6,date:7})}}function pr(t,e,n){const o=t.slice();return o[17]=e[n],o}function mr(t,e,n){const o=t.slice();return o[20]=e[n],o}function $r(t,e,n){const o=t.slice();return o[26]=e[n],o}function gr(t,e,n){const o=t.slice();return o[23]=e[n],o}function vr(t,e,n){const o=t.slice();return o[26]=e[n],o}function yr(t,e,n){const o=t.slice();return o[17]=e[n],o[32]=n,o}function wr(t,e,n){const o=t.slice();return o[20]=e[n],o}function br(t){let e,n,o,r;return n=new hr({props:{resource:t[17]}}),n.$on("text",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t[16](t[32],...n)})),{c(){e=k("div"),ct(n.$$.fragment),E(e,"class",o=t[5].day)},m(t,o){y(t,e,o),at(n,e,null),r=!0},p(l,i){t=l;const s={};8&i[0]&&(s.resource=t[17]),n.$set(s),(!r||32&i[0]&&o!==(o=t[5].day))&&E(e,"class",o)},i(t){r||(ot(n.$$.fragment,t),r=!0)},o(t){rt(n.$$.fragment,t),r=!1},d(t){t&&w(e),ut(n)}}}function kr(e){let n,o,r,i,s,c,a,u;return{c(){n=k("div"),o=k("time"),E(o,"datetime",r=Mt(e[17],10)),E(o,"aria-label",i=e[6].format(e[17])),E(n,"class",c=e[5].day+" "+e[5].weekdays?.[e[17].getUTCDay()])},m(t,r){y(t,n,r),v(n,o),a||(u=$(s=vt.call(null,o,e[7].format(e[17]))),a=!0)},p(t,a){e=t,8&a[0]&&r!==(r=Mt(e[17],10))&&E(o,"datetime",r),72&a[0]&&i!==(i=e[6].format(e[17]))&&E(o,"aria-label",i),s&&l(s.update)&&136&a[0]&&s.update.call(null,e[7].format(e[17])),40&a[0]&&c!==(c=e[5].day+" "+e[5].weekdays?.[e[17].getUTCDay()])&&E(n,"class",c)},i:t,o:t,d(t){t&&w(n),a=!1,u()}}}function xr(t){let e,n,o,r=lt(t[3][1]),l=[];for(let e=0;e<r.length;e+=1)l[e]=Tr(wr(t,r,e));const i=t=>rt(l[t],1,1,(()=>{l[t]=null}));return{c(){e=k("div");for(let t=0;t<l.length;t+=1)l[t].c();E(e,"class",n=t[5].days)},m(t,n){y(t,e,n);for(let t=0;t<l.length;t+=1)l[t]&&l[t].m(e,null);o=!0},p(t,s){if(252&s[0]){let n;for(r=lt(t[3][1]),n=0;n<r.length;n+=1){const o=wr(t,r,n);l[n]?(l[n].p(o,s),ot(l[n],1)):(l[n]=Tr(o),l[n].c(),ot(l[n],1),l[n].m(e,null))}for(et(),n=r.length;n<l.length;n+=1)i(n);nt()}(!o||32&s[0]&&n!==(n=t[5].days))&&E(e,"class",n)},i(t){if(!o){for(let t=0;t<r.length;t+=1)ot(l[t]);o=!0}},o(t){l=l.filter(Boolean);for(let t=0;t<l.length;t+=1)rt(l[t]);o=!1},d(t){t&&w(e),b(l,t)}}}function Cr(e){let n,o,r,i,s,c,a,u,d;return{c(){n=k("div"),o=k("time"),c=C(),E(o,"datetime",r=Mt(e[20],10)),E(o,"aria-label",i=""+(e[4][e[32]]+e[6].format(e[20]))),E(n,"class",a=e[5].day+" "+e[5].weekdays?.[e[20].getUTCDay()]),E(n,"role","columnheader")},m(t,r){y(t,n,r),v(n,o),v(n,c),u||(d=$(s=vt.call(null,o,e[7].format(e[20]))),u=!0)},p(t,c){e=t,8&c[0]&&r!==(r=Mt(e[20],10))&&E(o,"datetime",r),88&c[0]&&i!==(i=""+(e[4][e[32]]+e[6].format(e[20])))&&E(o,"aria-label",i),s&&l(s.update)&&136&c[0]&&s.update.call(null,e[7].format(e[20])),40&c[0]&&a!==(a=e[5].day+" "+e[5].weekdays?.[e[20].getUTCDay()])&&E(n,"class",a)},i:t,o:t,d(t){t&&w(n),u=!1,d()}}}function _r(t){let e,n,o,r,l;return n=new hr({props:{resource:t[20],date:t[17]}}),{c(){e=k("div"),ct(n.$$.fragment),o=C(),E(e,"class",r=t[5].day),E(e,"role","columnheader")},m(t,r){y(t,e,r),at(n,e,null),v(e,o),l=!0},p(t,o){const i={};8&o[0]&&(i.resource=t[20]),8&o[0]&&(i.date=t[17]),n.$set(i),(!l||32&o[0]&&r!==(r=t[5].day))&&E(e,"class",r)},i(t){l||(ot(n.$$.fragment,t),l=!0)},o(t){rt(n.$$.fragment,t),l=!1},d(t){t&&w(e),ut(n)}}}function Tr(t){let e,n,o,r;const l=[_r,Cr],i=[];function s(t,e){return t[2]?0:1}return e=s(t),n=i[e]=l[e](t),{c(){n.c(),o=_()},m(t,n){i[e].m(t,n),y(t,o,n),r=!0},p(t,r){let c=e;e=s(t),e===c?i[e].p(t,r):(et(),rt(i[c],1,1,(()=>{i[c]=null})),nt(),n=i[e],n?n.p(t,r):(n=i[e]=l[e](t),n.c()),ot(n,1),n.m(o.parentNode,o))},i(t){r||(ot(n),r=!0)},o(t){rt(n),r=!1},d(t){t&&w(o),i[e].d(t)}}}function Dr(t){let e,n,o,r,l,i,s;const c=[kr,br],a=[];function u(t,e){return t[2]?0:1}n=u(t),o=a[n]=c[n](t);let d=t[3][1].length>1&&xr(t);return{c(){e=k("div"),o.c(),r=C(),d&&d.c(),l=C(),E(e,"class",i=t[5].resource)},m(t,o){y(t,e,o),a[n].m(e,null),v(e,r),d&&d.m(e,null),v(e,l),s=!0},p(t,f){let h=n;n=u(t),n===h?a[n].p(t,f):(et(),rt(a[h],1,1,(()=>{a[h]=null})),nt(),o=a[n],o?o.p(t,f):(o=a[n]=c[n](t),o.c()),ot(o,1),o.m(e,r)),t[3][1].length>1?d?(d.p(t,f),8&f[0]&&ot(d,1)):(d=xr(t),d.c(),ot(d,1),d.m(e,l)):d&&(et(),rt(d,1,1,(()=>{d=null})),nt()),(!s||32&f[0]&&i!==(i=t[5].resource))&&E(e,"class",i)},i(t){s||(ot(o),ot(d),s=!0)},o(t){rt(o),rt(d),s=!1},d(t){t&&w(e),a[n].d(),d&&d.d()}}}function Er(t){let e,n,o=lt(t[3][0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Dr(yr(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(252&n[0]){let i;for(o=lt(t[3][0]),i=0;i<o.length;i+=1){const l=yr(t,o,i);r[i]?(r[i].p(l,n),ot(r[i],1)):(r[i]=Dr(l),r[i].c(),ot(r[i],1),r[i].m(e.parentNode,e))}for(et(),i=o.length;i<r.length;i+=1)l(i);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Sr(t){let e,n,o,r,l,i,s,c,a;return o=new po({props:{$$slots:{default:[Nr]},$$scope:{ctx:t}}}),{c(){e=k("div"),n=k("div"),ct(o.$$.fragment),r=C(),l=k("div"),E(l,"class",i=t[5].hiddenScroll),E(n,"class",s=t[5].content),E(e,"class",c=t[5].allDay)},m(t,i){y(t,e,i),v(e,n),at(o,n,null),v(n,r),v(n,l),a=!0},p(t,r){const u={};39&r[0]|16&r[1]&&(u.$$scope={dirty:r,ctx:t}),o.$set(u),(!a||32&r[0]&&i!==(i=t[5].hiddenScroll))&&E(l,"class",i),(!a||32&r[0]&&s!==(s=t[5].content))&&E(n,"class",s),(!a||32&r[0]&&c!==(c=t[5].allDay))&&E(e,"class",c)},i(t){a||(ot(o.$$.fragment,t),a=!0)},o(t){rt(o.$$.fragment,t),a=!1},d(t){t&&w(e),ut(o)}}}function Mr(t){let e,n,o=lt(t[1]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Lr($r(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(35&n[0]){let i;for(o=lt(t[1]),i=0;i<o.length;i+=1){const l=$r(t,o,i);r[i]?(r[i].p(l,n),ot(r[i],1)):(r[i]=Lr(l),r[i].c(),ot(r[i],1),r[i].m(e.parentNode,e))}for(et(),i=o.length;i<r.length;i+=1)l(i);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Ur(t){let e,n,o=lt(t[0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Br(gr(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(35&n[0]){let i;for(o=lt(t[0]),i=0;i<o.length;i+=1){const l=gr(t,o,i);r[i]?(r[i].p(l,n),ot(r[i],1)):(r[i]=Br(l),r[i].c(),ot(r[i],1),r[i].m(e.parentNode,e))}for(et(),i=o.length;i<r.length;i+=1)l(i);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function Lr(t){let e,n,o,r,l;return n=new Ko({props:{dates:t[0],resource:t[26]}}),{c(){e=k("div"),ct(n.$$.fragment),o=C(),E(e,"class",r=t[5].resource)},m(t,r){y(t,e,r),at(n,e,null),v(e,o),l=!0},p(t,o){const i={};1&o[0]&&(i.dates=t[0]),2&o[0]&&(i.resource=t[26]),n.$set(i),(!l||32&o[0]&&r!==(r=t[5].resource))&&E(e,"class",r)},i(t){l||(ot(n.$$.fragment,t),l=!0)},o(t){rt(n.$$.fragment,t),l=!1},d(t){t&&w(e),ut(n)}}}function Hr(t){let e,n;return e=new Ko({props:{dates:[t[23]],resource:t[26]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};1&n[0]&&(o.dates=[t[23]]),2&n[0]&&(o.resource=t[26]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Br(t){let e,n,o,r,l=lt(t[1]),i=[];for(let e=0;e<l.length;e+=1)i[e]=Hr(vr(t,l,e));const s=t=>rt(i[t],1,1,(()=>{i[t]=null}));return{c(){e=k("div");for(let t=0;t<i.length;t+=1)i[t].c();n=C(),E(e,"class",o=t[5].resource)},m(t,o){y(t,e,o);for(let t=0;t<i.length;t+=1)i[t]&&i[t].m(e,null);v(e,n),r=!0},p(t,c){if(3&c[0]){let o;for(l=lt(t[1]),o=0;o<l.length;o+=1){const r=vr(t,l,o);i[o]?(i[o].p(r,c),ot(i[o],1)):(i[o]=Hr(r),i[o].c(),ot(i[o],1),i[o].m(e,n))}for(et(),o=l.length;o<i.length;o+=1)s(o);nt()}(!r||32&c[0]&&o!==(o=t[5].resource))&&E(e,"class",o)},i(t){if(!r){for(let t=0;t<l.length;t+=1)ot(i[t]);r=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)rt(i[t]);r=!1},d(t){t&&w(e),b(i,t)}}}function Nr(t){let e,n,o,r;const l=[Ur,Mr],i=[];function s(t,e){return t[2]?0:1}return e=s(t),n=i[e]=l[e](t),{c(){n.c(),o=_()},m(t,n){i[e].m(t,n),y(t,o,n),r=!0},p(t,r){let c=e;e=s(t),e===c?i[e].p(t,r):(et(),rt(i[c],1,1,(()=>{i[c]=null})),nt(),n=i[e],n?n.p(t,r):(n=i[e]=l[e](t),n.c()),ot(n,1),n.m(o.parentNode,o))},i(t){r||(ot(n),r=!0)},o(t){rt(n),r=!1},d(t){t&&w(o),i[e].d(t)}}}function Fr(t){let e,n;return e=new Po({props:{date:t[2]?t[17]:t[20],resource:t[2]?t[20]:t[17]}}),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){const o={};12&n[0]&&(o.date=t[2]?t[17]:t[20]),12&n[0]&&(o.resource=t[2]?t[20]:t[17]),e.$set(o)},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(t){ut(e,t)}}}function Pr(t){let e,n,o,r,l=lt(t[3][1]),i=[];for(let e=0;e<l.length;e+=1)i[e]=Fr(mr(t,l,e));const s=t=>rt(i[t],1,1,(()=>{i[t]=null}));return{c(){e=k("div");for(let t=0;t<i.length;t+=1)i[t].c();n=C(),E(e,"class",o=t[5].resource)},m(t,o){y(t,e,o);for(let t=0;t<i.length;t+=1)i[t]&&i[t].m(e,null);v(e,n),r=!0},p(t,c){if(12&c[0]){let o;for(l=lt(t[3][1]),o=0;o<l.length;o+=1){const r=mr(t,l,o);i[o]?(i[o].p(r,c),ot(i[o],1)):(i[o]=Fr(r),i[o].c(),ot(i[o],1),i[o].m(e,n))}for(et(),o=l.length;o<i.length;o+=1)s(o);nt()}(!r||32&c[0]&&o!==(o=t[5].resource))&&E(e,"class",o)},i(t){if(!r){for(let t=0;t<l.length;t+=1)ot(i[t]);r=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)rt(i[t]);r=!1},d(t){t&&w(e),b(i,t)}}}function Rr(t){let e,n,o=lt(t[3][0]),r=[];for(let e=0;e<o.length;e+=1)r[e]=Pr(pr(t,o,e));const l=t=>rt(r[t],1,1,(()=>{r[t]=null}));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=_()},m(t,o){for(let e=0;e<r.length;e+=1)r[e]&&r[e].m(t,o);y(t,e,o),n=!0},p(t,n){if(44&n[0]){let i;for(o=lt(t[3][0]),i=0;i<o.length;i+=1){const l=pr(t,o,i);r[i]?(r[i].p(l,n),ot(r[i],1)):(r[i]=Pr(l),r[i].c(),ot(r[i],1),r[i].m(e.parentNode,e))}for(et(),i=o.length;i<r.length;i+=1)l(i);nt()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)ot(r[t]);n=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)rt(r[t]);n=!1},d(t){t&&w(e),b(r,t)}}}function zr(t){let e,n,o,r,l,i,s,c,a,u;n=new po({props:{$$slots:{default:[Er]},$$scope:{ctx:t}}});let d=t[8]&&Sr(t);return a=new bo({props:{$$slots:{default:[Rr]},$$scope:{ctx:t}}}),{c(){e=k("div"),ct(n.$$.fragment),o=C(),r=k("div"),s=C(),d&&d.c(),c=C(),ct(a.$$.fragment),E(r,"class",l=t[5].hiddenScroll),E(e,"class",i=t[5].header)},m(t,l){y(t,e,l),at(n,e,null),v(e,o),v(e,r),y(t,s,l),d&&d.m(t,l),y(t,c,l),at(a,t,l),u=!0},p(t,o){const s={};252&o[0]|16&o[1]&&(s.$$scope={dirty:o,ctx:t}),n.$set(s),(!u||32&o[0]&&l!==(l=t[5].hiddenScroll))&&E(r,"class",l),(!u||32&o[0]&&i!==(i=t[5].header))&&E(e,"class",i),t[8]?d?(d.p(t,o),256&o[0]&&ot(d,1)):(d=Sr(t),d.c(),ot(d,1),d.m(c.parentNode,c)):d&&(et(),rt(d,1,1,(()=>{d=null})),nt());const f={};44&o[0]|16&o[1]&&(f.$$scope={dirty:o,ctx:t}),a.$set(f)},i(t){u||(ot(n.$$.fragment,t),ot(d),ot(a.$$.fragment,t),u=!0)},o(t){rt(n.$$.fragment,t),rt(d),rt(a.$$.fragment,t),u=!1},d(t){t&&(w(e),w(s),w(c)),ut(n),d&&d.d(t),ut(a,t)}}}function Ar(t,e,n){let o,r,l,i,s,c,u,d,{datesAboveResources:f,_viewDates:h,_viewResources:p,_intlDayHeader:m,_intlDayHeaderAL:$,allDaySlot:g,theme:v}=R("state");a(t,f,(t=>n(2,l=t))),a(t,h,(t=>n(0,o=t))),a(t,p,(t=>n(1,r=t))),a(t,m,(t=>n(7,c=t))),a(t,$,(t=>n(6,s=t))),a(t,g,(t=>n(8,u=t))),a(t,v,(t=>n(5,i=t)));let y=[];return t.$$.update=()=>{7&t.$$.dirty[0]&&n(3,d=l?[o,r]:[r,o])},[o,r,l,d,y,i,s,c,u,f,h,p,m,$,g,v,(t,e)=>n(4,y[t]=e.detail+", ",y)]}class Ir extends ft{constructor(t){super(),dt(this,t,Ar,zr,i,{},null,[-1,-1])}}function Gr(t,e,n){let o,r,l,{resources:i,_resBgColor:s,_resTxtColor:c}=R("state");return a(t,i,(t=>n(3,o=t))),a(t,s,(t=>n(5,l=t))),a(t,c,(t=>n(4,r=t))),m(s,l=t=>{let e=o.find((e=>t.resourceIds.includes(e.id)));return e?.eventBackgroundColor},l),m(c,r=t=>{let e=o.find((e=>t.resourceIds.includes(e.id)));return e?.eventTextColor},r),[i,s,c]}let jr=class extends ft{constructor(t){super(),dt(this,t,Gr,null,i,{})}};var Or={createOptions(t){t.resources=[],t.datesAboveResources=!1,t.filterResourcesWithEvents=!1,t.resourceLabelContent=void 0,t.resourceLabelDidMount=void 0,t.buttonText.resourceTimeGridDay="day",t.buttonText.resourceTimeGridWeek="week",t.theme.resource="ec-resource",t.theme.resourceTitle="ec-resource-title",t.view="resourceTimeGridWeek",t.views.resourceTimeGridDay={buttonText:$e,component:Ir,duration:{days:1},theme:be("ec-time-grid ec-resource-day-view")},t.views.resourceTimeGridWeek={buttonText:ge,component:Ir,duration:{weeks:1},theme:be("ec-time-grid ec-resource-week-view")}},createParsers(t){t.resources=ur},createStores(t){"_times"in t||ar.createStores(t),t._auxiliary.update((t=>[...t,jr])),t._viewResources=function(t){return $t([t.resources,t.filterResourcesWithEvents,t._events,t._activeRange],(t=>{let[e,n,o,r]=t,l=e;return n&&(l=e.filter((t=>{for(let e of o)if("background"!==e.display&&e.resourceIds.includes(t.id)&&e.start<r.end&&e.end>r.start)return!0;return!1}))),l.length||(l=ur([{}])),l}))}(t)}};let Wr=!1;function Yr(t,e,n){return At(e,zt(n,t))}const{window:qr}=g;function Xr(e){let n,o;return{c:t,m(t,r){n||(o=[T(qr,"pointermove",e[31]),T(qr,"pointerup",e[32]),T(qr,"pointercancel",e[32]),T(qr,"scroll",e[0]),T(qr,"selectstart",Jr(e[33])),T(qr,"contextmenu",(function(){l(Jr(e[41]))&&Jr(e[41]).apply(this,arguments)})),T(qr,"touchstart",e[34]),T(qr,"touchmove",e[40],{passive:!1})],n=!0)},p(t,n){e=t},i:t,o:t,d(t){n=!1,r(o)}}}function Vr(t){return t.isPrimary&&("mouse"!==t.pointerType||1&t.buttons)}function Jr(t){return e=>{t()&&e.preventDefault()}}function Kr(t,e,n){let o,i,s,c,u,d,f,h,p,$,g,v,y,w,b,k,x,C,_,D,E,S,M,U,L,H,B,N,F,P,A,I,G,j,O,W,Y,q,X,V,J,K,Q,Z,tt,et,nt,ot,rt,lt,it,st,ct,at,{_iEvents:ut,_iClass:dt,_events:ft,_view:ht,_dayGrid:pt,_draggable:mt,dateClick:$t,dragScroll:gt,datesAboveResources:vt,eventDragMinDistance:yt,eventDragStart:wt,eventDragStop:bt,eventDrop:Dt,eventLongPressDelay:Et,eventResizeStart:Ut,eventResizeStop:Lt,eventResize:Ht,longPressDelay:Bt,selectable:Nt,select:Pt,selectBackgroundColor:Rt,selectLongPressDelay:It,selectMinDistance:Ot,slotDuration:Wt,slotHeight:Yt,unselect:qt,unselectAuto:Qt,unselectCancel:Zt,view:te}=R("state");function ee(t){window.getSelection().removeAllRanges(),q=V=t.clientX,X=J=t.clientY;let e=Vt(V,J);({allDay:nt,date:j,resource:W}=Xt(e)(J)),K=jt(e,W?4:3),Z=jt(e,W&&(1===P||L)?2:1),oe(),"mouse"!==t.pointerType&&n(1,ct=setTimeout((()=>{P&&(A=!0,ne(t))}),(se()?U:M)??S))}function ne(t){if(A||t&&"mouse"===t.pointerType&&Math.sqrt(Math.pow(V-q,2)+Math.pow(J-X,2))>=(se()?E:D)){A=!0,de(t),m(dt,f=ot,f),c[0]||(se()?m(ut,c[0]={id:"{select}",allDay:I.allDay,start:I.start,title:"",display:"preview",extendedProps:{},backgroundColor:u,resourceIds:I.resourceIds},c):function(t,e){l(e)&&e({event:ce(I),jsEvent:t,view:Jt(o)});G=I.display,I.display="preview",m(ut,c[0]=ae(I),c),I.display="ghost",ft.set(s)}(t,ie()?_:C));let e=Vt(Yr(V,at[0],at[1]),Yr(J,at[2],at[3]));if(e){let t;({allDay:t,date:O,resource:Y}=Xt(e)(J)),t===nt&&(et=kt((O-j)/1e3),m(ut,c[0].end=Ct(xt(I.end),et),c),ie()?c[0].end<rt&&m(ut,c[0].end=rt,c):se()?c[0].end<I.end?(m(ut,c[0].start=_t(c[0].end,lt),c),m(ut,c[0].end=I.end,c)):m(ut,c[0].start=I.start,c):(m(ut,c[0].start=Ct(xt(I.start),et),c),W&&(m(ut,c[0].resourceIds=I.resourceIds.filter((t=>t!==W.id)),c),c[0].resourceIds.push(Y.id))))}}if(x){let t=2*k;e=()=>{K&&(J<t&&window.scrollBy(0,At(-10,(J-t)/3)),J<Q.top+t&&(K.scrollTop+=At(-10,(J-Q.top-t)/3)),J>window.innerHeight-t&&window.scrollBy(0,zt(10,(J-window.innerHeight+t)/3)),J>Q.bottom-t&&(K.scrollTop+=zt(10,(J-Q.bottom+t)/3)))},Wr||(Wr=!0,window.requestAnimationFrame((()=>{e(),Wr=!1})))}var e}function oe(){Q=Gt(K),tt=Gt(Z),at=[At(0,tt.left+(d?0:8)),zt(document.documentElement.clientWidth,tt.right)-2,At(0,Q.top),zt(document.documentElement.clientHeight,Q.bottom)-2]}function re(){m(ut,c[0]=null,c)}function le(t,e){t.start=e.start,t.end=e.end,t.resourceIds=e.resourceIds,ft.set(s)}function ie(){return 2===P}function se(){return 3===P}function ue(){return P&&P<4}function de(t){it&&(it=!1,re(),l(i)&&i({jsEvent:t,view:Jt(o)}))}a(t,ut,(t=>n(69,c=t))),a(t,dt,(t=>n(72,f=t))),a(t,ft,(t=>n(68,s=t))),a(t,ht,(t=>n(66,o=t))),a(t,pt,(t=>n(71,d=t))),a(t,mt,(t=>n(94,F=t))),a(t,$t,(t=>n(73,h=t))),a(t,gt,(t=>n(82,x=t))),a(t,vt,(t=>n(90,L=t))),a(t,yt,(t=>n(85,D=t))),a(t,wt,(t=>n(83,C=t))),a(t,bt,(t=>n(76,g=t))),a(t,Dt,(t=>n(74,p=t))),a(t,Et,(t=>n(88,M=t))),a(t,Ut,(t=>n(84,_=t))),a(t,Lt,(t=>n(77,v=t))),a(t,Ht,(t=>n(75,$=t))),a(t,Bt,(t=>n(87,S=t))),a(t,Nt,(t=>n(93,N=t))),a(t,Pt,(t=>n(78,y=t))),a(t,Rt,(t=>n(70,u=t))),a(t,It,(t=>n(89,U=t))),a(t,Ot,(t=>n(86,E=t))),a(t,Wt,(t=>n(91,H=t))),a(t,Yt,(t=>n(81,k=t))),a(t,qt,(t=>n(67,i=t))),a(t,Qt,(t=>n(80,b=t))),a(t,Zt,(t=>n(79,w=t))),a(t,te,(t=>n(92,B=t))),ht.subscribe(de);return[function(){ue()&&(oe(),ne())},ct,ut,dt,ft,ht,pt,mt,$t,gt,vt,yt,wt,bt,Dt,Et,Ut,Lt,Ht,Bt,Nt,Pt,Rt,It,Ot,Wt,Yt,qt,Qt,Zt,te,function(t){ue()&&t.isPrimary&&(V=t.clientX,J=t.clientY,ne(t))},function(t){if(!it||!b||w&&t.target.closest(w)||de(t),P&&t.isPrimary){if(A)if(se()){if(it=!0,l(y)){let{start:e,end:n}=ce(c[0]);y({start:e,end:n,startStr:Mt(c[0].start),endStr:Mt(c[0].end),allDay:nt,jsEvent:t,view:Jt(o),resource:W})}}else{I.display=G;let e=ie()?v:g;l(e)&&e({event:ce(I),jsEvent:t,view:Jt(o)});let n=ae(I);if(le(I,c[0]),re(),e=ie()?$:p,l(e)){let r,l=I;r=ie()?{endDelta:et}:{delta:et,oldResource:W!==Y?W:void 0,newResource:W!==Y?Y:void 0},e(Ft(r,{event:ce(I),oldEvent:ce(n),jsEvent:t,view:Jt(o),revert(){le(l,n)}}))}}else if((4===P||se())&&l(h)&&!st){V=t.clientX,J=t.clientY;let e=Vt(V,J);if(e){let{allDay:n,date:r,resource:l}=Xt(e)(J);h({allDay:n,date:St(r),dateStr:Mt(r),dayEl:e,jsEvent:t,view:Jt(o),resource:l})}}A=!1,P=q=X=V=J=I=G=j=O=W=Y=et=nt=m(dt,f=rt=lt=void 0,f),K=Z=Q=tt=void 0,ct&&(clearTimeout(ct),n(1,ct=void 0))}st=!1},ue,function(t){if(ue()){let e=t.target,n=[],o=()=>r(n);n.push(T(e,"touchmove",Jr((()=>A)))),n.push(T(e,"touchend",o)),n.push(T(e,"touchcancel",o))}},function(t,e,n,o){P||(P=Vr(e)?n?2:F(t)?1:5:5,ue()&&(I=t,ee(e),o&&(j=o),ot=n?nt?"resizingX":"resizingY":"dragging",n&&(rt=xt(I.start),nt?(rt.setUTCHours(I.end.getUTCHours(),I.end.getUTCMinutes(),I.end.getUTCSeconds(),0),rt<I.start&&Tt(rt)):Ct(rt,H)),ne(e)))},function(t){P||(P=Vr(t)?N&&!Kt(B)?3:4:5,ue()&&(ee(t),ot="selecting",lt=nt?kt({day:1}):H,I={allDay:nt,start:j,end:Ct(xt(j),lt),resourceIds:W?[W.id]:[]},ne(t)))},function(){P||(P=5)},de,function(){st=!0},function(e){z.call(this,t,e)},()=>ct]}class Qr extends ft{constructor(t){super(),dt(this,t,Kr,Xr,i,{drag:35,select:36,noAction:37,handleScroll:0,unselect:38,noClick:39},null,[-1,-1,-1,-1])}get drag(){return this.$$.ctx[35]}get select(){return this.$$.ctx[36]}get noAction(){return this.$$.ctx[37]}get handleScroll(){return this.$$.ctx[0]}get unselect(){return this.$$.ctx[38]}get noClick(){return this.$$.ctx[39]}}function Zr(e){let n,o;return{c:t,m(t,r){n||(o=[T(window,"pointermove",e[5]),T(window,"scroll",e[0])],n=!0)},p:t,i:t,o:t,d(t){n=!1,r(o)}}}function tl(t){return t.isPrimary&&"mouse"===t.pointerType}function el(t,e,n){let o,r,l,i,s,c,u,d,f,h,{_iEvents:p,_events:$,_viewDates:g,_slotTimeLimits:v,slotDuration:y,slotHeight:w,hiddenDays:b,_view:k,datesAboveResources:x,theme:C}=R("state");function _(){if(c){if(u){let t=s-d.top;h=Ct(Ct(xt(c),i.min),r,Rt(t/l))}else h=c;o[1]||m(p,o[1]={id:"{pointer}",title:"",display:"pointer",extendedProps:{},backgroundColor:"transparent"},o),m(p,o[1].start=h,o),m(p,o[1].end=Ct(xt(h),r),o),m(p,o[1].resourceIds=f?[f.id]:[],o)}}function T(){c=u=m(p,o[1]=null,o)}return a(t,p,(t=>n(9,o=t))),a(t,v,(t=>n(18,i=t))),a(t,y,(t=>n(16,r=t))),a(t,w,(t=>n(17,l=t))),t.$$.update=()=>{512&t.$$.dirty&&o[0]&&T()},[function(){u&&(d=Gt(u),_())},p,v,y,w,function(t){tl(t)&&(s=t.clientY,_())},function(t,e,n,o){tl(n)&&(c=t,u=e,d=Gt(u),s=n.clientY,f=o)},function(t,e){tl(e)&&(c=t,u=null,s=f=void 0)},function(t){tl(t)&&T()},o]}class nl extends ft{constructor(t){super(),dt(this,t,el,Zr,i,{enterTimeGrid:6,enterDayGrid:7,leave:8,handleScroll:0})}get enterTimeGrid(){return this.$$.ctx[6]}get enterDayGrid(){return this.$$.ctx[7]}get leave(){return this.$$.ctx[8]}get handleScroll(){return this.$$.ctx[0]}}function ol(t){let e,n,o,r;return{c(){e=k("div"),E(e,"class",n=t[1].resizer)},m(n,l){y(n,e,l),o||(r=T(e,"pointerdown",t[8]),o=!0)},p(t,o){2&o&&n!==(n=t[1].resizer)&&E(e,"class",n)},d(t){t&&w(e),o=!1,r()}}}function rl(e){let n,o=e[0]&&ol(e);return{c(){o&&o.c(),n=_()},m(t,e){o&&o.m(t,e),y(t,n,e)},p(t,e){let[r]=e;t[0]?o?o.p(t,r):(o=ol(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},i:t,o:t,d(t){t&&w(n),o&&o.d(t)}}}function ll(t,e,n){let o,r,l,i,{event:s}=e,{theme:c,eventDurationEditable:u,editable:d}=R("state");return a(t,c,(t=>n(1,l=t))),a(t,u,(t=>n(7,r=t))),a(t,d,(t=>n(6,o=t))),t.$$set=t=>{"event"in t&&n(5,s=t.event)},t.$$.update=()=>{224&t.$$.dirty&&n(0,i=!he(s.display)&&!fe(s.display)&&((s.durationEditable??r)||(s.editable??o)))},[i,l,c,u,d,s,o,r,function(e){z.call(this,t,e)}]}class il extends ft{constructor(t){super(),dt(this,t,ll,rl,i,{event:5})}}function sl(t){let e,n;return e=new nl({props:{}}),t[16](e),{c(){ct(e.$$.fragment)},m(t,o){at(e,t,o),n=!0},p(t,n){e.$set({})},i(t){n||(ot(e.$$.fragment,t),n=!0)},o(t){rt(e.$$.fragment,t),n=!1},d(n){t[16](null),ut(e,n)}}}function cl(t){let e,n,o,r;e=new Qr({props:{}}),t[15](e);let l=t[1]&&sl(t);return{c(){ct(e.$$.fragment),n=C(),l&&l.c(),o=_()},m(t,i){at(e,t,i),y(t,n,i),l&&l.m(t,i),y(t,o,i),r=!0},p(t,n){let[r]=n;e.$set({}),t[1]?l?(l.p(t,r),2&r&&ot(l,1)):(l=sl(t),l.c(),ot(l,1),l.m(o.parentNode,o)):l&&(et(),rt(l,1,1,(()=>{l=null})),nt())},i(t){r||(ot(e.$$.fragment,t),ot(l),r=!0)},o(t){rt(e.$$.fragment,t),rt(l),r=!1},d(r){r&&(w(n),w(o)),t[15](null),ut(e,r),l&&l.d(r)}}}function al(t,e,n){let o,r,l,i,s,c,u,d,{theme:f,editable:h,eventStartEditable:p,eventDurationEditable:$,pointer:g,_bodyEl:v,_interaction:y,_iClasses:w,_draggable:b}=R("state");function k(){for(let t of Object.values(o))t?.handleScroll?.()}return a(t,f,(t=>n(11,l=t))),a(t,h,(t=>n(13,c=t))),a(t,p,(t=>n(14,u=t))),a(t,g,(t=>n(1,d=t))),a(t,v,(t=>n(10,r=t))),a(t,y,(t=>n(0,o=t))),a(t,w,(t=>n(17,s=t))),a(t,b,(t=>n(12,i=t))),m(y,o.resizer=il,o),t.$$.update=()=>{24576&t.$$.dirty&&m(b,i=t=>(t.startEditable??u)||(t.editable??c),i),6144&t.$$.dirty&&m(w,s=(t,e)=>{let{display:n}=e;return fe(n)?[l[n]]:!he(n)&&i(e)?[l.draggable]:[]},s),1024&t.$$.dirty&&r&&T(r,"scroll",k)},[o,d,f,h,p,g,v,y,w,b,r,l,i,c,u,function(t){I[t?"unshift":"push"]((()=>{o.action=t,y.set(o)}))},function(t){I[t?"unshift":"push"]((()=>{o.pointer=t,y.set(o)}))}]}class ul extends ft{constructor(t){super(),dt(this,t,al,cl,i,{})}}var dl={createOptions(t){t.dateClick=void 0,t.dragScroll=!0,t.editable=!1,t.eventDragMinDistance=5,t.eventDragStart=void 0,t.eventDragStop=void 0,t.eventDrop=void 0,t.eventDurationEditable=!0,t.eventLongPressDelay=void 0,t.eventResizeStart=void 0,t.eventResizeStop=void 0,t.eventResize=void 0,t.eventStartEditable=!0,t.longPressDelay=1e3,t.pointer=!1,t.select=void 0,t.selectBackgroundColor=void 0,t.selectLongPressDelay=void 0,t.selectMinDistance=5,t.unselect=void 0,t.unselectAuto=!0,t.unselectCancel="",t.theme.draggable="ec-draggable",t.theme.ghost="ec-ghost",t.theme.preview="ec-preview",t.theme.pointer="ec-pointer",t.theme.resizer="ec-resizer",t.theme.dragging="ec-dragging",t.theme.resizingY="ec-resizing-y",t.theme.resizingX="ec-resizing-x",t.theme.selecting="ec-selecting"},createStores(e){e._draggable=mt(t),e._auxiliary.update((t=>[...t,ul]))}};return class extends en{constructor(t,e){super({target:t,props:{plugins:[zn,io,ar,Or,dl],options:e}})}get view(){return this.getView()}}}();
6
6
  //# sourceMappingURL=event-calendar.min.js.map