@opengis/admin 0.4.19 → 0.4.20
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.
- package/dist/{add-page-Bj0sCUCJ.js → add-page-CZ8yTZl0.js} +1 -1
- package/dist/{admin-interface-DHnkWema.js → admin-interface-BFCrcs5B.js} +1 -1
- package/dist/{admin-view-CAnyWsJL.js → admin-view-B7bQjLDg.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +1 -1
- package/dist/{card-view-DNPH8MRs.js → card-view-B-YTREQO.js} +1 -1
- package/dist/{edit-page-B9VzTSad.js → edit-page-Bl2hVM7c.js} +1 -1
- package/dist/{import-file-Dp7kJwSk.js → import-file-DWd4pkBY.js} +239 -239
- package/dist/{profile-page-Dho5yi_d.js → profile-page-BbDjmQ2x.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/admin.umd.cjs
CHANGED
@@ -622,7 +622,7 @@ uniform ${O} ${L} u_${G};
|
|
622
622
|
<div class="fancybox__carousel"></div>
|
623
623
|
<div class="fancybox__footer"></div>
|
624
624
|
</div>`},trapFocus:!0,wheel:"zoom"};var kr,$r;(function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Closing=2]="Closing",t[t.CustomClosing=3]="CustomClosing",t[t.Destroy=4]="Destroy"})(kr||(kr={})),function(t){t[t.Loading=0]="Loading",t[t.Opening=1]="Opening",t[t.Ready=2]="Ready",t[t.Closing=3]="Closing"}($r||($r={}));let Hx="",_d=!1,Oh=!1,Da=null;const Wx=()=>{let t="",e="";const n=un.getInstance();if(n){const r=n.carousel,o=n.getSlide();if(r&&o){let d=o.slug||void 0,p=o.triggerEl||void 0;e=d||n.option("slug")||"",!e&&p&&p.dataset&&(e=p.dataset.fancybox||""),e&&e!=="true"&&(t="#"+e+(!d&&r.slides.length>1?"-"+(o.index+1):""))}}return{hash:t,slug:e,index:1}},Lh=()=>{const t=new URL(document.URL).hash,e=t.slice(1).split("-"),n=e[e.length-1],r=n&&/^\+?\d+$/.test(n)&&parseInt(e.pop()||"1",10)||1;return{hash:t,slug:e.join("-"),index:r}},qx=()=>{const{slug:t,index:e}=Lh();if(!t)return;let n=document.querySelector(`[data-slug="${t}"]`);if(n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),un.getInstance())return;const r=document.querySelectorAll(`[data-fancybox="${t}"]`);r.length&&(n=r[e-1],n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))},Gx=()=>{if(un.defaults.Hash===!1)return;const t=un.getInstance();if((t==null?void 0:t.options.Hash)===!1)return;const{slug:e,index:n}=Lh(),{slug:r}=Wx();t&&(e===r?t.jumpTo(n-1):(_d=!0,t.close())),qx()},Zx=()=>{Da&&clearTimeout(Da),queueMicrotask(()=>{Gx()})},Yx=()=>{window.addEventListener("hashchange",Zx,!1),setTimeout(()=>{Gx()},500)};yd&&(/complete|interactive|loaded/.test(document.readyState)?Yx():document.addEventListener("DOMContentLoaded",Yx));const Fh="is-zooming-in";class Xx extends us{onCreateSlide(e,n,r){const o=this.instance.optionFor(r,"src")||"";r.el&&r.type==="image"&&typeof o=="string"&&this.setImage(r,o)}onRemoveSlide(e,n,r){r.panzoom&&r.panzoom.destroy(),r.panzoom=void 0,r.imageEl=void 0}onChange(e,n,r,o){En(this.instance.container,Fh);for(const d of n.slides){const p=d.panzoom;p&&d.index!==r&&p.reset(.35)}}onClose(){var e;const n=this.instance,r=n.container,o=n.getSlide();if(!r||!r.parentElement||!o)return;const{el:d,contentEl:p,panzoom:c,thumbElSrc:b}=o;if(!d||!b||!p||!c||c.isContentLoading||c.state===An.Init||c.state===An.Destroy)return;c.updateMetrics();let k=this.getZoomInfo(o);if(!k)return;this.instance.state=kr.CustomClosing,r.classList.remove(Fh),r.classList.add("is-zooming-out"),p.style.backgroundImage=`url('${b}')`;const E=r.getBoundingClientRect();(((e=window.visualViewport)===null||e===void 0?void 0:e.scale)||1)===1&&Object.assign(r.style,{position:"absolute",top:`${r.offsetTop+window.scrollY}px`,left:`${r.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${E.width}px`,height:`${E.height}px`,overflow:"hidden"});const{x:C,y:T,scale:I,opacity:N}=k;if(N){const $=((F,q,J,Q)=>{const me=q-F,ke=Q-J;return Re=>J+((Re-F)/me*ke||0)})(c.scale,I,1,0);c.on("afterTransform",()=>{p.style.opacity=$(c.scale)+""})}c.on("endAnimation",()=>{n.destroy()}),c.target.a=I,c.target.b=0,c.target.c=0,c.target.d=I,c.panTo({x:C,y:T,scale:I,friction:N?.2:.33,ignoreBounds:!0}),c.isResting&&n.destroy()}setImage(e,n){const r=this.instance;e.src=n,this.process(e,n).then(o=>{const{contentEl:d,imageEl:p,thumbElSrc:c,el:b}=e;if(r.isClosing()||!d||!p)return;d.offsetHeight;const k=!!r.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&b){b.addEventListener("contextmenu",T=>{T.preventDefault()});const C=document.createElement("div");Tt(C,"fancybox-protected"),d.appendChild(C)}if(c&&k){const C=o.contentRect,T=Math.max(C.fullWidth,C.fullHeight);let I=null;!k.opacity&&T>1200&&(I=document.createElement("img"),Tt(I,"fancybox-ghost"),I.src=c,d.appendChild(I));const N=()=>{I&&(Tt(I,"f-fadeFastOut"),setTimeout(()=>{I&&(I.remove(),I=null)},200))};(E=c,new Promise(($,F)=>{const q=new Image;q.onload=$,q.onerror=F,q.src=E})).then(()=>{r.hideLoading(e),e.state=$r.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then(()=>{N(),this.instance.done(e)},()=>{}),I&&setTimeout(()=>{N()},T>2500?800:200)},()=>{r.hideLoading(e),r.revealContent(e)})}else{const C=this.optionFor(e,"initialSize"),T=this.optionFor(e,"zoom"),I={event:r.prevMouseMoveEvent||r.options.event,friction:T?.12:0};let N=r.optionFor(e,"showClass")||void 0,$=!0;r.isOpeningSlide(e)&&(C==="full"?o.zoomToFull(I):C==="cover"?o.zoomToCover(I):C==="max"?o.zoomToMax(I):$=!1,o.stop("current")),$&&N&&(N=o.isDragging?"f-fadeIn":""),r.hideLoading(e),r.revealContent(e,N)}var E},()=>{r.setError(e,"{{IMAGE_ERROR}}")})}process(e,n){return new Promise((r,o)=>{var d;const p=this.instance,c=e.el;p.clearContent(e),p.showLoading(e);let b=this.optionFor(e,"content");if(typeof b=="string"&&(b=Ss(b)),!b||!mi(b)){if(b=document.createElement("img"),b instanceof HTMLImageElement){let k="",E=e.caption;k=typeof E=="string"&&E?E.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${((d=p.carousel)===null||d===void 0?void 0:d.pages.length)||1}`,b.src=n||"",b.alt=k,b.draggable=!1,e.srcset&&b.setAttribute("srcset",e.srcset),this.instance.isOpeningSlide(e)&&(b.fetchPriority="high")}e.sizes&&b.setAttribute("sizes",e.sizes)}Tt(b,"fancybox-image"),e.imageEl=b,p.setContent(e,b,!1),e.panzoom=new Vl(c,fi({transformParent:!0},this.option("Panzoom")||{},{content:b,width:(k,E)=>p.optionFor(e,"width","auto",E)||"auto",height:(k,E)=>p.optionFor(e,"height","auto",E)||"auto",wheel:()=>{const k=p.option("wheel");return(k==="zoom"||k=="pan")&&k},click:(k,E)=>{var C,T;if(p.isCompact||p.isClosing()||e.index!==((C=p.getSlide())===null||C===void 0?void 0:C.index))return!1;if(E){const N=E.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(N.nodeName))return!1}let I=!E||E.target&&((T=e.contentEl)===null||T===void 0?void 0:T.contains(E.target));return p.option(I?"contentClick":"backdropClick")||!1},dblClick:()=>p.isCompact?"toggleZoom":p.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:k=>{r(k)},error:()=>{o()},destroy:()=>{o()}}}))})}zoomIn(e){return new Promise((n,r)=>{const o=this.instance,d=o.container,{panzoom:p,contentEl:c,el:b}=e;p&&p.updateMetrics();const k=this.getZoomInfo(e);if(!(k&&b&&c&&p&&d))return void r();const{x:E,y:C,scale:T,opacity:I}=k,N=()=>{e.state!==$r.Closing&&(I&&(c.style.opacity=Math.max(Math.min(1,1-(1-p.scale)/(1-T)),0)+""),p.scale>=1&&p.scale>p.targetScale-.1&&n(p))},$=J=>{(J.scale<.99||J.scale>1.01)&&!J.isDragging||(En(d,Fh),c.style.opacity="",J.off("endAnimation",$),J.off("touchStart",$),J.off("afterTransform",N),n(J))};p.on("endAnimation",$),p.on("touchStart",$),p.on("afterTransform",N),p.on(["error","destroy"],()=>{r()}),p.panTo({x:E,y:C,scale:T,friction:0,ignoreBounds:!0}),p.stop("current");const F={event:p.panMode==="mousemove"?o.prevMouseMoveEvent||o.options.event:void 0},q=this.optionFor(e,"initialSize");Tt(d,Fh),o.hideLoading(e),q==="full"?p.zoomToFull(F):q==="cover"?p.zoomToCover(F):q==="max"?p.zoomToMax(F):p.reset(.172)})}getZoomInfo(e){const{el:n,imageEl:r,thumbEl:o,panzoom:d}=e,p=this.instance,c=p.container;if(!n||!r||!o||!d||$x(o)<3||!this.optionFor(e,"zoom")||!c||p.state===kr.Destroy||getComputedStyle(c).getPropertyValue("--f-images-zoom")==="0")return!1;const b=window.visualViewport||null;if((b?b.scale:1)!==1)return!1;let{top:k,left:E,width:C,height:T}=o.getBoundingClientRect(),{top:I,left:N,fitWidth:$,fitHeight:F}=d.contentRect;if(!(C&&T&&$&&F))return!1;const q=d.container.getBoundingClientRect();N+=q.left,I+=q.top;const J=-1*(N+.5*$-(E+.5*C)),Q=-1*(I+.5*F-(k+.5*T)),me=C/$;let ke=this.option("zoomOpacity")||!1;return ke==="auto"&&(ke=Math.abs(C/T-$/F)>.1),{x:J,y:Q,scale:me,opacity:ke}}attach(){const e=this,n=e.instance;n.on("Carousel.change",e.onChange),n.on("Carousel.createSlide",e.onCreateSlide),n.on("Carousel.removeSlide",e.onRemoveSlide),n.on("close",e.onClose)}detach(){const e=this,n=e.instance;n.off("Carousel.change",e.onChange),n.off("Carousel.createSlide",e.onCreateSlide),n.off("Carousel.removeSlide",e.onRemoveSlide),n.off("close",e.onClose)}}Object.defineProperty(Xx,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),typeof SuppressedError=="function"&&SuppressedError;const Qm="html",Kx="image",eg="map",to="youtube",Ma="vimeo",bd="html5video",Jx=(t,e={})=>{const n=new URL(t),r=new URLSearchParams(n.search),o=new URLSearchParams;for(const[c,b]of[...r,...Object.entries(e)]){let k=b+"";if(c==="t"){let E=k.match(/((\d*)m)?(\d*)s?/);E&&o.set("start",60*parseInt(E[2]||"0")+parseInt(E[3]||"0")+"")}else o.set(c,k)}let d=o+"",p=t.match(/#t=((.*)?\d+s)/);return p&&(d+=`#t=${p[1]}`),d},lR={ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:`<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">
|
625
|
-
<source src="{{src}}" type="{{format}}" />Sorry, your browser doesn't support embedded videos.</video>`,videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},cR=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class Qx extends us{onBeforeInitSlide(e,n,r){this.processType(r)}onCreateSlide(e,n,r){this.setContent(r)}onClearContent(e,n){n.xhr&&(n.xhr.abort(),n.xhr=null);const r=n.iframeEl;r&&(r.onload=r.onerror=null,r.src="//about:blank",n.iframeEl=null);const o=n.contentEl,d=n.placeholderEl;if(n.type==="inline"&&o&&d)o.classList.remove("fancybox__content"),getComputedStyle(o).getPropertyValue("display")!=="none"&&(o.style.display="none"),setTimeout(()=>{d&&(o&&d.parentNode&&d.parentNode.insertBefore(o,d),d.remove())},0),n.contentEl=void 0,n.placeholderEl=void 0;else for(;n.el&&n.el.firstChild;)n.el.removeChild(n.el.firstChild)}onSelectSlide(e,n,r){r.state===$r.Ready&&this.playVideo()}onUnselectSlide(e,n,r){var o,d;if(r.type===bd){try{(d=(o=r.el)===null||o===void 0?void 0:o.querySelector("video"))===null||d===void 0||d.pause()}catch{}return}let p;r.type===Ma?p={method:"pause",value:"true"}:r.type===to&&(p={event:"command",func:"pauseVideo"}),p&&r.iframeEl&&r.iframeEl.contentWindow&&r.iframeEl.contentWindow.postMessage(JSON.stringify(p),"*"),r.poller&&clearTimeout(r.poller)}onDone(e,n){e.isCurrentSlide(n)&&!e.isClosing()&&this.playVideo()}onRefresh(e,n){n.slides.forEach(r=>{r.el&&(this.resizeIframe(r),this.setAspectRatio(r))})}onMessage(e){try{let n=JSON.parse(e.data);if(e.origin==="https://player.vimeo.com"){if(n.event==="ready")for(let r of Array.from(document.getElementsByClassName("fancybox__iframe")))r instanceof HTMLIFrameElement&&r.contentWindow===e.source&&(r.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&n.event==="onReady"){const r=document.getElementById(n.id);r&&(r.dataset.ready="true")}}catch{}}loadAjaxContent(e){const n=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);const r=this.instance,o=new XMLHttpRequest;r.showLoading(e),o.onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&r.state===kr.Ready&&(r.hideLoading(e),o.status===200?r.setContent(e,o.responseText):r.setError(e,o.status===404?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const d=e.ajax||null;o.open(d?"POST":"GET",n+""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.send(d),e.xhr=o}setInlineContent(e){let n=null;if(mi(e.src))n=e.src;else if(typeof e.src=="string"){const r=e.src.split("#",2).pop();n=r?document.getElementById(r):null}if(n){if(e.type==="clone"||n.closest(".fancybox__slide")){n=n.cloneNode(!0);const r=n.dataset.animationName;r&&(n.classList.remove(r),delete n.dataset.animationName);let o=n.getAttribute("id");o=o?`${o}--clone`:`clone-${this.instance.id}-${e.index}`,n.setAttribute("id",o)}else if(n.parentNode){const r=document.createElement("div");r.classList.add("fancybox-placeholder"),n.parentNode.insertBefore(r,n),e.placeholderEl=r}this.instance.setContent(e,n)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){const{src:n,el:r}=e;if(!n||typeof n!="string"||!r)return;r.classList.add("is-loading");const o=this.instance,d=document.createElement("iframe");d.className="fancybox__iframe",d.setAttribute("id",`fancybox__iframe_${o.id}_${e.index}`);for(const[c,b]of Object.entries(this.optionFor(e,"iframeAttr")||{}))d.setAttribute(c,b);d.onerror=()=>{o.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=d;const p=this.optionFor(e,"preload");if(e.type!=="iframe"||p===!1)return d.setAttribute("src",e.src+""),o.setContent(e,d,!1),this.resizeIframe(e),void o.revealContent(e);o.showLoading(e),d.onload=()=>{if(!d.src.length)return;const c=d.dataset.ready!=="true";d.dataset.ready="true",this.resizeIframe(e),c?o.revealContent(e):o.hideLoading(e)},d.setAttribute("src",n),o.setContent(e,d,!1)}resizeIframe(e){const{type:n,iframeEl:r}=e;if(n===to||n===Ma)return;const o=r==null?void 0:r.parentElement;if(!r||!o)return;let d=e.autoSize;d===void 0&&(d=this.optionFor(e,"autoSize"));let p=e.width||0,c=e.height||0;p&&c&&(d=!1);const b=o&&o.style;if(e.preload!==!1&&d!==!1&&b)try{const k=window.getComputedStyle(o),E=parseFloat(k.paddingLeft)+parseFloat(k.paddingRight),C=parseFloat(k.paddingTop)+parseFloat(k.paddingBottom),T=r.contentWindow;if(T){const I=T.document,N=I.getElementsByTagName(Qm)[0],$=I.body;b.width="",$.style.overflow="hidden",p=p||N.scrollWidth+E,b.width=`${p}px`,$.style.overflow="",b.flex="0 0 auto",b.height=`${$.scrollHeight}px`,c=N.scrollHeight+C}}catch{}if(p||c){const k={flex:"0 1 auto",width:"",height:""};p&&p!=="auto"&&(k.width=`${p}px`),c&&c!=="auto"&&(k.height=`${c}px`),Object.assign(b,k)}}playVideo(){const e=this.instance.getSlide();if(!e)return;const{el:n}=e;if(!n||!n.offsetParent||!this.optionFor(e,"videoAutoplay"))return;if(e.type===bd)try{const o=n.querySelector("video");if(o){const d=o.play();d!==void 0&&d.then(()=>{}).catch(p=>{o.muted=!0,o.play()})}}catch{}if(e.type!==to&&e.type!==Ma)return;const r=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let o;if(e.iframeEl.dataset.ready==="true")return o=e.type===to?{event:"command",func:"playVideo"}:{method:"play",value:"true"},o&&e.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),void(e.poller=void 0);e.type===to&&(o={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"))}e.poller=setTimeout(r,250)};r()}processType(e){if(e.html)return e.type=Qm,e.src=e.html,void(e.html="");const n=this.instance.optionFor(e,"src","");if(!n||typeof n!="string")return;let r=e.type,o=null;if(o=n.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const d=this.optionFor(e,to),{nocookie:p}=d,c=function(C,T){var I={};for(var N in C)Object.prototype.hasOwnProperty.call(C,N)&&T.indexOf(N)<0&&(I[N]=C[N]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function"){var $=0;for(N=Object.getOwnPropertySymbols(C);$<N.length;$++)T.indexOf(N[$])<0&&Object.prototype.propertyIsEnumerable.call(C,N[$])&&(I[N[$]]=C[N[$]])}return I}(d,["nocookie"]),b=`www.youtube${p?"-nocookie":""}.com`,k=Jx(n,c),E=encodeURIComponent(o[2]);e.videoId=E,e.src=`https://${b}/embed/${E}?${k}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${E}/mqdefault.jpg`,r=to}else if(o=n.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const d=Jx(n,this.optionFor(e,Ma)),p=encodeURIComponent(o[1]),c=o[4]||"";e.videoId=p,e.src=`https://player.vimeo.com/video/${p}?${c?`h=${c}${d?"&":""}`:""}${d}`,r=Ma}if(!r&&e.triggerEl){const d=e.triggerEl.dataset.type;cR.includes(d)&&(r=d)}r||typeof n=="string"&&(n.charAt(0)==="#"?r="inline":(o=n.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(r=bd,e.videoFormat=e.videoFormat||"video/"+(o[1]==="ogv"?"ogg":o[1])):n.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?r=Kx:n.match(/\.(pdf)((\?|#).*)?$/i)&&(r="pdf")),(o=n.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`https://maps.google.${o[1]}/?ll=${(o[2]?o[2]+"&z="+Math.floor(parseFloat(o[3]))+(o[4]?o[4].replace(/^\//,"&"):""):o[4]+"").replace(/\?/,"&")}&output=${o[4]&&o[4].indexOf("layer=c")>0?"svembed":"embed"}`,r=eg):(o=n.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`https://maps.google.${o[1]}/maps?q=${o[2].replace("query=","q=").replace("api=1","")}&output=embed`,r=eg),r=r||this.instance.option("defaultType"),e.type=r,r===Kx&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){const n=this.instance.optionFor(e,"src")||"";if(e&&e.type&&n){switch(e.type){case Qm:this.instance.setContent(e,n);break;case bd:const r=this.option("videoTpl");r&&this.instance.setContent(e,r.replace(/\{\{src\}\}/gi,n+"").replace(/\{\{format\}\}/gi,this.optionFor(e,"videoFormat")||"").replace(/\{\{poster\}\}/gi,e.poster||e.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case eg:case to:case Ma:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){const n=e.contentEl;if(!(e.el&&n&&e.type&&[to,Ma,bd].includes(e.type)))return;let r,o=e.width||"auto",d=e.height||"auto";if(o==="auto"||d==="auto"){r=this.optionFor(e,"videoRatio");const k=(r+"").match(/(\d+)\s*\/\s?(\d+)/);r=k&&k.length>2?parseFloat(k[1])/parseFloat(k[2]):parseFloat(r+"")}else o&&d&&(r=o/d);if(!r)return;n.style.aspectRatio="",n.style.width="",n.style.height="",n.offsetHeight;const p=n.getBoundingClientRect(),c=p.width||1,b=p.height||1;n.style.aspectRatio=r+"",r<c/b?(d=d==="auto"?b:Math.min(b,d),n.style.width="auto",n.style.height=`${d}px`):(o=o==="auto"?c:Math.min(c,o),n.style.width=`${o}px`,n.style.height="auto")}attach(){const e=this,n=e.instance;n.on("Carousel.beforeInitSlide",e.onBeforeInitSlide),n.on("Carousel.createSlide",e.onCreateSlide),n.on("Carousel.selectSlide",e.onSelectSlide),n.on("Carousel.unselectSlide",e.onUnselectSlide),n.on("Carousel.Panzoom.refresh",e.onRefresh),n.on("done",e.onDone),n.on("clearContent",e.onClearContent),window.addEventListener("message",e.onMessage)}detach(){const e=this,n=e.instance;n.off("Carousel.beforeInitSlide",e.onBeforeInitSlide),n.off("Carousel.createSlide",e.onCreateSlide),n.off("Carousel.selectSlide",e.onSelectSlide),n.off("Carousel.unselectSlide",e.onUnselectSlide),n.off("Carousel.Panzoom.refresh",e.onRefresh),n.off("done",e.onDone),n.off("clearContent",e.onClearContent),window.removeEventListener("message",e.onMessage)}}Object.defineProperty(Qx,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:lR});const $h="play",jh="pause",xd="ready";class ev extends us{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:xd}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==xd}onReady(e){this.option("autoStart")&&(e.isInfinite||e.page<e.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){document.visibilityState==="visible"?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var e;this.inHover=!1,!((e=this.instance.panzoom)===null||e===void 0)&&e.isResting&&this.resume()}onTimerEnd(){const e=this.instance;this.state==="play"&&(e.isInfinite||e.page!==e.pages.length-1?e.slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();const n=this.instance,r=((e=n.pages[n.page])===null||e===void 0?void 0:e.slides)||[];let o=this.option("progressParentEl");if(o||(o=(r.length===1?r[0].el:null)||n.viewport),!o)return null;const d=document.createElement("div");return Tt(d,"f-progress"),o.prepend(d),this.progressBar=d,d.offsetHeight,d}set(){const e=this,n=e.instance;if(n.pages.length<2||e.timer)return;const r=e.option("timeout");e.state=$h,Tt(n.container,"has-autoplay");let o=e.createProgressBar();o&&(o.style.transitionDuration=`${r}ms`,o.style.transform="scaleX(1)"),e.timer=setTimeout(()=>{e.timer=null,e.inHover||e.onTimerEnd()},r),e.emit("set")}clear(){const e=this;e.timer&&(clearTimeout(e.timer),e.timer=null),e.removeProgressBar()}start(){const e=this;if(e.set(),e.state!==xd){if(e.option("pauseOnHover")){const n=e.instance.container;n.addEventListener("mouseenter",e.onMouseEnter,!1),n.addEventListener("mouseleave",e.onMouseLeave,!1)}document.addEventListener("visibilitychange",e.onVisibilityChange,!1),e.emit("start")}}stop(){const e=this,n=e.state,r=e.instance.container;e.clear(),e.state=xd,r.removeEventListener("mouseenter",e.onMouseEnter,!1),r.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),En(r,"has-autoplay"),n!==xd&&e.emit("stop")}pause(){const e=this;e.state===$h&&(e.state=jh,e.clear(),e.emit(jh))}resume(){const e=this,n=e.instance;if(n.isInfinite||n.page!==n.pages.length-1)if(e.state!==$h){if(e.state===jh&&!e.inHover){const r=new Event("resume",{bubbles:!0,cancelable:!0});e.emit("resume",r),r.defaultPrevented||e.set()}}else e.set();else e.stop()}toggle(){this.state===$h||this.state===jh?this.stop():this.start()}attach(){const e=this,n=e.instance;n.on("ready",e.onReady),n.on("Panzoom.startAnimation",e.onChange),n.on("Panzoom.endAnimation",e.onSettle),n.on("Panzoom.touchMove",e.onChange)}detach(){const e=this,n=e.instance;n.off("ready",e.onReady),n.off("Panzoom.startAnimation",e.onChange),n.off("Panzoom.endAnimation",e.onSettle),n.off("Panzoom.touchMove",e.onChange),e.stop()}}Object.defineProperty(ev,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class tv extends us{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){const n=e.carousel;if(!n)return;const r=e.container;r&&(n.options.Autoplay=fi({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{e.emit("startSlideshow")},set:o=>{var d;r.classList.add("has-slideshow"),((d=e.getSlide())===null||d===void 0?void 0:d.state)!==$r.Ready&&o.pause()},stop:()=>{r.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume:(o,d)=>{var p,c,b;!d||!d.cancelable||((p=e.getSlide())===null||p===void 0?void 0:p.state)===$r.Ready&&(!((b=(c=e.carousel)===null||c===void 0?void 0:c.panzoom)===null||b===void 0)&&b.isResting)||d.preventDefault()}}}),n.attachPlugins({Autoplay:ev}),this.ref=n.plugins.Autoplay)}onReady(e){const n=e.carousel,r=this.ref;r&&n&&this.option("playOnStart")&&(n.isInfinite||n.page<n.pages.length-1)&&r.start()}onDone(e,n){const r=this.ref,o=e.carousel;if(!r||!o)return;const d=n.panzoom;d&&d.on("startAnimation",()=>{e.isCurrentSlide(n)&&r.stop()}),e.isCurrentSlide(n)&&r.resume()}onKeydown(e,n){var r;const o=this.ref;o&&n===this.option("key")&&((r=document.activeElement)===null||r===void 0?void 0:r.nodeName)!=="BUTTON"&&o.toggle()}attach(){const e=this,n=e.instance;n.on("Carousel.init",e.onPrepare),n.on("Carousel.ready",e.onReady),n.on("done",e.onDone),n.on("keydown",e.onKeydown)}detach(){const e=this,n=e.instance;n.off("Carousel.init",e.onPrepare),n.off("Carousel.ready",e.onReady),n.off("done",e.onDone),n.off("keydown",e.onKeydown)}}Object.defineProperty(tv,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:t=>{var e;return((e=t.instance.container)===null||e===void 0?void 0:e.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||t.instance.container},timeout:3e3}});const nv={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};var no;(function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Hidden=2]="Hidden"})(no||(no={}));const rv="isResting",Uh="thumbWidth",zl="thumbHeight",As="thumbClipWidth";let iv=class extends us{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:no.Init})}get isModern(){return this.type==="modern"}onInitSlide(t,e){const n=e.el?e.el.dataset:void 0;n&&(e.thumbSrc=n.thumbSrc||e.thumbSrc||"",e[As]=parseFloat(n[As]||"")||e[As]||0,e[zl]=parseFloat(n.thumbHeight||"")||e[zl]||0),this.addSlide(e)}onInitSlides(){this.build()}onChange(){var t;if(!this.isModern)return;const e=this.container,n=this.instance,r=n.panzoom,o=this.carousel,d=o?o.panzoom:null,p=n.page;if(r&&o&&d){if(r.isDragging){En(e,this.cn(rv));let c=((t=o.pages[p])===null||t===void 0?void 0:t.pos)||0;c+=n.getProgress(p)*(this[As]+this.thumbGap);let b=d.getBounds();-1*c>b.x.min&&-1*c<b.x.max&&d.panTo({x:-1*c,friction:.12})}else Ts(e,this.cn(rv),r.isResting);this.shiftModern()}}onRefresh(){this.updateProps();for(const t of this.instance.slides||[])this.resizeModernSlide(t);this.shiftModern()}isDisabled(){const t=this.option("minCount")||0;if(t){const n=this.instance;let r=0;for(const o of n.slides||[])o.thumbSrc&&r++;if(r<t)return!0}const e=this.option("type");return["modern","classic"].indexOf(e)<0}getThumb(t){const e=this.option("thumbTpl")||"";return{html:this.instance.localize(e,[["%i",t.index],["%d",t.index+1],["%s",t.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(t){const e=this.carousel;e&&e.addSlide(t.index,this.getThumb(t))}getSlides(){const t=[];for(const e of this.instance.slides||[])t.push(this.getThumb(e));return t}resizeModernSlide(t){this.isModern&&(t[Uh]=t[As]&&t[zl]?Math.round(this[zl]*(t[As]/t[zl])):this[Uh])}updateProps(){const t=this.container;if(!t)return;const e=n=>parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-"+n))||0;this.thumbGap=e("gap"),this.thumbExtraGap=e("extra-gap"),this[Uh]=e("width")||40,this[As]=e("clip-width")||40,this[zl]=e("height")||40}build(){const t=this;if(t.state!==no.Init)return;if(t.isDisabled())return void t.emit("disabled");const e=t.instance,n=e.container,r=t.getSlides(),o=t.option("type");t.type=o;const d=t.option("parentEl"),p=t.cn("container"),c=t.cn("track");let b=d==null?void 0:d.querySelector("."+p);b||(b=document.createElement("div"),Tt(b,p),d?d.appendChild(b):n.after(b)),Tt(b,`is-${o}`),Tt(n,t.cn("hasThumbs")),t.container=b,t.updateProps();let k=b.querySelector("."+c);k||(k=document.createElement("div"),Tt(k,t.cn("track")),b.appendChild(k)),t.track=k;const E=fi({},{track:k,infinite:!1,center:!0,fill:o==="classic",dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},t.option("Carousel")||{},{Sync:{target:e},slides:r}),C=new e.constructor(b,E);C.on("createSlide",(T,I)=>{t.setProps(I.index),t.emit("createSlide",I,I.el)}),C.on("ready",()=>{t.shiftModern(),t.emit("ready")}),C.on("refresh",()=>{t.shiftModern()}),C.on("Panzoom.click",(T,I,N)=>{t.onClick(N)}),t.carousel=C,t.state=no.Ready}onClick(t){t.preventDefault(),t.stopPropagation();const e=this.instance,{pages:n,page:r}=e,o=$=>{if($){const F=$.closest("[data-carousel-index]");if(F)return[parseInt(F.dataset.carouselIndex||"",10)||0,F]}return[-1,void 0]},d=($,F)=>{const q=document.elementFromPoint($,F);return q?o(q):[-1,void 0]};let[p,c]=o(t.target);if(p>-1)return;const b=this[As],k=t.clientX,E=t.clientY;let[C,T]=d(k-b,E),[I,N]=d(k+b,E);T&&N?(p=Math.abs(k-T.getBoundingClientRect().right)<Math.abs(k-N.getBoundingClientRect().left)?C:I,p===r&&(p=p===C?I:C)):T?p=C:N&&(p=I),p>-1&&n[p]&&e.slideTo(p)}getShift(t){var e;const n=this,{instance:r}=n,o=n.carousel;if(!r||!o)return 0;const d=n[Uh],p=n[As],c=n.thumbGap,b=n.thumbExtraGap;if(!(!((e=o.slides[t])===null||e===void 0)&&e.el))return 0;const k=.5*(d-p),E=r.pages.length-1;let C=r.getProgress(0),T=r.getProgress(E),I=r.getProgress(t,!1,!0),N=0,$=k+b+c;const F=C<0&&C>-1,q=T>0&&T<1;return t===0?(N=$*Math.abs(C),q&&C===1&&(N-=$*Math.abs(T))):t===E?(N=$*Math.abs(T)*-1,F&&T===-1&&(N+=$*Math.abs(C))):F||q?(N=-1*$,N+=$*Math.abs(C),N+=$*(1-Math.abs(T))):N=$*I,N}setProps(t){var e;const n=this;if(!n.isModern)return;const{instance:r}=n,o=n.carousel;if(r&&o){const d=(e=o.slides[t])===null||e===void 0?void 0:e.el;if(d&&d.childNodes.length){let p=ct(1-Math.abs(r.getProgress(t))),c=ct(n.getShift(t));d.style.setProperty("--progress",p?p+"":""),d.style.setProperty("--shift",c+"")}}}shiftModern(){const t=this;if(!t.isModern)return;const{instance:e,track:n}=t,r=e.panzoom,o=t.carousel;if(!(e&&n&&r&&o)||r.state===An.Init||r.state===An.Destroy)return;for(const p of e.slides)t.setProps(p.index);let d=(t[As]+t.thumbGap)*(o.slides.length||0);n.style.setProperty("--width",d+"")}cleanup(){const t=this;t.carousel&&t.carousel.destroy(),t.carousel=null,t.container&&t.container.remove(),t.container=null,t.track&&t.track.remove(),t.track=null,t.state=no.Init,En(t.instance.container,t.cn("hasThumbs"))}attach(){const t=this,e=t.instance;e.on("initSlide",t.onInitSlide),e.state===ur.Init?e.on("initSlides",t.onInitSlides):t.onInitSlides(),e.on(["change","Panzoom.afterTransform"],t.onChange),e.on("Panzoom.refresh",t.onRefresh)}detach(){const t=this,e=t.instance;e.off("initSlide",t.onInitSlide),e.off("initSlides",t.onInitSlides),e.off(["change","Panzoom.afterTransform"],t.onChange),e.off("Panzoom.refresh",t.onRefresh),t.cleanup()}};Object.defineProperty(iv,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:nv});const dR=Object.assign(Object.assign({},nv),{key:"t",showOnStart:!0,parentEl:null}),sv="is-masked",ov="aria-hidden";class av extends us{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onClick(e,n){n.stopPropagation()}onCreateSlide(e,n){var r,o,d;const p=((d=(o=(r=this.instance)===null||r===void 0?void 0:r.carousel)===null||o===void 0?void 0:o.slides[n.index])===null||d===void 0?void 0:d.type)||"",c=n.el;if(c&&p){let b=`for-${p}`;["video","youtube","vimeo","html5video"].includes(p)&&(b+=" for-video"),Tt(c,b)}}onInit(){var e;const n=this,r=n.instance,o=r.carousel;if(n.ref||!o)return;const d=n.option("parentEl")||r.footer||r.container;if(!d)return;const p=fi({},n.options,{parentEl:d,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:r.option("Carousel.friction")||0}},on:{ready:c=>{const b=c.container;b&&this.hidden&&(n.refresh(),b.style.transition="none",n.hide(),b.offsetHeight,queueMicrotask(()=>{b.style.transition="",n.show()}))}}});p.Carousel=p.Carousel||{},p.Carousel.on=fi(((e=n.options.Carousel)===null||e===void 0?void 0:e.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),o.options.Thumbs=p,o.attachPlugins({Thumbs:iv}),n.ref=o.plugins.Thumbs,n.option("showOnStart")||(n.ref.state=no.Hidden,n.hidden=!0)}onResize(){var e;const n=(e=this.ref)===null||e===void 0?void 0:e.container;n&&(n.style.maxHeight="")}onKeydown(e,n){const r=this.option("key");r&&r===n&&this.toggle()}toggle(){const e=this.ref;if(e&&!e.isDisabled())return e.state===no.Hidden?(e.state=no.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){const e=this.ref;if(!e||e.isDisabled())return;const n=e.container;n&&(this.refresh(),n.offsetHeight,n.removeAttribute(ov),n.classList.remove(sv),this.hidden=!1)}hide(){const e=this.ref,n=e&&e.container;n&&(this.refresh(),n.offsetHeight,n.classList.add(sv),n.setAttribute(ov,"true")),this.hidden=!0}refresh(){const e=this.ref;if(!e||!e.state)return;const n=e.container,r=(n==null?void 0:n.firstChild)||null;n&&r&&r.childNodes.length&&(n.style.maxHeight=`${r.getBoundingClientRect().height}px`)}attach(){const e=this,n=e.instance;n.state===kr.Init?n.on("Carousel.init",e.onInit):e.onInit(),n.on("resize",e.onResize),n.on("keydown",e.onKeydown)}detach(){var e;const n=this,r=n.instance;r.off("Carousel.init",n.onInit),r.off("resize",n.onResize),r.off("keydown",n.onKeydown),(e=r.carousel)===null||e===void 0||e.detachPlugins(["Thumbs"]),n.ref=null}}Object.defineProperty(av,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:dR});const tg={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};var Ia;(function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Disabled=2]="Disabled"})(Ia||(Ia={}));const uR={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null},hR={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},lv="has-toolbar",ng="fancybox__toolbar";class cv extends us{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ia.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(e){var n;if(!e.carousel)return;let r=this.option("display"),o=this.option("absolute"),d=this.option("enabled");if(d==="auto"){const k=this.instance.carousel;let E=0;if(k)for(const C of k.slides)(C.panzoom||C.type==="image")&&E++;E||(d=!1)}d||(r=void 0);let p=0;const c={left:[],middle:[],right:[]};if(r)for(const k of["left","middle","right"])for(const E of r[k]){const C=this.createEl(E);C&&((n=c[k])===null||n===void 0||n.push(C),p++)}let b=null;if(p&&(b=this.createContainer()),b){for(const[k,E]of Object.entries(c)){const C=document.createElement("div");Tt(C,ng+"__column is-"+k);for(const T of E)C.appendChild(T);o!=="auto"||k!=="middle"||E.length||(o=!0),b.appendChild(C)}o===!0&&Tt(b,"is-absolute"),this.state=Ia.Ready,this.onRefresh()}else this.state=Ia.Disabled}onClick(e){var n,r;const o=this.instance,d=o.getSlide(),p=d==null?void 0:d.panzoom,c=e.target,b=c&&mi(c)?c.dataset:null;if(!b)return;if(b.fancyboxToggleThumbs!==void 0)return e.preventDefault(),e.stopPropagation(),void((n=o.plugins.Thumbs)===null||n===void 0||n.toggle());if(b.fancyboxToggleFullscreen!==void 0)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(b.fancyboxToggleSlideshow!==void 0){e.preventDefault(),e.stopPropagation();const C=(r=o.carousel)===null||r===void 0?void 0:r.plugins.Autoplay;let T=C.isActive;return p&&p.panMode==="mousemove"&&!T&&p.reset(),void(T?C.stop():C.start())}const k=b.panzoomAction,E=b.panzoomChange;if((E||k)&&(e.preventDefault(),e.stopPropagation()),E){let C={};try{C=JSON.parse(E)}catch{}p&&p.applyChange(C)}else k&&p&&p[k]&&p[k]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const e=this.container;if(!e)return;const n=this.instance.getSlide();if(!n||n.state!==$r.Ready)return;const r=n&&!n.error&&n.panzoom;for(const p of e.querySelectorAll("[data-panzoom-action]"))r?(p.removeAttribute("disabled"),p.removeAttribute("tabindex")):(p.setAttribute("disabled",""),p.setAttribute("tabindex","-1"));let o=r&&r.canZoomIn(),d=r&&r.canZoomOut();for(const p of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))o?(p.removeAttribute("disabled"),p.removeAttribute("tabindex")):(p.setAttribute("disabled",""),p.setAttribute("tabindex","-1"));for(const p of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))d?(p.removeAttribute("disabled"),p.removeAttribute("tabindex")):(p.setAttribute("disabled",""),p.setAttribute("tabindex","-1"));for(const p of e.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){d||o?(p.removeAttribute("disabled"),p.removeAttribute("tabindex")):(p.setAttribute("disabled",""),p.setAttribute("tabindex","-1"));const c=p.querySelector("g");c&&(c.style.display=o?"":"none")}}onDone(e,n){var r;(r=n.panzoom)===null||r===void 0||r.on("afterTransform",()=>{this.instance.isCurrentSlide(n)&&this.onRefresh()}),this.instance.isCurrentSlide(n)&&this.onRefresh()}createContainer(){const e=this.instance.container;if(!e)return null;const n=this.option("parentEl")||e;let r=n.querySelector("."+ng);return r||(r=document.createElement("div"),Tt(r,ng),n.prepend(r)),r.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&Tt(e,lv),this.container=r,r}createEl(e){const n=this.instance,r=n.carousel;if(!r||e==="toggleFS"||e==="fullscreen"&&!Ux())return null;let o=null;const d=r.slides.length||0;let p=0,c=0;for(const k of r.slides)(k.panzoom||k.type==="image")&&p++,(k.type==="image"||k.downloadSrc)&&c++;if(d<2&&["infobar","prev","next"].includes(e))return o;if(tg[e]!==void 0&&!p||e==="download"&&!c)return null;if(e==="thumbs"){const k=n.plugins.Thumbs;if(!k||!k.isEnabled)return null}if(e==="slideshow"&&(!r.plugins.Autoplay||d<2))return null;if(tg[e]!==void 0){const k=tg[e];o=document.createElement("button"),o.setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),Tt(o,"f-button"),k.action&&(o.dataset.panzoomAction=k.action),k.change&&(o.dataset.panzoomChange=JSON.stringify(k.change)),o.appendChild(Ss(this.instance.localize(k.icon)))}else{const k=(this.option("items")||[])[e];k&&(o=Ss(this.instance.localize(k.tpl)),typeof k.click=="function"&&o.addEventListener("click",E=>{E.preventDefault(),E.stopPropagation(),typeof k.click=="function"&&k.click.call(this,this,E)}))}const b=o==null?void 0:o.querySelector("svg");if(b)for(const[k,E]of Object.entries(hR))b.getAttribute(k)||b.setAttribute(k,String(E));return o}removeContainer(){const e=this.container;e&&e.remove(),this.container=null,this.state=Ia.Disabled;const n=this.instance.container;n&&En(n,lv)}attach(){const e=this,n=e.instance;n.on("Carousel.initSlides",e.onReady),n.on("done",e.onDone),n.on(["reveal","Carousel.change"],e.onChange),e.onReady(e.instance)}detach(){const e=this,n=e.instance;n.off("Carousel.initSlides",e.onReady),n.off("done",e.onDone),n.off(["reveal","Carousel.change"],e.onChange),e.removeContainer()}}Object.defineProperty(cv,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:uR});const pR={Hash:class extends us{onReady(){_d=!1}onChange(t){Da&&clearTimeout(Da);const{hash:e}=Wx(),{hash:n}=Lh(),r=t.isOpeningSlide(t.getSlide());r&&(Hx=n===e?"":n),e&&e!==n&&(Da=setTimeout(()=>{try{if(t.state===kr.Ready){let o="replaceState";r&&!Oh&&(o="pushState",Oh=!0),window.history[o]({},document.title,window.location.pathname+window.location.search+e)}}catch{}},300))}onClose(t){if(Da&&clearTimeout(Da),!_d&&Oh)return Oh=!1,_d=!1,void window.history.back();if(!_d)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(Hx||""))}catch{}}attach(){const t=this.instance;t.on("ready",this.onReady),t.on(["Carousel.ready","Carousel.change"],this.onChange),t.on("close",this.onClose)}detach(){const t=this.instance;t.off("ready",this.onReady),t.off(["Carousel.ready","Carousel.change"],this.onChange),t.off("close",this.onClose)}static parseURL(){return Lh()}static startFromUrl(){qx()}static destroy(){window.removeEventListener("hashchange",Zx,!1)}},Html:Qx,Images:Xx,Slideshow:tv,Thumbs:av,Toolbar:cv},dv="with-fancybox",rg="hide-scrollbar",uv="--fancybox-scrollbar-compensate",hv="--fancybox-body-margin",ig="aria-hidden",sg="is-using-tab",og="is-animated",pv="is-compact",fv="is-loading",ag="is-opening",Hh="has-caption",Ol="disabled",Pa="tabindex",mv="download",lg="href",Ll="src",Po=t=>typeof t=="string",gv=function(){var t=window.getSelection();return!!t&&t.type==="Range"};let Ki,Ji=null,Ra=null,yv=0,_v=0,bv=0,xv=0;const Fl=new Map;let fR=0;class un extends Wm{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(e=[],n={},r={}){super(n),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:kr.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Ki||(Ki=Ux()),this.id=n.id||++fR,Fl.set(this.id,this),this.userSlides=e,this.userPlugins=r,queueMicrotask(()=>{this.init()})}init(){if(this.state===kr.Destroy)return;this.state=kr.Init,this.attachPlugins(Object.assign(Object.assign({},un.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),this.option("hideScrollbar")===!0&&(()=>{if(!yd)return;const n=document,r=n.body,o=n.documentElement;if(r.classList.contains(rg))return;let d=window.innerWidth-o.getBoundingClientRect().width;const p=parseFloat(window.getComputedStyle(r).marginRight);d<0&&(d=0),o.style.setProperty(uv,`${d}px`),p&&r.style.setProperty(hv,`${p}px`),r.classList.add(rg)})(),this.initLayout(),this.scale();const e=()=>{this.initCarousel(this.userSlides),this.state=kr.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(ig,"false")},16)};this.option("Fullscreen.autoStart")&&Ki&&!Ki.isFullscreen()?Ki.request().then(()=>{this.startedFs=!0,e()}).catch(()=>e()):e()}initLayout(){var e,n;const r=this.option("parentEl")||document.body,o=Ss(this.localize(this.option("tpl.main")||""));if(o){if(o.setAttribute("id",`fancybox-${this.id}`),o.setAttribute("aria-label",this.localize("{{MODAL}}")),o.classList.toggle(pv,this.isCompact),Tt(o,this.option("mainClass")||""),Tt(o,ag),this.container=o,this.footer=o.querySelector(".fancybox__footer"),r.appendChild(o),Tt(document.documentElement,dv),Ji&&Ra||(Ji=document.createElement("span"),Tt(Ji,"fancybox-focus-guard"),Ji.setAttribute(Pa,"0"),Ji.setAttribute(ig,"true"),Ji.setAttribute("aria-label","Focus guard"),Ra=Ji.cloneNode(),(e=o.parentElement)===null||e===void 0||e.insertBefore(Ji,o),(n=o.parentElement)===null||n===void 0||n.append(Ra)),o.addEventListener("mousedown",d=>{yv=d.pageX,_v=d.pageY,En(o,sg)}),this.option("closeExisting"))for(const d of Fl.values())d.id!==this.id&&d.close();else this.option("animated")&&(Tt(o,og),setTimeout(()=>{this.isClosing()||En(o,og)},350));this.emit("initLayout")}}initCarousel(e){const n=this.container;if(!n)return;const r=n.querySelector(".fancybox__carousel");if(!r)return;const o=this.carousel=new gd(r,fi({},{slides:e,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));o.on("*",(d,p,...c)=>{this.emit(`Carousel.${p}`,d,...c)}),o.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(d,p,c)=>{this.clearContent(c),c.state=void 0}),o.on("Panzoom.touchStart",()=>{var d,p;this.isCompact||this.endIdle(),!((d=document.activeElement)===null||d===void 0)&&d.closest(".f-thumbs")&&((p=this.container)===null||p===void 0||p.focus())}),o.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(o.on("Panzoom.afterTransform",(d,p)=>{const c=this.getSlide();if(c&&$m(c.el))return;const b=this.container;if(b){const k=Math.abs(p.current.f),E=k<1?"":Math.max(.5,Math.min(1,1-k/p.contentRect.fitHeight*1.5));b.style.setProperty("--fancybox-ts",E?"0s":""),b.style.setProperty("--fancybox-opacity",E+"")}}),o.on("Panzoom.touchEnd",(d,p,c)=>{var b;const k=this.getSlide();if(k&&$m(k.el)||p.isMobile&&document.activeElement&&["TEXTAREA","INPUT"].indexOf((b=document.activeElement)===null||b===void 0?void 0:b.nodeName)!==-1)return;const E=Math.abs(p.dragOffset.y);p.lockedAxis==="y"&&(E>=200||E>=50&&p.dragOffset.time<300)&&(c&&c.cancelable&&c.preventDefault(),this.close(c,"f-throwOut"+(p.current.f<0?"Up":"Down")))})),o.on("change",d=>{var p;let c=(p=this.getSlide())===null||p===void 0?void 0:p.triggerEl;if(c){const b=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:d.page});c.dispatchEvent(b)}}),o.on(["refresh","change"],d=>{const p=this.container;if(!p)return;for(const k of p.querySelectorAll("[data-fancybox-current-index]"))k.innerHTML=d.page+1;for(const k of p.querySelectorAll("[data-fancybox-count]"))k.innerHTML=d.pages.length;if(!d.isInfinite){for(const k of p.querySelectorAll("[data-fancybox-next]"))d.page<d.pages.length-1?(k.removeAttribute(Ol),k.removeAttribute(Pa)):(k.setAttribute(Ol,""),k.setAttribute(Pa,"-1"));for(const k of p.querySelectorAll("[data-fancybox-prev]"))d.page>0?(k.removeAttribute(Ol),k.removeAttribute(Pa)):(k.setAttribute(Ol,""),k.setAttribute(Pa,"-1"))}const c=this.getSlide();if(!c)return;let b=c.downloadSrc||"";b||c.type!=="image"||c.error||!Po(c[Ll])||(b=c[Ll]);for(const k of p.querySelectorAll("[data-fancybox-download]")){const E=c.downloadFilename;b?(k.removeAttribute(Ol),k.removeAttribute(Pa),k.setAttribute(lg,b),k.setAttribute(mv,E||b),k.setAttribute("target","_blank")):(k.setAttribute(Ol,""),k.setAttribute(Pa,"-1"),k.removeAttribute(lg),k.removeAttribute(mv))}}),this.emit("initCarousel")}attachEvents(){const e=this,n=e.container;if(!n)return;n.addEventListener("click",e.onClick,{passive:!1,capture:!1}),n.addEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",e.onVisibilityChange,!1),document.addEventListener("mousemove",e.onMousemove),e.option("trapFocus")&&document.addEventListener("focus",e.onFocus,!0),window.addEventListener("resize",e.onResize);const r=window.visualViewport;r&&(r.addEventListener("scroll",e.onResize),r.addEventListener("resize",e.onResize))}detachEvents(){const e=this,n=e.container;if(!n)return;document.removeEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),n.removeEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),n.removeEventListener("click",e.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",e.onMousemove),window.removeEventListener("resize",e.onResize);const r=window.visualViewport;r&&(r.removeEventListener("resize",e.onResize),r.removeEventListener("scroll",e.onResize)),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),document.removeEventListener("focus",e.onFocus,!0)}scale(){const e=this.container;if(!e)return;const n=window.visualViewport,r=Math.max(1,(n==null?void 0:n.scale)||1);let o="",d="",p="";if(n&&r>1){let c=`${n.offsetLeft}px`,b=`${n.offsetTop}px`;o=n.width*r+"px",d=n.height*r+"px",p=`translate3d(${c}, ${b}, 0) scale(${1/r})`}e.style.transform=p,e.style.width=o,e.style.height=d}onClick(e){var n;const{container:r,isCompact:o}=this;if(!r||this.isClosing())return;!o&&this.option("idle")&&this.resetIdle();const d=e.composedPath()[0];if(d.closest(".fancybox-spinner")||d.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(d.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(d.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();if(e.type==="click"&&e.detail===0||Math.abs(e.pageX-yv)>30||Math.abs(e.pageY-_v)>30)return;const p=document.activeElement;if(gv()&&p&&r.contains(p))return;if(o&&((n=this.getSlide())===null||n===void 0?void 0:n.type)==="image")return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout(()=>{this.toggleIdle(),this.clickTimer=null},350));if(this.emit("click",e),e.defaultPrevented)return;let c=!1;if(d.closest(".fancybox__content")){if(p){if(p.closest("[contenteditable]"))return;d.matches(Km)||p.blur()}if(gv())return;c=this.option("contentClick")}else d.closest(".fancybox__carousel")&&!d.matches(Km)&&(c=this.option("backdropClick"));c==="close"?(e.preventDefault(),this.close(e)):c==="next"?(e.preventDefault(),this.next()):c==="prev"&&(e.preventDefault(),this.prev())}onWheel(e){const n=e.target;let r=this.option("wheel",e);n.closest(".fancybox__thumbs")&&(r="slide");const o=r==="slide",d=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(b,k){return Math.abs(k)>Math.abs(b)?k:b}),p=Math.max(-1,Math.min(1,d)),c=Date.now();this.pwt&&c-this.pwt<300?o&&e.preventDefault():(this.pwt=c,this.emit("wheel",e,p),e.defaultPrevented||(r==="close"?(e.preventDefault(),this.close(e)):r==="slide"&&(Mh(n)||(e.preventDefault(),this[p>0?"prev":"next"]()))))}onScroll(){window.scrollTo(bv,xv)}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const n=e.key,r=this.option("keyboard");if(!r)return;const o=e.composedPath()[0],d=document.activeElement&&document.activeElement.classList,p=d&&d.contains("f-button")||o.dataset.carouselPage||o.dataset.carouselIndex;if(n!=="Escape"&&!p&&mi(o)&&(o.isContentEditable||["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(o.nodeName)!==-1)||(e.key==="Tab"?Tt(this.container,sg):En(this.container,sg),e.ctrlKey||e.altKey||e.shiftKey))return;this.emit("keydown",n,e);const c=r[n];c&&typeof this[c]=="function"&&(e.preventDefault(),this[c]())}onResize(){const e=this.container;if(!e)return;const n=this.isCompact;e.classList.toggle(pv,n),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(e){this.isTopmost()&&this.checkFocus(e)}onMousemove(e){this.prevMouseMoveEvent=e,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){document.visibilityState==="visible"?this.checkFocus():this.endIdle()}manageCloseBtn(e){const n=this.optionFor(e,"closeButton")||!1;if(n==="auto"){const o=this.plugins.Toolbar;if(o&&o.state===Ia.Ready)return}if(!n||!e.contentEl||e.closeBtnEl)return;const r=this.option("tpl.closeButton");if(r){const o=Ss(this.localize(r));e.closeBtnEl=e.contentEl.appendChild(o),e.el&&Tt(e.el,"has-close-btn")}}manageCaption(e=void 0){var n,r;const o="fancybox__caption",d=this.container;if(!d)return;En(d,Hh);const p=this.isCompact||this.option("commonCaption"),c=!p;if(this.caption&&this.stop(this.caption),c&&this.caption&&(this.caption.remove(),this.caption=null),p&&!this.caption)for(const C of((n=this.carousel)===null||n===void 0?void 0:n.slides)||[])C.captionEl&&(C.captionEl.remove(),C.captionEl=void 0,En(C.el,Hh),(r=C.el)===null||r===void 0||r.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||p&&!this.isCurrentSlide(e))return;const b=e.el;let k=this.optionFor(e,"caption","");if(!k)return void(p&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let E=null;if(c){if(E=e.captionEl||null,b&&!E){const C=o+`_${this.id}_${e.index}`;E=document.createElement("div"),Tt(E,o),E.setAttribute("id",C),e.captionEl=b.appendChild(E),Tt(b,Hh),b.setAttribute("aria-labelledby",C)}}else E=this.caption,E||(E=d.querySelector("."+o)),!E&&(E=document.createElement("div"),E.dataset.fancyboxCaption="",Tt(E,o),(this.footer||d).prepend(E)),Tt(d,Hh),this.caption=E;E&&(E.innerHTML="",Po(k)||typeof k=="number"?E.innerHTML=k+"":k instanceof HTMLElement&&E.appendChild(k))}checkFocus(e){this.focus(e)}focus(e){var n;if(this.ignoreFocusChange)return;const r=document.activeElement||null,o=(e==null?void 0:e.target)||null,d=this.container,p=(n=this.carousel)===null||n===void 0?void 0:n.viewport;if(!d||!p||!e&&r&&d.contains(r))return;const c=this.getSlide(),b=c&&c.state===$r.Ready?c.el:null;if(!b||b.contains(r)||d===r)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;const k=Array.from(d.querySelectorAll(Km));let E=[],C=null;for(let I of k){const N=!I.offsetParent||!!I.closest('[aria-hidden="true"]'),$=b&&b.contains(I),F=!p.contains(I);if(I===d||($||F)&&!N){E.push(I);const q=I.dataset.origTabindex;q!==void 0&&q&&(I.tabIndex=parseFloat(q)),I.removeAttribute("data-orig-tabindex"),!I.hasAttribute("autoFocus")&&C||(C=I)}else{const q=I.dataset.origTabindex===void 0?I.getAttribute("tabindex")||"":I.dataset.origTabindex;q&&(I.dataset.origTabindex=q),I.tabIndex=-1}}let T=null;e?(!o||E.indexOf(o)<0)&&(T=C||d,E.length&&(r===Ra?T=E[0]:this.lastFocus!==d&&r!==Ji||(T=E[E.length-1]))):T=c&&c.type==="image"?d:C||d,T&&jx(T),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return((e=un.getInstance())===null||e===void 0?void 0:e.id)==this.id}animate(e=null,n="",r){if(!e||!n)return void(r&&r());this.stop(e);const o=d=>{d.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",o),delete e.dataset.animationName,r&&r(),En(e,n))};e.dataset.animationName=n,e.addEventListener("animationend",o),Tt(e,n)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,n="",r=!0){if(this.isClosing())return;const o=e.el;if(!o)return;let d=null;if(mi(n)?d=n:(d=Ss(n+""),mi(d)||(d=document.createElement("div"),d.innerHTML=n+"")),["img","picture","iframe","video","audio"].includes(d.nodeName.toLowerCase())){const p=document.createElement("div");p.appendChild(d),d=p}mi(d)&&e.filter&&!e.error&&(d=d.querySelector(e.filter)),d&&mi(d)?(Tt(d,"fancybox__content"),e.id&&d.setAttribute("id",e.id),o.classList.add(`has-${e.error?"error":e.type||"unknown"}`),o.prepend(d),d.style.display==="none"&&(d.style.display=""),getComputedStyle(d).getPropertyValue("display")==="none"&&(d.style.display=e.display||this.option("defaultDisplay")||"flex"),e.contentEl=d,r&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,n){const r=e.el,o=e.contentEl;r&&o&&(this.emit("reveal",e),this.hideLoading(e),e.state=$r.Opening,(n=this.isOpeningSlide(e)?n===void 0?this.optionFor(e,"showClass"):n:"f-fadeIn")?this.animate(o,n,()=>{this.done(e)}):this.done(e))}done(e){this.isClosing()||(e.state=$r.Ready,this.emit("done",e),Tt(e.el,"is-done"),this.isCurrentSlide(e)&&this.option("autoFocus")&&queueMicrotask(()=>{var n;(n=e.panzoom)===null||n===void 0||n.updateControls(),this.option("autoFocus")&&this.focus()}),this.isOpeningSlide(e)&&(En(this.container,ag),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(e){const n=this.getSlide();return!(!e||!n)&&n.index===e.index}isOpeningSlide(e){var n,r;return((n=this.carousel)===null||n===void 0?void 0:n.prevPage)===null&&e&&e.index===((r=this.getSlide())===null||r===void 0?void 0:r.index)}showLoading(e){e.state=$r.Loading;const n=e.el;n&&(Tt(n,fv),this.emit("loading",e),e.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===$r.Loading){let r=Ss(qm);Tt(r,"fancybox-spinner"),e.spinnerEl=r,n.prepend(r),this.animate(r,"f-fadeIn")}},250))}hideLoading(e){const n=e.el;if(!n)return;const r=e.spinnerEl;this.isClosing()?r==null||r.remove():(En(n,fv),r&&this.animate(r,"f-fadeOut",()=>{r.remove()}),e.state===$r.Loading&&(this.emit("loaded",e),e.state=$r.Ready))}setError(e,n){if(this.isClosing())return;const r=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",r,e),r.defaultPrevented)return;e.error=n,this.hideLoading(e),this.clearContent(e);const o=document.createElement("div");o.classList.add("fancybox-error"),o.innerHTML=this.localize(n||"<p>{{ERROR}}</p>"),this.setContent(e,o)}clearContent(e){if(e.state===void 0)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);const n=e.el;n&&(En(n,"has-error"),En(n,"has-unknown"),En(n,`has-${e.type||"unknown"}`)),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;const n=this.carousel;return((e=n==null?void 0:n.pages[n==null?void 0:n.page])===null||e===void 0?void 0:e.slides[0])||void 0}close(e,n){if(this.isClosing())return;const r=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",r,e),r.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());const o=()=>{this.proceedClose(e,n)};this.startedFs&&Ki&&Ki.isFullscreen()?Promise.resolve(Ki.exit()).then(()=>o()):o()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){const n=()=>{this.clearIdle(),this.idle=!0,Tt(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(e)n();else{const r=this.option("idle");r&&(this.idleTimer=setTimeout(n,r))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,En(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){Ki&&(Ki.isFullscreen()?Ki.exit():Ki.request().then(()=>{this.startedFs=!0}))}isClosing(){return[kr.Closing,kr.CustomClosing,kr.Destroy].includes(this.state)}proceedClose(e,n){var r,o;this.state=kr.Closing,this.clearIdle(),this.detachEvents();const d=this.container,p=this.carousel,c=this.getSlide(),b=c&&this.option("placeFocusBack")?c.triggerEl||this.option("triggerEl"):null;if(b&&($x(b)?jx(b):b.focus()),d&&(En(d,ag),Tt(d,"is-closing"),d.setAttribute(ig,"true"),this.option("animated")&&Tt(d,og),d.style.pointerEvents="none"),p){p.clearTransitions(),(r=p.panzoom)===null||r===void 0||r.destroy(),(o=p.plugins.Navigation)===null||o===void 0||o.detach();for(const k of p.slides){k.state=$r.Closing,this.hideLoading(k);const E=k.contentEl;E&&this.stop(E);const C=k==null?void 0:k.panzoom;C&&(C.stop(),C.detachEvents(),C.detachObserver()),this.isCurrentSlide(k)||p.emit("removeSlide",k)}}bv=window.scrollX,xv=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",e),this.state!==kr.CustomClosing?(n===void 0&&c&&(n=this.optionFor(c,"hideClass")),n&&c?(this.animate(c.contentEl,n,()=>{p&&p.emit("removeSlide",c)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var e;if(this.state===kr.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=kr.Destroy,(e=this.carousel)===null||e===void 0||e.destroy();const n=this.container;n&&n.remove(),Fl.delete(this.id);const r=un.getInstance();r?r.focus():(Ji&&(Ji.remove(),Ji=null),Ra&&(Ra.remove(),Ra=null),En(document.documentElement,dv),(()=>{if(!yd)return;const o=document,d=o.body;d.classList.remove(rg),d.style.setProperty(hv,""),o.documentElement.style.setProperty(uv,"")})(),this.emit("destroy"))}static bind(e,n,r){if(!yd)return;let o,d="",p={};if(e===void 0?o=document.body:Po(e)?(o=document.body,d=e,typeof n=="object"&&(p=n||{})):(o=e,Po(n)&&(d=n),typeof r=="object"&&(p=r||{})),!o||!mi(o))return;d=d||"[data-fancybox]";const c=un.openers.get(o)||new Map;c.set(d,p),un.openers.set(o,c),c.size===1&&o.addEventListener("click",un.fromEvent)}static unbind(e,n){let r,o="";if(Po(e)?(r=document.body,o=e):(r=e,Po(n)&&(o=n)),!r)return;const d=un.openers.get(r);d&&o&&d.delete(o),o&&d||(un.openers.delete(r),r.removeEventListener("click",un.fromEvent))}static destroy(){let e;for(;e=un.getInstance();)e.destroy();for(const n of un.openers.keys())n.removeEventListener("click",un.fromEvent);un.openers=new Map}static fromEvent(e){if(e.defaultPrevented||e.button&&e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey)return;let n=e.composedPath()[0];const r=n.closest("[data-fancybox-trigger]");if(r){const N=r.dataset.fancyboxTrigger||"",$=document.querySelectorAll(`[data-fancybox="${N}"]`),F=parseInt(r.dataset.fancyboxIndex||"",10)||0;n=$[F]||n}if(!(n&&n instanceof Element))return;let o,d,p,c;if([...un.openers].reverse().find(([N,$])=>!(!N.contains(n)||![...$].reverse().find(([F,q])=>{let J=n.closest(F);return!!J&&(o=N,d=F,p=J,c=q,!0)}))),!o||!d||!p)return;c=c||{},e.preventDefault(),n=p;let b=[],k=fi({},Jm,c);k.event=e,k.triggerEl=n,k.delegate=r;const E=k.groupAll,C=k.groupAttr,T=C&&n?n.getAttribute(`${C}`):"";if((!n||T||E)&&(b=[].slice.call(o.querySelectorAll(d))),n&&!E&&(b=T?b.filter(N=>N.getAttribute(`${C}`)===T):[n]),!b.length)return;const I=un.getInstance();return I&&I.options.triggerEl&&b.indexOf(I.options.triggerEl)>-1?void 0:(n&&(k.startIndex=b.indexOf(n)),un.fromNodes(b,k))}static fromSelector(e,n,r){let o=null,d="",p={};if(Po(e)?(o=document.body,d=e,typeof n=="object"&&(p=n||{})):e instanceof HTMLElement&&Po(n)&&(o=e,d=n,typeof r=="object"&&(p=r||{})),!o||!d)return!1;const c=un.openers.get(o);return!!c&&(p=fi({},c.get(d)||{},p),!!p&&un.fromNodes(Array.from(o.querySelectorAll(d)),p))}static fromNodes(e,n){n=fi({},Jm,n||{});const r=[];for(const o of e){const d=o.dataset||{},p=d[Ll]||o.getAttribute(lg)||o.getAttribute("currentSrc")||o.getAttribute(Ll)||void 0;let c;const b=n.delegate;let k;b&&r.length===n.startIndex&&(c=b instanceof HTMLImageElement?b:b.querySelector("img:not([aria-hidden])")),c||(c=o instanceof HTMLImageElement?o:o.querySelector("img:not([aria-hidden])")),c&&(k=c.currentSrc||c[Ll]||void 0,!k&&c.dataset&&(k=c.dataset.lazySrc||c.dataset[Ll]||void 0));const E={src:p,triggerEl:o,thumbEl:c,thumbElSrc:k,thumbSrc:k};for(const C in d){let T=d[C]+"";T=T!=="false"&&(T==="true"||T),E[C]=T}r.push(E)}return new un(r,n)}static getInstance(e){return e?Fl.get(e):Array.from(Fl.values()).reverse().find(n=>!n.isClosing()&&n)||null}static getSlide(){var e;return((e=un.getInstance())===null||e===void 0?void 0:e.getSlide())||null}static show(e=[],n={}){return new un(e,n)}static next(){const e=un.getInstance();e&&e.next()}static prev(){const e=un.getInstance();e&&e.prev()}static close(e=!0,...n){if(e)for(const r of Fl.values())r.close(...n);else{const r=un.getInstance();r&&r.close(...n)}}}Object.defineProperty(un,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(un,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Jm}),Object.defineProperty(un,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:pR}),Object.defineProperty(un,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map});const Wh=Object.freeze(Object.defineProperty({__proto__:null,Carousel:gd,Fancybox:un,Panzoom:Vl},Symbol.toStringTag,{value:"Module"})),{Fancybox:qh}=Wh,mR={props:{options:Object},mounted(){qh.defaults={...this.options||{}}},updated(){qh.close(),qh.defaults={...this.options||{}}},unmounted(){qh.close()}},gR={ref:"container"};function yR(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",gR,[a.renderSlot(t.$slots,"default")],512)}const _R=Oe(mR,[["render",yR]]),bR={},xR={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-file"};function vR(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",xR,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),a.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"},null,-1)]))}const vv=Oe(bR,[["render",vR]]),wR={componens:{IconFile:vv},props:{item:null},computed:{createDate(){try{const t=pt(this.item.cdate,"YYYY-MM-DD");return new Date(t).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}},methods:{formatBytes(t){if(t<1024)return`${t} B`;const e=t/1024;return e<1024?`${e.toFixed(2)} KB`:`${(e/1024).toFixed(2)} MB`}}},kR={class:"max-w-[55vw]"},ER={class:"text-sm font-semibold text-gray-800 truncate dark:text-neutral-200"},CR={class:"flex items-center text-xs text-gray-500 truncate dark:text-neutral-500"},SR={class:"px-[5px]"},TR={class:""};function AR(t,e,n,r,o,d){var p,c;return a.openBlock(),a.createElementBlock(a.Fragment,null,[e[1]||(e[1]=a.createStaticVNode('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>',1)),a.createElementVNode("div",kR,[a.createElementVNode("p",ER,a.toDisplayString(n.item.uploaded_name),1),a.createElementVNode("p",CR,[a.createElementVNode("span",null,a.toDisplayString(n.item.username),1),a.withDirectives(a.createElementVNode("span",SR,"|",512),[[a.vShow,(p=n.item)==null?void 0:p.username]]),a.createElementVNode("span",null,a.toDisplayString(d.createDate),1),e[0]||(e[0]=a.createElementVNode("span",{class:"px-[5px]"},"|",-1)),a.createElementVNode("span",TR,a.toDisplayString(d.formatBytes((c=n.item)==null?void 0:c.size)),1)])])],64)}const DR=Oe(wR,[["render",AR]]),MR={},IR={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function PR(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",IR,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),a.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),a.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const wv=Oe(MR,[["render",PR]]),RR={},NR={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-trash"};function BR(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",NR,e[0]||(e[0]=[a.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const kv=Oe(RR,[["render",BR]]),VR={components:{Fancybox:_R,VsWidgetFileInfo:DR,IconDownload:wv,IconTrash:kv},props:{item:null,prefix:{type:String,default:"/api"},disabled:{type:Boolean,default:!1}},data(){return{optionsFile:{defaultType:"iframe"}}},computed:{createDate(){try{const t=pt(this.item.cdate,"YYYY-MM-DD");return new Date(t).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}},methods:{isSupportedFile(t){return["pdf","json"].includes(t.ext)},isSupportedAllFile(t){return["ppt","pptx","doc","docx","xls","xlsx"].includes(t.ext)},async downloadFile(t){const e=document.createElement("a");e.setAttribute("download",t.uploaded_name),e.href=t.file_path,e.click()},confirnDeleteFile(){this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteFile,updateListOnConfirm:!0})},async deleteFile(){try{await Le.delete(`${this.prefix}/widget/file/${this.item.entity_id}/${this.item.file_id}`),this.$emit("update")}catch(t){console.error(t)}}}},zR={class:"p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full"},OR={key:0,class:"flex w-full gap-x-3 items-center"},LR=["href"],FR={key:1,class:"flex gap-x-3 w-full items-center"},$R=["href"],jR={key:2,class:"flex gap-x-3 w-full items-center"},UR=["href"],HR={key:3,class:"flex gap-x-3 w-full items-center"},WR={class:"lg:absolute lg:top-3 lg:end-1 opacity-100"},qR={class:"p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},GR={class:"inline-block"},ZR=["disabled"],YR={class:"inline-block"},XR=["disabled"];function KR(t,e,n,r,o,d){const p=a.resolveComponent("VsWidgetFileInfo"),c=a.resolveComponent("Fancybox"),b=a.resolveComponent("IconDownload"),k=a.resolveComponent("IconTrash");return a.openBlock(),a.createElementBlock("div",zR,[n.item.ext==="jpg"||n.item.ext==="png"?(a.openBlock(),a.createElementBlock("div",OR,[a.createVNode(c,null,{default:a.withCtx(()=>[a.createElementVNode("a",{"data-fancybox":"gallery",href:n.item.file_path,target:"_blank",class:"flex gap-x-3 w-full items-center"},[a.createVNode(p,{item:n.item},null,8,["item"])],8,LR)]),_:1})])):d.isSupportedFile(n.item)?(a.openBlock(),a.createElementBlock("div",FR,[a.createVNode(c,{options:o.optionsFile},{default:a.withCtx(()=>[a.createElementVNode("a",{"data-fancybox":"gallery",href:n.item.file_path,target:"_blank",class:"flex gap-x-3 w-full items-center"},[a.createVNode(p,{item:n.item},null,8,["item"])],8,$R)]),_:1},8,["options"])])):d.isSupportedAllFile(n.item)?(a.openBlock(),a.createElementBlock("div",jR,[a.createVNode(c,{options:o.optionsFile},{default:a.withCtx(()=>[a.createElementVNode("a",{"data-fancybox":"gallery",href:`/api/file-preview?id=${n.item.file_id}.pdf`,target:"_blank",class:"flex gap-x-3 w-full items-center"},[a.createVNode(p,{item:n.item},null,8,["item"])],8,UR)]),_:1},8,["options"])])):(a.openBlock(),a.createElementBlock("div",HR,[a.createVNode(p,{item:n.item},null,8,["item"])])),a.createElementVNode("div",WR,[a.createElementVNode("div",qR,[a.createElementVNode("div",GR,[a.createElementVNode("button",{class:"inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[0]||(e[0]=E=>d.downloadFile(n.item)),disabled:n.disabled},[a.createVNode(b,{height:"14",width:"14"})],8,ZR)]),e[2]||(e[2]=a.createElementVNode("div",{class:"w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700"},null,-1)),a.createElementVNode("div",YR,[a.createElementVNode("button",{type:"button",class:"size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",onClick:e[1]||(e[1]=E=>d.confirnDeleteFile()),disabled:n.disabled},[a.createVNode(k,{height:"14",width:"14"})],8,XR)])])])])}const JR=Oe(VR,[["render",KR]]),QR={props:["text"]},eN={class:"pl-3 text-sm font-medium text-gray-600"};function tN(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("p",eN,a.toDisplayString(n.text),1)])}const Ev=Oe(QR,[["render",tN]]),nN={},rN={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-upload"};function iN(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",rN,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),a.createElementVNode("path",{d:"M7 9l5 -5l5 5"},null,-1),a.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const sN=Oe(nN,[["render",iN]]),{Fancybox:oN}=Wh,aN={components:{VsWidgetFileItem:JR,VsEmptyWidget:Ev,IconUpload:sN},props:{id:{type:String,default(){return""}},prefilledData:{},prefix:{type:String,default:"/api"},disabled:{type:Boolean,default:!1}},data(){return{isModalVisible:!1,modal:{},files:"",searchValue:""}},mounted(){this.getFileList()},computed:{filteredFiles(){return this.searchValue===""?this.files:this.files.filter(e=>e.uploaded_name.includes(this.searchValue))}},methods:{async getFileList(){if(this.prefilledData){this.files=this.prefilledData.rows;return}try{const{data:t}=await Le.get(`${this.prefix}/widget/file/${this.id}`);oN.bind("[data-fancybox='gallery']"),this.files=t==null?void 0:t.rows}catch(t){console.error(t)}},async addFile(t){console.log(t),await Promise.all(Array.from(t.target.files).map(async e=>{const n=new FormData;n.append("file",e);try{const r=`${this.prefix}/widget/file/${this.id}`;return await Le.post(r,n),this.$emit("update","file-list"),e}catch(r){return console.error(r),null}})),await this.getFileList()},prepareModal(t){const e={...t};return t.cancel||(e.cancel=()=>{this.isModalVisible=!1}),t.updateListOnConfirm&&(e.confirm=async()=>{await t.confirm(),this.isModalVisible=!1,this.getFileList()}),e},handleOpenModal(t){this.modal=this.prepareModal(t),this.isModalVisible=!0}}},lN={class:"flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700"},cN={class:"flex w-full mb-[12px] items-center gap-x-2"},dN={class:"font-semibold text-gray-800 dark:text-neutral-200 text-[14px]"},uN={class1:"ml-auto"},hN={key:0,class:"py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"},pN={class:"relative"},fN={key:1,class:"space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},mN={key:0},gN={class:"p-4"},yN={class:"mt-1 text-gray-500 dark:text-neutral-500"},_N={class:"flex justify-end mt-4 gap-x-3"};function bN(t,e,n,r,o,d){var k,E;const p=a.resolveComponent("IconUpload"),c=a.resolveComponent("VsWidgetFileItem"),b=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock("div",lN,[a.createElementVNode("div",cN,[a.createElementVNode("h2",dN," Файлів: "+a.toDisplayString(o.files.length),1),a.createElementVNode("div",uN,[a.createElementVNode("label",null,[a.createElementVNode("input",{type:"file",class:"hidden",onChange:e[0]||(e[0]=C=>d.addFile(C))},null,32),a.createElementVNode("div",{class:a.normalizeClass(["py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",{hidden:n.disabled}])},[a.createVNode(p,{height:"16",width:"16"})],2)])])]),((k=o.files)==null?void 0:k.length)>4?(a.openBlock(),a.createElementBlock("div",hN,[a.createElementVNode("div",null,[a.createElementVNode("div",pN,[e[7]||(e[7]=a.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5"},[a.createElementVNode("svg",{class:"flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),a.createElementVNode("path",{d:"m21 21-4.3-4.3"})])],-1)),a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[1]||(e[1]=C=>o.searchValue=C),class:"py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Введіть назву файлу"},null,512),[[a.vModelText,o.searchValue,void 0,{trim:!0}]])])])])):a.createCommentVNode("",!0),(E=o.files)!=null&&E.length?(a.openBlock(),a.createElementBlock("div",fN,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.filteredFiles,(C,T)=>(a.openBlock(),a.createBlock(c,{key:T,id:n.id,prefix:n.prefix,item:C,disabled:n.disabled,onUpdate:e[2]||(e[2]=I=>t.$emit("update","file-list")),onOpenModal:e[3]||(e[3]=I=>d.handleOpenModal(I))},null,8,["id","prefix","item","disabled"]))),128)),d.filteredFiles.length?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",mN,e[8]||(e[8]=[a.createElementVNode("p",{class:"text-sm text-gray-600 font-sm"}," Файлів з такою назвою не існує, введіть інше пошукове слово ",-1)])))])):a.createCommentVNode("",!0),a.createVNode(b,{title:o.modal.title,size:"small",visible:o.isModalVisible,"onUpdate:visible":e[6]||(e[6]=C=>o.isModalVisible=C)},{default:a.withCtx(()=>[a.createElementVNode("div",gN,[a.createElementVNode("p",yN,a.toDisplayString(o.modal.message),1),a.createElementVNode("div",_N,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=(...C)=>o.modal.cancel&&o.modal.cancel(...C))},a.toDisplayString(o.modal.cancelButtonText),1),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[5]||(e[5]=(...C)=>o.modal.confirm&&o.modal.confirm(...C))},a.toDisplayString(o.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const Cv=Oe(aN,[["render",bN]]),xN={},vN={class:"w-16 text-gray-400 mx-auto dark:text-neutral-400",width:"70",height:"46",viewBox:"0 0 70 46",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wN(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",vN,e[0]||(e[0]=[a.createStaticVNode('<path d="M6.05172 9.36853L17.2131 7.5083V41.3608L12.3018 42.3947C9.01306 43.0871 5.79705 40.9434 5.17081 37.6414L1.14319 16.4049C0.515988 13.0978 2.73148 9.92191 6.05172 9.36853Z" fill="currentColor" stroke="currentColor" stroke-width="2" class="fill-white stroke-gray-400 dark:fill-neutral-800 dark:stroke-neutral-500"></path><path d="M63.9483 9.36853L52.7869 7.5083V41.3608L57.6982 42.3947C60.9869 43.0871 64.203 40.9434 64.8292 37.6414L68.8568 16.4049C69.484 13.0978 67.2685 9.92191 63.9483 9.36853Z" fill="currentColor" stroke="currentColor" stroke-width="2" class="fill-white stroke-gray-400 dark:fill-neutral-800 dark:stroke-neutral-500"></path><rect x="17.0656" y="1.62305" width="35.8689" height="42.7541" rx="5" fill="currentColor" stroke="currentColor" stroke-width="2" class="fill-white stroke-gray-400 dark:fill-neutral-800 dark:stroke-neutral-500"></rect><path d="M47.9344 44.3772H22.0655C19.3041 44.3772 17.0656 42.1386 17.0656 39.3772L17.0656 35.9161L29.4724 22.7682L38.9825 33.7121C39.7832 34.6335 41.2154 34.629 42.0102 33.7025L47.2456 27.5996L52.9344 33.7209V39.3772C52.9344 42.1386 50.6958 44.3772 47.9344 44.3772Z" stroke="currentColor" stroke-width="2" class="stroke-gray-400 dark:stroke-neutral-500"></path><circle cx="39.5902" cy="14.9672" r="4.16393" stroke="currentColor" stroke-width="2" class="stroke-gray-400 dark:stroke-neutral-500"></circle>',5)]))}const kN=Oe(xN,[["render",wN]]),EN={class:"cursor-pointer"},CN={class:"flex flex-col gap-0"},SN={class:"!mt-[4px] text-xs text-center text-stone-400 dark:text-neutral-400"},TN=["accept"],AN=Oe({__name:"vs-widget-gallery-dropzone",props:{accept:{type:Array,default:()=>[".tiff",".jpg",".jpeg",".png",".svg",".ico",".webp"]}},emits:["file:upload"],setup(t,{emit:e}){const n=t,{$notify:r}=a.getCurrentInstance().proxy,o=a.ref(null),d=a.ref(!1),p=a.computed(()=>{var N,$,F;return(N=n.accept)!=null&&N.length?(F=($=n.accept)==null?void 0:$.map(q=>{var J;return(J=q==null?void 0:q.replace(".",""))==null?void 0:J.toUpperCase()}))==null?void 0:F.join(", "):"Приймаються всі типи файлів"}),c=e,b=()=>{o.value.click()},k=async N=>{N?c("file:upload",N):r({type:"error",title:"Помилка!",message:"При спробі завантаження файлу виникла помилка"})},E=N=>{const $=N.target.files;$&&k($)},C=N=>{const $=N.dataTransfer.files;d.value=!1,$&&k($)},T=()=>{d.value=!0},I=()=>{d.value=!1};return(N,$)=>{var F;return a.openBlock(),a.createElementBlock("div",EN,[a.createElementVNode("div",{class:a.normalizeClass(["vs-form-dropzone border border-dashed rounded-xl p-[48px] flex items-center justify-center duration-300 hover:border-blue-600 hover:bg-blue-50",d.value?"border-blue-600 bg-blue-50":"border-gray-200"]),onDragover:a.withModifiers(T,["prevent"]),onDragleave:I,onDrop:a.withModifiers(C,["prevent"]),onClick:b},[a.createElementVNode("div",CN,[a.createVNode(kN),$[0]||($[0]=a.createElementVNode("p",{class:"font-medium text-gray-800 text-center mt-[16px] !mb-0"}," Додати фото ",-1)),a.createElementVNode("p",SN,a.toDisplayString(p.value),1)])],34),a.createElementVNode("input",{ref_key:"fileInput",ref:o,type:"file",class:"hidden",accept:(F=t.accept)==null?void 0:F.join(","),onChange:E,multiple:""},null,40,TN)])}}},[["__scopeId","data-v-1de800aa"]]),DN={class:"flex items-center gap-x-2 mb-[16px]"},MN={class:"inline-block shrink-0 font-semibold text-gray-800 dark:text-neutral-200"},IN={class:"flex items-center w-full justify-end gap-x-2"},PN=["accept"],RN=["onDragstart","onDrop"],NN={key:0,class:"absolute right-[5px] top-[5px] bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"},BN=["href","data-caption"],VN=["src","alt"],zN={class:"item__text-content bg-white opacity-0 rounded-b-lg absolute w-full bottom-0 p-3 flex gap-2.5 items-center justify-between"},ON={class:"text-xs w-[180px] block overflow-hidden text-nowrap overflow-ellipsis"},LN={class:"flex flex-wrap items-center text-xs text-gray-600 widget-images__item-desc"},FN={class:"flex items-center"},$N={class:"text-xs"},jN=["onClick"],UN=["onClick"],HN=["onClick"],WN={class:"p-4"},qN={class:"mt-1 text-gray-500 dark:text-neutral-500"},GN={class:"flex justify-end mt-4 gap-x-3"},ZN={__name:"vs-widget-gallery",props:{id:{type:String,default:""},readonly:{type:Boolean,default:!1},prefilledData:{type:Array,default:()=>[]},limit:{type:Number,default:10},prefix:{type:String,default:"/api"}},setup(t){const{Fancybox:e}=Wh,{$notify:n}=a.getCurrentInstance().proxy,r=t,o=a.ref([]),d=a.ref(!1),p=a.ref(null),c=a.ref({}),b=[".tiff",".jpg",".jpeg",".png",".svg",".ico",".webp"],k=async()=>{var Be,Ze,tt;if((Be=r==null?void 0:r.prefilledData)!=null&&Be.length){o.value=r.prefilledData,e.bind("[data-fancybox='gallery']");return}try{const{data:Xe}=await Le.get(`${r.prefix}/widget/gallery/${r==null?void 0:r.id}`);o.value=[(Ze=Xe==null?void 0:Xe.rows)==null?void 0:Ze.find(ot=>ot==null?void 0:ot.ismain),...((tt=Xe==null?void 0:Xe.rows)==null?void 0:tt.filter(ot=>!(ot!=null&&ot.ismain)))||[]].filter(ot=>ot),e.bind("[data-fancybox='gallery']")}catch(Xe){console.error(Xe)}},E=async Be=>{var Xe,ot,ue,Ut;if(((Xe=o.value)==null?void 0:Xe.length)+((ue=Array.from((ot=Be.target)==null?void 0:ot.files))==null?void 0:ue.length)>r.limit){n({type:"error",title:"Помилка!",message:"Встановлено ліміт на кількість, - "+r.limit});return}const Ze=Array.from((Ut=Be.target)==null?void 0:Ut.files);if(!Ze.every(wt=>{var $t,an;return b==null?void 0:b.includes("."+((an=($t=wt.name.split("."))==null?void 0:$t.pop())==null?void 0:an.toLowerCase()))})){n({type:"error",title:"Помилка!",message:"Доступні формати: "+b.join(", ")});return}await Promise.all(Ze.map(async wt=>{const $t=new FormData;$t.append("file",wt);try{await Le.post(`${r.prefix}/widget/gallery/${r==null?void 0:r.id}`,$t)}catch(an){console.error(an)}})),await k()},C=Be=>{const Ze=document.createElement("a");Ze.setAttribute("download",Be==null?void 0:Be.uploaded_name),Ze.href=Be==null?void 0:Be.file_path,Ze.click()},T=async(Be,Ze)=>{try{await Le.post(`${r.prefix}/widget/gallery/${Be}/${Ze}`,{ismain:!0}),await k()}catch(tt){console.error(tt)}},I=Be=>{p.value=Be,c.value={title:"Ви впевнені?",message:"Ви впевнені що хочете видалити зображення?",confirmButtonText:"Так, видалити ",cancelButtonText:"Відмінити",confirm:async()=>{var Ze,tt,Xe;await N(),d.value=!1,await k(),(Ze=o.value)!=null&&Ze[0]&&!((Xe=(tt=o.value)==null?void 0:tt[0])!=null&&Xe.ismain)&&setTimeout(()=>{var ot,ue,Ut,wt;return T((ue=(ot=o.value)==null?void 0:ot[0])==null?void 0:ue.entity_id,(wt=(Ut=o.value)==null?void 0:Ut[0])==null?void 0:wt.file_id)})},cancel:()=>{d.value=!1}},d.value=!0},N=async()=>{var Be,Ze;try{await Le.delete(`${r.prefix}/widget/gallery/${(Be=p.value)==null?void 0:Be.entity_id}/${(Ze=p.value)==null?void 0:Ze.file_id}`)}catch(tt){console.error(tt)}},$=(Be,Ze=2)=>{if(Be===0)return"0 Bytes";const tt=1024,Xe=Ze<0?0:Ze,ot=["Bytes","KB","MB","GB","TB"],ue=Math.floor(Math.log(Be)/Math.log(tt));return`${parseFloat((Be/tt**ue).toFixed(Xe))} ${ot[ue]}`},F=Be=>{const Ze={day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"};return new Date(Be).toLocaleDateString("uk-UA",Ze)},q=a.ref(null),J=a.ref(0),Q=()=>{var Be;J.value=((Be=q.value)==null?void 0:Be.offsetWidth)||0},me=a.computed(()=>{const Be=[...o.value],Ze={isDropzone:!0},tt=Math.floor(J.value/316)||1,Xe=Math.min(tt-1,Be.length);return Be.splice(Xe,0,Ze),Be}),ke=a.ref(null),Re=Be=>{ke.value=Be},Ee=Be=>o.value.findIndex(Ze=>Ze.file_path===Be.file_path),Ve=Be=>{if(Be===0){const Ze=ke.value;if(Ze===null||Ze===Be)return;const Xe=me.value.filter(ot=>!ot.isDropzone)[Ze];if(!Xe)return;o.value.splice(Ze,1),o.value.splice(Be,0,Xe),ke.value=null,setTimeout(()=>{var ot,ue,Ut,wt;return T((ue=(ot=o.value)==null?void 0:ot[0])==null?void 0:ue.entity_id,(wt=(Ut=o.value)==null?void 0:Ut[0])==null?void 0:wt.file_id)})}};return a.onMounted(()=>{k(),Q(),window.addEventListener("resize",Q),addEventListener("reloadCardPage",k)}),a.onUnmounted(()=>{removeEventListener("reloadCardPage",k)}),a.watch(()=>r.id,k),a.watch(o,Q),(Be,Ze)=>{const tt=a.resolveComponent("VsConfirm");return a.openBlock(),a.createElementBlock("div",{ref_key:"galleryContainer",ref:q,class:"flex flex-col vs-widget-images xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700"},[a.createElementVNode("div",DN,[a.createElementVNode("h2",MN," Світлин: "+a.toDisplayString(o.value.length)+" (ліміт - "+a.toDisplayString(t.limit)+") ",1),a.createElementVNode("div",IN,[a.createElementVNode("div",null,[a.createElementVNode("label",null,[a.createElementVNode("input",{type:"file",class:"hidden",onChange:E,accept:b.join(","),multiple:""},null,40,PN),Ze[5]||(Ze[5]=a.createStaticVNode('<span type="button" class="py-2 px-2.5 cursor-pointer inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-stone-200 bg-white text-stone-800 shadow-2xs hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-stone-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"></path><path d="M12 12v9"></path><path d="m16 16-4-4-4 4"></path></svg> Завантажити </span>',1))])])])]),a.createVNode(a.TransitionGroup,{name:"gallery",tag:"div",class:"flex flex-wrap gap-[16px]"},{default:a.withCtx(()=>[a.createVNode(AN,{"onFile:upload":Ze[0]||(Ze[0]=Xe=>E({target:{files:Xe}})),class:"h-[200px] w-[300px]"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.value,(Xe,ot)=>(a.openBlock(),a.createElementBlock("div",{key:Xe.file_path||"dz-"+ot,draggable:"true",onDragstart:ue=>Re(Ee(Xe)),onDragover:Ze[1]||(Ze[1]=a.withModifiers(()=>{},["prevent"])),onDrop:ue=>Ve(Ee(Xe)),class:"relative cursor-pointer rounded-b-lg item hover:shadow-lg shrink-0 h-[200px] w-[300px]"},[Xe!=null&&Xe.ismain?(a.openBlock(),a.createElementBlock("span",NN,"Головне")):a.createCommentVNode("",!0),a.createElementVNode("a",{href:Xe.file_path,"data-fancybox":"gallery","data-caption":Xe.uploaded_name,target:"_blank"},[a.createElementVNode("img",{class:"object-cover w-full h-full rounded-lg",src:Xe.file_path||"/icons/no-image.jpg",alt:Xe.uploaded_name},null,8,VN),a.createElementVNode("div",zN,[a.createElementVNode("div",null,[a.createElementVNode("span",ON,a.toDisplayString(Xe.uploaded_name),1),a.createElementVNode("div",LN,[a.createElementVNode("span",FN,a.toDisplayString($(Xe.size)),1),a.createElementVNode("span",null,a.toDisplayString(F(Xe.cdate)),1)]),a.createElementVNode("span",$N,a.toDisplayString(Xe.username),1),Xe!=null&&Xe.ismain?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"text-xs underline",onClick:a.withModifiers(ue=>T(Xe==null?void 0:Xe.entity_id,Xe==null?void 0:Xe.file_id),["prevent"])}," Зробити головним ",8,jN))]),a.createElementVNode("div",null,[a.createElementVNode("div",{class:"flex items-center justify-center gap-2 hover:bg-gray-200 p-[6px] rounded",onClick:a.withModifiers(ue=>C(Xe),["prevent"])},[a.createVNode(wv,{height:"14",width:"14"})],8,UN),a.createElementVNode("div",{class:"flex items-center gap-2 hover:bg-gray-200 p-[6px] rounded hover:cursor-pointer",onClick:a.withModifiers(ue=>I(Xe),["prevent"])},[a.createVNode(kv,{height:"14",width:"14"})],8,HN)])])],8,BN)],40,RN))),128))]),_:1}),a.createVNode(tt,{title:c.value.title,size:"small",visible:d.value,"onUpdate:visible":Ze[4]||(Ze[4]=Xe=>d.value=Xe)},{default:a.withCtx(()=>[a.createElementVNode("div",WN,[a.createElementVNode("p",qN,a.toDisplayString(c.value.message),1),a.createElementVNode("div",GN,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700",onClick:Ze[2]||(Ze[2]=(...Xe)=>c.value.cancel&&c.value.cancel(...Xe))},a.toDisplayString(c.value.cancelButtonText),1),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600",onClick:Ze[3]||(Ze[3]=(...Xe)=>c.value.confirm&&c.value.confirm(...Xe))},a.toDisplayString(c.value.confirmButtonText),1)])])]),_:1},8,["title","visible"])],512)}}},YN={props:{comment:{type:Object,default:()=>({})},user:{type:Object,default:()=>({})},id:{type:String,default:""},options:Array},data(){return{commentContent:this.comment.body,isCommentActionVisible:!1,isOpen:!1,hovered:!1,windowWidth:null,textareaValue:""}},computed:{isElementVisible(){return this.windowWidth>=600?this.hovered:!0},isUserAutor(){return this.user.uid===this.comment.uid},createDate(){try{const t=new Date(this.comment.cdate);return new Intl.DateTimeFormat("uk-UA",{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(t)}catch{return""}}},mounted(){window.addEventListener("resize",this.updateWindowWidth)},beforeDestroy(){window.removeEventListener("resize",this.updateWindowWidth)},watch:{isOpen(t){t&&(this.textareaValue=this.comment.body)}},methods:{updateWindowWidth(){this.windowWidth=typeof window>"u"?null:window==null?void 0:window.innerWidth},confirnDeleteComment(){document.body.click(),this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей коментар?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteComment,updateListOnConfirm:!0})},async updateComment(){try{await Le.post(`/api/widget/comment/${this.id}/${this.comment.communication_id}`,{body:this.textareaValue}),this.$emit("list-update"),this.isOpen=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},openEditModal(){document.body.click(),this.isOpen=!0},async deleteComment(){try{await Le.delete(`/api/widget/comment/${this.id}/${this.comment.communication_id}`),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},toggleCommentAction(){this.isCommentActionVisible=!this.isCommentActionVisible}}},XN={class:"relativen group-last:after:hidden after:absolute after:top-7 after:bottom-1 after:start-3 after:w-px after:-translate-x-[0.5px] after:bg-gray-200 dark:after:bg-neutral-700"},KN={class:"relative flex items-center justify-center overflow-hidden rounded-full size-6"},JN=["src"],QN={key:1,class:"flex shrink-0 justify-center items-center size-[38px] border border-gray-200 text-sm font-semibold uppercase text-gray-800 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-400"},eB={class:"w-full"},tB={class:"flex w-full justify-between -mt-[5px]"},nB={class:"flex items-center"},rB={class:"text-sm font-semibold text-gray-800 dark:text-neutral-200"},iB={class:"text-xs text-gray-400 ms-1 dark:text-neutral-500"},sB={class:"min-h-[32px]"},oB={class:"p-0.5 inline-flex items-center gap-x-0.5 bg-white border border-gray-200 shadow-sm rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},aB=["innerHTML"],lB={class:"flex flex-col gap-[8px] p-[10px] text-sm font-medium text-gray-500"},cB={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function dB(t,e,n,r,o,d){var b,k;const p=a.resolveComponent("VsTiptapEditor"),c=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:"group relative w-full flex gap-x-3.5",onMouseenter:e[2]||(e[2]=E=>o.hovered=!0),onMouseleave:e[3]||(e[3]=E=>o.hovered=!1)},[a.createElementVNode("div",XN,[a.createElementVNode("div",KN,[n.comment.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,class:"object-cover shrink-0",src:n.comment.avatar,alt:"Avatar"},null,8,JN)):(a.openBlock(),a.createElementBlock("span",QN,a.toDisplayString((b=n.comment.username)==null?void 0:b.charAt(0)),1))])]),a.createElementVNode("div",eB,[a.createElementVNode("span",tB,[a.createElementVNode("div",nB,[a.createElementVNode("span",rB,a.toDisplayString((k=n.comment)==null?void 0:k.username),1),a.createElementVNode("span",iB,a.toDisplayString(d.createDate),1)]),a.createElementVNode("div",sB,[a.withDirectives(a.createElementVNode("div",oB,[a.createElementVNode("div",{class:"inline-block",onClick:e[0]||(e[0]=E=>d.openEditModal())},e[8]||(e[8]=[a.createStaticVNode('<button type="button" class="hs-tooltip-toggle size-[26px] inline-flex justify-center items-center gap-x-1 text-xs font-medium rounded-md border border-transparent bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:bg-neutral-800 dark:border-transparent dark:text-neutral-500 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg><span class="sr-only">Edit message</span></button>',1),a.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg whitespace-nowrap dark:bg-neutral-700",role:"tooltip"}," Edit message ",-1)])),a.createElementVNode("div",{class:"inline-block",onClick:e[1]||(e[1]=E=>d.confirnDeleteComment())},e[9]||(e[9]=[a.createStaticVNode('<button type="button" class="hs-tooltip-toggle size-[26px] inline-flex justify-center items-center gap-x-1 text-xs font-medium rounded-md border border-transparent bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:bg-neutral-800 dark:border-transparent dark:text-neutral-500 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg><span class="sr-only">Delete message</span></button>',1),a.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg whitespace-nowrap dark:bg-neutral-700",role:"tooltip"}," Delete message ",-1)]))],512),[[a.vShow,d.isElementVisible]])])]),a.createElementVNode("p",{class:"mt-1 text-sm text-gray-800 comment-body dark:text-neutral-200",innerHTML:n.comment.body},null,8,aB)])],32),a.createVNode(c,{visible:o.isOpen,"onUpdate:visible":e[7]||(e[7]=E=>o.isOpen=E),title:"Редагувати",size:"small"},{footer:a.withCtx(()=>[a.createElementVNode("div",cB,[a.createElementVNode("button",{onClick:e[5]||(e[5]=E=>o.isOpen=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:e[6]||(e[6]=(...E)=>d.updateComment&&d.updateComment(...E)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:a.withCtx(()=>[a.createElementVNode("div",lB,[a.createVNode(p,{modelValue:o.textareaValue,"onUpdate:modelValue":e[4]||(e[4]=E=>o.textareaValue=E),options:n.options},null,8,["modelValue","options"])])]),_:1},8,["visible"])],64)}const uB={components:{VsWidgetCommentsItem:Oe(YN,[["render",dB]])},inject:["activeAddFormEditor"],props:{id:{type:String,default:()=>""},prefilledData:{type:Object,default:null},options:Array},data(){return{isLoaded:!1,isLoadFailed:!1,comments:[],user:{},modal:{title:"",message:"",cancel:"",confirm:"",cancelButtonText:"",confirmButtonText:""},isModalVisible:!1}},async created(){await this.getComments()},methods:{async getComments(){if(this.prefilledData){this.comments=this.prefilledData.rows,this.isLoaded=!0;return}try{const{data:t}=await Le.get(`/api/widget/comment/${this.id}`);this.comments=t.rows,this.user=t.user}catch(t){this.isLoadFailed=!0,console.error(t)}this.isLoaded=!0,this.$emit("update-comment-count")},prepareModal(t){const e={...t};return t.cancel||(e.cancel=()=>{this.isModalVisible=!1}),t.updateListOnConfirm&&(e.confirm=async()=>{await t.confirm(),this.isModalVisible=!1}),e},handleOpenModal(t){this.modal=this.prepareModal(t),this.isModalVisible=!0}}},hB={class:"flex flex-col"},pB={key:0,class:"max-h-[300px] p-[10px] overflow-y-auto overflow-x-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},fB={class:"p-4"},mB={class:"mt-1 text-gray-500 dark:text-neutral-500"},gB={class:"mt-4 flex justify-end gap-x-3"};function yB(t,e,n,r,o,d){var E;const p=a.resolveComponent("VsErrorOnLoading"),c=a.resolveComponent("VsWidgetCommentsItem"),b=a.resolveComponent("VsLoader"),k=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock("div",hB,[o.isLoaded?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[o.isLoadFailed?(a.openBlock(),a.createBlock(p,{key:0})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[(E=o.comments)!=null&&E.length?(a.openBlock(),a.createElementBlock("div",pB,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.comments,(C,T)=>(a.openBlock(),a.createElementBlock("div",{class:"pb-8 last:pb-0",key:T},[a.createVNode(c,{comment:C,user:o.user,options:n.options,index:T,id:n.id,onListUpdate:d.getComments,onOpenModal:e[0]||(e[0]=I=>d.handleOpenModal(I))},null,8,["comment","user","options","index","id","onListUpdate"])]))),128))])):a.createCommentVNode("",!0)],64))],64)):(a.openBlock(),a.createBlock(b,{key:1,class:"justify-center",text:"Please wait..."})),a.createVNode(k,{title:o.modal.title,size:"small",visible:o.isModalVisible,"onUpdate:visible":e[3]||(e[3]=C=>o.isModalVisible=C)},{default:a.withCtx(()=>[a.createElementVNode("div",fB,[a.createElementVNode("p",mB,a.toDisplayString(o.modal.message),1),a.createElementVNode("div",gB,[a.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[1]||(e[1]=(...C)=>o.modal.cancel&&o.modal.cancel(...C))},a.toDisplayString(o.modal.cancelButtonText),1),a.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[2]||(e[2]=(...C)=>o.modal.confirm&&o.modal.confirm(...C))},a.toDisplayString(o.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const _B=Oe(uB,[["render",yB]]),bB={props:{id:{type:String,default:()=>""},autofocus:{type:Boolean,default:()=>!0},options:Array},data(){return{isEditorOpen:!1,commentContent:""}},methods:{async addNewComment(){if(this.commentContent)try{await Le.post(`/api/widget/comment/${this.id}`,{body:this.commentContent}),this.closeEditor(),this.$emit("list-update")}catch(t){console.error(t)}},closeEditor(){this.isEditorOpen=!1,this.commentContent=""},handleKeydown(t){t.ctrlKey&&t.key==="Enter"&&this.addNewComment()}}},xB={class:"flex flex-col items-start w-full widget-comment-form"},vB={class:"w-full mb-4 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700"},wB={key:0,class:"flex gap-[10px]"};function kB(t,e,n,r,o,d){const p=a.resolveComponent("VsTiptapEditor");return a.openBlock(),a.createElementBlock("div",xB,[a.createElementVNode("div",vB,[a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[o.isEditorOpen?(a.openBlock(),a.createBlock(p,{key:0,modelValue:o.commentContent,"onUpdate:modelValue":e[0]||(e[0]=c=>o.commentContent=c),options:n.options,onKeydown:d.handleKeydown},null,8,["modelValue","options","onKeydown"])):a.createCommentVNode("",!0)]),_:1}),o.isEditorOpen?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,onClick:e[1]||(e[1]=c=>o.isEditorOpen=!0),class:"border flex items-center pl-[20px] border-gray-200 rounded-lg h-[40px] hover:bg-gray-50 text-gray-500 duration-300 hover:text-gray-900"}," Додати коментар... "))]),o.isEditorOpen?(a.openBlock(),a.createElementBlock("div",wB,[a.createElementVNode("button",{ref:"buttonAdd",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:e[2]||(e[2]=(...c)=>d.addNewComment&&d.addNewComment(...c))}," Відправити коментар ",512),a.createElementVNode("button",{onClick:e[3]||(e[3]=(...c)=>d.closeEditor&&d.closeEditor(...c)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-black duration-300 border rounded-lg gap-x-2 hover:bg-gray-100"}," Скасувати ")])):a.createCommentVNode("",!0)])}const EB={components:{VsWidgetCommentsList:_B,VsWidgetCommentsAddForm:Oe(bB,[["render",kB]])},props:{id:{type:String,default(){return""}},prefilledData:{type:Object,default:null}},data(){return{activeAddFormEditor:"",comments:[],totalComment:"0",options:[]}},mounted(){this.comments=this.$refs.commentListRef.comments,this.getUsersList()},watch:{comments(t){this.$emit("count-change",t.length)}},methods:{async getUsersList(){try{const{data:t}=await Le.get("/api/suggest/core.user_mentioned");this.options=t}catch(t){console.log(t)}},listUpdate(){this.$refs.commentListRef.getComments()},updateCommentCount(){this.totalComment=this.$refs.commentListRef.comments.length||"0"}}},CB={class:"w-full bg-white-200"};function SB(t,e,n,r,o,d){const p=a.resolveComponent("VsWidgetCommentsAddForm"),c=a.resolveComponent("VsWidgetCommentsList");return a.openBlock(),a.createElementBlock("div",CB,[e[2]||(e[2]=a.createElementVNode("div",{class:"flex items-center justify-between w-full mb-4 gap-x-2"},null,-1)),a.createVNode(p,{options:o.options,id:n.id,onListUpdate:e[0]||(e[0]=b=>d.listUpdate())},null,8,["options","id"]),a.createVNode(c,{options:o.options,id:n.id,onUpdateCommentCount:e[1]||(e[1]=b=>d.updateCommentCount()),"prefilled-data":n.prefilledData,ref:"commentListRef"},null,8,["options","id","prefilled-data"])])}const Sv=Oe(EB,[["render",SB]]),Tv=t=>new Date(t).toLocaleDateString("uk-UK",{day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}),TB=t=>new Date(t).toLocaleDateString("uk-UK",{day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}),AB={},DB={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-user"};function MB(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",DB,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"},null,-1),a.createElementVNode("path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"},null,-1)]))}const Av=Oe(AB,[["render",MB]]),IB=t=>{const e=/(\b\S)?/g,n=t.match(e);return n?n.join("").toUpperCase():""},PB=a.defineComponent({props:{username:{type:String,default:()=>""}},components:{IconUserOutline:Av},computed:{inItials(){return IB(this.username||"u")}}}),RB={class:"flex shrink-0 bg-white justify-center items-center size-[38px] border border-gray-200 text-sm font-semibold uppercase text-gray-800 rounded-full"},NB={key:0};function BB(t,e,n,r,o,d){const p=a.resolveComponent("IconUserOutline");return a.openBlock(),a.createElementBlock("div",RB,[t.inItials?(a.openBlock(),a.createElementBlock("span",NB,a.toDisplayString(t.inItials),1)):(a.openBlock(),a.createBlock(p,{key:1,class:"w-[16px] h-[16px]"}))])}const VB=Oe(PB,[["render",BB]]),cg={load(){try{const t=Array.from(arguments);window.headLoadedFiles||(window.headLoadedFiles=[]);const e=typeof arguments[arguments.length-1]=="function"?arguments[arguments.length-1]:null,n=t.filter(r=>typeof r!="function").reduce((r,o)=>r.concat(o),[]).filter(r=>r&&!window.headLoadedFiles[r.url||r.split("?")[0]]);Promise.all(n.map(r=>this.loadFile1(r))).then(()=>{e&&e()})}catch(t){console.log(t)}},promise(t){return new Promise((e,n)=>{cg.load(t,()=>{e()})})},loadFile1(t){let e=!1;typeof t=="object"&&(e=t.type,t=t.url);const n=t.split("?")[0];return new Promise((r,o)=>{function d(c){delete window.headLoadedFiles[`_${n}`],window.headLoadedFiles[n]=c.type,r(c.type)}let p;window.headLoadedFiles[`_${n}`]?p=window.headLoadedFiles[`_${n}`]:(n.includes(".css")?(p=document.createElement("link"),p.href=t,p.type="text/css",p.rel="stylesheet"):(p=document.createElement("script"),p.type="text/javascript",p.src=t,e&&(p.type=e)),window.headLoadedFiles[`_${n}`]=p,document.head.appendChild(p)),p.addEventListener("load",d),p.addEventListener("error",d)})}},zB={props:{point:{type:String,default:()=>""}},data(){return{zoom:18}},computed:{parsedPoint(){return JSON.parse(this.point)},tooltipText(){return this.parsedPoint.coordinates.join(", ")},coordinates(){return[...this.parsedPoint.coordinates].reverse()}},async mounted(){typeof window>"u"||(window!=null&&window.L||(await cg.promise("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"),await cg.promise("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js")),this.initMap())},methods:{initMap(){const t=window.L.map("map",{center:this.coordinates,zoom:this.zoom});window.L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(t),window.L.circle(this.coordinates,{color:"red",fillColor:"red",fillOpacity:.2,radius:10}).addTo(t).bindTooltip(this.tooltipText)}}},OB={id:"map",style:{height:"9rem",width:"24rem"}};function LB(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",OB)}const FB=Oe(zB,[["render",LB]]),$B=a.defineComponent({components:{VsWidgetHistoryItemAvatar:VB,VsWidgetHistoryItemMap:FB,IconFile:vv},props:{item:{type:Object,default:()=>{}}},methods:{getTitle(t){return t.title||t.attr},getOldValue(t){return t.old||"Не вказано"},getNewValue(t){return t.new||"Не вказано"},getDate(t){return TB(t.cdate)}}}),jB={class:"relative"},UB={class:"w-full flex gap-x-5"},HB={class:"grow"},WB={class:"text-sm font-semibold text-gray-800 dark:text-neutral-300"},qB={key:0},GB={key:1},ZB={key:0,class:"text-sm text-gray-500 dark:text-neutral-500"},YB={key:1,class:"text-sm text-gray-500 dark:text-neutral-500"},XB={key:2,class:"text-sm text-gray-500 dark:text-neutral-500"},KB={key:3,class:"mt-2"},JB={class:"grid grid-cols-2 gap-2"},QB={class:"bg-white border border-gray-200 rounded-lg p-2 dark:bg-neutral-800 dark:border-neutral-700"},e4={class:"flex gap-x-2"},t4={class:"grow truncate"},n4={class:"block truncate text-xs text-gray-800 dark:text-neutral-300"},r4={class:"block text-xs text-gray-400 dark:text-neutral-500"},i4={key:4,class:"text-sm text-gray-500 dark:text-neutral-500"},s4={key:5,class:"text-sm text-gray-500 dark:text-neutral-500"},o4={key:6,class:"mt-2"},a4={class:"grid grid-cols-2 gap-2"},l4={class:"bg-white border border-gray-200 rounded-lg p-2 dark:bg-neutral-800 dark:border-neutral-700"},c4={class:"flex gap-x-2"},d4={class:"grow truncate"},u4={class:"block truncate text-xs text-gray-800 dark:text-neutral-300"},h4={class:"block text-xs text-gray-400 dark:text-neutral-500"},p4={class:"mt-2 text-[11px] uppercase text-gray-400 dark:text-neutral-500"};function f4(t,e,n,r,o,d){var b,k,E,C;const p=a.resolveComponent("VsWidgetHistoryItemAvatar"),c=a.resolveComponent("IconFile");return a.openBlock(),a.createElementBlock("div",jB,[a.createElementVNode("div",UB,[a.createVNode(p,{username:t.item.username},null,8,["username"]),a.createElementVNode("div",HB,[a.createElementVNode("h4",WB,a.toDisplayString(t.item.username||"User User"),1),t.item.entity_type==="crm.communications"?(a.openBlock(),a.createElementBlock("span",qB,"Коментар")):a.createCommentVNode("",!0),t.item.entity_type==="crm.files"?(a.openBlock(),a.createElementBlock("span",GB,"Файл")):a.createCommentVNode("",!0),t.item.entity_type!=="crm.files"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:2},a.renderList(t.item.changes,T=>(a.openBlock(),a.createElementBlock("li",null,[!["entity_id","uid","cdate","editor_id","entity_type","editor_date"].includes(T.entity_key)&&T.value_old&&T.value_new?(a.openBlock(),a.createElementBlock("p",ZB," Дані "+a.toDisplayString(T.entity_key)+" змінились з "+a.toDisplayString(T.value_old)+" на "+a.toDisplayString(T.value_new),1)):a.createCommentVNode("",!0),!["entity_id","uid","cdate","editor_id","entity_type","editor_date"].includes(T.entity_key)&&!T.value_old&&T.value_new?(a.openBlock(),a.createElementBlock("p",YB," Дані "+a.toDisplayString(T.entity_key)+" внесено до БД: "+a.toDisplayString(T.value_new),1)):a.createCommentVNode("",!0),T.value_old&&!T.value_new?(a.openBlock(),a.createElementBlock("p",XB," Дані "+a.toDisplayString(T.entity_key)+" очищено ",1)):a.createCommentVNode("",!0)]))),256)):a.createCommentVNode("",!0),t.item.entity_type==="crm.files"&&t.item.change_type==="INSERT"&&((b=t.item.changes)!=null&&b[0])?(a.openBlock(),a.createElementBlock("div",KB,[a.createElementVNode("div",JB,[a.createElementVNode("div",QB,[a.createElementVNode("div",e4,[a.createVNode(c,{class:"w-[24px] h-[24px] text-gray-800"}),a.createElementVNode("div",t4,[a.createElementVNode("p",n4,a.toDisplayString(t.item.changes[0]["Назва файлу"]||"example file_name"),1),a.createElementVNode("small",r4,a.toDisplayString(t.item.changes[0]["Розмір файлу"]||"example file_weight kb")+" KB ",1)])])])])])):a.createCommentVNode("",!0),t.item.entity_type==="crm.files"&&t.item.change_type==="DELETE"?(a.openBlock(),a.createElementBlock("p",i4," Видалено файл "+a.toDisplayString((E=(k=t.item.changes)==null?void 0:k[0])==null?void 0:E["Назва файлу"]),1)):a.createCommentVNode("",!0),t.item.change_type!=="DELETE"&&!((C=t.item.changes)!=null&&C.length)?(a.openBlock(),a.createElementBlock("p",s4," Зміни відсутні ")):a.createCommentVNode("",!0),t.item.change_type==="addFile"?(a.openBlock(),a.createElementBlock("div",o4,[a.createElementVNode("div",a4,[a.createElementVNode("div",l4,[a.createElementVNode("div",c4,[a.createVNode(c,{class:"w-[24px] h-[24px] text-gray-800"}),a.createElementVNode("div",d4,[a.createElementVNode("p",u4,a.toDisplayString(t.item.file_name||"example file_name"),1),a.createElementVNode("small",h4,a.toDisplayString(t.item.file_weight||"example file_weight kb"),1)])])])])])):a.createCommentVNode("",!0),a.createElementVNode("p",p4,a.toDisplayString(t.getDate(t.item)),1)])])])}const m4=Oe($B,[["render",f4]]),g4={},y4={class:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function _4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",y4,e[0]||(e[0]=[a.createElementVNode("path",{d:"m7 15 5 5 5-5"},null,-1),a.createElementVNode("path",{d:"m7 9 5-5 5 5"},null,-1)]))}const b4=Oe(g4,[["render",_4]]),x4=a.defineComponent({components:{VsWidgetHistoryItem:m4,VsEmptyWidget:Ev,IconUpDown:b4},props:{id:{type:String,default:""},prefilledData:{type:Object,default:null},prefix:{type:String,default:"/api"}},data:()=>({history:{},showAll:!1,limitVisible:5}),computed:{createdDate(){var t,e,n;return(t=this.history)!=null&&t.data?Tv((n=(e=this.history)==null?void 0:e.data)==null?void 0:n.cdate):""},lastEditDate(){var t,e,n;return(t=this.history)!=null&&t.data?Tv((n=(e=this.history)==null?void 0:e.data)==null?void 0:n.edate):""},authorName(){var t;return(t=this.history)!=null&&t.data?this.history.data.author:""},displayedRows(){var t,e,n;return this.showAll?(t=this.history)==null?void 0:t.rows:(n=(e=this.history)==null?void 0:e.rows)==null?void 0:n.slice(0,this.limitVisible)}},methods:{async getHistoryData(){if(this.prefilledData){this.history=this.prefilledData;return}try{const{data:t}=await Le.get(`${this.prefix}/widget/history/${this.id}`);this.history=t}catch(t){console.error(t)}},showMore(){this.showAll=!0}},async mounted(){await this.getHistoryData()},watch:{"history.rows":function(t){this.$emit("count-change",t.length)}}}),v4={class:"bg-white"},w4={key:0,class:""},k4={key:0,class:"relative last:pb-0 pb-8 last:after:hidden after:absolute after:top-[38px] after:bottom-0 after:start-[19px] after:w-px after:bg-gray-200 dark:after:bg-neutral-700"},E4={class:"w-[38px]"},C4={class:"flex shrink-0 justify-center items-center w-6 h-7 border border-gray-200 text-sm font-semibold text-gray-800 rounded-md mx-auto dark:border-neutral-700 dark:text-neutral-400"},S4={class:"grow"},T4={class:"text-sm font-semibold text-gray-800 group-focus:text-blue-600 dark:text-neutral-300 dark:group-focus:text-blue-500"},A4={key:1,class:"w-full h-[330px] flex items-center justify-center"};function D4(t,e,n,r,o,d){var b,k,E,C,T,I;const p=a.resolveComponent("VsWidgetHistoryItem"),c=a.resolveComponent("IconUpDown");return a.openBlock(),a.createElementBlock("div",v4,[e[1]||(e[1]=a.createElementVNode("div",{class:"flex items-center justify-between mb-4 gap-x-2"},null,-1)),(k=(b=t.history)==null?void 0:b.rows)!=null&&k.length?(a.openBlock(),a.createElementBlock("ul",w4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.displayedRows,(N,$)=>{var F,q;return a.openBlock(),a.createElementBlock("li",{class:"list-none mr-[10px]",key:N.uid},[a.createVNode(p,{item:N,class:a.normalizeClass($===((q=(F=t.history)==null?void 0:F.rows)==null?void 0:q.length)-1?"pb-0 after:hidden":"pb-8 after:absolute after:top-[38px] after:bottom-0 after:start-[19px] after:w-px after:bg-gray-200 dark:after:bg-neutral-700")},null,8,["item","class"])])}),128)),((C=(E=t.history)==null?void 0:E.rows)==null?void 0:C.length)>4&&!t.showAll?(a.openBlock(),a.createElementBlock("div",k4,[a.createElementVNode("button",{type:"button",onClick:e[0]||(e[0]=(...N)=>t.showMore&&t.showMore(...N)),class:"hs-collapse-toggle hs-collapse-open:hidden group w-full text-start flex items-center gap-x-5 focus:outline-none",id:"hs-pro-dnao","aria-expanded":"false","aria-controls":"hs-pro-dnao-button","data-hs-collapse":"#hs-pro-dnao-button"},[a.createElementVNode("span",E4,[a.createElementVNode("span",C4,[a.createVNode(c)])]),a.createElementVNode("span",S4,[a.createElementVNode("span",T4," Показати ще "+a.toDisplayString(((I=(T=t.history)==null?void 0:T.rows)==null?void 0:I.length)-t.limitVisible),1)])])])):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",A4," Історія відсутня "))])}const M4=Oe(x4,[["render",D4]]),I4={props:{id:{type:String,default:""},data:{type:Object,default:null}},data(){return{mode:"base"}},methods:{getPdfUrl(){const t=`/api/print-template/crm.accounts.doc/${this.id}`;return this.mode==="demo"?t+"?demo=1&format=pdf":this.mode==="preview"?t+"?preview=1&format=pdf":t},setMode(t){this.mode=t},downloadPdf(){const t=document.createElement("a");t.href=`/api/print-template/crm.accounts.doc/${this.id}`,t.download=`document_${this.id}.pdf`,t.click()},downloadWord(){const t=document.createElement("a");t.href=`/api/print-template/crm.accounts.doc/${this.id}?format=word`,t.download=`document_${this.id}.docx`,t.click()}}},P4={class:"flex flex-col h-[calc(100vh-300px)] text-sm"},R4={class:"flex justify-between"},N4={class:"flex gap-4 mb-4"},B4={class:"flex mb-4 border rounded overflow-hidden"},V4=["src"];function z4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",P4,[a.createElementVNode("div",R4,[a.createElementVNode("div",N4,[a.createElementVNode("button",{onClick:e[0]||(e[0]=(...p)=>d.downloadPdf&&d.downloadPdf(...p)),class:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"}," Завантажити PDF "),a.createElementVNode("button",{onClick:e[1]||(e[1]=(...p)=>d.downloadWord&&d.downloadWord(...p)),class:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600"}," Завантажити Word ")]),a.createElementVNode("div",B4,[a.createElementVNode("button",{class:a.normalizeClass([{"bg-gray-200":o.mode==="base","bg-white":o.mode!=="base"},"px-4 py-2 border-r text-black"]),onClick:e[2]||(e[2]=p=>d.setMode("base"))}," Базовий ",2),a.createElementVNode("button",{class:a.normalizeClass([{"bg-gray-200":o.mode==="demo","bg-white":o.mode!=="demo"},"px-4 py-2 border-r text-black"]),onClick:e[3]||(e[3]=p=>d.setMode("demo"))}," Демо ",2),a.createElementVNode("button",{class:a.normalizeClass([{"bg-gray-200":o.mode==="preview","bg-white":o.mode!=="preview"},"px-4 py-2 text-black"]),onClick:e[4]||(e[4]=p=>d.setMode("preview"))}," Перегляд шаблону ",2)])]),a.createElementVNode("iframe",{src:d.getPdfUrl(),type:"application/pdf",class:"flex-grow w-full border-0 rounded-lg shadow-lg"},null,8,V4)])}const O4=Oe(I4,[["render",z4]]),L4={},F4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"};function $4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",F4,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),a.createElementVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),a.createElementVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]))}const dg=Oe(L4,[["render",$4]]),j4={},U4={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function H4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",U4,e[0]||(e[0]=[a.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const ug=Oe(j4,[["render",H4]]),W4={props:{height:{type:String,default:"16"},width:{type:String,default:"12"},color:{type:String,default:"black"}}},q4={style:{display:"none"}},G4=["height","width","fill"];function Z4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(),a.createElementBlock("svg",q4,e[0]||(e[0]=[a.createElementVNode("symbol",{id:"icon-pencil",viewBox:"0 0 32 32"},[a.createElementVNode("path",{d:"M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z"})],-1)]))),(a.openBlock(),a.createElementBlock("svg",{height:n.height,width:n.width,fill:n.color},e[1]||(e[1]=[a.createElementVNode("use",{"xlink:href":"#icon-pencil"},null,-1)]),8,G4))],64)}const hg=Oe(W4,[["render",Z4]]),Y4={class:"hs-dropdown [--placement:bottom-right] inline-flex"},X4={class:"inline-flex items-center justify-center bg-white border rounded-lg shadow-sm size-7 gap-x-2 border-stone-200 text-stone-800 hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50"},K4={class:"flex flex-col items-start"},J4=["onClick"],Q4={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},eV={class:"p-4"},tV={class:"flex justify-end mt-4 gap-x-3"},nV={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},rV={__name:"vs-widget-table-controls",props:{table:{type:String,default:()=>""},token:{type:String},id:{type:String,default:()=>""},form:{type:String,default:()=>""},apiDelete:{type:String,default:()=>""},actions:{type:Array,default:()=>[]}},emits:["update-table"],setup(t,{emit:e}){const n=a.getCurrentInstance().proxy.$v3plugin,r=t,o=e,d=a.ref(!1),p=a.ref(!1),c=a.ref({}),b=a.ref(null),k=()=>{d.value=!0,document.body.click()},E=async()=>{var N,$;try{const F=await Le.get(`/api/table/${r.table}/${r.id}`);c.value=F==null?void 0:F.data;const{data:q}=await Le.get(`/api/template/form/${((N=F==null?void 0:F.data)==null?void 0:N.token)||r.form}`);b.value=(($=q==null?void 0:q.form)==null?void 0:$.schema)||(q==null?void 0:q.schema)||(q==null?void 0:q.form),q!=null&&q.obj&&(c.value={...F==null?void 0:F.data,...q==null?void 0:q.obj}),document.body.click(),p.value=!0}catch{}},C=async()=>{try{await Le.delete(`${r.apiDelete||"/api/table"}/${r.table}/${r.token||r.id}`),await o("update-table"),d.value=!1}catch(N){console.log(N)}},T=async()=>{try{await Le.put(`/api/table/${r.table}/${r.token||r.id}`,c.value),p.value=!1,await o("update-table")}catch{}},I=async N=>{debugger;document.querySelector("body").click(),N!=null&&N.form?(await n.$form({form:N==null?void 0:N.form,id:r.id,api:N==null?void 0:N.api,title:N==null?void 0:N.title}),await o("update-table")):N!=null&&N.api&&(await n.$api({confirm:N==null?void 0:N.confirm,api:N==null?void 0:N.api,method:N==null?void 0:N.method,id:r.id,isId:(N==null?void 0:N.isId)||!1}),await this.$emit("update-table"))};return a.onMounted(()=>{r.isForm&&E()}),(N,$)=>{const F=a.resolveComponent("VsPopover"),q=a.resolveComponent("VsConfirm"),J=a.resolveComponent("VsForm"),Q=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Y4,[a.createVNode(F,{trigger:"click",placement:"bottom-left"},{reference:a.withCtx(()=>[a.createElementVNode("button",X4,[a.createVNode(dg,{height:"16",width:"16"})])]),default:a.withCtx(()=>{var me,ke;return[a.createElementVNode("div",K4,[a.createElementVNode("button",{onClick:E,class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},[a.createVNode(hg,{color:"#000"}),$[5]||($[5]=a.createTextVNode(" Редагувати ",-1))]),(me=t.actions)!=null&&me.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList((ke=t.actions)==null?void 0:ke.filter(Re=>typeof Re=="object"),Re=>(a.openBlock(),a.createElementBlock("button",{onClick:Ee=>I(Re),key:Re==null?void 0:Re.id,class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},a.toDisplayString(Re==null?void 0:Re.label),9,J4))),128)):a.createCommentVNode("",!0),N.isForm?(a.openBlock(),a.createElementBlock("div",Q4)):a.createCommentVNode("",!0),a.createElementVNode("button",{onClick:a.withModifiers(k,["stop"]),class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},[a.createVNode(ug),$[6]||($[6]=a.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])])]}),_:1})]),a.createVNode(q,{visible:d.value,"onUpdate:visible":$[1]||($[1]=me=>d.value=me),size:"small",title:"Ви впевнені?"},{default:a.withCtx(()=>[a.createElementVNode("div",eV,[$[7]||($[7]=a.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),a.createElementVNode("div",tV,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:$[0]||($[0]=me=>d.value=!1)}," Скасувати "),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:C}," Так, я впевнена/ий ")])])]),_:1},8,["visible"]),a.createVNode(Q,{visible:p.value,"onUpdate:visible":$[4]||($[4]=me=>p.value=me),title:"Редагувати об'єкт"},{footer:a.withCtx(()=>[a.createElementVNode("div",nV,[a.createElementVNode("button",{onClick:$[3]||($[3]=me=>p.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:T,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode(J,{scheme:b.value,modelValue:c.value,"onUpdate:modelValue":$[2]||($[2]=me=>c.value=me),ref:"form"},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}}},iV={},sV={class:"hidden sm:block shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"};function oV(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",sV,e[0]||(e[0]=[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"},null,-1)]))}const $l=Oe(iV,[["render",oV]]),aV={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},lV={__name:"vs-widget-table-add-form",props:{token:{type:String,default:()=>""},form:{type:String,default:()=>""}},emits:["update-table"],setup(t,{emit:e}){var T;const n=(T=a.getCurrentInstance().proxy)==null?void 0:T.$notify,r=e,o=t,d=a.ref(et.value.buttonColor||"blue"),p=a.ref(!1),c=a.ref(null),b=a.ref({}),k=a.ref(),E=async()=>{var I;try{const{data:N}=await Le.get(`/api/template/form/${o.token||o.form}`);c.value=((I=N==null?void 0:N.form)==null?void 0:I.schema)||(N==null?void 0:N.schema)||(N==null?void 0:N.form),N!=null&&N.obj&&(b.value={...N==null?void 0:N.obj}),p.value=!0}catch{}},C=async()=>{var I;try{await((I=k.value)==null?void 0:I.doValidation()),await Le.post(`/api/table/${o.token}`,b.value),p.value=!1,b.value={},r("update-table"),n({title:"Успішно!",type:"success",message:"Операція виконана успішно"})}catch(N){console.log(N)}};return(I,N)=>{const $=a.resolveComponent("VsForm"),F=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:E,class:a.normalizeClass(`h-[34px] w-[34px] shadow bg-${d.value}-600 rounded-lg flex items-center justify-center text-white duration-300 hover:bg-${d.value}-700`)},[a.createVNode($l)],2),a.createVNode(F,{visible:p.value,"onUpdate:visible":N[2]||(N[2]=q=>p.value=q),title:"Створити об'єкт"},{footer:a.withCtx(()=>[a.createElementVNode("div",aV,[a.createElementVNode("button",{onClick:N[1]||(N[1]=q=>p.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:C,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode($,{scheme:c.value,modelValue:b.value,"onUpdate:modelValue":N[0]||(N[0]=q=>b.value=q),ref_key:"form",ref:k},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}}},cV={props:{row:Object,column:Object,table:String},emits:["update-table"]};function dV(t,e,n,r,o,d){var p,c,b,k,E,C,T,I;return a.openBlock(),a.createBlock(a.resolveDynamicComponent(((p=n.column)==null?void 0:p.format)==="custom"?(c=n.column)==null?void 0:c.component:`table-format-${((k=(b=n.column)==null?void 0:b.format)==null?void 0:k.toLowerCase())||"text"}`),{onUpdateTable:e[0]||(e[0]=()=>t.$emit("update-table")),name:(E=n.column)==null?void 0:E.name,data:n.row,value:(T=n.row)==null?void 0:T[(C=n.column)==null?void 0:C.name],table:n.table,column:n.column,edit:(I=n.column)==null?void 0:I.edit},null,40,["name","data","value","table","column","edit"])}const vd=Oe(cV,[["render",dV]]),uV={},hV={class:"h21yx vs0hq",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function pV(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",hV,e[0]||(e[0]=[a.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const Dv=Oe(uV,[["render",pV]]),fV={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String},filter:{type:Array},data:{type:Object}},components:{IconFilter:Dv},mounted(){setTimeout(()=>{var t,e;if(typeof this.filter=="string"){if(!filter)return;const[n,r]=filter==null?void 0:filter.split("=");this.filterValue[n]=(t=this.data)==null?void 0:t[r]}else typeof this.filter=="object"&&((e=this.filter)==null||e.forEach(n=>{var d;if(!n)return;const[r,o]=n==null?void 0:n.split("=");this.filterValue[r]=(d=this.data)==null?void 0:d[o]}))})},data(){return{isFilters:!1,filterValue:{}}},methods:{closeFilter({target:t}){this.isFilters&&t.classList.contains("filter-container")&&(this.isFilters=!1)}}},mV={key:0,class:"py-[1px] px-[6px] text-white text-[10px] rounded-full bg-blue-500"},gV={class:"filter-content h-screen bg-white w-[400px] overflow-x-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function yV(t,e,n,r,o,d){const p=a.resolveComponent("IconFilter"),c=a.resolveComponent("VsFilter");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:e[0]||(e[0]=b=>o.isFilters=!o.isFilters),class:"py-2 px-2.5 max-h-[34px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none"},[a.createVNode(p,{height:"16",width:"16"}),e[5]||(e[5]=a.createTextVNode(" Фільтри ",-1)),n.onFilters?(a.openBlock(),a.createElementBlock("span",mV,a.toDisplayString(n.onFilters),1)):a.createCommentVNode("",!0)]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var b;return[a.withDirectives(a.createElementVNode("div",{onClick:e[4]||(e[4]=(...k)=>d.closeFilter&&d.closeFilter(...k)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]"},[a.createElementVNode("div",gV,[(b=n.scheme)!=null&&b.length?(a.openBlock(),a.createBlock(c,{key:0,ref:"filter",scheme:n.scheme,layout:"default",modelValue:o.filterValue,"onUpdate:modelValue":e[1]||(e[1]=k=>o.filterValue=k),"apply-vue-router":"",history:"",token:n.table,name:"filter",footer:!0,background:!0,onFilterChange:e[2]||(e[2]=k=>t.$emit("filterChange",k)),closeFilterBtn:!0,onFilterClose:e[3]||(e[3]=k=>o.isFilters=!1)},null,8,["scheme","modelValue","token"])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.isFilters]])]}),_:1})],64)}const _V=Oe(fV,[["render",yV]]),Mv=async(t,e,n,r=10)=>{var $,F,q,J;if(!e||!n)return;await a.nextTick();const o=await(n==null?void 0:n.getBoundingClientRect()),d=await(e==null?void 0:e.getBoundingClientRect());if(!d||!o)return;const p=await parseInt(($=e==null?void 0:e.getBoundingClientRect())==null?void 0:$.height),c=await parseInt((F=e==null?void 0:e.getBoundingClientRect())==null?void 0:F.width),b=await parseInt((q=n==null?void 0:n.getBoundingClientRect())==null?void 0:q.height),k=await parseInt((J=n==null?void 0:n.getBoundingClientRect())==null?void 0:J.width),E=await window.innerHeight,C=await window.innerWidth;let T=0,I=0;const N=d.bottom+r+b;switch(t){case"top":d.top-o.height-r<0?T=d.top-o.height+r+b+p:T=d.top-o.height-r,C>k+d.right+30?I=d.left-o.width/2+d.width/2:I=C-30-k;break;case"bottom":E>N?T=d.bottom+r:T=d.bottom-r-b-p,I=d.left-o.width/2+d.width/2;break;case"left":T=d.top-o.height/2+d.height/2,d.left-o.width-r>0?I=d.left-o.width-r:I=10;break;case"right":T=d.top-o.height/2+d.height/2,C-c>k?I=d.right+r:I=C-30-k;break;case"top-right":d.top-o.height-r<0?T=d.top-o.height+(void 0).gap+b+p:T=d.top-o.height-r,C-c>k?I=d.right+r:I=C-30-k;break;case"top-left":d.top-o.height-r<0?T=d.top-o.height+r+b+p:T=d.top-o.height-r,d.left-o.width-r>0?I=d.left-o.width-r:I=10;break;case"bottom-right":E>N?T=d.bottom+r:T=d.bottom-r-b-p,C-c>k?I=d.left:I=C-30-k;break;case"bottom-left":E>N?T=d.bottom+r:T=d.bottom-r-b-p,d.left>0?I=d.right-k:I=10;break;case"bottom-start":E>N?T=d.bottom+r:T=d.bottom-(void 0).gap-b-p,d.left>0?I=d.left:I=10;break}T+b>E?T=E-b-r:T<0&&(T=r),I+k>C?I=C-k-r:I<0&&(I=r),n instanceof HTMLElement&&(n.style.top=`${T}px`,n.style.left=`${I}px`,n.style.position="fixed")},bV={},xV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-columns"};function vV(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",xV,e[0]||(e[0]=[a.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>',9)]))}const wV=Oe(bV,[["render",vV]]),kV={props:{column:Object},emits:["update-column"],components:{IconCheck2:kl},data(){return{value:!1}},watch:{value(t){this.$emit("update-column",{...this.column,hidden:!t})}},computed:{color(){return et.value.buttonColor||"blue"}},mounted(){var t;((t=this.column)==null?void 0:t.hidden)!==!0&&(this.value=!0)}},EV={class:"flex justify-between items-center py-1.5 px-3 cursor-pointer rounded-lg hover:bg-gray-100 has-[:disabled]:opacity-50 has-[:disabled]:pointer-events-none dark:hover:bg-neutral-800"},CV={class:"flex justify-between flex-1 items-center gap-x-2.5 cursor-pointer text-[13px] text-gray-800 dark:text-neutral-300"};function SV(t,e,n,r,o,d){var c,b;const p=a.resolveComponent("IconCheck2");return a.openBlock(),a.createElementBlock("div",EV,[a.createElementVNode("label",CV,[a.createTextVNode(a.toDisplayString(((c=n.column)==null?void 0:c.ua)||((b=n.column)==null?void 0:b.title))+" ",1),a.withDirectives(a.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=k=>o.value=k),class:"hidden"},null,512),[[a.vModelCheckbox,o.value]]),a.createElementVNode("span",{class:a.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500",[o.value?"bg-"+d.color+"-600 border-0":"bg-white"]])},[a.createVNode(p,{height:"12",width:"12"})],2)])])}const TV={components:{IconColumns:wV,AdminTableColumnsHiddenItem:Oe(kV,[["render",SV]])},emits:["update-columns"],props:{columns:Array},data(){return{searchValue:"",visible:!1}},computed:{filteredColumn(){var t;return(t=this.columns)==null?void 0:t.filter(e=>{var n,r,o,d,p,c;return((o=(n=e==null?void 0:e.ua)==null?void 0:n.toLowerCase())==null?void 0:o.includes((r=this.searchValue)==null?void 0:r.toLowerCase()))||((c=(d=e==null?void 0:e.title)==null?void 0:d.toLowerCase())==null?void 0:c.includes((p=this.searchValue)==null?void 0:p.toLowerCase()))})}},methods:{toggleVisible(){this.visible=!this.visible,Mv("bottom",this.$refs.wrapper,this.$refs.dropdown),this.visible?(document.addEventListener("click",this.handleClickOutside),document.addEventListener("scroll",this.handleScroll,!0)):(document.removeEventListener("click",this.handleClickOutside),document.removeEventListener("scroll",this.handleScroll,!0))},handleClickOutside(t){const e=this.$refs.wrapper;e&&!e.contains(t.target)&&(this.visible=!1,document.removeEventListener("click",this.handleClickOutside))},handleScroll(t){this.visible&&this.$refs.dropdown&&!this.$refs.dropdown.contains(t.target)&&(this.visible=!1)},updateColumn(t){const e=this.columns.findIndex(r=>(r==null?void 0:r.name)===(t==null?void 0:t.name)),n=this.columns;n[e]=t,this.$emit("update-columns",[...n])}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},AV={class:"relative p-1 border-gray-200 border-y dark:border-neutral-800"},DV={class:"p-1 pt-3 max-h-80 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},MV={key:0,class:"block px-3 mb-2 text-xs text-gray-500 dark:text-neutral-500"},IV={class:"space-y-1"},PV={key:1,class:"flex items-center px-3 text-[13px] py-1.5 px-3 rounded-md cursor-pointer group"};function RV(t,e,n,r,o,d){const p=a.resolveComponent("IconColumns"),c=a.resolveComponent("AdminTableColumnsHiddenItem");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:e[0]||(e[0]=(...b)=>d.toggleVisible&&d.toggleVisible(...b)),ref:"wrapper",class:"py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[a.createVNode(p,{height:"20",width:"16"})],512),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var b,k;return[(a.openBlock(),a.createBlock(a.Teleport,{to:"#modal"},[a.withDirectives(a.createElementVNode("div",{onClick:e[2]||(e[2]=a.withModifiers(()=>{},["stop"])),ref:"dropdown",class:"fixed z-10 w-64 transition-[opacity,margin] duration bg-white rounded-xl shadow-lg dark:bg-neutral-900"},[e[3]||(e[3]=a.createElementVNode("div",{class:"flex items-center justify-between h-[48px] px-4 py-2 gap-x-2 text-sm font-medium text-gray-800"}," Колонки ",-1)),a.createElementVNode("div",AV,[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=E=>o.searchValue=E),type:"text",class:"py-1.5 px-3 block w-full border-transparent rounded-lg sm:text-sm text-base placeholder:text-gray-500 hover:bg-gray-100 focus:outline-none focus:border-transparent focus:ring-0 focus:bg-gray-100 disabled:opacity-100 disabled:pointer-events-none dark:bg-transparent dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:ring-neutral-600 dark:focus:bg-neutral-800",placeholder:"Пошук",autofocus:""},null,512),[[a.vModelText,o.searchValue]])]),a.createElementVNode("div",DV,[(b=d.filteredColumn)!=null&&b.length?(a.openBlock(),a.createElementBlock("span",MV," Оберіть колонки для відображення ")):a.createCommentVNode("",!0),a.createElementVNode("div",IV,[(k=d.filteredColumn)!=null&&k.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(d.filteredColumn,(E,C)=>(a.openBlock(),a.createBlock(c,{key:C,column:E,onUpdateColumn:d.updateColumn},null,8,["column","onUpdateColumn"]))),128)):(a.openBlock(),a.createElementBlock("div",PV," Нічого не знайдено "))])])],512),[[a.vShow,o.visible]])]))]}),_:1})],64)}const Iv=Oe(TV,[["render",RV]]),NV={class:"h-full"},BV={class:"flex justify-between mb-[4px]"},VV={class:"flex gap-[4px]"},zV={class:"py-1"},OV={class:"inline-block w-full align-middle"},LV={class:"relative min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},FV={class:"font-medium text-left text-gray-700"},$V={key:0,class:"w-[70px] bg-white text-center sticky right-[-1px]"},jV={class:"divide-y divide-gray-200"},UV={key:0,class:"py-2 pr-5"},HV={key:0,class:"h-[60px] flex relative items-center justify-center"},WV={__name:"vs-widget-table",props:{data:Object,columns:Array,token:String,table:{type:String,default:()=>""},id:{type:String,default:()=>""},api:{type:String,default:()=>""},apiDelete:{type:String,default:()=>""},data:{type:Object,default:()=>null},filter:{type:Array,default:()=>[]},limit:{type:Number,default:()=>20}},setup(t){const e=t,n=a.ref(null),r=a.ref([]),o=a.ref(1),d=a.ref(""),p=a.ref(null),c=a.ref(null),b=a.ref(0),k=async()=>{var T;try{const I=await Le.get(`/api/table-filter/${e.table}`);p.value=(T=I==null?void 0:I.data)==null?void 0:T.list;const{data:N}=await Le.get((e!=null&&e.api?e.api:"/api/table-data")+(e.token?`/${e.token}`:e.table&&e.id?`/${e.table}`:""),{params:{page:o.value,limit:10,search:d.value,filter:c.value}});n.value=N,r.value=(N==null?void 0:N.columns)||(e==null?void 0:e.columns)}catch(I){console.error("Ошибка при загрузке данных таблицы:",I)}},E=T=>{o.value=T,k()},C=async({url:T,state:I})=>{var N;c.value=T!=="no-url"?T:null,b.value=(N=Object.entries(I))==null?void 0:N.length,o.value=1,await k()};return a.watch(d,k),a.onMounted(()=>{k()}),(T,I)=>{var F,q,J,Q,me,ke,Re,Ee,Ve,Be,Ze,tt,Xe,ot,ue,Ut;const N=a.resolveComponent("VsText"),$=a.resolveComponent("VsPagination");return a.openBlock(),a.createElementBlock("div",NV,[a.createElementVNode("div",BV,[a.createVNode(N,{modelValue:d.value,"onUpdate:modelValue":I[0]||(I[0]=wt=>d.value=wt),class:"[&>input]:py-[7px] [&>input]:max-h-[36px] w-[400px] [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",placeholder:"Пошук..."},null,8,["modelValue"]),a.createElementVNode("div",VV,[(F=p.value)!=null&&F.length?(a.openBlock(),a.createBlock(_V,{key:0,scheme:p.value,table:t.table,onFilterChange:C,onFilters:b.value,filter:t.filter,data:(J=(q=t.data)==null?void 0:q.rows)==null?void 0:J[0]},null,8,["scheme","table","onFilters","filter","data"])):a.createCommentVNode("",!0),a.createVNode(Iv,{columns:r.value,onUpdateColumns:I[1]||(I[1]=wt=>r.value=wt)},null,8,["columns"]),(Q=n.value)!=null&&Q.addToken?(a.openBlock(),a.createBlock(lV,{key:1,token:(me=n.value)==null?void 0:me.addToken,form:(ke=n.value)==null?void 0:ke.form,onUpdateTable:k},null,8,["token","form"])):a.createCommentVNode("",!0)])]),a.createElementVNode("div",zV,"Кількість: "+a.toDisplayString((Re=n.value)==null?void 0:Re.total),1),a.createElementVNode("div",{class:a.normalizeClass(["overflow-x-auto w-full admin-widget-table [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",[((Ve=(Ee=n.value)==null?void 0:Ee.rows)==null?void 0:Ve.length)>t.limit?"h-[calc(100%-60px)]":"h-[100%]"]])},[a.createElementVNode("div",OV,[a.createElementVNode("table",LV,[(Be=r.value)!=null&&Be.length?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("thead",FV,[a.createElementVNode("tr",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ze=r.value)==null?void 0:Ze.filter(wt=>!(wt!=null&&wt.hidden)),(wt,$t)=>(a.openBlock(),a.createElementBlock("th",{key:$t,scope:"col",class:"py-2"},a.toDisplayString((wt==null?void 0:wt.title)||(wt==null?void 0:wt.description)||(wt==null?void 0:wt.ua)),1))),128)),(Xe=(tt=n.value)==null?void 0:tt.actions)!=null&&Xe.length?(a.openBlock(),a.createElementBlock("th",$V)):a.createCommentVNode("",!0)])]),a.createElementVNode("tbody",jV,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ot=n.value)==null?void 0:ot.rows,(wt,$t)=>{var an,xn,mn,hn,vn;return a.openBlock(),a.createElementBlock("tr",{key:$t,class:"odd:bg-gray-50"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((an=r.value)==null?void 0:an.filter(Dn=>!(Dn!=null&&Dn.hidden)),(Dn,In)=>(a.openBlock(),a.createElementBlock("td",{key:In,class:"py-2 pr-5"},[a.createVNode(vd,{row:wt,column:Dn,table:t.table},null,8,["row","column","table"])]))),128)),(mn=(xn=n.value)==null?void 0:xn.actions)!=null&&mn.length?(a.openBlock(),a.createElementBlock("td",UV,[a.createVNode(rV,{id:wt==null?void 0:wt.id,table:t.table,apiDelete:t.apiDelete,actions:(hn=n.value)==null?void 0:hn.actions,token:wt==null?void 0:wt.token,form:(vn=n.value)==null?void 0:vn.form,onUpdateTable:k},null,8,["id","table","apiDelete","actions","token","form"])])):a.createCommentVNode("",!0)])}),128))])],64)):a.createCommentVNode("",!0)])])],2),((ue=n.value)==null?void 0:ue.filtered)>t.limit?(a.openBlock(),a.createElementBlock("div",HV,[a.createVNode($,{goTo:!1,"default-page":o.value,total:(Ut=n.value)==null?void 0:Ut.filtered,class:"absolute w-fit",pageSize:t.limit,onPageChange:E,backgroundColor:"#F3F4F6"},null,8,["default-page","total","pageSize"])])):a.createCommentVNode("",!0)])}}},qV={},GV={class:"shrink-0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function ZV(t,e){return a.openBlock(),a.createElementBlock("svg",GV,e[0]||(e[0]=[a.createElementVNode("path",{d:"M18 6 7 17l-5-5"},null,-1),a.createElementVNode("path",{d:"m22 10-7.5 7.5L13 16"},null,-1)]))}const YV=Oe(qV,[["render",ZV]]),XV={},KV={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",class:"icon icon-tabler icons-tabler-filled icon-tabler-user"};function JV(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",KV,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M12 2a5 5 0 1 1 -5 5l.005 -.217a5 5 0 0 1 4.995 -4.783z"},null,-1),a.createElementVNode("path",{d:"M14 14a5 5 0 0 1 5 5v1a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-1a5 5 0 0 1 5 -5h4z"},null,-1)]))}const Pv=Oe(XV,[["render",JV]]),QV={},e5={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function t5(t,e){return a.openBlock(),a.createElementBlock("svg",e5,e[0]||(e[0]=[a.createElementVNode("polyline",{points:"9 11 12 14 22 4"},null,-1),a.createElementVNode("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"},null,-1)]))}const n5=Oe(QV,[["render",t5]]),r5={class:"relative shrink-0"},i5=["src"],s5={key:1,class:"h-[38px] w-[38px] bg-gray-200 rounded-full flex items-center justify-center"},o5={key:2,class:"absolute top-4 -start-3 size-2 bg-blue-600 rounded-full dark:bg-blue-500"},a5={class:"grow"},l5={class:"text-xs text-gray-500 dark:text-neutral-500"},c5={class:"block text-sm font-medium text-gray-800 dark:text-neutral-300"},d5={class:"text-sm text-gray-500 dark:text-neutral-500"},u5={key:0,class:"sm:group-hover:opacity-100 sm:opacity-0 sm:absolute sm:top-5 sm:end-5 inline-block p-0.5 bg-white border border-gray-200 rounded-lg shadow-sm transition ease-out"},h5={__name:"admin-notification-item",props:{item:Object},emits:["update-notification"],setup(t,{emit:e}){const n=e,r=a.ref(!1),o=()=>r.value=!0,d=()=>r.value=!1,p=async()=>{var c;try{await Le.get(`/api/notification-read/${(c=t.item)==null?void 0:c.id}`),await n("update-notification")}catch{}};return(c,b)=>{var E,C,T,I,N,$;const k=a.resolveComponent("VsPopover");return a.openBlock(),a.createElementBlock("li",{class:a.normalizeClass(["relative group w-full flex gap-x-5 text-start p-5 border-b",[(E=t.item)!=null&&E.read?"bg-gray-100":"bg-white"]]),onMouseenter:o,onMouseleave:d},[a.createElementVNode("div",r5,[(C=t.item)!=null&&C.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,class:"shrink-0 size-[38px] rounded-full",src:(T=t.item)==null?void 0:T.avatar,alt:"Avatar"},null,8,i5)):(a.openBlock(),a.createElementBlock("div",s5,[a.createVNode(Pv)])),(I=t.item)!=null&&I.read?(a.openBlock(),a.createElementBlock("span",o5)):a.createCommentVNode("",!0)]),a.createElementVNode("div",a5,[a.createElementVNode("p",l5,[a.createVNode(Om,{name:"cdate",data:t.item},null,8,["data"])]),a.createElementVNode("span",c5,a.toDisplayString((N=t.item)==null?void 0:N.author),1),a.createElementVNode("p",d5,a.toDisplayString(($=t.item)==null?void 0:$.subject),1)]),r.value?(a.openBlock(),a.createElementBlock("div",u5,[a.createVNode(k,{trigger:"hover",placement:"left"},{reference:a.withCtx(()=>[a.createElementVNode("button",{onClick:p,type:"button",class:"hs-tooltip-toggle hs-tooltip relative inline-block size-7 flex shrink-0 justify-center items-center text-gray-500 hover:bg-gray-100 hover:text-gray-800 rounded"},[a.createVNode(n5)])]),default:a.withCtx(()=>[b[0]||(b[0]=a.createTextVNode(" Прочитати ",-1))]),_:1,__:[0]})])):a.createCommentVNode("",!0)],34)}}},p5={},f5={class:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function m5(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",f5,e[0]||(e[0]=[a.createElementVNode("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"},null,-1),a.createElementVNode("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"},null,-1)]))}const g5=Oe(p5,[["render",m5]]),y5={},_5={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function b5(t,e){return a.openBlock(),a.createElementBlock("svg",_5,e[0]||(e[0]=[a.createElementVNode("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"},null,-1),a.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))}const x5=Oe(y5,[["render",b5]]),v5={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},w5={class:"w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit"},k5={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},E5={class:"max-w-sm mx-auto mt-6"},C5={class:"font-medium text-gray-800 dark:text-neutral-200"},S5={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function T5(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",w5,[a.createElementVNode("div",null,[a.createElementVNode("div",k5,[e[0]||(e[0]=a.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),a.createElementVNode("div",E5,[a.createElementVNode("p",C5,a.toDisplayString(n.title),1),a.createElementVNode("p",S5,a.toDisplayString(n.text),1)])])])])}const pg=Oe(v5,[["render",T5]]),A5={key:0,class:"flex absolute top-0 end-0 -mt-1.5 -me-1.5"},D5={class:"relative min-w-[18px] min-h-[18px] inline-flex justify-center items-center text-[10px] bg-red-500 text-white rounded-full px-1"},M5={class:"h-[50px] px-[20px] border-b w-full flex items-center justify-between rounded-t-lg bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)]"},I5={class:"h-[30px] w-[30px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100"},P5={class:"max-h-[400px] bg-white overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300"},R5={key:0},N5={key:1},fg={__name:"admin-notification",props:{placement:{type:String,default:"right"}},setup(t){const e=a.ref(0),n=a.ref([]),r=a.ref(!1),o=a.ref(null),d=t,{$notify:p}=a.getCurrentInstance().proxy,c=E=>{o.value&&!o.value.contains(E.target)&&(r.value=!1)};a.watch(r,E=>{E?window.addEventListener("click",c):window.removeEventListener("click",c)}),a.onBeforeUnmount(()=>{window.removeEventListener("click",c)});const b=async()=>{try{const{data:E}=await Le.get("/api/notification");n.value=(E==null?void 0:E.rows)||[]}catch{p({type:"error",message:"При спробі завантаження нотифікацій виникла помилка",title:"Помилка!"})}};b();const k=async()=>{try{await Le.get("/api/notification-read"),await b()}catch{p({type:"error",message:"Виникла помилка",title:"Помилка!"})}};return(E,C)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"notificationRef",ref:o,class:"hs-tooltip [--placement:bottom] inline-block show relative"},[a.createElementVNode("button",{onClick:C[0]||(C[0]=T=>r.value=!r.value),class:"relative size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border text-gray-900 hover:bg-gray-200 focus:outline-none focus:bg-gray-200"},[a.createVNode(g5,{height:"24",width:"24"}),e.value?(a.openBlock(),a.createElementBlock("span",A5,[C[1]||(C[1]=a.createElementVNode("span",{class:"absolute inline-flex bg-red-400 rounded-full opacity-75 animate-ping size-full dark:bg-red-600"},null,-1)),a.createElementVNode("span",D5,a.toDisplayString(e.value),1)])):a.createCommentVNode("",!0)]),a.createVNode(a.Transition,null,{default:a.withCtx(()=>{var T;return[r.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["w-96 h-[100px] z-[11] absolute top-[40px]",(d==null?void 0:d.placement)==="right"?"right-0":"left-0"])},[a.createElementVNode("div",M5,[C[2]||(C[2]=a.createElementVNode("nav",{class:"flex"},[a.createElementVNode("button",{type:"button",class:"px-2 py-1.5 relative inline-flex justify-center items-center gap-x-2 text-nowrap hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg focus:outline-none focus:bg-gray-100 after:absolute after:bottom-[-9px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800"}," Всі ")],-1)),a.createElementVNode("button",I5,[a.createVNode(x5)])]),a.createElementVNode("div",P5,[(T=n.value)!=null&&T.length?(a.openBlock(),a.createElementBlock("ul",R5,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.value,I=>(a.openBlock(),a.createBlock(h5,{key:I==null?void 0:I.id,item:I,onUpdateNotification:b},null,8,["item"]))),128))])):(a.openBlock(),a.createElementBlock("div",N5,[a.createVNode(pg,{class:"[&>div>div]:min-h-[300px]",text:""})]))]),a.createElementVNode("button",{onClick:k,class:"h-[50px] border-t w-full rounded-b-lg bg-white shadow p-4 flex justify-center items-center gap-x-2 text-sm text-gray-500 font-medium sm:rounded-b-lg hover:text-blue-600 focus:outline-none"},[a.createVNode(YV,{height:"16",width:"16"}),C[3]||(C[3]=a.createTextVNode(" Прочитати усі ",-1))])],2)):a.createCommentVNode("",!0)]}),_:1})],512))}};var Gh,Nt,Rv,Nv,jl,Na,Bv,Vv,zv,Zh={},Ov=[],B5=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Ro(t,e){for(var n in e)t[n]=e[n];return t}function Lv(t){var e=t.parentNode;e&&e.removeChild(t)}function le(t,e,n){var r,o,d,p={};for(d in e)d=="key"?r=e[d]:d=="ref"?o=e[d]:p[d]=e[d];if(arguments.length>2&&(p.children=arguments.length>3?Gh.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(d in t.defaultProps)p[d]===void 0&&(p[d]=t.defaultProps[d]);return Yh(t,p,r,o,null)}function Yh(t,e,n,r,o){var d={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Rv};return o==null&&Nt.vnode!=null&&Nt.vnode(d),d}function Qr(){return{current:null}}function Bn(t){return t.children}function V5(t,e,n,r,o){var d;for(d in n)d==="children"||d==="key"||d in e||Xh(t,d,null,n[d],r);for(d in e)o&&typeof e[d]!="function"||d==="children"||d==="key"||d==="value"||d==="checked"||n[d]===e[d]||Xh(t,d,e[d],n[d],r)}function Fv(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||B5.test(e)?n:n+"px"}function Xh(t,e,n,r,o){var d;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Fv(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Fv(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")d=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+d]=n,n?r||t.addEventListener(e,d?jv:$v,d):t.removeEventListener(e,d?jv:$v,d);else if(e!=="dangerouslySetInnerHTML"){if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e.indexOf("-")==-1?t.removeAttribute(e):t.setAttribute(e,n))}}function $v(t){jl=!0;try{return this.l[t.type+!1](Nt.event?Nt.event(t):t)}finally{jl=!1}}function jv(t){jl=!0;try{return this.l[t.type+!0](Nt.event?Nt.event(t):t)}finally{jl=!1}}function Ai(t,e){this.props=t,this.context=e}function wd(t,e){if(e==null)return t.__?wd(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?wd(t):null}function Uv(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Uv(t)}}function z5(t){jl?setTimeout(t):Vv(t)}function mg(t){(!t.__d&&(t.__d=!0)&&Na.push(t)&&!Kh.__r++||Bv!==Nt.debounceRendering)&&((Bv=Nt.debounceRendering)||z5)(Kh)}function Kh(){var t,e,n,r,o,d,p,c;for(Na.sort(function(b,k){return b.__v.__b-k.__v.__b});t=Na.shift();)t.__d&&(e=Na.length,r=void 0,o=void 0,p=(d=(n=t).__v).__e,(c=n.__P)&&(r=[],(o=Ro({},d)).__v=d.__v+1,gg(c,d,o,n.__n,c.ownerSVGElement!==void 0,d.__h!=null?[p]:null,r,p??wd(d),d.__h),Zv(r,d),d.__e!=p&&Uv(d)),Na.length>e&&Na.sort(function(b,k){return b.__v.__b-k.__v.__b}));Kh.__r=0}function Hv(t,e,n,r,o,d,p,c,b,k){var E,C,T,I,N,$,F,q=r&&r.__k||Ov,J=q.length;for(n.__k=[],E=0;E<e.length;E++)if((I=n.__k[E]=(I=e[E])==null||typeof I=="boolean"?null:typeof I=="string"||typeof I=="number"||typeof I=="bigint"?Yh(null,I,null,null,I):Array.isArray(I)?Yh(Bn,{children:I},null,null,null):I.__b>0?Yh(I.type,I.props,I.key,I.ref?I.ref:null,I.__v):I)!=null){if(I.__=n,I.__b=n.__b+1,(T=q[E])===null||T&&I.key==T.key&&I.type===T.type)q[E]=void 0;else for(C=0;C<J;C++){if((T=q[C])&&I.key==T.key&&I.type===T.type){q[C]=void 0;break}T=null}gg(t,I,T=T||Zh,o,d,p,c,b,k),N=I.__e,(C=I.ref)&&T.ref!=C&&(F||(F=[]),T.ref&&F.push(T.ref,null,I),F.push(C,I.__c||N,I)),N!=null?($==null&&($=N),typeof I.type=="function"&&I.__k===T.__k?I.__d=b=Wv(I,b,t):b=qv(t,I,T,q,N,b),typeof n.type=="function"&&(n.__d=b)):b&&T.__e==b&&b.parentNode!=t&&(b=wd(T))}for(n.__e=$,E=J;E--;)q[E]!=null&&(typeof n.type=="function"&&q[E].__e!=null&&q[E].__e==n.__d&&(n.__d=Gv(r).nextSibling),Xv(q[E],q[E]));if(F)for(E=0;E<F.length;E++)Yv(F[E],F[++E],F[++E])}function Wv(t,e,n){for(var r,o=t.__k,d=0;o&&d<o.length;d++)(r=o[d])&&(r.__=t,e=typeof r.type=="function"?Wv(r,e,n):qv(n,r,r,o,r.__e,e));return e}function Jh(t,e){return e=e||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(n){Jh(n,e)}):e.push(t)),e}function qv(t,e,n,r,o,d){var p,c,b;if(e.__d!==void 0)p=e.__d,e.__d=void 0;else if(n==null||o!=d||o.parentNode==null)e:if(d==null||d.parentNode!==t)t.appendChild(o),p=null;else{for(c=d,b=0;(c=c.nextSibling)&&b<r.length;b+=1)if(c==o)break e;t.insertBefore(o,d),p=d}return p!==void 0?p:o.nextSibling}function Gv(t){var e,n,r;if(t.type==null||typeof t.type=="string")return t.__e;if(t.__k){for(e=t.__k.length-1;e>=0;e--)if((n=t.__k[e])&&(r=Gv(n)))return r}return null}function gg(t,e,n,r,o,d,p,c,b){var k,E,C,T,I,N,$,F,q,J,Q,me,ke,Re,Ee,Ve=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(b=n.__h,c=e.__e=n.__e,e.__h=null,d=[c]),(k=Nt.__b)&&k(e);try{e:if(typeof Ve=="function"){if(F=e.props,q=(k=Ve.contextType)&&r[k.__c],J=k?q?q.props.value:k.__:r,n.__c?$=(E=e.__c=n.__c).__=E.__E:("prototype"in Ve&&Ve.prototype.render?e.__c=E=new Ve(F,J):(e.__c=E=new Ai(F,J),E.constructor=Ve,E.render=L5),q&&q.sub(E),E.props=F,E.state||(E.state={}),E.context=J,E.__n=r,C=E.__d=!0,E.__h=[],E._sb=[]),E.__s==null&&(E.__s=E.state),Ve.getDerivedStateFromProps!=null&&(E.__s==E.state&&(E.__s=Ro({},E.__s)),Ro(E.__s,Ve.getDerivedStateFromProps(F,E.__s))),T=E.props,I=E.state,E.__v=e,C)Ve.getDerivedStateFromProps==null&&E.componentWillMount!=null&&E.componentWillMount(),E.componentDidMount!=null&&E.__h.push(E.componentDidMount);else{if(Ve.getDerivedStateFromProps==null&&F!==T&&E.componentWillReceiveProps!=null&&E.componentWillReceiveProps(F,J),!E.__e&&E.shouldComponentUpdate!=null&&E.shouldComponentUpdate(F,E.__s,J)===!1||e.__v===n.__v){for(e.__v!==n.__v&&(E.props=F,E.state=E.__s,E.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(Be){Be&&(Be.__=e)}),Q=0;Q<E._sb.length;Q++)E.__h.push(E._sb[Q]);E._sb=[],E.__h.length&&p.push(E);break e}E.componentWillUpdate!=null&&E.componentWillUpdate(F,E.__s,J),E.componentDidUpdate!=null&&E.__h.push(function(){E.componentDidUpdate(T,I,N)})}if(E.context=J,E.props=F,E.__P=t,me=Nt.__r,ke=0,"prototype"in Ve&&Ve.prototype.render){for(E.state=E.__s,E.__d=!1,me&&me(e),k=E.render(E.props,E.state,E.context),Re=0;Re<E._sb.length;Re++)E.__h.push(E._sb[Re]);E._sb=[]}else do E.__d=!1,me&&me(e),k=E.render(E.props,E.state,E.context),E.state=E.__s;while(E.__d&&++ke<25);E.state=E.__s,E.getChildContext!=null&&(r=Ro(Ro({},r),E.getChildContext())),C||E.getSnapshotBeforeUpdate==null||(N=E.getSnapshotBeforeUpdate(T,I)),Ee=k!=null&&k.type===Bn&&k.key==null?k.props.children:k,Hv(t,Array.isArray(Ee)?Ee:[Ee],e,n,r,o,d,p,c,b),E.base=e.__e,e.__h=null,E.__h.length&&p.push(E),$&&(E.__E=E.__=null),E.__e=!1}else d==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=O5(n.__e,e,n,r,o,d,p,b);(k=Nt.diffed)&&k(e)}catch(Be){e.__v=null,(b||d!=null)&&(e.__e=c,e.__h=!!b,d[d.indexOf(c)]=null),Nt.__e(Be,e,n)}}function Zv(t,e){Nt.__c&&Nt.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(r){r.call(n)})}catch(r){Nt.__e(r,n.__v)}})}function O5(t,e,n,r,o,d,p,c){var b,k,E,C=n.props,T=e.props,I=e.type,N=0;if(I==="svg"&&(o=!0),d!=null){for(;N<d.length;N++)if((b=d[N])&&"setAttribute"in b==!!I&&(I?b.localName===I:b.nodeType===3)){t=b,d[N]=null;break}}if(t==null){if(I===null)return document.createTextNode(T);t=o?document.createElementNS("http://www.w3.org/2000/svg",I):document.createElement(I,T.is&&T),d=null,c=!1}if(I===null)C===T||c&&t.data===T||(t.data=T);else{if(d=d&&Gh.call(t.childNodes),k=(C=n.props||Zh).dangerouslySetInnerHTML,E=T.dangerouslySetInnerHTML,!c){if(d!=null)for(C={},N=0;N<t.attributes.length;N++)C[t.attributes[N].name]=t.attributes[N].value;(E||k)&&(E&&(k&&E.__html==k.__html||E.__html===t.innerHTML)||(t.innerHTML=E&&E.__html||""))}if(V5(t,T,C,o,c),E)e.__k=[];else if(N=e.props.children,Hv(t,Array.isArray(N)?N:[N],e,n,r,o&&I!=="foreignObject",d,p,d?d[0]:n.__k&&wd(n,0),c),d!=null)for(N=d.length;N--;)d[N]!=null&&Lv(d[N]);c||("value"in T&&(N=T.value)!==void 0&&(N!==t.value||I==="progress"&&!N||I==="option"&&N!==C.value)&&Xh(t,"value",N,C.value,!1),"checked"in T&&(N=T.checked)!==void 0&&N!==t.checked&&Xh(t,"checked",N,C.checked,!1))}return t}function Yv(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(r){Nt.__e(r,n)}}function Xv(t,e,n){var r,o;if(Nt.unmount&&Nt.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Yv(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(d){Nt.__e(d,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&Xv(r[o],e,n||typeof t.type!="function");n||t.__e==null||Lv(t.__e),t.__=t.__e=t.__d=void 0}function L5(t,e,n){return this.constructor(t,n)}function kd(t,e,n){var r,o,d;Nt.__&&Nt.__(t,e),o=(r=!1)?null:e.__k,d=[],gg(e,t=e.__k=le(Bn,null,[t]),o||Zh,Zh,e.ownerSVGElement!==void 0,o?null:e.firstChild?Gh.call(e.childNodes):null,d,o?o.__e:e.firstChild,r),Zv(d,t)}function F5(t,e){var n={__c:e="__cC"+zv++,__:t,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,d;return this.getChildContext||(o=[],(d={})[e]=this,this.getChildContext=function(){return d},this.shouldComponentUpdate=function(p){this.props.value!==p.value&&o.some(function(c){c.__e=!0,mg(c)})},this.sub=function(p){o.push(p);var c=p.componentWillUnmount;p.componentWillUnmount=function(){o.splice(o.indexOf(p),1),c&&c.call(p)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Gh=Ov.slice,Nt={__e:function(t,e,n,r){for(var o,d,p;e=e.__;)if((o=e.__c)&&!o.__)try{if((d=o.constructor)&&d.getDerivedStateFromError!=null&&(o.setState(d.getDerivedStateFromError(t)),p=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,r||{}),p=o.__d),p)return o.__E=o}catch(c){t=c}throw t}},Rv=0,Nv=function(t){return t!=null&&t.constructor===void 0},jl=!1,Ai.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ro({},this.state),typeof t=="function"&&(t=t(Ro({},n),this.props)),t&&Ro(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),mg(this))},Ai.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),mg(this))},Ai.prototype.render=Bn,Na=[],Vv=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Kh.__r=0,zv=0;var Ds,yg,Kv,Jv=[],_g=[],Qv=Nt.__b,e1=Nt.__r,t1=Nt.diffed,n1=Nt.__c,r1=Nt.unmount;function $5(){for(var t;t=Jv.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Qh),t.__H.__h.forEach(bg),t.__H.__h=[]}catch(e){t.__H.__h=[],Nt.__e(e,t.__v)}}Nt.__b=function(t){Ds=null,Qv&&Qv(t)},Nt.__r=function(t){e1&&e1(t);var e=(Ds=t.__c).__H;e&&(yg===Ds?(e.__h=[],Ds.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=_g,n.__N=n.i=void 0})):(e.__h.forEach(Qh),e.__h.forEach(bg),e.__h=[])),yg=Ds},Nt.diffed=function(t){t1&&t1(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Jv.push(e)!==1&&Kv===Nt.requestAnimationFrame||((Kv=Nt.requestAnimationFrame)||j5)($5)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==_g&&(n.__=n.__V),n.i=void 0,n.__V=_g})),yg=Ds=null},Nt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Qh),n.__h=n.__h.filter(function(r){return!r.__||bg(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],Nt.__e(r,n.__v)}}),n1&&n1(t,e)},Nt.unmount=function(t){r1&&r1(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Qh(r)}catch(o){e=o}}),n.__H=void 0,e&&Nt.__e(e,n.__v))};var i1=typeof requestAnimationFrame=="function";function j5(t){var e,n=function(){clearTimeout(r),i1&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);i1&&(e=requestAnimationFrame(n))}function Qh(t){var e=Ds,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Ds=e}function bg(t){var e=Ds;t.__c=t.__(),Ds=e}function U5(t,e){for(var n in e)t[n]=e[n];return t}function s1(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function o1(t){this.props=t}(o1.prototype=new Ai).isPureReactComponent=!0,o1.prototype.shouldComponentUpdate=function(t,e){return s1(this.props,t)||s1(this.state,e)};var a1=Nt.__b;Nt.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),a1&&a1(t)};var H5=Nt.__e;Nt.__e=function(t,e,n,r){if(t.then){for(var o,d=e;d=d.__;)if((o=d.__c)&&o.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e)}H5(t,e,n,r)};var l1=Nt.unmount;function c1(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=U5({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return c1(r,e,n)})),t}function d1(t,e,n){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return d1(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function xg(){this.__u=0,this.t=null,this.__b=null}function u1(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ep(){this.u=null,this.o=null}Nt.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),l1&&l1(t)},(xg.prototype=new Ai).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=u1(r.__v),d=!1,p=function(){d||(d=!0,n.__R=null,o?o(c):c())};n.__R=p;var c=function(){if(!--r.__u){if(r.state.__a){var k=r.state.__a;r.__v.__k[0]=d1(k,k.__c.__P,k.__c.__O)}var E;for(r.setState({__a:r.__b=null});E=r.t.pop();)E.forceUpdate()}},b=e.__h===!0;r.__u++||b||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(p,p)},xg.prototype.componentWillUnmount=function(){this.t=[]},xg.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=c1(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&le(Bn,null,t.fallback);return o&&(o.__h=null),[le(Bn,null,e.__a?null:t.children),o]};var h1=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function W5(t){return this.getChildContext=function(){return t.context},t.children}function q5(t){var e=this,n=t.i;e.componentWillUnmount=function(){kd(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),e.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),e.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.i.removeChild(r)}}),kd(le(W5,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function G5(t,e){var n=le(q5,{__v:t,i:e});return n.containerInfo=e,n}(ep.prototype=new Ai).__a=function(t){var e=this,n=u1(e.__v),r=e.o.get(t);return r[0]++,function(o){var d=function(){e.props.revealOrder?(r.push(o),h1(e,t,r)):o()};n?n(d):d()}},ep.prototype.render=function(t){this.u=null,this.o=new Map;var e=Jh(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},ep.prototype.componentDidUpdate=ep.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){h1(t,n,e)})};var Z5=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Y5=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,X5=typeof document<"u",K5=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};Ai.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Ai.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var p1=Nt.event;function J5(){}function Q5(){return this.cancelBubble}function e3(){return this.defaultPrevented}Nt.event=function(t){return p1&&(t=p1(t)),t.persist=J5,t.isPropagationStopped=Q5,t.isDefaultPrevented=e3,t.nativeEvent=t};var f1={configurable:!0,get:function(){return this.class}},m1=Nt.vnode;Nt.vnode=function(t){var e=t.type,n=t.props,r=n;if(typeof e=="string"){var o=e.indexOf("-")===-1;for(var d in r={},n){var p=n[d];X5&&d==="children"&&e==="noscript"||d==="value"&&"defaultValue"in n&&p==null||(d==="defaultValue"&&"value"in n&&n.value==null?d="value":d==="download"&&p===!0?p="":/ondoubleclick/i.test(d)?d="ondblclick":/^onchange(textarea|input)/i.test(d+e)&&!K5(n.type)?d="oninput":/^onfocus$/i.test(d)?d="onfocusin":/^onblur$/i.test(d)?d="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(d)?d=d.toLowerCase():o&&Y5.test(d)?d=d.replace(/[A-Z0-9]/g,"-$&").toLowerCase():p===null&&(p=void 0),/^oninput$/i.test(d)&&(d=d.toLowerCase(),r[d]&&(d="oninputCapture")),r[d]=p)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Jh(n.children).forEach(function(c){c.props.selected=r.value.indexOf(c.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=Jh(n.children).forEach(function(c){c.props.selected=r.multiple?r.defaultValue.indexOf(c.props.value)!=-1:r.defaultValue==c.props.value})),t.props=r,n.class!=n.className&&(f1.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",f1))}t.$$typeof=Z5,m1&&m1(t)};var g1=Nt.__r;Nt.__r=function(t){g1&&g1(t),t.__c};const y1=[],vg=new Map;function tp(t){y1.push(t),vg.forEach(e=>{b1(e,t)})}function t3(t){t.isConnected&&t.getRootNode&&_1(t.getRootNode())}function _1(t){let e=vg.get(t);if(!e||!e.isConnected){if(e=t.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");const n=r3();n&&(e.nonce=n);const r=t===document?document.head:t,o=t===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(e,o)}vg.set(t,e),n3(e)}}function n3(t){for(const e of y1)b1(t,e)}function b1(t,e){const{sheet:n}=t,r=n.cssRules.length;e.split("}").forEach((o,d)=>{o=o.trim(),o&&n.insertRule(o+"}",r+d)})}let wg;function r3(){return wg===void 0&&(wg=i3()),wg}function i3(){const t=document.querySelector('meta[name="csp-nonce"]');if(t&&t.hasAttribute("content"))return t.getAttribute("content");const e=document.querySelector("script[nonce]");return e&&e.nonce||""}typeof document<"u"&&_1(document);var s3=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';tp(s3);class kg{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:n}=this;n[e]=(n[e]||0)+1,this.clearTimeout()}resume(e="",n){let{pauseDepths:r}=this;e in r&&(n?delete r[e]:(r[e]-=1,r[e]<=0&&delete r[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Eg(t){t.parentNode&&t.parentNode.removeChild(t)}function jr(t,e){if(t.closest)return t.closest(e);if(!document.documentElement.contains(t))return null;do{if(o3(t,e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}function o3(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector).call(t,e)}function a3(t,e){let n=t instanceof HTMLElement?[t]:t,r=[];for(let o=0;o<n.length;o+=1){let d=n[o].querySelectorAll(e);for(let p=0;p<d.length;p+=1)r.push(d[p])}return r}const l3=/(top|left|right|bottom|width|height)$/i;function Ed(t,e){for(let n in e)x1(t,n,e[n])}function x1(t,e,n){n==null?t.style[e]="":typeof n=="number"&&l3.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function v1(t){var e,n;return(n=(e=t.composedPath)===null||e===void 0?void 0:e.call(t)[0])!==null&&n!==void 0?n:t.target}let w1=0;function No(){return w1+=1,"fc-dom-"+w1}function np(t){t.preventDefault()}function c3(t,e){return n=>{let r=jr(n.target,t);r&&e.call(r,n,r)}}function k1(t,e,n,r){let o=c3(n,r);return t.addEventListener(e,o),()=>{t.removeEventListener(e,o)}}function d3(t,e,n,r){let o;return k1(t,"mouseover",e,(d,p)=>{if(p!==o){o=p,n(d,p);let c=b=>{o=null,r(b,p),p.removeEventListener("mouseleave",c)};p.addEventListener("mouseleave",c)}})}const E1=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function u3(t,e){let n=r=>{e(r),E1.forEach(o=>{t.removeEventListener(o,n)})};E1.forEach(r=>{t.addEventListener(r,n)})}function C1(t){return Object.assign({onClick:t},S1(t))}function S1(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let T1=0;function Ba(){return T1+=1,String(T1)}function Cg(){document.body.classList.add("fc-not-allowed")}function Sg(){document.body.classList.remove("fc-not-allowed")}function h3(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",np)}function p3(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",np)}function f3(t){t.addEventListener("contextmenu",np)}function m3(t){t.removeEventListener("contextmenu",np)}function g3(t){let e=[],n=[],r,o;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),r=0;r<n.length;r+=1)o=n[r],typeof o=="string"?e.push(o.charAt(0)==="-"?{field:o.substring(1),order:-1}:{field:o,order:1}):typeof o=="function"&&e.push({func:o});return e}function y3(t,e,n){let r,o;for(r=0;r<n.length;r+=1)if(o=_3(t,e,n[r]),o)return o;return 0}function _3(t,e,n){return n.func?n.func(t,e):b3(t[n.field],e[n.field])*(n.order||1)}function b3(t,e){return!t&&!e?0:e==null?-1:t==null?1:typeof t=="string"||typeof e=="string"?String(t).localeCompare(String(e)):t-e}function Ul(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}function Cd(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((r,o,d)=>r.replace("$"+d,o||""),t):n}function x3(t,e){return t-e}function rp(t){return t%1===0}function v3(t){let e=t.querySelector(".fc-scrollgrid-shrink-frame"),n=t.querySelector(".fc-scrollgrid-shrink-cushion");if(!e)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return t.getBoundingClientRect().width-e.getBoundingClientRect().width+n.getBoundingClientRect().width}const A1=["years","months","days","milliseconds"],w3=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function on(t,e){return typeof t=="string"?k3(t):typeof t=="object"&&t?D1(t):typeof t=="number"?D1({[e||"milliseconds"]:t}):null}function k3(t){let e=w3.exec(t);if(e){let n=e[1]?-1:1;return{years:0,months:0,days:n*(e[2]?parseInt(e[2],10):0),milliseconds:n*((e[3]?parseInt(e[3],10):0)*60*60*1e3+(e[4]?parseInt(e[4],10):0)*60*1e3+(e[5]?parseInt(e[5],10):0)*1e3+(e[6]?parseInt(e[6],10):0))}}return null}function D1(t){let e={years:t.years||t.year||0,months:t.months||t.month||0,days:t.days||t.day||0,milliseconds:(t.hours||t.hour||0)*60*60*1e3+(t.minutes||t.minute||0)*60*1e3+(t.seconds||t.second||0)*1e3+(t.milliseconds||t.millisecond||t.ms||0)},n=t.weeks||t.week;return n&&(e.days+=n*7,e.specifiedWeeks=!0),e}function E3(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function Tg(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function C3(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function S3(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function T3(t){return Hl(t)/365}function A3(t){return Hl(t)/30}function Hl(t){return hs(t)/864e5}function hs(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function Ag(t,e){let n=null;for(let r=0;r<A1.length;r+=1){let o=A1[r];if(e[o]){let d=t[o]/e[o];if(!rp(d)||n!==null&&n!==d)return null;n=d}else if(t[o])return null}return n}function Dg(t){let e=t.milliseconds;if(e){if(e%1e3!==0)return{unit:"millisecond",value:e};if(e%(1e3*60)!==0)return{unit:"second",value:e/1e3};if(e%(1e3*60*60)!==0)return{unit:"minute",value:e/(1e3*60)};if(e)return{unit:"hour",value:e/(1e3*60*60)}}return t.days?t.specifiedWeeks&&t.days%7===0?{unit:"week",value:t.days/7}:{unit:"day",value:t.days}:t.months?{unit:"month",value:t.months}:t.years?{unit:"year",value:t.years}:{unit:"millisecond",value:0}}function Bo(t,e,n){if(t===e)return!0;let r=t.length,o;if(r!==e.length)return!1;for(o=0;o<r;o+=1)if(!(n?n(t[o],e[o]):t[o]===e[o]))return!1;return!0}const D3=["sun","mon","tue","wed","thu","fri","sat"];function M1(t,e){let n=Oo(t);return n[2]+=e*7,gi(n)}function Er(t,e){let n=Oo(t);return n[2]+=e,gi(n)}function Vo(t,e){let n=Oo(t);return n[6]+=e,gi(n)}function M3(t,e){return zo(t,e)/7}function zo(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function I3(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function P3(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function R3(t,e){return(e.valueOf()-t.valueOf())/1e3}function N3(t,e){let n=Un(t),r=Un(e);return{years:0,months:0,days:Math.round(zo(n,r)),milliseconds:e.valueOf()-r.valueOf()-(t.valueOf()-n.valueOf())}}function B3(t,e){let n=ip(t,e);return n!==null&&n%7===0?n/7:null}function ip(t,e){return Lo(t)===Lo(e)?Math.round(zo(t,e)):null}function Un(t){return gi([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function V3(t){return gi([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function z3(t){return gi([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function O3(t){return gi([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function L3(t,e,n){let r=t.getUTCFullYear(),o=Mg(t,r,e,n);if(o<1)return Mg(t,r-1,e,n);let d=Mg(t,r+1,e,n);return d>=1?Math.min(o,d):o}function Mg(t,e,n,r){let o=gi([e,0,1+F3(e,n,r)]),d=Un(t),p=Math.round(zo(o,d));return Math.floor(p/7)+1}function F3(t,e,n){let r=7+e-n;return-((7+gi([t,0,r]).getUTCDay()-e)%7)+r-1}function I1(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function P1(t){return new Date(t[0],t[1]||0,t[2]==null?1:t[2],t[3]||0,t[4]||0,t[5]||0)}function Oo(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function gi(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function R1(t){return!isNaN(t.valueOf())}function Lo(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}function N1(t,e,n=!1){let r=t.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(e==null?r=r.replace("Z",""):e!==0&&(r=r.replace("Z",Ig(e,!0)))),r}function Sd(t){return t.toISOString().replace(/T.*$/,"")}function $3(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function j3(t){return Ul(t.getUTCHours(),2)+":"+Ul(t.getUTCMinutes(),2)+":"+Ul(t.getUTCSeconds(),2)}function Ig(t,e=!1){let n=t<0?"-":"+",r=Math.abs(t),o=Math.floor(r/60),d=Math.round(r%60);return e?`${n+Ul(o,2)}:${Ul(d,2)}`:`GMT${n}${o}${d?`:${Ul(d,2)}`:""}`}function Pt(t,e,n){let r,o;return function(...d){if(!r)o=t.apply(this,d);else if(!Bo(r,d)){let p=t.apply(this,d);(!e||!e(p,o))&&(o=p)}return r=d,o}}function sp(t,e,n){let r,o;return d=>(r?ps(r,d)||(o=t.call(this,d)):o=t.call(this,d),r=d,o)}const Pg={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},op={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},ap=/\s*([ap])\.?m\.?/i,U3=/,/g,H3=/\s+/g,W3=/\u200e/g,q3=/UTC|GMT/;class G3{constructor(e){let n={},r={},o=9;for(let d in e)d in Pg?(r[d]=e[d],Pg[d]<9&&(o=Math.min(Pg[d],o))):(n[d]=e[d],d in op&&(o=Math.min(op[d],o)));this.standardDateProps=n,this.extendedSettings=r,this.smallestUnitNum=o,this.buildFormattingFunc=Pt(B1)}format(e,n){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,n)(e)}formatRange(e,n,r,o){let{standardDateProps:d,extendedSettings:p}=this,c=Q3(e.marker,n.marker,r.calendarSystem);if(!c)return this.format(e,r);let b=c;b>1&&(d.year==="numeric"||d.year==="2-digit")&&(d.month==="numeric"||d.month==="2-digit")&&(d.day==="numeric"||d.day==="2-digit")&&(b=1);let k=this.format(e,r),E=this.format(n,r);if(k===E)return k;let C=ez(d,b),T=B1(C,p,r),I=T(e),N=T(n),$=tz(k,I,E,N),F=p.separator||o||r.defaultSeparator||"";return $?$.before+I+F+N+$.after:k+F+E}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function B1(t,e,n){let r=Object.keys(t).length;return r===1&&t.timeZoneName==="short"?o=>Ig(o.timeZoneOffset):r===0&&e.week?o=>J3(n.computeWeekNumber(o.marker),n.weekText,n.weekTextLong,n.locale,e.week):Z3(t,e,n)}function Z3(t,e,n){t=Object.assign({},t),e=Object.assign({},e),Y3(t,e),t.timeZone="UTC";let r=new Intl.DateTimeFormat(n.locale.codes,t),o;if(e.omitZeroMinute){let d=Object.assign({},t);delete d.minute,o=new Intl.DateTimeFormat(n.locale.codes,d)}return d=>{let{marker:p}=d,c;o&&!p.getUTCMinutes()?c=o:c=r;let b=c.format(p);return X3(b,d,t,e,n)}}function Y3(t,e){t.timeZoneName&&(t.hour||(t.hour="2-digit"),t.minute||(t.minute="2-digit")),t.timeZoneName==="long"&&(t.timeZoneName="short"),e.omitZeroMinute&&(t.second||t.millisecond)&&delete e.omitZeroMinute}function X3(t,e,n,r,o){return t=t.replace(W3,""),n.timeZoneName==="short"&&(t=K3(t,o.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":Ig(e.timeZoneOffset))),r.omitCommas&&(t=t.replace(U3,"").trim()),r.omitZeroMinute&&(t=t.replace(":00","")),r.meridiem===!1?t=t.replace(ap,"").trim():r.meridiem==="narrow"?t=t.replace(ap,(d,p)=>p.toLocaleLowerCase()):r.meridiem==="short"?t=t.replace(ap,(d,p)=>`${p.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(t=t.replace(ap,d=>d.toLocaleLowerCase())),t=t.replace(H3," "),t=t.trim(),t}function K3(t,e){let n=!1;return t=t.replace(q3,()=>(n=!0,e)),n||(t+=` ${e}`),t}function J3(t,e,n,r,o){let d=[];return o==="long"?d.push(n):(o==="short"||o==="narrow")&&d.push(e),(o==="long"||o==="short")&&d.push(" "),d.push(r.simpleNumberFormat.format(t)),r.options.direction==="rtl"&&d.reverse(),d.join("")}function Q3(t,e,n){return n.getMarkerYear(t)!==n.getMarkerYear(e)?5:n.getMarkerMonth(t)!==n.getMarkerMonth(e)?4:n.getMarkerDay(t)!==n.getMarkerDay(e)?2:Lo(t)!==Lo(e)?1:0}function ez(t,e){let n={};for(let r in t)(!(r in op)||op[r]<=e)&&(n[r]=t[r]);return n}function tz(t,e,n,r){let o=0;for(;o<t.length;){let d=t.indexOf(e,o);if(d===-1)break;let p=t.substr(0,d);o=d+e.length;let c=t.substr(o),b=0;for(;b<n.length;){let k=n.indexOf(r,b);if(k===-1)break;let E=n.substr(0,k);b=k+r.length;let C=n.substr(b);if(p===E&&c===C)return{before:p,after:c}}}return null}function V1(t,e){let n=e.markerToArray(t.marker);return{marker:t.marker,timeZoneOffset:t.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function lp(t,e,n,r){let o=V1(t,n.calendarSystem),d=e?V1(e,n.calendarSystem):null;return{date:o,start:o,end:d,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class nz{constructor(e){this.cmdStr=e}format(e,n,r){return n.cmdFormatter(this.cmdStr,lp(e,null,n,r))}formatRange(e,n,r,o){return r.cmdFormatter(this.cmdStr,lp(e,n,r,o))}}class rz{constructor(e){this.func=e}format(e,n,r){return this.func(lp(e,null,n,r))}formatRange(e,n,r,o){return this.func(lp(e,n,r,o))}}function Yn(t){return typeof t=="object"&&t?new G3(t):typeof t=="string"?new nz(t):typeof t=="function"?new rz(t):null}const z1={navLinkDayClick:De,navLinkWeekClick:De,duration:on,bootstrapFontAwesome:De,buttonIcons:De,customButtons:De,defaultAllDayEventDuration:on,defaultTimedEventDuration:on,nextDayThreshold:on,scrollTime:on,scrollTimeReset:Boolean,slotMinTime:on,slotMaxTime:on,dayPopoverFormat:Yn,slotDuration:on,snapDuration:on,headerToolbar:De,footerToolbar:De,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Yn,dayHeaderClassNames:De,dayHeaderContent:De,dayHeaderDidMount:De,dayHeaderWillUnmount:De,dayCellClassNames:De,dayCellContent:De,dayCellDidMount:De,dayCellWillUnmount:De,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:De,weekNumbers:Boolean,weekNumberClassNames:De,weekNumberContent:De,weekNumberDidMount:De,weekNumberWillUnmount:De,editable:Boolean,viewClassNames:De,viewDidMount:De,viewWillUnmount:De,nowIndicator:Boolean,nowIndicatorClassNames:De,nowIndicatorContent:De,nowIndicatorDidMount:De,nowIndicatorWillUnmount:De,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:De,locale:De,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:De,eventOrder:g3,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:De,contentHeight:De,direction:String,weekNumberFormat:Yn,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:De,initialDate:De,now:De,eventDataTransform:De,stickyHeaderDates:De,stickyFooterScrollbar:De,viewHeight:De,defaultAllDay:Boolean,eventSourceFailure:De,eventSourceSuccess:De,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:De,eventConstraint:De,eventAllow:De,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:De,eventContent:De,eventDidMount:De,eventWillUnmount:De,selectConstraint:De,selectOverlap:De,selectAllow:De,droppable:Boolean,unselectCancel:String,slotLabelFormat:De,slotLaneClassNames:De,slotLaneContent:De,slotLaneDidMount:De,slotLaneWillUnmount:De,slotLabelClassNames:De,slotLabelContent:De,slotLabelDidMount:De,slotLabelWillUnmount:De,dayMaxEvents:De,dayMaxEventRows:De,dayMinWidth:Number,slotLabelInterval:on,allDayText:String,allDayClassNames:De,allDayContent:De,allDayDidMount:De,allDayWillUnmount:De,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Yn,rerenderDelay:Number,moreLinkText:De,moreLinkHint:De,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:De,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:on,hiddenDays:De,fixedWeekCount:Boolean,validRange:De,visibleRange:De,titleFormat:De,eventInteractive:Boolean,noEventsText:String,viewHint:De,navLinkHint:De,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:De,moreLinkClassNames:De,moreLinkContent:De,moreLinkDidMount:De,moreLinkWillUnmount:De,monthStartFormat:Yn,handleCustomRendering:De,customRenderingMetaMap:De,customRenderingReplaces:Boolean},Td={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},O1={datesSet:De,eventsSet:De,eventAdd:De,eventChange:De,eventRemove:De,windowResize:De,eventClick:De,eventMouseEnter:De,eventMouseLeave:De,select:De,unselect:De,loading:De,_unmount:De,_beforeprint:De,_afterprint:De,_noEventDrop:De,_noEventResize:De,_resize:De,_scrollRequest:De},L1={buttonText:De,buttonHints:De,views:De,plugins:De,initialEvents:De,events:De,eventSources:De},Va={headerToolbar:za,footerToolbar:za,buttonText:za,buttonHints:za,buttonIcons:za,dateIncrement:za,plugins:cp,events:cp,eventSources:cp,resources:cp};function za(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?ps(t,e):t===e}function cp(t,e){return Array.isArray(t)&&Array.isArray(e)?Bo(t,e):t===e}const iz={type:String,component:De,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:De,usesMinMaxTime:Boolean,classNames:De,content:De,didMount:De,willUnmount:De};function Rg(t){return Bg(t,Va)}function Ng(t,e){let n={},r={};for(let o in e)o in t&&(n[o]=e[o](t[o]));for(let o in t)o in e||(r[o]=t[o]);return{refined:n,extra:r}}function De(t){return t}const{hasOwnProperty:dp}=Object.prototype;function Bg(t,e){let n={};if(e){for(let r in e)if(e[r]===za){let o=[];for(let d=t.length-1;d>=0;d-=1){let p=t[d][r];if(typeof p=="object"&&p)o.unshift(p);else if(p!==void 0){n[r]=p;break}}o.length&&(n[r]=Bg(o))}}for(let r=t.length-1;r>=0;r-=1){let o=t[r];for(let d in o)d in n||(n[d]=o[d])}return n}function Oa(t,e){let n={};for(let r in t)e(t[r],r)&&(n[r]=t[r]);return n}function ro(t,e){let n={};for(let r in t)n[r]=e(t[r],r);return n}function F1(t){let e={};for(let n of t)e[n]=!0;return e}function Vg(t){let e=[];for(let n in t)e.push(t[n]);return e}function ps(t,e){if(t===e)return!0;for(let n in t)if(dp.call(t,n)&&!(n in e))return!1;for(let n in e)if(dp.call(e,n)&&t[n]!==e[n])return!1;return!0}const sz=/^on[A-Z]/;function oz(t,e){const n=az(t,e);for(let r of n)if(!sz.test(r))return!1;return!0}function az(t,e){let n=[];for(let r in t)dp.call(t,r)&&(r in e||n.push(r));for(let r in e)dp.call(e,r)&&t[r]!==e[r]&&n.push(r);return n}function zg(t,e,n={}){if(t===e)return!0;for(let r in e)if(!(r in t&&lz(t[r],e[r],n[r])))return!1;for(let r in t)if(!(r in e))return!1;return!0}function lz(t,e,n){return t===e||n===!0?!0:n?n(t,e):!1}function cz(t,e=0,n,r=1){let o=[];n==null&&(n=Object.keys(t).length);for(let d=e;d<n;d+=r){let p=t[d];p!==void 0&&o.push(p)}return o}let $1={};function dz(t,e){$1[t]=e}function uz(t){return new $1[t]}class hz{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return gi(e)}markerToArray(e){return Oo(e)}}dz("gregory",hz);const pz=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function fz(t){let e=pz.exec(t);if(e){let n=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?+`0.${e[12]}`*1e3:0));if(R1(n)){let r=null;return e[13]&&(r=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:r}}}return null}class mz{constructor(e){let n=this.timeZone=e.timeZone,r=n!=="local"&&n!=="UTC";e.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(n)),this.canComputeOffset=!!(!r||this.namedTimeZoneImpl),this.calendarSystem=uz(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay=="number"&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation=="function"&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText!=null?e.weekText:e.locale.options.weekText,this.weekTextLong=(e.weekTextLong!=null?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let n=this.createMarkerMeta(e);return n===null?null:n.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):gi(I1(new Date))}createMarkerMeta(e){if(typeof e=="string")return this.parse(e);let n=null;return typeof e=="number"?n=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(n=this.timestampToMarker(e))):Array.isArray(e)&&(n=gi(e)),n===null||!R1(n)?null:{marker:n,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let n=fz(e);if(n===null)return null;let{marker:r}=n,o=null;return n.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-n.timeZoneOffset*60*1e3):o=n.timeZoneOffset),{marker:r,isTimeUnspecified:n.isTimeUnspecified,forcedTzo:o}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n.years,r[1]+=n.months,r[2]+=n.days,r[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]-=n.years,r[1]-=n.months,r[2]-=n.days,r[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n,this.calendarSystem.arrayToMarker(r)}addMonths(e,n){let r=this.calendarSystem.markerToArray(e);return r[1]+=n,this.calendarSystem.arrayToMarker(r)}diffWholeYears(e,n){let{calendarSystem:r}=this;return Lo(e)===Lo(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)&&r.getMarkerMonth(e)===r.getMarkerMonth(n)?r.getMarkerYear(n)-r.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:r}=this;return Lo(e)===Lo(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)?r.getMarkerMonth(n)-r.getMarkerMonth(e)+(r.getMarkerYear(n)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let r=this.diffWholeYears(e,n);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,n),r!==null?{unit:"month",value:r}:(r=B3(e,n),r!==null?{unit:"week",value:r}:(r=ip(e,n),r!==null?{unit:"day",value:r}:(r=I3(e,n),rp(r)?{unit:"hour",value:r}:(r=P3(e,n),rp(r)?{unit:"minute",value:r}:(r=R3(e,n),rp(r)?{unit:"second",value:r}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,r){let o;return r.years&&(o=this.diffWholeYears(e,n),o!==null)?o/T3(r):r.months&&(o=this.diffWholeMonths(e,n),o!==null)?o/A3(r):r.days&&(o=ip(e,n),o!==null)?o/Hl(r):(n.valueOf()-e.valueOf())/hs(r)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?Un(e):n==="hour"?V3(e):n==="minute"?z3(e):n==="second"?O3(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):L3(e,this.weekDow,this.weekDoy)}format(e,n,r={}){return n.format({marker:e,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,n,r,o={}){return o.isEndExclusive&&(n=Vo(n,-1)),r.formatRange({marker:e,timeZoneOffset:o.forcedStartTzo!=null?o.forcedStartTzo:this.offsetForMarker(e)},{marker:n,timeZoneOffset:o.forcedEndTzo!=null?o.forcedEndTzo:this.offsetForMarker(n)},this,o.defaultSeparator)}formatIso(e,n={}){let r=null;return n.omitTimeZoneOffset||(n.forcedTzo!=null?r=n.forcedTzo:r=this.offsetForMarker(e)),N1(e,r,n.omitTime)}timestampToMarker(e){return this.timeZone==="local"?gi(I1(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):gi(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-P1(Oo(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Oo(e)):null}toDate(e,n){return this.timeZone==="local"?P1(Oo(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Oo(e))*1e3*60):new Date(e.valueOf()-(n||0))}}class Ad{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let n,r;if(typeof e=="object"&&e){n=Object.assign({},this.iconClasses);for(r in e)n[r]=this.applyIconOverridePrefix(e[r]);this.iconClasses=n}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let n=this.iconOverridePrefix;return n&&e.indexOf(n)!==0&&(e=n+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,n){let r;return n&&this.rtlIconClasses?r=this.rtlIconClasses[e]||this.iconClasses[e]:r=this.iconClasses[e],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(e){let n;return this.iconOverrideCustomButtonOption&&(n=e[this.iconOverrideCustomButtonOption],n)?`${this.baseIconClass} ${this.applyIconOverridePrefix(n)}`:""}}Ad.prototype.classes={},Ad.prototype.iconClasses={},Ad.prototype.baseIconClass="",Ad.prototype.iconOverridePrefix="";function up(t){t();let e=Nt.debounceRendering,n=[];function r(o){n.push(o)}for(Nt.debounceRendering=r,kd(le(gz,{}),document.createElement("div"));n.length;)n.shift()();Nt.debounceRendering=e}class gz extends Ai{render(){return le("div",{})}componentDidMount(){this.setState({})}}function j1(t){let e=F5(t),n=e.Provider;return e.Provider=function(){let r=!this.getChildContext,o=n.apply(this,arguments);if(r){let d=[];this.shouldComponentUpdate=p=>{this.props.value!==p.value&&d.forEach(c=>{c.context=p.value,c.forceUpdate()})},this.sub=p=>{d.push(p);let c=p.componentWillUnmount;p.componentWillUnmount=()=>{d.splice(d.indexOf(p),1),c&&c.call(p)}}}return o},e}class yz{constructor(e,n,r,o){this.execFunc=e,this.emitter=n,this.scrollTime=r,this.scrollTimeReset=o,this.handleScrollRequest=d=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},d),this.drain()},n.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const io=j1({});function _z(t,e,n,r,o,d,p,c,b,k,E,C,T,I){return{dateEnv:o,nowManager:d,options:n,pluginHooks:c,emitter:E,dispatch:b,getCurrentData:k,calendarApi:C,viewSpec:t,viewApi:e,dateProfileGenerator:r,theme:p,isRtl:n.direction==="rtl",addResizeHandler(N){E.on("_resize",N)},removeResizeHandler(N){E.off("_resize",N)},createScrollResponder(N){return new yz(N,E,on(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:T,unregisterInteractiveComponent:I}}class La extends Ai{shouldComponentUpdate(e,n){return!zg(this.props,e,this.propEquality)||!zg(this.state,n,this.stateEquality)}safeSetState(e){zg(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}La.addPropsEquality=bz,La.addStateEquality=xz,La.contextType=io,La.prototype.propEquality={},La.prototype.stateEquality={};class bn extends La{}bn.contextType=io;function bz(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function xz(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function Ms(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class Og extends bn{constructor(){super(...arguments),this.id=Ba(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:n}=this.context,{generatorName:r}=this.props;(!n.customRenderingReplaces||!Lg(r,n))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Ms(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:r}=n,{customGenerator:o,defaultGenerator:d,renderProps:p}=e,c=U1(e,[],this.handleEl);let b=!1,k,E=[],C;if(o!=null){const T=typeof o=="function"?o(p,le):o;if(T===!0)b=!0;else{const I=T&&typeof T=="object";I&&"html"in T?c.dangerouslySetInnerHTML={__html:T.html}:I&&"domNodes"in T?E=Array.prototype.slice.call(T.domNodes):(I?Nv(T):typeof T!="function")?k=T:C=T}}else b=!Lg(e.generatorName,r);return b&&d&&(k=d(p)),this.queuedDomNodes=E,this.currentGeneratorMeta=C,le(e.elTag,c,k)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var n;const{props:r,context:o}=this,{handleCustomRendering:d,customRenderingMetaMap:p}=o.options;if(d){const c=(n=this.currentGeneratorMeta)!==null&&n!==void 0?n:p==null?void 0:p[r.generatorName];c&&d(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:c},r),{elClasses:(r.elClasses||[]).filter(vz)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,r=this.base;if(!Bo(e,n)){n.forEach(Eg);for(let o of e)r.appendChild(o);this.currentDomNodes=e}}}Og.addPropsEquality({elClasses:Bo,elStyle:ps,elAttrs:oz,renderProps:ps});function Lg(t,e){var n;return!!(e.handleCustomRendering&&t&&(!((n=e.customRenderingMetaMap)===null||n===void 0)&&n[t]))}function U1(t,e,n){const r=Object.assign(Object.assign({},t.elAttrs),{ref:n});return(t.elClasses||e)&&(r.className=(t.elClasses||[]).concat(e||[]).concat(r.className||[]).filter(Boolean).join(" ")),t.elStyle&&(r.style=t.elStyle),r}function vz(t){return!!t}const H1=j1(0);class Ur extends Ai{constructor(){super(...arguments),this.InnerContent=wz.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Ms(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=kz(e.classNameGenerator,e.renderProps);if(e.children){const r=U1(e,n,this.handleEl),o=e.children(this.InnerContent,e.renderProps,r);return e.elTag?le(e.elTag,r,o):o}else return le(Og,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(n),renderId:this.context}))}componentDidMount(){var e,n;this.el?(n=(e=this.props).didMount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,n;(n=(e=this.props).willUnmount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}Ur.contextType=H1;function wz(t,e){const n=t.props;return le(Og,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context},e))}function kz(t,e){const n=typeof t=="function"?t(e):t||[];return typeof n=="string"?[n]:n}class Dd extends bn{render(){let{props:e,context:n}=this,{options:r}=n,o={view:n.viewApi};return le(Ur,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:[...W1(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount},()=>e.children)}}function W1(t){return[`fc-${t.type}-view`,"fc-view"]}function Ez(t,e){let n=null,r=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(r=e.createMarker(t.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function q1(t,e){let n=[],{start:r}=e,o,d;for(t.sort(Cz),o=0;o<t.length;o+=1)d=t[o],d.start>r&&n.push({start:r,end:d.start}),d.end>r&&(r=d.end);return r<e.end&&n.push({start:r,end:e.end}),n}function Cz(t,e){return t.start.valueOf()-e.start.valueOf()}function Fo(t,e){let{start:n,end:r}=t,o=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(r===null?r=e.end:r=new Date(Math.min(r.valueOf(),e.end.valueOf()))),(n===null||r===null||n<r)&&(o={start:n,end:r}),o}function Sz(t,e){return(t.start===null?null:t.start.valueOf())===(e.start===null?null:e.start.valueOf())&&(t.end===null?null:t.end.valueOf())===(e.end===null?null:e.end.valueOf())}function Fg(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function hp(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function so(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function Tz(t,e){return e.start!=null&&t<e.start?e.start:e.end!=null&&t>=e.end?new Date(e.end.valueOf()-1):t}function G1(t){let e=Math.floor(zo(t.start,t.end))||1,n=Un(t.start),r=Er(n,e);return{start:n,end:r}}function $g(t,e=on(0)){let n=null,r=null;if(t.end){r=Un(t.end);let o=t.end.valueOf()-r.valueOf();o&&o>=hs(e)&&(r=Er(r,1))}return t.start&&(n=Un(t.start),r&&r<=n&&(r=Er(n,1))),{start:n,end:r}}function Az(t){let e=$g(t);return zo(e.start,e.end)>1}function Wl(t,e,n,r){return r==="year"?on(n.diffWholeYears(t,e),"year"):r==="month"?on(n.diffWholeMonths(t,e),"month"):N3(t,e)}class Z1{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,n,r){let{dateEnv:o}=this.props,d=o.subtract(o.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(d,-1,r)}buildNext(e,n,r){let{dateEnv:o}=this.props,d=o.add(o.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(d,1,r)}build(e,n,r=!0){let{props:o}=this,d,p,c,b,k,E;return d=this.buildValidRange(),d=this.trimHiddenDays(d),r&&(e=Tz(e,d)),p=this.buildCurrentRangeInfo(e,n),c=/^(year|month|week|day)$/.test(p.unit),b=this.buildRenderRange(this.trimHiddenDays(p.range),p.unit,c),b=this.trimHiddenDays(b),k=b,o.showNonCurrentDates||(k=Fo(k,p.range)),k=this.adjustActiveRange(k),k=Fo(k,d),E=Fg(p.range,d),so(b,e)||(e=b.start),{currentDate:e,validRange:d,currentRange:p.range,currentRangeUnit:p.unit,isRangeAllDay:c,activeRange:k,renderRange:b,slotMinTime:o.slotMinTime,slotMaxTime:o.slotMaxTime,isValid:E,dateIncrement:this.buildDateIncrement(p.duration)}}buildValidRange(){let e=this.props.validRangeInput,n=typeof e=="function"?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(n)||{start:null,end:null}}buildCurrentRangeInfo(e,n){let{props:r}=this,o=null,d=null,p=null,c;return r.duration?(o=r.duration,d=r.durationUnit,p=this.buildRangeFromDuration(e,n,o,d)):(c=this.props.dayCount)?(d="day",p=this.buildRangeFromDayCount(e,n,c)):(p=this.buildCustomVisibleRange(e))?d=r.dateEnv.greatestWholeUnit(p.start,p.end).unit:(o=this.getFallbackDuration(),d=Dg(o).unit,p=this.buildRangeFromDuration(e,n,o,d)),{duration:o,unit:d,range:p}}getFallbackDuration(){return on({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:r,slotMinTime:o,slotMaxTime:d}=this.props,{start:p,end:c}=e;return r&&(Hl(o)<0&&(p=Un(p),p=n.add(p,o)),Hl(d)>1&&(c=Un(c),c=Er(c,-1),c=n.add(c,d))),{start:p,end:c}}buildRangeFromDuration(e,n,r,o){let{dateEnv:d,dateAlignment:p}=this.props,c,b,k;if(!p){let{dateIncrement:C}=this.props;C&&hs(C)<hs(r)?p=Dg(C).unit:p=o}Hl(r)<=1&&this.isHiddenDay(c)&&(c=this.skipHiddenDays(c,n),c=Un(c));function E(){c=d.startOf(e,p),b=d.add(c,r),k={start:c,end:b}}return E(),this.trimHiddenDays(k)||(e=this.skipHiddenDays(e,n),E()),k}buildRangeFromDayCount(e,n,r){let{dateEnv:o,dateAlignment:d}=this.props,p=0,c=e,b;d&&(c=o.startOf(c,d)),c=Un(c),c=this.skipHiddenDays(c,n),b=c;do b=Er(b,1),this.isHiddenDay(b)||(p+=1);while(p<r);return{start:c,end:b}}buildCustomVisibleRange(e){let{props:n}=this,r=n.visibleRangeInput,o=typeof r=="function"?r.call(n.calendarApi,n.dateEnv.toDate(e)):r,d=this.refineRange(o);return d&&(d.start==null||d.end==null)?null:d}buildRenderRange(e,n,r){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,r;return n||((r=this.props.dateAlignment)?on(1,r):e||on({days:1}))}refineRange(e){if(e){let n=Ez(e,this.props.dateEnv);return n&&(n=$g(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],r=0,o;for(this.props.weekends===!1&&e.push(0,6),o=0;o<7;o+=1)(n[o]=e.indexOf(o)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:r}=e;return n&&(n=this.skipHiddenDays(n)),r&&(r=this.skipHiddenDays(r,-1,!0)),n==null||r==null||n<r?{start:n,end:r}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,r=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(r?n:0)+7)%7];)e=Er(e,n);return e}}function jg(t,e,n,r){return{instanceId:Ba(),defId:t,range:e,forcedStartTzo:n??null,forcedEndTzo:r??null}}function Dz(t,e,n,r){for(let o=0;o<r.length;o+=1){let d=r[o].parse(t,n);if(d){let{allDay:p}=t;return p==null&&(p=e,p==null&&(p=d.allDayGuess,p==null&&(p=!1))),{allDay:p,duration:d.duration,typeData:d.typeData,typeId:o}}}return null}function Fa(t,e,n){let{dateEnv:r,pluginHooks:o,options:d}=n,{defs:p,instances:c}=t;c=Oa(c,b=>!p[b.defId].recurringDef);for(let b in p){let k=p[b];if(k.recurringDef){let{duration:E}=k.recurringDef;E||(E=k.allDay?d.defaultAllDayEventDuration:d.defaultTimedEventDuration);let C=Mz(k,E,e,r,o.recurringTypes);for(let T of C){let I=jg(b,{start:T,end:r.add(T,E)});c[I.instanceId]=I}}}return{defs:p,instances:c}}function Mz(t,e,n,r,o){let p=o[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:r.subtract(n.start,e),end:n.end},r);return t.allDay&&(p=p.map(Un)),p}const pp={id:String,groupId:String,title:String,url:String,interactive:Boolean},Y1={start:De,end:De,date:De,allDay:Boolean},Iz=Object.assign(Object.assign(Object.assign({},pp),Y1),{extendedProps:De});function X1(t,e,n,r,o=Ug(n),d,p){let{refined:c,extra:b}=K1(t,n,o),k=Rz(e,n),E=Dz(c,k,n.dateEnv,n.pluginHooks.recurringTypes);if(E){let T=Hg(c,b,e?e.sourceId:"",E.allDay,!!E.duration,n,d);return T.recurringDef={typeId:E.typeId,typeData:E.typeData,duration:E.duration},{def:T,instance:null}}let C=Pz(c,k,n,r);if(C){let T=Hg(c,b,e?e.sourceId:"",C.allDay,C.hasEnd,n,d),I=jg(T.defId,C.range,C.forcedStartTzo,C.forcedEndTzo);return p&&T.publicId&&p[T.publicId]&&(I.instanceId=p[T.publicId]),{def:T,instance:I}}return null}function K1(t,e,n=Ug(e)){return Ng(t,n)}function Ug(t){return Object.assign(Object.assign(Object.assign({},mp),Iz),t.pluginHooks.eventRefiners)}function Hg(t,e,n,r,o,d,p){let c={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(p&&t.id?p[t.id]:"")||Ba(),sourceId:n,allDay:r,hasEnd:o,interactive:t.interactive,ui:gp(t,d),extendedProps:Object.assign(Object.assign({},t.extendedProps||{}),e)};for(let b of d.pluginHooks.eventDefMemberAdders)Object.assign(c,b(t));return Object.freeze(c.ui.classNames),Object.freeze(c.extendedProps),c}function Pz(t,e,n,r){let{allDay:o}=t,d,p=null,c=!1,b,k=null,E=t.start!=null?t.start:t.date;if(d=n.dateEnv.createMarkerMeta(E),d)p=d.marker;else if(!r)return null;return t.end!=null&&(b=n.dateEnv.createMarkerMeta(t.end)),o==null&&(e!=null?o=e:o=(!d||d.isTimeUnspecified)&&(!b||b.isTimeUnspecified)),o&&p&&(p=Un(p)),b&&(k=b.marker,o&&(k=Un(k)),p&&k<=p&&(k=null)),k?c=!0:r||(c=n.options.forceEventDuration||!1,k=n.dateEnv.add(p,o?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:o,hasEnd:c,range:{start:p,end:k},forcedStartTzo:d?d.forcedTzo:null,forcedEndTzo:b?b.forcedTzo:null}}function Rz(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}function Md(t,e,n,r,o,d){let p=Di(),c=Ug(n);for(let b of t){let k=X1(b,e,n,r,c,o,d);k&&Wg(k,p)}return p}function Wg(t,e=Di()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function qg(t,e){let n=t.instances[e];if(n){let r=t.defs[n.defId],o=fp(t,d=>Nz(r,d));return o.defs[r.defId]=r,o.instances[n.instanceId]=n,o}return Di()}function Nz(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function Di(){return{defs:{},instances:{}}}function Gg(t,e){return{defs:Object.assign(Object.assign({},t.defs),e.defs),instances:Object.assign(Object.assign({},t.instances),e.instances)}}function fp(t,e){let n=Oa(t.defs,e),r=Oa(t.instances,o=>n[o.defId]);return{defs:n,instances:r}}function Bz(t,e){let{defs:n,instances:r}=t,o={},d={};for(let p in n)e.defs[p]||(o[p]=n[p]);for(let p in r)!e.instances[p]&&o[r[p].defId]&&(d[p]=r[p]);return{defs:o,instances:d}}function Vz(t,e){return Array.isArray(t)?Md(t,null,e,!0):typeof t=="object"&&t?Md([t],null,e,!0):t!=null?String(t):null}function J1(t){return Array.isArray(t)?t:typeof t=="string"?t.split(/\s+/):[]}const mp={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:De,overlap:De,allow:De,className:J1,classNames:J1,color:String,backgroundColor:String,borderColor:String,textColor:String},zz={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function gp(t,e){let n=Vz(t.constraint,e);return{display:t.display||null,startEditable:t.startEditable!=null?t.startEditable:t.editable,durationEditable:t.durationEditable!=null?t.durationEditable:t.editable,constraints:n!=null?[n]:[],overlap:t.overlap!=null?t.overlap:null,allows:t.allow!=null?[t.allow]:[],backgroundColor:t.backgroundColor||t.color||"",borderColor:t.borderColor||t.color||"",textColor:t.textColor||"",classNames:(t.className||[]).concat(t.classNames||[])}}function Q1(t){return t.reduce(Oz,zz)}function Oz(t,e){return{display:e.display!=null?e.display:t.display,startEditable:e.startEditable!=null?e.startEditable:t.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:t.durationEditable,constraints:t.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:t.overlap,allows:t.allows.concat(e.allows),backgroundColor:e.backgroundColor||t.backgroundColor,borderColor:e.borderColor||t.borderColor,textColor:e.textColor||t.textColor,classNames:t.classNames.concat(e.classNames)}}const Lz={id:String,defaultAllDay:Boolean,url:String,format:String,events:De,eventDataTransform:De,success:De,failure:De};function ew(t,e,n=tw(e)){let r;if(typeof t=="string"?r={url:t}:typeof t=="function"||Array.isArray(t)?r={events:t}:typeof t=="object"&&t&&(r=t),r){let{refined:o,extra:d}=Ng(r,n),p=Fz(o,e);if(p)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:Ba(),sourceDefId:p.sourceDefId,meta:p.meta,ui:gp(o,e),extendedProps:d}}return null}function tw(t){return Object.assign(Object.assign(Object.assign({},mp),Lz),t.pluginHooks.eventSourceRefiners)}function Fz(t,e){let n=e.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let d=n[r].parseMeta(t);if(d)return{sourceDefId:r,meta:d}}return null}function $z(t,e,n,r,o){switch(e.type){case"RECEIVE_EVENTS":return jz(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,o);case"RESET_RAW_EVENTS":return Uz(t,n[e.sourceId],e.rawEvents,r.activeRange,o);case"ADD_EVENTS":return Hz(t,e.eventStore,r?r.activeRange:null,o);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return Gg(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Fa(t,r.activeRange,o):t;case"REMOVE_EVENTS":return Bz(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return sw(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return fp(t,d=>!d.sourceId);case"REMOVE_ALL_EVENTS":return Di();default:return t}}function jz(t,e,n,r,o,d){if(e&&n===e.latestFetchId){let p=Md(nw(o,e,d),e,d);return r&&(p=Fa(p,r,d)),Gg(sw(t,e.sourceId),p)}return t}function Uz(t,e,n,r,o){const{defIdMap:d,instanceIdMap:p}=qz(t);let c=Md(nw(n,e,o),e,o,!1,d,p);return Fa(c,r,o)}function nw(t,e,n){let r=n.options.eventDataTransform,o=e?e.eventDataTransform:null;return o&&(t=rw(t,o)),r&&(t=rw(t,r)),t}function rw(t,e){let n;if(!e)n=t;else{n=[];for(let r of t){let o=e(r);o?n.push(o):o==null&&n.push(r)}}return n}function Hz(t,e,n,r){return n&&(e=Fa(e,n,r)),Gg(t,e)}function iw(t,e,n){let{defs:r}=t,o=ro(t.instances,d=>r[d.defId].allDay?d:Object.assign(Object.assign({},d),{range:{start:n.createMarker(e.toDate(d.range.start,d.forcedStartTzo)),end:n.createMarker(e.toDate(d.range.end,d.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:d.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:d.forcedEndTzo}));return{defs:r,instances:o}}function sw(t,e){return fp(t,n=>n.sourceId!==e)}function Wz(t,e){return{defs:t.defs,instances:Oa(t.instances,n=>!e[n.instanceId])}}function qz(t){const{defs:e,instances:n}=t,r={},o={};for(let d in e){const p=e[d],{publicId:c}=p;c&&(r[c]=d)}for(let d in n){const p=n[d],c=e[p.defId],{publicId:b}=c;b&&(o[b]=d)}return{defIdMap:r,instanceIdMap:o}}class yp{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){Gz(this.handlers,e,n)}off(e,n){Zz(this.handlers,e,n)}trigger(e,...n){let r=this.handlers[e]||[],o=this.options&&this.options[e],d=[].concat(o||[],r);for(let p of d)p.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function Gz(t,e,n){(t[e]||(t[e]=[])).push(n)}function Zz(t,e,n){n?t[e]&&(t[e]=t[e].filter(r=>r!==n)):delete t[e]}const Yz={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Xz(t,e){return Md(Kz(t),null,e)}function Kz(t){let e;return t===!0?e=[{}]:Array.isArray(t)?e=t.filter(n=>n.daysOfWeek):typeof t=="object"&&t?e=[t]:e=[],e=e.map(n=>Object.assign(Object.assign({},Yz),n)),e}function ow(t,e,n){n.emitter.trigger("select",Object.assign(Object.assign({},Zg(t,n)),{jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Jz(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function Zg(t,e){let n={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(n,r(t,e));return Object.assign(n,hO(t,e.dateEnv)),n}function aw(t,e,n){let{dateEnv:r,options:o}=n,d=e;return t?(d=Un(d),d=r.add(d,o.defaultAllDayEventDuration)):d=r.add(d,o.defaultTimedEventDuration),d}function Yg(t,e,n,r){let o=_p(t.defs,e),d=Di();for(let p in t.defs){let c=t.defs[p];d.defs[p]=Qz(c,o[p],n,r)}for(let p in t.instances){let c=t.instances[p],b=d.defs[c.defId];d.instances[p]=eO(c,b,o[c.defId],n,r)}return d}function Qz(t,e,n,r){let o=n.standardProps||{};o.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);let d=Object.assign(Object.assign(Object.assign({},t),o),{ui:Object.assign(Object.assign({},t.ui),o.ui)});n.extendedProps&&(d.extendedProps=Object.assign(Object.assign({},d.extendedProps),n.extendedProps));for(let p of r.pluginHooks.eventDefMutationAppliers)p(d,n,r);return!d.hasEnd&&r.options.forceEventDuration&&(d.hasEnd=!0),d}function eO(t,e,n,r,o){let{dateEnv:d}=o,p=r.standardProps&&r.standardProps.allDay===!0,c=r.standardProps&&r.standardProps.hasEnd===!1,b=Object.assign({},t);return p&&(b.range=G1(b.range)),r.datesDelta&&n.startEditable&&(b.range={start:d.add(b.range.start,r.datesDelta),end:d.add(b.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(b.range={start:d.add(b.range.start,r.startDelta),end:b.range.end}),r.endDelta&&n.durationEditable&&(b.range={start:b.range.start,end:d.add(b.range.end,r.endDelta)}),c&&(b.range={start:b.range.start,end:aw(e.allDay,b.range.start,o)}),e.allDay&&(b.range={start:Un(b.range.start),end:Un(b.range.end)}),b.range.end<b.range.start&&(b.range.end=aw(e.allDay,b.range.start,o)),b}class ql{constructor(e,n){this.context=e,this.internalEventSource=n}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class Qn{constructor(e,n,r){this._context=e,this._def=n,this._instance=r||null}setProp(e,n){if(e in Y1)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")n=pp[e](n),this.mutate({standardProps:{publicId:n}});else if(e in pp)n=pp[e](n),this.mutate({standardProps:{[e]:n}});else if(e in mp){let r=mp[e](n);e==="color"?r={backgroundColor:n,borderColor:n}:e==="editable"?r={startEditable:n,durationEditable:n}:r={[e]:n},this.mutate({standardProps:{ui:r}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:r}=this._context,o=r.createMarker(e);if(o&&this._instance){let d=this._instance.range,p=Wl(d.start,o,r,n.granularity);n.maintainDuration?this.mutate({datesDelta:p}):this.mutate({startDelta:p})}}setEnd(e,n={}){let{dateEnv:r}=this._context,o;if(!(e!=null&&(o=r.createMarker(e),!o))&&this._instance)if(o){let d=Wl(this._instance.range.end,o,r,n.granularity);this.mutate({endDelta:d})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,r={}){let{dateEnv:o}=this._context,d={allDay:r.allDay},p=o.createMarker(e),c;if(p&&!(n!=null&&(c=o.createMarker(n),!c))&&this._instance){let b=this._instance.range;r.allDay===!0&&(b=G1(b));let k=Wl(b.start,p,o,r.granularity);if(c){let E=Wl(b.end,c,o,r.granularity);E3(k,E)?this.mutate({datesDelta:k,standardProps:d}):this.mutate({startDelta:k,endDelta:E,standardProps:d})}else d.hasEnd=!1,this.mutate({datesDelta:k,standardProps:d})}}moveStart(e){let n=on(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=on(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=on(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let r={allDay:e},{maintainDuration:o}=n;o==null&&(o=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=o),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:n}=this._context,r=this._instance,o=Yn(e);return this._def.hasEnd?n.formatRange(r.range.start,r.range.end,o,{forcedStartTzo:r.forcedStartTzo,forcedEndTzo:r.forcedEndTzo}):n.format(r.range.start,o,{forcedTzo:r.forcedStartTzo})}mutate(e){let n=this._instance;if(n){let r=this._def,o=this._context,{eventStore:d}=o.getCurrentData(),p=qg(d,n.instanceId);p=Yg(p,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,o);let b=new Qn(o,r,n);this._def=p.defs[r.defId],this._instance=p.instances[n.instanceId],o.dispatch({type:"MERGE_EVENTS",eventStore:p}),o.emitter.trigger("eventChange",{oldEvent:b,event:this,relatedEvents:$a(p,o,n),revert(){o.dispatch({type:"RESET_EVENTS",eventStore:d})}})}}remove(){let e=this._context,n=lw(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:n}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:n})}})}get source(){let{sourceId:e}=this._def;return e?new ql(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let n=this._def,{ui:r}=n,{startStr:o,endStr:d}=this,p={allDay:n.allDay};return n.title&&(p.title=n.title),o&&(p.start=o),d&&(p.end=d),n.publicId&&(p.id=n.publicId),n.groupId&&(p.groupId=n.groupId),n.url&&(p.url=n.url),r.display&&r.display!=="auto"&&(p.display=r.display),e.collapseColor&&r.backgroundColor&&r.backgroundColor===r.borderColor?p.color=r.backgroundColor:(r.backgroundColor&&(p.backgroundColor=r.backgroundColor),r.borderColor&&(p.borderColor=r.borderColor)),r.textColor&&(p.textColor=r.textColor),r.classNames.length&&(p.classNames=r.classNames),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(p,n.extendedProps):p.extendedProps=n.extendedProps),p}toJSON(){return this.toPlainObject()}}function lw(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function $a(t,e,n){let{defs:r,instances:o}=t,d=[],p=n?n.instanceId:"";for(let c in o){let b=o[c],k=r[b.defId];b.instanceId!==p&&d.push(new Qn(e,k,b))}return d}function Xg(t,e,n,r){let o={},d={},p={},c=[],b=[],k=_p(t.defs,e);for(let E in t.defs){let C=t.defs[E];k[C.defId].display==="inverse-background"&&(C.groupId?(o[C.groupId]=[],p[C.groupId]||(p[C.groupId]=C)):d[E]=[])}for(let E in t.instances){let C=t.instances[E],T=t.defs[C.defId],I=k[T.defId],N=C.range,$=!T.allDay&&r?$g(N,r):N,F=Fo($,n);F&&(I.display==="inverse-background"?T.groupId?o[T.groupId].push(F):d[C.defId].push(F):I.display!=="none"&&(I.display==="background"?c:b).push({def:T,ui:I,instance:C,range:F,isStart:$.start&&$.start.valueOf()===F.start.valueOf(),isEnd:$.end&&$.end.valueOf()===F.end.valueOf()}))}for(let E in o){let C=o[E],T=q1(C,n);for(let I of T){let N=p[E],$=k[N.defId];c.push({def:N,ui:$,instance:null,range:I,isStart:!1,isEnd:!1})}}for(let E in d){let C=d[E],T=q1(C,n);for(let I of T)c.push({def:t.defs[E],ui:k[E],instance:null,range:I,isStart:!1,isEnd:!1})}return{bg:c,fg:b}}function tO(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function cw(t,e){t.fcSeg=e}function Gl(t){return t.fcSeg||t.parentNode.fcSeg||null}function _p(t,e){return ro(t,n=>dw(n,e))}function dw(t,e){let n=[];return e[""]&&n.push(e[""]),e[t.defId]&&n.push(e[t.defId]),n.push(t.ui),Q1(n)}function Kg(t,e){let n=t.map(nO);return n.sort((r,o)=>y3(r,o,e)),n.map(r=>r._seg)}function nO(t){let{eventRange:e}=t,n=e.def,r=e.instance?e.instance.range:e.range,o=r.start?r.start.valueOf():0,d=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:o,end:d,duration:d-o,allDay:Number(n.allDay),_seg:t})}function rO(t,e){let{pluginHooks:n}=e,r=n.isDraggableTransformers,{def:o,ui:d}=t.eventRange,p=d.startEditable;for(let c of r)p=c(p,o,d,e);return p}function iO(t,e){return t.isStart&&t.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function sO(t,e){return t.isEnd&&t.eventRange.ui.durationEditable}function Id(t,e,n,r,o,d,p){let{dateEnv:c,options:b}=n,{displayEventTime:k,displayEventEnd:E}=b,C=t.eventRange.def,T=t.eventRange.instance;k==null&&(k=r!==!1),E==null&&(E=o!==!1);let I=T.range.start,N=T.range.end,$=d||t.start||t.eventRange.range.start,F=p||t.end||t.eventRange.range.end,q=Un(I).valueOf()===Un($).valueOf(),J=Un(Vo(N,-1)).valueOf()===Un(Vo(F,-1)).valueOf();return k&&!C.allDay&&(q||J)?($=q?I:$,F=J?N:F,E&&C.hasEnd?c.formatRange($,F,e,{forcedStartTzo:d?null:T.forcedStartTzo,forcedEndTzo:p?null:T.forcedEndTzo}):c.format($,e,{forcedTzo:d?null:T.forcedStartTzo})):""}function oo(t,e,n){let r=t.eventRange.range;return{isPast:r.end<=(n||e.start),isFuture:r.start>=(n||e.end),isToday:e&&so(e,r.start)}}function oO(t){let e=["fc-event"];return t.isMirror&&e.push("fc-event-mirror"),t.isDraggable&&e.push("fc-event-draggable"),(t.isStartResizable||t.isEndResizable)&&e.push("fc-event-resizable"),t.isDragging&&e.push("fc-event-dragging"),t.isResizing&&e.push("fc-event-resizing"),t.isSelected&&e.push("fc-event-selected"),t.isStart&&e.push("fc-event-start"),t.isEnd&&e.push("fc-event-end"),t.isPast&&e.push("fc-event-past"),t.isToday&&e.push("fc-event-today"),t.isFuture&&e.push("fc-event-future"),e}function uw(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function Jg(t,e){let{def:n,instance:r}=t.eventRange,{url:o}=n;if(o)return{href:o};let{emitter:d,options:p}=e,{eventInteractive:c}=p;return c==null&&(c=n.interactive,c==null&&(c=!!d.hasHandlers("eventClick"))),c?S1(b=>{d.trigger("eventClick",{el:b.target,event:new Qn(e,n,r),jsEvent:b,view:e.viewApi})}):{}}const aO={start:De,end:De,allDay:Boolean};function lO(t,e,n){let r=cO(t,e),{range:o}=r;if(!o.start)return null;if(!o.end){if(n==null)return null;o.end=e.add(o.start,n)}return r}function cO(t,e){let{refined:n,extra:r}=Ng(t,aO),o=n.start?e.createMarkerMeta(n.start):null,d=n.end?e.createMarkerMeta(n.end):null,{allDay:p}=n;return p==null&&(p=o&&o.isTimeUnspecified&&(!d||d.isTimeUnspecified)),Object.assign({range:{start:o?o.marker:null,end:d?d.marker:null},allDay:p},r)}function dO(t,e){return Sz(t.range,e.range)&&t.allDay===e.allDay&&uO(t,e)}function uO(t,e){for(let n in e)if(n!=="range"&&n!=="allDay"&&t[n]!==e[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}function hO(t,e){return Object.assign(Object.assign({},pw(t.range,e,t.allDay)),{allDay:t.allDay})}function hw(t,e,n){return Object.assign(Object.assign({},pw(t,e,n)),{timeZone:e.timeZone})}function pw(t,e,n){return{start:e.toDate(t.start),end:e.toDate(t.end),startStr:e.formatIso(t.start,{omitTime:n}),endStr:e.formatIso(t.end,{omitTime:n})}}function pO(t,e,n){let r=K1({editable:!1},n),o=Hg(r.refined,r.extra,"",t.allDay,!0,n);return{def:o,ui:dw(o,e),instance:jg(o.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function fO(t,e,n){let r=!1,o=function(c){r||(r=!0,e(c))},d=function(c){r||(r=!0,n(c))},p=t(o,d);p&&typeof p.then=="function"&&p.then(o,d)}class fw extends Error{constructor(e,n){super(e),this.response=n}}function mO(t,e,n){t=t.toUpperCase();const r={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,r).then(o=>{if(o.ok)return o.json().then(d=>[d,o],()=>{throw new fw("Failure parsing JSON",o)});throw new fw("Request failed",o)})}let Qg;function mw(){return Qg==null&&(Qg=gO()),Qg}function gO(){if(typeof document>"u")return!0;let t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.innerHTML="<table><tr><td><div></div></td></tr></table>",t.querySelector("table").style.height="100px",t.querySelector("div").style.height="100%",document.body.appendChild(t);let n=t.querySelector("div").offsetHeight>0;return document.body.removeChild(t),n}class yO extends bn{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{up(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{up(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:n}=e,{forPrint:r}=this.state,o=r||n.height==="auto"||n.contentHeight==="auto",d=!o&&n.height!=null?n.height:"",p=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${n.direction}`,e.theme.getClass("root")];return mw()||p.push("fc-liquid-hack"),e.children(p,d,o,r)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class Zl{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function _O(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function ey(t){return{[t.component.uid]:t}}const ty={};class ja extends Ai{constructor(e,n){super(e,n),this.handleRefresh=()=>{let r=this.computeTiming();r.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(r.state),this.clearTimeout(),this.setTimeout(r.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:n}=this;return e.children(n.nowDate,n.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener("visibilitychange",this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}computeTiming(){let{props:e,context:n}=this,r=n.nowManager.getDateMarker(),o=n.dateEnv.startOf(r,e.unit),p=n.dateEnv.add(o,on(1,e.unit)).valueOf()-r.valueOf();return p=Math.min(1e3*60*60*24,p),{state:{nowDate:o,todayRange:bO(o)},waitMs:p}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{const n=this.computeTiming();this.setState(n.state,()=>{this.setTimeout(n.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}ja.contextType=io;function bO(t){let e=Un(t),n=Er(e,1);return{start:e,end:n}}class xO{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,n){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:n})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,n){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[e]?r.emitter.on(e,n):console.warn(`Unknown listener name '${e}'`)}off(e,n){this.currentDataManager.emitter.off(e,n)}trigger(e,...n){this.currentDataManager.emitter.trigger(e,...n)}changeView(e,n){this.batchRendering(()=>{if(this.unselect(),n)if(n.start&&n.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:n});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let r=this.getCurrentData(),o;n=n||"day",o=r.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),o?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:o.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:r}=this.getCurrentData(),o=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),d,p;for(let c in n)o.push(c);for(d=0;d<o.length;d+=1)if(p=n[o[d]],p&&p.singleUnit===e)return p;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let n=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.createMarker(e)})}incrementDate(e){let n=this.getCurrentData(),r=on(e);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,r)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:r}=this.getCurrentData();return r.format(r.createMarker(e),Yn(n))}formatRange(e,n,r){let{dateEnv:o}=this.getCurrentData();return o.formatRange(o.createMarker(e),o.createMarker(n),Yn(r),r)}formatIso(e,n){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(e),{omitTime:n})}select(e,n){let r;n==null?e.start!=null?r=e:r={start:e,end:null}:r={start:e,end:n};let o=this.getCurrentData(),d=lO(r,o.dateEnv,on({days:1}));d&&(this.dispatch({type:"SELECT_DATES",selection:d}),ow(d,null,o))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),Jz(e,n))}addEvent(e,n){if(e instanceof Qn){let p=e._def,c=e._instance;return this.getCurrentData().eventStore.defs[p.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Wg({def:p,instance:c})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),o;if(n instanceof ql)o=n.internalEventSource;else if(typeof n=="boolean")n&&([o]=Vg(r.eventSources));else if(n!=null){let p=this.getEventSourceById(n);if(!p)return console.warn(`Could not find an event source with ID "${n}"`),null;o=p.internalEventSource}let d=X1(e,o,r,!1);if(d){let p=new Qn(r,d.def,d.def.recurringDef?null:d.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Wg(d)}),this.triggerEventAdd(p),p}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:lw(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:r,instances:o}=n.eventStore;e=String(e);for(let d in r){let p=r[d];if(p.publicId===e){if(p.recurringDef)return new Qn(n,p,null);for(let c in o){let b=o[c];if(b.defId===p.defId)return new Qn(n,p,b)}}}return null}getEvents(){let e=this.getCurrentData();return $a(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,r=[];for(let o in n)r.push(new ql(e,n[o]));return r}getEventSourceById(e){let n=this.getCurrentData(),r=n.eventSources;e=String(e);for(let o in r)if(r[o].publicId===e)return new ql(n,r[o]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof ql)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=ew(e,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new ql(n,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=on(e);n&&this.trigger("_scrollRequest",{time:n})}}function vO(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function gw(t,e){let n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom?n:!1}function wO(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}}function kO(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function EO(t,e){return{left:t.left-e.left,top:t.top-e.top}}const ny=Di();class CO{constructor(){this.getKeysForEventDefs=Pt(this._getKeysForEventDefs),this.splitDateSelection=Pt(this._splitDateSpan),this.splitEventStore=Pt(this._splitEventStore),this.splitIndividualUi=Pt(this._splitIndividualUi),this.splitEventDrag=Pt(this._splitInteraction),this.splitEventResize=Pt(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),d=this.splitIndividualUi(e.eventUiBases,r),p=this.splitEventStore(e.eventStore,r),c=this.splitEventDrag(e.eventDrag),b=this.splitEventResize(e.eventResize),k={};this.eventUiBuilders=ro(n,(E,C)=>this.eventUiBuilders[C]||Pt(SO));for(let E in n){let C=n[E],T=p[E]||ny,I=this.eventUiBuilders[E];k[E]={businessHours:C.businessHours||e.businessHours,dateSelection:o[E]||null,eventStore:T,eventUiBases:I(e.eventUiBases[""],C.ui,d[E]),eventSelection:T.instances[e.eventSelection]?e.eventSelection:"",eventDrag:c[E]||null,eventResize:b[E]||null}}return k}_splitDateSpan(e){let n={};if(e){let r=this.getKeysForDateSpan(e);for(let o of r)n[o]=e}return n}_getKeysForEventDefs(e){return ro(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:r,instances:o}=e,d={};for(let p in r)for(let c of n[p])d[c]||(d[c]=Di()),d[c].defs[p]=r[p];for(let p in o){let c=o[p];for(let b of n[c.defId])d[b]&&(d[b].instances[p]=c)}return d}_splitIndividualUi(e,n){let r={};for(let o in e)if(o)for(let d of n[o])r[d]||(r[d]={}),r[d][o]=e[o];return r}_splitInteraction(e){let n={};if(e){let r=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),o=this._getKeysForEventDefs(e.mutatedEvents),d=this._splitEventStore(e.mutatedEvents,o),p=c=>{n[c]||(n[c]={affectedEvents:r[c]||ny,mutatedEvents:d[c]||ny,isEvent:e.isEvent})};for(let c in r)p(c);for(let c in d)p(c)}return n}}function SO(t,e,n){let r=[];t&&r.push(t),e&&r.push(e);let o={"":Q1(r)};return n&&Object.assign(o,n),o}function ry(t,e,n,r){return{dow:t.getUTCDay(),isDisabled:!!(r&&(!r.activeRange||!so(r.activeRange,t))),isOther:!!(r&&!so(r.currentRange,t)),isToday:!!(e&&so(e,t)),isPast:!!(n?t<n:e&&t<e.start),isFuture:!!(n?t>n:e&&t>=e.end)}}function bp(t,e){let n=["fc-day",`fc-day-${D3[t.dow]}`];return t.isDisabled?n.push("fc-day-disabled"):(t.isToday&&(n.push("fc-day-today"),n.push(e.getClass("today"))),t.isPast&&n.push("fc-day-past"),t.isFuture&&n.push("fc-day-future"),t.isOther&&n.push("fc-day-other")),n}const TO=Yn({year:"numeric",month:"long",day:"numeric"}),AO=Yn({week:"long"});function Yl(t,e,n="day",r=!0){const{dateEnv:o,options:d,calendarApi:p}=t;let c=o.format(e,n==="week"?AO:TO);if(d.navLinks){let b=o.toDate(e);const k=E=>{let C=n==="day"?d.navLinkDayClick:n==="week"?d.navLinkWeekClick:null;typeof C=="function"?C.call(p,o.toDate(e),E):(typeof C=="string"&&(n=C),p.zoomTo(e,n))};return Object.assign({title:Cd(d.navLinkHint,[c,b],c),"data-navlink":""},r?C1(k):{onClick:k})}return{"aria-label":c}}let iy=null;function DO(){return iy===null&&(iy=MO()),iy}function MO(){let t=document.createElement("div");Ed(t,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),t.innerHTML="<div></div>",document.body.appendChild(t);let n=t.firstChild.getBoundingClientRect().left>t.getBoundingClientRect().left;return Eg(t),n}let sy;function IO(){return sy||(sy=PO()),sy}function PO(){let t=document.createElement("div");t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t);let e=yw(t);return document.body.removeChild(t),e}function yw(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}function RO(t,e=!1){let n=window.getComputedStyle(t),r=parseInt(n.borderLeftWidth,10)||0,o=parseInt(n.borderRightWidth,10)||0,d=parseInt(n.borderTopWidth,10)||0,p=parseInt(n.borderBottomWidth,10)||0,c=yw(t),b=c.y-r-o,k=c.x-d-p,E={borderLeft:r,borderRight:o,borderTop:d,borderBottom:p,scrollbarBottom:k,scrollbarLeft:0,scrollbarRight:0};return DO()&&n.direction==="rtl"?E.scrollbarLeft=b:E.scrollbarRight=b,e&&(E.paddingLeft=parseInt(n.paddingLeft,10)||0,E.paddingRight=parseInt(n.paddingRight,10)||0,E.paddingTop=parseInt(n.paddingTop,10)||0,E.paddingBottom=parseInt(n.paddingBottom,10)||0),E}function NO(t,e=!1,n){let r=oy(t),o=RO(t,e),d={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return e&&(d.left+=o.paddingLeft,d.right-=o.paddingRight,d.top+=o.paddingTop,d.bottom-=o.paddingBottom),d}function oy(t){let e=t.getBoundingClientRect();return{left:e.left+window.scrollX,top:e.top+window.scrollY,right:e.right+window.scrollX,bottom:e.bottom+window.scrollY}}function BO(t){let e=_w(t),n=t.getBoundingClientRect();for(let r of e){let o=gw(n,r.getBoundingClientRect());if(o)n=o;else return null}return n}function _w(t){let e=[];for(;t instanceof HTMLElement;){let n=window.getComputedStyle(t);if(n.position==="fixed")break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&e.push(t),t=t.parentNode}return e}class Xl{constructor(e,n,r,o){this.els=n;let d=this.originClientRect=e.getBoundingClientRect();r&&this.buildElHorizontals(d.left),o&&this.buildElVerticals(d.top)}buildElHorizontals(e){let n=[],r=[];for(let o of this.els){let d=o.getBoundingClientRect();n.push(d.left-e),r.push(d.right-e)}this.lefts=n,this.rights=r}buildElVerticals(e){let n=[],r=[];for(let o of this.els){let d=o.getBoundingClientRect();n.push(d.top-e),r.push(d.bottom-e)}this.tops=n,this.bottoms=r}leftToIndex(e){let{lefts:n,rights:r}=this,o=n.length,d;for(d=0;d<o;d+=1)if(e>=n[d]&&e<r[d])return d}topToIndex(e){let{tops:n,bottoms:r}=this,o=n.length,d;for(d=0;d<o;d+=1)if(e>=n[d]&&e<r[d])return d}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return xp(this.tops||[],e.tops||[])&&xp(this.bottoms||[],e.bottoms||[])&&xp(this.lefts||[],e.lefts||[])&&xp(this.rights||[],e.rights||[])}}function xp(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(Math.round(t[r])!==Math.round(e[r]))return!1;return!0}class ay{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}}class VO extends ay{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}}class zO extends ay{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(e){window.scroll(window.scrollX,e)}setScrollLeft(e){window.scroll(e,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}}class fs extends bn{constructor(){super(...arguments),this.uid=Ba()}prepareHits(){}queryHit(e,n,r,o){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!jr(e,".fc-event-mirror")}isValidDateDownEl(e){return!jr(e,".fc-event:not(.fc-bg-event)")&&!jr(e,".fc-more-link")&&!jr(e,"a[data-navlink]")&&!jr(e,".fc-popover")}}class bw{constructor(e=n=>n.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let n=[];for(let r of e)this.insertEntry(r,n);return n}insertEntry(e,n){let r=this.findInsertion(e);this.isInsertionValid(r,e)?this.insertEntryAt(e,r):this.handleInvalidInsertion(r,e,n)}isInsertionValid(e,n){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(n)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,n,r){if(this.allowReslicing&&e.touchingEntry){const o=Object.assign(Object.assign({},n),{span:cy(n.span,e.touchingEntry.span)});r.push(o),this.splitEntry(n,e.touchingEntry,r)}else r.push(n)}splitEntry(e,n,r){let o=e.span,d=n.span;o.start<d.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:o.start,end:d.start}},r),o.end>d.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:d.end,end:o.end}},r)}insertEntryAt(e,n){let{entriesByLevel:r,levelCoords:o}=this;n.lateral===-1?(dy(o,n.level,n.levelCoord),dy(r,n.level,[e])):dy(r[n.level],n.lateral,e),this.stackCnts[Ua(e)]=n.stackCnt}findInsertion(e){let{levelCoords:n,entriesByLevel:r,strictOrder:o,stackCnts:d}=this,p=n.length,c=0,b=-1,k=-1,E=null,C=0;for(let N=0;N<p;N+=1){const $=n[N];if(!o&&$>=c+this.getEntryThickness(e))break;let F=r[N],q,J=uy(F,e.span.start,ly),Q=J[0]+J[1];for(;(q=F[Q])&&q.span.start<e.span.end;){let me=$+this.getEntryThickness(q);me>c&&(c=me,E=q,b=N,k=Q),me===c&&(C=Math.max(C,d[Ua(q)]+1)),Q+=1}}let T=0;if(E)for(T=b+1;T<p&&n[T]<c;)T+=1;let I=-1;return T<p&&n[T]===c&&(I=uy(r[T],e.span.end,ly)[0]),{touchingLevel:b,touchingLateral:k,touchingEntry:E,stackCnt:C,levelCoord:c,level:T,lateral:I}}toRects(){let{entriesByLevel:e,levelCoords:n}=this,r=e.length,o=[];for(let d=0;d<r;d+=1){let p=e[d],c=n[d];for(let b of p)o.push(Object.assign(Object.assign({},b),{thickness:this.getEntryThickness(b),levelCoord:c}))}return o}}function ly(t){return t.span.end}function Ua(t){return t.index+":"+t.span.start}function OO(t){let e=[];for(let n of t){let r=[],o={span:n.span,entries:[n]};for(let d of e)cy(d.span,o.span)?o={entries:d.entries.concat(o.entries),span:LO(d.span,o.span)}:r.push(d);r.push(o),e=r}return e}function LO(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function cy(t,e){let n=Math.max(t.start,e.start),r=Math.min(t.end,e.end);return n<r?{start:n,end:r}:null}function dy(t,e,n){t.splice(e,0,n)}function uy(t,e,n){let r=0,o=t.length;if(!o||e<n(t[r]))return[0,0];if(e>n(t[o-1]))return[o,0];for(;r<o;){let d=Math.floor(r+(o-r)/2),p=n(t[d]);if(e<p)o=d;else if(e>p)r=d+1;else return[d,1]}return[r,0]}class FO{constructor(e,n){this.emitter=new yp}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const hy={};function $O(t,e){return!t||e>10?Yn({weekday:"short"}):e>1?Yn({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):Yn({weekday:"long"})}const xw="fc-col-header-cell";function vw(t){return t.text}class jO extends bn{render(){let{dateEnv:e,options:n,theme:r,viewApi:o}=this.context,{props:d}=this,{date:p,dateProfile:c}=d,b=ry(p,d.todayRange,null,c),k=[xw].concat(bp(b,r)),E=e.format(p,d.dayHeaderFormat),C=!b.isDisabled&&d.colCnt>1?Yl(this.context,p):{},T=e.toDate(p);e.namedTimeZoneImpl&&(T=Vo(T,36e5));let I=Object.assign(Object.assign(Object.assign({date:T,view:o},d.extraRenderProps),{text:E}),b);return le(Ur,{elTag:"th",elClasses:k,elAttrs:Object.assign({role:"columnheader",colSpan:d.colSpan,"data-date":b.isDisabled?void 0:Sd(p)},d.extraDataAttrs),renderProps:I,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:vw,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},N=>le("div",{className:"fc-scrollgrid-sync-inner"},!b.isDisabled&&le(N,{elTag:"a",elAttrs:C,elClasses:["fc-col-header-cell-cushion",d.isSticky&&"fc-sticky"]})))}}const UO=Yn({weekday:"long"});class HO extends bn{render(){let{props:e}=this,{dateEnv:n,theme:r,viewApi:o,options:d}=this.context,p=Er(new Date(2592e5),e.dow),c={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},b=n.format(p,e.dayHeaderFormat),k=Object.assign(Object.assign(Object.assign(Object.assign({date:p},c),{view:o}),e.extraRenderProps),{text:b});return le(Ur,{elTag:"th",elClasses:[xw,...bp(c,r),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:k,generatorName:"dayHeaderContent",customGenerator:d.dayHeaderContent,defaultGenerator:vw,classNameGenerator:d.dayHeaderClassNames,didMount:d.dayHeaderDidMount,willUnmount:d.dayHeaderWillUnmount},E=>le("div",{className:"fc-scrollgrid-sync-inner"},le(E,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":n.format(p,UO)}})))}}class ww extends bn{constructor(){super(...arguments),this.createDayHeaderFormatter=Pt(WO)}render(){let{context:e}=this,{dates:n,dateProfile:r,datesRepDistinctDays:o,renderIntro:d}=this.props,p=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return le(ja,{unit:"day"},(c,b)=>le("tr",{role:"row"},d&&d("day"),n.map(k=>o?le(jO,{key:k.toISOString(),date:k,dateProfile:r,todayRange:b,colCnt:n.length,dayHeaderFormat:p}):le(HO,{key:k.getUTCDay(),dow:k.getUTCDay(),dayHeaderFormat:p}))))}}function WO(t,e,n){return t||$O(e,n)}class kw{constructor(e,n){let r=e.start,{end:o}=e,d=[],p=[],c=-1;for(;r<o;)n.isHiddenDay(r)?d.push(c+.5):(c+=1,d.push(c),p.push(r)),r=Er(r,1);this.dates=p,this.indices=d,this.cnt=p.length}sliceRange(e){let n=this.getDateDayIndex(e.start),r=this.getDateDayIndex(Er(e.end,-1)),o=Math.max(0,n),d=Math.min(this.cnt-1,r);return o=Math.ceil(o),d=Math.floor(d),o<=d?{firstIndex:o,lastIndex:d,isStart:n===o,isEnd:r===d}:null}getDateDayIndex(e){let{indices:n}=this,r=Math.floor(zo(this.dates[0],e));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class Ew{constructor(e,n){let{dates:r}=e,o,d,p;if(n){for(d=r[0].getUTCDay(),o=1;o<r.length&&r[o].getUTCDay()!==d;o+=1);p=Math.ceil(r.length/o)}else p=1,o=r.length;this.rowCnt=p,this.colCnt=o,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCnt;n+=1){let r=[];for(let o=0;o<this.colCnt;o+=1)r.push(this.buildCell(n,o));e.push(r)}return e}buildCell(e,n){let r=this.daySeries.dates[e*this.colCnt+n];return{key:r.toISOString(),date:r}}buildHeaderDates(){let e=[];for(let n=0;n<this.colCnt;n+=1)e.push(this.cells[0][n].date);return e}sliceRange(e){let{colCnt:n}=this,r=this.daySeries.sliceRange(e),o=[];if(r){let{firstIndex:d,lastIndex:p}=r,c=d;for(;c<=p;){let b=Math.floor(c/n),k=Math.min((b+1)*n,p+1);o.push({row:b,firstCol:c%n,lastCol:(k-1)%n,isStart:r.isStart&&c===d,isEnd:r.isEnd&&k-1===p}),c=k}}return o}}class Cw{constructor(){this.sliceBusinessHours=Pt(this._sliceBusinessHours),this.sliceDateSelection=Pt(this._sliceDateSpan),this.sliceEventStore=Pt(this._sliceEventStore),this.sliceEventDrag=Pt(this._sliceInteraction),this.sliceEventResize=Pt(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,r,o,...d){let{eventUiBases:p}=e,c=this.sliceEventStore(e.eventStore,p,n,r,...d);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,r,p,o,...d),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,r,o,...d),fgEventSegs:c.fg,bgEventSegs:c.bg,eventDrag:this.sliceEventDrag(e.eventDrag,p,n,r,...d),eventResize:this.sliceEventResize(e.eventResize,p,n,r,...d),eventSelection:e.eventSelection}}sliceNowDate(e,n,r,o,...d){return this._sliceDateSpan({range:{start:e,end:Vo(e,1)},allDay:!1},n,r,{},o,...d)}_sliceBusinessHours(e,n,r,o,...d){return e?this._sliceEventStore(Fa(e,vp(n,!!r),o),{},n,r,...d).bg:[]}_sliceEventStore(e,n,r,o,...d){if(e){let p=Xg(e,n,vp(r,!!o),o);return{bg:this.sliceEventRanges(p.bg,d),fg:this.sliceEventRanges(p.fg,d)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,r,o,...d){if(!e)return null;let p=Xg(e.mutatedEvents,n,vp(r,!!o),o);return{segs:this.sliceEventRanges(p.fg,d),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,r,o,d,...p){if(!e)return[];let c=vp(n,!!r),b=Fo(e.range,c);if(b){e=Object.assign(Object.assign({},e),{range:b});let k=pO(e,o,d),E=this.sliceRange(e.range,...p);for(let C of E)C.eventRange=k;return E}return[]}sliceEventRanges(e,n){let r=[];for(let o of e)r.push(...this.sliceEventRange(o,n));return r}sliceEventRange(e,n){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:Er(r.start,1)});let o=this.sliceRange(r,...n);for(let d of o)d.eventRange=e,d.isStart=e.isStart&&d.isStart,d.isEnd=e.isEnd&&d.isEnd;return o}}function vp(t,e){let n=t.activeRange;return e?n:{start:Vo(n.start,t.slotMinTime.milliseconds),end:Vo(n.end,t.slotMaxTime.milliseconds-864e5)}}function Sw(t,e,n){let{instances:r}=t.mutatedEvents;for(let o in r)if(!hp(e.validRange,r[o].range))return!1;return Tw({eventDrag:t},n)}function qO(t,e,n){return hp(e.validRange,t.range)?Tw({dateSelection:t},n):!1}function Tw(t,e){let n=e.getCurrentData(),r=Object.assign({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},t);return(e.pluginHooks.isPropsValid||GO)(r,e)}function GO(t,e,n={},r){return!(t.eventDrag&&!ZO(t,e,n,r)||t.dateSelection&&!YO(t,e,n,r))}function ZO(t,e,n,r){let o=e.getCurrentData(),d=t.eventDrag,p=d.mutatedEvents,c=p.defs,b=p.instances,k=_p(c,d.isEvent?t.eventUiBases:{"":o.selectionConfig});r&&(k=ro(k,r));let E=Wz(t.eventStore,d.affectedEvents.instances),C=E.defs,T=E.instances,I=_p(C,t.eventUiBases);for(let N in b){let $=b[N],F=$.range,q=k[$.defId],J=c[$.defId];if(!Aw(q.constraints,F,E,t.businessHours,e))return!1;let{eventOverlap:Q}=e.options,me=typeof Q=="function"?Q:null;for(let Re in T){let Ee=T[Re];if(Fg(F,Ee.range)&&(I[Ee.defId].overlap===!1&&d.isEvent||q.overlap===!1||me&&!me(new Qn(e,C[Ee.defId],Ee),new Qn(e,J,$))))return!1}let ke=o.eventStore;for(let Re of q.allows){let Ee=Object.assign(Object.assign({},n),{range:$.range,allDay:J.allDay}),Ve=ke.defs[J.defId],Be=ke.instances[N],Ze;if(Ve?Ze=new Qn(e,Ve,Be):Ze=new Qn(e,J),!Re(Zg(Ee,e),Ze))return!1}}return!0}function YO(t,e,n,r){let o=t.eventStore,d=o.defs,p=o.instances,c=t.dateSelection,b=c.range,{selectionConfig:k}=e.getCurrentData();if(r&&(k=r(k)),!Aw(k.constraints,b,o,t.businessHours,e))return!1;let{selectOverlap:E}=e.options,C=typeof E=="function"?E:null;for(let T in p){let I=p[T];if(Fg(b,I.range)&&(k.overlap===!1||C&&!C(new Qn(e,d[I.defId],I),null)))return!1}for(let T of k.allows){let I=Object.assign(Object.assign({},n),c);if(!T(Zg(I,e),null))return!1}return!0}function Aw(t,e,n,r,o){for(let d of t)if(!KO(XO(d,e,n,r,o),e))return!1;return!0}function XO(t,e,n,r,o){return t==="businessHours"?py(Fa(r,e,o)):typeof t=="string"?py(fp(n,d=>d.groupId===t)):typeof t=="object"&&t?py(Fa(t,e,o)):[]}function py(t){let{instances:e}=t,n=[];for(let r in e)n.push(e[r].range);return n}function KO(t,e){for(let n of t)if(hp(n,e))return!0;return!1}const wp=/^(visible|hidden)$/;class Dw extends bn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Ms(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:n,liquidIsAbsolute:r}=e,o=n&&r,d=["fc-scroller"];return n&&(r?d.push("fc-scroller-liquid-absolute"):d.push("fc-scroller-liquid")),le("div",{ref:this.handleEl,className:d.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:o&&-(e.overcomeLeft||0)||"",right:o&&-(e.overcomeRight||0)||"",bottom:o&&-(e.overcomeBottom||0)||"",marginLeft:!o&&-(e.overcomeLeft||0)||"",marginRight:!o&&-(e.overcomeRight||0)||"",marginBottom:!o&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(wp.test(this.props.overflowX))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=e;for(let o=0;o<r.length;o+=1)if(r[o].getBoundingClientRect().width>n)return!0;return!1}needsYScrolling(){if(wp.test(this.props.overflowY))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=e;for(let o=0;o<r.length;o+=1)if(r[o].getBoundingClientRect().height>n)return!0;return!1}getXScrollbarWidth(){return wp.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return wp.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class ao{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(n,r)=>{let{depths:o,currentMap:d}=this,p=!1,c=!1;n!==null?(p=r in d,d[r]=n,o[r]=(o[r]||0)+1,c=!0):(o[r]-=1,o[r]||(delete d[r],delete this.callbackMap[r],p=!0)),this.masterCallback&&(p&&this.masterCallback(null,String(r)),c&&this.masterCallback(n,String(r)))}}createRef(e){let n=this.callbackMap[e];return n||(n=this.callbackMap[e]=r=>{this.handleValue(r,String(e))}),n}collect(e,n,r){return cz(this.currentMap,e,n,r)}getAll(){return Vg(this.currentMap)}}function JO(t){let e=a3(t,".fc-scrollgrid-shrink"),n=0;for(let r of e)n=Math.max(n,v3(r));return Math.ceil(n)}function Mw(t,e){return t.liquid&&e.liquid}function QO(t,e){return e.maxHeight!=null||Mw(t,e)}function eL(t,e,n,r){let{expandRows:o}=n;return typeof e.content=="function"?e.content(n):le("table",{role:"presentation",className:[e.tableClassName,t.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:o?n.clientHeight:""}},n.tableColGroupNode,le(r?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(n):e.rowContent))}function tL(t,e){return Bo(t,e,ps)}function nL(t,e){let n=[];for(let r of t){let o=r.span||1;for(let d=0;d<o;d+=1)n.push(le("col",{style:{width:r.width==="shrink"?rL(e):r.width||"",minWidth:r.minWidth||""}}))}return le("colgroup",{},...n)}function rL(t){return t??4}function iL(t){for(let e of t)if(e.width==="shrink")return!0;return!1}function sL(t,e){let n=["fc-scrollgrid",e.theme.getClass("table")];return t&&n.push("fc-scrollgrid-liquid"),n}function oL(t,e){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${t.type}`,t.className];return e&&t.liquid&&t.maxHeight==null&&n.push("fc-scrollgrid-section-liquid"),t.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function fy(t){return le("div",{className:"fc-scrollgrid-sticky-shim",style:{width:t.clientWidth,minWidth:t.tableMinWidth}})}function kp(t){let{stickyHeaderDates:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}function Iw(t){let{stickyFooterScrollbar:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}class my extends bn{constructor(){super(...arguments),this.processCols=Pt(e=>e,tL),this.renderMicroColGroup=Pt(nL),this.scrollerRefs=new ao,this.scrollerElRefs=new ao(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:n,context:r}=this,o=e.sections||[],d=this.processCols(e.cols),p=this.renderMicroColGroup(d,n.shrinkWidth),c=sL(e.liquid,r);e.collapsibleWidth&&c.push("fc-scrollgrid-collapsible");let b=o.length,k=0,E,C=[],T=[],I=[];for(;k<b&&(E=o[k]).type==="header";)C.push(this.renderSection(E,p,!0)),k+=1;for(;k<b&&(E=o[k]).type==="body";)T.push(this.renderSection(E,p,!1)),k+=1;for(;k<b&&(E=o[k]).type==="footer";)I.push(this.renderSection(E,p,!0)),k+=1;let N=!mw();const $={role:"rowgroup"};return le("table",{role:"grid",className:c.join(" "),style:{height:e.height}},!!(!N&&C.length)&&le("thead",$,...C),!!(!N&&T.length)&&le("tbody",$,...T),!!(!N&&I.length)&&le("tfoot",$,...I),N&&le("tbody",$,...C,...T,...I))}renderSection(e,n,r){return"outerContent"in e?le(Bn,{key:e.key},e.outerContent):le("tr",{key:e.key,role:"presentation",className:oL(e,this.props.liquid).join(" ")},this.renderChunkTd(e,n,e.chunk,r))}renderChunkTd(e,n,r,o){if("outerContent"in r)return r.outerContent;let{props:d}=this,{forceYScrollbars:p,scrollerClientWidths:c,scrollerClientHeights:b}=this.state,k=QO(d,e),E=Mw(d,e),C=d.liquid?p?"scroll":k?"auto":"hidden":"visible",T=e.key,I=eL(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:!d.collapsibleWidth&&c[T]!==void 0?c[T]:null,clientHeight:b[T]!==void 0?b[T]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},o);return le(o?"th":"td",{ref:r.elRef,role:"presentation"},le("div",{className:`fc-scroller-harness${E?" fc-scroller-harness-liquid":""}`},le(Dw,{ref:this.scrollerRefs.createRef(T),elRef:this.scrollerElRefs.createRef(T),overflowY:C,overflowX:d.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:E,liquidIsAbsolute:!0},I)))}_handleScrollerEl(e,n){let r=aL(this.props.sections,n);r&&Ms(r.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return iL(this.props.cols)?JO(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=IO(),{scrollerRefs:n,scrollerElRefs:r}=this,o=!1,d={},p={};for(let c in n.currentMap){let b=n.currentMap[c];if(b&&b.needsYScrolling()){o=!0;break}}for(let c of this.props.sections){let b=c.key,k=r.currentMap[b];if(k){let E=k.parentNode;d[b]=Math.floor(E.getBoundingClientRect().width-(o?e.y:0)),p[b]=Math.floor(E.getBoundingClientRect().height)}}return{forceYScrollbars:o,scrollerClientWidths:d,scrollerClientHeights:p}}}my.addStateEquality({scrollerClientWidths:ps,scrollerClientHeights:ps});function aL(t,e){for(let n of t)if(n.key===e)return n;return null}class Ep extends bn{constructor(){super(...arguments),this.buildPublicEvent=Pt((e,n,r)=>new Qn(e,n,r)),this.handleEl=e=>{this.el=e,Ms(this.props.elRef,e),e&&cw(e,this.props.seg)}}render(){const{props:e,context:n}=this,{options:r}=n,{seg:o}=e,{eventRange:d}=o,{ui:p}=d,c={event:this.buildPublicEvent(n,d.def,d.instance),view:n.viewApi,timeText:e.timeText,textColor:p.textColor,backgroundColor:p.backgroundColor,borderColor:p.borderColor,isDraggable:!e.disableDragging&&rO(o,n),isStartResizable:!e.disableResizing&&iO(o,n),isEndResizable:!e.disableResizing&&sO(o),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!o.isStart,isEnd:!!o.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return le(Ur,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...oO(c),...o.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:c,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&cw(this.el,this.props.seg)}}class gy extends bn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:o}=e,{ui:d}=o.eventRange,p=r.eventTimeFormat||e.defaultTimeFormat,c=Id(o,p,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return le(Ep,Object.assign({},e,{elTag:"a",elStyle:{borderColor:d.borderColor,backgroundColor:d.backgroundColor},elAttrs:Jg(o,n),defaultGenerator:lL,timeText:c}),(b,k)=>le(Bn,null,le(b,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:k.textColor}}),!!k.isStartResizable&&le("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!k.isEndResizable&&le("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}gy.addPropsEquality({seg:ps});function lL(t){return le("div",{className:"fc-event-main-frame"},t.timeText&&le("div",{className:"fc-event-time"},t.timeText),le("div",{className:"fc-event-title-container"},le("div",{className:"fc-event-title fc-sticky"},t.event.title||le(Bn,null," "))))}const yy=t=>le(io.Consumer,null,e=>{let{options:n}=e,r={isAxis:t.isAxis,date:e.dateEnv.toDate(t.date),view:e.viewApi};return le(Ur,{elRef:t.elRef,elTag:t.elTag||"div",elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},t.children)}),cL=Yn({day:"numeric"});class _y extends bn{constructor(){super(...arguments),this.refineRenderProps=sp(dL)}render(){let{props:e,context:n}=this,{options:r}=n,o=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:n.viewApi,dateEnv:n.dateEnv,monthStartFormat:r.monthStartFormat});return le(Ur,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),o.isDisabled?{}:{"data-date":Sd(e.date)}),elClasses:[...bp(o,n.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:o.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount},e.children)}}function by(t){return!!(t.dayCellContent||Lg("dayCellContent",t))}function dL(t){let{date:e,dateEnv:n,dateProfile:r,isMonthStart:o}=t,d=ry(e,t.todayRange,null,r),p=t.showDayNumber?n.format(e,o?t.monthStartFormat:cL):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(e),view:t.viewApi},d),{isMonthStart:o,dayNumberText:p}),t.extraRenderProps)}class Pw extends bn{render(){let{props:e}=this,{seg:n}=e;return le(Ep,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:n.eventRange.ui.backgroundColor},defaultGenerator:uL,seg:n,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function uL(t){let{title:e}=t.event;return e&&le("div",{className:"fc-event-title"},t.event.title)}function Rw(t){return le("div",{className:`fc-${t}`})}const Nw=t=>le(io.Consumer,null,e=>{let{dateEnv:n,options:r}=e,{date:o}=t,d=r.weekNumberFormat||t.defaultFormat,p=n.computeWeekNumber(o),c=n.format(o,d),b={num:p,text:c,date:o};return le(Ur,{elRef:t.elRef,elTag:t.elTag,elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:b,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:hL,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},t.children)});function hL(t){return t.text}const xy=10;class pL extends bn{constructor(){super(...arguments),this.state={titleId:No()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Ms(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const n=v1(e);this.rootEl.contains(n)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:n}=this.context,{props:r,state:o}=this,d=["fc-popover",e.getClass("popover")].concat(r.extraClassNames||[]);return G5(le("div",Object.assign({},r.extraAttrs,{id:r.id,className:d.join(" "),"aria-labelledby":o.titleId,ref:this.handleRootEl}),le("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},le("span",{className:"fc-popover-title",id:o.titleId},r.title),le("span",{className:"fc-popover-close "+e.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),le("div",{className:"fc-popover-body "+e.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:n,alignGridTop:r}=this.props,{rootEl:o}=this,d=BO(n);if(d){let p=o.getBoundingClientRect(),c=r?jr(n,".fc-scrollgrid").getBoundingClientRect().top:d.top,b=e?d.right-p.width:d.left;c=Math.max(c,xy),b=Math.min(b,document.documentElement.clientWidth-xy-p.width),b=Math.max(b,xy);let k=o.offsetParent.getBoundingClientRect();Ed(o,{top:c-k.top,left:b-k.left})}}}class fL extends fs{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:n}=this.context,{props:r}=this,{startDate:o,todayRange:d,dateProfile:p}=r,c=n.format(o,e.dayPopoverFormat);return le(_y,{elRef:this.handleRootEl,date:o,dateProfile:p,todayRange:d},(b,k,E)=>le(pL,{elRef:E.ref,id:r.id,title:c,extraClassNames:["fc-more-popover"].concat(E.className||[]),extraAttrs:E,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},by(e)&&le(b,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(e,n,r,o){let{rootEl:d,props:p}=this;return e>=0&&e<r&&n>=0&&n<o?{dateProfile:p.dateProfile,dateSpan:Object.assign({allDay:!p.forceTimed,range:{start:p.startDate,end:p.endDate}},p.extraDateSpan),dayEl:d,rect:{left:0,top:0,right:r,bottom:o},layer:1}:null}}class Bw extends bn{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:No()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Ms(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:r}=this,{moreLinkClick:o}=r.options,d=Vw(n).start;function p(c){let{def:b,instance:k,range:E}=c.eventRange;return{event:new Qn(r,b,k),start:r.dateEnv.toDate(E.start),end:r.dateEnv.toDate(E.end),isStart:c.isStart,isEnd:c.isEnd}}typeof o=="function"&&(o=o({date:d,allDay:!!n.allDayDate,allSegs:n.allSegs.map(p),hiddenSegs:n.hiddenSegs.map(p),jsEvent:e,view:r.viewApi})),!o||o==="popover"?this.setState({isPopoverOpen:!0}):typeof o=="string"&&r.calendarApi.zoomTo(d,o)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return le(io.Consumer,null,r=>{let{viewApi:o,options:d,calendarApi:p}=r,{moreLinkText:c}=d,{moreCnt:b}=e,k=Vw(e),E=typeof c=="function"?c.call(p,b):`+${b} ${c}`,C=Cd(d.moreLinkHint,[b],E),T={num:b,shortText:`+${b}`,text:E,view:o};return le(Bn,null,!!e.moreCnt&&le(Ur,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),C1(this.handleClick)),{title:C,"aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?n.popoverId:""}),renderProps:T,generatorName:"moreLinkContent",customGenerator:d.moreLinkContent,defaultGenerator:e.defaultGenerator||mL,classNameGenerator:d.moreLinkClassNames,didMount:d.moreLinkDidMount,willUnmount:d.moreLinkWillUnmount},e.children),n.isPopoverOpen&&le(fL,{id:n.popoverId,startDate:k.start,endDate:k.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=jr(this.linkEl,".fc-view-harness"))}}function mL(t){return t.text}function Vw(t){if(t.allDayDate)return{start:t.allDayDate,end:Er(t.allDayDate,1)};let{hiddenSegs:e}=t;return{start:zw(e),end:yL(e)}}function zw(t){return t.reduce(gL).eventRange.range.start}function gL(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function yL(t){return t.reduce(_L).eventRange.range.end}function _L(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class bL{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let n of this.handlers)n(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}}class xL extends bL{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:n}=this;let r=!1;e.isActive?(n.set(e.id,e),r=!0):n.has(e.id)&&(n.delete(e.id),r=!0),r&&this.set(n)}}const vL=[],Ow={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Lw=Object.assign(Object.assign({},Ow),{buttonHints:{prev:"Previous $0",next:"Next $0",today(t,e){return e==="day"?"Today":`This ${t}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(t){return`Show ${t} more event${t===1?"":"s"}`}});function wL(t){let e=t.length>0?t[0].code:"en",n=vL.concat(t),r={en:Lw};for(let o of n)r[o.code]=o;return{map:r,defaultCode:e}}function Fw(t,e){return typeof t=="object"&&!Array.isArray(t)?$w(t.code,[t.code],t):kL(t,e)}function kL(t,e){let n=[].concat(t||[]),r=EL(n,e)||Lw;return $w(t,n,r)}function EL(t,e){for(let n=0;n<t.length;n+=1){let r=t[n].toLocaleLowerCase().split("-");for(let o=r.length;o>0;o-=1){let d=r.slice(0,o).join("-");if(e[d])return e[d]}}return null}function $w(t,e,n){let r=Bg([Ow,n],["buttonText"]);delete r.code;let{week:o}=r;return delete r.week,{codeArg:t,codes:e,week:o,simpleNumberFormat:new Intl.NumberFormat(t),options:r}}function Is(t){return{id:Ba(),name:t.name,premiumReleaseDate:t.premiumReleaseDate?new Date(t.premiumReleaseDate):void 0,deps:t.deps||[],reducers:t.reducers||[],isLoadingFuncs:t.isLoadingFuncs||[],contextInit:[].concat(t.contextInit||[]),eventRefiners:t.eventRefiners||{},eventDefMemberAdders:t.eventDefMemberAdders||[],eventSourceRefiners:t.eventSourceRefiners||{},isDraggableTransformers:t.isDraggableTransformers||[],eventDragMutationMassagers:t.eventDragMutationMassagers||[],eventDefMutationAppliers:t.eventDefMutationAppliers||[],dateSelectionTransformers:t.dateSelectionTransformers||[],datePointTransforms:t.datePointTransforms||[],dateSpanTransforms:t.dateSpanTransforms||[],views:t.views||{},viewPropsTransformers:t.viewPropsTransformers||[],isPropsValid:t.isPropsValid||null,externalDefTransforms:t.externalDefTransforms||[],viewContainerAppends:t.viewContainerAppends||[],eventDropTransformers:t.eventDropTransformers||[],componentInteractions:t.componentInteractions||[],calendarInteractions:t.calendarInteractions||[],themeClasses:t.themeClasses||{},eventSourceDefs:t.eventSourceDefs||[],cmdFormatter:t.cmdFormatter,recurringTypes:t.recurringTypes||[],namedTimeZonedImpl:t.namedTimeZonedImpl,initialView:t.initialView||"",elementDraggingImpl:t.elementDraggingImpl,optionChangeHandlers:t.optionChangeHandlers||{},scrollGridImpl:t.scrollGridImpl||null,listenerRefiners:t.listenerRefiners||{},optionRefiners:t.optionRefiners||{},propSetHandlers:t.propSetHandlers||{}}}function CL(t,e){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(d){for(let p of d){const c=p.name,b=n[c];b===void 0?(n[c]=p.id,o(p.deps),r=TL(r,p)):b!==p.id&&console.warn(`Duplicate plugin '${c}'`)}}return t&&o(t),o(e),r}function SL(){let t=[],e=[],n;return(r,o)=>((!n||!Bo(r,t)||!Bo(o,e))&&(n=CL(r,o)),t=r,e=o,n)}function TL(t,e){return{premiumReleaseDate:AL(t.premiumReleaseDate,e.premiumReleaseDate),reducers:t.reducers.concat(e.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:t.contextInit.concat(e.contextInit),eventRefiners:Object.assign(Object.assign({},t.eventRefiners),e.eventRefiners),eventDefMemberAdders:t.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},t.eventSourceRefiners),e.eventSourceRefiners),isDraggableTransformers:t.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:t.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:t.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:t.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:t.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:t.dateSpanTransforms.concat(e.dateSpanTransforms),views:Object.assign(Object.assign({},t.views),e.views),viewPropsTransformers:t.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||t.isPropsValid,externalDefTransforms:t.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:t.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:t.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:t.calendarInteractions.concat(e.calendarInteractions),componentInteractions:t.componentInteractions.concat(e.componentInteractions),themeClasses:Object.assign(Object.assign({},t.themeClasses),e.themeClasses),eventSourceDefs:t.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(e.recurringTypes),namedTimeZonedImpl:e.namedTimeZonedImpl||t.namedTimeZonedImpl,initialView:t.initialView||e.initialView,elementDraggingImpl:t.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},t.optionChangeHandlers),e.optionChangeHandlers),scrollGridImpl:e.scrollGridImpl||t.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},t.listenerRefiners),e.listenerRefiners),optionRefiners:Object.assign(Object.assign({},t.optionRefiners),e.optionRefiners),propSetHandlers:Object.assign(Object.assign({},t.propSetHandlers),e.propSetHandlers)}}function AL(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}class $o extends Ad{}$o.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},$o.prototype.baseIconClass="fc-icon",$o.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},$o.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},$o.prototype.iconOverrideOption="buttonIcons",$o.prototype.iconOverrideCustomButtonOption="icon",$o.prototype.iconOverridePrefix="fc-icon-";function DL(t,e){let n={},r;for(r in t)vy(r,n,t,e);for(r in e)vy(r,n,t,e);return n}function vy(t,e,n,r){if(e[t])return e[t];let o=ML(t,e,n,r);return o&&(e[t]=o),o}function ML(t,e,n,r){let o=n[t],d=r[t],p=E=>o&&o[E]!==null?o[E]:d&&d[E]!==null?d[E]:null,c=p("component"),b=p("superType"),k=null;if(b){if(b===t)throw new Error("Can't have a custom view type that references itself");k=vy(b,e,n,r)}return!c&&k&&(c=k.component),c?{type:t,component:c,defaults:Object.assign(Object.assign({},k?k.defaults:{}),o?o.rawOptions:{}),overrides:Object.assign(Object.assign({},k?k.overrides:{}),d?d.rawOptions:{})}:null}function jw(t){return ro(t,IL)}function IL(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=Uw(e):n&&!(n.prototype instanceof bn)&&(n=Uw(Object.assign(Object.assign({},e),{content:n}))),{superType:e.type,component:n,rawOptions:e}}function Uw(t){return e=>le(io.Consumer,null,n=>le(Ur,{elTag:"div",elClasses:W1(n.viewSpec),renderProps:Object.assign(Object.assign({},e),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:t.content,classNameGenerator:t.classNames,didMount:t.didMount,willUnmount:t.willUnmount}))}function PL(t,e,n,r){let o=jw(t),d=jw(e.views),p=DL(o,d);return ro(p,c=>RL(c,d,e,n,r))}function RL(t,e,n,r,o){let d=t.overrides.duration||t.defaults.duration||r.duration||n.duration,p=null,c="",b="",k={};if(d&&(p=NL(d),p)){let T=Dg(p);c=T.unit,T.value===1&&(b=c,k=e[c]?e[c].rawOptions:{})}let E=T=>{let I=T.buttonText||{},N=t.defaults.buttonTextKey;return N!=null&&I[N]!=null?I[N]:I[t.type]!=null?I[t.type]:I[b]!=null?I[b]:null},C=T=>{let I=T.buttonHints||{},N=t.defaults.buttonTextKey;return N!=null&&I[N]!=null?I[N]:I[t.type]!=null?I[t.type]:I[b]!=null?I[b]:null};return{type:t.type,component:t.component,duration:p,durationUnit:c,singleUnit:b,optionDefaults:t.defaults,optionOverrides:Object.assign(Object.assign({},k),t.overrides),buttonTextOverride:E(r)||E(n)||t.overrides.buttonText,buttonTextDefault:E(o)||t.defaults.buttonText||E(Td)||t.type,buttonTitleOverride:C(r)||C(n)||t.overrides.buttonHint,buttonTitleDefault:C(o)||t.defaults.buttonHint||C(Td)}}let Hw={};function NL(t){let e=JSON.stringify(t),n=Hw[e];return n===void 0&&(n=on(t),Hw[e]=n),n}function BL(t,e){switch(e.type){case"CHANGE_VIEW_TYPE":t=e.viewType}return t}function VL(t,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return t}}function zL(t,e,n){let r=t.initialDate;return r!=null?e.createMarker(r):n.getDateMarker()}function OL(t,e){switch(e.type){case"SET_OPTION":return Object.assign(Object.assign({},t),{[e.optionName]:e.rawOptionValue});default:return t}}function LL(t,e,n,r){let o;switch(e.type){case"CHANGE_VIEW_TYPE":return r.build(e.dateMarker||n);case"CHANGE_DATE":return r.build(e.dateMarker);case"PREV":if(o=r.buildPrev(t,n),o.isValid)return o;break;case"NEXT":if(o=r.buildNext(t,n),o.isValid)return o;break}return t}function FL(t,e,n){let r=e?e.activeRange:null;return qw({},GL(t,n),r,n)}function $L(t,e,n,r){let o=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return qw(t,e.sources,o,r);case"REMOVE_EVENT_SOURCE":return UL(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Gw(t,o,r):t;case"FETCH_EVENT_SOURCES":return wy(t,e.sourceIds?F1(e.sourceIds):Zw(t,r),o,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return qL(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function jL(t,e,n){let r=e?e.activeRange:null;return wy(t,Zw(t,n),r,!0,n)}function Ww(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function qw(t,e,n,r){let o={};for(let d of e)o[d.sourceId]=d;return n&&(o=Gw(o,n,r)),Object.assign(Object.assign({},t),o)}function UL(t,e){return Oa(t,n=>n.sourceId!==e)}function Gw(t,e,n){return wy(t,Oa(t,r=>HL(r,e,n)),e,!1,n)}function HL(t,e,n){return Yw(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function wy(t,e,n,r,o){let d={};for(let p in t){let c=t[p];e[p]?d[p]=WL(c,n,r,o):d[p]=c}return d}function WL(t,e,n,r){let{options:o,calendarApi:d}=r,p=r.pluginHooks.eventSourceDefs[t.sourceDefId],c=Ba();return p.fetch({eventSource:t,range:e,isRefetch:n,context:r},b=>{let{rawEvents:k}=b;o.eventSourceSuccess&&(k=o.eventSourceSuccess.call(d,k,b.response)||k),t.success&&(k=t.success.call(d,k,b.response)||k),r.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:c,fetchRange:e,rawEvents:k})},b=>{let k=!1;o.eventSourceFailure&&(o.eventSourceFailure.call(d,b),k=!0),t.failure&&(t.failure(b),k=!0),k||console.warn(b.message,b),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:c,fetchRange:e,error:b})}),Object.assign(Object.assign({},t),{isFetching:!0,latestFetchId:c})}function qL(t,e,n,r){let o=t[e];return o&&n===o.latestFetchId?Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},o),{isFetching:!1,fetchRange:r})}):t}function Zw(t,e){return Oa(t,n=>Yw(n,e))}function GL(t,e){let n=tw(e),r=[].concat(t.eventSources||[]),o=[];t.initialEvents&&r.unshift(t.initialEvents),t.events&&r.unshift(t.events);for(let d of r){let p=ew(d,e,n);p&&o.push(p)}return o}function Yw(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}function ZL(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function YL(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function XL(t,e){let n;switch(e.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function KL(t,e){let n;switch(e.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function JL(t,e,n,r,o){let d=t.headerToolbar?Xw(t.headerToolbar,t,e,n,r,o):null,p=t.footerToolbar?Xw(t.footerToolbar,t,e,n,r,o):null;return{header:d,footer:p}}function Xw(t,e,n,r,o,d){let p={},c=[],b=!1;for(let k in t){let E=t[k],C=QL(E,e,n,r,o,d);p[k]=C.widgets,c.push(...C.viewsWithButtons),b=b||C.hasTitle}return{sectionWidgets:p,viewsWithButtons:c,hasTitle:b}}function QL(t,e,n,r,o,d){let p=e.direction==="rtl",c=e.customButtons||{},b=n.buttonText||{},k=e.buttonText||{},E=n.buttonHints||{},C=e.buttonHints||{},T=t?t.split(" "):[],I=[],N=!1;return{widgets:T.map(F=>F.split(",").map(q=>{if(q==="title")return N=!0,{buttonName:q};let J,Q,me,ke,Re,Ee;if(J=c[q])me=Ve=>{J.click&&J.click.call(Ve.target,Ve,Ve.target)},(ke=r.getCustomButtonIconClass(J))||(ke=r.getIconClass(q,p))||(Re=J.text),Ee=J.hint||J.text;else if(Q=o[q]){I.push(q),me=()=>{d.changeView(q)},(Re=Q.buttonTextOverride)||(ke=r.getIconClass(q,p))||(Re=Q.buttonTextDefault);let Ve=Q.buttonTextOverride||Q.buttonTextDefault;Ee=Cd(Q.buttonTitleOverride||Q.buttonTitleDefault||e.viewHint,[Ve,q],Ve)}else if(d[q])if(me=()=>{d[q]()},(Re=b[q])||(ke=r.getIconClass(q,p))||(Re=k[q]),q==="prevYear"||q==="nextYear"){let Ve=q==="prevYear"?"prev":"next";Ee=Cd(E[Ve]||C[Ve],[k.year||"year","year"],k[q])}else Ee=Ve=>Cd(E[q]||C[q],[k[Ve]||Ve,Ve],k[q]);return{buttonName:q,buttonClick:me,buttonIcon:ke,buttonText:Re,buttonHint:Ee}})),viewsWithButtons:I,hasTitle:N}}class eF{constructor(e,n,r){this.type=e,this.getCurrentData=n,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}const tF=Is({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}}]}),nF=Is({name:"func-event-source",eventSourceDefs:[{parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:r}=t.context,o=t.eventSource.meta;fO(o.bind(null,hw(t.range,r)),d=>e({rawEvents:d}),n)}}]}),rF=Is({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:De,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(t){return t.url&&(t.format==="json"||!t.format)?{url:t.url,format:"json",method:(t.method||"GET").toUpperCase(),extraParams:t.extraParams,startParam:t.startParam,endParam:t.endParam,timeZoneParam:t.timeZoneParam}:null},fetch(t,e,n){const{meta:r}=t.eventSource,o=iF(r,t.range,t.context);mO(r.method,r.url,o).then(([d,p])=>{e({rawEvents:d,response:p})},n)}}]});function iF(t,e,n){let{dateEnv:r,options:o}=n,d,p,c,b,k={};return d=t.startParam,d==null&&(d=o.startParam),p=t.endParam,p==null&&(p=o.endParam),c=t.timeZoneParam,c==null&&(c=o.timeZoneParam),typeof t.extraParams=="function"?b=t.extraParams():b=t.extraParams||{},Object.assign(k,b),k[d]=r.formatIso(e.start),k[p]=r.formatIso(e.end),r.timeZone!=="local"&&(k[c]=r.timeZone),k}const sF=Is({name:"simple-recurring-event",recurringTypes:[{parse(t,e){if(t.daysOfWeek||t.startTime||t.endTime||t.startRecur||t.endRecur){let n={daysOfWeek:t.daysOfWeek||null,startTime:t.startTime||null,endTime:t.endTime||null,startRecur:t.startRecur?e.createMarker(t.startRecur):null,endRecur:t.endRecur?e.createMarker(t.endRecur):null,dateEnv:e},r;return t.duration&&(r=t.duration),!r&&t.startTime&&t.endTime&&(r=C3(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:r,typeData:n}}return null},expand(t,e,n){let r=Fo(e,{start:t.startRecur,end:t.endRecur});return r?oF(t.daysOfWeek,t.startTime,t.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:De,startTime:on,endTime:on,duration:on,startRecur:De,endRecur:De}});function oF(t,e,n,r,o){let d=t?F1(t):null,p=Un(o.start),c=o.end,b=[];for(;p<c;){let k;(!d||d[p.getUTCDay()])&&(e?k=r.add(p,e):k=p,b.push(r.createMarker(n.toDate(k)))),p=Er(p,1)}return b}const aF=Is({name:"change-handler",optionChangeHandlers:{events(t,e){Kw([t],e)},eventSources:Kw}});function Kw(t,e){let n=Vg(e.getCurrentData().eventSources);if(n.length===1&&t.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(t[0])){e.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:t[0]});return}let r=[];for(let o of t){let d=!1;for(let p=0;p<n.length;p+=1)if(n[p]._raw===o){n.splice(p,1),d=!0;break}d||r.push(o)}for(let o of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:o.sourceId});for(let o of r)e.calendarApi.addEventSource(o)}function lF(t,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},hw(t.activeRange,e.dateEnv)),{view:e.viewApi}))}function cF(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",$a(t,e))}const dF=[tF,nF,rF,sF,aF,Is({name:"misc",isLoadingFuncs:[t=>Ww(t.eventSources)],propSetHandlers:{dateProfile:lF,eventStore:cF}})];class uF{constructor(e,n){this.runTaskOption=e,this.drainedOption=n,this.queue=[],this.delayedRunner=new kg(this.drain.bind(this))}request(e,n){this.queue.push(e),this.delayedRunner.request(n)}pause(e){this.delayedRunner.pause(e)}resume(e,n){this.delayedRunner.resume(e,n)}drain(){let{queue:e}=this;for(;e.length;){let n=[],r;for(;r=e.shift();)this.runTask(r),n.push(r);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function hF(t,e,n){let r;return/^(year|month)$/.test(t.currentRangeUnit)?r=t.currentRange:r=t.activeRange,n.formatRange(r.start,r.end,Yn(e.titleFormat||pF(t)),{isEndExclusive:t.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function pF(t){let{currentRangeUnit:e}=t;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let n=ip(t.currentRange.start,t.currentRange.end);return n!==null&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class Jw{constructor(){this.resetListeners=new Set}handleInput(e,n){const r=this.dateEnv;if(e!==r&&(typeof n=="function"?this.nowFn=n:r||(this.nowAnchorDate=e.toDate(n?e.createMarker(n):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,r))for(const o of this.resetListeners.values())o()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}}class fF{constructor(e){this.computeCurrentViewData=Pt(this._computeCurrentViewData),this.organizeRawLocales=Pt(wL),this.buildLocale=Pt(Fw),this.buildPluginHooks=SL(),this.buildDateEnv=Pt(mF),this.buildTheme=Pt(gF),this.parseToolbars=Pt(JL),this.buildViewSpecs=Pt(PL),this.buildDateProfileGenerator=sp(yF),this.buildViewApi=Pt(_F),this.buildViewUiProps=sp(vF),this.buildEventUiBySource=Pt(bF,ps),this.buildEventUiBases=Pt(xF),this.parseContextBusinessHours=sp(wF),this.buildTitle=Pt(hF),this.nowManager=new Jw,this.emitter=new yp,this.actionRunner=new uF(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=T=>{this.actionRunner.request(T)},this.props=e,this.actionRunner.pause(),this.nowManager=new Jw;let n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=r.calendarOptions.initialView||r.pluginHooks.initialView,d=this.computeCurrentViewData(o,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(d.options);let p={nowManager:this.nowManager,dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},c=zL(r.calendarOptions,r.dateEnv,this.nowManager),b=d.dateProfileGenerator.build(c);so(b.activeRange,c)||(c=b.currentRange.start);for(let T of r.pluginHooks.contextInit)T(p);let k=FL(r.calendarOptions,b,p),E={dynamicOptionOverrides:n,currentViewType:o,currentDate:c,dateProfile:b,businessHours:this.parseContextBusinessHours(p),eventSources:k,eventUiBases:{},eventStore:Di(),renderableEventStore:Di(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(p).selectionConfig},C=Object.assign(Object.assign({},p),E);for(let T of r.pluginHooks.reducers)Object.assign(E,T(null,null,C));ky(E,p)&&this.emitter.trigger("loading",!0),this.state=E,this.updateData(),this.actionRunner.resume()}resetOptions(e,n){let{props:r}=this;n===void 0?r.optionOverrides=e:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),e),this.optionsForRefining.push(...n)),(n===void 0||n.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:n,state:r,emitter:o}=this,d=OL(r.dynamicOptionOverrides,e),p=this.computeOptionsData(n.optionOverrides,d,n.calendarApi),c=BL(r.currentViewType,e),b=this.computeCurrentViewData(c,p,n.optionOverrides,d);n.calendarApi.currentDataManager=this,o.setThisContext(n.calendarApi),o.setOptions(b.options);let k={nowManager:this.nowManager,dateEnv:p.dateEnv,options:p.calendarOptions,pluginHooks:p.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:o,getCurrentData:this.getCurrentData},{currentDate:E,dateProfile:C}=r;this.data&&this.data.dateProfileGenerator!==b.dateProfileGenerator&&(C=b.dateProfileGenerator.build(E)),E=VL(E,e),C=LL(C,e,E,b.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!so(C.currentRange,E))&&(E=C.currentRange.start);let T=$L(r.eventSources,e,C,k),I=$z(r.eventStore,e,T,C,k),$=Ww(T)&&!b.options.progressiveEventRendering&&r.renderableEventStore||I,{eventUiSingleBase:F,selectionConfig:q}=this.buildViewUiProps(k),J=this.buildEventUiBySource(T),Q=this.buildEventUiBases($.defs,F,J),me={dynamicOptionOverrides:d,currentViewType:c,currentDate:E,dateProfile:C,eventSources:T,eventStore:I,renderableEventStore:$,selectionConfig:q,eventUiBases:Q,businessHours:this.parseContextBusinessHours(k),dateSelection:ZL(r.dateSelection,e),eventSelection:YL(r.eventSelection,e),eventDrag:XL(r.eventDrag,e),eventResize:KL(r.eventResize,e)},ke=Object.assign(Object.assign({},k),me);for(let Ve of p.pluginHooks.reducers)Object.assign(me,Ve(r,e,ke));let Re=ky(r,k),Ee=ky(me,k);!Re&&Ee?o.trigger("loading",!0):Re&&!Ee&&o.trigger("loading",!1),this.state=me,n.onAction&&n.onAction(e)}updateData(){let{props:e,state:n}=this,r=this.data,o=this.computeOptionsData(e.optionOverrides,n.dynamicOptionOverrides,e.calendarApi),d=this.computeCurrentViewData(n.currentViewType,o,e.optionOverrides,n.dynamicOptionOverrides),p=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(n.dateProfile,d.options,o.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o),d),n),c=o.pluginHooks.optionChangeHandlers,b=r&&r.calendarOptions,k=o.calendarOptions;if(b&&b!==k){b.timeZone!==k.timeZone&&(n.eventSources=p.eventSources=jL(p.eventSources,n.dateProfile,p),n.eventStore=p.eventStore=iw(p.eventStore,r.dateEnv,p.dateEnv),n.renderableEventStore=p.renderableEventStore=iw(p.renderableEventStore,r.dateEnv,p.dateEnv));for(let E in c)(this.optionsForHandling.indexOf(E)!==-1||b[E]!==k[E])&&c[E](k[E],p)}this.optionsForHandling=[],e.onData&&e.onData(p)}computeOptionsData(e,n,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:o,pluginHooks:d,localeDefaults:p,availableLocaleData:c,extra:b}=this.processRawCalendarOptions(e,n);Qw(b);let k=this.buildDateEnv(o.timeZone,o.locale,o.weekNumberCalculation,o.firstDay,o.weekText,d,c,o.defaultRangeSeparator),E=this.buildViewSpecs(d.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,p),C=this.buildTheme(o,d),T=this.parseToolbars(o,this.stableOptionOverrides,C,E,r);return this.stableCalendarOptionsData={calendarOptions:o,pluginHooks:d,dateEnv:k,viewSpecs:E,theme:C,toolbarConfig:T,localeDefaults:p,availableRawLocales:c.map}}processRawCalendarOptions(e,n){let{locales:r,locale:o}=Rg([Td,e,n]),d=this.organizeRawLocales(r),p=d.map,c=this.buildLocale(o||d.defaultCode,p).options,b=this.buildPluginHooks(e.plugins||[],dF),k=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},z1),O1),L1),b.listenerRefiners),b.optionRefiners),E={},C=Rg([Td,c,e,n]),T={},I=this.currentCalendarOptionsInput,N=this.currentCalendarOptionsRefined,$=!1;for(let F in C)this.optionsForRefining.indexOf(F)===-1&&(C[F]===I[F]||Va[F]&&F in I&&Va[F](I[F],C[F]))?T[F]=N[F]:k[F]?(T[F]=k[F](C[F]),$=!0):E[F]=I[F];return $&&(this.currentCalendarOptionsInput=C,this.currentCalendarOptionsRefined=T,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:b,availableLocaleData:d,localeDefaults:c,extra:E}}_computeCurrentViewData(e,n,r,o){let d=n.viewSpecs[e];if(!d)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:p,extra:c}=this.processRawViewOptions(d,n.pluginHooks,n.localeDefaults,r,o);Qw(c),this.nowManager.handleInput(n.dateEnv,p.now);let b=this.buildDateProfileGenerator({dateProfileGeneratorClass:d.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:d.duration,durationUnit:d.durationUnit,usesMinMaxTime:d.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:p.slotMinTime,slotMaxTime:p.slotMaxTime,showNonCurrentDates:p.showNonCurrentDates,dayCount:p.dayCount,dateAlignment:p.dateAlignment,dateIncrement:p.dateIncrement,hiddenDays:p.hiddenDays,weekends:p.weekends,validRangeInput:p.validRange,visibleRangeInput:p.visibleRange,fixedWeekCount:p.fixedWeekCount}),k=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:d,options:p,dateProfileGenerator:b,viewApi:k}}processRawViewOptions(e,n,r,o,d){let p=Rg([Td,e.optionDefaults,r,o,e.optionOverrides,d]),c=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},z1),O1),L1),iz),n.listenerRefiners),n.optionRefiners),b={},k=this.currentViewOptionsInput,E=this.currentViewOptionsRefined,C=!1,T={};for(let I in p)p[I]===k[I]||Va[I]&&Va[I](p[I],k[I])?b[I]=E[I]:(p[I]===this.currentCalendarOptionsInput[I]||Va[I]&&Va[I](p[I],this.currentCalendarOptionsInput[I])?I in this.currentCalendarOptionsRefined&&(b[I]=this.currentCalendarOptionsRefined[I]):c[I]?b[I]=c[I](p[I]):T[I]=p[I],C=!0);return C&&(this.currentViewOptionsInput=p,this.currentViewOptionsRefined=b),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:T}}}function mF(t,e,n,r,o,d,p,c){let b=Fw(e||p.defaultCode,p.map);return new mz({calendarSystem:"gregory",timeZone:t,namedTimeZoneImpl:d.namedTimeZonedImpl,locale:b,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:d.cmdFormatter,defaultSeparator:c})}function gF(t,e){let n=e.themeClasses[t.themeSystem]||$o;return new n(t)}function yF(t){let e=t.dateProfileGeneratorClass||Z1;return new e(t)}function _F(t,e,n){return new eF(t,e,n)}function bF(t){return ro(t,e=>e.ui)}function xF(t,e,n){let r={"":e};for(let o in t){let d=t[o];d.sourceId&&n[d.sourceId]&&(r[o]=n[d.sourceId])}return r}function vF(t){let{options:e}=t;return{eventUiSingleBase:gp({display:e.eventDisplay,editable:e.editable,startEditable:e.eventStartEditable,durationEditable:e.eventDurationEditable,constraint:e.eventConstraint,overlap:typeof e.eventOverlap=="boolean"?e.eventOverlap:void 0,allow:e.eventAllow,backgroundColor:e.eventBackgroundColor,borderColor:e.eventBorderColor,textColor:e.eventTextColor,color:e.eventColor},t),selectionConfig:gp({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function ky(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function wF(t){return Xz(t.options.businessHours,t)}function Qw(t,e){for(let n in t)console.warn(`Unknown option '${n}'`)}class kF extends bn{render(){let e=this.props.widgetGroups.map(n=>this.renderWidgetGroup(n));return le("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:n}=this,{theme:r}=this.context,o=[],d=!0;for(let p of e){let{buttonName:c,buttonClick:b,buttonText:k,buttonIcon:E,buttonHint:C}=p;if(c==="title")d=!1,o.push(le("h2",{className:"fc-toolbar-title",id:n.titleId},n.title));else{let T=c===n.activeButton,I=!n.isTodayEnabled&&c==="today"||!n.isPrevEnabled&&c==="prev"||!n.isNextEnabled&&c==="next",N=[`fc-${c}-button`,r.getClass("button")];T&&N.push(r.getClass("buttonActive")),o.push(le("button",{type:"button",title:typeof C=="function"?C(n.navUnit):C,disabled:I,"aria-pressed":T,className:N.join(" "),onClick:b},k||(E?le("span",{className:E,role:"img"}):"")))}}if(o.length>1){let p=d&&r.getClass("buttonGroup")||"";return le("div",{className:p},...o)}return o[0]}}class ek extends bn{render(){let{model:e,extraClassName:n}=this.props,r=!1,o,d,p=e.sectionWidgets,c=p.center;return p.left?(r=!0,o=p.left):o=p.start,p.right?(r=!0,d=p.right):d=p.end,le("div",{className:[n||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",o||[]),this.renderSection("center",c||[]),this.renderSection("end",d||[]))}renderSection(e,n){let{props:r}=this;return le(kF,{key:e,widgetGroups:n,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}}class EF extends bn{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Ms(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:n}=this,{aspectRatio:r}=e,o=["fc-view-harness",r||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],d="",p="";return r?n.availableWidth!==null?d=n.availableWidth/r:p=`${1/r*100}%`:d=e.height||"",le("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:o.join(" "),style:{height:d,paddingBottom:p}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class CF extends Zl{constructor(e){super(e),this.handleSegClick=(n,r)=>{let{component:o}=this,{context:d}=o,p=Gl(r);if(p&&o.isValidSegDownEl(n.target)){let c=jr(n.target,".fc-event-forced-url"),b=c?c.querySelector("a[href]").href:"";d.emitter.trigger("eventClick",{el:r,event:new Qn(o.context,p.eventRange.def,p.eventRange.instance),jsEvent:n,view:d.viewApi}),b&&!n.defaultPrevented&&(window.location.href=b)}},this.destroy=k1(e.el,"click",".fc-event",this.handleSegClick)}}class SF extends Zl{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{Gl(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",n,r))},this.handleSegLeave=(n,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,r))},this.removeHoverListeners=d3(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,r){let{component:o}=this,{context:d}=o,p=Gl(r);(!n||o.isValidSegDownEl(n.target))&&d.emitter.trigger(e,{el:r,event:new Qn(d,p.eventRange.def,p.eventRange.instance),jsEvent:n,view:d.viewApi})}}class TF extends La{constructor(){super(...arguments),this.buildViewContext=Pt(_z),this.buildViewPropTransformers=Pt(DF),this.buildToolbarProps=Pt(AF),this.headerRef=Qr(),this.footerRef=Qr(),this.interactionsStore={},this.state={viewLabelId:No()},this.registerInteractiveComponent=(e,n)=>{let r=_O(e,n),p=[CF,SF].concat(this.props.pluginHooks.componentInteractions).map(c=>new c(r));this.interactionsStore[e.uid]=p,ty[e.uid]=r},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let r of n)r.destroy();delete this.interactionsStore[e.uid]}delete ty[e.uid]},this.resizeRunner=new kg(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:n}=this.props;n.handleWindowResize&&e.target===window&&this.resizeRunner.request(n.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:n,options:r}=e,o=!1,d="",p;e.isHeightAuto||e.forPrint?d="":r.height!=null?o=!0:r.contentHeight!=null?d=r.contentHeight:p=Math.max(r.aspectRatio,.5);let c=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),b=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return le(io.Provider,{value:c},le(ja,{unit:"day"},k=>{let E=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,k,e.viewTitle);return le(Bn,null,n.header&&le(ek,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:b},E)),le(EF,{liquid:o,height:d,aspectRatio:p,labeledById:b},this.renderView(e),this.buildAppendContent()),n.footer&&le(ek,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},E)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:n}=e.pluginHooks;for(let r in n)n[r](e[r],e)}componentDidUpdate(e){let{props:n}=this,{propSetHandlers:r}=n.pluginHooks;for(let o in r)n[o]!==e[o]&&r[o](n[o],n)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this,n=e.pluginHooks.viewContainerAppends.map(r=>r(e));return le(Bn,{},...n)}renderView(e){let{pluginHooks:n}=e,{viewSpec:r}=e,o={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},d=this.buildViewPropTransformers(n.viewPropsTransformers);for(let c of d)Object.assign(o,c.transform(o,e));let p=r.component;return le(p,Object.assign({},o))}}function AF(t,e,n,r,o,d){let p=n.build(o,void 0,!1),c=n.buildPrev(e,r,!1),b=n.buildNext(e,r,!1);return{title:d,activeButton:t.type,navUnit:t.singleUnit,isTodayEnabled:p.isValid&&!so(e.currentRange,o),isPrevEnabled:c.isValid,isNextEnabled:b.isValid}}function DF(t){return t.map(e=>new e)}class MF extends xO{constructor(e,n={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;up(()=>{kd(le(yO,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(o,d,p,c)=>(this.setClassNames(o),this.setHeight(d),le(H1.Provider,{value:this.customContentRenderId},le(TF,Object.assign({isHeightAuto:p,forPrint:c},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,kd(null,this.el),this.setClassNames([]),this.setHeight(""))},t3(e),this.el=e,this.renderRunner=new kg(this.handleRenderRequest),new fF({optionOverrides:n,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){up(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,n){this.currentDataManager.resetOptions(e,n)}setClassNames(e){if(!Bo(e,this.currentClassNames)){let{classList:n}=this.el;for(let r of this.currentClassNames)n.remove(r);for(let r of e)n.add(r);this.currentClassNames=e}}setHeight(e){x1(this.el,"height",e)}}const IF={headerToolbar:!0,footerToolbar:!0,events:!0,eventSources:!0,resources:!0},PF=a.defineComponent({props:{options:Object},data(){return{renderId:0,customRenderingMap:new Map}},methods:{getApi(){return this.calendar},buildOptions(t){return{...t,customRenderingMetaMap:BF(this.$slots),handleCustomRendering:this.handleCustomRendering}}},render(){const t=[];for(const e of this.customRenderingMap.values())t.push(a.h(RF,{key:e.id,customRendering:e}));return a.h("div",{attrs:{"data-fc-render-id":this.renderId}},a.h(a.Fragment,t))},mounted(){const t=new xL;this.handleCustomRendering=t.handle.bind(t);const e=this.buildOptions(this.options),n=new MF(this.$el,e);this.calendar=n,n.render(),t.subscribe(r=>{this.customRenderingMap=r,this.renderId++,this.needCustomRenderingResize=!0})},beforeUpdate(){this.getApi().resumeRendering()},updated(){this.needCustomRenderingResize&&(this.needCustomRenderingResize=!1,this.getApi().updateSize())},beforeUnmount(){this.getApi().destroy()},watch:NF()}),RF=a.defineComponent({props:{customRendering:Object},render(){const t=this.customRendering,e=typeof t.generatorMeta=="function"?t.generatorMeta(t.renderProps):t.generatorMeta;return a.h(a.Teleport,{to:t.containerEl},e)}});function aK(t){return t}function NF(){let t={options:{deep:!0,handler(e){let n=this.getApi();n.pauseRendering();let r=this.buildOptions(e);n.resetOptions(r),this.renderId++}}};for(let e in IF)t[`options.${e}`]={deep:!0,handler(n){if(n!==void 0){let r=this.getApi();r.pauseRendering(),r.resetOptions({[e]:n},[e]),this.renderId++}}};return t}function BF(t){const e={};for(const n in t)e[VF(n)]=t[n];return e}function VF(t){return t.split("-").map((e,n)=>n?zF(e):e).join("")}function zF(t){return t.charAt(0).toUpperCase()+t.slice(1)}class OF extends fs{constructor(){super(...arguments),this.headerElRef=Qr()}renderSimpleLayout(e,n){let{props:r,context:o}=this,d=[],p=kp(o.options);return e&&d.push({type:"header",key:"header",isSticky:p,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),d.push({type:"body",key:"body",liquid:!0,chunk:{content:n}}),le(Dd,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},le(my,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:d}))}renderHScrollLayout(e,n,r,o){let d=this.context.pluginHooks.scrollGridImpl;if(!d)throw new Error("No ScrollGrid implementation");let{props:p,context:c}=this,b=!p.forPrint&&kp(c.options),k=!p.forPrint&&Iw(c.options),E=[];return e&&E.push({type:"header",key:"header",isSticky:b,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),E.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:n}]}),k&&E.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:fy}]}),le(Dd,{elClasses:["fc-daygrid"],viewSpec:c.viewSpec},le(d,{liquid:!p.isHeightAuto&&!p.forPrint,forPrint:p.forPrint,collapsibleWidth:p.forPrint,colGroups:[{cols:[{span:r,minWidth:o}]}],sections:E}))}}function Cp(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.row].push(r);return n}function Sp(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.firstCol].push(r);return n}function tk(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.row].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}const nk=Yn({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function rk(t){let{display:e}=t.eventRange.ui;return e==="list-item"||e==="auto"&&!t.eventRange.def.allDay&&t.firstCol===t.lastCol&&t.isStart&&t.isEnd}class ik extends bn{render(){let{props:e}=this;return le(gy,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:nk,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class sk extends bn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:o}=e,d=r.eventTimeFormat||nk,p=Id(o,d,n,!0,e.defaultDisplayEventEnd);return le(Ep,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:Jg(e.seg,n),defaultGenerator:LF,timeText:p,isResizing:!1,isDateSelecting:!1}))}}function LF(t){return le(Bn,null,le("div",{className:"fc-daygrid-event-dot",style:{borderColor:t.borderColor||t.backgroundColor}}),t.timeText&&le("div",{className:"fc-event-time"},t.timeText),le("div",{className:"fc-event-title"},t.event.title||le(Bn,null," ")))}class FF extends bn{constructor(){super(...arguments),this.compileSegs=Pt($F)}render(){let{props:e}=this,{allSegs:n,invisibleSegs:r}=this.compileSegs(e.singlePlacements);return le(Bw,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let o=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return le(Bn,null,n.map(d=>{let p=d.eventRange.instance.instanceId;return le("div",{className:"fc-daygrid-event-harness",key:p,style:{visibility:o[p]?"hidden":""}},rk(d)?le(sk,Object.assign({seg:d,isDragging:!1,isSelected:p===e.eventSelection,defaultDisplayEventEnd:!1},oo(d,e.todayRange))):le(ik,Object.assign({seg:d,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:p===e.eventSelection,defaultDisplayEventEnd:!1},oo(d,e.todayRange))))}))}})}}function $F(t){let e=[],n=[];for(let r of t)e.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:e,invisibleSegs:n}}const jF=Yn({week:"narrow"});class UF extends fs{constructor(){super(...arguments),this.rootElRef=Qr(),this.state={dayNumberId:No()},this.handleRootEl=e=>{Ms(this.rootElRef,e),Ms(this.props.elRef,e)}}render(){let{context:e,props:n,state:r,rootElRef:o}=this,{options:d,dateEnv:p}=e,{date:c,dateProfile:b}=n;const k=n.showDayNumber&&WF(c,b.currentRange,p);return le(_y,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...n.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},n.extraDataAttrs),n.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:HF,date:c,dateProfile:b,todayRange:n.todayRange,showDayNumber:n.showDayNumber,isMonthStart:k,extraRenderProps:n.extraRenderProps},(E,C)=>le("div",{ref:n.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:n.minHeight}},n.showWeekNumber&&le(Nw,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Yl(e,c,"week"),date:c,defaultFormat:jF}),!C.isDisabled&&(n.showDayNumber||by(d)||n.forceDayTop)?le("div",{className:"fc-daygrid-day-top"},le(E,{elTag:"a",elClasses:["fc-daygrid-day-number",k&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Yl(e,c)),{id:r.dayNumberId})})):n.showDayNumber?le("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},le("a",{className:"fc-daygrid-day-number"}," ")):void 0,le("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,le("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},le(FF,{allDayDate:c,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:o,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),le("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}}function HF(t){return t.dayNumberText||le(Bn,null," ")}function WF(t,e,n){const{start:r,end:o}=e,d=Vo(o,-1),p=n.getYear(r),c=n.getMonth(r),b=n.getYear(d),k=n.getMonth(d);return!(p===b&&c===k)&&(t.valueOf()===r.valueOf()||n.getDay(t)===1&&t.valueOf()<o.valueOf())}function ok(t){return t.eventRange.instance.instanceId+":"+t.firstCol}function ak(t){return ok(t)+":"+t.lastCol}function qF(t,e,n,r,o,d,p){let c=new YF(q=>{let J=t[q.index].eventRange.instance.instanceId+":"+q.span.start+":"+(q.span.end-1);return o[J]||1});c.allowReslicing=!0,c.strictOrder=r,e===!0||n===!0?(c.maxCoord=d,c.hiddenConsumes=!0):typeof e=="number"?c.maxStackCnt=e:typeof n=="number"&&(c.maxStackCnt=n,c.hiddenConsumes=!0);let b=[],k=[];for(let q=0;q<t.length;q+=1){let J=t[q],Q=ak(J);o[Q]!=null?b.push({index:q,span:{start:J.firstCol,end:J.lastCol+1}}):k.push(J)}let E=c.addSegs(b),C=c.toRects(),{singleColPlacements:T,multiColPlacements:I,leftoverMargins:N}=GF(C,t,p),$=[],F=[];for(let q of k){I[q.firstCol].push({seg:q,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let J=q.firstCol;J<=q.lastCol;J+=1)T[J].push({seg:Kl(q,J,J+1,p),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let q=0;q<p.length;q+=1)$.push(0);for(let q of E){let J=t[q.index],Q=q.span;I[Q.start].push({seg:Kl(J,Q.start,Q.end,p),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let me=Q.start;me<Q.end;me+=1)$[me]+=1,T[me].push({seg:Kl(J,me,me+1,p),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let q=0;q<p.length;q+=1)F.push(N[q]);return{singleColPlacements:T,multiColPlacements:I,moreCnts:$,moreMarginTops:F}}function GF(t,e,n){let r=ZF(t,n.length),o=[],d=[],p=[];for(let c=0;c<n.length;c+=1){let b=r[c],k=[],E=0,C=0;for(let I of b){let N=e[I.index];k.push({seg:Kl(N,c,c+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:I.levelCoord,marginTop:I.levelCoord-E}),E=I.levelCoord+I.thickness}let T=[];E=0,C=0;for(let I of b){let N=e[I.index],$=I.span.end-I.span.start>1,F=I.span.start===c;C+=I.levelCoord-E,E=I.levelCoord+I.thickness,$?(C+=I.thickness,F&&T.push({seg:Kl(N,I.span.start,I.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:I.levelCoord,marginTop:0})):F&&(T.push({seg:Kl(N,I.span.start,I.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:I.levelCoord,marginTop:C}),C=0)}o.push(k),d.push(T),p.push(C)}return{singleColPlacements:o,multiColPlacements:d,leftoverMargins:p}}function ZF(t,e){let n=[];for(let r=0;r<e;r+=1)n.push([]);for(let r of t)for(let o=r.span.start;o<r.span.end;o+=1)n[o].push(r);return n}function Kl(t,e,n,r){if(t.firstCol===e&&t.lastCol===n-1)return t;let o=t.eventRange,d=o.range,p=Fo(d,{start:r[e].date,end:Er(r[n-1].date,1)});return Object.assign(Object.assign({},t),{firstCol:e,lastCol:n-1,eventRange:{def:o.def,ui:Object.assign(Object.assign({},o.ui),{durationEditable:!1}),instance:o.instance,range:p},isStart:t.isStart&&p.start.valueOf()===d.start.valueOf(),isEnd:t.isEnd&&p.end.valueOf()===d.end.valueOf()})}class YF extends bw{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const n=super.addSegs(e),{entriesByLevel:r}=this,o=d=>!this.forceHidden[Ua(d)];for(let d=0;d<r.length;d+=1)r[d]=r[d].filter(o);return n}handleInvalidInsertion(e,n,r){const{entriesByLevel:o,forceHidden:d}=this,{touchingEntry:p,touchingLevel:c,touchingLateral:b}=e;if(this.hiddenConsumes&&p){const k=Ua(p);if(!d[k])if(this.allowReslicing){const E=Object.assign(Object.assign({},p),{span:cy(p.span,n.span)}),C=Ua(E);d[C]=!0,o[c][b]=E,r.push(E),this.splitEntry(p,n,r)}else d[k]=!0,r.push(p)}super.handleInvalidInsertion(e,n,r)}}class lk extends fs{constructor(){super(...arguments),this.cellElRefs=new ao,this.frameElRefs=new ao,this.fgElRefs=new ao,this.segHarnessRefs=new ao,this.rootElRef=Qr(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:n,context:r}=this,{options:o}=r,d=e.cells.length,p=Sp(e.businessHourSegs,d),c=Sp(e.bgEventSegs,d),b=Sp(this.getHighlightSegs(),d),k=Sp(this.getMirrorSegs(),d),{singleColPlacements:E,multiColPlacements:C,moreCnts:T,moreMarginTops:I}=qF(Kg(e.fgEventSegs,o.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,o.eventOrderStrict,n.segHeights,n.maxContentHeight,e.cells),N=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return le("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(($,F)=>{let q=this.renderFgSegs(F,e.forPrint?E[F]:C[F],e.todayRange,N),J=this.renderFgSegs(F,XF(k[F],C),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return le(UF,{key:$.key,elRef:this.cellElRefs.createRef($.key),innerElRef:this.frameElRefs.createRef($.key),dateProfile:e.dateProfile,date:$.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&F===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:$.extraRenderProps,extraDataAttrs:$.extraDataAttrs,extraClassNames:$.extraClassNames,extraDateSpan:$.extraDateSpan,moreCnt:T[F],moreMarginTop:I[F],singlePlacements:E[F],fgContentElRef:this.fgElRefs.createRef($.key),fgContent:le(Bn,null,le(Bn,null,q),le(Bn,null,J)),bgContent:le(Bn,null,this.renderFillSegs(b[F],"highlight"),this.renderFillSegs(p[F],"non-business"),this.renderFillSegs(c[F],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,n){let r=this.props;this.updateSizing(!ps(e,r))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,n,r,o,d,p,c){let{context:b}=this,{eventSelection:k}=this.props,{framePositions:E}=this.state,C=this.props.cells.length===1,T=d||p||c,I=[];if(E)for(let N of n){let{seg:$}=N,{instanceId:F}=$.eventRange.instance,q=N.isVisible&&!o[F],J=N.isAbsolute,Q="",me="";J&&(b.isRtl?(me=0,Q=E.lefts[$.lastCol]-E.lefts[$.firstCol]):(Q=0,me=E.rights[$.firstCol]-E.rights[$.lastCol])),I.push(le("div",{className:"fc-daygrid-event-harness"+(J?" fc-daygrid-event-harness-abs":""),key:ok($),ref:T?null:this.segHarnessRefs.createRef(ak($)),style:{visibility:q?"":"hidden",marginTop:J?"":N.marginTop,top:J?N.absoluteTop:"",left:Q,right:me}},rk($)?le(sk,Object.assign({seg:$,isDragging:d,isSelected:F===k,defaultDisplayEventEnd:C},oo($,r))):le(ik,Object.assign({seg:$,isDragging:d,isResizing:p,isDateSelecting:c,isSelected:F===k,defaultDisplayEventEnd:C},oo($,r)))))}return I}renderFillSegs(e,n){let{isRtl:r}=this.context,{todayRange:o}=this.props,{framePositions:d}=this.state,p=[];if(d)for(let c of e){let b=r?{right:0,left:d.lefts[c.lastCol]-d.lefts[c.firstCol]}:{left:0,right:d.rights[c.firstCol]-d.rights[c.lastCol]};p.push(le("div",{key:uw(c.eventRange),className:"fc-daygrid-bg-harness",style:b},n==="bg-event"?le(Pw,Object.assign({seg:c},oo(c,o))):Rw(n)))}return le(Bn,{},...p)}updateSizing(e){let{props:n,state:r,frameElRefs:o}=this;if(!n.forPrint&&n.clientWidth!==null){if(e){let b=n.cells.map(k=>o.currentMap[k.key]);if(b.length){let k=this.rootElRef.current,E=new Xl(k,b,!0,!1);(!r.framePositions||!r.framePositions.similarTo(E))&&this.setState({framePositions:new Xl(k,b,!0,!1)})}}const d=this.state.segHeights,p=this.querySegHeights(),c=n.dayMaxEvents===!0||n.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},d),p),maxContentHeight:c?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,n={};for(let r in e){let o=Math.round(e[r].getBoundingClientRect().height);n[r]=Math.max(n[r]||0,o)}return n}computeMaxContentHeight(){let e=this.props.cells[0].key,n=this.cellElRefs.currentMap[e],r=this.fgElRefs.currentMap[e];return n.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(n=>e[n.key])}}lk.addStateEquality({segHeights:ps});function XF(t,e){if(!t.length)return[];let n=KF(e);return t.map(r=>({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:n[r.eventRange.instance.instanceId],marginTop:0}))}function KF(t){let e={};for(let n of t)for(let r of n)e[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return e}class JF extends fs{constructor(){super(...arguments),this.splitBusinessHourSegs=Pt(Cp),this.splitBgEventSegs=Pt(QF),this.splitFgEventSegs=Pt(Cp),this.splitDateSelectionSegs=Pt(Cp),this.splitEventDrag=Pt(tk),this.splitEventResize=Pt(tk),this.rowRefs=new ao}render(){let{props:e,context:n}=this,r=e.cells.length,o=this.splitBusinessHourSegs(e.businessHourSegs,r),d=this.splitBgEventSegs(e.bgEventSegs,r),p=this.splitFgEventSegs(e.fgEventSegs,r),c=this.splitDateSelectionSegs(e.dateSelectionSegs,r),b=this.splitEventDrag(e.eventDrag,r),k=this.splitEventResize(e.eventResize,r),E=r>=7&&e.clientWidth?e.clientWidth/n.options.aspectRatio/6:null;return le(ja,{unit:"day"},(C,T)=>le(Bn,null,e.cells.map((I,N)=>le(lk,{ref:this.rowRefs.createRef(N),key:I.length?I[0].date.toISOString():N,showDayNumbers:r>1,showWeekNumbers:e.showWeekNumbers,todayRange:T,dateProfile:e.dateProfile,cells:I,renderIntro:e.renderRowIntro,businessHourSegs:o[N],eventSelection:e.eventSelection,bgEventSegs:d[N],fgEventSegs:p[N],dateSelectionSegs:c[N],eventDrag:b[N],eventResize:k[N],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:E,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],n=e?e.closest(".fc-daygrid-body"):null;n&&(this.rootEl=n,this.context.registerInteractiveComponent(this,{el:n,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new Xl(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new Xl(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,n){let{colPositions:r,rowPositions:o}=this,d=r.leftToIndex(e),p=o.topToIndex(n);if(p!=null&&d!=null){let c=this.props.cells[p][d];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(p,d),allDay:!0},c.extraDateSpan),dayEl:this.getCellEl(p,d),rect:{left:r.lefts[d],right:r.rights[d],top:o.tops[p],bottom:o.bottoms[p]},layer:0}}return null}getCellEl(e,n){return this.rowRefs.currentMap[e].getCellEls()[n]}getCellRange(e,n){let r=this.props.cells[e][n].date,o=Er(r,1);return{start:r,end:o}}}function QF(t,e){return Cp(t.filter(e6),e)}function e6(t){return t.eventRange.def.allDay}class t6 extends fs{constructor(){super(...arguments),this.elRef=Qr(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:n,dayMaxEvents:r,expandRows:o}=e,d=r===!0||n===!0;d&&!o&&(d=!1,n=null,r=null);let p=["fc-daygrid-body",d?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"];return le("div",{ref:this.elRef,className:p.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},le("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:o?e.clientHeight:""}},e.colGroupNode,le("tbody",{role:"presentation"},le(JF,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:r,dayMaxEventRows:n,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=n6(this.elRef.current,this.props.dateProfile);if(e){const n=e.closest(".fc-daygrid-body"),r=n.closest(".fc-scroller"),o=e.getBoundingClientRect().top-n.getBoundingClientRect().top;r.scrollTop=o?o+1:0}this.needsScrollReset=!1}}}function n6(t,e){let n;return e.currentRangeUnit.match(/year|month/)&&(n=t.querySelector(`[data-date="${$3(e.currentDate)}-01"]`)),n||(n=t.querySelector(`[data-date="${Sd(e.currentDate)}"]`)),n}class r6 extends Cw{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}class ck extends fs{constructor(){super(...arguments),this.slicer=new r6,this.tableRef=Qr()}render(){let{props:e,context:n}=this;return le(t6,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,n,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}class i6 extends OF{constructor(){super(...arguments),this.buildDayTableModel=Pt(s6),this.headerRef=Qr(),this.tableRef=Qr()}render(){let{options:e,dateProfileGenerator:n}=this.context,{props:r}=this,o=this.buildDayTableModel(r.dateProfile,n),d=e.dayHeaders&&le(ww,{ref:this.headerRef,dateProfile:r.dateProfile,dates:o.headerDates,datesRepDistinctDays:o.rowCnt===1}),p=c=>le(ck,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:o,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:c.tableColGroupNode,tableMinWidth:c.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:c.clientWidth,clientHeight:c.clientHeight,forPrint:r.forPrint});return e.dayMinWidth?this.renderHScrollLayout(d,p,o.colCnt,e.dayMinWidth):this.renderSimpleLayout(d,p)}}function s6(t,e){let n=new kw(t.renderRange,e);return new Ew(n,/year|month|week/.test(t.currentRangeUnit))}class o6 extends Z1{buildRenderRange(e,n,r){let o=super.buildRenderRange(e,n,r),{props:d}=this;return a6({currentRange:o,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:d.fixedWeekCount,dateEnv:d.dateEnv})}}function a6(t){let{dateEnv:e,currentRange:n}=t,{start:r,end:o}=n,d;if(t.snapToWeek&&(r=e.startOfWeek(r),d=e.startOfWeek(o),d.valueOf()!==o.valueOf()&&(o=M1(d,1))),t.fixedWeekCount){let p=e.startOfWeek(e.startOfMonth(Er(n.end,-1))),c=Math.ceil(M3(p,o));o=M1(o,6-c)}return{start:r,end:o}}var l6=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';tp(l6);var c6=Is({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:i6,dateProfileGeneratorClass:o6},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class d6 extends CO{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?tO(e)?["timed","allDay"]:["allDay"]:["timed"]}}const u6=Yn({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function dk(t){let e=["fc-timegrid-slot","fc-timegrid-slot-label",t.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return le(io.Consumer,null,n=>{if(!t.isLabeled)return le("td",{className:e.join(" "),"data-time":t.isoTimeStr});let{dateEnv:r,options:o,viewApi:d}=n,p=o.slotLabelFormat==null?u6:Array.isArray(o.slotLabelFormat)?Yn(o.slotLabelFormat[0]):Yn(o.slotLabelFormat),c={level:0,time:t.time,date:r.toDate(t.date),view:d,text:r.format(t.date,p)};return le(Ur,{elTag:"td",elClasses:e,elAttrs:{"data-time":t.isoTimeStr},renderProps:c,generatorName:"slotLabelContent",customGenerator:o.slotLabelContent,defaultGenerator:h6,classNameGenerator:o.slotLabelClassNames,didMount:o.slotLabelDidMount,willUnmount:o.slotLabelWillUnmount},b=>le("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},le(b,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function h6(t){return t.text}class p6 extends bn{render(){return this.props.slatMetas.map(e=>le("tr",{key:e.key},le(dk,Object.assign({},e))))}}const f6=Yn({week:"short"}),m6=5;class g6 extends fs{constructor(){super(...arguments),this.allDaySplitter=new d6,this.headerElRef=Qr(),this.rootElRef=Qr(),this.scrollerElRef=Qr(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let n=this.scrollerElRef.current;n&&(n.scrollTop=e)},this.renderHeadAxis=(e,n="")=>{let{options:r}=this.context,{dateProfile:o}=this.props,d=o.renderRange,c=zo(d.start,d.end)===1?Yl(this.context,d.start,"week"):{};return r.weekNumbers&&e==="day"?le(Nw,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:d.start,defaultFormat:f6},b=>le("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:n}},le(b,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:c}))):le("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},le("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},this.renderTableRowAxis=e=>{let{options:n,viewApi:r}=this.context,o={text:n.allDayText,view:r};return le(Ur,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:o,generatorName:"allDayContent",customGenerator:n.allDayContent,defaultGenerator:y6,classNameGenerator:n.allDayClassNames,didMount:n.allDayDidMount,willUnmount:n.allDayWillUnmount},d=>le("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},le(d,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,n,r){let{context:o,props:d}=this,p=[],c=kp(o.options);return e&&p.push({type:"header",key:"header",isSticky:c,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),n&&(p.push({type:"body",key:"all-day",chunk:{content:n}}),p.push({type:"body",key:"all-day-divider",outerContent:le("tr",{role:"presentation",className:"fc-scrollgrid-section"},le("td",{className:"fc-timegrid-divider "+o.theme.getClass("tableCellShaded")}))})),p.push({type:"body",key:"body",liquid:!0,expandRows:!!o.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:r}}),le(Dd,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:o.viewSpec},le(my,{liquid:!d.isHeightAuto&&!d.forPrint,collapsibleWidth:d.forPrint,cols:[{width:"shrink"}],sections:p}))}renderHScrollLayout(e,n,r,o,d,p,c){let b=this.context.pluginHooks.scrollGridImpl;if(!b)throw new Error("No ScrollGrid implementation");let{context:k,props:E}=this,C=!E.forPrint&&kp(k.options),T=!E.forPrint&&Iw(k.options),I=[];e&&I.push({type:"header",key:"header",isSticky:C,syncRowHeights:!0,chunks:[{key:"axis",rowContent:$=>le("tr",{role:"presentation"},this.renderHeadAxis("day",$.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),n&&(I.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:$=>le("tr",{role:"presentation"},this.renderTableRowAxis($.rowSyncHeights[0]))},{key:"cols",content:n}]}),I.push({key:"all-day-divider",type:"body",outerContent:le("tr",{role:"presentation",className:"fc-scrollgrid-section"},le("td",{colSpan:2,className:"fc-timegrid-divider "+k.theme.getClass("tableCellShaded")}))}));let N=k.options.nowIndicator;return I.push({type:"body",key:"body",liquid:!0,expandRows:!!k.options.expandRows,chunks:[{key:"axis",content:$=>le("div",{className:"fc-timegrid-axis-chunk"},le("table",{"aria-hidden":!0,style:{height:$.expandRows?$.clientHeight:""}},$.tableColGroupNode,le("tbody",null,le(p6,{slatMetas:p}))),le("div",{className:"fc-timegrid-now-indicator-container"},le(ja,{unit:N?"minute":"day"},F=>{let q=N&&c&&c.safeComputeTop(F);return typeof q=="number"?le(yy,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:q},isAxis:!0,date:F}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:r}]}),T&&I.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:fy},{key:"cols",content:fy}]}),le(Dd,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:k.viewSpec},le(b,{liquid:!E.isHeightAuto&&!E.forPrint,forPrint:E.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:o,minWidth:d}]}],sections:I}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:n}=this.context.options;return(e===!0||n===!0)&&(e=void 0,n=m6),{dayMaxEvents:e,dayMaxEventRows:n}}}function y6(t){return t.text}class _6{constructor(e,n,r){this.positions=e,this.dateProfile=n,this.slotDuration=r}safeComputeTop(e){let{dateProfile:n}=this;if(so(n.currentRange,e)){let r=Un(e),o=e.valueOf()-r.valueOf();if(o>=hs(n.slotMinTime)&&o<hs(n.slotMaxTime))return this.computeTimeTop(on(o))}return null}computeDateTop(e,n){return n||(n=Un(e)),this.computeTimeTop(on(e.valueOf()-n.valueOf()))}computeTimeTop(e){let{positions:n,dateProfile:r}=this,o=n.els.length,d=(e.milliseconds-hs(r.slotMinTime))/hs(this.slotDuration),p,c;return d=Math.max(0,d),d=Math.min(o,d),p=Math.floor(d),p=Math.min(p,o-1),c=d-p,n.tops[p]+n.getHeight(p)*c}}class b6 extends bn{render(){let{props:e,context:n}=this,{options:r}=n,{slatElRefs:o}=e;return le("tbody",null,e.slatMetas.map((d,p)=>{let c={time:d.time,date:n.dateEnv.toDate(d.date),view:n.viewApi};return le("tr",{key:d.key,ref:o.createRef(d.key)},e.axis&&le(dk,Object.assign({},d)),le(Ur,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!d.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":d.isoTimeStr},renderProps:c,generatorName:"slotLaneContent",customGenerator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount}))}))}}class x6 extends bn{constructor(){super(...arguments),this.rootElRef=Qr(),this.slatElRefs=new ao}render(){let{props:e,context:n}=this;return le("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},le("table",{"aria-hidden":!0,className:n.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,le(b6,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:n}=this;n.onCoords&&n.clientWidth!==null&&this.rootElRef.current.offsetHeight&&n.onCoords(new _6(new Xl(this.rootElRef.current,v6(this.slatElRefs.currentMap,n.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function v6(t,e){return e.map(n=>t[n.key])}function Pd(t,e){let n=[],r;for(r=0;r<e;r+=1)n.push([]);if(t)for(r=0;r<t.length;r+=1)n[t[r].col].push(t[r]);return n}function uk(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.col].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}class w6 extends bn{render(){let{props:e}=this;return le(Bw,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>mk(e.hiddenSegs,e),defaultGenerator:k6,forceTimed:!0},n=>le(n,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function k6(t){return t.shortText}function E6(t,e,n){let r=new bw;e!=null&&(r.strictOrder=e),n!=null&&(r.maxStackCnt=n);let o=r.addSegs(t),d=OO(o),p=C6(r);return p=D6(p,1),{segRects:M6(p),hiddenGroups:d}}function C6(t){const{entriesByLevel:e}=t,n=Ey((r,o)=>r+":"+o,(r,o)=>{let d=A6(t,r,o),p=hk(d,n),c=e[r][o];return[Object.assign(Object.assign({},c),{nextLevelNodes:p[0]}),c.thickness+p[1]]});return hk(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n)[0]}function hk(t,e){if(!t)return[[],0];let{level:n,lateralStart:r,lateralEnd:o}=t,d=r,p=[];for(;d<o;)p.push(e(n,d)),d+=1;return p.sort(S6),[p.map(T6),p[0][1]]}function S6(t,e){return e[1]-t[1]}function T6(t){return t[0]}function A6(t,e,n){let{levelCoords:r,entriesByLevel:o}=t,d=o[e][n],p=r[e]+d.thickness,c=r.length,b=e;for(;b<c&&r[b]<p;b+=1);for(;b<c;b+=1){let k=o[b],E,C=uy(k,d.span.start,ly),T=C[0]+C[1],I=T;for(;(E=k[I])&&E.span.start<d.span.end;)I+=1;if(T<I)return{level:b,lateralStart:T,lateralEnd:I}}return null}function D6(t,e){const n=Ey((r,o,d)=>Ua(r),(r,o,d)=>{let{nextLevelNodes:p,thickness:c}=r,b=c+d,k=c/b,E,C=[];if(!p.length)E=e;else for(let I of p)if(E===void 0){let N=n(I,o,b);E=N[0],C.push(N[1])}else{let N=n(I,E,0);C.push(N[1])}let T=(E-o)*k;return[E-T,Object.assign(Object.assign({},r),{thickness:T,nextLevelNodes:C})]});return t.map(r=>n(r,0,0)[1])}function M6(t){let e=[];const n=Ey((o,d,p)=>Ua(o),(o,d,p)=>{let c=Object.assign(Object.assign({},o),{levelCoord:d,stackDepth:p,stackForward:0});return e.push(c),c.stackForward=r(o.nextLevelNodes,d+o.thickness,p+1)+1});function r(o,d,p){let c=0;for(let b of o)c=Math.max(n(b,d,p),c);return c}return r(t,0,0),e}function Ey(t,e){const n={};return(...r)=>{let o=t(...r);return o in n?n[o]:n[o]=e(...r)}}function pk(t,e,n=null,r=0){let o=[];if(n)for(let d=0;d<t.length;d+=1){let p=t[d],c=n.computeDateTop(p.start,e),b=Math.max(c+(r||0),n.computeDateTop(p.end,e));o.push({start:Math.round(c),end:Math.round(b)})}return o}function I6(t,e,n,r){let o=[],d=[];for(let k=0;k<t.length;k+=1){let E=e[k];E?o.push({index:k,thickness:1,span:E}):d.push(t[k])}let{segRects:p,hiddenGroups:c}=E6(o,n,r),b=[];for(let k of p)b.push({seg:t[k.index],rect:k});for(let k of d)b.push({seg:k,rect:null});return{segPlacements:b,hiddenGroups:c}}const P6=Yn({hour:"numeric",minute:"2-digit",meridiem:!1});class fk extends bn{render(){return le(gy,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:P6}))}}class R6 extends bn{constructor(){super(...arguments),this.sortEventSegs=Pt(Kg)}render(){let{props:e,context:n}=this,{options:r}=n,o=r.selectMirror,d=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||o&&e.dateSelectionSegs||[],p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},c=this.sortEventSegs(e.fgEventSegs,r.eventOrder);return le(_y,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},b=>le("div",{className:"fc-timegrid-col-frame"},le("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),le("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(c,p,!1,!1,!1)),le("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(d,{},!!e.eventDrag,!!e.eventResize,!!o,"mirror")),le("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),by(r)&&le(b,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,n,r,o,d,p){let{props:c}=this;return c.forPrint?mk(e,c):this.renderPositionedFgSegs(e,n,r,o,d,p)}renderPositionedFgSegs(e,n,r,o,d,p){let{eventMaxStack:c,eventShortHeight:b,eventOrderStrict:k,eventMinHeight:E}=this.context.options,{date:C,slatCoords:T,eventSelection:I,todayRange:N,nowDate:$}=this.props,F=r||o||d,q=pk(e,C,T,E),{segPlacements:J,hiddenGroups:Q}=I6(e,q,k,c);return le(Bn,null,this.renderHiddenGroups(Q,e),J.map(me=>{let{seg:ke,rect:Re}=me,Ee=ke.eventRange.instance.instanceId,Ve=F||!!(!n[Ee]&&Re),Be=Cy(Re&&Re.span),Ze=!F&&Re?this.computeSegHStyle(Re):{left:0,right:0},tt=!!Re&&Re.stackForward>0,Xe=!!Re&&Re.span.end-Re.span.start<b;return le("div",{className:"fc-timegrid-event-harness"+(tt?" fc-timegrid-event-harness-inset":""),key:p||Ee,style:Object.assign(Object.assign({visibility:Ve?"":"hidden"},Be),Ze)},le(fk,Object.assign({seg:ke,isDragging:r,isResizing:o,isDateSelecting:d,isSelected:Ee===I,isShort:Xe},oo(ke,N,$))))}))}renderHiddenGroups(e,n){let{extraDateSpan:r,dateProfile:o,todayRange:d,nowDate:p,eventSelection:c,eventDrag:b,eventResize:k}=this.props;return le(Bn,null,e.map(E=>{let C=Cy(E.span),T=N6(E.entries,n);return le(w6,{key:N1(zw(T)),hiddenSegs:T,top:C.top,bottom:C.bottom,extraDateSpan:r,dateProfile:o,todayRange:d,nowDate:p,eventSelection:c,eventDrag:b,eventResize:k})}))}renderFillSegs(e,n){let{props:r,context:o}=this,p=pk(e,r.date,r.slatCoords,o.options.eventMinHeight).map((c,b)=>{let k=e[b];return le("div",{key:uw(k.eventRange),className:"fc-timegrid-bg-harness",style:Cy(c)},n==="bg-event"?le(Pw,Object.assign({seg:k},oo(k,r.todayRange,r.nowDate))):Rw(n))});return le(Bn,null,p)}renderNowIndicator(e){let{slatCoords:n,date:r}=this.props;return n?e.map((o,d)=>le(yy,{key:d,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:n.computeDateTop(o.start,r)},isAxis:!1,date:r})):null}computeSegHStyle(e){let{isRtl:n,options:r}=this.context,o=r.slotEventOverlap,d=e.levelCoord,p=e.levelCoord+e.thickness,c,b;o&&(p=Math.min(1,d+(p-d)*2)),n?(c=1-p,b=d):(c=d,b=1-p);let k={zIndex:e.stackDepth+1,left:c*100+"%",right:b*100+"%"};return o&&!e.stackForward&&(k[n?"marginLeft":"marginRight"]=10*2),k}}function mk(t,{todayRange:e,nowDate:n,eventSelection:r,eventDrag:o,eventResize:d}){let p=(o?o.affectedInstances:null)||(d?d.affectedInstances:null)||{};return le(Bn,null,t.map(c=>{let b=c.eventRange.instance.instanceId;return le("div",{key:b,style:{visibility:p[b]?"hidden":""}},le(fk,Object.assign({seg:c,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:b===r,isShort:!1},oo(c,e,n))))}))}function Cy(t){return t?{top:t.start,bottom:-t.end}:{top:"",bottom:""}}function N6(t,e){return t.map(n=>e[n.index])}class B6 extends bn{constructor(){super(...arguments),this.splitFgEventSegs=Pt(Pd),this.splitBgEventSegs=Pt(Pd),this.splitBusinessHourSegs=Pt(Pd),this.splitNowIndicatorSegs=Pt(Pd),this.splitDateSelectionSegs=Pt(Pd),this.splitEventDrag=Pt(uk),this.splitEventResize=Pt(uk),this.rootElRef=Qr(),this.cellElRefs=new ao}render(){let{props:e,context:n}=this,r=n.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),o=e.cells.length,d=this.splitFgEventSegs(e.fgEventSegs,o),p=this.splitBgEventSegs(e.bgEventSegs,o),c=this.splitBusinessHourSegs(e.businessHourSegs,o),b=this.splitNowIndicatorSegs(e.nowIndicatorSegs,o),k=this.splitDateSelectionSegs(e.dateSelectionSegs,o),E=this.splitEventDrag(e.eventDrag,o),C=this.splitEventResize(e.eventResize,o);return le("div",{className:"fc-timegrid-cols",ref:this.rootElRef},le("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,le("tbody",{role:"presentation"},le("tr",{role:"row"},e.axis&&le("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},le("div",{className:"fc-timegrid-col-frame"},le("div",{className:"fc-timegrid-now-indicator-container"},typeof r=="number"&&le(yy,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:r},isAxis:!0,date:e.nowDate})))),e.cells.map((T,I)=>le(R6,{key:T.key,elRef:this.cellElRefs.createRef(T.key),dateProfile:e.dateProfile,date:T.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:T.extraRenderProps,extraDataAttrs:T.extraDataAttrs,extraClassNames:T.extraClassNames,extraDateSpan:T.extraDateSpan,fgEventSegs:d[I],bgEventSegs:p[I],businessHourSegs:c[I],nowIndicatorSegs:b[I],dateSelectionSegs:k[I],eventDrag:E[I],eventResize:C[I],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new Xl(this.rootElRef.current,V6(this.cellElRefs.currentMap,e.cells),!0,!1))}}function V6(t,e){return e.map(n=>t[n.key])}class z6 extends fs{constructor(){super(...arguments),this.processSlotOptions=Pt(O6),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:n}=this.props,{slatCoords:r}=this.state;if(n&&r){if(e.time){let o=r.computeTimeTop(e.time);o=Math.ceil(o),o&&(o+=1),n(o)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:n}=this;return le("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},le(x6,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),le(B6,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:n.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,n){let{dateEnv:r,options:o}=this.context,{colCoords:d}=this,{dateProfile:p}=this.props,{slatCoords:c}=this.state,{snapDuration:b,snapsPerSlot:k}=this.processSlotOptions(this.props.slotDuration,o.snapDuration),E=d.leftToIndex(e),C=c.positions.topToIndex(n);if(E!=null&&C!=null){let T=this.props.cells[E],I=c.positions.tops[C],N=c.positions.getHeight(C),$=(n-I)/N,F=Math.floor($*k),q=C*k+F,J=this.props.cells[E].date,Q=Tg(p.slotMinTime,S3(b,q)),me=r.add(J,Q),ke=r.add(me,b);return{dateProfile:p,dateSpan:Object.assign({range:{start:me,end:ke},allDay:!1},T.extraDateSpan),dayEl:d.els[E],rect:{left:d.lefts[E],right:d.rights[E],top:I,bottom:I+N},layer:0}}return null}}function O6(t,e){let n=e||t,r=Ag(t,n);return r===null&&(n=t,r=1),{snapDuration:n,snapsPerSlot:r}}class L6 extends Cw{sliceRange(e,n){let r=[];for(let o=0;o<n.length;o+=1){let d=Fo(e,n[o]);d&&r.push({start:d.start,end:d.end,isStart:d.start.valueOf()===e.start.valueOf(),isEnd:d.end.valueOf()===e.end.valueOf(),col:o})}return r}}class F6 extends fs{constructor(){super(...arguments),this.buildDayRanges=Pt($6),this.slicer=new L6,this.timeColsRef=Qr()}render(){let{props:e,context:n}=this,{dateProfile:r,dayTableModel:o}=e,{nowIndicator:d,nextDayThreshold:p}=n.options,c=this.buildDayRanges(o,r,n.dateEnv);return le(ja,{unit:d?"minute":"day"},(b,k)=>le(z6,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,r,null,n,c),{forPrint:e.forPrint,axis:e.axis,dateProfile:r,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:o.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:b,nowIndicatorSegs:d&&this.slicer.sliceNowDate(b,r,p,n,c),todayRange:k,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function $6(t,e,n){let r=[];for(let o of t.headerDates)r.push({start:n.add(o,e.slotMinTime),end:n.add(o,e.slotMaxTime)});return r}const gk=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function j6(t,e,n,r,o){let d=new Date(0),p=t,c=on(0),b=n||U6(r),k=[];for(;hs(p)<hs(e);){let E=o.add(d,p),C=Ag(c,b)!==null;k.push({date:E,time:p,key:E.toISOString(),isoTimeStr:j3(E),isLabeled:C}),p=Tg(p,r),c=Tg(c,r)}return k}function U6(t){let e,n,r;for(e=gk.length-1;e>=0;e-=1)if(n=on(gk[e]),r=Ag(n,t),r!==null&&r>1)return n;return t}class H6 extends g6{constructor(){super(...arguments),this.buildTimeColsModel=Pt(W6),this.buildSlatMetas=Pt(j6)}render(){let{options:e,dateEnv:n,dateProfileGenerator:r}=this.context,{props:o}=this,{dateProfile:d}=o,p=this.buildTimeColsModel(d,r),c=this.allDaySplitter.splitProps(o),b=this.buildSlatMetas(d.slotMinTime,d.slotMaxTime,e.slotLabelInterval,e.slotDuration,n),{dayMinWidth:k}=e,E=!k,C=k,T=e.dayHeaders&&le(ww,{dates:p.headerDates,dateProfile:d,datesRepDistinctDays:!0,renderIntro:E?this.renderHeadAxis:null}),I=e.allDaySlot!==!1&&($=>le(ck,Object.assign({},c.allDay,{dateProfile:d,dayTableModel:p,nextDayThreshold:e.nextDayThreshold,tableMinWidth:$.tableMinWidth,colGroupNode:$.tableColGroupNode,renderRowIntro:E?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:$.clientWidth,clientHeight:$.clientHeight,forPrint:o.forPrint},this.getAllDayMaxEventProps()))),N=$=>le(F6,Object.assign({},c.timed,{dayTableModel:p,dateProfile:d,axis:E,slotDuration:e.slotDuration,slatMetas:b,forPrint:o.forPrint,tableColGroupNode:$.tableColGroupNode,tableMinWidth:$.tableMinWidth,clientWidth:$.clientWidth,clientHeight:$.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:$.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return C?this.renderHScrollLayout(T,I,N,p.colCnt,k,b,this.state.slatCoords):this.renderSimpleLayout(T,I,N)}}function W6(t,e){let n=new kw(t.renderRange,e);return new Ew(n,!1)}var q6='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';tp(q6);var G6=Is({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:H6,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class Z6 extends bn{constructor(){super(...arguments),this.state={textId:No()}}render(){let{theme:e,dateEnv:n,options:r,viewApi:o}=this.context,{cellId:d,dayDate:p,todayRange:c}=this.props,{textId:b}=this.state,k=ry(p,c),E=r.listDayFormat?n.format(p,r.listDayFormat):"",C=r.listDaySideFormat?n.format(p,r.listDaySideFormat):"",T=Object.assign({date:n.toDate(p),view:o,textId:b,text:E,sideText:C,navLinkAttrs:Yl(this.context,p),sideNavLinkAttrs:Yl(this.context,p,"day",!1)},k);return le(Ur,{elTag:"tr",elClasses:["fc-list-day",...bp(k,e)],elAttrs:{"data-date":Sd(p)},renderProps:T,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:Y6,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},I=>le("th",{scope:"colgroup",colSpan:3,id:d,"aria-labelledby":b},le(I,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}}function Y6(t){return le(Bn,null,t.text&&le("a",Object.assign({id:t.textId,className:"fc-list-day-text"},t.navLinkAttrs),t.text),t.sideText&&le("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},t.sideNavLinkAttrs),t.sideText))}const X6=Yn({hour:"numeric",minute:"2-digit",meridiem:"short"});class K6 extends bn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:o,timeHeaderId:d,eventHeaderId:p,dateHeaderId:c}=e,b=r.eventTimeFormat||X6;return le(Ep,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",o.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>J6(o,n),seg:o,timeText:"",disableDragging:!0,disableResizing:!0}),(k,E)=>le(Bn,null,Q6(o,b,n,d,c),le("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},le("span",{className:"fc-list-event-dot",style:{borderColor:E.borderColor||E.backgroundColor}})),le(k,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${p} ${c}`}})))}}function J6(t,e){let n=Jg(t,e);return le("a",Object.assign({},n),t.eventRange.def.title)}function Q6(t,e,n,r,o){let{options:d}=n;if(d.displayEventTime!==!1){let p=t.eventRange.def,c=t.eventRange.instance,b=!1,k;if(p.allDay?b=!0:Az(t.eventRange.range)?t.isStart?k=Id(t,e,n,null,null,c.range.start,t.end):t.isEnd?k=Id(t,e,n,null,null,t.start,c.range.end):b=!0:k=Id(t,e,n),b){let E={text:n.options.allDayText,view:n.viewApi};return le(Ur,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${o}`},renderProps:E,generatorName:"allDayContent",customGenerator:d.allDayContent,defaultGenerator:e$,classNameGenerator:d.allDayClassNames,didMount:d.allDayDidMount,willUnmount:d.allDayWillUnmount})}return le("td",{className:"fc-list-event-time"},k)}return null}function e$(t){return t.text}class t$ extends fs{constructor(){super(...arguments),this.computeDateVars=Pt(r$),this.eventStoreToSegs=Pt(this._eventStoreToSegs),this.state={timeHeaderId:No(),eventHeaderId:No(),dateHeaderIdRoot:No()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:n}=this,{dayDates:r,dayRanges:o}=this.computeDateVars(e.dateProfile),d=this.eventStoreToSegs(e.eventStore,e.eventUiBases,o);return le(Dd,{elRef:this.setRootEl,elClasses:["fc-list",n.theme.getClass("table"),n.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:n.viewSpec},le(Dw,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},d.length>0?this.renderSegList(d,r):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:n}=this.context,r={text:e.noEventsText,view:n};return le(Ur,{elTag:"div",elClasses:["fc-list-empty"],renderProps:r,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:n$,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},o=>le(o,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,n){let{theme:r,options:o}=this.context,{timeHeaderId:d,eventHeaderId:p,dateHeaderIdRoot:c}=this.state,b=i$(e);return le(ja,{unit:"day"},(k,E)=>{let C=[];for(let T=0;T<b.length;T+=1){let I=b[T];if(I){let N=Sd(n[T]),$=c+"-"+N;C.push(le(Z6,{key:N,cellId:$,dayDate:n[T],todayRange:E})),I=Kg(I,o.eventOrder);for(let F of I)C.push(le(K6,Object.assign({key:N+":"+F.eventRange.instance.instanceId,seg:F,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:d,eventHeaderId:p,dateHeaderId:$},oo(F,E,k))))}}return le("table",{className:"fc-list-table "+r.getClass("table")},le("thead",null,le("tr",null,le("th",{scope:"col",id:d},o.timeHint),le("th",{scope:"col","aria-hidden":!0}),le("th",{scope:"col",id:p},o.eventHint))),le("tbody",null,C))})}_eventStoreToSegs(e,n,r){return this.eventRangesToSegs(Xg(e,n,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,r)}eventRangesToSegs(e,n){let r=[];for(let o of e)r.push(...this.eventRangeToSegs(o,n));return r}eventRangeToSegs(e,n){let{dateEnv:r}=this.context,{nextDayThreshold:o}=this.context.options,d=e.range,p=e.def.allDay,c,b,k,E=[];for(c=0;c<n.length;c+=1)if(b=Fo(d,n[c]),b&&(k={component:this,eventRange:e,start:b.start,end:b.end,isStart:e.isStart&&b.start.valueOf()===d.start.valueOf(),isEnd:e.isEnd&&b.end.valueOf()===d.end.valueOf(),dayIndex:c},E.push(k),!k.isEnd&&!p&&c+1<n.length&&d.end<r.add(n[c+1].start,o))){k.end=d.end,k.isEnd=!0;break}return E}}function n$(t){return t.text}function r$(t){let e=Un(t.renderRange.start),n=t.renderRange.end,r=[],o=[];for(;e<n;)r.push(e),o.push({start:e,end:Er(e,1)}),e=Er(e,1);return{dayDates:r,dayRanges:o}}function i$(t){let e=[],n,r;for(n=0;n<t.length;n+=1)r=t[n],(e[r.dayIndex]||(e[r.dayIndex]=[])).push(r);return e}var s$=':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}';tp(s$);const o$={listDayFormat:yk,listDaySideFormat:yk,noEventsClassNames:De,noEventsContent:De,noEventsDidMount:De,noEventsWillUnmount:De};function yk(t){return t===!1?null:Yn(t)}var a$=Is({name:"@fullcalendar/list",optionRefiners:o$,views:{list:{component:t$,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});hy.touchMouseIgnoreWait=500;let Sy=0,Tp=0,Ty=!1;class _k{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=n=>{if(!this.shouldIgnoreMouse()&&l$(n)&&this.tryStart(n)){let r=this.createEventFromMouse(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=n=>{let r=this.createEventFromMouse(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleMouseUp=n=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(n)),this.cleanup()},this.handleTouchStart=n=>{if(this.tryStart(n)){this.isTouchDragging=!0;let r=this.createEventFromTouch(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r);let o=n.target;this.shouldIgnoreMove||o.addEventListener("touchmove",this.handleTouchMove),o.addEventListener("touchend",this.handleTouchEnd),o.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=n=>{let r=this.createEventFromTouch(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleTouchEnd=n=>{if(this.isDragging){let r=n.target;r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",this.handleTouchEnd),r.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(n)),this.cleanup(),this.isTouchDragging=!1,c$()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let r=window.scrollX-this.prevScrollX+this.prevPageX,o=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:o,deltaX:r-this.origPageX,deltaY:o-this.origPageY})}},this.containerEl=e,this.emitter=new yp,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),d$()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),u$()}tryStart(e){let n=this.querySubjectEl(e),r=e.target;return n&&(!this.handleSelector||jr(r,this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){Ty=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?jr(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return Sy||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Ty=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,n){let r=0,o=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(r=e.pageX-this.origPageX,o=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:r,deltaY:o}}createEventFromTouch(e,n){let r=e.touches,o,d,p=0,c=0;return r&&r.length?(o=r[0].pageX,d=r[0].pageY):(o=e.pageX,d=e.pageY),n?(this.origPageX=o,this.origPageY=d):(p=o-this.origPageX,c=d-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:o,pageY:d,deltaX:p,deltaY:c}}}function l$(t){return t.button===0&&!t.ctrlKey}function c$(){Sy+=1,setTimeout(()=>{Sy-=1},hy.touchMouseIgnoreWait)}function d$(){Tp+=1,Tp===1&&window.addEventListener("touchmove",bk,{passive:!1})}function u$(){Tp-=1,Tp||window.removeEventListener("touchmove",bk,{passive:!1})}function bk(t){Ty&&t.preventDefault()}class h${constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,n,r){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=n-window.scrollX,this.origScreenY=r-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,n){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=n-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,n){let r=()=>{this.cleanup(),n()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)}doRevertAnimation(e,n){let r=this.mirrorEl,o=this.sourceEl.getBoundingClientRect();r.style.transition="top "+n+"ms,left "+n+"ms",Ed(r,{left:o.left,top:o.top}),u3(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(Eg(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&Ed(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,n=this.mirrorEl;return n||(n=this.mirrorEl=this.sourceEl.cloneNode(!0),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.pointerEvents="none",n.classList.add("fc-event-dragging"),Ed(n,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(n)),n}}class xk extends ay{constructor(e,n){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=n,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class vk extends xk{constructor(e,n){super(new VO(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return NO(this.scrollController.el)}}class p$ extends xk{constructor(e){super(new zO,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const wk=typeof performance=="function"?performance.now:Date.now;class f${constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let n=wk();this.handleSide(e,(n-this.msSinceRequest)/1e3),this.requestAnimation(n)}else this.isAnimating=!1}}}start(e,n,r){this.isEnabled&&(this.scrollCaches=this.buildCaches(r),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,n))}handleMove(e,n){if(this.isEnabled){let r=e-window.scrollX,o=n-window.scrollY,d=this.pointerScreenY===null?0:o-this.pointerScreenY,p=this.pointerScreenX===null?0:r-this.pointerScreenX;d<0?this.everMovedUp=!0:d>0&&(this.everMovedDown=!0),p<0?this.everMovedLeft=!0:p>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=o,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(wk()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,n){let{scrollCache:r}=e,{edgeThreshold:o}=this,d=o-e.distance,p=d*d/(o*o)*this.maxVelocity*n,c=1;switch(e.name){case"left":c=-1;case"right":r.setScrollLeft(r.getScrollLeft()+p*c);break;case"top":c=-1;case"bottom":r.setScrollTop(r.getScrollTop()+p*c);break}}computeBestEdge(e,n){let{edgeThreshold:r}=this,o=null,d=this.scrollCaches||[];for(let p of d){let c=p.clientRect,b=e-c.left,k=c.right-e,E=n-c.top,C=c.bottom-n;b>=0&&k>=0&&E>=0&&C>=0&&(E<=r&&this.everMovedUp&&p.canScrollUp()&&(!o||o.distance>E)&&(o={scrollCache:p,name:"top",distance:E}),C<=r&&this.everMovedDown&&p.canScrollDown()&&(!o||o.distance>C)&&(o={scrollCache:p,name:"bottom",distance:C}),b<=r&&this.everMovedLeft&&p.canScrollLeft()&&(!o||o.distance>b)&&(o={scrollCache:p,name:"left",distance:b}),k<=r&&this.everMovedRight&&p.canScrollRight()&&(!o||o.distance>k)&&(o={scrollCache:p,name:"right",distance:k}))}return o}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new p$(!1):new vk(n,!1))}queryScrollEls(e){let n=[];for(let r of this.scrollQuery)typeof r=="object"?n.push(r):n.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(r)));return n}}class Rd extends FO{constructor(e,n){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=o=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,h3(document.body),f3(document.body),o.isTouch||o.origEvent.preventDefault(),this.emitter.trigger("pointerdown",o),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(o.subjectEl,o.pageX,o.pageY),this.startDelay(o),this.minDistance||this.handleDistanceSurpassed(o)))},this.onPointerMove=o=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",o),!this.isDistanceSurpassed){let d=this.minDistance,p,{deltaX:c,deltaY:b}=o;p=c*c+b*b,p>=d*d&&this.handleDistanceSurpassed(o)}this.isDragging&&(o.origEvent.type!=="scroll"&&(this.mirror.handleMove(o.pageX,o.pageY),this.autoScroller.handleMove(o.pageX,o.pageY)),this.emitter.trigger("dragmove",o))}},this.onPointerUp=o=>{this.isInteracting&&(this.isInteracting=!1,p3(document.body),m3(document.body),this.emitter.trigger("pointerup",o),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(o)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new _k(e);r.emitter.on("pointerdown",this.onPointerDown),r.emitter.on("pointermove",this.onPointerMove),r.emitter.on("pointerup",this.onPointerUp),n&&(r.selector=n),this.mirror=new h$,this.autoScroller=new f$}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class m${constructor(e){this.el=e,this.origRect=oy(e),this.scrollCaches=_w(e).map(n=>new vk(n,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let n of this.scrollCaches)e+=n.origScrollLeft-n.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let n of this.scrollCaches)e+=n.origScrollTop-n.getScrollTop();return e}isWithinClipping(e,n){let r={left:e,top:n};for(let o of this.scrollCaches)if(!g$(o.getEventTarget())&&!vO(r,o.clientRect))return!1;return!0}}function g$(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class Ap{constructor(e,n){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=r=>{let{dragging:o}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?(o.setIgnoreMove(!1),this.emitter.trigger("pointerdown",r)):o.setIgnoreMove(!0)},this.handleDragStart=r=>{this.emitter.trigger("dragstart",r),this.handleMove(r,!0)},this.handleDragMove=r=>{this.emitter.trigger("dragmove",r),this.handleMove(r)},this.handlePointerUp=r=>{this.releaseHits(),this.emitter.trigger("pointerup",r)},this.handleDragEnd=r=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,r),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",r)},this.droppableStore=n,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new yp}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},r=n,o=e.subjectEl,d;o instanceof HTMLElement&&(d=oy(o),r=wO(r,d));let p=this.initialHit=this.queryHitForOffset(r.left,r.top);if(p){if(this.useSubjectCenter&&d){let c=gw(d,p.rect);c&&(r=kO(c))}this.coordAdjust=EO(r,n)}else this.coordAdjust={left:0,top:0}}handleMove(e,n){let r=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(n||!Dp(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=ro(this.droppableStore,e=>(e.component.prepareHits(),new m$(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:r,offsetTrackers:o}=this,d=null;for(let p in r){let c=r[p].component,b=o[p];if(b&&b.isWithinClipping(e,n)){let k=b.computeLeft(),E=b.computeTop(),C=e-k,T=n-E,{origRect:I}=b,N=I.right-I.left,$=I.bottom-I.top;if(C>=0&&C<N&&T>=0&&T<$){let F=c.queryHit(C,T,N,$);F&&hp(F.dateProfile.activeRange,F.dateSpan.range)&&(this.disablePointCheck||b.el.contains(b.el.getRootNode().elementFromPoint(C+k-window.scrollX,T+E-window.scrollY)))&&(!d||F.layer>d.layer)&&(F.componentId=p,F.context=c.context,F.rect.left+=k,F.rect.right+=k,F.rect.top+=E,F.rect.bottom+=E,d=F)}}}return d}}function Dp(t,e){return!t&&!e?!0:!!t!=!!e?!1:dO(t.dateSpan,e.dateSpan)}function kk(t,e){let n={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(n,r(t,e));return Object.assign(n,y$(t,e.dateEnv)),n}function y$(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class _$ extends Zl{constructor(e){super(e),this.handlePointerDown=r=>{let{dragging:o}=this,d=r.origEvent.target;o.setIgnoreMove(!this.component.isValidDateDownEl(d))},this.handleDragEnd=r=>{let{component:o}=this,{pointer:d}=this.dragging;if(!d.wasTouchScroll){let{initialHit:p,finalHit:c}=this.hitDragging;if(p&&c&&Dp(p,c)){let{context:b}=o,k=Object.assign(Object.assign({},kk(p.dateSpan,b)),{dayEl:p.dayEl,jsEvent:r.origEvent,view:b.viewApi||b.calendarApi.view});b.emitter.trigger("dateClick",k)}}},this.dragging=new Rd(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new Ap(this.dragging,ey(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class b$ extends Zl{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=p=>{let{component:c,dragging:b}=this,{options:k}=c.context,E=k.selectable&&c.isValidDateDownEl(p.origEvent.target);b.setIgnoreMove(!E),b.delay=p.isTouch?x$(c):null},this.handleDragStart=p=>{this.component.context.calendarApi.unselect(p)},this.handleHitUpdate=(p,c)=>{let{context:b}=this.component,k=null,E=!1;if(p){let C=this.hitDragging.initialHit;p.componentId===C.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(C,p)||(k=v$(C,p,b.pluginHooks.dateSelectionTransformers)),(!k||!qO(k,p.dateProfile,b))&&(E=!0,k=null)}k?b.dispatch({type:"SELECT_DATES",selection:k}):c||b.dispatch({type:"UNSELECT_DATES"}),E?Cg():Sg(),c||(this.dragSelection=k)},this.handlePointerUp=p=>{this.dragSelection&&(ow(this.dragSelection,p,this.component.context),this.dragSelection=null)};let{component:n}=e,{options:r}=n.context,o=this.dragging=new Rd(e.el);o.touchScrollAllowed=!1,o.minDistance=r.selectMinDistance||0,o.autoScroller.isEnabled=r.dragScroll;let d=this.hitDragging=new Ap(this.dragging,ey(e));d.emitter.on("pointerdown",this.handlePointerDown),d.emitter.on("dragstart",this.handleDragStart),d.emitter.on("hitupdate",this.handleHitUpdate),d.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function x$(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function v$(t,e,n){let r=t.dateSpan,o=e.dateSpan,d=[r.range.start,r.range.end,o.range.start,o.range.end];d.sort(x3);let p={};for(let c of n){let b=c(t,e);if(b===!1)return null;b&&Object.assign(p,b)}return p.range={start:d[0],end:d[3]},p.allDay=r.allDay,p}class Nd extends Zl{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=p=>{let c=p.origEvent.target,{component:b,dragging:k}=this,{mirror:E}=k,{options:C}=b.context,T=b.context;this.subjectEl=p.subjectEl;let I=this.subjectSeg=Gl(p.subjectEl),$=(this.eventRange=I.eventRange).instance.instanceId;this.relevantEvents=qg(T.getCurrentData().eventStore,$),k.minDistance=p.isTouch?0:C.eventDragMinDistance,k.delay=p.isTouch&&$!==b.props.eventSelection?k$(b):null,C.fixedMirrorParent?E.parentNode=C.fixedMirrorParent:E.parentNode=jr(c,".fc"),E.revertDuration=C.dragRevertDuration;let F=b.isValidSegDownEl(c)&&!jr(c,".fc-event-resizer");k.setIgnoreMove(!F),this.isDragging=F&&p.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=p=>{let c=this.component.context,b=this.eventRange,k=b.instance.instanceId;p.isTouch?k!==this.component.props.eventSelection&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:k}):c.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(c.calendarApi.unselect(p),c.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new Qn(c,b.def,b.instance),jsEvent:p.origEvent,view:c.viewApi}))},this.handleHitUpdate=(p,c)=>{if(!this.isDragging)return;let b=this.relevantEvents,k=this.hitDragging.initialHit,E=this.component.context,C=null,T=null,I=null,N=!1,$={affectedEvents:b,mutatedEvents:Di(),isEvent:!0};if(p){C=p.context;let F=C.options;E===C||F.editable&&F.droppable?(T=w$(k,p,this.eventRange.instance.range.start,C.getCurrentData().pluginHooks.eventDragMutationMassagers),T&&(I=Yg(b,C.getCurrentData().eventUiBases,T,C),$.mutatedEvents=I,Sw($,p.dateProfile,C)||(N=!0,T=null,I=null,$.mutatedEvents=Di()))):C=null}this.displayDrag(C,$),N?Cg():Sg(),c||(E===C&&Dp(k,p)&&(T=null),this.dragging.setMirrorNeedsRevert(!T),this.dragging.setMirrorIsVisible(!p||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=C,this.validMutation=T,this.mutatedRelevantEvents=I)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=p=>{if(this.isDragging){let c=this.component.context,b=c.viewApi,{receivingContext:k,validMutation:E}=this,C=this.eventRange.def,T=this.eventRange.instance,I=new Qn(c,C,T),N=this.relevantEvents,$=this.mutatedRelevantEvents,{finalHit:F}=this.hitDragging;if(this.clearDrag(),c.emitter.trigger("eventDragStop",{el:this.subjectEl,event:I,jsEvent:p.origEvent,view:b}),E){if(k===c){let q=new Qn(c,$.defs[C.defId],T?$.instances[T.instanceId]:null);c.dispatch({type:"MERGE_EVENTS",eventStore:$});let J={oldEvent:I,event:q,relatedEvents:$a($,c,T),revert(){c.dispatch({type:"MERGE_EVENTS",eventStore:N})}},Q={};for(let me of c.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(Q,me(E,c));c.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},J),Q),{el:p.subjectEl,delta:E.datesDelta,jsEvent:p.origEvent,view:b})),c.emitter.trigger("eventChange",J)}else if(k){let q={event:I,relatedEvents:$a(N,c,T),revert(){c.dispatch({type:"MERGE_EVENTS",eventStore:N})}};c.emitter.trigger("eventLeave",Object.assign(Object.assign({},q),{draggedEl:p.subjectEl,view:b})),c.dispatch({type:"REMOVE_EVENTS",eventStore:N}),c.emitter.trigger("eventRemove",q);let J=$.defs[C.defId],Q=$.instances[T.instanceId],me=new Qn(k,J,Q);k.dispatch({type:"MERGE_EVENTS",eventStore:$});let ke={event:me,relatedEvents:$a($,k,Q),revert(){k.dispatch({type:"REMOVE_EVENTS",eventStore:$})}};k.emitter.trigger("eventAdd",ke),p.isTouch&&k.dispatch({type:"SELECT_EVENT",eventInstanceId:T.instanceId}),k.emitter.trigger("drop",Object.assign(Object.assign({},kk(F.dateSpan,k)),{draggedEl:p.subjectEl,jsEvent:p.origEvent,view:F.context.viewApi})),k.emitter.trigger("eventReceive",Object.assign(Object.assign({},ke),{draggedEl:p.subjectEl,view:F.context.viewApi}))}}else c.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:r}=n.context,o=this.dragging=new Rd(e.el);o.pointer.selector=Nd.SELECTOR,o.touchScrollAllowed=!1,o.autoScroller.isEnabled=r.dragScroll;let d=this.hitDragging=new Ap(this.dragging,ty);d.useSubjectCenter=e.useEventCenter,d.emitter.on("pointerdown",this.handlePointerDown),d.emitter.on("dragstart",this.handleDragStart),d.emitter.on("hitupdate",this.handleHitUpdate),d.emitter.on("pointerup",this.handlePointerUp),d.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,n){let r=this.component.context,o=this.receivingContext;o&&o!==e&&(o===r?o.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:Di(),isEvent:!0}}):o.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:n})}clearDrag(){let e=this.component.context,{receivingContext:n}=this;n&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e!==n&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}Nd.SELECTOR=".fc-event-draggable, .fc-event-resizable";function w$(t,e,n,r){let o=t.dateSpan,d=e.dateSpan,p=o.range.start,c=d.range.start,b={};o.allDay!==d.allDay&&(b.allDay=d.allDay,b.hasEnd=e.context.options.allDayMaintainDuration,d.allDay?p=Un(n):p=n);let k=Wl(p,c,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);k.milliseconds&&(b.allDay=!1);let E={datesDelta:k,standardProps:b};for(let C of r)C(E,t,e);return E}function k$(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class E$ extends Zl{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=d=>{let{component:p}=this,c=this.querySegEl(d),b=Gl(c),k=this.eventRange=b.eventRange;this.dragging.minDistance=p.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(d.origEvent.target)||d.isTouch&&this.component.props.eventSelection!==k.instance.instanceId)},this.handleDragStart=d=>{let{context:p}=this.component,c=this.eventRange;this.relevantEvents=qg(p.getCurrentData().eventStore,this.eventRange.instance.instanceId);let b=this.querySegEl(d);this.draggingSegEl=b,this.draggingSeg=Gl(b),p.calendarApi.unselect(),p.emitter.trigger("eventResizeStart",{el:b,event:new Qn(p,c.def,c.instance),jsEvent:d.origEvent,view:p.viewApi})},this.handleHitUpdate=(d,p,c)=>{let{context:b}=this.component,k=this.relevantEvents,E=this.hitDragging.initialHit,C=this.eventRange.instance,T=null,I=null,N=!1,$={affectedEvents:k,mutatedEvents:Di(),isEvent:!0};d&&(d.componentId===E.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(E,d)||(T=C$(E,d,c.subjectEl.classList.contains("fc-event-resizer-start"),C.range))),T&&(I=Yg(k,b.getCurrentData().eventUiBases,T,b),$.mutatedEvents=I,Sw($,d.dateProfile,b)||(N=!0,T=null,I=null,$.mutatedEvents=null)),I?b.dispatch({type:"SET_EVENT_RESIZE",state:$}):b.dispatch({type:"UNSET_EVENT_RESIZE"}),N?Cg():Sg(),p||(T&&Dp(E,d)&&(T=null),this.validMutation=T,this.mutatedRelevantEvents=I)},this.handleDragEnd=d=>{let{context:p}=this.component,c=this.eventRange.def,b=this.eventRange.instance,k=new Qn(p,c,b),E=this.relevantEvents,C=this.mutatedRelevantEvents;if(p.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:k,jsEvent:d.origEvent,view:p.viewApi}),this.validMutation){let T=new Qn(p,C.defs[c.defId],b?C.instances[b.instanceId]:null);p.dispatch({type:"MERGE_EVENTS",eventStore:C});let I={oldEvent:k,event:T,relatedEvents:$a(C,p,b),revert(){p.dispatch({type:"MERGE_EVENTS",eventStore:E})}};p.emitter.trigger("eventResize",Object.assign(Object.assign({},I),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||on(0),endDelta:this.validMutation.endDelta||on(0),jsEvent:d.origEvent,view:p.viewApi})),p.emitter.trigger("eventChange",I)}else p.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:n}=e,r=this.dragging=new Rd(e.el);r.pointer.selector=".fc-event-resizer",r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.context.options.dragScroll;let o=this.hitDragging=new Ap(this.dragging,ey(e));o.emitter.on("pointerdown",this.handlePointerDown),o.emitter.on("dragstart",this.handleDragStart),o.emitter.on("hitupdate",this.handleHitUpdate),o.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return jr(e.subjectEl,".fc-event")}}function C$(t,e,n,r){let o=t.context.dateEnv,d=t.dateSpan.range.start,p=e.dateSpan.range.start,c=Wl(d,p,o,t.largeUnit);if(n){if(o.add(r.start,c)<r.end)return{startDelta:c}}else if(o.add(r.end,c)>r.start)return{endDelta:c};return null}class S${constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=r=>{r.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=r=>{let o=this.context.options.unselectCancel,d=v1(r.origEvent);this.matchesCancel=!!jr(d,o),this.matchesEvent=!!jr(d,Nd.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:o}=this,{documentPointer:d}=this,p=o.getCurrentData();if(!d.wasTouchScroll){if(p.dateSelection&&!this.isRecentPointerDateSelect){let c=o.options.unselectAuto;c&&(!c||!this.matchesCancel)&&o.calendarApi.unselect(r)}p.eventSelection&&!this.matchesEvent&&o.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new _k(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}const T$={fixedMirrorParent:De},A$={dateClick:De,eventDragStart:De,eventDragStop:De,eventDrop:De,eventResizeStart:De,eventResizeStop:De,eventResize:De,drop:De,eventReceive:De,eventLeave:De};hy.dataAttrPrefix="";var D$=Is({name:"@fullcalendar/interaction",componentInteractions:[_$,b$,Nd,E$],calendarInteractions:[S$],elementDraggingImpl:Rd,optionRefiners:T$,listenerRefiners:A$}),M$={code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",year:"рік",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText(t){return"+ще "+t+"..."},noEventsText:"Немає подій для відображення"};const I$={},P$={class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function R$(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",P$,e[0]||(e[0]=[a.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),a.createElementVNode("path",{d:"M15 3v18"},null,-1),a.createElementVNode("path",{d:"m8 9 3 3-3 3"},null,-1)]))}const Ek=Oe(I$,[["render",R$]]),N$={},B$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function V$(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",B$,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Bd=Oe(N$,[["render",V$]]),z$={components:{FullCalendar:PF,IconOpenCard:Ek,IconChevronDown:Bd},data(){return{isVisible:!0,isVisibleBar:!0,currentPeriod:"",calendarOptions:{plugins:[c6,G6,a$,D$],initialView:"dayGridMonth",locale:M$,events:[{title:"Событие 1",date:"2025-02-23"},{title:"Событие 3",date:"2025-02-04"},{title:"Событие 2",start:"2025-02-02",end:"2025-02-06"}]},currentView:"dayGridMonth",views:{timeGridWeek:"Тиждень",dayGridMonth:"Місяць"},scheme:[{id:"type",type:"Check",label:"Тип",inline:!0,options:[{color:"red",text:"Зайняті",id:"red"},{color:"green",text:"Вільні",id:"green"},{color:"gray",text:"Без статусу",id:"gray"}]}]}},mounted(){this.updateCurrentPeriod()},methods:{updateCurrentPeriod(){const e=this.$refs.fullCalendar.getApi().getDate(),n=e.toLocaleString("default",{month:"long"}),r=e.getFullYear();this.currentPeriod=`${n} ${r}`},changeView(t){var e,n;this.isVisible=!1,this.currentView=t,this.calendarOptions={...this.calendarOptions,initialView:t},queueMicrotask(()=>this.isVisible=!0),(n=(e=this.$refs)==null?void 0:e.popover)==null||n.togglePopover(),this.updateCurrentPeriod()},prev(){this.$refs.fullCalendar.getApi().prev(),this.updateCurrentPeriod()},next(){this.$refs.fullCalendar.getApi().next(),this.updateCurrentPeriod()}}},O$={class:"flex p-[10px]"},L$={class:"flex-grow bg-white"},F$={class:"p-[10px] flex justify-start gap-2 items-center border-gray-200"},$$={class:"flex items-center gap-2 ml-auto"},j$={class:"text-lg font-semibold text-gray-700"},U$={class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 bg-gray-100 border border-transparent rounded-lg gap-x-2 hover:bg-gray-200 focus:bg-gray-200"},H$={class:"flex flex-col p-[2px] gap-[2px] w-[170px]"},W$=["onClick"];function q$(t,e,n,r,o,d){const p=a.resolveComponent("VsText"),c=a.resolveComponent("VsFilterList"),b=a.resolveComponent("IconChevronDown"),k=a.resolveComponent("VsPopover"),E=a.resolveComponent("FullCalendar");return a.openBlock(),a.createElementBlock("div",O$,[a.createElementVNode("div",L$,[a.createElementVNode("div",F$,[a.createVNode(p,{type:"text",modelValue:t.searchValue,"onUpdate:modelValue":e[0]||(e[0]=C=>t.searchValue=C),clearable:!0,placeholder:"Пошук ",class:"w-[300px] [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"]),a.createVNode(c,{scheme:o.scheme,isDialog:!1,view:"plain"},null,8,["scheme"]),a.createElementVNode("div",$$,[a.createElementVNode("div",j$,a.toDisplayString(o.currentPeriod),1),a.createVNode(k,{placement:"bottom-right",ref:"popover"},{reference:a.withCtx(()=>{var C;return[a.createElementVNode("button",U$,[a.createTextVNode(a.toDisplayString((C=o.views)==null?void 0:C[o.currentView])+" ",1),a.createVNode(b,{height:"14",width:"14"})])]}),default:a.withCtx(()=>[a.createElementVNode("div",H$,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.views,(C,T)=>(a.openBlock(),a.createElementBlock("button",{key:T,onClick:I=>d.changeView(T),class:a.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",[T===o.currentView?"bg-gray-100":""]])},a.toDisplayString(C),11,W$))),128))])]),_:1},512),a.createElementVNode("button",{onClick:e[1]||(e[1]=(...C)=>d.prev&&d.prev(...C)),class:"inline-flex h-[38px] items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 bg-gray-100 border border-transparent rounded-lg gap-x-2 hover:bg-gray-200 focus:bg-gray-200"},[a.createVNode(b,{height:"14",width:"14",class:"rotate-90"})]),a.createElementVNode("button",{onClick:e[2]||(e[2]=(...C)=>d.next&&d.next(...C)),class:"inline-flex h-[38px] items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 bg-gray-100 border border-transparent rounded-lg gap-x-2 hover:bg-gray-200 focus:bg-gray-200"},[a.createVNode(b,{height:"14",width:"14",class:"-rotate-90"})])])]),o.isVisible?(a.openBlock(),a.createBlock(E,{key:0,options:o.calendarOptions,class:"px-[10px] py-[4px]",ref:"fullCalendar"},null,8,["options"])):a.createCommentVNode("",!0)])])}const Ck=Oe(z$,[["render",q$]]),G$={key:0,class:"text-[12px]"},Z$=Oe({__name:"map",props:{modelValue:Array},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,o=a.ref(null),d=a.ref(null),p=a.ref(null),c=a.ref(!1),b=[[22.1372,44.3804],[40.2276,52.3792]];a.onMounted(()=>{var E;d.value=new Dh.Map({container:o.value,style:{version:8,sources:{voyager:{type:"raster",tiles:["https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"],tileSize:256,attribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, © <a href='https://carto.com/attributions'>CARTO</a>"}},layers:[{id:"voyager-layer",type:"raster",source:"voyager",minzoom:0,maxzoom:22}]},center:((E=n.modelValue)==null?void 0:E.length)===2?n.modelValue:[30.5234,50.4501],zoom:10,maxBounds:b}),setTimeout(()=>d.value.resize()),d.value.addControl(new Dh.NavigationControl,"top-right"),n.modelValue&&n.modelValue.length===2&&k(n.modelValue),d.value.on("click",C=>{const T=[C.lngLat.lng,C.lngLat.lat];r("update:modelValue",T),k(T)}),d.value.on("move",()=>{if(p.value){const C=d.value.getCenter();p.value.setLngLat(C),r("update:modelValue",[(C==null?void 0:C.lng)!==void 0?Number(C.lng).toFixed(5):null,(C==null?void 0:C.lat)!==void 0?Number(C.lat).toFixed(5):null])}})});const k=E=>{p.value?p.value.setLngLat(E):p.value=new Dh.Marker().setLngLat(E).addTo(d.value),c.value||d.value.setCenter(E)};return(E,C)=>{var T,I,N;return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{ref_key:"mapContainer",ref:o,class:"map-container"},null,512),(T=t.modelValue)!=null&&T.length?(a.openBlock(),a.createElementBlock("span",G$,a.toDisplayString((I=t.modelValue)==null?void 0:I[0])+", "+a.toDisplayString((N=t.modelValue)==null?void 0:N[1]),1)):a.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-b076dfdf"]]),Y$={},X$={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-map"};function K$(t,e){return a.openBlock(),a.createElementBlock("svg",X$,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13"},null,-1),a.createElementVNode("path",{d:"M9 4v13"},null,-1),a.createElementVNode("path",{d:"M15 7v13"},null,-1)]))}const J$=Oe(Y$,[["render",K$]]),Q$={class:"flex w-full gap-1"},e8={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},t8=["onClick"],n8={__name:"vs-form-map",props:{modelValue:{type:Array,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=a.useModel(t,"modelValue"),n=a.ref(e.value||[]),r=a.ref(!1);return a.watch(e,o=>n.value=o,{deep:!0}),(o,d)=>{const p=a.resolveComponent("VsText"),c=a.resolveComponent("VsPopover"),b=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Q$,[a.createVNode(p,{modelValue:e.value[0],"onUpdate:modelValue":d[0]||(d[0]=k=>e.value[0]=k),placeholder:"lng"},null,8,["modelValue"]),a.createVNode(p,{modelValue:e.value[1],"onUpdate:modelValue":d[1]||(d[1]=k=>e.value[1]=k),placeholder:"lat"},null,8,["modelValue"]),a.createVNode(c,{placement:"left",trigger:"hover"},{reference:a.withCtx(()=>[a.createElementVNode("button",{onClick:d[2]||(d[2]=k=>r.value=!0),class:a.normalizeClass("inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-gray-500 border border-transparent rounded-lg gap-x-2 hover:bg-gray-700 hover:text-white")},[a.createVNode(J$,{height:"22",width:"16"})])]),default:a.withCtx(()=>[d[6]||(d[6]=a.createElementVNode("div",{class:"p-1"},"Додати точку через карту",-1))]),_:1,__:[6]})]),a.createVNode(b,{visible:r.value,"onUpdate:visible":d[5]||(d[5]=k=>r.value=k),title:"Додати точку на карті"},{footer:a.withCtx(({handleClose:k})=>[a.createElementVNode("div",e8,[a.createElementVNode("button",{style:{border:"1px solid #000"},onClick:k,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати ",8,t8),a.createElementVNode("button",{onClick:d[4]||(d[4]=E=>{e.value=n.value,r.value=!1}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:a.withCtx(()=>[r.value?(a.openBlock(),a.createBlock(Z$,{key:0,modelValue:n.value,"onUpdate:modelValue":d[3]||(d[3]=k=>n.value=k)},null,8,["modelValue"])):a.createCommentVNode("",!0)]),_:1},8,["visible"])],64)}}},r8={class:"flex items-center gap-2 capitalize text-[13px]"},i8={class:"flex w-[324px] flex-wrap gap-[4px]"},s8={class:"border border-[2px] border-transparent flex items-center justify-center h-[32px] w-[32px] rounded hover:border-blue-500"},o8=["onClick"],a8={class:"text-[10px] p-0"},l8={"vs-widget-map":Fm,"vs-widget-gallery":ZN,"vs-widget-comments":Sv,"vs-widget-file":Cv,"vs-widget-history":M4,"vs-widget-table":WV,"vs-widget-calendar":Ck,"admin-notifications":fg,"vs-widget-print":O4,"vs-form-map":n8,"vs-form-palette":{__name:"vs-form-palette",props:{modelValue:{type:String,default:()=>"blue-600"},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=a.useModel(t,"modelValue"),n=a.ref(),r=[{color:"red",title:"Red"},{color:"orange",title:"Orange"},{color:"amber",title:"Amber"},{color:"yellow",title:"Yellow"},{color:"lime",title:"Lime"},{color:"green",title:"Green"},{color:"emerald",title:"Emerald"},{color:"teal",title:"Teal"},{color:"cyan",title:"Cyan"},{color:"sky",title:"Sky"},{color:"blue",title:"Blue"},{color:"indigo",title:"Indigo"},{color:"violet",title:"Violet"},{color:"purple",title:"Purple"},{color:"fuchsia",title:"Fuchsia"},{color:"pink",title:"Pink"},{color:"rose",title:"Rose"},{color:"slate",title:"Slate"},{color:"gray",title:"Gray"},{color:"zinc",title:"Zinc"},{color:"neutral",title:"Neutral"},{color:"stone",title:"Stone"}];return(o,d)=>{const p=a.resolveComponent("VsPopover");return a.openBlock(),a.createElementBlock("div",r8,[a.createVNode(p,{ref_key:"popover",ref:n,placement:"bottom-right"},{reference:a.withCtx(()=>[a.createElementVNode("button",{class:a.normalizeClass(["h-[37px] w-[37px] rounded-lg flex items-center justify-center",`bg-${e.value}-400`])},null,2)]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createElementVNode("ul",i8,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(r,(c,b)=>a.createElementVNode("li",{key:b},[a.createVNode(p,{placement:"bottom",trigger:"hover"},{reference:a.withCtx(()=>[a.createElementVNode("div",s8,[a.createElementVNode("div",{class:a.normalizeClass(["flex items-center justify-center h-[24px] shrink-0 w-[24px] rounded-[2px]",`bg-${c==null?void 0:c.color}-400`]),onClick:k=>{var E;e.value=c==null?void 0:c.color,(E=n.value)==null||E.togglePopover()}},[e.value===(c==null?void 0:c.color)?(a.openBlock(),a.createBlock(kl,{key:0,height:"16",width:"16",class:"text-white"})):a.createCommentVNode("",!0)],10,o8)])]),default:a.withCtx(()=>[a.createElementVNode("div",a8,a.toDisplayString(c==null?void 0:c.title),1)]),_:2},1024)])),64))])])]),_:1},512),a.createTextVNode(" "+a.toDisplayString(e.value),1)])}}}},c8={"table-format-text":ah,"table-format-select":vb,"table-format-badge":bb,"table-format-switch":Ea,"table-format-check":Ea,"table-format-switch":Ea,"table-format-yes/no":Ea,"table-format-html":ah,"table-format-tags":wb,"table-format-date":Om,"table-format-number":xx,"table-format-slot":vx},d8={style:{width:"calc(100vw - 300px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 flex items-center justify-center"},u8={class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},h8={class:"mb-4 xl:mb-8"},p8={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},f8={__name:"vs-dashboard",setup(t){return(e,n)=>{var r,o,d;return a.openBlock(),a.createElementBlock("div",d8,[a.createElementVNode("div",u8,[a.createElementVNode("div",h8,[a.createElementVNode("h1",p8," Members "+a.toDisplayString((r=e.$user)==null?void 0:r.user_name)+', "'+a.toDisplayString((d=(o=e.$settings)==null?void 0:o.admin)==null?void 0:d.title)+'" ',1),n[0]||(n[0]=a.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ",-1))]),n[1]||(n[1]=a.createElementVNode("div",{class:"space-y-5"},[a.createElementVNode("div",{class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5"},[a.createElementVNode("div",{class:"relative w-full"},[a.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5"},[a.createElementVNode("svg",{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),a.createElementVNode("path",{d:"m21 21-4.3-4.3"})])]),a.createElementVNode("input",{type:"text",class:"py-2 ps-10 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Search by name or email"}),a.createElementVNode("div",{class:"hidden absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-1"},[a.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-6 rounded-full text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600 dark:text-neutral-500 dark:hover:text-blue-500 dark:focus:text-blue-500","aria-label":"Close"},[a.createElementVNode("span",{class:"sr-only"},"Close"),a.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),a.createElementVNode("path",{d:"m15 9-6 6"}),a.createElementVNode("path",{d:"m9 9 6 6"})])])])]),a.createElementVNode("div",{class:"flex justify-end items-center gap-x-2"},[a.createElementVNode("button",{type:"button",class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[a.createElementVNode("svg",{class:"shrink-0 sm:me-2 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a.createElementVNode("polyline",{points:"7 10 12 15 17 10"}),a.createElementVNode("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]),a.createElementVNode("span",{class:"hidden sm:block"}," Download CSV ")]),a.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-1 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500","data-hs-overlay":"#hs-pro-dshm"},[a.createElementVNode("span",{class:"hidden sm:block"},"Send"),a.createTextVNode("Invite ")])])]),a.createElementVNode("div",{class:"grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-4"},[a.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[a.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[a.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}),a.createElementVNode("div",{class:"flex items-center -space-x-2"},[a.createElementVNode("img",{class:"shrink-0 size-7 rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"})])]),a.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Admin")]),a.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[a.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[a.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 5 "),a.createElementVNode("div",{class:"flex items-center -space-x-2"},[a.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),a.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482634023-2c4fda99ac0c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O ")])]),a.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[a.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Members"),a.createElementVNode("div",{class:"hs-tooltip inline-block"},[a.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[a.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),a.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),a.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(689px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),a.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[a.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[a.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 2 "),a.createElementVNode("div",{class:"flex items-center -space-x-2"},[a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," 0 ")])]),a.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[a.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"}," Limited access members "),a.createElementVNode("div",{class:"hs-tooltip inline-block"},[a.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[a.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),a.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),a.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(1198px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),a.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[a.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[a.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 0 "),a.createElementVNode("div",{class:"flex items-center -space-x-2"})]),a.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Pending invites")])]),a.createElementVNode("div",{class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[a.createElementVNode("div",{class:"min-w-full inline-block align-middle"},[a.createElementVNode("table",{class:"min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},[a.createElementVNode("thead",null,[a.createElementVNode("tr",null,[a.createElementVNode("th",{scope:"col",class:"min-w-[250px]"},[a.createElementVNode("div",{class:"pe-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Member ")]),a.createElementVNode("th",{scope:"col",class:"min-w-48"},[a.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Role ")]),a.createElementVNode("th",{scope:"col"},[a.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Email ")]),a.createElementVNode("th",{scope:"col",class:"min-w-36"},[a.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Last activity ")]),a.createElementVNode("th",{scope:"col"},[a.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Status ")])])]),a.createElementVNode("tbody",{class:"divide-y divide-gray-200 dark:divide-neutral-700"},[a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Admin ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," james@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),a.createTextVNode(" Active ")])])]),a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," liza@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 2 days ago ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),a.createTextVNode(" Inactive ")])])]),a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1601935111741-ae98b2b230b0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Daniel Hobbs ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," dhobbs@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),a.createTextVNode(" Inactive ")])])]),a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Brian Warner ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," brian@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 1 months ago ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),a.createTextVNode(" Active ")])])]),a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O "),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Ols Shols ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," olsshols@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 6 days ago ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),a.createTextVNode(" Inactive ")])])])])])])])],-1))])])}}},m8={methods:{notify(){this.$notify({type:"error",title:"Тестова нотифікація",text:"Нотифікація для показу функціонала"})}}};function g8(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",{onClick:e[0]||(e[0]=(...p)=>d.notify&&d.notify(...p)),class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50"}," Custom component ")}const y8=Oe(m8,[["render",g8]]),_8={props:{item:{type:Object},actions:{type:Array}},data(){return{toggletMap:{}}},methods:{toggleHandler(t){this.toggletMap[t]=!this.toggletMap[t],this.$emit("on:toggled",{optionID:t,toggled:this.toggletMap[t]})}}},b8={class:"md:col-span-2"},x8={class:"font-semibold text-gray-800 dark:text-neutral-200"},v8={class:"md:block md:col-span-1 md:text-center"},w8=["onClick"];function k8(t,e,n,r,o,d){var p,c;return a.openBlock(),a.createElementBlock("ul",{class:a.normalizeClass(["grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700",`grid-cols-${((p=n.actions)==null?void 0:p.length)+2}`])},[a.createElementVNode("li",b8,[a.createElementVNode("h3",x8,a.toDisplayString(n.item.ua),1)]),(c=n.item.menu)!=null&&c.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(n.actions,b=>(a.openBlock(),a.createElementBlock("li",v8,[a.createElementVNode("button",{onClick:k=>d.toggleHandler(b),type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline focus:outline-none focus:underline dark:text-blue-400 dark:hover:text-blue-500"}," Toggle all ",8,w8)]))),256)):a.createCommentVNode("",!0)],2)}const E8=Oe(_8,[["render",k8]]),C8={props:{subitem:{type:Object,required:!0},toggled:{type:Boolean,default:!1},optionID:{type:Number},actions:{type:Array,default:()=>[]},routes:{type:Array,required:!0}},data(){return{checkedActions:[]}},watch:{routes:{handler(){this.initializeCheckedActions()},deep:!0,immediate:!0}},methods:{initializeCheckedActions(){const t=this.routes.find(e=>e.path===this.subitem.path);this.checkedActions=t?[...t.actions]:[]},inputHandler(t){var e;this.$emit("on:checked",{subitemPath:(e=this.subitem)==null?void 0:e.path,checkedActions:this.checkedActions})}},mounted(){this.initializeCheckedActions()}},S8={class:"md:col-span-2"},T8={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},A8={class:"text-sm text-gray-500 dark:text-neutral-500"},D8={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},M8=["value","onChange"];function I8(t,e,n,r,o,d){var p,c;return a.openBlock(),a.createElementBlock("ul",{class:a.normalizeClass(["grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3",`grid-cols-${n.actions.length+2}`])},[a.createElementVNode("li",S8,[a.createElementVNode("p",T8,a.toDisplayString(((p=n.subitem)==null?void 0:p.ua)||""),1),a.createElementVNode("p",A8,a.toDisplayString(((c=n.subitem)==null?void 0:c.path)||""),1)]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.actions,(b,k)=>(a.openBlock(),a.createElementBlock("li",{class:"col-span-1",key:b},[a.createElementVNode("div",D8,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",value:b,onChange:E=>d.inputHandler(b),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500 dark:bg-neutral-800 dark:border-neutral-600 dark:checked:bg-blue-500 dark:checked:border-blue-500","onUpdate:modelValue":e[0]||(e[0]=E=>o.checkedActions=E)},null,40,M8),[[a.vModelCheckbox,o.checkedActions]])])]))),128))],2)}const P8=Oe(C8,[["render",I8]]),ei=a.ref(null),Ay=t=>{const e=[];return t.forEach(n=>{n.menu?e.push(...Ay(n.menu)):e.push(n)}),e},R8={props:{options:{type:String},token:{type:String},routes:{type:Array,default:[]}},components:{VsGrouptFirstLevel:E8,VsGroupSecondLevel:P8,AdminNodata:pg},data(){return{list:ei.value,history:this.routes,toggledInputs:!1,searchValue:""}},computed:{getList(){var e,n;const t={ua:"Без категорії",menu:(e=this.list)==null?void 0:e.filter(r=>!(r!=null&&r.menu))};return this.filterMenu([t,...(n=this.list)==null?void 0:n.filter(r=>r==null?void 0:r.menu)],this.searchValue).filter(r=>{var o;return(o=r==null?void 0:r.menu)==null?void 0:o.length})}},methods:{async Save(){var t,e;try{const n=location.href.split("/").pop();await Le.post(`/api/access-group/${n}`,{routes:(t=this.history)==null?void 0:t.filter(r=>{var o;return(o=r==null?void 0:r.actions)==null?void 0:o.length}).map(({path:r,actions:o})=>({path:r,actions:[...new Set(o)]}))}),await this.$notify({type:"success",title:"Успішно!",message:"Данні успішно оновлені"}),await nh()}catch(n){console.error(((e=n.response)==null?void 0:e.data)||n.message),this.$notify({type:"error",title:"Помилка!",message:"При спробі оновити данні виникла помилка"})}},resetAll(){debugger;this.history=this.history.map(t=>({...t,actions:[]}))},async getData(){var t,e;try{const n=location.href.split("/").pop(),o=(await Le.get(`/api/access-group/${n}`)).data;this.history=this.getUniqueByPath([...o.routes,...(t=Ay(this.list))==null?void 0:t.map(d=>({path:d==null?void 0:d.path,actions:[]}))])}catch(n){console.error(((e=n.response)==null?void 0:e.data)||n.message)}},toggleCheck(t){var n,r;if(!((n=this.history)!=null&&n.length))return;const e=(r=this.history)==null?void 0:r.findIndex(o=>(o==null?void 0:o.path)===(t==null?void 0:t.subitemPath));this.history[e].actions=t==null?void 0:t.checkedActions},toggleAll(t,e){var r,o,d,p,c,b,k;const n=(d=(o=(r=this.getList)==null?void 0:r[e])==null?void 0:o.menu)==null?void 0:d.map(E=>E==null?void 0:E.path);t!=null&&t.toggled?(c=(p=this.history)==null?void 0:p.filter(E=>n==null?void 0:n.includes(E==null?void 0:E.path)))==null||c.forEach(E=>{var C;(C=E==null?void 0:E.actions)==null||C.push(t==null?void 0:t.optionID)}):(k=(b=this.history)==null?void 0:b.filter(E=>n==null?void 0:n.includes(E==null?void 0:E.path)))==null||k.forEach(E=>{var C;E.actions=(C=E==null?void 0:E.actions)==null?void 0:C.filter(T=>T!==(t==null?void 0:t.optionID))})},getUniqueByPath(t){return t.reduce((e,n)=>(e.some(o=>o.path===n.path)||e.push(n),e),[])},filterMenu(t,e){return t.map(n=>{var r,o;if(n.menu){const d=this.filterMenu(n.menu,e);if(d.length>0)return{...n,menu:d}}return(o=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&o.includes(e==null?void 0:e.toLowerCase())?n:null}).filter(Boolean)}},async mounted(){await this.getData()}},N8={class:"flex gap-[6px]"},B8={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},V8={key:0,class:"space-y-8"},z8={class:"space-y-5"};function O8(t,e,n,r,o,d){var E;const p=a.resolveComponent("VsText"),c=a.resolveComponent("VsGrouptFirstLevel"),b=a.resolveComponent("VsGroupSecondLevel"),k=a.resolveComponent("AdminNodata");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",N8,[a.createVNode(p,{placeholder:"Пошук",class:"flex-grow",modelValue:o.searchValue,"onUpdate:modelValue":e[0]||(e[0]=C=>o.searchValue=C)},null,8,["modelValue"]),a.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100",onClick:e[1]||(e[1]=(...C)=>d.resetAll&&d.resetAll(...C))}," Скинути всі "),a.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:e[2]||(e[2]=(...C)=>d.Save&&d.Save(...C))}," Зберегти ")]),a.createElementVNode("div",{class:a.normalizeClass(["grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5",`grid-cols-${n.options.length+2}`])},[e[3]||(e[3]=a.createElementVNode("div",{class:"self-center col-span-2"},[a.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.options,(C,T)=>(a.openBlock(),a.createElementBlock("div",{class:"col-span-1 text-center",key:T},[a.createElementVNode("h3",B8,a.toDisplayString(C),1)]))),128))],2),(E=d.getList)!=null&&E.length?(a.openBlock(),a.createElementBlock("div",V8,[a.createElementVNode("div",z8,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.getList,(C,T)=>(a.openBlock(),a.createElementBlock("div",{key:T},[a.createVNode(c,{item:C,"onOn:toggled":I=>d.toggleAll(I,T),actions:n.options},null,8,["item","onOn:toggled","actions"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C.menu,I=>(a.openBlock(),a.createBlock(b,{toggled:(C==null?void 0:C.toggled)||!1,optionID:C==null?void 0:C.optionID,key:I==null?void 0:I.path,subitem:I,actions:n.options,"onOn:checked":N=>d.toggleCheck(N,T),routes:o.history},null,8,["toggled","optionID","subitem","actions","onOn:checked","routes"]))),128))]))),128))])])):(a.openBlock(),a.createBlock(k,{key:1}))])}const L8=Oe(R8,[["render",O8]]),F8={__name:"vs-group-interface-page",setup(t){const e=["view","add","edit","del"];return(n,r)=>(a.openBlock(),a.createBlock(a.unref(L8),{options:e,routes:n.routes},null,8,["routes"]))}},$8={},j8={class:"shrink-0 size-4 text-gray-400 dark:text-white/60",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function U8(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",j8,e[0]||(e[0]=[a.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),a.createElementVNode("path",{d:"m21 21-4.3-4.3"},null,-1)]))}const Mp=Oe($8,[["render",U8]]),H8={components:{IconSearch:Mp,IconPlus:$l},data(){return{link:null,color:void 0,data:null,searchValue:"",isFormAdd:!1,formValues:{},scheme:{name:{type:"text",ua:"Назва",placeholder:"Назва",validators:["required"]}}}},mounted(){this.link="/admin.user-cls",this.getData()},computed:{rows(){var t,e;return((e=(t=this.data)==null?void 0:t.rows)==null?void 0:e.filter(n=>{var r;return(r=n==null?void 0:n.name)==null?void 0:r.includes(this.searchValue)}))||null}},methods:{async getData(){try{const{data:t}=await Le.get("/api/user-cls?type=json");this.data=t}catch{}},async createNewCls(){var t;try{await((t=this.$refs.form)==null?void 0:t.doValidation()),await Le.post("/api/user-cls",{...this.formValues}),this.isFormAdd=!1,this.formValues={},await this.getData(),this.$notify({type:"success",title:"Успішно!",message:"Новий об'єкт успішно створений"})}catch{this.$notify({type:"error",title:"Помилка",message:"При спробі створити новий об'єкт виникла помилка"})}}}},W8={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},q8={class:"flex items-center justify-between p-2 ps-5 gap-x-2"},G8={class:"relative px-[10px] py-[4px] flex gap-[8px] items-center"},Z8={class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},Y8=["data-index"],X8={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},K8={class:"ml-auto flex items-center gap-[12px]"},J8={class:"text-xs opacity-60"},Q8={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function ej(t,e,n,r,o,d){const p=a.resolveComponent("IconPlus"),c=a.resolveComponent("VsText"),b=a.resolveComponent("router-link"),k=a.resolveComponent("VsForm"),E=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",W8,[a.createElementVNode("div",q8,[e[7]||(e[7]=a.createElementVNode("span",{id:"hs-pro-chat-sidebar-label",class:"block font-semibold text-gray-800 truncate dark:text-neutral-200"}," Довідники ",-1)),a.createElementVNode("button",{onClick:e[0]||(e[0]=C=>o.isFormAdd=!0),class:"bg-[#DBEAFE] h-[30px] w-[30px] text-blue-700 shrink-0 flex items-center justify-center rounded-lg hover:bg-blue-200"},[a.createVNode(p,{height:"16",width:"16"})])]),a.createElementVNode("div",G8,[a.createVNode(c,{type:"text",modelValue:o.searchValue,"onUpdate:modelValue":e[1]||(e[1]=C=>o.searchValue=C),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),a.createElementVNode("ul",Z8,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.rows,C=>{var T,I;return a.openBlock(),a.createElementBlock("li",{key:C==null?void 0:C.id,"data-index":t.index,class:"w-full"},[a.createVNode(b,{class:a.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((I=(T=t.$route)==null?void 0:T.query)==null?void 0:I.name)===(C==null?void 0:C.name)}]),to:o.link+"?name="+((C==null?void 0:C.name)||(C==null?void 0:C.id))},{default:a.withCtx(()=>[a.createElementVNode("span",X8,a.toDisplayString((C==null?void 0:C.name)||(C==null?void 0:C.id)||"Не вказано"),1),a.createElementVNode("div",K8,[a.createElementVNode("div",J8,a.toDisplayString((C==null?void 0:C.children)||"0"),1)])]),_:2},1032,["to","class"])],8,Y8)}),128))])]),a.createVNode(E,{visible:o.isFormAdd,"onUpdate:visible":e[5]||(e[5]=C=>o.isFormAdd=C),title:"Створити давідник",onOnClose:e[6]||(e[6]=C=>o.formValues={})},{footer:a.withCtx(()=>[a.createElementVNode("div",Q8,[a.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[3]||(e[3]=C=>{o.isFormAdd=!1,o.formValues={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:e[4]||(e[4]=(...C)=>d.createNewCls&&d.createNewCls(...C)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode(k,{scheme:o.scheme,ref:"form",modelValue:o.formValues,"onUpdate:modelValue":e[2]||(e[2]=C=>o.formValues=C),class:"p-[10px]"},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}const tj=Oe(H8,[["render",ej]]),nj={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},rj={class:"w-full"},ij={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},sj={class:"max-w-sm mx-auto mt-6"},oj={class:"font-medium text-gray-800 dark:text-neutral-200"},aj={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function lj(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",rj,[a.createElementVNode("div",ij,[e[0]||(e[0]=a.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),a.createElementVNode("div",sj,[a.createElementVNode("p",oj,a.toDisplayString(n.title),1),a.createElementVNode("p",aj,a.toDisplayString(n.text),1)])])])}const Ha=Oe(nj,[["render",lj]]),cj={props:{modelValue:{type:String,default:()=>"#172B4D"},colors:{type:Array,default:()=>["#172B4D","#0055CC","#206A83","#216E4E","#E56910","#AE2E24","#5E4DB2","#758195","#FF0000","#008000","#28A9AB","#AB7222"]}},methods:{updateColor(t){this.$emit("update:modelValue",t),this.$refs.popover.togglePopover()}}},dj={class:"flex w-[160px] flex-wrap gap-[4px]"},uj=["onClick"];function hj(t,e,n,r,o,d){const p=a.resolveComponent("VsPopover");return a.openBlock(),a.createBlock(p,{ref:"popover",placement:"bottom"},{reference:a.withCtx(()=>[a.createElementVNode("button",{class:"h-[37px] w-[37px] rounded-lg flex items-center justify-center",style:a.normalizeStyle({backgroundColor:n.modelValue})},null,4)]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createElementVNode("ul",dj,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.colors,c=>(a.openBlock(),a.createElementBlock("li",{class:"h-[37px] w-[37px] rounded",style:a.normalizeStyle({backgroundColor:c}),onClick:b=>d.updateColor(c),key:c},null,12,uj))),128))])])]),_:1},512)}const Sk=Oe(cj,[["render",hj]]),pj={components:{VsChoceColor:Sk},props:{item:Object},data(){var t,e,n;return{color:((t=this.item)==null?void 0:t.color)||"#D1D5DB",text:((e=this.item)==null?void 0:e.text)||"",id:(n=this.item)==null?void 0:n.id}},watch:{color(t){this.$emit("update-item",{...this.item,color:t})},text(t){this.$emit("update-item",{...this.item,text:t})},id(t){this.$emit("update-item",{...this.item},t)}}},fj={class:"relative flex items-center p-3 bg-white border border-gray-200 group gap-x-3 rounded-xl"},mj={class:"flex flex-col"},gj={class:"flex gap-[30px]"},yj={class:"block text-sm font-semibold text-gray-800 text-start z-[10] cursor-pointer"},_j={class:"block text-sm font-semibold text-gray-400 text-start z-[10] cursor-pointer"},bj={class:"block text-xs text-gray-500 truncate dark:text-neutral-500"};function xj(t,e,n,r,o,d){var b;const p=a.resolveComponent("VsChoceColor"),c=a.resolveComponent("VsInlineEdit");return a.openBlock(),a.createElementBlock("div",fj,[a.createVNode(p,{modelValue:o.color,"onUpdate:modelValue":e[0]||(e[0]=k=>o.color=k)},null,8,["modelValue"]),a.createElementVNode("div",mj,[a.createElementVNode("div",gj,[a.createVNode(c,{modelValue:o.text,"onUpdate:modelValue":e[1]||(e[1]=k=>o.text=k),onUpdateValue:e[2]||(e[2]=k=>o.text=k)},{default:a.withCtx(()=>[a.createElementVNode("p",yj,a.toDisplayString(o.text),1)]),_:1},8,["modelValue"]),a.createVNode(c,{modelValue:o.id,"onUpdate:modelValue":e[3]||(e[3]=k=>o.id=k),onUpdateValue:e[4]||(e[4]=k=>o.id=k)},{default:a.withCtx(()=>[a.createElementVNode("p",_j,a.toDisplayString(o.id),1)]),_:1},8,["modelValue"])]),a.createElementVNode("p",bj,a.toDisplayString((b=n.item)==null?void 0:b.parent),1)])])}const vj={components:{VsReesterUsersItem:Oe(pj,[["render",xj]])},props:{list:Array},data(){return{draggedItemIndex:null}},methods:{dragStart(t,e){this.draggedItemIndex=e,t.dataTransfer.effectAllowed="move"},dragOver(t){t.preventDefault()},drop(t,e){t.preventDefault();const n=this.draggedItemIndex;if(n!==e){const r=[...this.list],o=r[n];r.splice(n,1),r.splice(e,0,o),this.$emit("update-list",r)}this.draggedItemIndex=null},dragEnd(){this.draggedItemIndex=null},updateItem(t,e){var r;const n=(r=this.list)==null?void 0:r.findIndex(o=>(o==null?void 0:o.id)===(t==null?void 0:t.id));this.list[n]=t,e&&(this.list[n].id=e),this.$emit("update-list",this.list)}}},wj={class:"flex flex w-full flex-col gap-[10px] p-[10px] pt-[40px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{"max-height":"calc(100vh - 430px)"}},kj=["onDragstart","onDrop"];function Ej(t,e,n,r,o,d){const p=a.resolveComponent("VsReesterUsersItem");return a.openBlock(),a.createElementBlock("ul",wj,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.list,(c,b)=>(a.openBlock(),a.createElementBlock("li",{key:c==null?void 0:c.id,draggable:!0,onDragstart:k=>d.dragStart(k,b),onDragover:e[0]||(e[0]=k=>d.dragOver(k)),onDrop:k=>d.drop(k,b),onDragend:e[1]||(e[1]=(...k)=>d.dragEnd&&d.dragEnd(...k))},[a.createVNode(p,{item:c,onUpdateItem:d.updateItem},null,8,["item","onUpdateItem"])],40,kj))),128))])}const Cj={components:{VsNoData:Ha,VsChoceColor:Sk,IconCheck:xb,VsReesterUsersList:Oe(vj,[["render",Ej],["__scopeId","data-v-17ce7688"]])},data(){return{scheme:{text:{type:"Text",ua:"Ім'я",placeholder:"Ім'я нового класифікатора",validators:["required"]}},formVisible:!0,formValues:{},color:"#172B4D",data:null}},watch:{$route:{handler(t,e){var n,r;((n=t==null?void 0:t.query)==null?void 0:n.name)!==((r=e==null?void 0:e.query)==null?void 0:r.name)&&this.getData()}}},mounted(){this.getData()},methods:{async getData(){var t;this.data=null;try{const{data:e}=await Le.get(`/api/user-cls/${(t=this.$route.query)==null?void 0:t.name}`);this.data=e}catch{}},async addOneChild(){var t,e,n,r;try{const{form:o}=this.$refs;await o.doValidation(),await Le.post("/api/user-cls",{name:(t=this.$route.query)==null?void 0:t.name,children:[...((e=this.data)==null?void 0:e.children)||[],{...this.formValues,color:this.color,id:(((r=(n=this.data)==null?void 0:n.children)==null?void 0:r.length)||0)+1}]}),this.formVisible=!1,this.formValues={},setTimeout(()=>this.formVisible=!0),await this.getData()}catch(o){console.log(o)}},async updateChildren(t){var e,n;this.data.children=t;try{await Le.post("/api/user-cls",{name:(e=this.$route.query)==null?void 0:e.name,children:[...((n=this.data)==null?void 0:n.children)||[]]}),await this.getData()}catch(r){console.log(r)}}}},Sj={class:"flex justify-center bg-gray-50",style:{height:"calc(100vh - 60px)",width:"calc(100vw - 560px)"}},Tj={key:0,class:"mt-[100px] p-[10px] w-full max-w-[1000px]",style:{"max-height":"calc(100vh - 300px)"}},Aj={class:"font-bold mb-[10px]"},Dj={class:"flex items-end max-w-[1000px] gap-[4px]"};function Mj(t,e,n,r,o,d){var C,T,I,N,$,F,q;const p=a.resolveComponent("VsForm"),c=a.resolveComponent("VsChoceColor"),b=a.resolveComponent("IconCheck"),k=a.resolveComponent("VsReesterUsersList"),E=a.resolveComponent("VsNoData");return a.openBlock(),a.createElementBlock("div",Sj,[(T=(C=t.$route)==null?void 0:C.query)!=null&&T.name?(a.openBlock(),a.createElementBlock("div",Tj,[a.createElementVNode("h2",Aj,a.toDisplayString((N=(I=t.$route)==null?void 0:I.query)==null?void 0:N.name),1),a.createElementVNode("div",Dj,[o.formVisible?(a.openBlock(),a.createBlock(p,{key:0,ref:"form",scheme:o.scheme,modelValue:o.formValues,"onUpdate:modelValue":e[0]||(e[0]=J=>o.formValues=J),class:"p-0 m-0 h-[65px] w-full"},null,8,["scheme","modelValue"])):a.createCommentVNode("",!0),a.createVNode(c,{modelValue:o.color,"onUpdate:modelValue":e[1]||(e[1]=J=>o.color=J)},null,8,["modelValue"]),a.createElementVNode("button",{onClick:e[2]||(e[2]=(...J)=>d.addOneChild&&d.addOneChild(...J)),class:"h-[37px] w-[37px] rounded-lg bg-blue-600 ml-[6px] flex items-center justify-center text-white hover:bg-blue-700 duration-300"},[a.createVNode(b,{height:"20",width:"20"})])]),(F=($=o.data)==null?void 0:$.children)!=null&&F.length?(a.openBlock(),a.createBlock(k,{key:0,class:"w-full max-w-[1000px]",list:(q=o.data)==null?void 0:q.children,onUpdateList:d.updateChildren},null,8,["list","onUpdateList"])):a.createCommentVNode("",!0)])):(a.openBlock(),a.createBlock(E,{key:1,class:"mt-[100px]",text:"Оберіть один з пунктів меню для відображення"}))])}const Ij={components:{VsReesterNavList:tj,VsReesterContent:Oe(Cj,[["render",Mj]])}},Pj={class:"flex items-start gap-0"};function Rj(t,e,n,r,o,d){const p=a.resolveComponent("VsReesterNavList"),c=a.resolveComponent("VsReesterContent");return a.openBlock(),a.createElementBlock("div",Pj,[a.createVNode(p),a.createVNode(c)])}const Nj=Oe(Ij,[["render",Rj]]),Bj={class:"h-[76px] bg-white rounded-xl flex items-center justify-start px-[20px] mb-[16px]"},Vj={class:"mr-[10px]"},zj={class:"text-[20px] font-semibold"},Oj={class:""},Lj={__name:"admin-card-header",props:{title:{type:String},tableName:{type:String},getRoute:{type:String,required:!0},slots:{type:Object},isHeaderEditButton:{type:Boolean,default:()=>!0}},setup(t){var C,T,I,N,$;const{asyncTemplateSlot:e}=($=(N=(I=(T=(C=a.getCurrentInstance())==null?void 0:C.appContext)==null?void 0:T.app)==null?void 0:I.config)==null?void 0:N.globalProperties)==null?void 0:$.utils,n=t,r=ST(),o=id(),d=a.ref(""),p=a.ref(""),c=()=>{var F;r.back()||r.push(`/${(F=o==null?void 0:o.params)==null?void 0:F.table}`)},b=a.computed(()=>{var F;return`/edit?table=${n.getRoute}&id=${(F=o==null?void 0:o.params)==null?void 0:F.id}`}),k=()=>{var F,q,J,Q;if(!((F=n.slots)!=null&&F.panelLeft))return"div";if((q=n.slots)!=null&&q.panelLeft.includes("<")){const me=e("PanelLeft",(J=n.slots)==null?void 0:J.panelLeft,["name"]);p.value=me}else p.value=(Q=n.slots)==null?void 0:Q.panelLeft},E=()=>{var F,q,J,Q;if(!((F=n.slots)!=null&&F.panelRight))return"div";if((q=n.slots)!=null&&q.panelRight.includes("<")){const me=e("PanelRight",(J=n.slots)==null?void 0:J.panelRight,["name"]);d.value=me}else d.value=(Q=n.slots)==null?void 0:Q.panelRight};return k(),E(),(F,q)=>{const J=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Bj,[a.createElementVNode("div",Vj,[a.createElementVNode("h2",zj,a.toDisplayString(t.title),1),t.tableName?(a.openBlock(),a.createElementBlock("div",{key:0,class:"text-[14px] font-medium text-[#676A6C] cursor-pointer hover:underline",onClick:q[0]||(q[0]=Q=>a.unref(r).push("/"+n.getRoute))},a.toDisplayString(t.tableName),1)):a.createCommentVNode("",!0)]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(p.value))),a.createElementVNode("div",{class:a.normalizeClass([{"gap-[6px]":t.isHeaderEditButton},"flex items-center ml-auto"])},[a.createElementVNode("button",{onClick:c,class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},q[1]||(q[1]=[a.createElementVNode("svg",{class:"transition duration-200 ease-in-out group-hover:stroke-white",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M7.00008 11.5833L2.91675 7.49999L7.00008 3.41666",stroke:"#1f2937","stroke-linecap":"round","stroke-linejoin":"round"}),a.createElementVNode("path",{d:"M11.0834 7.5H2.91675",stroke:"#2563EB","stroke-linecap":"round","stroke-linejoin":"round"})],-1),a.createElementVNode("span",{class:"hidden sm:block ml-[8px]"},"Повернутися до реєстру",-1)])),a.createElementVNode("div",Oj,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(d.value)))]),t.isHeaderEditButton?(a.openBlock(),a.createBlock(J,{key:0,to:b.value,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"},{default:a.withCtx(()=>q[2]||(q[2]=[a.createTextVNode(" Редагувати ",-1)])),_:1,__:[2]},8,["to"])):a.createCommentVNode("",!0)],2)])}}},Fj={__name:"admin-card-async-component",props:{slot:String,data:Object,objectData:Object},setup(t){var d,p,c,b,k;const{asyncTemplateSlot:e}=(k=(b=(c=(p=(d=a.getCurrentInstance())==null?void 0:d.appContext)==null?void 0:p.app)==null?void 0:c.config)==null?void 0:b.globalProperties)==null?void 0:k.utils,n=a.ref(""),r=t;return(()=>{const E=e("CustomComponent",r.slot,["data"]);n.value=E})(),(E,C)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value),{data:t.objectData},null,8,["data"]))}},$j={},jj={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function Uj(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",jj,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Ip=Oe($j,[["render",Uj]]),Hj={class:"px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none"},Wj={class:"flex flex-col gap-[4px]"},qj=["onClick"],Gj={props:["table","id","isHeader"],components:{AdminCardHeader:Lj,AdminCardAsyncComponent:Fj,IconChevron:Bd,AdminCardTabsDropdown:{__name:"admin-card-tabs-dropdown",props:a.mergeModels({options:{type:Array}},{activeTab:{},activeTabModifiers:{}}),emits:["update:activeTab"],setup(t){const e=t,n=a.useModel(t,"activeTab"),r=a.ref(),o=a.computed(()=>{var c;const p=(c=e.options)==null?void 0:c.find(b=>(b==null?void 0:b.name)===n.value||(b==null?void 0:b.component)===n.value);return(p==null?void 0:p.title)||"Показати більше"}),d=p=>{var c;n.value=p,(c=r.value)==null||c.togglePopover()};return(p,c)=>{const b=a.resolveComponent("VsPopover");return a.openBlock(),a.createBlock(b,{ref_key:"popover",ref:r,placement:"bottom"},{reference:a.withCtx(()=>[a.createElementVNode("button",Hj,[a.createTextVNode(a.toDisplayString(o.value)+" ",1),a.createVNode(Ip,{height:"12",width:"12"})])]),default:a.withCtx(()=>[a.createElementVNode("div",Wj,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.options,k=>(a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["cursor-pointer py-1.5 px-2 text-[13px] text-start text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100",{"bg-gray-100":n.value===(k==null?void 0:k.component)||n.value===(k==null?void 0:k.name)}]),onClick:E=>d((k==null?void 0:k.component)||(k==null?void 0:k.name))},a.toDisplayString(k==null?void 0:k.title),11,qj))),256))])]),_:1},512)}}}},data(){return{objectData:null,showTabs:!1,component:""}},computed:{getRoute(){const t=this.flattenMenu(ei.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(n=>{var r,o;return(n==null?void 0:n.table)==((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.table)});return e||this.$router.replace("/404"),e==null?void 0:e.path},getTable(){const t=this.flattenMenu(ei.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(n=>{var r,o;return(n==null?void 0:n.table)==((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.table)});return e||this.$router.replace("/404"),e==null?void 0:e.ua},getTitle(){var t,e,n,r,o,d,p,c,b,k,E,C;return((o=(e=(t=this.objectData)==null?void 0:t.rows)==null?void 0:e[0])==null?void 0:o[(r=(n=this.objectData)==null?void 0:n.meta)==null?void 0:r.title])||((E=(p=(d=this.objectData)==null?void 0:d.rows)==null?void 0:p[0])==null?void 0:E[(k=(b=(c=this.objectData)==null?void 0:c.columns)==null?void 0:b.find(T=>(T==null?void 0:T.meta)==="title"))==null?void 0:k.name])||((C=this.objectData)==null?void 0:C.title)||this.getTable}},async mounted(){await this.getObjectData(),await this.checkActiveComponent(),addEventListener("reloadCardPage",this.getObjectData)},unmounted(){removeEventListener("reloadCardPage",this.getObjectData)},watch:{component(t){var e;this.showTabs=!1,this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,tab:t}})},$route:{async handler(t,e){var n,r,o,d;(((n=t==null?void 0:t.params)==null?void 0:n.table)!==((r=e==null?void 0:e.params)==null?void 0:r.table)||((o=t==null?void 0:t.params)==null?void 0:o.id)!==((d=e==null?void 0:e.params)==null?void 0:d.id))&&await this.getObjectData(),await this.checkActiveComponent()}}},methods:{async getObjectData(){var n,r;const t=this.table||((n=this.$route)==null?void 0:n.params.table),e=this.id||((r=this.$route)==null?void 0:r.params.id);(!t||!e)&&this.$router.replace("/404");try{const{data:o}=await Le.get(`/api/table-data/${t}/${e}`);this.objectData=o}catch(o){console.error(o)}},getColClass(t){return`lg:col-span-${t||12}`},getGridClass(){return"grid-cols-12"},checkActiveComponent(){var t,e,n,r,o,d,p,c,b;if((e=(t=this.$route)==null?void 0:t.query)!=null&&e.tab)this.component=(r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.tab;else{const k=(d=(o=this.objectData)==null?void 0:o.panels)==null?void 0:d.find(E=>(E==null?void 0:E.type)==="tabs"||(E==null?void 0:E.type)==="vertical-tabs");(p=k==null?void 0:k.items)!=null&&p.length&&(this.component=((c=k.items[0])==null?void 0:c.component)||((b=k.items[0])==null?void 0:b.name))}},getProps(t){var n,r,o;const e={};for(const d in t)["name","component","title","token"].includes(d)||(e[d]=((o=(r=(n=this.objectData)==null?void 0:n.rows)==null?void 0:r[0])==null?void 0:o[t[d]])||t[d]);return e},columnClass(t=12){return{1:"md:w-1/12 sm:w-full",2:"md:w-1/6 sm:w-full",3:"md:w-1/4 sm:w-full",4:"md:w-1/3 sm:w-full",6:"md:w-1/2 sm:w-full",8:"md:w-2/3 sm:w-full",10:"md:w-5/6 sm:w-full",12:"w-full"}[t]||"w-full"},flattenMenu(t){const e=[];return t==null||t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e}}},Zj={class:"flex gap-[20px]"},Yj={key:0,class:"p-[10px] pl-[20px] text-md font-[500]"},Xj=["innerHTML"],Kj={key:0,class:"bg-white rounded-xl"},Jj={class:"p-[10px] pl-[20px] text-md font-[500]"},Qj=["innerHTML"],e7={key:1},t7={key:0,class:"p-[10px] pl-[20px] text-md font-[500]"},n7={key:2,class:"p-[20px]"},r7=["innerHTML"],i7={class:"flex flex-wrap gap-1 w-full bg-white py-[16px] border-b-0 rounded-tr-xl rounded-tl-xl min-h-[60px] pl-[20px]"},s7=["onClick"],o7={class:"p-1"},a7={key:1},l7={key:2,class:"absolute right-[-4px] top-[-5px] text-[10px] leading-[1] text-white bg-blue-600 rounded-full min-w-[16px] h-[16px] flex items-center justify-center p-1"},c7={key:0},d7={key:0,class:"bg-white border-t-0 rounded-bl-xl rounded-br-xl"},u7={key:0,class:"p-[20px]"},h7={key:1,class:"p-[20px]"},p7=["innerHTML"],f7={key:3,class:"flex"},m7=["onClick"],g7={class:"flex-grow w-[80%]"},y7={key:0,class:"w-full h-full overflow-auto bg-white rounded-xl [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},_7={key:0,class:"p-[20px]"},b7={key:1,class:"p-[20px]"},x7=["innerHTML"];function v7(t,e,n,r,o,d){var C,T,I,N,$,F,q,J;const p=a.resolveComponent("AdminCardHeader"),c=a.resolveComponent("AdminCardAsyncComponent"),b=a.resolveComponent("VsPopover"),k=a.resolveComponent("AdminCardTabsDropdown"),E=a.resolveComponent("IconChevron");return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle({height:((C=t.$adminSettings)==null?void 0:C.header)===!1?"calc(100vh)":"calc(100vh - 60px)"}),class:"p-4 overflow-y-auto bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw] text-[13px]"},[o.objectData&&((T=o.objectData)==null?void 0:T.isHeader)!==!1&&n.isHeader!==!1?(a.openBlock(),a.createBlock(p,{key:0,title:d.getTitle,tableName:d.getTable,"get-route":d.getRoute,slots:(I=o.objectData)==null?void 0:I.slots,isHeaderEditButton:(N=o.objectData)==null?void 0:N.isHeaderEditButton},null,8,["title","tableName","get-route","slots","isHeaderEditButton"])):a.createCommentVNode("",!0),a.createElementVNode("div",Zj,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((F=($=o.objectData)==null?void 0:$.panels)==null?void 0:F.filter(Q=>(Q==null?void 0:Q.type)==="pin"),(Q,me)=>(a.openBlock(),a.createElementBlock("div",{key:me,class:a.normalizeClass(["col-span-12 shrink-0",d.columnClass(Q.col)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.items,(ke,Re)=>{var Ee,Ve,Be,Ze,tt,Xe,ot,ue,Ut,wt,$t,an,xn,mn;return a.openBlock(),a.createElementBlock("div",{key:Re,class:a.normalizeClass([{"mb-[20px]":Q.items.length>1},"bg-white rounded-xl"])},[ke!=null&&ke.title?(a.openBlock(),a.createElementBlock("h2",Yj,a.toDisplayString((ke==null?void 0:ke.title)||"Панель"),1)):a.createCommentVNode("",!0),ke!=null&&ke.component?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["p-[20px]",{"border-t":ke==null?void 0:ke.title}])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ke.component),a.mergeProps({geometry:(Ve=(Ee=o.objectData)==null?void 0:Ee.rows[0])==null?void 0:Ve.geom,columns:ke==null?void 0:ke.columns,token:(Ze=(Be=o.objectData)==null?void 0:Be.tokens)==null?void 0:Ze[ke==null?void 0:ke.token],zoom:16},{ref_for:!0},d.getProps(ke),{data:o.objectData,id:(Xe=(tt=t.$route)==null?void 0:tt.params)==null?void 0:Xe.id}),null,16,["geometry","columns","token","data","id"]))],2)):a.createCommentVNode("",!0),ke!=null&&ke.name?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["p-[20px]",{"border-t":ke==null?void 0:ke.title}])},[(ue=(ot=o.objectData)==null?void 0:ot.html)!=null&&ue[ke==null?void 0:ke.name]?(a.openBlock(),a.createElementBlock("div",{key:0,innerHTML:(wt=(Ut=o.objectData)==null?void 0:Ut.html)==null?void 0:wt[ke==null?void 0:ke.name]},null,8,Xj)):(a.openBlock(),a.createBlock(c,{key:1,slot:(an=($t=o.objectData)==null?void 0:$t.vue)==null?void 0:an[ke==null?void 0:ke.name],data:(mn=(xn=o.objectData)==null?void 0:xn.rows)==null?void 0:mn[0],objectData:o.objectData},null,8,["slot","data","objectData"]))],2)):a.createCommentVNode("",!0)],2)}),128))],2))),128)),a.createElementVNode("div",{class:a.normalizeClass(["grid gap-[20px] flex-grow h-fit",d.getGridClass()])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((J=(q=o.objectData)==null?void 0:q.panels)==null?void 0:J.filter(Q=>(Q==null?void 0:Q.type)!=="pin"),(Q,me)=>{var ke,Re,Ee,Ve,Be,Ze,tt,Xe,ot;return a.openBlock(),a.createElementBlock("div",{key:me,class:a.normalizeClass(["col-span-12",d.getColClass(Q.col)])},[Q!=null&&Q.name?(a.openBlock(),a.createElementBlock("div",Kj,[a.createElementVNode("h2",Jj,a.toDisplayString((Q==null?void 0:Q.title)||"Панель"),1),(ke=o.objectData)!=null&&ke.html[Q==null?void 0:Q.name]?(a.openBlock(),a.createElementBlock("div",{key:0,class:"p-[20px]",innerHTML:(Re=o.objectData)==null?void 0:Re.html[Q==null?void 0:Q.name]},null,8,Qj)):(a.openBlock(),a.createBlock(c,{key:1,slot:(Ee=o.objectData)==null?void 0:Ee.vue[Q==null?void 0:Q.name],data:(Be=(Ve=o.objectData)==null?void 0:Ve.rows)==null?void 0:Be[0],objectData:o.objectData},null,8,["slot","data","objectData"]))])):Q.type==="container"?(a.openBlock(),a.createElementBlock("div",e7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.items,(ue,Ut)=>{var wt,$t,an,xn,mn,hn,vn,Dn,In,Hn,Wn,Te,Ke,nt;return a.openBlock(),a.createElementBlock("div",{key:Ut,class:a.normalizeClass([{"mb-[20px]":Q.items.length>1},"bg-white rounded-xl"])},[ue!=null&&ue.title?(a.openBlock(),a.createElementBlock("h2",t7,a.toDisplayString((ue==null?void 0:ue.title)||"Панель"),1)):a.createCommentVNode("",!0),ue!=null&&ue.component?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["p-[20px]",{"border-t":ue==null?void 0:ue.title}])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ue.component),a.mergeProps({geometry:($t=(wt=o.objectData)==null?void 0:wt.rows[0])==null?void 0:$t.geom,columns:ue==null?void 0:ue.columns,token:(xn=(an=o.objectData)==null?void 0:an.tokens)==null?void 0:xn[ue==null?void 0:ue.token],zoom:16},{ref_for:!0},d.getProps(ue),{data:o.objectData,id:(hn=(mn=t.$route)==null?void 0:mn.params)==null?void 0:hn.id}),null,16,["geometry","columns","token","data","id"]))],2)):a.createCommentVNode("",!0),ue!=null&&ue.name?(a.openBlock(),a.createElementBlock("div",n7,[(Dn=(vn=o.objectData)==null?void 0:vn.html)!=null&&Dn[ue==null?void 0:ue.name]?(a.openBlock(),a.createElementBlock("div",{key:0,innerHTML:(Hn=(In=o.objectData)==null?void 0:In.html)==null?void 0:Hn[ue==null?void 0:ue.name]},null,8,r7)):(a.openBlock(),a.createBlock(c,{key:1,slot:(Te=(Wn=o.objectData)==null?void 0:Wn.vue)==null?void 0:Te[ue==null?void 0:ue.name],data:(nt=(Ke=o.objectData)==null?void 0:Ke.rows)==null?void 0:nt[0],objectData:o.objectData},null,8,["slot","data","objectData"]))])):a.createCommentVNode("",!0)],2)}),128))])):a.createCommentVNode("",!0),(Q==null?void 0:Q.type)==="tabs"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createElementVNode("nav",i7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ze=Q==null?void 0:Q.items)==null?void 0:Ze.slice(0,Q==null?void 0:Q.limit),ue=>(a.openBlock(),a.createElementBlock("button",{key:(ue==null?void 0:ue.name)||(ue==null?void 0:ue.component),onClick:Ut=>o.component=(ue==null?void 0:ue.component)||(ue==null?void 0:ue.name),class:a.normalizeClass(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none",{"bg-gray-100":o.component===(ue==null?void 0:ue.component)||o.component===(ue==null?void 0:ue.name),"":o.component!==(ue==null?void 0:ue.component)&&o.component!==(ue==null?void 0:ue.name)}])},[ue!=null&&ue.info?(a.openBlock(),a.createBlock(b,{key:0,trigger:"hover",placement:"top"},{reference:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(ue==null?void 0:ue.title),1)]),default:a.withCtx(()=>[a.createElementVNode("span",o7,a.toDisplayString(ue==null?void 0:ue.info),1)]),_:2},1024)):(a.openBlock(),a.createElementBlock("div",a7,a.toDisplayString(ue==null?void 0:ue.title),1)),(ue==null?void 0:ue.component)==="vs-widget-comments"&&(ue!=null&&ue.count)?(a.openBlock(),a.createElementBlock("div",l7,a.toDisplayString(ue==null?void 0:ue.count),1)):a.createCommentVNode("",!0)],10,s7))),128)),Q!=null&&Q.limit&&((Xe=(tt=Q==null?void 0:Q.items)==null?void 0:tt.slice(Q==null?void 0:Q.limit))!=null&&Xe.length)?(a.openBlock(),a.createElementBlock("div",c7,[a.createVNode(k,{options:(ot=Q==null?void 0:Q.items)==null?void 0:ot.slice(Q==null?void 0:Q.limit),"active-tab":o.component,"onUpdate:activeTab":e[0]||(e[0]=ue=>o.component=ue)},null,8,["options","active-tab"])])):a.createCommentVNode("",!0)]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.items,(ue,Ut)=>{var wt,$t,an,xn,mn,hn,vn,Dn,In,Hn,Wn,Te;return a.openBlock(),a.createElementBlock(a.Fragment,{key:Ut},[o.component===(ue==null?void 0:ue.component)||o.component===(ue==null?void 0:ue.name)?(a.openBlock(),a.createElementBlock("div",d7,[ue!=null&&ue.component?(a.openBlock(),a.createElementBlock("div",u7,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ue.component),a.mergeProps({data:o.objectData,token:($t=(wt=o.objectData)==null?void 0:wt.tokens)==null?void 0:$t[ue==null?void 0:ue.token],columns:ue==null?void 0:ue.columns,geometry:(xn=(an=o.objectData)==null?void 0:an.rows[0])==null?void 0:xn.geom},{ref_for:!0},d.getProps(ue),{zoom:16,id:(hn=(mn=t.$route)==null?void 0:mn.params)==null?void 0:hn.id}),null,16,["data","token","columns","geometry","id"]))])):a.createCommentVNode("",!0),ue!=null&&ue.name?(a.openBlock(),a.createElementBlock("div",h7,[(Dn=(vn=o.objectData)==null?void 0:vn.html)!=null&&Dn[ue==null?void 0:ue.name]?(a.openBlock(),a.createElementBlock("div",{key:0,innerHTML:(In=o.objectData)==null?void 0:In.html[ue==null?void 0:ue.name]},null,8,p7)):(a.openBlock(),a.createBlock(c,{key:1,slot:(Hn=o.objectData)==null?void 0:Hn.vue[ue==null?void 0:ue.name],data:(Te=(Wn=o.objectData)==null?void 0:Wn.rows)==null?void 0:Te[0],objectData:o.objectData},null,8,["slot","data","objectData"]))])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)}),128))],64)):a.createCommentVNode("",!0),(Q==null?void 0:Q.type)==="vertical-tabs"?(a.openBlock(),a.createElementBlock("div",f7,[a.createElementVNode("div",{class:a.normalizeClass(["p-[5px] bg-white absolute left-0 rounded-lg rounded-tl-[0] rounded-bl-[0]",[{"left-[260px]":o.showTabs}]]),onClick:e[1]||(e[1]=ue=>o.showTabs=!o.showTabs)},[a.createVNode(E,{height:"16",width:"16",class:"-rotate-90"})],2),a.createElementVNode("nav",{class:a.normalizeClass(["lg:relative lg:left-0 flex flex-col space-y-2 max-w-[260px] w-full rounded-xl mr-4 items-start pl-[10px] z-[2] lg:z-0 bg-white py-[20px] absolute left-[-100%]",[{"left-0 rounded-tr-[0]":o.showTabs}]])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q==null?void 0:Q.items,ue=>(a.openBlock(),a.createElementBlock("button",{key:(ue==null?void 0:ue.name)||(ue==null?void 0:ue.component),onClick:Ut=>o.component=(ue==null?void 0:ue.component)||(ue==null?void 0:ue.name),class:a.normalizeClass(["relative inline-flex items-center w-full py-1 text-sm text-left whitespace-pre-wrap border-transparent pe-4 gap-x-2 border-e-2 hover:text-blue-600 focus:outline-none focus:text-blue-600",{"font-semibold after:absolute after:top-[0] after:right-[-1px] after:h-full text-blue-600 after:w-[2px] after:bg-blue-600 ":o.component===(ue==null?void 0:ue.component)||o.component===(ue==null?void 0:ue.name),"text-gray-500":o.component!==(ue==null?void 0:ue.component)&&o.component!==(ue==null?void 0:ue.name)}])},a.toDisplayString(ue==null?void 0:ue.title),11,m7))),128))],2),a.createElementVNode("div",g7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.items,(ue,Ut)=>{var wt,$t,an,xn,mn,hn,vn,Dn,In,Hn,Wn,Te;return a.openBlock(),a.createElementBlock(a.Fragment,{key:Ut},[o.component===(ue==null?void 0:ue.component)||o.component===(ue==null?void 0:ue.name)?(a.openBlock(),a.createElementBlock("div",y7,[ue!=null&&ue.component?(a.openBlock(),a.createElementBlock("div",_7,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ue.component),a.mergeProps({token:($t=(wt=o.objectData)==null?void 0:wt.tokens)==null?void 0:$t[ue==null?void 0:ue.token],data:o.objectData,columns:ue==null?void 0:ue.columns,geometry:(xn=(an=o.objectData)==null?void 0:an.rows[0])==null?void 0:xn.geom},{ref_for:!0},d.getProps(ue),{id:(hn=(mn=t.$route)==null?void 0:mn.params)==null?void 0:hn.id}),null,16,["token","data","columns","geometry","id"]))])):a.createCommentVNode("",!0),ue!=null&&ue.name?(a.openBlock(),a.createElementBlock("div",b7,[(Dn=(vn=o.objectData)==null?void 0:vn.html)!=null&&Dn[ue==null?void 0:ue.name]?(a.openBlock(),a.createElementBlock("div",{key:0,innerHTML:(In=o.objectData)==null?void 0:In.html[ue==null?void 0:ue.name]},null,8,x7)):(a.openBlock(),a.createBlock(c,{key:1,slot:(Hn=o.objectData)==null?void 0:Hn.vue[ue==null?void 0:ue.name],data:(Te=(Wn=o.objectData)==null?void 0:Wn.rows)==null?void 0:Te[0],objectData:o.objectData},null,8,["slot","data","objectData"]))])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)}),128))])])):a.createCommentVNode("",!0)],2)}),128))],2)])],4)}const Dy=Oe(Gj,[["render",v7],["__scopeId","data-v-8cb630cb"]]),w7=Object.freeze(Object.defineProperty({__proto__:null,default:Dy},Symbol.toStringTag,{value:"Module"})),k7={__name:"vs-calendar-page",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",null,[a.createVNode(Ck)]))}},E7={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},C7={class:"relative px-[10px] py-[10px] flex gap-[8px] items-center"},S7={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},T7=["data-index"],A7={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},D7="/admin.interfaces",M7={__name:"vs-table-settings-nav-list",props:{list:{},listModifiers:{}},emits:["update:list"],setup(t){const e=a.useModel(t,"list"),n=a.ref(""),r=a.computed(()=>{var d;return(d=e.value)==null?void 0:d.filter(p=>{var c,b,k;return(k=(c=p==null?void 0:p.title)==null?void 0:c.toLowerCase())==null?void 0:k.includes((b=n.value)==null?void 0:b.toLowerCase())})});return(async()=>{try{const{data:d}=await Le.get("/api/interfaces");e.value=d}catch{}})(),(d,p)=>{var k;const c=a.resolveComponent("VsText"),b=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",E7,[a.createElementVNode("div",C7,[a.createVNode(c,{type:"text",modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=E=>n.value=E),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(k=r.value)!=null&&k.length?(a.openBlock(),a.createElementBlock("ul",S7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.value,E=>{var C,T;return a.openBlock(),a.createElementBlock("li",{key:E==null?void 0:E.name,"data-index":d.index,class:"w-full"},[a.createVNode(b,{class:a.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((T=(C=d.$route)==null?void 0:C.query)==null?void 0:T.name)===(E==null?void 0:E.alias)}]),to:D7+"?name="+(E==null?void 0:E.alias)},{default:a.withCtx(()=>[a.createElementVNode("span",A7,a.toDisplayString((E==null?void 0:E.title)||(E==null?void 0:E.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,T7)}),128))])):a.createCommentVNode("",!0)])}}},I7={class:"bg-white"},P7={class:"flex flex-col gap-[5px]"},R7={class:"flex items-center gap-2 cursor-pointer"},N7=["checked","onChange"],B7={class:"text-gray-800 underline decoration-dashed decoration-[1px] decoration-blue-600"},Tk={__name:"vs-table-settings-tab-list",props:{columns:{type:Array,required:!0,default:()=>[]},table:{type:String,default:""}},emits:["update"],setup(t,{emit:e}){const n=a.getCurrentInstance().proxy.$notify,r=t,o=e,d=a.ref(r.columns.map(k=>({...k,editableValue:k.ua!==void 0?k.ua:k.title})));a.watch(()=>r.columns,k=>{d.value=k.map(E=>({...E,editableValue:E.ua!==void 0?E.ua:E.title}))},{deep:!0});const p=k=>{k.hidden=!k.hidden},c=async()=>{try{await Le.post(`/api/settings-table/${r.table}`,{columns:d.value}),await n({type:"success",title:"Успішно!",message:"Дані було успішно оновлено"}),o("update")}catch(k){console.error("Помилка збереження:",k),await n({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},b=(k,E)=>{k.editableValue=E,k.ua!==void 0?k.ua=E:k.title=E};return(k,E)=>{const C=a.resolveComponent("VsInlineEdit");return a.openBlock(),a.createElementBlock("div",I7,[a.createElementVNode("div",{class:"flex justify-end p-3"},[a.createElementVNode("button",{onClick:c,class:"px-4 py-2 text-white bg-blue-600 rounded-lg shadow-sm hover:bg-blue-700 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")]),a.createElementVNode("div",P7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,T=>(a.openBlock(),a.createElementBlock("div",{key:T.name,class:"flex items-center justify-between p-3 border rounded-lg shadow-sm"},[a.createElementVNode("div",R7,[a.createElementVNode("input",{type:"checkbox",checked:!T.hidden,onChange:()=>p(T),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,N7),a.createVNode(C,{modelValue:T.editableValue,"onUpdate:modelValue":I=>T.editableValue=I,component:"vs-text",onUpdateValue:I=>b(T,I)},{default:a.withCtx(()=>[a.createElementVNode("span",B7,a.toDisplayString(T.editableValue),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onUpdateValue"])])]))),128))])])}}},V7={created(){this.isVisible=!1},mounted(){this.type==="customColumns"&&(this.colModel=[{key:"title",placeholder:"Назва колонки українською",ua:"Назва колонки українською",type:"text",slots:{row:'<div class="flex items-center gap-2"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${row?.type}.svg`"/> <span class="text-[12px]">{{ row?.title }}</span></div>'},validators:["required"]},{key:"type",type:"radio",ua:"Тип колонки",view:"buttons",style:{class:"!w-[calc(50%-5px)]"},slots:{label:'<div class="flex items-center justify-start w-full gap-4"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${id}.svg`"/><div class="flex flex-col items-start gap-1"><span class="text-black text-[14px]">{{text}}</span><span class="text-[12px]">{{description}}</span></div></div>'},options:[{id:"text",text:"Текст",description:"Маленький або довгий текст, наприклад заголовок або опис"},{id:"number",text:"Цифри",description:"Числа (цілі, з плаваючою точкою, десяткові)"},{id:"date",text:"Дата",description:"Вибір дати з годинами, хвилинами та секундами"},{id:"switcher",text:"Так/Ні",description:"Так чи ні, 1 або 0, вірно чи хибно"},{id:"file",text:"Файл",description:"Різноманітні файли"},{id:"select",text:"Селект",description:"Список значень, а потім виберіть одне"},{id:"badge",text:"Бейдж",description:"Стилізоване значення з переліку"}],validators:["required"]},{key:"enabled",type:"Switcher",ua:"Увімкнено",col:6}]),setTimeout(()=>this.isVisible=!0,100)},props:{data:Array,table:String,type:String},data(){return{localData:this.data?[...this.data]:[],isVisible:!1,colModel:[{key:"name",name:"name",type:"Text",ua:"Назва"},{key:"description",name:"description",type:"Text",ua:"Опис"},{key:"query",name:"query",type:"Text",ua:"Query"}]}},methods:{async handleSave(){try{await Le.post(`/api/settings-table/${this.table}`,{[this.type]:this.localData}),this.$emit("update")}catch(t){console.error("Помилка збереження:",t)}}},watch:{data:{deep:!0,handler(t){t?this.localData=[...t]:this.localData=[]}}}},z7={class:"flex justify-end p-3"};function O7(t,e,n,r,o,d){const p=a.resolveComponent("VsDataTable");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",z7,[a.createElementVNode("button",{onClick:e[0]||(e[0]=(...c)=>d.handleSave&&d.handleSave(...c)),class:"px-4 py-2 text-white bg-blue-600 rounded-lg shadow-sm hover:bg-blue-700 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")]),o.isVisible?(a.openBlock(),a.createBlock(p,{class:"w-full",modelValue:o.localData,"onUpdate:modelValue":e[1]||(e[1]=c=>o.localData=c),colModel:o.colModel,key:o.localData,addition:!1,import:!1,additionBottom:!0},null,8,["modelValue","colModel"])):a.createCommentVNode("",!0)])}const Ak=Oe(V7,[["render",O7]]),L7={"vs-table-settings-tab-list":Tk,"vs-table-settings-tab-datetable":Ak},F7={components:{VsNoData:Ha,IconMore:dg,IconEdit:hg,IconDelete:ug,TableSettingsTabList:Tk,TableSettingsDataTable:Ak},props:{list:{type:Array,default:()=>[]}},data(){return{tableSettingsTabs:L7,tabs:{customColumns:{id:"vs-table-settings-tab-datetable",title:"Користувацькі колонки"},customFilters:{id:"vs-table-settings-tab-datetable",title:"Користувацькі фільтри"},columns:{id:"vs-table-settings-tab-list",title:"Колонки"}},currentTab:"customColumns",tableData:null}},computed:{table(){var t,e;return(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.name}},watch:{$route:{handler(t,e){var n,r;((n=t==null?void 0:t.query)==null?void 0:n.name)!==((r=e==null?void 0:e.query)==null?void 0:r.name)&&this.getData()},immediate:!0}},methods:{async getData(){var t,e;try{const n=(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.name,r=await Le.get(`/api/settings-table/${n}`);this.tableData=r.data}catch(n){console.error("Помилка завантаження даних таблиці:",n),this.tableData=null}},changeTab(t){this.currentTab=t}}},$7={class:"flex bg-gray-50",style:{height:"calc(-80px + 100vh)",width:"calc(-560px + 100vw)"}},j7={key:0,class:"flex flex-col flex-1 w-full p-2 space-y-3 sm:p-5 sm:py-0 md:pt-5"},U7={class:"ml-2 text-2xl"},H7={class:"w-full flex flex-row whitespace-nowrap overflow-x-auto overflow-y-hidden pb-1 [&::-webkit-scrollbar]:h-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},W7=["onClick"],q7={class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700 flex-1 overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},G7={key:0},Z7={key:1,class:"text-gray-500"};function Y7(t,e,n,r,o,d){var c,b;const p=a.resolveComponent("VsNoData");return a.openBlock(),a.createElementBlock("div",$7,[d.table?(a.openBlock(),a.createElementBlock("div",j7,[a.createElementVNode("h2",U7,a.toDisplayString((b=(c=n.list)==null?void 0:c.find(k=>{var E,C,T,I;return(k==null?void 0:k.table)==((C=(E=t.$route)==null?void 0:E.query)==null?void 0:C.name)||(k==null?void 0:k.alias)==((I=(T=t.$route)==null?void 0:T.query)==null?void 0:I.name)}))==null?void 0:b.title),1),a.createElementVNode("div",H7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.tabs,(k,E)=>(a.openBlock(),a.createElementBlock("button",{key:E,onClick:C=>d.changeTab(E),class:a.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-800",[o.currentTab===E?"bg-white shadow-sm !border-gray-200":""]])},a.toDisplayString(k.title),11,W7))),128))]),a.createElementVNode("div",q7,[o.tableData?(a.openBlock(),a.createElementBlock("div",G7,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.tableSettingsTabs[o.tabs[o.currentTab].id]),a.mergeProps({key:o.currentTab},o.tableData,{data:o.tableData[o.currentTab],type:o.currentTab,table:d.table,onUpdate:d.getData}),null,16,["data","type","table","onUpdate"]))])):(a.openBlock(),a.createElementBlock("div",Z7," Дані завантажуються або відсутні... "))])])):(a.openBlock(),a.createBlock(p,{key:1,class:"mt-[100px]",text:"Оберіть один з пунктів меню для відображення"}))])}const X7=Oe(F7,[["render",Y7]]),K7={class:"flex items-start gap-0"},J7={__name:"vs-table-settings-page",setup(t){const e=a.ref();return(n,r)=>(a.openBlock(),a.createElementBlock("div",K7,[a.createVNode(M7,{list:e.value,"onUpdate:list":r[0]||(r[0]=o=>e.value=o)},null,8,["list"]),a.createVNode(X7,{list:e.value,"onUpdate:list":r[1]||(r[1]=o=>e.value=o)},null,8,["list"])]))}},My=a.ref({}),Q7={components:{VsNoData:Ha},data(){return{forms:[],formValues:[]}},created(){this.getSettingsAfterEditing()},computed:{activeForm(){const t=this.forms.find(e=>{var n,r;return e.name===((r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.name)});return t!=null&&t.form&&this.getForm(t==null?void 0:t.form),t},properties(){return{...My.value,...et.value}}},watch:{properties:{handler(t){t&&(this.forms=t.forms||[],this.formValues=t.settings||{},!this.$route.query.name&&this.forms.length>0&&this.changeTab(this.forms[0]))},deep:!0,immediate:!0}},methods:{changeTab(t){this.$router.push({path:this.link,query:{name:t.name}})},async saveForm(){try{const t=Object.keys(this.activeForm.body).reduce((e,n)=>{var p;const[r,o]=n.split("."),d=this.formValues[n]||((p=this.formValues[r])==null?void 0:p[o]);return{...e,[n]:d}},{});await Le.post("/api/settings-app",t),await this.getSettingsAfterEditing(),this.$notify({title:"Успішно!",message:"Дані успішно оновлені",type:"success"}),this.$router.go(this.$router.currentRoute)}catch(t){console.error("Помилка збереження даних:",t)}},async getForm(t){const{data:e}=await Le.get(`/api/template/form/${t}`),n=this.forms.find(r=>r.form===t);n.body=(e==null?void 0:e.schema)||e},async getSettingsAfterEditing(){try{const{data:t}=await Le.get("/api/settings-app");My.value=t}catch(t){console.error("Помилка збереження даних:",t)}}}},eU={style:{height:"calc(-60px + 100vh)"},class:"p-2 space-y-3 bg-gray-50 sm:p-5 sm:py-0 md:pt-5"},tU={class:"flex flex-col flex-1 space-y-3"},nU={class:"w-full flex flex-row whitespace-nowrap overflow-y-auto pb-1 [&::-webkit-scrollbar]:h-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},rU=["onClick"],iU={class:"flex justify-end w-full"};function sU(t,e,n,r,o,d){var b,k,E,C;const p=a.resolveComponent("VsForm"),c=a.resolveComponent("VsNoData");return a.openBlock(),a.createElementBlock("div",eU,[a.createElementVNode("div",tU,[a.createElementVNode("div",nU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.forms,T=>{var I,N;return a.openBlock(),a.createElementBlock("button",{key:T.name,onClick:$=>d.changeTab(T),class:a.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-800",[((N=(I=t.$route)==null?void 0:I.query)==null?void 0:N.name)===T.name?"bg-white shadow-sm !border-gray-200":""]])},a.toDisplayString((T==null?void 0:T.ua)||(T==null?void 0:T.title)||(T==null?void 0:T.name)||"Не вказано"),11,rU)}),128)),a.createElementVNode("div",iU,[a.createElementVNode("button",{onClick:e[0]||(e[0]=(...T)=>d.saveForm&&d.saveForm(...T)),class:"mи-4 px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")])])]),d.activeForm?(a.openBlock(),a.createElementBlock("div",{key:JSON.stringify(d.activeForm),class:"p-5 bg-white border border-gray-200 max-h-[calc(100vh-160px)] shadow-sm md:p-8 rounded-xl dark:bg-neutral-800 dark:border-neutral-700 overflow-auto h-full [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},[(b=d.activeForm)!=null&&b.body?(a.openBlock(),a.createBlock(p,{key:0,scheme:(k=d.activeForm)==null?void 0:k.body,style:a.normalizeStyle(t.style),modelValue:o.formValues,"onUpdate:modelValue":e[1]||(e[1]=T=>o.formValues=T)},null,8,["scheme","style","modelValue"])):(E=d.activeForm)!=null&&E.component?(a.openBlock(),a.createBlock(a.resolveDynamicComponent((C=d.activeForm)==null?void 0:C.component),{key:1})):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),o.forms.length?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(c,{key:1,class:"mt-[100px]",text:""}))])}const oU=Oe(Q7,[["render",sU]]),aU={},lU={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function cU(t,e){return a.openBlock(),a.createElementBlock("svg",lU,e[0]||(e[0]=[a.createElementVNode("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},null,-1),a.createElementVNode("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},null,-1)]))}const dU=Oe(aU,[["render",cU]]),uU={class:"h-full w-full flex overflow-auto relative [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},hU={class:"flex-grow"},pU={class:"sticky top-0 flex justify-end gap-1 pb-[10px] bg-white z-[1] px-[10px]"},fU={class:"px-[10px] shrink-0 w-[400px]"},mU={class:"max-h-[calc(100%-50px)] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},gU={class:"text-sm text-gray-500 dark:text-neutral-500"},yU={class:"inline-flex items-center justify-end text-sm font-medium text-gray-800 gap-x-2 text-end dark:text-neutral-200"},_U=["onClick"],bU={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},xU={__name:"print-tab-editor",props:{templateData:{type:Object,default:()=>{}},controlNavbar:Object},emits:["update-template"],setup(t,{emit:e}){var $;const n=a.getCurrentInstance().proxy.$notify,r=id(),o=a.computed(()=>{var F;return(F=r==null?void 0:r.query)==null?void 0:F.name}),d=t,p=e,c=a.ref((($=d.templateData)==null?void 0:$.html)||""),b=a.ref({}),k=a.ref(!1),E=a.ref(),C=async()=>{try{await Le.put(`/api/print-template/${o.value}`,{...d.templateData,html:c.value}),p("update-template"),n({type:"success",title:"Успішно!",message:"Шаблон успішно оновлено"})}catch{n({type:"success",title:"Помилка!",message:"При спробі оновити шаблон виникла помилка"})}},T=F=>{const q=`{{ ${F} }}`;try{const J=document.createElement("textarea");J.value=q,document.body.appendChild(J),J.select(),J.setSelectionRange(0,q.length);const Q=document.execCommand("copy");document.body.removeChild(J),n(Q?{type:"success",title:"Успішно!",message:"Ключ успішно скопійовано"}:{type:"error",title:"Помилка!",message:"Не вдалося скопіювати ключ"})}catch(J){n({type:"error",title:"Помилка!",message:"Не вдалося скопіювати ключ"}),console.error("Copy failed",J)}},I=async()=>{try{await E.value.doValidation(),await Le.put(`/api/print-template/${o.value}`,{...d.templateData,...b.value}),k.value=!1,n({type:"success",title:"Успішно!",message:"Шаблон успішно оновлено"}),await d.controlNavbar.getMenuData()}catch{n({type:"success",title:"Помилка!",message:"При спробі оновити шаблон виникла помилка"})}};a.watch(()=>d.templateData,F=>{b.value={name:F==null?void 0:F.name,title:F==null?void 0:F.title,route:F==null?void 0:F.route}}),a.onMounted(()=>{var F,q,J;b.value={name:(F=d.templateData)==null?void 0:F.name,title:(q=d.templateData)==null?void 0:q.title,route:(J=d.templateData)==null?void 0:J.route}});const N={name:{type:"Text",ua:"Назва",validators:["required"]},title:{type:"Text",ua:"Заголовок",validators:["required"]},route:{type:"Text",ua:"Route"}};return(F,q)=>{var Re;const J=a.resolveComponent("VsTiptapEditor"),Q=a.resolveComponent("VsPopover"),me=a.resolveComponent("VsForm"),ke=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",uU,[a.createElementVNode("div",hU,[a.createElementVNode("div",pU,[a.createElementVNode("button",{onClick:q[0]||(q[0]=Ee=>k.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Редагувати "),a.createElementVNode("button",{onClick:C,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")]),a.createVNode(J,{modelValue:c.value,"onUpdate:modelValue":q[1]||(q[1]=Ee=>c.value=Ee),class:"text-[13px] h-[calc(100%-50px)]"},null,8,["modelValue"])]),a.createElementVNode("div",fU,[q[6]||(q[6]=a.createElementVNode("h2",{class:"block font-semibold mb-[20px] text-gray-800 truncate dark:text-neutral-200"}," Список колонок ",-1)),a.createElementVNode("dl",mU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Re=t.templateData)==null?void 0:Re.columns,Ee=>(a.openBlock(),a.createElementBlock("div",{key:Ee==null?void 0:Ee.name,class:"flex items-center justify-between w-full"},[a.createElementVNode("dt",gU,a.toDisplayString(Ee==null?void 0:Ee.title)+": ",1),a.createElementVNode("dd",yU,[a.createTextVNode(a.toDisplayString(Ee==null?void 0:Ee.name)+" ",1),a.createVNode(Q,{trigger:"hover",placement:"left"},{reference:a.withCtx(()=>[a.createElementVNode("button",{onClick:Ve=>T(Ee==null?void 0:Ee.name),class:"h-[24px] w-[24px] flex items-center justify-center hover:bg-gray-100 rounded-lg duration-300"},[a.createVNode(dU)],8,_U)]),default:a.withCtx(()=>[q[5]||(q[5]=a.createTextVNode(" Скопіювати ключ ",-1))]),_:2,__:[5]},1024)])]))),128))])])]),a.createVNode(ke,{visible:k.value,"onUpdate:visible":q[4]||(q[4]=Ee=>k.value=Ee),title:"Створти шаблон"},{footer:a.withCtx(()=>[a.createElementVNode("div",bU,[a.createElementVNode("button",{style:{border:"1px solid #000"},onClick:q[3]||(q[3]=Ee=>{k.value=!1,b.value={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:I,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode(me,{ref_key:"form",ref:E,scheme:N,modelValue:b.value,"onUpdate:modelValue":q[2]||(q[2]=Ee=>b.value=Ee)},null,8,["modelValue"])]),_:1},8,["visible"])],64)}}},Iy=(t,e=300)=>{let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}},vU={class:"h-full"},wU={class:"flex justify-between mb-[10px]"},kU={class:"flex items-center gap-2"},EU=["disabled"],CU={class:"flex h-full"},SU={class:"w-[50%]"},TU={class:"flex flex-wrap items-center lg:justify-between lg:grow"},AU={class:"relative min-h-[30px] gap-[20px] inline-flex items-center"},DU={class:"text-xs text-gray-800 me-1 sm:text-sm dark:text-neutral-200"},MU={class:"relative py-1 ps-1.5 pe-7 inline-flex shrink-0 justify-center items-center gap-x-1.5 border border-transparent text-sm text-gray-500 rounded-lg underline-offset-4 hover:underline hover:text-gray-600 focus:outline-none focus:underline focus:text-gray-600"},IU={class:"w-[300px] relative p-1 max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},PU={class:""},RU={class:"flex items-center gap-2 font-normal text-[14px] cursor-pointer"},NU=["value"],BU={class:"pr-2"},VU={class:"flex items-center gap-2 font-normal text-[14px] cursor-pointer"},zU=["value"],OU=["src"],LU={__name:"print-tab-list",props:{templateData:Object},setup(t){const e=id(),n=a.computed(()=>{var J;return(J=e==null?void 0:e.query)==null?void 0:J.name}),r=t,o=a.ref(null),d=a.ref(null),p=a.ref(""),c=a.ref([]),b=a.ref(null),k=a.ref([]),E=async(J=null)=>{o.value=null;try{const{data:Q}=await Le.get(`/api/table-data/${r.templateData.alias}`,{params:{filter:b.value,search:J}});o.value=Q}catch{}},C=async()=>{try{const{data:{list:J}}=await Le.get(`/api/table-filter/${r.templateData.alias}`);d.value=J==null?void 0:J.map(Q=>({...Q,label:(Q==null?void 0:Q.label)||(Q==null?void 0:Q.ua)}))}catch{}},T=({url:J})=>{J==="no-url"?b.value=null:b.value=J},I=({target:J})=>{var Q,me;if(J.checked){const ke=(Q=o.value.rows)==null?void 0:Q.find(Re=>(Re==null?void 0:Re.id)==J.value);c.value=[...c.value,ke]}else c.value=(me=c.value)==null?void 0:me.filter(ke=>(ke==null?void 0:ke.id)!=(J==null?void 0:J.value))},N=()=>{var J;(J=o.value.rows)==null||J.forEach(Q=>{var me;(me=k.value)!=null&&me.includes(Q==null?void 0:Q.id)||(k.value=[...k.value,Q==null?void 0:Q.id],c.value=[...c.value,Q])})},$=()=>{var Q,me;const J=(Q=c.value)==null?void 0:Q.map(ke=>ke==null?void 0:ke.id);k.value=(me=k.value)==null?void 0:me.filter(ke=>!(J!=null&&J.includes(ke))),c.value=[]},F=async()=>{if(k.value.length===0)return;const J=k.value.join(",");p.value=`/api/print-template/${n.value}/${J}`},q=Iy(E,300);return a.watch(b,()=>E()),a.onMounted(async()=>{await E(),await C()}),(J,Q)=>{var Re,Ee,Ve;const me=a.resolveComponent("VsFilterList"),ke=a.resolveComponent("VsPopover");return a.openBlock(),a.createElementBlock("div",vU,[a.createElementVNode("div",wU,[a.createElementVNode("div",kU,[a.createElementVNode("input",{type:"text",class:"w-[200px] h-[38px] px-[10px] placeholder:text-[14px] placeholder:text-gray-600 rounded-lg bg-gray-100 focus:outline-blue-500",placeholder:"Пошук...",onInput:Q[0]||(Q[0]=({target:Be})=>a.unref(q)(Be.value))},null,32),d.value?(a.openBlock(),a.createBlock(me,{key:0,view:"plain",scheme:d.value,isDialog:!1,"apply-vue-router":"",history:"",name:"filter",onFilterChange:T},null,8,["scheme"])):a.createCommentVNode("",!0)]),o.value?(a.openBlock(),a.createElementBlock("button",{key:0,onClick:F,disabled:!k.value.length,class:"py-2 px-3 inline-flex disabled:text-gray-200 disabled:cursor-not-allowed items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Згенерувати документ ",8,EU)):a.createCommentVNode("",!0)]),a.createElementVNode("div",CU,[a.createElementVNode("div",SU,[a.createElementVNode("div",TU,[a.createElementVNode("div",AU,[a.createElementVNode("span",DU," Знайдено "+a.toDisplayString((Re=o.value)==null?void 0:Re.filtered),1),a.createElementVNode("button",{onClick:N,class:"relative py-1 ps-1.5 pe-7 inline-flex shrink-0 justify-center items-center gap-x-1.5 border border-transparent text-sm text-gray-500 rounded-lg underline-offset-4 hover:underline hover:text-gray-600 focus:outline-none focus:underline focus:text-gray-600"}," Обрати всі ")]),(Ee=c.value)!=null&&Ee.length?(a.openBlock(),a.createBlock(ke,{key:0,placement:"bottom"},{reference:a.withCtx(()=>{var Be;return[a.createElementVNode("button",MU,[a.createTextVNode(" Обранo: "+a.toDisplayString((Be=c.value)==null?void 0:Be.length)+" ",1),a.createVNode(Ip,{height:"14",width:"14"})])]}),default:a.withCtx(()=>[a.createElementVNode("div",IU,[a.createElementVNode("ul",PU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,Be=>{var Ze,tt;return a.openBlock(),a.createElementBlock("li",{key:Be==null?void 0:Be.id,class:"p-2 hover:bg-gray-100 rounded-[8px] cursor-pointer"},[a.createElementVNode("label",RU,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",class:"hidden",onChange:I,"onUpdate:modelValue":Q[1]||(Q[1]=Xe=>k.value=Xe),value:Be==null?void 0:Be.id},null,40,NU),[[a.vModelCheckbox,k.value]]),a.createElementVNode("span",{class:a.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded size-4 shrink-0 focus:ring-blue-500",k.value.includes(Be==null?void 0:Be.id)?"bg-blue-600 border-0":"bg-white"])},[a.createVNode(kl,{height:"12",width:"12"})],2),a.createTextVNode(" "+a.toDisplayString(Be[(tt=(Ze=o.value)==null?void 0:Ze.meta)==null?void 0:tt.title]),1)])])}),128))]),a.createElementVNode("button",{onClick:$,class:"w-full bg-white sticky bottom-0 h-[34px] border rounded-lg text-[16px] hover:bg-gray-100 duration-300 disabled:cursor-not-allowed disabled:hover:bg-white disabled:text-gray-200"}," Очистити ")])]),_:1})):a.createCommentVNode("",!0)]),a.createElementVNode("ul",BU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ve=o.value)==null?void 0:Ve.rows,Be=>{var Ze,tt;return a.openBlock(),a.createElementBlock("li",{key:Be==null?void 0:Be.id,class:"p-2 hover:bg-gray-100 rounded-[8px] cursor-pointer"},[a.createElementVNode("label",VU,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",class:"hidden",onChange:I,"onUpdate:modelValue":Q[2]||(Q[2]=Xe=>k.value=Xe),value:Be==null?void 0:Be.id},null,40,zU),[[a.vModelCheckbox,k.value]]),a.createElementVNode("span",{class:a.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded size-4 shrink-0 focus:ring-blue-500",k.value.includes(Be==null?void 0:Be.id)?"bg-blue-600 border-0":"bg-white"])},[a.createVNode(kl,{height:"12",width:"12"})],2),a.createTextVNode(" "+a.toDisplayString(Be[(tt=(Ze=o.value)==null?void 0:Ze.meta)==null?void 0:tt.title]),1)])])}),128))])]),a.createElementVNode("iframe",{class:"h-[calc(100%-60px)] w-[50%] bg-gray-100",src:p.value},null,8,OU)])])}}},FU={class:"p-[20px]"},$U={class:"flex gap-[10px]"},jU=["onClick"],UU={class:"rounded-xl flex justify-between overflow-hidden bg-white border max-w-[1400px] h-[calc(100vh-160px)] mt-[20px]"},HU={key:0,class:"w-full h-full"},WU={key:0,class:"p-[10px] w-full h-full"},qU={key:1,class:"p-[10px]"},GU={__name:"print-content",props:{controlNavbar:Object},setup(t){const e={"print-tab-editor":{text:"Шаблон",component:xU},"print-tab-list":{text:"Друк",component:LU}},n=id(),r=a.computed(()=>{var b;return(b=n==null?void 0:n.query)==null?void 0:b.name}),o=a.ref("print-tab-editor"),d=a.ref(null),p=a.ref(!1),c=async()=>{p.value=!1;try{const{data:b}=await Le.get(`/api/print-template/${r.value}`);d.value=b}catch(b){console.log(b),d.value=null}finally{p.value=!0}};return a.onMounted(c),a.watch(r,()=>c()),(b,k)=>(a.openBlock(),a.createElementBlock("div",FU,[a.createElementVNode("div",$U,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(e,(E,C)=>a.createElementVNode("button",{key:C,onClick:T=>o.value=C,class:a.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500",[o.value===C?" shadow bg-white":""]])},a.toDisplayString(E.text),11,jU)),64))]),a.createElementVNode("div",UU,[d.value?(a.openBlock(),a.createElementBlock("div",HU,[p.value?(a.openBlock(),a.createElementBlock("div",WU,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e[o.value].component),{templateData:d.value,onUpdateTemplate:c,controlNavbar:t.controlNavbar},null,40,["templateData","controlNavbar"]))])):(a.openBlock(),a.createElementBlock("div",qU,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e[o.value].component),{templateData:d.value},null,8,["templateData"]))]))])):(a.openBlock(),a.createBlock(Ha,{key:1}))])]))}},ZU={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},YU={class:"flex items-center justify-between p-2 ps-5 gap-x-2"},XU={class:"relative px-[10px] py-[4px] flex gap-[8px] items-center"},KU={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 170px)"}},JU=["data-index"],QU={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},eH={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},tH="/admin.templates",nH={__name:"print-navbar",props:{controlNavbar:{},controlNavbarModifiers:{}},emits:["update:controlNavbar"],setup(t){const e={name:{type:"Text",ua:"Назва",validators:["required"]},title:{type:"Text",ua:"Заголовок",validators:["required"]},route:{type:"Text",ua:"Route"},html:{type:"TextEditor",ua:"Розмітка"}},n=a.ref(""),r=a.ref(null),o=a.ref({}),d=a.ref(!1),p=a.ref(),c=a.useModel(t,"controlNavbar"),b=a.computed(()=>{var C;return(C=r.value)==null?void 0:C.filter(T=>{var I,N,$;return($=(I=T==null?void 0:T.title)==null?void 0:I.toLowerCase())==null?void 0:$.includes((N=n.value)==null?void 0:N.toLowerCase())})}),k=async()=>{try{const{data:C}=await Le.get("/api/print-template");r.value=C==null?void 0:C.rows}catch{}},E=async()=>{try{await p.value.doValidation(),await Le.post("/api/print-template",o.value)}catch{}};return k(),a.onMounted(()=>{c.value={getMenuData:()=>{k()}}}),(C,T)=>{var q;const I=a.resolveComponent("VsText"),N=a.resolveComponent("router-link"),$=a.resolveComponent("VsForm"),F=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",ZU,[a.createElementVNode("div",YU,[T[5]||(T[5]=a.createElementVNode("span",{id:"hs-pro-chat-sidebar-label",class:"block font-semibold text-gray-800 truncate dark:text-neutral-200"}," Друк ",-1)),a.createElementVNode("button",{onClick:T[0]||(T[0]=J=>d.value=!0),class:"bg-[#DBEAFE] h-[30px] w-[30px] text-blue-700 shrink-0 flex items-center justify-center rounded-lg hover:bg-blue-200"},[a.createVNode($l,{height:"16",width:"16"})])]),a.createElementVNode("div",XU,[a.createVNode(I,{type:"text",modelValue:n.value,"onUpdate:modelValue":T[1]||(T[1]=J=>n.value=J),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(q=b.value)!=null&&q.length?(a.openBlock(),a.createElementBlock("ul",KU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,J=>{var Q,me;return a.openBlock(),a.createElementBlock("li",{key:J==null?void 0:J.name,"data-index":C.index,class:"w-full"},[a.createVNode(N,{class:a.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((me=(Q=C.$route)==null?void 0:Q.query)==null?void 0:me.name)===(J==null?void 0:J.name)}]),to:tH+"?name="+(J==null?void 0:J.name)},{default:a.withCtx(()=>[a.createElementVNode("span",QU,a.toDisplayString((J==null?void 0:J.title)||(J==null?void 0:J.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,JU)}),128))])):a.createCommentVNode("",!0)]),a.createVNode(F,{visible:d.value,"onUpdate:visible":T[4]||(T[4]=J=>d.value=J),title:"Створти шаблон"},{footer:a.withCtx(()=>[a.createElementVNode("div",eH,[a.createElementVNode("button",{style:{border:"1px solid #000"},onClick:T[3]||(T[3]=J=>{d.value=!1,o.value={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:E,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode($,{ref_key:"form",ref:p,scheme:e,modelValue:o.value,"onUpdate:modelValue":T[2]||(T[2]=J=>o.value=J)},null,8,["modelValue"])]),_:1},8,["visible"])],64)}}},rH={class:"flex"},iH={class:"w-[calc(100vw-560px)] bg-gray-50"},sH={__name:"template-print-page",setup(t){const e=a.ref();return(n,r)=>{var o,d;return a.openBlock(),a.createElementBlock("div",rH,[a.createVNode(nH,{controlNavbar:e.value,"onUpdate:controlNavbar":r[0]||(r[0]=p=>e.value=p)},null,8,["controlNavbar"]),a.createElementVNode("div",iH,[(d=(o=n.$route)==null?void 0:o.query)!=null&&d.name?(a.openBlock(),a.createBlock(GU,{key:0,controlNavbar:e.value},null,8,["controlNavbar"])):(a.openBlock(),a.createBlock(Ha,{key:1}))])])}}},oH={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},aH={class:"relative px-[10px] py-[10px] flex gap-[8px] items-center"},lH={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},cH=["data-index"],dH={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},uH="/admin.reports",hH={__name:"reports-navbar",setup(t){const e=a.ref(""),n=a.ref(null),r=a.computed(()=>{var d;return(d=n.value)==null?void 0:d.filter(p=>{var c,b,k;return(k=(c=p==null?void 0:p.title)==null?void 0:c.toLowerCase())==null?void 0:k.includes((b=e.value)==null?void 0:b.toLowerCase())})});return(async()=>{try{const{data:d}=await Le.get("/api/reports");n.value=d==null?void 0:d.rows}catch{}})(),(d,p)=>{var k;const c=a.resolveComponent("VsText"),b=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",oH,[a.createElementVNode("div",aH,[a.createVNode(c,{type:"text",modelValue:e.value,"onUpdate:modelValue":p[0]||(p[0]=E=>e.value=E),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(k=r.value)!=null&&k.length?(a.openBlock(),a.createElementBlock("ul",lH,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.value,E=>{var C,T;return a.openBlock(),a.createElementBlock("li",{key:E==null?void 0:E.name,"data-index":d.index,class:"w-full"},[a.createVNode(b,{class:a.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((T=(C=d.$route)==null?void 0:C.query)==null?void 0:T.name)===(E==null?void 0:E.name)}]),to:uH+"?name="+(E==null?void 0:E.name)},{default:a.withCtx(()=>[a.createElementVNode("span",dH,a.toDisplayString((E==null?void 0:E.title)||(E==null?void 0:E.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,cH)}),128))])):a.createCommentVNode("",!0)])}}},pH={class:"p-5 bg-white border border-gray-200 shadow-sm md:p-8 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},fH={class:"space-y-5"},mH={class:"flex items-center gap-[4px]"},gH={class:"flex items-center gap-2"},yH={class:"flex flex-col flex-grow w-full p-4 border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},_H={class:"py-4 sm:py-0 ps-1 sm:pe-4"},bH={class:"text-sm text-gray-800 dark:text-neutral-200"},xH={class:"flex flex-wrap items-center gap-2 mt-3"},vH={class:"block text-2xl font-medium text-gray-800 dark:text-neutral-200"},wH={class:"overflow-x-auto h-[calc(100vh-430px)] [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},kH={class:"inline-block min-w-full align-middle"},EH={class:"relative min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},CH={class:"sticky top-[0px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},SH={class:"flex items-center py-3 text-sm font-medium text-gray-800 pe-4 text-start gap-x-1 dark:text-neutral-200"},TH={class:"divide-y divide-gray-200 dark:divide-neutral-700"},AH={class:"px-4 py-3 size-px whitespace-nowrap"},DH={class:"text-sm text-gray-600 dark:text-neutral-400"},MH={__name:"reports-table",setup(t){const e=[{id:"period",type:"date",inline:!0,placeholder:"Оберіть період"}],n=[{id:"spent",type:"check",label:"Spent",inline:!0,options:[{id:"1",text:"text 1"},{id:"2",text:"text 2"},{id:"3",text:"text 3"}]}],r=id(),o=a.ref(null),d=a.ref(null),p=a.ref(null),c=a.ref(!0),b=a.computed(()=>{var I;return(I=r==null?void 0:r.query)==null?void 0:I.name}),k=async(I=null)=>{try{const{data:N}=await Le.get(`/api/reports/${b.value}`,{params:{filter:d.value,period:p.value,search:I||null}});o.value=N}catch{}},E=Iy(k,300),C=({url:I})=>{I==="no-url"?d.value=null:d.value=I,k()},T=I=>{var N;(N=Object.keys(I))!=null&&N.length&&(p.value=I==null?void 0:I.period,k())};return a.watch(b,()=>{c.value=!1,setTimeout(()=>c.value=!0),d.value=null,p.value=null}),(I,N)=>{var q,J,Q;const $=a.resolveComponent("VsText"),F=a.resolveComponent("VsFilterList");return a.openBlock(),a.createElementBlock("div",pH,[N[0]||(N[0]=a.createElementVNode("div",{class:"mb-4 xl:mb-8"},[a.createElementVNode("h1",{class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"}," Members "),a.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ")],-1)),a.createElementVNode("div",fH,[a.createElementVNode("div",mH,[a.createVNode($,{type:"text",placeholder:"Пошук...","onUpdate:modelValue":a.unref(E),class:"flex-grow [&>input]:h-[38px] max-w-[300px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 admin-input-text [&>input]:border-0"},null,8,["onUpdate:modelValue"]),c.value?(a.openBlock(),a.createBlock(F,{key:0,scheme:e,isDialog:!1,view:"plain",clearable:!1,"onUpdate:modelValue":T})):a.createCommentVNode("",!0),c.value?(a.openBlock(),a.createBlock(F,{key:1,scheme:n,isDialog:!1,view:"plain",clearable:!1,onFilterChange:C})):a.createCommentVNode("",!0)]),a.createElementVNode("div",gH,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((q=o.value)==null?void 0:q.kpi,me=>(a.openBlock(),a.createElementBlock("div",yH,[a.createElementVNode("div",_H,[a.createElementVNode("p",bH,a.toDisplayString(me==null?void 0:me.title),1),a.createElementVNode("div",xH,[a.createElementVNode("span",vH,a.toDisplayString(me==null?void 0:me.count),1)])])]))),256))]),a.createElementVNode("div",wH,[a.createElementVNode("div",kH,[a.createElementVNode("table",EH,[a.createElementVNode("thead",CH,[a.createElementVNode("tr",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((J=o.value)==null?void 0:J.columns,me=>(a.openBlock(),a.createElementBlock("th",{scope:"col",class:"min-w-[250px]",key:me==null?void 0:me.name},[a.createElementVNode("div",SH,a.toDisplayString(me==null?void 0:me.title),1)]))),128))])]),a.createElementVNode("tbody",TH,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Q=o.value)==null?void 0:Q.rows,me=>{var ke;return a.openBlock(),a.createElementBlock("tr",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ke=o.value)==null?void 0:ke.columns,Re=>(a.openBlock(),a.createElementBlock("td",AH,[a.createElementVNode("span",DH,a.toDisplayString((me==null?void 0:me[Re==null?void 0:Re.name])||"-"),1)]))),256))])}),256))])])])])])])}}},IH={class:"flex"},PH={class:"w-[calc(100vw-560px)] p-[20px] bg-gray-50"},RH={__name:"reports-page",setup(t){return(e,n)=>{var r,o;return a.openBlock(),a.createElementBlock("div",IH,[a.createVNode(hH),a.createElementVNode("div",PH,[(o=(r=e.$route)==null?void 0:r.query)!=null&&o.name?(a.openBlock(),a.createBlock(MH,{key:0})):(a.openBlock(),a.createBlock(Ha,{key:1}))])])}}},NH={props:{task:{type:Object,default:()=>({})}},computed:{badgeColor(){const t={Design:"purple","Feature Request":"teal",Backend:"blue",QA:"green",default:"teal"};return t[this.task.type]||t.default}}},BH={class:"px-3 pt-3 pb-5 bg-white border border-white rounded shadow"},VH={class:"flex justify-between"},zH={class:"font-sans text-sm font-semibold tracking-wide text-gray-700"},OH={class:"flex items-center justify-between mt-4"},LH={class:"text-sm text-gray-600"};function FH(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",BH,[a.createElementVNode("div",VH,[a.createElementVNode("p",zH,a.toDisplayString(n.task.title),1)]),a.createElementVNode("div",OH,[a.createElementVNode("span",LH,a.toDisplayString(n.task.date),1)])])}const $H={name:"App",components:{KanbanItem:Oe(NH,[["render",FH]]),draggable:qc},data(){return{columns:[{title:"Backlog",tasks:[{id:1,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:2,title:"Provide documentation on integrations",date:"Sep 12"},{id:3,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:4,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:5,title:"Test checkout flow",date:"Sep 15",type:"QA"}]},{title:"In Progress",tasks:[{id:6,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:7,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:8,title:"Provide documentation on integrations",date:"Sep 12",type:"Backend"}]},{title:"Review",tasks:[{id:9,title:"Provide documentation on integrations",date:"Sep 12"},{id:10,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:11,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:12,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:13,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"}]},{title:"Done",tasks:[{id:14,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:15,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:16,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"}]}]}}},jH={class:"flex h-full p-[20px]"},UH={class:"flex h-full"},HH={class:"font-sans text-sm font-semibold tracking-wide text-gray-700"};function WH(t,e,n,r,o,d){const p=a.resolveComponent("KanbanItem"),c=a.resolveComponent("draggable");return a.openBlock(),a.createElementBlock("div",jH,[a.createElementVNode("div",UH,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.columns,b=>(a.openBlock(),a.createElementBlock("div",{key:b.title,class:"px-3 py-3 mr-4 bg-gray-100 rounded rounded-lg column-width"},[a.createElementVNode("p",HH,a.toDisplayString(b.title),1),a.createVNode(c,{list:b.tasks,animation:200,"ghost-class":"ghost-card",group:"tasks"},a.createSlots({_:2},[a.renderList(b.tasks,k=>({name:"item",fn:a.withCtx(()=>[a.createVNode(p,{task:k,class:"mt-3 cursor-move"},null,8,["task"])])}))]),1032,["list"])]))),128))])])}const qH=Oe($H,[["render",WH],["__scopeId","data-v-ccf91ca9"]]),GH={class:"h-[calc(100vh-60px)]"},ZH={"card-page":Dy,"user-cls-page":Nj,"calendar-page":k7,"table-settings-page":J7,"admin-properties-page":oU,"template-print-page":sH,"reports-page":RH,"kanban-page":{__name:"kanban",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",GH,[a.createVNode(qH)]))}}},YH={},XH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-info-circle"};function KH(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",XH,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},null,-1),a.createElementVNode("path",{d:"M12 9h.01"},null,-1),a.createElementVNode("path",{d:"M11 12h1v4h1"},null,-1)]))}const JH=Oe(YH,[["render",KH]]),QH={},e9={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-loader"};function t9(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",e9,e[0]||(e[0]=[a.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 6l0 -3"></path><path d="M16.25 7.75l2.15 -2.15"></path><path d="M18 12l3 0"></path><path d="M16.25 16.25l2.15 2.15"></path><path d="M12 18l0 3"></path><path d="M7.75 16.25l-2.15 2.15"></path><path d="M6 12l-3 0"></path><path d="M7.75 7.75l-2.15 -2.15"></path>',9)]))}const n9=Oe(QH,[["render",t9]]),r9={class:"flex items-center justify-between py-1 gap-x-4"},i9={class:"col-span-1"},s9={class:"inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500"},o9={class:"col-span-2"},a9={class:"font-medium text-[13px] text-gray-800 dark:text-neutral-200"},l9={key:1,class:"w-[300px] h-[300px] flex items-center justify-center"},Py={__name:"admin-info-popover",props:{table:{type:String,default:()=>""},id:{type:String,default:()=>""},api:{type:String,default:()=>""}},setup(t){var C,T;const e=(T=(C=a.getCurrentInstance())==null?void 0:C.appContext)==null?void 0:T.app;window.v3core.install(e),Object.entries(wx).forEach(([I,N])=>{e==null||e.component(I,N)});const n=t,r=a.ref(null),o=a.ref(!1),d=a.ref(null),p=a.ref(null);let c=null;const b=async()=>{try{const{data:I}=await Le.get(`${n.api}/${n.table}/${n.id}`);r.value=I}catch{}},k=async()=>{clearTimeout(c),o.value=!0,r.value||await b(),await Mv("right",d.value,p.value,40)},E=()=>{c=setTimeout(()=>{o.value=!1},300)};return a.onBeforeUnmount(()=>{clearTimeout(c)}),(I,N)=>(a.openBlock(),a.createElementBlock("div",{style:{display:"inline-block"},onMouseenter:k,onMouseleave:E,ref_key:"infoPopover",ref:d},[a.createVNode(JH,{height:"20",width:"20",class:"text-gray-700 cursor-pointer"}),(a.openBlock(),a.createBlock(a.Teleport,{to:"#modal"},[a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var $;return[a.withDirectives(a.createElementVNode("div",{onMouseenter:k,onMouseleave:E,ref_key:"infoPopoverContent",ref:p,class:"fixed p-[20px] border z-[10002] rounded-xl bg-white max-h-[400px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-thumb]:rounded-[100px] [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[r.value?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(($=r.value)==null?void 0:$.columns,F=>{var q,J;return a.openBlock(),a.createElementBlock("dl",r9,[a.createElementVNode("dt",i9,[a.createElementVNode("p",s9,a.toDisplayString((F==null?void 0:F.ua)||(F==null?void 0:F.title))+": ",1)]),a.createElementVNode("dd",o9,[a.createElementVNode("p",a9,[a.createVNode(vd,{row:(J=(q=r.value)==null?void 0:q.rows)==null?void 0:J[0],column:{...F,edit:!1}},null,8,["row","column"])])])])}),256)):(a.openBlock(),a.createElementBlock("div",l9,[a.createVNode(n9,{height:"40",width:"40",class:"animate-spin"})]))],544),[[a.vShow,o.value]])]}),_:1})]))],544))}},Ry={...l8,...c8,"vs-dashboard":f8,"vs-custom-button":y8,"vs-group-interface":F8,"vs-test-widget":{__name:"vs-test-widget",props:{data:Object,dataName:String,table:String,geom:null},setup(t){var d;const{$v3plugin:e,$confirm:n}=(d=a.getCurrentInstance())==null?void 0:d.appContext.app.config.globalProperties,r=a.ref(!1),o=()=>{n({title:"Are you sure?",message:"Are you sure you want to delete this message?"})};return(p,c)=>{var k,E,C,T;const b=a.resolveComponent("VsConfirm");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createVNode(Py,{table:(E=(k=p.$route)==null?void 0:k.params)==null?void 0:E.table,id:(T=(C=p.$route)==null?void 0:C.params)==null?void 0:T.id},null,8,["table","id"]),a.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:c[0]||(c[0]=I=>r.value=!0)}," Редагувати Tokens "),a.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:o}," Редагувати Tokens 1212 ")]),a.createVNode(b,{visible:r.value,"onUpdate:visible":c[1]||(c[1]=I=>r.value=I),title:"Are you sure?"},{footer:a.withCtx(()=>c[2]||(c[2]=[a.createElementVNode("div",{class:"flex gap-[4px] p-[16px]"},[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50","data-hs-overlay":"#hs-pro-chhdl"}," Скасувати "),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 disabled:opacity-50 disabled:pointer-events-none"}," Видалити ")],-1)])),default:a.withCtx(()=>[c[3]||(c[3]=a.createElementVNode("p",{class:"mt-1 text-sm text-gray-600 dark:text-neutral-400"}," Are you sure you want to delete this message? ",-1)),c[4]||(c[4]=a.createElementVNode("div",{class:"flex items-center mt-5"},[a.createElementVNode("input",{type:"checkbox",class:"shrink-0 size-3.5 border-gray-300 rounded text-blue-700 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-600 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"hs-pro-chhdlcch"}),a.createElementVNode("label",{for:"hs-pro-chhdlcch",class:"text-sm text-gray-600 ms-2 dark:text-neutral-400"}," Don't show me this again ")],-1))]),_:1,__:[3,4]},8,["visible"])],64)}}},"vs-card-list":Dy,"vs-info-popover":Py,...ZH},c9=t=>new Promise(e=>{const n=new CustomEvent("openFormPlugin");n.options=t,window.dispatchEvent(n);const r=({message:o})=>{window.removeEventListener("closeFormPlugin",r),e(o)};window.addEventListener("closeFormPlugin",r)});function d9(t){const e=typeof t;return e==="object"?t:{title:"Підтвердити операцію",text:e==="string"?t:"Ви впевнені що хочете виконати операцію?",cancel:"Скасувати",confirm:"Виконати"}}const u9=({api:t,confirm:e,method:n,isId:r,id:o,redirect:d})=>new Promise(p=>{var T,I,N,$;const{VsDialog:c}=(I=(T=window.app)==null?void 0:T._context)==null?void 0:I.components,{$notify:b}=($=(N=window.app)==null?void 0:N.config)==null?void 0:$.globalProperties,k=document.querySelector("#modal");if(!k){console.error('Modal root element with id "#modal" not found!');return}const E=document.createElement("div");k.appendChild(E);const C=a.createApp({components:{VsDialog:c},data(){return{visible:!1,getConfirm:d9(e)}},methods:{close(F){this.visible=!1,this.$el.remove(),C.unmount(),p(F||"Success")},async doRequest(){var F,q,J,Q,me,ke;try{const{data:Re}=await Le({url:t+(r?`/${o}`:""),method:n||"POST"});this.close(Re),await b({title:"Успішно!",type:"success",message:"Операція виконана успішно"}),d&&((me=(Q=(J=(q=(F=window.app)==null?void 0:F._context)==null?void 0:q.config)==null?void 0:J.globalProperties)==null?void 0:Q.$router)==null||me.back()),await nh()}catch(Re){b({title:"Помилка!",type:"error",message:((ke=Re==null?void 0:Re.response)==null?void 0:ke.data)||"Сталася помилка"})}}},mounted(){e?this.visible=!0:this.doRequest()},template:`
|
625
|
+
<source src="{{src}}" type="{{format}}" />Sorry, your browser doesn't support embedded videos.</video>`,videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},cR=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class Qx extends us{onBeforeInitSlide(e,n,r){this.processType(r)}onCreateSlide(e,n,r){this.setContent(r)}onClearContent(e,n){n.xhr&&(n.xhr.abort(),n.xhr=null);const r=n.iframeEl;r&&(r.onload=r.onerror=null,r.src="//about:blank",n.iframeEl=null);const o=n.contentEl,d=n.placeholderEl;if(n.type==="inline"&&o&&d)o.classList.remove("fancybox__content"),getComputedStyle(o).getPropertyValue("display")!=="none"&&(o.style.display="none"),setTimeout(()=>{d&&(o&&d.parentNode&&d.parentNode.insertBefore(o,d),d.remove())},0),n.contentEl=void 0,n.placeholderEl=void 0;else for(;n.el&&n.el.firstChild;)n.el.removeChild(n.el.firstChild)}onSelectSlide(e,n,r){r.state===$r.Ready&&this.playVideo()}onUnselectSlide(e,n,r){var o,d;if(r.type===bd){try{(d=(o=r.el)===null||o===void 0?void 0:o.querySelector("video"))===null||d===void 0||d.pause()}catch{}return}let p;r.type===Ma?p={method:"pause",value:"true"}:r.type===to&&(p={event:"command",func:"pauseVideo"}),p&&r.iframeEl&&r.iframeEl.contentWindow&&r.iframeEl.contentWindow.postMessage(JSON.stringify(p),"*"),r.poller&&clearTimeout(r.poller)}onDone(e,n){e.isCurrentSlide(n)&&!e.isClosing()&&this.playVideo()}onRefresh(e,n){n.slides.forEach(r=>{r.el&&(this.resizeIframe(r),this.setAspectRatio(r))})}onMessage(e){try{let n=JSON.parse(e.data);if(e.origin==="https://player.vimeo.com"){if(n.event==="ready")for(let r of Array.from(document.getElementsByClassName("fancybox__iframe")))r instanceof HTMLIFrameElement&&r.contentWindow===e.source&&(r.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&n.event==="onReady"){const r=document.getElementById(n.id);r&&(r.dataset.ready="true")}}catch{}}loadAjaxContent(e){const n=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);const r=this.instance,o=new XMLHttpRequest;r.showLoading(e),o.onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&r.state===kr.Ready&&(r.hideLoading(e),o.status===200?r.setContent(e,o.responseText):r.setError(e,o.status===404?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const d=e.ajax||null;o.open(d?"POST":"GET",n+""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.send(d),e.xhr=o}setInlineContent(e){let n=null;if(mi(e.src))n=e.src;else if(typeof e.src=="string"){const r=e.src.split("#",2).pop();n=r?document.getElementById(r):null}if(n){if(e.type==="clone"||n.closest(".fancybox__slide")){n=n.cloneNode(!0);const r=n.dataset.animationName;r&&(n.classList.remove(r),delete n.dataset.animationName);let o=n.getAttribute("id");o=o?`${o}--clone`:`clone-${this.instance.id}-${e.index}`,n.setAttribute("id",o)}else if(n.parentNode){const r=document.createElement("div");r.classList.add("fancybox-placeholder"),n.parentNode.insertBefore(r,n),e.placeholderEl=r}this.instance.setContent(e,n)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){const{src:n,el:r}=e;if(!n||typeof n!="string"||!r)return;r.classList.add("is-loading");const o=this.instance,d=document.createElement("iframe");d.className="fancybox__iframe",d.setAttribute("id",`fancybox__iframe_${o.id}_${e.index}`);for(const[c,b]of Object.entries(this.optionFor(e,"iframeAttr")||{}))d.setAttribute(c,b);d.onerror=()=>{o.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=d;const p=this.optionFor(e,"preload");if(e.type!=="iframe"||p===!1)return d.setAttribute("src",e.src+""),o.setContent(e,d,!1),this.resizeIframe(e),void o.revealContent(e);o.showLoading(e),d.onload=()=>{if(!d.src.length)return;const c=d.dataset.ready!=="true";d.dataset.ready="true",this.resizeIframe(e),c?o.revealContent(e):o.hideLoading(e)},d.setAttribute("src",n),o.setContent(e,d,!1)}resizeIframe(e){const{type:n,iframeEl:r}=e;if(n===to||n===Ma)return;const o=r==null?void 0:r.parentElement;if(!r||!o)return;let d=e.autoSize;d===void 0&&(d=this.optionFor(e,"autoSize"));let p=e.width||0,c=e.height||0;p&&c&&(d=!1);const b=o&&o.style;if(e.preload!==!1&&d!==!1&&b)try{const k=window.getComputedStyle(o),E=parseFloat(k.paddingLeft)+parseFloat(k.paddingRight),C=parseFloat(k.paddingTop)+parseFloat(k.paddingBottom),T=r.contentWindow;if(T){const I=T.document,N=I.getElementsByTagName(Qm)[0],$=I.body;b.width="",$.style.overflow="hidden",p=p||N.scrollWidth+E,b.width=`${p}px`,$.style.overflow="",b.flex="0 0 auto",b.height=`${$.scrollHeight}px`,c=N.scrollHeight+C}}catch{}if(p||c){const k={flex:"0 1 auto",width:"",height:""};p&&p!=="auto"&&(k.width=`${p}px`),c&&c!=="auto"&&(k.height=`${c}px`),Object.assign(b,k)}}playVideo(){const e=this.instance.getSlide();if(!e)return;const{el:n}=e;if(!n||!n.offsetParent||!this.optionFor(e,"videoAutoplay"))return;if(e.type===bd)try{const o=n.querySelector("video");if(o){const d=o.play();d!==void 0&&d.then(()=>{}).catch(p=>{o.muted=!0,o.play()})}}catch{}if(e.type!==to&&e.type!==Ma)return;const r=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let o;if(e.iframeEl.dataset.ready==="true")return o=e.type===to?{event:"command",func:"playVideo"}:{method:"play",value:"true"},o&&e.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),void(e.poller=void 0);e.type===to&&(o={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"))}e.poller=setTimeout(r,250)};r()}processType(e){if(e.html)return e.type=Qm,e.src=e.html,void(e.html="");const n=this.instance.optionFor(e,"src","");if(!n||typeof n!="string")return;let r=e.type,o=null;if(o=n.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const d=this.optionFor(e,to),{nocookie:p}=d,c=function(C,T){var I={};for(var N in C)Object.prototype.hasOwnProperty.call(C,N)&&T.indexOf(N)<0&&(I[N]=C[N]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function"){var $=0;for(N=Object.getOwnPropertySymbols(C);$<N.length;$++)T.indexOf(N[$])<0&&Object.prototype.propertyIsEnumerable.call(C,N[$])&&(I[N[$]]=C[N[$]])}return I}(d,["nocookie"]),b=`www.youtube${p?"-nocookie":""}.com`,k=Jx(n,c),E=encodeURIComponent(o[2]);e.videoId=E,e.src=`https://${b}/embed/${E}?${k}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${E}/mqdefault.jpg`,r=to}else if(o=n.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const d=Jx(n,this.optionFor(e,Ma)),p=encodeURIComponent(o[1]),c=o[4]||"";e.videoId=p,e.src=`https://player.vimeo.com/video/${p}?${c?`h=${c}${d?"&":""}`:""}${d}`,r=Ma}if(!r&&e.triggerEl){const d=e.triggerEl.dataset.type;cR.includes(d)&&(r=d)}r||typeof n=="string"&&(n.charAt(0)==="#"?r="inline":(o=n.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(r=bd,e.videoFormat=e.videoFormat||"video/"+(o[1]==="ogv"?"ogg":o[1])):n.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?r=Kx:n.match(/\.(pdf)((\?|#).*)?$/i)&&(r="pdf")),(o=n.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`https://maps.google.${o[1]}/?ll=${(o[2]?o[2]+"&z="+Math.floor(parseFloat(o[3]))+(o[4]?o[4].replace(/^\//,"&"):""):o[4]+"").replace(/\?/,"&")}&output=${o[4]&&o[4].indexOf("layer=c")>0?"svembed":"embed"}`,r=eg):(o=n.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`https://maps.google.${o[1]}/maps?q=${o[2].replace("query=","q=").replace("api=1","")}&output=embed`,r=eg),r=r||this.instance.option("defaultType"),e.type=r,r===Kx&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){const n=this.instance.optionFor(e,"src")||"";if(e&&e.type&&n){switch(e.type){case Qm:this.instance.setContent(e,n);break;case bd:const r=this.option("videoTpl");r&&this.instance.setContent(e,r.replace(/\{\{src\}\}/gi,n+"").replace(/\{\{format\}\}/gi,this.optionFor(e,"videoFormat")||"").replace(/\{\{poster\}\}/gi,e.poster||e.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case eg:case to:case Ma:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){const n=e.contentEl;if(!(e.el&&n&&e.type&&[to,Ma,bd].includes(e.type)))return;let r,o=e.width||"auto",d=e.height||"auto";if(o==="auto"||d==="auto"){r=this.optionFor(e,"videoRatio");const k=(r+"").match(/(\d+)\s*\/\s?(\d+)/);r=k&&k.length>2?parseFloat(k[1])/parseFloat(k[2]):parseFloat(r+"")}else o&&d&&(r=o/d);if(!r)return;n.style.aspectRatio="",n.style.width="",n.style.height="",n.offsetHeight;const p=n.getBoundingClientRect(),c=p.width||1,b=p.height||1;n.style.aspectRatio=r+"",r<c/b?(d=d==="auto"?b:Math.min(b,d),n.style.width="auto",n.style.height=`${d}px`):(o=o==="auto"?c:Math.min(c,o),n.style.width=`${o}px`,n.style.height="auto")}attach(){const e=this,n=e.instance;n.on("Carousel.beforeInitSlide",e.onBeforeInitSlide),n.on("Carousel.createSlide",e.onCreateSlide),n.on("Carousel.selectSlide",e.onSelectSlide),n.on("Carousel.unselectSlide",e.onUnselectSlide),n.on("Carousel.Panzoom.refresh",e.onRefresh),n.on("done",e.onDone),n.on("clearContent",e.onClearContent),window.addEventListener("message",e.onMessage)}detach(){const e=this,n=e.instance;n.off("Carousel.beforeInitSlide",e.onBeforeInitSlide),n.off("Carousel.createSlide",e.onCreateSlide),n.off("Carousel.selectSlide",e.onSelectSlide),n.off("Carousel.unselectSlide",e.onUnselectSlide),n.off("Carousel.Panzoom.refresh",e.onRefresh),n.off("done",e.onDone),n.off("clearContent",e.onClearContent),window.removeEventListener("message",e.onMessage)}}Object.defineProperty(Qx,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:lR});const $h="play",jh="pause",xd="ready";class ev extends us{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:xd}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==xd}onReady(e){this.option("autoStart")&&(e.isInfinite||e.page<e.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){document.visibilityState==="visible"?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var e;this.inHover=!1,!((e=this.instance.panzoom)===null||e===void 0)&&e.isResting&&this.resume()}onTimerEnd(){const e=this.instance;this.state==="play"&&(e.isInfinite||e.page!==e.pages.length-1?e.slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();const n=this.instance,r=((e=n.pages[n.page])===null||e===void 0?void 0:e.slides)||[];let o=this.option("progressParentEl");if(o||(o=(r.length===1?r[0].el:null)||n.viewport),!o)return null;const d=document.createElement("div");return Tt(d,"f-progress"),o.prepend(d),this.progressBar=d,d.offsetHeight,d}set(){const e=this,n=e.instance;if(n.pages.length<2||e.timer)return;const r=e.option("timeout");e.state=$h,Tt(n.container,"has-autoplay");let o=e.createProgressBar();o&&(o.style.transitionDuration=`${r}ms`,o.style.transform="scaleX(1)"),e.timer=setTimeout(()=>{e.timer=null,e.inHover||e.onTimerEnd()},r),e.emit("set")}clear(){const e=this;e.timer&&(clearTimeout(e.timer),e.timer=null),e.removeProgressBar()}start(){const e=this;if(e.set(),e.state!==xd){if(e.option("pauseOnHover")){const n=e.instance.container;n.addEventListener("mouseenter",e.onMouseEnter,!1),n.addEventListener("mouseleave",e.onMouseLeave,!1)}document.addEventListener("visibilitychange",e.onVisibilityChange,!1),e.emit("start")}}stop(){const e=this,n=e.state,r=e.instance.container;e.clear(),e.state=xd,r.removeEventListener("mouseenter",e.onMouseEnter,!1),r.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),En(r,"has-autoplay"),n!==xd&&e.emit("stop")}pause(){const e=this;e.state===$h&&(e.state=jh,e.clear(),e.emit(jh))}resume(){const e=this,n=e.instance;if(n.isInfinite||n.page!==n.pages.length-1)if(e.state!==$h){if(e.state===jh&&!e.inHover){const r=new Event("resume",{bubbles:!0,cancelable:!0});e.emit("resume",r),r.defaultPrevented||e.set()}}else e.set();else e.stop()}toggle(){this.state===$h||this.state===jh?this.stop():this.start()}attach(){const e=this,n=e.instance;n.on("ready",e.onReady),n.on("Panzoom.startAnimation",e.onChange),n.on("Panzoom.endAnimation",e.onSettle),n.on("Panzoom.touchMove",e.onChange)}detach(){const e=this,n=e.instance;n.off("ready",e.onReady),n.off("Panzoom.startAnimation",e.onChange),n.off("Panzoom.endAnimation",e.onSettle),n.off("Panzoom.touchMove",e.onChange),e.stop()}}Object.defineProperty(ev,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class tv extends us{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){const n=e.carousel;if(!n)return;const r=e.container;r&&(n.options.Autoplay=fi({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{e.emit("startSlideshow")},set:o=>{var d;r.classList.add("has-slideshow"),((d=e.getSlide())===null||d===void 0?void 0:d.state)!==$r.Ready&&o.pause()},stop:()=>{r.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume:(o,d)=>{var p,c,b;!d||!d.cancelable||((p=e.getSlide())===null||p===void 0?void 0:p.state)===$r.Ready&&(!((b=(c=e.carousel)===null||c===void 0?void 0:c.panzoom)===null||b===void 0)&&b.isResting)||d.preventDefault()}}}),n.attachPlugins({Autoplay:ev}),this.ref=n.plugins.Autoplay)}onReady(e){const n=e.carousel,r=this.ref;r&&n&&this.option("playOnStart")&&(n.isInfinite||n.page<n.pages.length-1)&&r.start()}onDone(e,n){const r=this.ref,o=e.carousel;if(!r||!o)return;const d=n.panzoom;d&&d.on("startAnimation",()=>{e.isCurrentSlide(n)&&r.stop()}),e.isCurrentSlide(n)&&r.resume()}onKeydown(e,n){var r;const o=this.ref;o&&n===this.option("key")&&((r=document.activeElement)===null||r===void 0?void 0:r.nodeName)!=="BUTTON"&&o.toggle()}attach(){const e=this,n=e.instance;n.on("Carousel.init",e.onPrepare),n.on("Carousel.ready",e.onReady),n.on("done",e.onDone),n.on("keydown",e.onKeydown)}detach(){const e=this,n=e.instance;n.off("Carousel.init",e.onPrepare),n.off("Carousel.ready",e.onReady),n.off("done",e.onDone),n.off("keydown",e.onKeydown)}}Object.defineProperty(tv,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:t=>{var e;return((e=t.instance.container)===null||e===void 0?void 0:e.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||t.instance.container},timeout:3e3}});const nv={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};var no;(function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Hidden=2]="Hidden"})(no||(no={}));const rv="isResting",Uh="thumbWidth",zl="thumbHeight",As="thumbClipWidth";let iv=class extends us{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:no.Init})}get isModern(){return this.type==="modern"}onInitSlide(t,e){const n=e.el?e.el.dataset:void 0;n&&(e.thumbSrc=n.thumbSrc||e.thumbSrc||"",e[As]=parseFloat(n[As]||"")||e[As]||0,e[zl]=parseFloat(n.thumbHeight||"")||e[zl]||0),this.addSlide(e)}onInitSlides(){this.build()}onChange(){var t;if(!this.isModern)return;const e=this.container,n=this.instance,r=n.panzoom,o=this.carousel,d=o?o.panzoom:null,p=n.page;if(r&&o&&d){if(r.isDragging){En(e,this.cn(rv));let c=((t=o.pages[p])===null||t===void 0?void 0:t.pos)||0;c+=n.getProgress(p)*(this[As]+this.thumbGap);let b=d.getBounds();-1*c>b.x.min&&-1*c<b.x.max&&d.panTo({x:-1*c,friction:.12})}else Ts(e,this.cn(rv),r.isResting);this.shiftModern()}}onRefresh(){this.updateProps();for(const t of this.instance.slides||[])this.resizeModernSlide(t);this.shiftModern()}isDisabled(){const t=this.option("minCount")||0;if(t){const n=this.instance;let r=0;for(const o of n.slides||[])o.thumbSrc&&r++;if(r<t)return!0}const e=this.option("type");return["modern","classic"].indexOf(e)<0}getThumb(t){const e=this.option("thumbTpl")||"";return{html:this.instance.localize(e,[["%i",t.index],["%d",t.index+1],["%s",t.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(t){const e=this.carousel;e&&e.addSlide(t.index,this.getThumb(t))}getSlides(){const t=[];for(const e of this.instance.slides||[])t.push(this.getThumb(e));return t}resizeModernSlide(t){this.isModern&&(t[Uh]=t[As]&&t[zl]?Math.round(this[zl]*(t[As]/t[zl])):this[Uh])}updateProps(){const t=this.container;if(!t)return;const e=n=>parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-"+n))||0;this.thumbGap=e("gap"),this.thumbExtraGap=e("extra-gap"),this[Uh]=e("width")||40,this[As]=e("clip-width")||40,this[zl]=e("height")||40}build(){const t=this;if(t.state!==no.Init)return;if(t.isDisabled())return void t.emit("disabled");const e=t.instance,n=e.container,r=t.getSlides(),o=t.option("type");t.type=o;const d=t.option("parentEl"),p=t.cn("container"),c=t.cn("track");let b=d==null?void 0:d.querySelector("."+p);b||(b=document.createElement("div"),Tt(b,p),d?d.appendChild(b):n.after(b)),Tt(b,`is-${o}`),Tt(n,t.cn("hasThumbs")),t.container=b,t.updateProps();let k=b.querySelector("."+c);k||(k=document.createElement("div"),Tt(k,t.cn("track")),b.appendChild(k)),t.track=k;const E=fi({},{track:k,infinite:!1,center:!0,fill:o==="classic",dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},t.option("Carousel")||{},{Sync:{target:e},slides:r}),C=new e.constructor(b,E);C.on("createSlide",(T,I)=>{t.setProps(I.index),t.emit("createSlide",I,I.el)}),C.on("ready",()=>{t.shiftModern(),t.emit("ready")}),C.on("refresh",()=>{t.shiftModern()}),C.on("Panzoom.click",(T,I,N)=>{t.onClick(N)}),t.carousel=C,t.state=no.Ready}onClick(t){t.preventDefault(),t.stopPropagation();const e=this.instance,{pages:n,page:r}=e,o=$=>{if($){const F=$.closest("[data-carousel-index]");if(F)return[parseInt(F.dataset.carouselIndex||"",10)||0,F]}return[-1,void 0]},d=($,F)=>{const q=document.elementFromPoint($,F);return q?o(q):[-1,void 0]};let[p,c]=o(t.target);if(p>-1)return;const b=this[As],k=t.clientX,E=t.clientY;let[C,T]=d(k-b,E),[I,N]=d(k+b,E);T&&N?(p=Math.abs(k-T.getBoundingClientRect().right)<Math.abs(k-N.getBoundingClientRect().left)?C:I,p===r&&(p=p===C?I:C)):T?p=C:N&&(p=I),p>-1&&n[p]&&e.slideTo(p)}getShift(t){var e;const n=this,{instance:r}=n,o=n.carousel;if(!r||!o)return 0;const d=n[Uh],p=n[As],c=n.thumbGap,b=n.thumbExtraGap;if(!(!((e=o.slides[t])===null||e===void 0)&&e.el))return 0;const k=.5*(d-p),E=r.pages.length-1;let C=r.getProgress(0),T=r.getProgress(E),I=r.getProgress(t,!1,!0),N=0,$=k+b+c;const F=C<0&&C>-1,q=T>0&&T<1;return t===0?(N=$*Math.abs(C),q&&C===1&&(N-=$*Math.abs(T))):t===E?(N=$*Math.abs(T)*-1,F&&T===-1&&(N+=$*Math.abs(C))):F||q?(N=-1*$,N+=$*Math.abs(C),N+=$*(1-Math.abs(T))):N=$*I,N}setProps(t){var e;const n=this;if(!n.isModern)return;const{instance:r}=n,o=n.carousel;if(r&&o){const d=(e=o.slides[t])===null||e===void 0?void 0:e.el;if(d&&d.childNodes.length){let p=ct(1-Math.abs(r.getProgress(t))),c=ct(n.getShift(t));d.style.setProperty("--progress",p?p+"":""),d.style.setProperty("--shift",c+"")}}}shiftModern(){const t=this;if(!t.isModern)return;const{instance:e,track:n}=t,r=e.panzoom,o=t.carousel;if(!(e&&n&&r&&o)||r.state===An.Init||r.state===An.Destroy)return;for(const p of e.slides)t.setProps(p.index);let d=(t[As]+t.thumbGap)*(o.slides.length||0);n.style.setProperty("--width",d+"")}cleanup(){const t=this;t.carousel&&t.carousel.destroy(),t.carousel=null,t.container&&t.container.remove(),t.container=null,t.track&&t.track.remove(),t.track=null,t.state=no.Init,En(t.instance.container,t.cn("hasThumbs"))}attach(){const t=this,e=t.instance;e.on("initSlide",t.onInitSlide),e.state===ur.Init?e.on("initSlides",t.onInitSlides):t.onInitSlides(),e.on(["change","Panzoom.afterTransform"],t.onChange),e.on("Panzoom.refresh",t.onRefresh)}detach(){const t=this,e=t.instance;e.off("initSlide",t.onInitSlide),e.off("initSlides",t.onInitSlides),e.off(["change","Panzoom.afterTransform"],t.onChange),e.off("Panzoom.refresh",t.onRefresh),t.cleanup()}};Object.defineProperty(iv,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:nv});const dR=Object.assign(Object.assign({},nv),{key:"t",showOnStart:!0,parentEl:null}),sv="is-masked",ov="aria-hidden";class av extends us{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onClick(e,n){n.stopPropagation()}onCreateSlide(e,n){var r,o,d;const p=((d=(o=(r=this.instance)===null||r===void 0?void 0:r.carousel)===null||o===void 0?void 0:o.slides[n.index])===null||d===void 0?void 0:d.type)||"",c=n.el;if(c&&p){let b=`for-${p}`;["video","youtube","vimeo","html5video"].includes(p)&&(b+=" for-video"),Tt(c,b)}}onInit(){var e;const n=this,r=n.instance,o=r.carousel;if(n.ref||!o)return;const d=n.option("parentEl")||r.footer||r.container;if(!d)return;const p=fi({},n.options,{parentEl:d,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:r.option("Carousel.friction")||0}},on:{ready:c=>{const b=c.container;b&&this.hidden&&(n.refresh(),b.style.transition="none",n.hide(),b.offsetHeight,queueMicrotask(()=>{b.style.transition="",n.show()}))}}});p.Carousel=p.Carousel||{},p.Carousel.on=fi(((e=n.options.Carousel)===null||e===void 0?void 0:e.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),o.options.Thumbs=p,o.attachPlugins({Thumbs:iv}),n.ref=o.plugins.Thumbs,n.option("showOnStart")||(n.ref.state=no.Hidden,n.hidden=!0)}onResize(){var e;const n=(e=this.ref)===null||e===void 0?void 0:e.container;n&&(n.style.maxHeight="")}onKeydown(e,n){const r=this.option("key");r&&r===n&&this.toggle()}toggle(){const e=this.ref;if(e&&!e.isDisabled())return e.state===no.Hidden?(e.state=no.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){const e=this.ref;if(!e||e.isDisabled())return;const n=e.container;n&&(this.refresh(),n.offsetHeight,n.removeAttribute(ov),n.classList.remove(sv),this.hidden=!1)}hide(){const e=this.ref,n=e&&e.container;n&&(this.refresh(),n.offsetHeight,n.classList.add(sv),n.setAttribute(ov,"true")),this.hidden=!0}refresh(){const e=this.ref;if(!e||!e.state)return;const n=e.container,r=(n==null?void 0:n.firstChild)||null;n&&r&&r.childNodes.length&&(n.style.maxHeight=`${r.getBoundingClientRect().height}px`)}attach(){const e=this,n=e.instance;n.state===kr.Init?n.on("Carousel.init",e.onInit):e.onInit(),n.on("resize",e.onResize),n.on("keydown",e.onKeydown)}detach(){var e;const n=this,r=n.instance;r.off("Carousel.init",n.onInit),r.off("resize",n.onResize),r.off("keydown",n.onKeydown),(e=r.carousel)===null||e===void 0||e.detachPlugins(["Thumbs"]),n.ref=null}}Object.defineProperty(av,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:dR});const tg={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};var Ia;(function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Disabled=2]="Disabled"})(Ia||(Ia={}));const uR={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null},hR={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},lv="has-toolbar",ng="fancybox__toolbar";class cv extends us{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ia.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(e){var n;if(!e.carousel)return;let r=this.option("display"),o=this.option("absolute"),d=this.option("enabled");if(d==="auto"){const k=this.instance.carousel;let E=0;if(k)for(const C of k.slides)(C.panzoom||C.type==="image")&&E++;E||(d=!1)}d||(r=void 0);let p=0;const c={left:[],middle:[],right:[]};if(r)for(const k of["left","middle","right"])for(const E of r[k]){const C=this.createEl(E);C&&((n=c[k])===null||n===void 0||n.push(C),p++)}let b=null;if(p&&(b=this.createContainer()),b){for(const[k,E]of Object.entries(c)){const C=document.createElement("div");Tt(C,ng+"__column is-"+k);for(const T of E)C.appendChild(T);o!=="auto"||k!=="middle"||E.length||(o=!0),b.appendChild(C)}o===!0&&Tt(b,"is-absolute"),this.state=Ia.Ready,this.onRefresh()}else this.state=Ia.Disabled}onClick(e){var n,r;const o=this.instance,d=o.getSlide(),p=d==null?void 0:d.panzoom,c=e.target,b=c&&mi(c)?c.dataset:null;if(!b)return;if(b.fancyboxToggleThumbs!==void 0)return e.preventDefault(),e.stopPropagation(),void((n=o.plugins.Thumbs)===null||n===void 0||n.toggle());if(b.fancyboxToggleFullscreen!==void 0)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(b.fancyboxToggleSlideshow!==void 0){e.preventDefault(),e.stopPropagation();const C=(r=o.carousel)===null||r===void 0?void 0:r.plugins.Autoplay;let T=C.isActive;return p&&p.panMode==="mousemove"&&!T&&p.reset(),void(T?C.stop():C.start())}const k=b.panzoomAction,E=b.panzoomChange;if((E||k)&&(e.preventDefault(),e.stopPropagation()),E){let C={};try{C=JSON.parse(E)}catch{}p&&p.applyChange(C)}else k&&p&&p[k]&&p[k]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const e=this.container;if(!e)return;const n=this.instance.getSlide();if(!n||n.state!==$r.Ready)return;const r=n&&!n.error&&n.panzoom;for(const p of e.querySelectorAll("[data-panzoom-action]"))r?(p.removeAttribute("disabled"),p.removeAttribute("tabindex")):(p.setAttribute("disabled",""),p.setAttribute("tabindex","-1"));let o=r&&r.canZoomIn(),d=r&&r.canZoomOut();for(const p of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))o?(p.removeAttribute("disabled"),p.removeAttribute("tabindex")):(p.setAttribute("disabled",""),p.setAttribute("tabindex","-1"));for(const p of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))d?(p.removeAttribute("disabled"),p.removeAttribute("tabindex")):(p.setAttribute("disabled",""),p.setAttribute("tabindex","-1"));for(const p of e.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){d||o?(p.removeAttribute("disabled"),p.removeAttribute("tabindex")):(p.setAttribute("disabled",""),p.setAttribute("tabindex","-1"));const c=p.querySelector("g");c&&(c.style.display=o?"":"none")}}onDone(e,n){var r;(r=n.panzoom)===null||r===void 0||r.on("afterTransform",()=>{this.instance.isCurrentSlide(n)&&this.onRefresh()}),this.instance.isCurrentSlide(n)&&this.onRefresh()}createContainer(){const e=this.instance.container;if(!e)return null;const n=this.option("parentEl")||e;let r=n.querySelector("."+ng);return r||(r=document.createElement("div"),Tt(r,ng),n.prepend(r)),r.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&Tt(e,lv),this.container=r,r}createEl(e){const n=this.instance,r=n.carousel;if(!r||e==="toggleFS"||e==="fullscreen"&&!Ux())return null;let o=null;const d=r.slides.length||0;let p=0,c=0;for(const k of r.slides)(k.panzoom||k.type==="image")&&p++,(k.type==="image"||k.downloadSrc)&&c++;if(d<2&&["infobar","prev","next"].includes(e))return o;if(tg[e]!==void 0&&!p||e==="download"&&!c)return null;if(e==="thumbs"){const k=n.plugins.Thumbs;if(!k||!k.isEnabled)return null}if(e==="slideshow"&&(!r.plugins.Autoplay||d<2))return null;if(tg[e]!==void 0){const k=tg[e];o=document.createElement("button"),o.setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),Tt(o,"f-button"),k.action&&(o.dataset.panzoomAction=k.action),k.change&&(o.dataset.panzoomChange=JSON.stringify(k.change)),o.appendChild(Ss(this.instance.localize(k.icon)))}else{const k=(this.option("items")||[])[e];k&&(o=Ss(this.instance.localize(k.tpl)),typeof k.click=="function"&&o.addEventListener("click",E=>{E.preventDefault(),E.stopPropagation(),typeof k.click=="function"&&k.click.call(this,this,E)}))}const b=o==null?void 0:o.querySelector("svg");if(b)for(const[k,E]of Object.entries(hR))b.getAttribute(k)||b.setAttribute(k,String(E));return o}removeContainer(){const e=this.container;e&&e.remove(),this.container=null,this.state=Ia.Disabled;const n=this.instance.container;n&&En(n,lv)}attach(){const e=this,n=e.instance;n.on("Carousel.initSlides",e.onReady),n.on("done",e.onDone),n.on(["reveal","Carousel.change"],e.onChange),e.onReady(e.instance)}detach(){const e=this,n=e.instance;n.off("Carousel.initSlides",e.onReady),n.off("done",e.onDone),n.off(["reveal","Carousel.change"],e.onChange),e.removeContainer()}}Object.defineProperty(cv,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:uR});const pR={Hash:class extends us{onReady(){_d=!1}onChange(t){Da&&clearTimeout(Da);const{hash:e}=Wx(),{hash:n}=Lh(),r=t.isOpeningSlide(t.getSlide());r&&(Hx=n===e?"":n),e&&e!==n&&(Da=setTimeout(()=>{try{if(t.state===kr.Ready){let o="replaceState";r&&!Oh&&(o="pushState",Oh=!0),window.history[o]({},document.title,window.location.pathname+window.location.search+e)}}catch{}},300))}onClose(t){if(Da&&clearTimeout(Da),!_d&&Oh)return Oh=!1,_d=!1,void window.history.back();if(!_d)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(Hx||""))}catch{}}attach(){const t=this.instance;t.on("ready",this.onReady),t.on(["Carousel.ready","Carousel.change"],this.onChange),t.on("close",this.onClose)}detach(){const t=this.instance;t.off("ready",this.onReady),t.off(["Carousel.ready","Carousel.change"],this.onChange),t.off("close",this.onClose)}static parseURL(){return Lh()}static startFromUrl(){qx()}static destroy(){window.removeEventListener("hashchange",Zx,!1)}},Html:Qx,Images:Xx,Slideshow:tv,Thumbs:av,Toolbar:cv},dv="with-fancybox",rg="hide-scrollbar",uv="--fancybox-scrollbar-compensate",hv="--fancybox-body-margin",ig="aria-hidden",sg="is-using-tab",og="is-animated",pv="is-compact",fv="is-loading",ag="is-opening",Hh="has-caption",Ol="disabled",Pa="tabindex",mv="download",lg="href",Ll="src",Po=t=>typeof t=="string",gv=function(){var t=window.getSelection();return!!t&&t.type==="Range"};let Ki,Ji=null,Ra=null,yv=0,_v=0,bv=0,xv=0;const Fl=new Map;let fR=0;class un extends Wm{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(e=[],n={},r={}){super(n),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:kr.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Ki||(Ki=Ux()),this.id=n.id||++fR,Fl.set(this.id,this),this.userSlides=e,this.userPlugins=r,queueMicrotask(()=>{this.init()})}init(){if(this.state===kr.Destroy)return;this.state=kr.Init,this.attachPlugins(Object.assign(Object.assign({},un.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),this.option("hideScrollbar")===!0&&(()=>{if(!yd)return;const n=document,r=n.body,o=n.documentElement;if(r.classList.contains(rg))return;let d=window.innerWidth-o.getBoundingClientRect().width;const p=parseFloat(window.getComputedStyle(r).marginRight);d<0&&(d=0),o.style.setProperty(uv,`${d}px`),p&&r.style.setProperty(hv,`${p}px`),r.classList.add(rg)})(),this.initLayout(),this.scale();const e=()=>{this.initCarousel(this.userSlides),this.state=kr.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(ig,"false")},16)};this.option("Fullscreen.autoStart")&&Ki&&!Ki.isFullscreen()?Ki.request().then(()=>{this.startedFs=!0,e()}).catch(()=>e()):e()}initLayout(){var e,n;const r=this.option("parentEl")||document.body,o=Ss(this.localize(this.option("tpl.main")||""));if(o){if(o.setAttribute("id",`fancybox-${this.id}`),o.setAttribute("aria-label",this.localize("{{MODAL}}")),o.classList.toggle(pv,this.isCompact),Tt(o,this.option("mainClass")||""),Tt(o,ag),this.container=o,this.footer=o.querySelector(".fancybox__footer"),r.appendChild(o),Tt(document.documentElement,dv),Ji&&Ra||(Ji=document.createElement("span"),Tt(Ji,"fancybox-focus-guard"),Ji.setAttribute(Pa,"0"),Ji.setAttribute(ig,"true"),Ji.setAttribute("aria-label","Focus guard"),Ra=Ji.cloneNode(),(e=o.parentElement)===null||e===void 0||e.insertBefore(Ji,o),(n=o.parentElement)===null||n===void 0||n.append(Ra)),o.addEventListener("mousedown",d=>{yv=d.pageX,_v=d.pageY,En(o,sg)}),this.option("closeExisting"))for(const d of Fl.values())d.id!==this.id&&d.close();else this.option("animated")&&(Tt(o,og),setTimeout(()=>{this.isClosing()||En(o,og)},350));this.emit("initLayout")}}initCarousel(e){const n=this.container;if(!n)return;const r=n.querySelector(".fancybox__carousel");if(!r)return;const o=this.carousel=new gd(r,fi({},{slides:e,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));o.on("*",(d,p,...c)=>{this.emit(`Carousel.${p}`,d,...c)}),o.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(d,p,c)=>{this.clearContent(c),c.state=void 0}),o.on("Panzoom.touchStart",()=>{var d,p;this.isCompact||this.endIdle(),!((d=document.activeElement)===null||d===void 0)&&d.closest(".f-thumbs")&&((p=this.container)===null||p===void 0||p.focus())}),o.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(o.on("Panzoom.afterTransform",(d,p)=>{const c=this.getSlide();if(c&&$m(c.el))return;const b=this.container;if(b){const k=Math.abs(p.current.f),E=k<1?"":Math.max(.5,Math.min(1,1-k/p.contentRect.fitHeight*1.5));b.style.setProperty("--fancybox-ts",E?"0s":""),b.style.setProperty("--fancybox-opacity",E+"")}}),o.on("Panzoom.touchEnd",(d,p,c)=>{var b;const k=this.getSlide();if(k&&$m(k.el)||p.isMobile&&document.activeElement&&["TEXTAREA","INPUT"].indexOf((b=document.activeElement)===null||b===void 0?void 0:b.nodeName)!==-1)return;const E=Math.abs(p.dragOffset.y);p.lockedAxis==="y"&&(E>=200||E>=50&&p.dragOffset.time<300)&&(c&&c.cancelable&&c.preventDefault(),this.close(c,"f-throwOut"+(p.current.f<0?"Up":"Down")))})),o.on("change",d=>{var p;let c=(p=this.getSlide())===null||p===void 0?void 0:p.triggerEl;if(c){const b=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:d.page});c.dispatchEvent(b)}}),o.on(["refresh","change"],d=>{const p=this.container;if(!p)return;for(const k of p.querySelectorAll("[data-fancybox-current-index]"))k.innerHTML=d.page+1;for(const k of p.querySelectorAll("[data-fancybox-count]"))k.innerHTML=d.pages.length;if(!d.isInfinite){for(const k of p.querySelectorAll("[data-fancybox-next]"))d.page<d.pages.length-1?(k.removeAttribute(Ol),k.removeAttribute(Pa)):(k.setAttribute(Ol,""),k.setAttribute(Pa,"-1"));for(const k of p.querySelectorAll("[data-fancybox-prev]"))d.page>0?(k.removeAttribute(Ol),k.removeAttribute(Pa)):(k.setAttribute(Ol,""),k.setAttribute(Pa,"-1"))}const c=this.getSlide();if(!c)return;let b=c.downloadSrc||"";b||c.type!=="image"||c.error||!Po(c[Ll])||(b=c[Ll]);for(const k of p.querySelectorAll("[data-fancybox-download]")){const E=c.downloadFilename;b?(k.removeAttribute(Ol),k.removeAttribute(Pa),k.setAttribute(lg,b),k.setAttribute(mv,E||b),k.setAttribute("target","_blank")):(k.setAttribute(Ol,""),k.setAttribute(Pa,"-1"),k.removeAttribute(lg),k.removeAttribute(mv))}}),this.emit("initCarousel")}attachEvents(){const e=this,n=e.container;if(!n)return;n.addEventListener("click",e.onClick,{passive:!1,capture:!1}),n.addEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",e.onVisibilityChange,!1),document.addEventListener("mousemove",e.onMousemove),e.option("trapFocus")&&document.addEventListener("focus",e.onFocus,!0),window.addEventListener("resize",e.onResize);const r=window.visualViewport;r&&(r.addEventListener("scroll",e.onResize),r.addEventListener("resize",e.onResize))}detachEvents(){const e=this,n=e.container;if(!n)return;document.removeEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),n.removeEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),n.removeEventListener("click",e.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",e.onMousemove),window.removeEventListener("resize",e.onResize);const r=window.visualViewport;r&&(r.removeEventListener("resize",e.onResize),r.removeEventListener("scroll",e.onResize)),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),document.removeEventListener("focus",e.onFocus,!0)}scale(){const e=this.container;if(!e)return;const n=window.visualViewport,r=Math.max(1,(n==null?void 0:n.scale)||1);let o="",d="",p="";if(n&&r>1){let c=`${n.offsetLeft}px`,b=`${n.offsetTop}px`;o=n.width*r+"px",d=n.height*r+"px",p=`translate3d(${c}, ${b}, 0) scale(${1/r})`}e.style.transform=p,e.style.width=o,e.style.height=d}onClick(e){var n;const{container:r,isCompact:o}=this;if(!r||this.isClosing())return;!o&&this.option("idle")&&this.resetIdle();const d=e.composedPath()[0];if(d.closest(".fancybox-spinner")||d.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(d.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(d.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();if(e.type==="click"&&e.detail===0||Math.abs(e.pageX-yv)>30||Math.abs(e.pageY-_v)>30)return;const p=document.activeElement;if(gv()&&p&&r.contains(p))return;if(o&&((n=this.getSlide())===null||n===void 0?void 0:n.type)==="image")return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout(()=>{this.toggleIdle(),this.clickTimer=null},350));if(this.emit("click",e),e.defaultPrevented)return;let c=!1;if(d.closest(".fancybox__content")){if(p){if(p.closest("[contenteditable]"))return;d.matches(Km)||p.blur()}if(gv())return;c=this.option("contentClick")}else d.closest(".fancybox__carousel")&&!d.matches(Km)&&(c=this.option("backdropClick"));c==="close"?(e.preventDefault(),this.close(e)):c==="next"?(e.preventDefault(),this.next()):c==="prev"&&(e.preventDefault(),this.prev())}onWheel(e){const n=e.target;let r=this.option("wheel",e);n.closest(".fancybox__thumbs")&&(r="slide");const o=r==="slide",d=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(b,k){return Math.abs(k)>Math.abs(b)?k:b}),p=Math.max(-1,Math.min(1,d)),c=Date.now();this.pwt&&c-this.pwt<300?o&&e.preventDefault():(this.pwt=c,this.emit("wheel",e,p),e.defaultPrevented||(r==="close"?(e.preventDefault(),this.close(e)):r==="slide"&&(Mh(n)||(e.preventDefault(),this[p>0?"prev":"next"]()))))}onScroll(){window.scrollTo(bv,xv)}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const n=e.key,r=this.option("keyboard");if(!r)return;const o=e.composedPath()[0],d=document.activeElement&&document.activeElement.classList,p=d&&d.contains("f-button")||o.dataset.carouselPage||o.dataset.carouselIndex;if(n!=="Escape"&&!p&&mi(o)&&(o.isContentEditable||["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(o.nodeName)!==-1)||(e.key==="Tab"?Tt(this.container,sg):En(this.container,sg),e.ctrlKey||e.altKey||e.shiftKey))return;this.emit("keydown",n,e);const c=r[n];c&&typeof this[c]=="function"&&(e.preventDefault(),this[c]())}onResize(){const e=this.container;if(!e)return;const n=this.isCompact;e.classList.toggle(pv,n),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(e){this.isTopmost()&&this.checkFocus(e)}onMousemove(e){this.prevMouseMoveEvent=e,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){document.visibilityState==="visible"?this.checkFocus():this.endIdle()}manageCloseBtn(e){const n=this.optionFor(e,"closeButton")||!1;if(n==="auto"){const o=this.plugins.Toolbar;if(o&&o.state===Ia.Ready)return}if(!n||!e.contentEl||e.closeBtnEl)return;const r=this.option("tpl.closeButton");if(r){const o=Ss(this.localize(r));e.closeBtnEl=e.contentEl.appendChild(o),e.el&&Tt(e.el,"has-close-btn")}}manageCaption(e=void 0){var n,r;const o="fancybox__caption",d=this.container;if(!d)return;En(d,Hh);const p=this.isCompact||this.option("commonCaption"),c=!p;if(this.caption&&this.stop(this.caption),c&&this.caption&&(this.caption.remove(),this.caption=null),p&&!this.caption)for(const C of((n=this.carousel)===null||n===void 0?void 0:n.slides)||[])C.captionEl&&(C.captionEl.remove(),C.captionEl=void 0,En(C.el,Hh),(r=C.el)===null||r===void 0||r.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||p&&!this.isCurrentSlide(e))return;const b=e.el;let k=this.optionFor(e,"caption","");if(!k)return void(p&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let E=null;if(c){if(E=e.captionEl||null,b&&!E){const C=o+`_${this.id}_${e.index}`;E=document.createElement("div"),Tt(E,o),E.setAttribute("id",C),e.captionEl=b.appendChild(E),Tt(b,Hh),b.setAttribute("aria-labelledby",C)}}else E=this.caption,E||(E=d.querySelector("."+o)),!E&&(E=document.createElement("div"),E.dataset.fancyboxCaption="",Tt(E,o),(this.footer||d).prepend(E)),Tt(d,Hh),this.caption=E;E&&(E.innerHTML="",Po(k)||typeof k=="number"?E.innerHTML=k+"":k instanceof HTMLElement&&E.appendChild(k))}checkFocus(e){this.focus(e)}focus(e){var n;if(this.ignoreFocusChange)return;const r=document.activeElement||null,o=(e==null?void 0:e.target)||null,d=this.container,p=(n=this.carousel)===null||n===void 0?void 0:n.viewport;if(!d||!p||!e&&r&&d.contains(r))return;const c=this.getSlide(),b=c&&c.state===$r.Ready?c.el:null;if(!b||b.contains(r)||d===r)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;const k=Array.from(d.querySelectorAll(Km));let E=[],C=null;for(let I of k){const N=!I.offsetParent||!!I.closest('[aria-hidden="true"]'),$=b&&b.contains(I),F=!p.contains(I);if(I===d||($||F)&&!N){E.push(I);const q=I.dataset.origTabindex;q!==void 0&&q&&(I.tabIndex=parseFloat(q)),I.removeAttribute("data-orig-tabindex"),!I.hasAttribute("autoFocus")&&C||(C=I)}else{const q=I.dataset.origTabindex===void 0?I.getAttribute("tabindex")||"":I.dataset.origTabindex;q&&(I.dataset.origTabindex=q),I.tabIndex=-1}}let T=null;e?(!o||E.indexOf(o)<0)&&(T=C||d,E.length&&(r===Ra?T=E[0]:this.lastFocus!==d&&r!==Ji||(T=E[E.length-1]))):T=c&&c.type==="image"?d:C||d,T&&jx(T),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return((e=un.getInstance())===null||e===void 0?void 0:e.id)==this.id}animate(e=null,n="",r){if(!e||!n)return void(r&&r());this.stop(e);const o=d=>{d.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",o),delete e.dataset.animationName,r&&r(),En(e,n))};e.dataset.animationName=n,e.addEventListener("animationend",o),Tt(e,n)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,n="",r=!0){if(this.isClosing())return;const o=e.el;if(!o)return;let d=null;if(mi(n)?d=n:(d=Ss(n+""),mi(d)||(d=document.createElement("div"),d.innerHTML=n+"")),["img","picture","iframe","video","audio"].includes(d.nodeName.toLowerCase())){const p=document.createElement("div");p.appendChild(d),d=p}mi(d)&&e.filter&&!e.error&&(d=d.querySelector(e.filter)),d&&mi(d)?(Tt(d,"fancybox__content"),e.id&&d.setAttribute("id",e.id),o.classList.add(`has-${e.error?"error":e.type||"unknown"}`),o.prepend(d),d.style.display==="none"&&(d.style.display=""),getComputedStyle(d).getPropertyValue("display")==="none"&&(d.style.display=e.display||this.option("defaultDisplay")||"flex"),e.contentEl=d,r&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,n){const r=e.el,o=e.contentEl;r&&o&&(this.emit("reveal",e),this.hideLoading(e),e.state=$r.Opening,(n=this.isOpeningSlide(e)?n===void 0?this.optionFor(e,"showClass"):n:"f-fadeIn")?this.animate(o,n,()=>{this.done(e)}):this.done(e))}done(e){this.isClosing()||(e.state=$r.Ready,this.emit("done",e),Tt(e.el,"is-done"),this.isCurrentSlide(e)&&this.option("autoFocus")&&queueMicrotask(()=>{var n;(n=e.panzoom)===null||n===void 0||n.updateControls(),this.option("autoFocus")&&this.focus()}),this.isOpeningSlide(e)&&(En(this.container,ag),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(e){const n=this.getSlide();return!(!e||!n)&&n.index===e.index}isOpeningSlide(e){var n,r;return((n=this.carousel)===null||n===void 0?void 0:n.prevPage)===null&&e&&e.index===((r=this.getSlide())===null||r===void 0?void 0:r.index)}showLoading(e){e.state=$r.Loading;const n=e.el;n&&(Tt(n,fv),this.emit("loading",e),e.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===$r.Loading){let r=Ss(qm);Tt(r,"fancybox-spinner"),e.spinnerEl=r,n.prepend(r),this.animate(r,"f-fadeIn")}},250))}hideLoading(e){const n=e.el;if(!n)return;const r=e.spinnerEl;this.isClosing()?r==null||r.remove():(En(n,fv),r&&this.animate(r,"f-fadeOut",()=>{r.remove()}),e.state===$r.Loading&&(this.emit("loaded",e),e.state=$r.Ready))}setError(e,n){if(this.isClosing())return;const r=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",r,e),r.defaultPrevented)return;e.error=n,this.hideLoading(e),this.clearContent(e);const o=document.createElement("div");o.classList.add("fancybox-error"),o.innerHTML=this.localize(n||"<p>{{ERROR}}</p>"),this.setContent(e,o)}clearContent(e){if(e.state===void 0)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);const n=e.el;n&&(En(n,"has-error"),En(n,"has-unknown"),En(n,`has-${e.type||"unknown"}`)),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;const n=this.carousel;return((e=n==null?void 0:n.pages[n==null?void 0:n.page])===null||e===void 0?void 0:e.slides[0])||void 0}close(e,n){if(this.isClosing())return;const r=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",r,e),r.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());const o=()=>{this.proceedClose(e,n)};this.startedFs&&Ki&&Ki.isFullscreen()?Promise.resolve(Ki.exit()).then(()=>o()):o()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){const n=()=>{this.clearIdle(),this.idle=!0,Tt(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(e)n();else{const r=this.option("idle");r&&(this.idleTimer=setTimeout(n,r))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,En(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){Ki&&(Ki.isFullscreen()?Ki.exit():Ki.request().then(()=>{this.startedFs=!0}))}isClosing(){return[kr.Closing,kr.CustomClosing,kr.Destroy].includes(this.state)}proceedClose(e,n){var r,o;this.state=kr.Closing,this.clearIdle(),this.detachEvents();const d=this.container,p=this.carousel,c=this.getSlide(),b=c&&this.option("placeFocusBack")?c.triggerEl||this.option("triggerEl"):null;if(b&&($x(b)?jx(b):b.focus()),d&&(En(d,ag),Tt(d,"is-closing"),d.setAttribute(ig,"true"),this.option("animated")&&Tt(d,og),d.style.pointerEvents="none"),p){p.clearTransitions(),(r=p.panzoom)===null||r===void 0||r.destroy(),(o=p.plugins.Navigation)===null||o===void 0||o.detach();for(const k of p.slides){k.state=$r.Closing,this.hideLoading(k);const E=k.contentEl;E&&this.stop(E);const C=k==null?void 0:k.panzoom;C&&(C.stop(),C.detachEvents(),C.detachObserver()),this.isCurrentSlide(k)||p.emit("removeSlide",k)}}bv=window.scrollX,xv=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",e),this.state!==kr.CustomClosing?(n===void 0&&c&&(n=this.optionFor(c,"hideClass")),n&&c?(this.animate(c.contentEl,n,()=>{p&&p.emit("removeSlide",c)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var e;if(this.state===kr.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=kr.Destroy,(e=this.carousel)===null||e===void 0||e.destroy();const n=this.container;n&&n.remove(),Fl.delete(this.id);const r=un.getInstance();r?r.focus():(Ji&&(Ji.remove(),Ji=null),Ra&&(Ra.remove(),Ra=null),En(document.documentElement,dv),(()=>{if(!yd)return;const o=document,d=o.body;d.classList.remove(rg),d.style.setProperty(hv,""),o.documentElement.style.setProperty(uv,"")})(),this.emit("destroy"))}static bind(e,n,r){if(!yd)return;let o,d="",p={};if(e===void 0?o=document.body:Po(e)?(o=document.body,d=e,typeof n=="object"&&(p=n||{})):(o=e,Po(n)&&(d=n),typeof r=="object"&&(p=r||{})),!o||!mi(o))return;d=d||"[data-fancybox]";const c=un.openers.get(o)||new Map;c.set(d,p),un.openers.set(o,c),c.size===1&&o.addEventListener("click",un.fromEvent)}static unbind(e,n){let r,o="";if(Po(e)?(r=document.body,o=e):(r=e,Po(n)&&(o=n)),!r)return;const d=un.openers.get(r);d&&o&&d.delete(o),o&&d||(un.openers.delete(r),r.removeEventListener("click",un.fromEvent))}static destroy(){let e;for(;e=un.getInstance();)e.destroy();for(const n of un.openers.keys())n.removeEventListener("click",un.fromEvent);un.openers=new Map}static fromEvent(e){if(e.defaultPrevented||e.button&&e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey)return;let n=e.composedPath()[0];const r=n.closest("[data-fancybox-trigger]");if(r){const N=r.dataset.fancyboxTrigger||"",$=document.querySelectorAll(`[data-fancybox="${N}"]`),F=parseInt(r.dataset.fancyboxIndex||"",10)||0;n=$[F]||n}if(!(n&&n instanceof Element))return;let o,d,p,c;if([...un.openers].reverse().find(([N,$])=>!(!N.contains(n)||![...$].reverse().find(([F,q])=>{let J=n.closest(F);return!!J&&(o=N,d=F,p=J,c=q,!0)}))),!o||!d||!p)return;c=c||{},e.preventDefault(),n=p;let b=[],k=fi({},Jm,c);k.event=e,k.triggerEl=n,k.delegate=r;const E=k.groupAll,C=k.groupAttr,T=C&&n?n.getAttribute(`${C}`):"";if((!n||T||E)&&(b=[].slice.call(o.querySelectorAll(d))),n&&!E&&(b=T?b.filter(N=>N.getAttribute(`${C}`)===T):[n]),!b.length)return;const I=un.getInstance();return I&&I.options.triggerEl&&b.indexOf(I.options.triggerEl)>-1?void 0:(n&&(k.startIndex=b.indexOf(n)),un.fromNodes(b,k))}static fromSelector(e,n,r){let o=null,d="",p={};if(Po(e)?(o=document.body,d=e,typeof n=="object"&&(p=n||{})):e instanceof HTMLElement&&Po(n)&&(o=e,d=n,typeof r=="object"&&(p=r||{})),!o||!d)return!1;const c=un.openers.get(o);return!!c&&(p=fi({},c.get(d)||{},p),!!p&&un.fromNodes(Array.from(o.querySelectorAll(d)),p))}static fromNodes(e,n){n=fi({},Jm,n||{});const r=[];for(const o of e){const d=o.dataset||{},p=d[Ll]||o.getAttribute(lg)||o.getAttribute("currentSrc")||o.getAttribute(Ll)||void 0;let c;const b=n.delegate;let k;b&&r.length===n.startIndex&&(c=b instanceof HTMLImageElement?b:b.querySelector("img:not([aria-hidden])")),c||(c=o instanceof HTMLImageElement?o:o.querySelector("img:not([aria-hidden])")),c&&(k=c.currentSrc||c[Ll]||void 0,!k&&c.dataset&&(k=c.dataset.lazySrc||c.dataset[Ll]||void 0));const E={src:p,triggerEl:o,thumbEl:c,thumbElSrc:k,thumbSrc:k};for(const C in d){let T=d[C]+"";T=T!=="false"&&(T==="true"||T),E[C]=T}r.push(E)}return new un(r,n)}static getInstance(e){return e?Fl.get(e):Array.from(Fl.values()).reverse().find(n=>!n.isClosing()&&n)||null}static getSlide(){var e;return((e=un.getInstance())===null||e===void 0?void 0:e.getSlide())||null}static show(e=[],n={}){return new un(e,n)}static next(){const e=un.getInstance();e&&e.next()}static prev(){const e=un.getInstance();e&&e.prev()}static close(e=!0,...n){if(e)for(const r of Fl.values())r.close(...n);else{const r=un.getInstance();r&&r.close(...n)}}}Object.defineProperty(un,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(un,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Jm}),Object.defineProperty(un,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:pR}),Object.defineProperty(un,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map});const Wh=Object.freeze(Object.defineProperty({__proto__:null,Carousel:gd,Fancybox:un,Panzoom:Vl},Symbol.toStringTag,{value:"Module"})),{Fancybox:qh}=Wh,mR={props:{options:Object},mounted(){qh.defaults={...this.options||{}}},updated(){qh.close(),qh.defaults={...this.options||{}}},unmounted(){qh.close()}},gR={ref:"container"};function yR(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",gR,[a.renderSlot(t.$slots,"default")],512)}const _R=Oe(mR,[["render",yR]]),bR={},xR={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-file"};function vR(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",xR,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),a.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"},null,-1)]))}const vv=Oe(bR,[["render",vR]]),wR={componens:{IconFile:vv},props:{item:null},computed:{createDate(){try{const t=pt(this.item.cdate,"YYYY-MM-DD");return new Date(t).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}},methods:{formatBytes(t){if(t<1024)return`${t} B`;const e=t/1024;return e<1024?`${e.toFixed(2)} KB`:`${(e/1024).toFixed(2)} MB`}}},kR={class:"max-w-[55vw]"},ER={class:"text-sm font-semibold text-gray-800 truncate dark:text-neutral-200"},CR={class:"flex items-center text-xs text-gray-500 truncate dark:text-neutral-500"},SR={class:"px-[5px]"},TR={class:""};function AR(t,e,n,r,o,d){var p,c;return a.openBlock(),a.createElementBlock(a.Fragment,null,[e[1]||(e[1]=a.createStaticVNode('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>',1)),a.createElementVNode("div",kR,[a.createElementVNode("p",ER,a.toDisplayString(n.item.uploaded_name),1),a.createElementVNode("p",CR,[a.createElementVNode("span",null,a.toDisplayString(n.item.username),1),a.withDirectives(a.createElementVNode("span",SR,"|",512),[[a.vShow,(p=n.item)==null?void 0:p.username]]),a.createElementVNode("span",null,a.toDisplayString(d.createDate),1),e[0]||(e[0]=a.createElementVNode("span",{class:"px-[5px]"},"|",-1)),a.createElementVNode("span",TR,a.toDisplayString(d.formatBytes((c=n.item)==null?void 0:c.size)),1)])])],64)}const DR=Oe(wR,[["render",AR]]),MR={},IR={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function PR(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",IR,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),a.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),a.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const wv=Oe(MR,[["render",PR]]),RR={},NR={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-trash"};function BR(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",NR,e[0]||(e[0]=[a.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const kv=Oe(RR,[["render",BR]]),VR={components:{Fancybox:_R,VsWidgetFileInfo:DR,IconDownload:wv,IconTrash:kv},props:{item:null,prefix:{type:String,default:"/api"},disabled:{type:Boolean,default:!1}},data(){return{optionsFile:{defaultType:"iframe"}}},computed:{createDate(){try{const t=pt(this.item.cdate,"YYYY-MM-DD");return new Date(t).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}},methods:{isSupportedFile(t){return["pdf","json"].includes(t.ext)},isSupportedAllFile(t){return["ppt","pptx","doc","docx","xls","xlsx"].includes(t.ext)},async downloadFile(t){const e=document.createElement("a");e.setAttribute("download",t.uploaded_name),e.href=t.file_path,e.click()},confirnDeleteFile(){this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteFile,updateListOnConfirm:!0})},async deleteFile(){try{await Le.delete(`${this.prefix}/widget/file/${this.item.entity_id}/${this.item.file_id}`),this.$emit("update")}catch(t){console.error(t)}}}},zR={class:"p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full"},OR={key:0,class:"flex w-full gap-x-3 items-center"},LR=["href"],FR={key:1,class:"flex gap-x-3 w-full items-center"},$R=["href"],jR={key:2,class:"flex gap-x-3 w-full items-center"},UR=["href"],HR={key:3,class:"flex gap-x-3 w-full items-center"},WR={class:"lg:absolute lg:top-3 lg:end-1 opacity-100"},qR={class:"p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},GR={class:"inline-block"},ZR=["disabled"],YR={class:"inline-block"},XR=["disabled"];function KR(t,e,n,r,o,d){const p=a.resolveComponent("VsWidgetFileInfo"),c=a.resolveComponent("Fancybox"),b=a.resolveComponent("IconDownload"),k=a.resolveComponent("IconTrash");return a.openBlock(),a.createElementBlock("div",zR,[n.item.ext==="jpg"||n.item.ext==="png"?(a.openBlock(),a.createElementBlock("div",OR,[a.createVNode(c,null,{default:a.withCtx(()=>[a.createElementVNode("a",{"data-fancybox":"gallery",href:n.item.file_path,target:"_blank",class:"flex gap-x-3 w-full items-center"},[a.createVNode(p,{item:n.item},null,8,["item"])],8,LR)]),_:1})])):d.isSupportedFile(n.item)?(a.openBlock(),a.createElementBlock("div",FR,[a.createVNode(c,{options:o.optionsFile},{default:a.withCtx(()=>[a.createElementVNode("a",{"data-fancybox":"gallery",href:n.item.file_path,target:"_blank",class:"flex gap-x-3 w-full items-center"},[a.createVNode(p,{item:n.item},null,8,["item"])],8,$R)]),_:1},8,["options"])])):d.isSupportedAllFile(n.item)?(a.openBlock(),a.createElementBlock("div",jR,[a.createVNode(c,{options:o.optionsFile},{default:a.withCtx(()=>[a.createElementVNode("a",{"data-fancybox":"gallery",href:`/api/file-preview?id=${n.item.file_id}.pdf`,target:"_blank",class:"flex gap-x-3 w-full items-center"},[a.createVNode(p,{item:n.item},null,8,["item"])],8,UR)]),_:1},8,["options"])])):(a.openBlock(),a.createElementBlock("div",HR,[a.createVNode(p,{item:n.item},null,8,["item"])])),a.createElementVNode("div",WR,[a.createElementVNode("div",qR,[a.createElementVNode("div",GR,[a.createElementVNode("button",{class:"inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[0]||(e[0]=E=>d.downloadFile(n.item)),disabled:n.disabled},[a.createVNode(b,{height:"14",width:"14"})],8,ZR)]),e[2]||(e[2]=a.createElementVNode("div",{class:"w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700"},null,-1)),a.createElementVNode("div",YR,[a.createElementVNode("button",{type:"button",class:"size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",onClick:e[1]||(e[1]=E=>d.confirnDeleteFile()),disabled:n.disabled},[a.createVNode(k,{height:"14",width:"14"})],8,XR)])])])])}const JR=Oe(VR,[["render",KR]]),QR={props:["text"]},eN={class:"pl-3 text-sm font-medium text-gray-600"};function tN(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("p",eN,a.toDisplayString(n.text),1)])}const Ev=Oe(QR,[["render",tN]]),nN={},rN={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-upload"};function iN(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",rN,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),a.createElementVNode("path",{d:"M7 9l5 -5l5 5"},null,-1),a.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const sN=Oe(nN,[["render",iN]]),{Fancybox:oN}=Wh,aN={components:{VsWidgetFileItem:JR,VsEmptyWidget:Ev,IconUpload:sN},props:{id:{type:String,default(){return""}},prefilledData:{},prefix:{type:String,default:"/api"},disabled:{type:Boolean,default:!1}},data(){return{isModalVisible:!1,modal:{},files:"",searchValue:""}},mounted(){this.getFileList()},computed:{filteredFiles(){return this.searchValue===""?this.files:this.files.filter(e=>e.uploaded_name.includes(this.searchValue))}},methods:{async getFileList(){if(this.prefilledData){this.files=this.prefilledData.rows;return}try{const{data:t}=await Le.get(`${this.prefix}/widget/file/${this.id}`);oN.bind("[data-fancybox='gallery']"),this.files=t==null?void 0:t.rows}catch(t){console.error(t)}},async addFile(t){console.log(t),await Promise.all(Array.from(t.target.files).map(async e=>{const n=new FormData;n.append("file",e);try{const r=`${this.prefix}/widget/file/${this.id}`;return await Le.post(r,n),this.$emit("update","file-list"),e}catch(r){return console.error(r),null}})),await this.getFileList()},prepareModal(t){const e={...t};return t.cancel||(e.cancel=()=>{this.isModalVisible=!1}),t.updateListOnConfirm&&(e.confirm=async()=>{await t.confirm(),this.isModalVisible=!1,this.getFileList()}),e},handleOpenModal(t){this.modal=this.prepareModal(t),this.isModalVisible=!0}}},lN={class:"flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700"},cN={class:"flex w-full mb-[12px] items-center gap-x-2"},dN={class:"font-semibold text-gray-800 dark:text-neutral-200 text-[14px]"},uN={class1:"ml-auto"},hN={key:0,class:"py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"},pN={class:"relative"},fN={key:1,class:"space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},mN={key:0},gN={class:"p-4"},yN={class:"mt-1 text-gray-500 dark:text-neutral-500"},_N={class:"flex justify-end mt-4 gap-x-3"};function bN(t,e,n,r,o,d){var k,E;const p=a.resolveComponent("IconUpload"),c=a.resolveComponent("VsWidgetFileItem"),b=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock("div",lN,[a.createElementVNode("div",cN,[a.createElementVNode("h2",dN," Файлів: "+a.toDisplayString(o.files.length),1),a.createElementVNode("div",uN,[a.createElementVNode("label",null,[a.createElementVNode("input",{type:"file",class:"hidden",onChange:e[0]||(e[0]=C=>d.addFile(C))},null,32),a.createElementVNode("div",{class:a.normalizeClass(["py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",{hidden:n.disabled}])},[a.createVNode(p,{height:"16",width:"16"})],2)])])]),((k=o.files)==null?void 0:k.length)>4?(a.openBlock(),a.createElementBlock("div",hN,[a.createElementVNode("div",null,[a.createElementVNode("div",pN,[e[7]||(e[7]=a.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5"},[a.createElementVNode("svg",{class:"flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),a.createElementVNode("path",{d:"m21 21-4.3-4.3"})])],-1)),a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":e[1]||(e[1]=C=>o.searchValue=C),class:"py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Введіть назву файлу"},null,512),[[a.vModelText,o.searchValue,void 0,{trim:!0}]])])])])):a.createCommentVNode("",!0),(E=o.files)!=null&&E.length?(a.openBlock(),a.createElementBlock("div",fN,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.filteredFiles,(C,T)=>(a.openBlock(),a.createBlock(c,{key:T,id:n.id,prefix:n.prefix,item:C,disabled:n.disabled,onUpdate:e[2]||(e[2]=I=>t.$emit("update","file-list")),onOpenModal:e[3]||(e[3]=I=>d.handleOpenModal(I))},null,8,["id","prefix","item","disabled"]))),128)),d.filteredFiles.length?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",mN,e[8]||(e[8]=[a.createElementVNode("p",{class:"text-sm text-gray-600 font-sm"}," Файлів з такою назвою не існує, введіть інше пошукове слово ",-1)])))])):a.createCommentVNode("",!0),a.createVNode(b,{title:o.modal.title,size:"small",visible:o.isModalVisible,"onUpdate:visible":e[6]||(e[6]=C=>o.isModalVisible=C)},{default:a.withCtx(()=>[a.createElementVNode("div",gN,[a.createElementVNode("p",yN,a.toDisplayString(o.modal.message),1),a.createElementVNode("div",_N,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=(...C)=>o.modal.cancel&&o.modal.cancel(...C))},a.toDisplayString(o.modal.cancelButtonText),1),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[5]||(e[5]=(...C)=>o.modal.confirm&&o.modal.confirm(...C))},a.toDisplayString(o.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const Cv=Oe(aN,[["render",bN]]),xN={},vN={class:"w-16 text-gray-400 mx-auto dark:text-neutral-400",width:"70",height:"46",viewBox:"0 0 70 46",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wN(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",vN,e[0]||(e[0]=[a.createStaticVNode('<path d="M6.05172 9.36853L17.2131 7.5083V41.3608L12.3018 42.3947C9.01306 43.0871 5.79705 40.9434 5.17081 37.6414L1.14319 16.4049C0.515988 13.0978 2.73148 9.92191 6.05172 9.36853Z" fill="currentColor" stroke="currentColor" stroke-width="2" class="fill-white stroke-gray-400 dark:fill-neutral-800 dark:stroke-neutral-500"></path><path d="M63.9483 9.36853L52.7869 7.5083V41.3608L57.6982 42.3947C60.9869 43.0871 64.203 40.9434 64.8292 37.6414L68.8568 16.4049C69.484 13.0978 67.2685 9.92191 63.9483 9.36853Z" fill="currentColor" stroke="currentColor" stroke-width="2" class="fill-white stroke-gray-400 dark:fill-neutral-800 dark:stroke-neutral-500"></path><rect x="17.0656" y="1.62305" width="35.8689" height="42.7541" rx="5" fill="currentColor" stroke="currentColor" stroke-width="2" class="fill-white stroke-gray-400 dark:fill-neutral-800 dark:stroke-neutral-500"></rect><path d="M47.9344 44.3772H22.0655C19.3041 44.3772 17.0656 42.1386 17.0656 39.3772L17.0656 35.9161L29.4724 22.7682L38.9825 33.7121C39.7832 34.6335 41.2154 34.629 42.0102 33.7025L47.2456 27.5996L52.9344 33.7209V39.3772C52.9344 42.1386 50.6958 44.3772 47.9344 44.3772Z" stroke="currentColor" stroke-width="2" class="stroke-gray-400 dark:stroke-neutral-500"></path><circle cx="39.5902" cy="14.9672" r="4.16393" stroke="currentColor" stroke-width="2" class="stroke-gray-400 dark:stroke-neutral-500"></circle>',5)]))}const kN=Oe(xN,[["render",wN]]),EN={class:"cursor-pointer"},CN={class:"flex flex-col gap-0"},SN={class:"!mt-[4px] text-xs text-center text-stone-400 dark:text-neutral-400"},TN=["accept"],AN=Oe({__name:"vs-widget-gallery-dropzone",props:{accept:{type:Array,default:()=>[".tiff",".jpg",".jpeg",".png",".svg",".ico",".webp"]}},emits:["file:upload"],setup(t,{emit:e}){const n=t,{$notify:r}=a.getCurrentInstance().proxy,o=a.ref(null),d=a.ref(!1),p=a.computed(()=>{var N,$,F;return(N=n.accept)!=null&&N.length?(F=($=n.accept)==null?void 0:$.map(q=>{var J;return(J=q==null?void 0:q.replace(".",""))==null?void 0:J.toUpperCase()}))==null?void 0:F.join(", "):"Приймаються всі типи файлів"}),c=e,b=()=>{o.value.click()},k=async N=>{N?c("file:upload",N):r({type:"error",title:"Помилка!",message:"При спробі завантаження файлу виникла помилка"})},E=N=>{const $=N.target.files;$&&k($)},C=N=>{const $=N.dataTransfer.files;d.value=!1,$&&k($)},T=()=>{d.value=!0},I=()=>{d.value=!1};return(N,$)=>{var F;return a.openBlock(),a.createElementBlock("div",EN,[a.createElementVNode("div",{class:a.normalizeClass(["vs-form-dropzone border border-dashed rounded-xl p-[48px] flex items-center justify-center duration-300 hover:border-blue-600 hover:bg-blue-50",d.value?"border-blue-600 bg-blue-50":"border-gray-200"]),onDragover:a.withModifiers(T,["prevent"]),onDragleave:I,onDrop:a.withModifiers(C,["prevent"]),onClick:b},[a.createElementVNode("div",CN,[a.createVNode(kN),$[0]||($[0]=a.createElementVNode("p",{class:"font-medium text-gray-800 text-center mt-[16px] !mb-0"}," Додати фото ",-1)),a.createElementVNode("p",SN,a.toDisplayString(p.value),1)])],34),a.createElementVNode("input",{ref_key:"fileInput",ref:o,type:"file",class:"hidden",accept:(F=t.accept)==null?void 0:F.join(","),onChange:E,multiple:""},null,40,TN)])}}},[["__scopeId","data-v-1de800aa"]]),DN={class:"flex items-center gap-x-2 mb-[16px]"},MN={class:"inline-block shrink-0 font-semibold text-gray-800 dark:text-neutral-200"},IN={class:"flex items-center w-full justify-end gap-x-2"},PN=["accept"],RN=["onDragstart","onDrop"],NN={key:0,class:"absolute right-[5px] top-[5px] bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"},BN=["href","data-caption"],VN=["src","alt"],zN={class:"item__text-content bg-white opacity-0 rounded-b-lg absolute w-full bottom-0 p-3 flex gap-2.5 items-center justify-between"},ON={class:"text-xs w-[180px] block overflow-hidden text-nowrap overflow-ellipsis"},LN={class:"flex flex-wrap items-center text-xs text-gray-600 widget-images__item-desc"},FN={class:"flex items-center"},$N={class:"text-xs"},jN=["onClick"],UN=["onClick"],HN=["onClick"],WN={class:"p-4"},qN={class:"mt-1 text-gray-500 dark:text-neutral-500"},GN={class:"flex justify-end mt-4 gap-x-3"},ZN={__name:"vs-widget-gallery",props:{id:{type:String,default:""},readonly:{type:Boolean,default:!1},prefilledData:{type:Array,default:()=>[]},limit:{type:Number,default:10},prefix:{type:String,default:"/api"}},setup(t){const{Fancybox:e}=Wh,{$notify:n}=a.getCurrentInstance().proxy,r=t,o=a.ref([]),d=a.ref(!1),p=a.ref(null),c=a.ref({}),b=[".tiff",".jpg",".jpeg",".png",".svg",".ico",".webp"],k=async()=>{var Be,Ze,tt;if((Be=r==null?void 0:r.prefilledData)!=null&&Be.length){o.value=r.prefilledData,e.bind("[data-fancybox='gallery']");return}try{const{data:Xe}=await Le.get(`${r.prefix}/widget/gallery/${r==null?void 0:r.id}`);o.value=[(Ze=Xe==null?void 0:Xe.rows)==null?void 0:Ze.find(ot=>ot==null?void 0:ot.ismain),...((tt=Xe==null?void 0:Xe.rows)==null?void 0:tt.filter(ot=>!(ot!=null&&ot.ismain)))||[]].filter(ot=>ot),e.bind("[data-fancybox='gallery']")}catch(Xe){console.error(Xe)}},E=async Be=>{var Xe,ot,ue,Ut;if(((Xe=o.value)==null?void 0:Xe.length)+((ue=Array.from((ot=Be.target)==null?void 0:ot.files))==null?void 0:ue.length)>r.limit){n({type:"error",title:"Помилка!",message:"Встановлено ліміт на кількість, - "+r.limit});return}const Ze=Array.from((Ut=Be.target)==null?void 0:Ut.files);if(!Ze.every(wt=>{var $t,an;return b==null?void 0:b.includes("."+((an=($t=wt.name.split("."))==null?void 0:$t.pop())==null?void 0:an.toLowerCase()))})){n({type:"error",title:"Помилка!",message:"Доступні формати: "+b.join(", ")});return}await Promise.all(Ze.map(async wt=>{const $t=new FormData;$t.append("file",wt);try{await Le.post(`${r.prefix}/widget/gallery/${r==null?void 0:r.id}`,$t)}catch(an){console.error(an)}})),await k()},C=Be=>{const Ze=document.createElement("a");Ze.setAttribute("download",Be==null?void 0:Be.uploaded_name),Ze.href=Be==null?void 0:Be.file_path,Ze.click()},T=async(Be,Ze)=>{try{await Le.post(`${r.prefix}/widget/gallery/${Be}/${Ze}`,{ismain:!0}),await k()}catch(tt){console.error(tt)}},I=Be=>{p.value=Be,c.value={title:"Ви впевнені?",message:"Ви впевнені що хочете видалити зображення?",confirmButtonText:"Так, видалити ",cancelButtonText:"Відмінити",confirm:async()=>{var Ze,tt,Xe;await N(),d.value=!1,await k(),(Ze=o.value)!=null&&Ze[0]&&!((Xe=(tt=o.value)==null?void 0:tt[0])!=null&&Xe.ismain)&&setTimeout(()=>{var ot,ue,Ut,wt;return T((ue=(ot=o.value)==null?void 0:ot[0])==null?void 0:ue.entity_id,(wt=(Ut=o.value)==null?void 0:Ut[0])==null?void 0:wt.file_id)})},cancel:()=>{d.value=!1}},d.value=!0},N=async()=>{var Be,Ze;try{await Le.delete(`${r.prefix}/widget/gallery/${(Be=p.value)==null?void 0:Be.entity_id}/${(Ze=p.value)==null?void 0:Ze.file_id}`)}catch(tt){console.error(tt)}},$=(Be,Ze=2)=>{if(Be===0)return"0 Bytes";const tt=1024,Xe=Ze<0?0:Ze,ot=["Bytes","KB","MB","GB","TB"],ue=Math.floor(Math.log(Be)/Math.log(tt));return`${parseFloat((Be/tt**ue).toFixed(Xe))} ${ot[ue]}`},F=Be=>{const Ze={day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"};return new Date(Be).toLocaleDateString("uk-UA",Ze)},q=a.ref(null),J=a.ref(0),Q=()=>{var Be;J.value=((Be=q.value)==null?void 0:Be.offsetWidth)||0},me=a.computed(()=>{const Be=[...o.value],Ze={isDropzone:!0},tt=Math.floor(J.value/316)||1,Xe=Math.min(tt-1,Be.length);return Be.splice(Xe,0,Ze),Be}),ke=a.ref(null),Re=Be=>{ke.value=Be},Ee=Be=>o.value.findIndex(Ze=>Ze.file_path===Be.file_path),Ve=Be=>{if(Be===0){const Ze=ke.value;if(Ze===null||Ze===Be)return;const Xe=me.value.filter(ot=>!ot.isDropzone)[Ze];if(!Xe)return;o.value.splice(Ze,1),o.value.splice(Be,0,Xe),ke.value=null,setTimeout(()=>{var ot,ue,Ut,wt;return T((ue=(ot=o.value)==null?void 0:ot[0])==null?void 0:ue.entity_id,(wt=(Ut=o.value)==null?void 0:Ut[0])==null?void 0:wt.file_id)})}};return a.onMounted(()=>{k(),Q(),window.addEventListener("resize",Q),addEventListener("reloadCardPage",k)}),a.onUnmounted(()=>{removeEventListener("reloadCardPage",k)}),a.watch(()=>r.id,k),a.watch(o,Q),(Be,Ze)=>{const tt=a.resolveComponent("VsConfirm");return a.openBlock(),a.createElementBlock("div",{ref_key:"galleryContainer",ref:q,class:"flex flex-col vs-widget-images xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700"},[a.createElementVNode("div",DN,[a.createElementVNode("h2",MN," Світлин: "+a.toDisplayString(o.value.length)+" (ліміт - "+a.toDisplayString(t.limit)+") ",1),a.createElementVNode("div",IN,[a.createElementVNode("div",null,[a.createElementVNode("label",null,[a.createElementVNode("input",{type:"file",class:"hidden",onChange:E,accept:b.join(","),multiple:""},null,40,PN),Ze[5]||(Ze[5]=a.createStaticVNode('<span type="button" class="py-2 px-2.5 cursor-pointer inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-stone-200 bg-white text-stone-800 shadow-2xs hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-stone-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"></path><path d="M12 12v9"></path><path d="m16 16-4-4-4 4"></path></svg> Завантажити </span>',1))])])])]),a.createVNode(a.TransitionGroup,{name:"gallery",tag:"div",class:"flex flex-wrap gap-[16px]"},{default:a.withCtx(()=>[a.createVNode(AN,{"onFile:upload":Ze[0]||(Ze[0]=Xe=>E({target:{files:Xe}})),class:"h-[200px] w-[300px]"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.value,(Xe,ot)=>(a.openBlock(),a.createElementBlock("div",{key:Xe.file_path||"dz-"+ot,draggable:"true",onDragstart:ue=>Re(Ee(Xe)),onDragover:Ze[1]||(Ze[1]=a.withModifiers(()=>{},["prevent"])),onDrop:ue=>Ve(Ee(Xe)),class:"relative cursor-pointer rounded-b-lg item hover:shadow-lg shrink-0 h-[200px] w-[300px]"},[Xe!=null&&Xe.ismain?(a.openBlock(),a.createElementBlock("span",NN,"Головне")):a.createCommentVNode("",!0),a.createElementVNode("a",{href:Xe.file_path,"data-fancybox":"gallery","data-caption":Xe.uploaded_name,target:"_blank"},[a.createElementVNode("img",{class:"object-cover w-full h-full rounded-lg",src:Xe.file_path||"/icons/no-image.jpg",alt:Xe.uploaded_name},null,8,VN),a.createElementVNode("div",zN,[a.createElementVNode("div",null,[a.createElementVNode("span",ON,a.toDisplayString(Xe.uploaded_name),1),a.createElementVNode("div",LN,[a.createElementVNode("span",FN,a.toDisplayString($(Xe.size)),1),a.createElementVNode("span",null,a.toDisplayString(F(Xe.cdate)),1)]),a.createElementVNode("span",$N,a.toDisplayString(Xe.username),1),Xe!=null&&Xe.ismain?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"text-xs underline",onClick:a.withModifiers(ue=>T(Xe==null?void 0:Xe.entity_id,Xe==null?void 0:Xe.file_id),["prevent"])}," Зробити головним ",8,jN))]),a.createElementVNode("div",null,[a.createElementVNode("div",{class:"flex items-center justify-center gap-2 hover:bg-gray-200 p-[6px] rounded",onClick:a.withModifiers(ue=>C(Xe),["prevent"])},[a.createVNode(wv,{height:"14",width:"14"})],8,UN),a.createElementVNode("div",{class:"flex items-center gap-2 hover:bg-gray-200 p-[6px] rounded hover:cursor-pointer",onClick:a.withModifiers(ue=>I(Xe),["prevent"])},[a.createVNode(kv,{height:"14",width:"14"})],8,HN)])])],8,BN)],40,RN))),128))]),_:1}),a.createVNode(tt,{title:c.value.title,size:"small",visible:d.value,"onUpdate:visible":Ze[4]||(Ze[4]=Xe=>d.value=Xe)},{default:a.withCtx(()=>[a.createElementVNode("div",WN,[a.createElementVNode("p",qN,a.toDisplayString(c.value.message),1),a.createElementVNode("div",GN,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700",onClick:Ze[2]||(Ze[2]=(...Xe)=>c.value.cancel&&c.value.cancel(...Xe))},a.toDisplayString(c.value.cancelButtonText),1),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600",onClick:Ze[3]||(Ze[3]=(...Xe)=>c.value.confirm&&c.value.confirm(...Xe))},a.toDisplayString(c.value.confirmButtonText),1)])])]),_:1},8,["title","visible"])],512)}}},YN={props:{comment:{type:Object,default:()=>({})},user:{type:Object,default:()=>({})},id:{type:String,default:""},options:Array},data(){return{commentContent:this.comment.body,isCommentActionVisible:!1,isOpen:!1,hovered:!1,windowWidth:null,textareaValue:""}},computed:{isElementVisible(){return this.windowWidth>=600?this.hovered:!0},isUserAutor(){return this.user.uid===this.comment.uid},createDate(){try{const t=new Date(this.comment.cdate);return new Intl.DateTimeFormat("uk-UA",{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(t)}catch{return""}}},mounted(){window.addEventListener("resize",this.updateWindowWidth)},beforeDestroy(){window.removeEventListener("resize",this.updateWindowWidth)},watch:{isOpen(t){t&&(this.textareaValue=this.comment.body)}},methods:{updateWindowWidth(){this.windowWidth=typeof window>"u"?null:window==null?void 0:window.innerWidth},confirnDeleteComment(){document.body.click(),this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей коментар?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteComment,updateListOnConfirm:!0})},async updateComment(){try{await Le.post(`/api/widget/comment/${this.id}/${this.comment.communication_id}`,{body:this.textareaValue}),this.$emit("list-update"),this.isOpen=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},openEditModal(){document.body.click(),this.isOpen=!0},async deleteComment(){try{await Le.delete(`/api/widget/comment/${this.id}/${this.comment.communication_id}`),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},toggleCommentAction(){this.isCommentActionVisible=!this.isCommentActionVisible}}},XN={class:"relativen group-last:after:hidden after:absolute after:top-7 after:bottom-1 after:start-3 after:w-px after:-translate-x-[0.5px] after:bg-gray-200 dark:after:bg-neutral-700"},KN={class:"relative flex items-center justify-center overflow-hidden rounded-full size-6"},JN=["src"],QN={key:1,class:"flex shrink-0 justify-center items-center size-[38px] border border-gray-200 text-sm font-semibold uppercase text-gray-800 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-400"},eB={class:"w-full"},tB={class:"flex w-full justify-between -mt-[5px]"},nB={class:"flex items-center"},rB={class:"text-sm font-semibold text-gray-800 dark:text-neutral-200"},iB={class:"text-xs text-gray-400 ms-1 dark:text-neutral-500"},sB={class:"min-h-[32px]"},oB={class:"p-0.5 inline-flex items-center gap-x-0.5 bg-white border border-gray-200 shadow-sm rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},aB=["innerHTML"],lB={class:"flex flex-col gap-[8px] p-[10px] text-sm font-medium text-gray-500"},cB={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function dB(t,e,n,r,o,d){var b,k;const p=a.resolveComponent("VsTiptapEditor"),c=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:"group relative w-full flex gap-x-3.5",onMouseenter:e[2]||(e[2]=E=>o.hovered=!0),onMouseleave:e[3]||(e[3]=E=>o.hovered=!1)},[a.createElementVNode("div",XN,[a.createElementVNode("div",KN,[n.comment.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,class:"object-cover shrink-0",src:n.comment.avatar,alt:"Avatar"},null,8,JN)):(a.openBlock(),a.createElementBlock("span",QN,a.toDisplayString((b=n.comment.username)==null?void 0:b.charAt(0)),1))])]),a.createElementVNode("div",eB,[a.createElementVNode("span",tB,[a.createElementVNode("div",nB,[a.createElementVNode("span",rB,a.toDisplayString((k=n.comment)==null?void 0:k.username),1),a.createElementVNode("span",iB,a.toDisplayString(d.createDate),1)]),a.createElementVNode("div",sB,[a.withDirectives(a.createElementVNode("div",oB,[a.createElementVNode("div",{class:"inline-block",onClick:e[0]||(e[0]=E=>d.openEditModal())},e[8]||(e[8]=[a.createStaticVNode('<button type="button" class="hs-tooltip-toggle size-[26px] inline-flex justify-center items-center gap-x-1 text-xs font-medium rounded-md border border-transparent bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:bg-neutral-800 dark:border-transparent dark:text-neutral-500 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg><span class="sr-only">Edit message</span></button>',1),a.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg whitespace-nowrap dark:bg-neutral-700",role:"tooltip"}," Edit message ",-1)])),a.createElementVNode("div",{class:"inline-block",onClick:e[1]||(e[1]=E=>d.confirnDeleteComment())},e[9]||(e[9]=[a.createStaticVNode('<button type="button" class="hs-tooltip-toggle size-[26px] inline-flex justify-center items-center gap-x-1 text-xs font-medium rounded-md border border-transparent bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:bg-neutral-800 dark:border-transparent dark:text-neutral-500 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg><span class="sr-only">Delete message</span></button>',1),a.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg whitespace-nowrap dark:bg-neutral-700",role:"tooltip"}," Delete message ",-1)]))],512),[[a.vShow,d.isElementVisible]])])]),a.createElementVNode("p",{class:"mt-1 text-sm text-gray-800 comment-body dark:text-neutral-200",innerHTML:n.comment.body},null,8,aB)])],32),a.createVNode(c,{visible:o.isOpen,"onUpdate:visible":e[7]||(e[7]=E=>o.isOpen=E),title:"Редагувати",size:"small"},{footer:a.withCtx(()=>[a.createElementVNode("div",cB,[a.createElementVNode("button",{onClick:e[5]||(e[5]=E=>o.isOpen=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:e[6]||(e[6]=(...E)=>d.updateComment&&d.updateComment(...E)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:a.withCtx(()=>[a.createElementVNode("div",lB,[a.createVNode(p,{modelValue:o.textareaValue,"onUpdate:modelValue":e[4]||(e[4]=E=>o.textareaValue=E),options:n.options},null,8,["modelValue","options"])])]),_:1},8,["visible"])],64)}const uB={components:{VsWidgetCommentsItem:Oe(YN,[["render",dB]])},inject:["activeAddFormEditor"],props:{id:{type:String,default:()=>""},prefilledData:{type:Object,default:null},options:Array},data(){return{isLoaded:!1,isLoadFailed:!1,comments:[],user:{},modal:{title:"",message:"",cancel:"",confirm:"",cancelButtonText:"",confirmButtonText:""},isModalVisible:!1}},async created(){await this.getComments()},methods:{async getComments(){if(this.prefilledData){this.comments=this.prefilledData.rows,this.isLoaded=!0;return}try{const{data:t}=await Le.get(`/api/widget/comment/${this.id}`);this.comments=t.rows,this.user=t.user}catch(t){this.isLoadFailed=!0,console.error(t)}this.isLoaded=!0,this.$emit("update-comment-count")},prepareModal(t){const e={...t};return t.cancel||(e.cancel=()=>{this.isModalVisible=!1}),t.updateListOnConfirm&&(e.confirm=async()=>{await t.confirm(),this.isModalVisible=!1}),e},handleOpenModal(t){this.modal=this.prepareModal(t),this.isModalVisible=!0}}},hB={class:"flex flex-col"},pB={key:0,class:"max-h-[300px] p-[10px] overflow-y-auto overflow-x-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},fB={class:"p-4"},mB={class:"mt-1 text-gray-500 dark:text-neutral-500"},gB={class:"mt-4 flex justify-end gap-x-3"};function yB(t,e,n,r,o,d){var E;const p=a.resolveComponent("VsErrorOnLoading"),c=a.resolveComponent("VsWidgetCommentsItem"),b=a.resolveComponent("VsLoader"),k=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock("div",hB,[o.isLoaded?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[o.isLoadFailed?(a.openBlock(),a.createBlock(p,{key:0})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[(E=o.comments)!=null&&E.length?(a.openBlock(),a.createElementBlock("div",pB,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.comments,(C,T)=>(a.openBlock(),a.createElementBlock("div",{class:"pb-8 last:pb-0",key:T},[a.createVNode(c,{comment:C,user:o.user,options:n.options,index:T,id:n.id,onListUpdate:d.getComments,onOpenModal:e[0]||(e[0]=I=>d.handleOpenModal(I))},null,8,["comment","user","options","index","id","onListUpdate"])]))),128))])):a.createCommentVNode("",!0)],64))],64)):(a.openBlock(),a.createBlock(b,{key:1,class:"justify-center",text:"Please wait..."})),a.createVNode(k,{title:o.modal.title,size:"small",visible:o.isModalVisible,"onUpdate:visible":e[3]||(e[3]=C=>o.isModalVisible=C)},{default:a.withCtx(()=>[a.createElementVNode("div",fB,[a.createElementVNode("p",mB,a.toDisplayString(o.modal.message),1),a.createElementVNode("div",gB,[a.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[1]||(e[1]=(...C)=>o.modal.cancel&&o.modal.cancel(...C))},a.toDisplayString(o.modal.cancelButtonText),1),a.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[2]||(e[2]=(...C)=>o.modal.confirm&&o.modal.confirm(...C))},a.toDisplayString(o.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const _B=Oe(uB,[["render",yB]]),bB={props:{id:{type:String,default:()=>""},autofocus:{type:Boolean,default:()=>!0},options:Array},data(){return{isEditorOpen:!1,commentContent:""}},methods:{async addNewComment(){if(this.commentContent)try{await Le.post(`/api/widget/comment/${this.id}`,{body:this.commentContent}),this.closeEditor(),this.$emit("list-update")}catch(t){console.error(t)}},closeEditor(){this.isEditorOpen=!1,this.commentContent=""},handleKeydown(t){t.ctrlKey&&t.key==="Enter"&&this.addNewComment()}}},xB={class:"flex flex-col items-start w-full widget-comment-form"},vB={class:"w-full mb-4 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700"},wB={key:0,class:"flex gap-[10px]"};function kB(t,e,n,r,o,d){const p=a.resolveComponent("VsTiptapEditor");return a.openBlock(),a.createElementBlock("div",xB,[a.createElementVNode("div",vB,[a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[o.isEditorOpen?(a.openBlock(),a.createBlock(p,{key:0,modelValue:o.commentContent,"onUpdate:modelValue":e[0]||(e[0]=c=>o.commentContent=c),options:n.options,onKeydown:d.handleKeydown},null,8,["modelValue","options","onKeydown"])):a.createCommentVNode("",!0)]),_:1}),o.isEditorOpen?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,onClick:e[1]||(e[1]=c=>o.isEditorOpen=!0),class:"border flex items-center pl-[20px] border-gray-200 rounded-lg h-[40px] hover:bg-gray-50 text-gray-500 duration-300 hover:text-gray-900"}," Додати коментар... "))]),o.isEditorOpen?(a.openBlock(),a.createElementBlock("div",wB,[a.createElementVNode("button",{ref:"buttonAdd",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:e[2]||(e[2]=(...c)=>d.addNewComment&&d.addNewComment(...c))}," Відправити коментар ",512),a.createElementVNode("button",{onClick:e[3]||(e[3]=(...c)=>d.closeEditor&&d.closeEditor(...c)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-black duration-300 border rounded-lg gap-x-2 hover:bg-gray-100"}," Скасувати ")])):a.createCommentVNode("",!0)])}const EB={components:{VsWidgetCommentsList:_B,VsWidgetCommentsAddForm:Oe(bB,[["render",kB]])},props:{id:{type:String,default(){return""}},prefilledData:{type:Object,default:null}},data(){return{activeAddFormEditor:"",comments:[],totalComment:"0",options:[]}},mounted(){this.comments=this.$refs.commentListRef.comments,this.getUsersList()},watch:{comments(t){this.$emit("count-change",t.length)}},methods:{async getUsersList(){try{const{data:t}=await Le.get("/api/suggest/core.user_mentioned");this.options=t}catch(t){console.log(t)}},listUpdate(){this.$refs.commentListRef.getComments()},updateCommentCount(){this.totalComment=this.$refs.commentListRef.comments.length||"0"}}},CB={class:"w-full bg-white-200"};function SB(t,e,n,r,o,d){const p=a.resolveComponent("VsWidgetCommentsAddForm"),c=a.resolveComponent("VsWidgetCommentsList");return a.openBlock(),a.createElementBlock("div",CB,[e[2]||(e[2]=a.createElementVNode("div",{class:"flex items-center justify-between w-full mb-4 gap-x-2"},null,-1)),a.createVNode(p,{options:o.options,id:n.id,onListUpdate:e[0]||(e[0]=b=>d.listUpdate())},null,8,["options","id"]),a.createVNode(c,{options:o.options,id:n.id,onUpdateCommentCount:e[1]||(e[1]=b=>d.updateCommentCount()),"prefilled-data":n.prefilledData,ref:"commentListRef"},null,8,["options","id","prefilled-data"])])}const Sv=Oe(EB,[["render",SB]]),Tv=t=>new Date(t).toLocaleDateString("uk-UK",{day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}),TB=t=>new Date(t).toLocaleDateString("uk-UK",{day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}),AB={},DB={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-user"};function MB(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",DB,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"},null,-1),a.createElementVNode("path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"},null,-1)]))}const Av=Oe(AB,[["render",MB]]),IB=t=>{const e=/(\b\S)?/g,n=t.match(e);return n?n.join("").toUpperCase():""},PB=a.defineComponent({props:{username:{type:String,default:()=>""}},components:{IconUserOutline:Av},computed:{inItials(){return IB(this.username||"u")}}}),RB={class:"flex shrink-0 bg-white justify-center items-center size-[38px] border border-gray-200 text-sm font-semibold uppercase text-gray-800 rounded-full"},NB={key:0};function BB(t,e,n,r,o,d){const p=a.resolveComponent("IconUserOutline");return a.openBlock(),a.createElementBlock("div",RB,[t.inItials?(a.openBlock(),a.createElementBlock("span",NB,a.toDisplayString(t.inItials),1)):(a.openBlock(),a.createBlock(p,{key:1,class:"w-[16px] h-[16px]"}))])}const VB=Oe(PB,[["render",BB]]),cg={load(){try{const t=Array.from(arguments);window.headLoadedFiles||(window.headLoadedFiles=[]);const e=typeof arguments[arguments.length-1]=="function"?arguments[arguments.length-1]:null,n=t.filter(r=>typeof r!="function").reduce((r,o)=>r.concat(o),[]).filter(r=>r&&!window.headLoadedFiles[r.url||r.split("?")[0]]);Promise.all(n.map(r=>this.loadFile1(r))).then(()=>{e&&e()})}catch(t){console.log(t)}},promise(t){return new Promise((e,n)=>{cg.load(t,()=>{e()})})},loadFile1(t){let e=!1;typeof t=="object"&&(e=t.type,t=t.url);const n=t.split("?")[0];return new Promise((r,o)=>{function d(c){delete window.headLoadedFiles[`_${n}`],window.headLoadedFiles[n]=c.type,r(c.type)}let p;window.headLoadedFiles[`_${n}`]?p=window.headLoadedFiles[`_${n}`]:(n.includes(".css")?(p=document.createElement("link"),p.href=t,p.type="text/css",p.rel="stylesheet"):(p=document.createElement("script"),p.type="text/javascript",p.src=t,e&&(p.type=e)),window.headLoadedFiles[`_${n}`]=p,document.head.appendChild(p)),p.addEventListener("load",d),p.addEventListener("error",d)})}},zB={props:{point:{type:String,default:()=>""}},data(){return{zoom:18}},computed:{parsedPoint(){return JSON.parse(this.point)},tooltipText(){return this.parsedPoint.coordinates.join(", ")},coordinates(){return[...this.parsedPoint.coordinates].reverse()}},async mounted(){typeof window>"u"||(window!=null&&window.L||(await cg.promise("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"),await cg.promise("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js")),this.initMap())},methods:{initMap(){const t=window.L.map("map",{center:this.coordinates,zoom:this.zoom});window.L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(t),window.L.circle(this.coordinates,{color:"red",fillColor:"red",fillOpacity:.2,radius:10}).addTo(t).bindTooltip(this.tooltipText)}}},OB={id:"map",style:{height:"9rem",width:"24rem"}};function LB(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",OB)}const FB=Oe(zB,[["render",LB]]),$B=a.defineComponent({components:{VsWidgetHistoryItemAvatar:VB,VsWidgetHistoryItemMap:FB,IconFile:vv},props:{item:{type:Object,default:()=>{}}},methods:{getTitle(t){return t.title||t.attr},getOldValue(t){return t.old||"Не вказано"},getNewValue(t){return t.new||"Не вказано"},getDate(t){return TB(t.cdate)}}}),jB={class:"relative"},UB={class:"w-full flex gap-x-5"},HB={class:"grow"},WB={class:"text-sm font-semibold text-gray-800 dark:text-neutral-300"},qB={key:0},GB={key:1},ZB={key:0,class:"text-sm text-gray-500 dark:text-neutral-500"},YB={key:1,class:"text-sm text-gray-500 dark:text-neutral-500"},XB={key:2,class:"text-sm text-gray-500 dark:text-neutral-500"},KB={key:3,class:"mt-2"},JB={class:"grid grid-cols-2 gap-2"},QB={class:"bg-white border border-gray-200 rounded-lg p-2 dark:bg-neutral-800 dark:border-neutral-700"},e4={class:"flex gap-x-2"},t4={class:"grow truncate"},n4={class:"block truncate text-xs text-gray-800 dark:text-neutral-300"},r4={class:"block text-xs text-gray-400 dark:text-neutral-500"},i4={key:4,class:"text-sm text-gray-500 dark:text-neutral-500"},s4={key:5,class:"text-sm text-gray-500 dark:text-neutral-500"},o4={key:6,class:"mt-2"},a4={class:"grid grid-cols-2 gap-2"},l4={class:"bg-white border border-gray-200 rounded-lg p-2 dark:bg-neutral-800 dark:border-neutral-700"},c4={class:"flex gap-x-2"},d4={class:"grow truncate"},u4={class:"block truncate text-xs text-gray-800 dark:text-neutral-300"},h4={class:"block text-xs text-gray-400 dark:text-neutral-500"},p4={class:"mt-2 text-[11px] uppercase text-gray-400 dark:text-neutral-500"};function f4(t,e,n,r,o,d){var b,k,E,C;const p=a.resolveComponent("VsWidgetHistoryItemAvatar"),c=a.resolveComponent("IconFile");return a.openBlock(),a.createElementBlock("div",jB,[a.createElementVNode("div",UB,[a.createVNode(p,{username:t.item.username},null,8,["username"]),a.createElementVNode("div",HB,[a.createElementVNode("h4",WB,a.toDisplayString(t.item.username||"User User"),1),t.item.entity_type==="crm.communications"?(a.openBlock(),a.createElementBlock("span",qB,"Коментар")):a.createCommentVNode("",!0),t.item.entity_type==="crm.files"?(a.openBlock(),a.createElementBlock("span",GB,"Файл")):a.createCommentVNode("",!0),t.item.entity_type!=="crm.files"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:2},a.renderList(t.item.changes,T=>(a.openBlock(),a.createElementBlock("li",null,[!["entity_id","uid","cdate","editor_id","entity_type","editor_date"].includes(T.entity_key)&&T.value_old&&T.value_new?(a.openBlock(),a.createElementBlock("p",ZB," Дані "+a.toDisplayString(T.entity_key)+" змінились з "+a.toDisplayString(T.value_old)+" на "+a.toDisplayString(T.value_new),1)):a.createCommentVNode("",!0),!["entity_id","uid","cdate","editor_id","entity_type","editor_date"].includes(T.entity_key)&&!T.value_old&&T.value_new?(a.openBlock(),a.createElementBlock("p",YB," Дані "+a.toDisplayString(T.entity_key)+" внесено до БД: "+a.toDisplayString(T.value_new),1)):a.createCommentVNode("",!0),T.value_old&&!T.value_new?(a.openBlock(),a.createElementBlock("p",XB," Дані "+a.toDisplayString(T.entity_key)+" очищено ",1)):a.createCommentVNode("",!0)]))),256)):a.createCommentVNode("",!0),t.item.entity_type==="crm.files"&&t.item.change_type==="INSERT"&&((b=t.item.changes)!=null&&b[0])?(a.openBlock(),a.createElementBlock("div",KB,[a.createElementVNode("div",JB,[a.createElementVNode("div",QB,[a.createElementVNode("div",e4,[a.createVNode(c,{class:"w-[24px] h-[24px] text-gray-800"}),a.createElementVNode("div",t4,[a.createElementVNode("p",n4,a.toDisplayString(t.item.changes[0]["Назва файлу"]||"example file_name"),1),a.createElementVNode("small",r4,a.toDisplayString(t.item.changes[0]["Розмір файлу"]||"example file_weight kb")+" KB ",1)])])])])])):a.createCommentVNode("",!0),t.item.entity_type==="crm.files"&&t.item.change_type==="DELETE"?(a.openBlock(),a.createElementBlock("p",i4," Видалено файл "+a.toDisplayString((E=(k=t.item.changes)==null?void 0:k[0])==null?void 0:E["Назва файлу"]),1)):a.createCommentVNode("",!0),t.item.change_type!=="DELETE"&&!((C=t.item.changes)!=null&&C.length)?(a.openBlock(),a.createElementBlock("p",s4," Зміни відсутні ")):a.createCommentVNode("",!0),t.item.change_type==="addFile"?(a.openBlock(),a.createElementBlock("div",o4,[a.createElementVNode("div",a4,[a.createElementVNode("div",l4,[a.createElementVNode("div",c4,[a.createVNode(c,{class:"w-[24px] h-[24px] text-gray-800"}),a.createElementVNode("div",d4,[a.createElementVNode("p",u4,a.toDisplayString(t.item.file_name||"example file_name"),1),a.createElementVNode("small",h4,a.toDisplayString(t.item.file_weight||"example file_weight kb"),1)])])])])])):a.createCommentVNode("",!0),a.createElementVNode("p",p4,a.toDisplayString(t.getDate(t.item)),1)])])])}const m4=Oe($B,[["render",f4]]),g4={},y4={class:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function _4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",y4,e[0]||(e[0]=[a.createElementVNode("path",{d:"m7 15 5 5 5-5"},null,-1),a.createElementVNode("path",{d:"m7 9 5-5 5 5"},null,-1)]))}const b4=Oe(g4,[["render",_4]]),x4=a.defineComponent({components:{VsWidgetHistoryItem:m4,VsEmptyWidget:Ev,IconUpDown:b4},props:{id:{type:String,default:""},prefilledData:{type:Object,default:null},prefix:{type:String,default:"/api"}},data:()=>({history:{},showAll:!1,limitVisible:5}),computed:{createdDate(){var t,e,n;return(t=this.history)!=null&&t.data?Tv((n=(e=this.history)==null?void 0:e.data)==null?void 0:n.cdate):""},lastEditDate(){var t,e,n;return(t=this.history)!=null&&t.data?Tv((n=(e=this.history)==null?void 0:e.data)==null?void 0:n.edate):""},authorName(){var t;return(t=this.history)!=null&&t.data?this.history.data.author:""},displayedRows(){var t,e,n;return this.showAll?(t=this.history)==null?void 0:t.rows:(n=(e=this.history)==null?void 0:e.rows)==null?void 0:n.slice(0,this.limitVisible)}},methods:{async getHistoryData(){if(this.prefilledData){this.history=this.prefilledData;return}try{const{data:t}=await Le.get(`${this.prefix}/widget/history/${this.id}`);this.history=t}catch(t){console.error(t)}},showMore(){this.showAll=!0}},async mounted(){await this.getHistoryData()},watch:{"history.rows":function(t){this.$emit("count-change",t.length)}}}),v4={class:"bg-white"},w4={key:0,class:""},k4={key:0,class:"relative last:pb-0 pb-8 last:after:hidden after:absolute after:top-[38px] after:bottom-0 after:start-[19px] after:w-px after:bg-gray-200 dark:after:bg-neutral-700"},E4={class:"w-[38px]"},C4={class:"flex shrink-0 justify-center items-center w-6 h-7 border border-gray-200 text-sm font-semibold text-gray-800 rounded-md mx-auto dark:border-neutral-700 dark:text-neutral-400"},S4={class:"grow"},T4={class:"text-sm font-semibold text-gray-800 group-focus:text-blue-600 dark:text-neutral-300 dark:group-focus:text-blue-500"},A4={key:1,class:"w-full h-[330px] flex items-center justify-center"};function D4(t,e,n,r,o,d){var b,k,E,C,T,I;const p=a.resolveComponent("VsWidgetHistoryItem"),c=a.resolveComponent("IconUpDown");return a.openBlock(),a.createElementBlock("div",v4,[e[1]||(e[1]=a.createElementVNode("div",{class:"flex items-center justify-between mb-4 gap-x-2"},null,-1)),(k=(b=t.history)==null?void 0:b.rows)!=null&&k.length?(a.openBlock(),a.createElementBlock("ul",w4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.displayedRows,(N,$)=>{var F,q;return a.openBlock(),a.createElementBlock("li",{class:"list-none mr-[10px]",key:N.uid},[a.createVNode(p,{item:N,class:a.normalizeClass($===((q=(F=t.history)==null?void 0:F.rows)==null?void 0:q.length)-1?"pb-0 after:hidden":"pb-8 after:absolute after:top-[38px] after:bottom-0 after:start-[19px] after:w-px after:bg-gray-200 dark:after:bg-neutral-700")},null,8,["item","class"])])}),128)),((C=(E=t.history)==null?void 0:E.rows)==null?void 0:C.length)>4&&!t.showAll?(a.openBlock(),a.createElementBlock("div",k4,[a.createElementVNode("button",{type:"button",onClick:e[0]||(e[0]=(...N)=>t.showMore&&t.showMore(...N)),class:"hs-collapse-toggle hs-collapse-open:hidden group w-full text-start flex items-center gap-x-5 focus:outline-none",id:"hs-pro-dnao","aria-expanded":"false","aria-controls":"hs-pro-dnao-button","data-hs-collapse":"#hs-pro-dnao-button"},[a.createElementVNode("span",E4,[a.createElementVNode("span",C4,[a.createVNode(c)])]),a.createElementVNode("span",S4,[a.createElementVNode("span",T4," Показати ще "+a.toDisplayString(((I=(T=t.history)==null?void 0:T.rows)==null?void 0:I.length)-t.limitVisible),1)])])])):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",A4," Історія відсутня "))])}const M4=Oe(x4,[["render",D4]]),I4={props:{id:{type:String,default:""},data:{type:Object,default:null}},data(){return{mode:"base"}},methods:{getPdfUrl(){const t=`/api/print-template/crm.accounts.doc/${this.id}`;return this.mode==="demo"?t+"?demo=1&format=pdf":this.mode==="preview"?t+"?preview=1&format=pdf":t},setMode(t){this.mode=t},downloadPdf(){const t=document.createElement("a");t.href=`/api/print-template/crm.accounts.doc/${this.id}`,t.download=`document_${this.id}.pdf`,t.click()},downloadWord(){const t=document.createElement("a");t.href=`/api/print-template/crm.accounts.doc/${this.id}?format=word`,t.download=`document_${this.id}.docx`,t.click()}}},P4={class:"flex flex-col h-[calc(100vh-300px)] text-sm"},R4={class:"flex justify-between"},N4={class:"flex gap-4 mb-4"},B4={class:"flex mb-4 border rounded overflow-hidden"},V4=["src"];function z4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",P4,[a.createElementVNode("div",R4,[a.createElementVNode("div",N4,[a.createElementVNode("button",{onClick:e[0]||(e[0]=(...p)=>d.downloadPdf&&d.downloadPdf(...p)),class:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"}," Завантажити PDF "),a.createElementVNode("button",{onClick:e[1]||(e[1]=(...p)=>d.downloadWord&&d.downloadWord(...p)),class:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600"}," Завантажити Word ")]),a.createElementVNode("div",B4,[a.createElementVNode("button",{class:a.normalizeClass([{"bg-gray-200":o.mode==="base","bg-white":o.mode!=="base"},"px-4 py-2 border-r text-black"]),onClick:e[2]||(e[2]=p=>d.setMode("base"))}," Базовий ",2),a.createElementVNode("button",{class:a.normalizeClass([{"bg-gray-200":o.mode==="demo","bg-white":o.mode!=="demo"},"px-4 py-2 border-r text-black"]),onClick:e[3]||(e[3]=p=>d.setMode("demo"))}," Демо ",2),a.createElementVNode("button",{class:a.normalizeClass([{"bg-gray-200":o.mode==="preview","bg-white":o.mode!=="preview"},"px-4 py-2 text-black"]),onClick:e[4]||(e[4]=p=>d.setMode("preview"))}," Перегляд шаблону ",2)])]),a.createElementVNode("iframe",{src:d.getPdfUrl(),type:"application/pdf",class:"flex-grow w-full border-0 rounded-lg shadow-lg"},null,8,V4)])}const O4=Oe(I4,[["render",z4]]),L4={},F4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"};function $4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",F4,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),a.createElementVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),a.createElementVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]))}const dg=Oe(L4,[["render",$4]]),j4={},U4={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function H4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",U4,e[0]||(e[0]=[a.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const ug=Oe(j4,[["render",H4]]),W4={props:{height:{type:String,default:"16"},width:{type:String,default:"12"},color:{type:String,default:"black"}}},q4={style:{display:"none"}},G4=["height","width","fill"];function Z4(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(),a.createElementBlock("svg",q4,e[0]||(e[0]=[a.createElementVNode("symbol",{id:"icon-pencil",viewBox:"0 0 32 32"},[a.createElementVNode("path",{d:"M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z"})],-1)]))),(a.openBlock(),a.createElementBlock("svg",{height:n.height,width:n.width,fill:n.color},e[1]||(e[1]=[a.createElementVNode("use",{"xlink:href":"#icon-pencil"},null,-1)]),8,G4))],64)}const hg=Oe(W4,[["render",Z4]]),Y4={class:"hs-dropdown [--placement:bottom-right] inline-flex"},X4={class:"inline-flex items-center justify-center bg-white border rounded-lg shadow-sm size-7 gap-x-2 border-stone-200 text-stone-800 hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50"},K4={class:"flex flex-col items-start"},J4=["onClick"],Q4={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},eV={class:"p-4"},tV={class:"flex justify-end mt-4 gap-x-3"},nV={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},rV={__name:"vs-widget-table-controls",props:{table:{type:String,default:()=>""},token:{type:String},id:{type:String,default:()=>""},form:{type:String,default:()=>""},apiDelete:{type:String,default:()=>""},actions:{type:Array,default:()=>[]}},emits:["update-table"],setup(t,{emit:e}){const n=a.getCurrentInstance().proxy.$v3plugin,r=t,o=e,d=a.ref(!1),p=a.ref(!1),c=a.ref({}),b=a.ref(null),k=()=>{d.value=!0,document.body.click()},E=async()=>{var N,$;try{const F=await Le.get(`/api/table/${r.table}/${r.id}`);c.value=F==null?void 0:F.data;const{data:q}=await Le.get(`/api/template/form/${((N=F==null?void 0:F.data)==null?void 0:N.token)||r.form}`);b.value=(($=q==null?void 0:q.form)==null?void 0:$.schema)||(q==null?void 0:q.schema)||(q==null?void 0:q.form),q!=null&&q.obj&&(c.value={...F==null?void 0:F.data,...q==null?void 0:q.obj}),document.body.click(),p.value=!0}catch{}},C=async()=>{try{await Le.delete(`${r.apiDelete||"/api/table"}/${r.table}/${r.token||r.id}`),await o("update-table"),d.value=!1}catch(N){console.log(N)}},T=async()=>{try{await Le.put(`/api/table/${r.table}/${r.token||r.id}`,c.value),p.value=!1,await o("update-table")}catch{}},I=async N=>{debugger;document.querySelector("body").click(),N!=null&&N.form?(await n.$form({form:N==null?void 0:N.form,id:r.id,api:N==null?void 0:N.api,title:N==null?void 0:N.title}),await o("update-table")):N!=null&&N.api&&(await n.$api({confirm:N==null?void 0:N.confirm,api:N==null?void 0:N.api,method:N==null?void 0:N.method,id:r.id,isId:(N==null?void 0:N.isId)||!1}),await this.$emit("update-table"))};return a.onMounted(()=>{r.isForm&&E()}),(N,$)=>{const F=a.resolveComponent("VsPopover"),q=a.resolveComponent("VsConfirm"),J=a.resolveComponent("VsForm"),Q=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Y4,[a.createVNode(F,{trigger:"click",placement:"bottom-left"},{reference:a.withCtx(()=>[a.createElementVNode("button",X4,[a.createVNode(dg,{height:"16",width:"16"})])]),default:a.withCtx(()=>{var me,ke;return[a.createElementVNode("div",K4,[a.createElementVNode("button",{onClick:E,class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},[a.createVNode(hg,{color:"#000"}),$[5]||($[5]=a.createTextVNode(" Редагувати ",-1))]),(me=t.actions)!=null&&me.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList((ke=t.actions)==null?void 0:ke.filter(Re=>typeof Re=="object"),Re=>(a.openBlock(),a.createElementBlock("button",{onClick:Ee=>I(Re),key:Re==null?void 0:Re.id,class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},a.toDisplayString(Re==null?void 0:Re.label),9,J4))),128)):a.createCommentVNode("",!0),N.isForm?(a.openBlock(),a.createElementBlock("div",Q4)):a.createCommentVNode("",!0),a.createElementVNode("button",{onClick:a.withModifiers(k,["stop"]),class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},[a.createVNode(ug),$[6]||($[6]=a.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])])]}),_:1})]),a.createVNode(q,{visible:d.value,"onUpdate:visible":$[1]||($[1]=me=>d.value=me),size:"small",title:"Ви впевнені?"},{default:a.withCtx(()=>[a.createElementVNode("div",eV,[$[7]||($[7]=a.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),a.createElementVNode("div",tV,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:$[0]||($[0]=me=>d.value=!1)}," Скасувати "),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:C}," Так, я впевнена/ий ")])])]),_:1},8,["visible"]),a.createVNode(Q,{visible:p.value,"onUpdate:visible":$[4]||($[4]=me=>p.value=me),title:"Редагувати об'єкт"},{footer:a.withCtx(()=>[a.createElementVNode("div",nV,[a.createElementVNode("button",{onClick:$[3]||($[3]=me=>p.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:T,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode(J,{scheme:b.value,modelValue:c.value,"onUpdate:modelValue":$[2]||($[2]=me=>c.value=me),ref:"form"},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}}},iV={},sV={class:"hidden sm:block shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"};function oV(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",sV,e[0]||(e[0]=[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"},null,-1)]))}const $l=Oe(iV,[["render",oV]]),aV={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},lV={__name:"vs-widget-table-add-form",props:{token:{type:String,default:()=>""},form:{type:String,default:()=>""}},emits:["update-table"],setup(t,{emit:e}){var T;const n=(T=a.getCurrentInstance().proxy)==null?void 0:T.$notify,r=e,o=t,d=a.ref(et.value.buttonColor||"blue"),p=a.ref(!1),c=a.ref(null),b=a.ref({}),k=a.ref(),E=async()=>{var I;try{const{data:N}=await Le.get(`/api/template/form/${o.token||o.form}`);c.value=((I=N==null?void 0:N.form)==null?void 0:I.schema)||(N==null?void 0:N.schema)||(N==null?void 0:N.form),N!=null&&N.obj&&(b.value={...N==null?void 0:N.obj}),p.value=!0}catch{}},C=async()=>{var I;try{await((I=k.value)==null?void 0:I.doValidation()),await Le.post(`/api/table/${o.token}`,b.value),p.value=!1,b.value={},r("update-table"),n({title:"Успішно!",type:"success",message:"Операція виконана успішно"})}catch(N){console.log(N)}};return(I,N)=>{const $=a.resolveComponent("VsForm"),F=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:E,class:a.normalizeClass(`h-[34px] w-[34px] shadow bg-${d.value}-600 rounded-lg flex items-center justify-center text-white duration-300 hover:bg-${d.value}-700`)},[a.createVNode($l)],2),a.createVNode(F,{visible:p.value,"onUpdate:visible":N[2]||(N[2]=q=>p.value=q),title:"Створити об'єкт"},{footer:a.withCtx(()=>[a.createElementVNode("div",aV,[a.createElementVNode("button",{onClick:N[1]||(N[1]=q=>p.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:C,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode($,{scheme:c.value,modelValue:b.value,"onUpdate:modelValue":N[0]||(N[0]=q=>b.value=q),ref_key:"form",ref:k},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}}},cV={props:{row:Object,column:Object,table:String},emits:["update-table"]};function dV(t,e,n,r,o,d){var p,c,b,k,E,C,T,I;return a.openBlock(),a.createBlock(a.resolveDynamicComponent(((p=n.column)==null?void 0:p.format)==="custom"?(c=n.column)==null?void 0:c.component:`table-format-${((k=(b=n.column)==null?void 0:b.format)==null?void 0:k.toLowerCase())||"text"}`),{onUpdateTable:e[0]||(e[0]=()=>t.$emit("update-table")),name:(E=n.column)==null?void 0:E.name,data:n.row,value:(T=n.row)==null?void 0:T[(C=n.column)==null?void 0:C.name],table:n.table,column:n.column,edit:(I=n.column)==null?void 0:I.edit},null,40,["name","data","value","table","column","edit"])}const vd=Oe(cV,[["render",dV]]),uV={},hV={class:"h21yx vs0hq",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function pV(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",hV,e[0]||(e[0]=[a.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const Dv=Oe(uV,[["render",pV]]),fV={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String},filter:{type:Array},data:{type:Object}},components:{IconFilter:Dv},mounted(){setTimeout(()=>{var t,e;if(typeof this.filter=="string"){if(!filter)return;const[n,r]=filter==null?void 0:filter.split("=");this.filterValue[n]=(t=this.data)==null?void 0:t[r]}else typeof this.filter=="object"&&((e=this.filter)==null||e.forEach(n=>{var d;if(!n)return;const[r,o]=n==null?void 0:n.split("=");this.filterValue[r]=(d=this.data)==null?void 0:d[o]}))})},data(){return{isFilters:!1,filterValue:{}}},methods:{closeFilter({target:t}){this.isFilters&&t.classList.contains("filter-container")&&(this.isFilters=!1)}}},mV={key:0,class:"py-[1px] px-[6px] text-white text-[10px] rounded-full bg-blue-500"},gV={class:"filter-content h-screen bg-white w-[400px] overflow-x-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function yV(t,e,n,r,o,d){const p=a.resolveComponent("IconFilter"),c=a.resolveComponent("VsFilter");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:e[0]||(e[0]=b=>o.isFilters=!o.isFilters),class:"py-2 px-2.5 max-h-[34px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none"},[a.createVNode(p,{height:"16",width:"16"}),e[5]||(e[5]=a.createTextVNode(" Фільтри ",-1)),n.onFilters?(a.openBlock(),a.createElementBlock("span",mV,a.toDisplayString(n.onFilters),1)):a.createCommentVNode("",!0)]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var b;return[a.withDirectives(a.createElementVNode("div",{onClick:e[4]||(e[4]=(...k)=>d.closeFilter&&d.closeFilter(...k)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]"},[a.createElementVNode("div",gV,[(b=n.scheme)!=null&&b.length?(a.openBlock(),a.createBlock(c,{key:0,ref:"filter",scheme:n.scheme,layout:"default",modelValue:o.filterValue,"onUpdate:modelValue":e[1]||(e[1]=k=>o.filterValue=k),"apply-vue-router":"",history:"",token:n.table,name:"filter",footer:!0,background:!0,onFilterChange:e[2]||(e[2]=k=>t.$emit("filterChange",k)),closeFilterBtn:!0,onFilterClose:e[3]||(e[3]=k=>o.isFilters=!1)},null,8,["scheme","modelValue","token"])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.isFilters]])]}),_:1})],64)}const _V=Oe(fV,[["render",yV]]),Mv=async(t,e,n,r=10)=>{var $,F,q,J;if(!e||!n)return;await a.nextTick();const o=await(n==null?void 0:n.getBoundingClientRect()),d=await(e==null?void 0:e.getBoundingClientRect());if(!d||!o)return;const p=await parseInt(($=e==null?void 0:e.getBoundingClientRect())==null?void 0:$.height),c=await parseInt((F=e==null?void 0:e.getBoundingClientRect())==null?void 0:F.width),b=await parseInt((q=n==null?void 0:n.getBoundingClientRect())==null?void 0:q.height),k=await parseInt((J=n==null?void 0:n.getBoundingClientRect())==null?void 0:J.width),E=await window.innerHeight,C=await window.innerWidth;let T=0,I=0;const N=d.bottom+r+b;switch(t){case"top":d.top-o.height-r<0?T=d.top-o.height+r+b+p:T=d.top-o.height-r,C>k+d.right+30?I=d.left-o.width/2+d.width/2:I=C-30-k;break;case"bottom":E>N?T=d.bottom+r:T=d.bottom-r-b-p,I=d.left-o.width/2+d.width/2;break;case"left":T=d.top-o.height/2+d.height/2,d.left-o.width-r>0?I=d.left-o.width-r:I=10;break;case"right":T=d.top-o.height/2+d.height/2,C-c>k?I=d.right+r:I=C-30-k;break;case"top-right":d.top-o.height-r<0?T=d.top-o.height+(void 0).gap+b+p:T=d.top-o.height-r,C-c>k?I=d.right+r:I=C-30-k;break;case"top-left":d.top-o.height-r<0?T=d.top-o.height+r+b+p:T=d.top-o.height-r,d.left-o.width-r>0?I=d.left-o.width-r:I=10;break;case"bottom-right":E>N?T=d.bottom+r:T=d.bottom-r-b-p,C-c>k?I=d.left:I=C-30-k;break;case"bottom-left":E>N?T=d.bottom+r:T=d.bottom-r-b-p,d.left>0?I=d.right-k:I=10;break;case"bottom-start":E>N?T=d.bottom+r:T=d.bottom-(void 0).gap-b-p,d.left>0?I=d.left:I=10;break}T+b>E?T=E-b-r:T<0&&(T=r),I+k>C?I=C-k-r:I<0&&(I=r),n instanceof HTMLElement&&(n.style.top=`${T}px`,n.style.left=`${I}px`,n.style.position="fixed")},bV={},xV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-columns"};function vV(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",xV,e[0]||(e[0]=[a.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>',9)]))}const wV=Oe(bV,[["render",vV]]),kV={props:{column:Object},emits:["update-column"],components:{IconCheck2:kl},data(){return{value:!1}},watch:{value(t){this.$emit("update-column",{...this.column,hidden:!t})}},computed:{color(){return et.value.buttonColor||"blue"}},mounted(){var t;((t=this.column)==null?void 0:t.hidden)!==!0&&(this.value=!0)}},EV={class:"flex justify-between items-center py-1.5 px-3 cursor-pointer rounded-lg hover:bg-gray-100 has-[:disabled]:opacity-50 has-[:disabled]:pointer-events-none dark:hover:bg-neutral-800"},CV={class:"flex justify-between flex-1 items-center gap-x-2.5 cursor-pointer text-[13px] text-gray-800 dark:text-neutral-300"};function SV(t,e,n,r,o,d){var c,b;const p=a.resolveComponent("IconCheck2");return a.openBlock(),a.createElementBlock("div",EV,[a.createElementVNode("label",CV,[a.createTextVNode(a.toDisplayString(((c=n.column)==null?void 0:c.ua)||((b=n.column)==null?void 0:b.title))+" ",1),a.withDirectives(a.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=k=>o.value=k),class:"hidden"},null,512),[[a.vModelCheckbox,o.value]]),a.createElementVNode("span",{class:a.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500",[o.value?"bg-"+d.color+"-600 border-0":"bg-white"]])},[a.createVNode(p,{height:"12",width:"12"})],2)])])}const TV={components:{IconColumns:wV,AdminTableColumnsHiddenItem:Oe(kV,[["render",SV]])},emits:["update-columns"],props:{columns:Array},data(){return{searchValue:"",visible:!1}},computed:{filteredColumn(){var t;return(t=this.columns)==null?void 0:t.filter(e=>{var n,r,o,d,p,c;return((o=(n=e==null?void 0:e.ua)==null?void 0:n.toLowerCase())==null?void 0:o.includes((r=this.searchValue)==null?void 0:r.toLowerCase()))||((c=(d=e==null?void 0:e.title)==null?void 0:d.toLowerCase())==null?void 0:c.includes((p=this.searchValue)==null?void 0:p.toLowerCase()))})}},methods:{toggleVisible(){this.visible=!this.visible,Mv("bottom",this.$refs.wrapper,this.$refs.dropdown),this.visible?(document.addEventListener("click",this.handleClickOutside),document.addEventListener("scroll",this.handleScroll,!0)):(document.removeEventListener("click",this.handleClickOutside),document.removeEventListener("scroll",this.handleScroll,!0))},handleClickOutside(t){const e=this.$refs.wrapper;e&&!e.contains(t.target)&&(this.visible=!1,document.removeEventListener("click",this.handleClickOutside))},handleScroll(t){this.visible&&this.$refs.dropdown&&!this.$refs.dropdown.contains(t.target)&&(this.visible=!1)},updateColumn(t){const e=this.columns.findIndex(r=>(r==null?void 0:r.name)===(t==null?void 0:t.name)),n=this.columns;n[e]=t,this.$emit("update-columns",[...n])}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},AV={class:"relative p-1 border-gray-200 border-y dark:border-neutral-800"},DV={class:"p-1 pt-3 max-h-80 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},MV={key:0,class:"block px-3 mb-2 text-xs text-gray-500 dark:text-neutral-500"},IV={class:"space-y-1"},PV={key:1,class:"flex items-center px-3 text-[13px] py-1.5 px-3 rounded-md cursor-pointer group"};function RV(t,e,n,r,o,d){const p=a.resolveComponent("IconColumns"),c=a.resolveComponent("AdminTableColumnsHiddenItem");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:e[0]||(e[0]=(...b)=>d.toggleVisible&&d.toggleVisible(...b)),ref:"wrapper",class:"py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[a.createVNode(p,{height:"20",width:"16"})],512),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var b,k;return[(a.openBlock(),a.createBlock(a.Teleport,{to:"#modal"},[a.withDirectives(a.createElementVNode("div",{onClick:e[2]||(e[2]=a.withModifiers(()=>{},["stop"])),ref:"dropdown",class:"fixed z-10 w-64 transition-[opacity,margin] duration bg-white rounded-xl shadow-lg dark:bg-neutral-900"},[e[3]||(e[3]=a.createElementVNode("div",{class:"flex items-center justify-between h-[48px] px-4 py-2 gap-x-2 text-sm font-medium text-gray-800"}," Колонки ",-1)),a.createElementVNode("div",AV,[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=E=>o.searchValue=E),type:"text",class:"py-1.5 px-3 block w-full border-transparent rounded-lg sm:text-sm text-base placeholder:text-gray-500 hover:bg-gray-100 focus:outline-none focus:border-transparent focus:ring-0 focus:bg-gray-100 disabled:opacity-100 disabled:pointer-events-none dark:bg-transparent dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:ring-neutral-600 dark:focus:bg-neutral-800",placeholder:"Пошук",autofocus:""},null,512),[[a.vModelText,o.searchValue]])]),a.createElementVNode("div",DV,[(b=d.filteredColumn)!=null&&b.length?(a.openBlock(),a.createElementBlock("span",MV," Оберіть колонки для відображення ")):a.createCommentVNode("",!0),a.createElementVNode("div",IV,[(k=d.filteredColumn)!=null&&k.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(d.filteredColumn,(E,C)=>(a.openBlock(),a.createBlock(c,{key:C,column:E,onUpdateColumn:d.updateColumn},null,8,["column","onUpdateColumn"]))),128)):(a.openBlock(),a.createElementBlock("div",PV," Нічого не знайдено "))])])],512),[[a.vShow,o.visible]])]))]}),_:1})],64)}const Iv=Oe(TV,[["render",RV]]),NV={class:"h-full"},BV={class:"flex justify-between mb-[4px]"},VV={class:"flex gap-[4px]"},zV={class:"py-1"},OV={class:"inline-block w-full align-middle"},LV={class:"relative min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},FV={class:"font-medium text-left text-gray-700"},$V={key:0,class:"w-[70px] bg-white text-center sticky right-[-1px]"},jV={class:"divide-y divide-gray-200"},UV={key:0,class:"py-2 pr-5"},HV={key:0,class:"h-[60px] flex relative items-center justify-center"},WV={__name:"vs-widget-table",props:{data:Object,columns:Array,token:String,table:{type:String,default:()=>""},id:{type:String,default:()=>""},api:{type:String,default:()=>""},apiDelete:{type:String,default:()=>""},data:{type:Object,default:()=>null},filter:{type:Array,default:()=>[]},limit:{type:Number,default:()=>20}},setup(t){const e=t,n=a.ref(null),r=a.ref([]),o=a.ref(1),d=a.ref(""),p=a.ref(null),c=a.ref(null),b=a.ref(0),k=async()=>{var T;try{const I=await Le.get(`/api/table-filter/${e.table}`);p.value=(T=I==null?void 0:I.data)==null?void 0:T.list;const{data:N}=await Le.get((e!=null&&e.api?e.api:"/api/table-data")+(e.token?`/${e.token}`:e.table&&e.id?`/${e.table}`:""),{params:{page:o.value,limit:10,search:d.value,filter:c.value}});n.value=N,r.value=(N==null?void 0:N.columns)||(e==null?void 0:e.columns)}catch(I){console.error("Ошибка при загрузке данных таблицы:",I)}},E=T=>{o.value=T,k()},C=async({url:T,state:I})=>{var N;c.value=T!=="no-url"?T:null,b.value=(N=Object.entries(I))==null?void 0:N.length,o.value=1,await k()};return a.watch(d,k),a.onMounted(()=>{k()}),(T,I)=>{var F,q,J,Q,me,ke,Re,Ee,Ve,Be,Ze,tt,Xe,ot,ue,Ut;const N=a.resolveComponent("VsText"),$=a.resolveComponent("VsPagination");return a.openBlock(),a.createElementBlock("div",NV,[a.createElementVNode("div",BV,[a.createVNode(N,{modelValue:d.value,"onUpdate:modelValue":I[0]||(I[0]=wt=>d.value=wt),class:"[&>input]:py-[7px] [&>input]:max-h-[36px] w-[400px] [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",placeholder:"Пошук..."},null,8,["modelValue"]),a.createElementVNode("div",VV,[(F=p.value)!=null&&F.length?(a.openBlock(),a.createBlock(_V,{key:0,scheme:p.value,table:t.table,onFilterChange:C,onFilters:b.value,filter:t.filter,data:(J=(q=t.data)==null?void 0:q.rows)==null?void 0:J[0]},null,8,["scheme","table","onFilters","filter","data"])):a.createCommentVNode("",!0),a.createVNode(Iv,{columns:r.value,onUpdateColumns:I[1]||(I[1]=wt=>r.value=wt)},null,8,["columns"]),(Q=n.value)!=null&&Q.addToken?(a.openBlock(),a.createBlock(lV,{key:1,token:(me=n.value)==null?void 0:me.addToken,form:(ke=n.value)==null?void 0:ke.form,onUpdateTable:k},null,8,["token","form"])):a.createCommentVNode("",!0)])]),a.createElementVNode("div",zV,"Кількість: "+a.toDisplayString((Re=n.value)==null?void 0:Re.total),1),a.createElementVNode("div",{class:a.normalizeClass(["overflow-x-auto w-full admin-widget-table [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",[((Ve=(Ee=n.value)==null?void 0:Ee.rows)==null?void 0:Ve.length)>t.limit?"h-[calc(100%-60px)]":"h-[100%]"]])},[a.createElementVNode("div",OV,[a.createElementVNode("table",LV,[(Be=r.value)!=null&&Be.length?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("thead",FV,[a.createElementVNode("tr",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ze=r.value)==null?void 0:Ze.filter(wt=>!(wt!=null&&wt.hidden)),(wt,$t)=>(a.openBlock(),a.createElementBlock("th",{key:$t,scope:"col",class:"py-2"},a.toDisplayString((wt==null?void 0:wt.title)||(wt==null?void 0:wt.description)||(wt==null?void 0:wt.ua)),1))),128)),(Xe=(tt=n.value)==null?void 0:tt.actions)!=null&&Xe.length?(a.openBlock(),a.createElementBlock("th",$V)):a.createCommentVNode("",!0)])]),a.createElementVNode("tbody",jV,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ot=n.value)==null?void 0:ot.rows,(wt,$t)=>{var an,xn,mn,hn,vn;return a.openBlock(),a.createElementBlock("tr",{key:$t,class:"odd:bg-gray-50"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((an=r.value)==null?void 0:an.filter(Dn=>!(Dn!=null&&Dn.hidden)),(Dn,In)=>(a.openBlock(),a.createElementBlock("td",{key:In,class:"py-2 pr-5"},[a.createVNode(vd,{row:wt,column:Dn,table:t.table},null,8,["row","column","table"])]))),128)),(mn=(xn=n.value)==null?void 0:xn.actions)!=null&&mn.length?(a.openBlock(),a.createElementBlock("td",UV,[a.createVNode(rV,{id:wt==null?void 0:wt.id,table:t.table,apiDelete:t.apiDelete,actions:(hn=n.value)==null?void 0:hn.actions,token:wt==null?void 0:wt.token,form:(vn=n.value)==null?void 0:vn.form,onUpdateTable:k},null,8,["id","table","apiDelete","actions","token","form"])])):a.createCommentVNode("",!0)])}),128))])],64)):a.createCommentVNode("",!0)])])],2),((ue=n.value)==null?void 0:ue.filtered)>t.limit?(a.openBlock(),a.createElementBlock("div",HV,[a.createVNode($,{goTo:!1,"default-page":o.value,total:(Ut=n.value)==null?void 0:Ut.filtered,class:"absolute w-fit",pageSize:t.limit,onPageChange:E,backgroundColor:"#F3F4F6"},null,8,["default-page","total","pageSize"])])):a.createCommentVNode("",!0)])}}},qV={},GV={class:"shrink-0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function ZV(t,e){return a.openBlock(),a.createElementBlock("svg",GV,e[0]||(e[0]=[a.createElementVNode("path",{d:"M18 6 7 17l-5-5"},null,-1),a.createElementVNode("path",{d:"m22 10-7.5 7.5L13 16"},null,-1)]))}const YV=Oe(qV,[["render",ZV]]),XV={},KV={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",class:"icon icon-tabler icons-tabler-filled icon-tabler-user"};function JV(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",KV,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M12 2a5 5 0 1 1 -5 5l.005 -.217a5 5 0 0 1 4.995 -4.783z"},null,-1),a.createElementVNode("path",{d:"M14 14a5 5 0 0 1 5 5v1a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-1a5 5 0 0 1 5 -5h4z"},null,-1)]))}const Pv=Oe(XV,[["render",JV]]),QV={},e5={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function t5(t,e){return a.openBlock(),a.createElementBlock("svg",e5,e[0]||(e[0]=[a.createElementVNode("polyline",{points:"9 11 12 14 22 4"},null,-1),a.createElementVNode("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"},null,-1)]))}const n5=Oe(QV,[["render",t5]]),r5={class:"relative shrink-0"},i5=["src"],s5={key:1,class:"h-[38px] w-[38px] bg-gray-200 rounded-full flex items-center justify-center"},o5={key:2,class:"absolute top-4 -start-3 size-2 bg-blue-600 rounded-full dark:bg-blue-500"},a5={class:"grow"},l5={class:"text-xs text-gray-500 dark:text-neutral-500"},c5={class:"block text-sm font-medium text-gray-800 dark:text-neutral-300"},d5={class:"text-sm text-gray-500 dark:text-neutral-500"},u5={key:0,class:"sm:group-hover:opacity-100 sm:opacity-0 sm:absolute sm:top-5 sm:end-5 inline-block p-0.5 bg-white border border-gray-200 rounded-lg shadow-sm transition ease-out"},h5={__name:"admin-notification-item",props:{item:Object},emits:["update-notification"],setup(t,{emit:e}){const n=e,r=a.ref(!1),o=()=>r.value=!0,d=()=>r.value=!1,p=async()=>{var c;try{await Le.get(`/api/notification-read/${(c=t.item)==null?void 0:c.id}`),await n("update-notification")}catch{}};return(c,b)=>{var E,C,T,I,N,$;const k=a.resolveComponent("VsPopover");return a.openBlock(),a.createElementBlock("li",{class:a.normalizeClass(["relative group w-full flex gap-x-5 text-start p-5 border-b",[(E=t.item)!=null&&E.read?"bg-gray-100":"bg-white"]]),onMouseenter:o,onMouseleave:d},[a.createElementVNode("div",r5,[(C=t.item)!=null&&C.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,class:"shrink-0 size-[38px] rounded-full",src:(T=t.item)==null?void 0:T.avatar,alt:"Avatar"},null,8,i5)):(a.openBlock(),a.createElementBlock("div",s5,[a.createVNode(Pv)])),(I=t.item)!=null&&I.read?(a.openBlock(),a.createElementBlock("span",o5)):a.createCommentVNode("",!0)]),a.createElementVNode("div",a5,[a.createElementVNode("p",l5,[a.createVNode(Om,{name:"cdate",data:t.item},null,8,["data"])]),a.createElementVNode("span",c5,a.toDisplayString((N=t.item)==null?void 0:N.author),1),a.createElementVNode("p",d5,a.toDisplayString(($=t.item)==null?void 0:$.subject),1)]),r.value?(a.openBlock(),a.createElementBlock("div",u5,[a.createVNode(k,{trigger:"hover",placement:"left"},{reference:a.withCtx(()=>[a.createElementVNode("button",{onClick:p,type:"button",class:"hs-tooltip-toggle hs-tooltip relative inline-block size-7 flex shrink-0 justify-center items-center text-gray-500 hover:bg-gray-100 hover:text-gray-800 rounded"},[a.createVNode(n5)])]),default:a.withCtx(()=>[b[0]||(b[0]=a.createTextVNode(" Прочитати ",-1))]),_:1,__:[0]})])):a.createCommentVNode("",!0)],34)}}},p5={},f5={class:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function m5(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",f5,e[0]||(e[0]=[a.createElementVNode("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"},null,-1),a.createElementVNode("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"},null,-1)]))}const g5=Oe(p5,[["render",m5]]),y5={},_5={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function b5(t,e){return a.openBlock(),a.createElementBlock("svg",_5,e[0]||(e[0]=[a.createElementVNode("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"},null,-1),a.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))}const x5=Oe(y5,[["render",b5]]),v5={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},w5={class:"w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit"},k5={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},E5={class:"max-w-sm mx-auto mt-6"},C5={class:"font-medium text-gray-800 dark:text-neutral-200"},S5={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function T5(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",w5,[a.createElementVNode("div",null,[a.createElementVNode("div",k5,[e[0]||(e[0]=a.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),a.createElementVNode("div",E5,[a.createElementVNode("p",C5,a.toDisplayString(n.title),1),a.createElementVNode("p",S5,a.toDisplayString(n.text),1)])])])])}const pg=Oe(v5,[["render",T5]]),A5={key:0,class:"flex absolute top-0 end-0 -mt-1.5 -me-1.5"},D5={class:"relative min-w-[18px] min-h-[18px] inline-flex justify-center items-center text-[10px] bg-red-500 text-white rounded-full px-1"},M5={class:"h-[50px] px-[20px] border-b w-full flex items-center justify-between rounded-t-lg bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)]"},I5={class:"h-[30px] w-[30px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100"},P5={class:"max-h-[400px] bg-white overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300"},R5={key:0},N5={key:1},fg={__name:"admin-notification",props:{placement:{type:String,default:"right"}},setup(t){const e=a.ref(0),n=a.ref([]),r=a.ref(!1),o=a.ref(null),d=t,{$notify:p}=a.getCurrentInstance().proxy,c=E=>{o.value&&!o.value.contains(E.target)&&(r.value=!1)};a.watch(r,E=>{E?window.addEventListener("click",c):window.removeEventListener("click",c)}),a.onBeforeUnmount(()=>{window.removeEventListener("click",c)});const b=async()=>{try{const{data:E}=await Le.get("/api/notification");n.value=(E==null?void 0:E.rows)||[]}catch{p({type:"error",message:"При спробі завантаження нотифікацій виникла помилка",title:"Помилка!"})}};b();const k=async()=>{try{await Le.get("/api/notification-read"),await b()}catch{p({type:"error",message:"Виникла помилка",title:"Помилка!"})}};return(E,C)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"notificationRef",ref:o,class:"hs-tooltip [--placement:bottom] inline-block show relative"},[a.createElementVNode("button",{onClick:C[0]||(C[0]=T=>r.value=!r.value),class:"relative size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border text-gray-900 hover:bg-gray-200 focus:outline-none focus:bg-gray-200"},[a.createVNode(g5,{height:"24",width:"24"}),e.value?(a.openBlock(),a.createElementBlock("span",A5,[C[1]||(C[1]=a.createElementVNode("span",{class:"absolute inline-flex bg-red-400 rounded-full opacity-75 animate-ping size-full dark:bg-red-600"},null,-1)),a.createElementVNode("span",D5,a.toDisplayString(e.value),1)])):a.createCommentVNode("",!0)]),a.createVNode(a.Transition,null,{default:a.withCtx(()=>{var T;return[r.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["w-96 h-[100px] z-[11] absolute top-[40px]",(d==null?void 0:d.placement)==="right"?"right-0":"left-0"])},[a.createElementVNode("div",M5,[C[2]||(C[2]=a.createElementVNode("nav",{class:"flex"},[a.createElementVNode("button",{type:"button",class:"px-2 py-1.5 relative inline-flex justify-center items-center gap-x-2 text-nowrap hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg focus:outline-none focus:bg-gray-100 after:absolute after:bottom-[-9px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800"}," Всі ")],-1)),a.createElementVNode("button",I5,[a.createVNode(x5)])]),a.createElementVNode("div",P5,[(T=n.value)!=null&&T.length?(a.openBlock(),a.createElementBlock("ul",R5,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.value,I=>(a.openBlock(),a.createBlock(h5,{key:I==null?void 0:I.id,item:I,onUpdateNotification:b},null,8,["item"]))),128))])):(a.openBlock(),a.createElementBlock("div",N5,[a.createVNode(pg,{class:"[&>div>div]:min-h-[300px]",text:""})]))]),a.createElementVNode("button",{onClick:k,class:"h-[50px] border-t w-full rounded-b-lg bg-white shadow p-4 flex justify-center items-center gap-x-2 text-sm text-gray-500 font-medium sm:rounded-b-lg hover:text-blue-600 focus:outline-none"},[a.createVNode(YV,{height:"16",width:"16"}),C[3]||(C[3]=a.createTextVNode(" Прочитати усі ",-1))])],2)):a.createCommentVNode("",!0)]}),_:1})],512))}};var Gh,Nt,Rv,Nv,jl,Na,Bv,Vv,zv,Zh={},Ov=[],B5=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Ro(t,e){for(var n in e)t[n]=e[n];return t}function Lv(t){var e=t.parentNode;e&&e.removeChild(t)}function le(t,e,n){var r,o,d,p={};for(d in e)d=="key"?r=e[d]:d=="ref"?o=e[d]:p[d]=e[d];if(arguments.length>2&&(p.children=arguments.length>3?Gh.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(d in t.defaultProps)p[d]===void 0&&(p[d]=t.defaultProps[d]);return Yh(t,p,r,o,null)}function Yh(t,e,n,r,o){var d={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Rv};return o==null&&Nt.vnode!=null&&Nt.vnode(d),d}function Qr(){return{current:null}}function Bn(t){return t.children}function V5(t,e,n,r,o){var d;for(d in n)d==="children"||d==="key"||d in e||Xh(t,d,null,n[d],r);for(d in e)o&&typeof e[d]!="function"||d==="children"||d==="key"||d==="value"||d==="checked"||n[d]===e[d]||Xh(t,d,e[d],n[d],r)}function Fv(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||B5.test(e)?n:n+"px"}function Xh(t,e,n,r,o){var d;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Fv(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Fv(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")d=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+d]=n,n?r||t.addEventListener(e,d?jv:$v,d):t.removeEventListener(e,d?jv:$v,d);else if(e!=="dangerouslySetInnerHTML"){if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e.indexOf("-")==-1?t.removeAttribute(e):t.setAttribute(e,n))}}function $v(t){jl=!0;try{return this.l[t.type+!1](Nt.event?Nt.event(t):t)}finally{jl=!1}}function jv(t){jl=!0;try{return this.l[t.type+!0](Nt.event?Nt.event(t):t)}finally{jl=!1}}function Ai(t,e){this.props=t,this.context=e}function wd(t,e){if(e==null)return t.__?wd(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?wd(t):null}function Uv(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Uv(t)}}function z5(t){jl?setTimeout(t):Vv(t)}function mg(t){(!t.__d&&(t.__d=!0)&&Na.push(t)&&!Kh.__r++||Bv!==Nt.debounceRendering)&&((Bv=Nt.debounceRendering)||z5)(Kh)}function Kh(){var t,e,n,r,o,d,p,c;for(Na.sort(function(b,k){return b.__v.__b-k.__v.__b});t=Na.shift();)t.__d&&(e=Na.length,r=void 0,o=void 0,p=(d=(n=t).__v).__e,(c=n.__P)&&(r=[],(o=Ro({},d)).__v=d.__v+1,gg(c,d,o,n.__n,c.ownerSVGElement!==void 0,d.__h!=null?[p]:null,r,p??wd(d),d.__h),Zv(r,d),d.__e!=p&&Uv(d)),Na.length>e&&Na.sort(function(b,k){return b.__v.__b-k.__v.__b}));Kh.__r=0}function Hv(t,e,n,r,o,d,p,c,b,k){var E,C,T,I,N,$,F,q=r&&r.__k||Ov,J=q.length;for(n.__k=[],E=0;E<e.length;E++)if((I=n.__k[E]=(I=e[E])==null||typeof I=="boolean"?null:typeof I=="string"||typeof I=="number"||typeof I=="bigint"?Yh(null,I,null,null,I):Array.isArray(I)?Yh(Bn,{children:I},null,null,null):I.__b>0?Yh(I.type,I.props,I.key,I.ref?I.ref:null,I.__v):I)!=null){if(I.__=n,I.__b=n.__b+1,(T=q[E])===null||T&&I.key==T.key&&I.type===T.type)q[E]=void 0;else for(C=0;C<J;C++){if((T=q[C])&&I.key==T.key&&I.type===T.type){q[C]=void 0;break}T=null}gg(t,I,T=T||Zh,o,d,p,c,b,k),N=I.__e,(C=I.ref)&&T.ref!=C&&(F||(F=[]),T.ref&&F.push(T.ref,null,I),F.push(C,I.__c||N,I)),N!=null?($==null&&($=N),typeof I.type=="function"&&I.__k===T.__k?I.__d=b=Wv(I,b,t):b=qv(t,I,T,q,N,b),typeof n.type=="function"&&(n.__d=b)):b&&T.__e==b&&b.parentNode!=t&&(b=wd(T))}for(n.__e=$,E=J;E--;)q[E]!=null&&(typeof n.type=="function"&&q[E].__e!=null&&q[E].__e==n.__d&&(n.__d=Gv(r).nextSibling),Xv(q[E],q[E]));if(F)for(E=0;E<F.length;E++)Yv(F[E],F[++E],F[++E])}function Wv(t,e,n){for(var r,o=t.__k,d=0;o&&d<o.length;d++)(r=o[d])&&(r.__=t,e=typeof r.type=="function"?Wv(r,e,n):qv(n,r,r,o,r.__e,e));return e}function Jh(t,e){return e=e||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(n){Jh(n,e)}):e.push(t)),e}function qv(t,e,n,r,o,d){var p,c,b;if(e.__d!==void 0)p=e.__d,e.__d=void 0;else if(n==null||o!=d||o.parentNode==null)e:if(d==null||d.parentNode!==t)t.appendChild(o),p=null;else{for(c=d,b=0;(c=c.nextSibling)&&b<r.length;b+=1)if(c==o)break e;t.insertBefore(o,d),p=d}return p!==void 0?p:o.nextSibling}function Gv(t){var e,n,r;if(t.type==null||typeof t.type=="string")return t.__e;if(t.__k){for(e=t.__k.length-1;e>=0;e--)if((n=t.__k[e])&&(r=Gv(n)))return r}return null}function gg(t,e,n,r,o,d,p,c,b){var k,E,C,T,I,N,$,F,q,J,Q,me,ke,Re,Ee,Ve=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(b=n.__h,c=e.__e=n.__e,e.__h=null,d=[c]),(k=Nt.__b)&&k(e);try{e:if(typeof Ve=="function"){if(F=e.props,q=(k=Ve.contextType)&&r[k.__c],J=k?q?q.props.value:k.__:r,n.__c?$=(E=e.__c=n.__c).__=E.__E:("prototype"in Ve&&Ve.prototype.render?e.__c=E=new Ve(F,J):(e.__c=E=new Ai(F,J),E.constructor=Ve,E.render=L5),q&&q.sub(E),E.props=F,E.state||(E.state={}),E.context=J,E.__n=r,C=E.__d=!0,E.__h=[],E._sb=[]),E.__s==null&&(E.__s=E.state),Ve.getDerivedStateFromProps!=null&&(E.__s==E.state&&(E.__s=Ro({},E.__s)),Ro(E.__s,Ve.getDerivedStateFromProps(F,E.__s))),T=E.props,I=E.state,E.__v=e,C)Ve.getDerivedStateFromProps==null&&E.componentWillMount!=null&&E.componentWillMount(),E.componentDidMount!=null&&E.__h.push(E.componentDidMount);else{if(Ve.getDerivedStateFromProps==null&&F!==T&&E.componentWillReceiveProps!=null&&E.componentWillReceiveProps(F,J),!E.__e&&E.shouldComponentUpdate!=null&&E.shouldComponentUpdate(F,E.__s,J)===!1||e.__v===n.__v){for(e.__v!==n.__v&&(E.props=F,E.state=E.__s,E.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(Be){Be&&(Be.__=e)}),Q=0;Q<E._sb.length;Q++)E.__h.push(E._sb[Q]);E._sb=[],E.__h.length&&p.push(E);break e}E.componentWillUpdate!=null&&E.componentWillUpdate(F,E.__s,J),E.componentDidUpdate!=null&&E.__h.push(function(){E.componentDidUpdate(T,I,N)})}if(E.context=J,E.props=F,E.__P=t,me=Nt.__r,ke=0,"prototype"in Ve&&Ve.prototype.render){for(E.state=E.__s,E.__d=!1,me&&me(e),k=E.render(E.props,E.state,E.context),Re=0;Re<E._sb.length;Re++)E.__h.push(E._sb[Re]);E._sb=[]}else do E.__d=!1,me&&me(e),k=E.render(E.props,E.state,E.context),E.state=E.__s;while(E.__d&&++ke<25);E.state=E.__s,E.getChildContext!=null&&(r=Ro(Ro({},r),E.getChildContext())),C||E.getSnapshotBeforeUpdate==null||(N=E.getSnapshotBeforeUpdate(T,I)),Ee=k!=null&&k.type===Bn&&k.key==null?k.props.children:k,Hv(t,Array.isArray(Ee)?Ee:[Ee],e,n,r,o,d,p,c,b),E.base=e.__e,e.__h=null,E.__h.length&&p.push(E),$&&(E.__E=E.__=null),E.__e=!1}else d==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=O5(n.__e,e,n,r,o,d,p,b);(k=Nt.diffed)&&k(e)}catch(Be){e.__v=null,(b||d!=null)&&(e.__e=c,e.__h=!!b,d[d.indexOf(c)]=null),Nt.__e(Be,e,n)}}function Zv(t,e){Nt.__c&&Nt.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(r){r.call(n)})}catch(r){Nt.__e(r,n.__v)}})}function O5(t,e,n,r,o,d,p,c){var b,k,E,C=n.props,T=e.props,I=e.type,N=0;if(I==="svg"&&(o=!0),d!=null){for(;N<d.length;N++)if((b=d[N])&&"setAttribute"in b==!!I&&(I?b.localName===I:b.nodeType===3)){t=b,d[N]=null;break}}if(t==null){if(I===null)return document.createTextNode(T);t=o?document.createElementNS("http://www.w3.org/2000/svg",I):document.createElement(I,T.is&&T),d=null,c=!1}if(I===null)C===T||c&&t.data===T||(t.data=T);else{if(d=d&&Gh.call(t.childNodes),k=(C=n.props||Zh).dangerouslySetInnerHTML,E=T.dangerouslySetInnerHTML,!c){if(d!=null)for(C={},N=0;N<t.attributes.length;N++)C[t.attributes[N].name]=t.attributes[N].value;(E||k)&&(E&&(k&&E.__html==k.__html||E.__html===t.innerHTML)||(t.innerHTML=E&&E.__html||""))}if(V5(t,T,C,o,c),E)e.__k=[];else if(N=e.props.children,Hv(t,Array.isArray(N)?N:[N],e,n,r,o&&I!=="foreignObject",d,p,d?d[0]:n.__k&&wd(n,0),c),d!=null)for(N=d.length;N--;)d[N]!=null&&Lv(d[N]);c||("value"in T&&(N=T.value)!==void 0&&(N!==t.value||I==="progress"&&!N||I==="option"&&N!==C.value)&&Xh(t,"value",N,C.value,!1),"checked"in T&&(N=T.checked)!==void 0&&N!==t.checked&&Xh(t,"checked",N,C.checked,!1))}return t}function Yv(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(r){Nt.__e(r,n)}}function Xv(t,e,n){var r,o;if(Nt.unmount&&Nt.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Yv(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(d){Nt.__e(d,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&Xv(r[o],e,n||typeof t.type!="function");n||t.__e==null||Lv(t.__e),t.__=t.__e=t.__d=void 0}function L5(t,e,n){return this.constructor(t,n)}function kd(t,e,n){var r,o,d;Nt.__&&Nt.__(t,e),o=(r=!1)?null:e.__k,d=[],gg(e,t=e.__k=le(Bn,null,[t]),o||Zh,Zh,e.ownerSVGElement!==void 0,o?null:e.firstChild?Gh.call(e.childNodes):null,d,o?o.__e:e.firstChild,r),Zv(d,t)}function F5(t,e){var n={__c:e="__cC"+zv++,__:t,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,d;return this.getChildContext||(o=[],(d={})[e]=this,this.getChildContext=function(){return d},this.shouldComponentUpdate=function(p){this.props.value!==p.value&&o.some(function(c){c.__e=!0,mg(c)})},this.sub=function(p){o.push(p);var c=p.componentWillUnmount;p.componentWillUnmount=function(){o.splice(o.indexOf(p),1),c&&c.call(p)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Gh=Ov.slice,Nt={__e:function(t,e,n,r){for(var o,d,p;e=e.__;)if((o=e.__c)&&!o.__)try{if((d=o.constructor)&&d.getDerivedStateFromError!=null&&(o.setState(d.getDerivedStateFromError(t)),p=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,r||{}),p=o.__d),p)return o.__E=o}catch(c){t=c}throw t}},Rv=0,Nv=function(t){return t!=null&&t.constructor===void 0},jl=!1,Ai.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ro({},this.state),typeof t=="function"&&(t=t(Ro({},n),this.props)),t&&Ro(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),mg(this))},Ai.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),mg(this))},Ai.prototype.render=Bn,Na=[],Vv=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Kh.__r=0,zv=0;var Ds,yg,Kv,Jv=[],_g=[],Qv=Nt.__b,e1=Nt.__r,t1=Nt.diffed,n1=Nt.__c,r1=Nt.unmount;function $5(){for(var t;t=Jv.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Qh),t.__H.__h.forEach(bg),t.__H.__h=[]}catch(e){t.__H.__h=[],Nt.__e(e,t.__v)}}Nt.__b=function(t){Ds=null,Qv&&Qv(t)},Nt.__r=function(t){e1&&e1(t);var e=(Ds=t.__c).__H;e&&(yg===Ds?(e.__h=[],Ds.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=_g,n.__N=n.i=void 0})):(e.__h.forEach(Qh),e.__h.forEach(bg),e.__h=[])),yg=Ds},Nt.diffed=function(t){t1&&t1(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Jv.push(e)!==1&&Kv===Nt.requestAnimationFrame||((Kv=Nt.requestAnimationFrame)||j5)($5)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==_g&&(n.__=n.__V),n.i=void 0,n.__V=_g})),yg=Ds=null},Nt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Qh),n.__h=n.__h.filter(function(r){return!r.__||bg(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],Nt.__e(r,n.__v)}}),n1&&n1(t,e)},Nt.unmount=function(t){r1&&r1(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Qh(r)}catch(o){e=o}}),n.__H=void 0,e&&Nt.__e(e,n.__v))};var i1=typeof requestAnimationFrame=="function";function j5(t){var e,n=function(){clearTimeout(r),i1&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);i1&&(e=requestAnimationFrame(n))}function Qh(t){var e=Ds,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Ds=e}function bg(t){var e=Ds;t.__c=t.__(),Ds=e}function U5(t,e){for(var n in e)t[n]=e[n];return t}function s1(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function o1(t){this.props=t}(o1.prototype=new Ai).isPureReactComponent=!0,o1.prototype.shouldComponentUpdate=function(t,e){return s1(this.props,t)||s1(this.state,e)};var a1=Nt.__b;Nt.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),a1&&a1(t)};var H5=Nt.__e;Nt.__e=function(t,e,n,r){if(t.then){for(var o,d=e;d=d.__;)if((o=d.__c)&&o.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e)}H5(t,e,n,r)};var l1=Nt.unmount;function c1(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=U5({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return c1(r,e,n)})),t}function d1(t,e,n){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return d1(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function xg(){this.__u=0,this.t=null,this.__b=null}function u1(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ep(){this.u=null,this.o=null}Nt.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),l1&&l1(t)},(xg.prototype=new Ai).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=u1(r.__v),d=!1,p=function(){d||(d=!0,n.__R=null,o?o(c):c())};n.__R=p;var c=function(){if(!--r.__u){if(r.state.__a){var k=r.state.__a;r.__v.__k[0]=d1(k,k.__c.__P,k.__c.__O)}var E;for(r.setState({__a:r.__b=null});E=r.t.pop();)E.forceUpdate()}},b=e.__h===!0;r.__u++||b||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(p,p)},xg.prototype.componentWillUnmount=function(){this.t=[]},xg.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=c1(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&le(Bn,null,t.fallback);return o&&(o.__h=null),[le(Bn,null,e.__a?null:t.children),o]};var h1=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function W5(t){return this.getChildContext=function(){return t.context},t.children}function q5(t){var e=this,n=t.i;e.componentWillUnmount=function(){kd(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),e.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),e.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.i.removeChild(r)}}),kd(le(W5,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function G5(t,e){var n=le(q5,{__v:t,i:e});return n.containerInfo=e,n}(ep.prototype=new Ai).__a=function(t){var e=this,n=u1(e.__v),r=e.o.get(t);return r[0]++,function(o){var d=function(){e.props.revealOrder?(r.push(o),h1(e,t,r)):o()};n?n(d):d()}},ep.prototype.render=function(t){this.u=null,this.o=new Map;var e=Jh(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},ep.prototype.componentDidUpdate=ep.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){h1(t,n,e)})};var Z5=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Y5=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,X5=typeof document<"u",K5=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};Ai.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Ai.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var p1=Nt.event;function J5(){}function Q5(){return this.cancelBubble}function e3(){return this.defaultPrevented}Nt.event=function(t){return p1&&(t=p1(t)),t.persist=J5,t.isPropagationStopped=Q5,t.isDefaultPrevented=e3,t.nativeEvent=t};var f1={configurable:!0,get:function(){return this.class}},m1=Nt.vnode;Nt.vnode=function(t){var e=t.type,n=t.props,r=n;if(typeof e=="string"){var o=e.indexOf("-")===-1;for(var d in r={},n){var p=n[d];X5&&d==="children"&&e==="noscript"||d==="value"&&"defaultValue"in n&&p==null||(d==="defaultValue"&&"value"in n&&n.value==null?d="value":d==="download"&&p===!0?p="":/ondoubleclick/i.test(d)?d="ondblclick":/^onchange(textarea|input)/i.test(d+e)&&!K5(n.type)?d="oninput":/^onfocus$/i.test(d)?d="onfocusin":/^onblur$/i.test(d)?d="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(d)?d=d.toLowerCase():o&&Y5.test(d)?d=d.replace(/[A-Z0-9]/g,"-$&").toLowerCase():p===null&&(p=void 0),/^oninput$/i.test(d)&&(d=d.toLowerCase(),r[d]&&(d="oninputCapture")),r[d]=p)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Jh(n.children).forEach(function(c){c.props.selected=r.value.indexOf(c.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=Jh(n.children).forEach(function(c){c.props.selected=r.multiple?r.defaultValue.indexOf(c.props.value)!=-1:r.defaultValue==c.props.value})),t.props=r,n.class!=n.className&&(f1.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",f1))}t.$$typeof=Z5,m1&&m1(t)};var g1=Nt.__r;Nt.__r=function(t){g1&&g1(t),t.__c};const y1=[],vg=new Map;function tp(t){y1.push(t),vg.forEach(e=>{b1(e,t)})}function t3(t){t.isConnected&&t.getRootNode&&_1(t.getRootNode())}function _1(t){let e=vg.get(t);if(!e||!e.isConnected){if(e=t.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");const n=r3();n&&(e.nonce=n);const r=t===document?document.head:t,o=t===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(e,o)}vg.set(t,e),n3(e)}}function n3(t){for(const e of y1)b1(t,e)}function b1(t,e){const{sheet:n}=t,r=n.cssRules.length;e.split("}").forEach((o,d)=>{o=o.trim(),o&&n.insertRule(o+"}",r+d)})}let wg;function r3(){return wg===void 0&&(wg=i3()),wg}function i3(){const t=document.querySelector('meta[name="csp-nonce"]');if(t&&t.hasAttribute("content"))return t.getAttribute("content");const e=document.querySelector("script[nonce]");return e&&e.nonce||""}typeof document<"u"&&_1(document);var s3=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';tp(s3);class kg{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:n}=this;n[e]=(n[e]||0)+1,this.clearTimeout()}resume(e="",n){let{pauseDepths:r}=this;e in r&&(n?delete r[e]:(r[e]-=1,r[e]<=0&&delete r[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Eg(t){t.parentNode&&t.parentNode.removeChild(t)}function jr(t,e){if(t.closest)return t.closest(e);if(!document.documentElement.contains(t))return null;do{if(o3(t,e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}function o3(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector).call(t,e)}function a3(t,e){let n=t instanceof HTMLElement?[t]:t,r=[];for(let o=0;o<n.length;o+=1){let d=n[o].querySelectorAll(e);for(let p=0;p<d.length;p+=1)r.push(d[p])}return r}const l3=/(top|left|right|bottom|width|height)$/i;function Ed(t,e){for(let n in e)x1(t,n,e[n])}function x1(t,e,n){n==null?t.style[e]="":typeof n=="number"&&l3.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function v1(t){var e,n;return(n=(e=t.composedPath)===null||e===void 0?void 0:e.call(t)[0])!==null&&n!==void 0?n:t.target}let w1=0;function No(){return w1+=1,"fc-dom-"+w1}function np(t){t.preventDefault()}function c3(t,e){return n=>{let r=jr(n.target,t);r&&e.call(r,n,r)}}function k1(t,e,n,r){let o=c3(n,r);return t.addEventListener(e,o),()=>{t.removeEventListener(e,o)}}function d3(t,e,n,r){let o;return k1(t,"mouseover",e,(d,p)=>{if(p!==o){o=p,n(d,p);let c=b=>{o=null,r(b,p),p.removeEventListener("mouseleave",c)};p.addEventListener("mouseleave",c)}})}const E1=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function u3(t,e){let n=r=>{e(r),E1.forEach(o=>{t.removeEventListener(o,n)})};E1.forEach(r=>{t.addEventListener(r,n)})}function C1(t){return Object.assign({onClick:t},S1(t))}function S1(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let T1=0;function Ba(){return T1+=1,String(T1)}function Cg(){document.body.classList.add("fc-not-allowed")}function Sg(){document.body.classList.remove("fc-not-allowed")}function h3(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",np)}function p3(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",np)}function f3(t){t.addEventListener("contextmenu",np)}function m3(t){t.removeEventListener("contextmenu",np)}function g3(t){let e=[],n=[],r,o;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),r=0;r<n.length;r+=1)o=n[r],typeof o=="string"?e.push(o.charAt(0)==="-"?{field:o.substring(1),order:-1}:{field:o,order:1}):typeof o=="function"&&e.push({func:o});return e}function y3(t,e,n){let r,o;for(r=0;r<n.length;r+=1)if(o=_3(t,e,n[r]),o)return o;return 0}function _3(t,e,n){return n.func?n.func(t,e):b3(t[n.field],e[n.field])*(n.order||1)}function b3(t,e){return!t&&!e?0:e==null?-1:t==null?1:typeof t=="string"||typeof e=="string"?String(t).localeCompare(String(e)):t-e}function Ul(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}function Cd(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((r,o,d)=>r.replace("$"+d,o||""),t):n}function x3(t,e){return t-e}function rp(t){return t%1===0}function v3(t){let e=t.querySelector(".fc-scrollgrid-shrink-frame"),n=t.querySelector(".fc-scrollgrid-shrink-cushion");if(!e)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return t.getBoundingClientRect().width-e.getBoundingClientRect().width+n.getBoundingClientRect().width}const A1=["years","months","days","milliseconds"],w3=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function on(t,e){return typeof t=="string"?k3(t):typeof t=="object"&&t?D1(t):typeof t=="number"?D1({[e||"milliseconds"]:t}):null}function k3(t){let e=w3.exec(t);if(e){let n=e[1]?-1:1;return{years:0,months:0,days:n*(e[2]?parseInt(e[2],10):0),milliseconds:n*((e[3]?parseInt(e[3],10):0)*60*60*1e3+(e[4]?parseInt(e[4],10):0)*60*1e3+(e[5]?parseInt(e[5],10):0)*1e3+(e[6]?parseInt(e[6],10):0))}}return null}function D1(t){let e={years:t.years||t.year||0,months:t.months||t.month||0,days:t.days||t.day||0,milliseconds:(t.hours||t.hour||0)*60*60*1e3+(t.minutes||t.minute||0)*60*1e3+(t.seconds||t.second||0)*1e3+(t.milliseconds||t.millisecond||t.ms||0)},n=t.weeks||t.week;return n&&(e.days+=n*7,e.specifiedWeeks=!0),e}function E3(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function Tg(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function C3(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function S3(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function T3(t){return Hl(t)/365}function A3(t){return Hl(t)/30}function Hl(t){return hs(t)/864e5}function hs(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function Ag(t,e){let n=null;for(let r=0;r<A1.length;r+=1){let o=A1[r];if(e[o]){let d=t[o]/e[o];if(!rp(d)||n!==null&&n!==d)return null;n=d}else if(t[o])return null}return n}function Dg(t){let e=t.milliseconds;if(e){if(e%1e3!==0)return{unit:"millisecond",value:e};if(e%(1e3*60)!==0)return{unit:"second",value:e/1e3};if(e%(1e3*60*60)!==0)return{unit:"minute",value:e/(1e3*60)};if(e)return{unit:"hour",value:e/(1e3*60*60)}}return t.days?t.specifiedWeeks&&t.days%7===0?{unit:"week",value:t.days/7}:{unit:"day",value:t.days}:t.months?{unit:"month",value:t.months}:t.years?{unit:"year",value:t.years}:{unit:"millisecond",value:0}}function Bo(t,e,n){if(t===e)return!0;let r=t.length,o;if(r!==e.length)return!1;for(o=0;o<r;o+=1)if(!(n?n(t[o],e[o]):t[o]===e[o]))return!1;return!0}const D3=["sun","mon","tue","wed","thu","fri","sat"];function M1(t,e){let n=Oo(t);return n[2]+=e*7,gi(n)}function Er(t,e){let n=Oo(t);return n[2]+=e,gi(n)}function Vo(t,e){let n=Oo(t);return n[6]+=e,gi(n)}function M3(t,e){return zo(t,e)/7}function zo(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function I3(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function P3(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function R3(t,e){return(e.valueOf()-t.valueOf())/1e3}function N3(t,e){let n=Un(t),r=Un(e);return{years:0,months:0,days:Math.round(zo(n,r)),milliseconds:e.valueOf()-r.valueOf()-(t.valueOf()-n.valueOf())}}function B3(t,e){let n=ip(t,e);return n!==null&&n%7===0?n/7:null}function ip(t,e){return Lo(t)===Lo(e)?Math.round(zo(t,e)):null}function Un(t){return gi([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function V3(t){return gi([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function z3(t){return gi([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function O3(t){return gi([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function L3(t,e,n){let r=t.getUTCFullYear(),o=Mg(t,r,e,n);if(o<1)return Mg(t,r-1,e,n);let d=Mg(t,r+1,e,n);return d>=1?Math.min(o,d):o}function Mg(t,e,n,r){let o=gi([e,0,1+F3(e,n,r)]),d=Un(t),p=Math.round(zo(o,d));return Math.floor(p/7)+1}function F3(t,e,n){let r=7+e-n;return-((7+gi([t,0,r]).getUTCDay()-e)%7)+r-1}function I1(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function P1(t){return new Date(t[0],t[1]||0,t[2]==null?1:t[2],t[3]||0,t[4]||0,t[5]||0)}function Oo(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function gi(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function R1(t){return!isNaN(t.valueOf())}function Lo(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}function N1(t,e,n=!1){let r=t.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(e==null?r=r.replace("Z",""):e!==0&&(r=r.replace("Z",Ig(e,!0)))),r}function Sd(t){return t.toISOString().replace(/T.*$/,"")}function $3(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function j3(t){return Ul(t.getUTCHours(),2)+":"+Ul(t.getUTCMinutes(),2)+":"+Ul(t.getUTCSeconds(),2)}function Ig(t,e=!1){let n=t<0?"-":"+",r=Math.abs(t),o=Math.floor(r/60),d=Math.round(r%60);return e?`${n+Ul(o,2)}:${Ul(d,2)}`:`GMT${n}${o}${d?`:${Ul(d,2)}`:""}`}function Pt(t,e,n){let r,o;return function(...d){if(!r)o=t.apply(this,d);else if(!Bo(r,d)){let p=t.apply(this,d);(!e||!e(p,o))&&(o=p)}return r=d,o}}function sp(t,e,n){let r,o;return d=>(r?ps(r,d)||(o=t.call(this,d)):o=t.call(this,d),r=d,o)}const Pg={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},op={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},ap=/\s*([ap])\.?m\.?/i,U3=/,/g,H3=/\s+/g,W3=/\u200e/g,q3=/UTC|GMT/;class G3{constructor(e){let n={},r={},o=9;for(let d in e)d in Pg?(r[d]=e[d],Pg[d]<9&&(o=Math.min(Pg[d],o))):(n[d]=e[d],d in op&&(o=Math.min(op[d],o)));this.standardDateProps=n,this.extendedSettings=r,this.smallestUnitNum=o,this.buildFormattingFunc=Pt(B1)}format(e,n){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,n)(e)}formatRange(e,n,r,o){let{standardDateProps:d,extendedSettings:p}=this,c=Q3(e.marker,n.marker,r.calendarSystem);if(!c)return this.format(e,r);let b=c;b>1&&(d.year==="numeric"||d.year==="2-digit")&&(d.month==="numeric"||d.month==="2-digit")&&(d.day==="numeric"||d.day==="2-digit")&&(b=1);let k=this.format(e,r),E=this.format(n,r);if(k===E)return k;let C=ez(d,b),T=B1(C,p,r),I=T(e),N=T(n),$=tz(k,I,E,N),F=p.separator||o||r.defaultSeparator||"";return $?$.before+I+F+N+$.after:k+F+E}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function B1(t,e,n){let r=Object.keys(t).length;return r===1&&t.timeZoneName==="short"?o=>Ig(o.timeZoneOffset):r===0&&e.week?o=>J3(n.computeWeekNumber(o.marker),n.weekText,n.weekTextLong,n.locale,e.week):Z3(t,e,n)}function Z3(t,e,n){t=Object.assign({},t),e=Object.assign({},e),Y3(t,e),t.timeZone="UTC";let r=new Intl.DateTimeFormat(n.locale.codes,t),o;if(e.omitZeroMinute){let d=Object.assign({},t);delete d.minute,o=new Intl.DateTimeFormat(n.locale.codes,d)}return d=>{let{marker:p}=d,c;o&&!p.getUTCMinutes()?c=o:c=r;let b=c.format(p);return X3(b,d,t,e,n)}}function Y3(t,e){t.timeZoneName&&(t.hour||(t.hour="2-digit"),t.minute||(t.minute="2-digit")),t.timeZoneName==="long"&&(t.timeZoneName="short"),e.omitZeroMinute&&(t.second||t.millisecond)&&delete e.omitZeroMinute}function X3(t,e,n,r,o){return t=t.replace(W3,""),n.timeZoneName==="short"&&(t=K3(t,o.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":Ig(e.timeZoneOffset))),r.omitCommas&&(t=t.replace(U3,"").trim()),r.omitZeroMinute&&(t=t.replace(":00","")),r.meridiem===!1?t=t.replace(ap,"").trim():r.meridiem==="narrow"?t=t.replace(ap,(d,p)=>p.toLocaleLowerCase()):r.meridiem==="short"?t=t.replace(ap,(d,p)=>`${p.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(t=t.replace(ap,d=>d.toLocaleLowerCase())),t=t.replace(H3," "),t=t.trim(),t}function K3(t,e){let n=!1;return t=t.replace(q3,()=>(n=!0,e)),n||(t+=` ${e}`),t}function J3(t,e,n,r,o){let d=[];return o==="long"?d.push(n):(o==="short"||o==="narrow")&&d.push(e),(o==="long"||o==="short")&&d.push(" "),d.push(r.simpleNumberFormat.format(t)),r.options.direction==="rtl"&&d.reverse(),d.join("")}function Q3(t,e,n){return n.getMarkerYear(t)!==n.getMarkerYear(e)?5:n.getMarkerMonth(t)!==n.getMarkerMonth(e)?4:n.getMarkerDay(t)!==n.getMarkerDay(e)?2:Lo(t)!==Lo(e)?1:0}function ez(t,e){let n={};for(let r in t)(!(r in op)||op[r]<=e)&&(n[r]=t[r]);return n}function tz(t,e,n,r){let o=0;for(;o<t.length;){let d=t.indexOf(e,o);if(d===-1)break;let p=t.substr(0,d);o=d+e.length;let c=t.substr(o),b=0;for(;b<n.length;){let k=n.indexOf(r,b);if(k===-1)break;let E=n.substr(0,k);b=k+r.length;let C=n.substr(b);if(p===E&&c===C)return{before:p,after:c}}}return null}function V1(t,e){let n=e.markerToArray(t.marker);return{marker:t.marker,timeZoneOffset:t.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function lp(t,e,n,r){let o=V1(t,n.calendarSystem),d=e?V1(e,n.calendarSystem):null;return{date:o,start:o,end:d,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class nz{constructor(e){this.cmdStr=e}format(e,n,r){return n.cmdFormatter(this.cmdStr,lp(e,null,n,r))}formatRange(e,n,r,o){return r.cmdFormatter(this.cmdStr,lp(e,n,r,o))}}class rz{constructor(e){this.func=e}format(e,n,r){return this.func(lp(e,null,n,r))}formatRange(e,n,r,o){return this.func(lp(e,n,r,o))}}function Yn(t){return typeof t=="object"&&t?new G3(t):typeof t=="string"?new nz(t):typeof t=="function"?new rz(t):null}const z1={navLinkDayClick:De,navLinkWeekClick:De,duration:on,bootstrapFontAwesome:De,buttonIcons:De,customButtons:De,defaultAllDayEventDuration:on,defaultTimedEventDuration:on,nextDayThreshold:on,scrollTime:on,scrollTimeReset:Boolean,slotMinTime:on,slotMaxTime:on,dayPopoverFormat:Yn,slotDuration:on,snapDuration:on,headerToolbar:De,footerToolbar:De,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Yn,dayHeaderClassNames:De,dayHeaderContent:De,dayHeaderDidMount:De,dayHeaderWillUnmount:De,dayCellClassNames:De,dayCellContent:De,dayCellDidMount:De,dayCellWillUnmount:De,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:De,weekNumbers:Boolean,weekNumberClassNames:De,weekNumberContent:De,weekNumberDidMount:De,weekNumberWillUnmount:De,editable:Boolean,viewClassNames:De,viewDidMount:De,viewWillUnmount:De,nowIndicator:Boolean,nowIndicatorClassNames:De,nowIndicatorContent:De,nowIndicatorDidMount:De,nowIndicatorWillUnmount:De,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:De,locale:De,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:De,eventOrder:g3,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:De,contentHeight:De,direction:String,weekNumberFormat:Yn,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:De,initialDate:De,now:De,eventDataTransform:De,stickyHeaderDates:De,stickyFooterScrollbar:De,viewHeight:De,defaultAllDay:Boolean,eventSourceFailure:De,eventSourceSuccess:De,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:De,eventConstraint:De,eventAllow:De,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:De,eventContent:De,eventDidMount:De,eventWillUnmount:De,selectConstraint:De,selectOverlap:De,selectAllow:De,droppable:Boolean,unselectCancel:String,slotLabelFormat:De,slotLaneClassNames:De,slotLaneContent:De,slotLaneDidMount:De,slotLaneWillUnmount:De,slotLabelClassNames:De,slotLabelContent:De,slotLabelDidMount:De,slotLabelWillUnmount:De,dayMaxEvents:De,dayMaxEventRows:De,dayMinWidth:Number,slotLabelInterval:on,allDayText:String,allDayClassNames:De,allDayContent:De,allDayDidMount:De,allDayWillUnmount:De,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Yn,rerenderDelay:Number,moreLinkText:De,moreLinkHint:De,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:De,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:on,hiddenDays:De,fixedWeekCount:Boolean,validRange:De,visibleRange:De,titleFormat:De,eventInteractive:Boolean,noEventsText:String,viewHint:De,navLinkHint:De,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:De,moreLinkClassNames:De,moreLinkContent:De,moreLinkDidMount:De,moreLinkWillUnmount:De,monthStartFormat:Yn,handleCustomRendering:De,customRenderingMetaMap:De,customRenderingReplaces:Boolean},Td={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},O1={datesSet:De,eventsSet:De,eventAdd:De,eventChange:De,eventRemove:De,windowResize:De,eventClick:De,eventMouseEnter:De,eventMouseLeave:De,select:De,unselect:De,loading:De,_unmount:De,_beforeprint:De,_afterprint:De,_noEventDrop:De,_noEventResize:De,_resize:De,_scrollRequest:De},L1={buttonText:De,buttonHints:De,views:De,plugins:De,initialEvents:De,events:De,eventSources:De},Va={headerToolbar:za,footerToolbar:za,buttonText:za,buttonHints:za,buttonIcons:za,dateIncrement:za,plugins:cp,events:cp,eventSources:cp,resources:cp};function za(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?ps(t,e):t===e}function cp(t,e){return Array.isArray(t)&&Array.isArray(e)?Bo(t,e):t===e}const iz={type:String,component:De,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:De,usesMinMaxTime:Boolean,classNames:De,content:De,didMount:De,willUnmount:De};function Rg(t){return Bg(t,Va)}function Ng(t,e){let n={},r={};for(let o in e)o in t&&(n[o]=e[o](t[o]));for(let o in t)o in e||(r[o]=t[o]);return{refined:n,extra:r}}function De(t){return t}const{hasOwnProperty:dp}=Object.prototype;function Bg(t,e){let n={};if(e){for(let r in e)if(e[r]===za){let o=[];for(let d=t.length-1;d>=0;d-=1){let p=t[d][r];if(typeof p=="object"&&p)o.unshift(p);else if(p!==void 0){n[r]=p;break}}o.length&&(n[r]=Bg(o))}}for(let r=t.length-1;r>=0;r-=1){let o=t[r];for(let d in o)d in n||(n[d]=o[d])}return n}function Oa(t,e){let n={};for(let r in t)e(t[r],r)&&(n[r]=t[r]);return n}function ro(t,e){let n={};for(let r in t)n[r]=e(t[r],r);return n}function F1(t){let e={};for(let n of t)e[n]=!0;return e}function Vg(t){let e=[];for(let n in t)e.push(t[n]);return e}function ps(t,e){if(t===e)return!0;for(let n in t)if(dp.call(t,n)&&!(n in e))return!1;for(let n in e)if(dp.call(e,n)&&t[n]!==e[n])return!1;return!0}const sz=/^on[A-Z]/;function oz(t,e){const n=az(t,e);for(let r of n)if(!sz.test(r))return!1;return!0}function az(t,e){let n=[];for(let r in t)dp.call(t,r)&&(r in e||n.push(r));for(let r in e)dp.call(e,r)&&t[r]!==e[r]&&n.push(r);return n}function zg(t,e,n={}){if(t===e)return!0;for(let r in e)if(!(r in t&&lz(t[r],e[r],n[r])))return!1;for(let r in t)if(!(r in e))return!1;return!0}function lz(t,e,n){return t===e||n===!0?!0:n?n(t,e):!1}function cz(t,e=0,n,r=1){let o=[];n==null&&(n=Object.keys(t).length);for(let d=e;d<n;d+=r){let p=t[d];p!==void 0&&o.push(p)}return o}let $1={};function dz(t,e){$1[t]=e}function uz(t){return new $1[t]}class hz{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return gi(e)}markerToArray(e){return Oo(e)}}dz("gregory",hz);const pz=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function fz(t){let e=pz.exec(t);if(e){let n=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?+`0.${e[12]}`*1e3:0));if(R1(n)){let r=null;return e[13]&&(r=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:r}}}return null}class mz{constructor(e){let n=this.timeZone=e.timeZone,r=n!=="local"&&n!=="UTC";e.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(n)),this.canComputeOffset=!!(!r||this.namedTimeZoneImpl),this.calendarSystem=uz(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay=="number"&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation=="function"&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText!=null?e.weekText:e.locale.options.weekText,this.weekTextLong=(e.weekTextLong!=null?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let n=this.createMarkerMeta(e);return n===null?null:n.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):gi(I1(new Date))}createMarkerMeta(e){if(typeof e=="string")return this.parse(e);let n=null;return typeof e=="number"?n=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(n=this.timestampToMarker(e))):Array.isArray(e)&&(n=gi(e)),n===null||!R1(n)?null:{marker:n,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let n=fz(e);if(n===null)return null;let{marker:r}=n,o=null;return n.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-n.timeZoneOffset*60*1e3):o=n.timeZoneOffset),{marker:r,isTimeUnspecified:n.isTimeUnspecified,forcedTzo:o}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n.years,r[1]+=n.months,r[2]+=n.days,r[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]-=n.years,r[1]-=n.months,r[2]-=n.days,r[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n,this.calendarSystem.arrayToMarker(r)}addMonths(e,n){let r=this.calendarSystem.markerToArray(e);return r[1]+=n,this.calendarSystem.arrayToMarker(r)}diffWholeYears(e,n){let{calendarSystem:r}=this;return Lo(e)===Lo(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)&&r.getMarkerMonth(e)===r.getMarkerMonth(n)?r.getMarkerYear(n)-r.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:r}=this;return Lo(e)===Lo(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)?r.getMarkerMonth(n)-r.getMarkerMonth(e)+(r.getMarkerYear(n)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let r=this.diffWholeYears(e,n);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,n),r!==null?{unit:"month",value:r}:(r=B3(e,n),r!==null?{unit:"week",value:r}:(r=ip(e,n),r!==null?{unit:"day",value:r}:(r=I3(e,n),rp(r)?{unit:"hour",value:r}:(r=P3(e,n),rp(r)?{unit:"minute",value:r}:(r=R3(e,n),rp(r)?{unit:"second",value:r}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,r){let o;return r.years&&(o=this.diffWholeYears(e,n),o!==null)?o/T3(r):r.months&&(o=this.diffWholeMonths(e,n),o!==null)?o/A3(r):r.days&&(o=ip(e,n),o!==null)?o/Hl(r):(n.valueOf()-e.valueOf())/hs(r)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?Un(e):n==="hour"?V3(e):n==="minute"?z3(e):n==="second"?O3(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):L3(e,this.weekDow,this.weekDoy)}format(e,n,r={}){return n.format({marker:e,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,n,r,o={}){return o.isEndExclusive&&(n=Vo(n,-1)),r.formatRange({marker:e,timeZoneOffset:o.forcedStartTzo!=null?o.forcedStartTzo:this.offsetForMarker(e)},{marker:n,timeZoneOffset:o.forcedEndTzo!=null?o.forcedEndTzo:this.offsetForMarker(n)},this,o.defaultSeparator)}formatIso(e,n={}){let r=null;return n.omitTimeZoneOffset||(n.forcedTzo!=null?r=n.forcedTzo:r=this.offsetForMarker(e)),N1(e,r,n.omitTime)}timestampToMarker(e){return this.timeZone==="local"?gi(I1(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):gi(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-P1(Oo(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Oo(e)):null}toDate(e,n){return this.timeZone==="local"?P1(Oo(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Oo(e))*1e3*60):new Date(e.valueOf()-(n||0))}}class Ad{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let n,r;if(typeof e=="object"&&e){n=Object.assign({},this.iconClasses);for(r in e)n[r]=this.applyIconOverridePrefix(e[r]);this.iconClasses=n}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let n=this.iconOverridePrefix;return n&&e.indexOf(n)!==0&&(e=n+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,n){let r;return n&&this.rtlIconClasses?r=this.rtlIconClasses[e]||this.iconClasses[e]:r=this.iconClasses[e],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(e){let n;return this.iconOverrideCustomButtonOption&&(n=e[this.iconOverrideCustomButtonOption],n)?`${this.baseIconClass} ${this.applyIconOverridePrefix(n)}`:""}}Ad.prototype.classes={},Ad.prototype.iconClasses={},Ad.prototype.baseIconClass="",Ad.prototype.iconOverridePrefix="";function up(t){t();let e=Nt.debounceRendering,n=[];function r(o){n.push(o)}for(Nt.debounceRendering=r,kd(le(gz,{}),document.createElement("div"));n.length;)n.shift()();Nt.debounceRendering=e}class gz extends Ai{render(){return le("div",{})}componentDidMount(){this.setState({})}}function j1(t){let e=F5(t),n=e.Provider;return e.Provider=function(){let r=!this.getChildContext,o=n.apply(this,arguments);if(r){let d=[];this.shouldComponentUpdate=p=>{this.props.value!==p.value&&d.forEach(c=>{c.context=p.value,c.forceUpdate()})},this.sub=p=>{d.push(p);let c=p.componentWillUnmount;p.componentWillUnmount=()=>{d.splice(d.indexOf(p),1),c&&c.call(p)}}}return o},e}class yz{constructor(e,n,r,o){this.execFunc=e,this.emitter=n,this.scrollTime=r,this.scrollTimeReset=o,this.handleScrollRequest=d=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},d),this.drain()},n.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const io=j1({});function _z(t,e,n,r,o,d,p,c,b,k,E,C,T,I){return{dateEnv:o,nowManager:d,options:n,pluginHooks:c,emitter:E,dispatch:b,getCurrentData:k,calendarApi:C,viewSpec:t,viewApi:e,dateProfileGenerator:r,theme:p,isRtl:n.direction==="rtl",addResizeHandler(N){E.on("_resize",N)},removeResizeHandler(N){E.off("_resize",N)},createScrollResponder(N){return new yz(N,E,on(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:T,unregisterInteractiveComponent:I}}class La extends Ai{shouldComponentUpdate(e,n){return!zg(this.props,e,this.propEquality)||!zg(this.state,n,this.stateEquality)}safeSetState(e){zg(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}La.addPropsEquality=bz,La.addStateEquality=xz,La.contextType=io,La.prototype.propEquality={},La.prototype.stateEquality={};class bn extends La{}bn.contextType=io;function bz(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function xz(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function Ms(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class Og extends bn{constructor(){super(...arguments),this.id=Ba(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:n}=this.context,{generatorName:r}=this.props;(!n.customRenderingReplaces||!Lg(r,n))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Ms(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:r}=n,{customGenerator:o,defaultGenerator:d,renderProps:p}=e,c=U1(e,[],this.handleEl);let b=!1,k,E=[],C;if(o!=null){const T=typeof o=="function"?o(p,le):o;if(T===!0)b=!0;else{const I=T&&typeof T=="object";I&&"html"in T?c.dangerouslySetInnerHTML={__html:T.html}:I&&"domNodes"in T?E=Array.prototype.slice.call(T.domNodes):(I?Nv(T):typeof T!="function")?k=T:C=T}}else b=!Lg(e.generatorName,r);return b&&d&&(k=d(p)),this.queuedDomNodes=E,this.currentGeneratorMeta=C,le(e.elTag,c,k)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var n;const{props:r,context:o}=this,{handleCustomRendering:d,customRenderingMetaMap:p}=o.options;if(d){const c=(n=this.currentGeneratorMeta)!==null&&n!==void 0?n:p==null?void 0:p[r.generatorName];c&&d(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:c},r),{elClasses:(r.elClasses||[]).filter(vz)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,r=this.base;if(!Bo(e,n)){n.forEach(Eg);for(let o of e)r.appendChild(o);this.currentDomNodes=e}}}Og.addPropsEquality({elClasses:Bo,elStyle:ps,elAttrs:oz,renderProps:ps});function Lg(t,e){var n;return!!(e.handleCustomRendering&&t&&(!((n=e.customRenderingMetaMap)===null||n===void 0)&&n[t]))}function U1(t,e,n){const r=Object.assign(Object.assign({},t.elAttrs),{ref:n});return(t.elClasses||e)&&(r.className=(t.elClasses||[]).concat(e||[]).concat(r.className||[]).filter(Boolean).join(" ")),t.elStyle&&(r.style=t.elStyle),r}function vz(t){return!!t}const H1=j1(0);class Ur extends Ai{constructor(){super(...arguments),this.InnerContent=wz.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Ms(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=kz(e.classNameGenerator,e.renderProps);if(e.children){const r=U1(e,n,this.handleEl),o=e.children(this.InnerContent,e.renderProps,r);return e.elTag?le(e.elTag,r,o):o}else return le(Og,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(n),renderId:this.context}))}componentDidMount(){var e,n;this.el?(n=(e=this.props).didMount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,n;(n=(e=this.props).willUnmount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}Ur.contextType=H1;function wz(t,e){const n=t.props;return le(Og,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context},e))}function kz(t,e){const n=typeof t=="function"?t(e):t||[];return typeof n=="string"?[n]:n}class Dd extends bn{render(){let{props:e,context:n}=this,{options:r}=n,o={view:n.viewApi};return le(Ur,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:[...W1(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount},()=>e.children)}}function W1(t){return[`fc-${t.type}-view`,"fc-view"]}function Ez(t,e){let n=null,r=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(r=e.createMarker(t.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function q1(t,e){let n=[],{start:r}=e,o,d;for(t.sort(Cz),o=0;o<t.length;o+=1)d=t[o],d.start>r&&n.push({start:r,end:d.start}),d.end>r&&(r=d.end);return r<e.end&&n.push({start:r,end:e.end}),n}function Cz(t,e){return t.start.valueOf()-e.start.valueOf()}function Fo(t,e){let{start:n,end:r}=t,o=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(r===null?r=e.end:r=new Date(Math.min(r.valueOf(),e.end.valueOf()))),(n===null||r===null||n<r)&&(o={start:n,end:r}),o}function Sz(t,e){return(t.start===null?null:t.start.valueOf())===(e.start===null?null:e.start.valueOf())&&(t.end===null?null:t.end.valueOf())===(e.end===null?null:e.end.valueOf())}function Fg(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function hp(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function so(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function Tz(t,e){return e.start!=null&&t<e.start?e.start:e.end!=null&&t>=e.end?new Date(e.end.valueOf()-1):t}function G1(t){let e=Math.floor(zo(t.start,t.end))||1,n=Un(t.start),r=Er(n,e);return{start:n,end:r}}function $g(t,e=on(0)){let n=null,r=null;if(t.end){r=Un(t.end);let o=t.end.valueOf()-r.valueOf();o&&o>=hs(e)&&(r=Er(r,1))}return t.start&&(n=Un(t.start),r&&r<=n&&(r=Er(n,1))),{start:n,end:r}}function Az(t){let e=$g(t);return zo(e.start,e.end)>1}function Wl(t,e,n,r){return r==="year"?on(n.diffWholeYears(t,e),"year"):r==="month"?on(n.diffWholeMonths(t,e),"month"):N3(t,e)}class Z1{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,n,r){let{dateEnv:o}=this.props,d=o.subtract(o.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(d,-1,r)}buildNext(e,n,r){let{dateEnv:o}=this.props,d=o.add(o.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(d,1,r)}build(e,n,r=!0){let{props:o}=this,d,p,c,b,k,E;return d=this.buildValidRange(),d=this.trimHiddenDays(d),r&&(e=Tz(e,d)),p=this.buildCurrentRangeInfo(e,n),c=/^(year|month|week|day)$/.test(p.unit),b=this.buildRenderRange(this.trimHiddenDays(p.range),p.unit,c),b=this.trimHiddenDays(b),k=b,o.showNonCurrentDates||(k=Fo(k,p.range)),k=this.adjustActiveRange(k),k=Fo(k,d),E=Fg(p.range,d),so(b,e)||(e=b.start),{currentDate:e,validRange:d,currentRange:p.range,currentRangeUnit:p.unit,isRangeAllDay:c,activeRange:k,renderRange:b,slotMinTime:o.slotMinTime,slotMaxTime:o.slotMaxTime,isValid:E,dateIncrement:this.buildDateIncrement(p.duration)}}buildValidRange(){let e=this.props.validRangeInput,n=typeof e=="function"?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(n)||{start:null,end:null}}buildCurrentRangeInfo(e,n){let{props:r}=this,o=null,d=null,p=null,c;return r.duration?(o=r.duration,d=r.durationUnit,p=this.buildRangeFromDuration(e,n,o,d)):(c=this.props.dayCount)?(d="day",p=this.buildRangeFromDayCount(e,n,c)):(p=this.buildCustomVisibleRange(e))?d=r.dateEnv.greatestWholeUnit(p.start,p.end).unit:(o=this.getFallbackDuration(),d=Dg(o).unit,p=this.buildRangeFromDuration(e,n,o,d)),{duration:o,unit:d,range:p}}getFallbackDuration(){return on({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:r,slotMinTime:o,slotMaxTime:d}=this.props,{start:p,end:c}=e;return r&&(Hl(o)<0&&(p=Un(p),p=n.add(p,o)),Hl(d)>1&&(c=Un(c),c=Er(c,-1),c=n.add(c,d))),{start:p,end:c}}buildRangeFromDuration(e,n,r,o){let{dateEnv:d,dateAlignment:p}=this.props,c,b,k;if(!p){let{dateIncrement:C}=this.props;C&&hs(C)<hs(r)?p=Dg(C).unit:p=o}Hl(r)<=1&&this.isHiddenDay(c)&&(c=this.skipHiddenDays(c,n),c=Un(c));function E(){c=d.startOf(e,p),b=d.add(c,r),k={start:c,end:b}}return E(),this.trimHiddenDays(k)||(e=this.skipHiddenDays(e,n),E()),k}buildRangeFromDayCount(e,n,r){let{dateEnv:o,dateAlignment:d}=this.props,p=0,c=e,b;d&&(c=o.startOf(c,d)),c=Un(c),c=this.skipHiddenDays(c,n),b=c;do b=Er(b,1),this.isHiddenDay(b)||(p+=1);while(p<r);return{start:c,end:b}}buildCustomVisibleRange(e){let{props:n}=this,r=n.visibleRangeInput,o=typeof r=="function"?r.call(n.calendarApi,n.dateEnv.toDate(e)):r,d=this.refineRange(o);return d&&(d.start==null||d.end==null)?null:d}buildRenderRange(e,n,r){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,r;return n||((r=this.props.dateAlignment)?on(1,r):e||on({days:1}))}refineRange(e){if(e){let n=Ez(e,this.props.dateEnv);return n&&(n=$g(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],r=0,o;for(this.props.weekends===!1&&e.push(0,6),o=0;o<7;o+=1)(n[o]=e.indexOf(o)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:r}=e;return n&&(n=this.skipHiddenDays(n)),r&&(r=this.skipHiddenDays(r,-1,!0)),n==null||r==null||n<r?{start:n,end:r}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,r=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(r?n:0)+7)%7];)e=Er(e,n);return e}}function jg(t,e,n,r){return{instanceId:Ba(),defId:t,range:e,forcedStartTzo:n??null,forcedEndTzo:r??null}}function Dz(t,e,n,r){for(let o=0;o<r.length;o+=1){let d=r[o].parse(t,n);if(d){let{allDay:p}=t;return p==null&&(p=e,p==null&&(p=d.allDayGuess,p==null&&(p=!1))),{allDay:p,duration:d.duration,typeData:d.typeData,typeId:o}}}return null}function Fa(t,e,n){let{dateEnv:r,pluginHooks:o,options:d}=n,{defs:p,instances:c}=t;c=Oa(c,b=>!p[b.defId].recurringDef);for(let b in p){let k=p[b];if(k.recurringDef){let{duration:E}=k.recurringDef;E||(E=k.allDay?d.defaultAllDayEventDuration:d.defaultTimedEventDuration);let C=Mz(k,E,e,r,o.recurringTypes);for(let T of C){let I=jg(b,{start:T,end:r.add(T,E)});c[I.instanceId]=I}}}return{defs:p,instances:c}}function Mz(t,e,n,r,o){let p=o[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:r.subtract(n.start,e),end:n.end},r);return t.allDay&&(p=p.map(Un)),p}const pp={id:String,groupId:String,title:String,url:String,interactive:Boolean},Y1={start:De,end:De,date:De,allDay:Boolean},Iz=Object.assign(Object.assign(Object.assign({},pp),Y1),{extendedProps:De});function X1(t,e,n,r,o=Ug(n),d,p){let{refined:c,extra:b}=K1(t,n,o),k=Rz(e,n),E=Dz(c,k,n.dateEnv,n.pluginHooks.recurringTypes);if(E){let T=Hg(c,b,e?e.sourceId:"",E.allDay,!!E.duration,n,d);return T.recurringDef={typeId:E.typeId,typeData:E.typeData,duration:E.duration},{def:T,instance:null}}let C=Pz(c,k,n,r);if(C){let T=Hg(c,b,e?e.sourceId:"",C.allDay,C.hasEnd,n,d),I=jg(T.defId,C.range,C.forcedStartTzo,C.forcedEndTzo);return p&&T.publicId&&p[T.publicId]&&(I.instanceId=p[T.publicId]),{def:T,instance:I}}return null}function K1(t,e,n=Ug(e)){return Ng(t,n)}function Ug(t){return Object.assign(Object.assign(Object.assign({},mp),Iz),t.pluginHooks.eventRefiners)}function Hg(t,e,n,r,o,d,p){let c={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(p&&t.id?p[t.id]:"")||Ba(),sourceId:n,allDay:r,hasEnd:o,interactive:t.interactive,ui:gp(t,d),extendedProps:Object.assign(Object.assign({},t.extendedProps||{}),e)};for(let b of d.pluginHooks.eventDefMemberAdders)Object.assign(c,b(t));return Object.freeze(c.ui.classNames),Object.freeze(c.extendedProps),c}function Pz(t,e,n,r){let{allDay:o}=t,d,p=null,c=!1,b,k=null,E=t.start!=null?t.start:t.date;if(d=n.dateEnv.createMarkerMeta(E),d)p=d.marker;else if(!r)return null;return t.end!=null&&(b=n.dateEnv.createMarkerMeta(t.end)),o==null&&(e!=null?o=e:o=(!d||d.isTimeUnspecified)&&(!b||b.isTimeUnspecified)),o&&p&&(p=Un(p)),b&&(k=b.marker,o&&(k=Un(k)),p&&k<=p&&(k=null)),k?c=!0:r||(c=n.options.forceEventDuration||!1,k=n.dateEnv.add(p,o?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:o,hasEnd:c,range:{start:p,end:k},forcedStartTzo:d?d.forcedTzo:null,forcedEndTzo:b?b.forcedTzo:null}}function Rz(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}function Md(t,e,n,r,o,d){let p=Di(),c=Ug(n);for(let b of t){let k=X1(b,e,n,r,c,o,d);k&&Wg(k,p)}return p}function Wg(t,e=Di()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function qg(t,e){let n=t.instances[e];if(n){let r=t.defs[n.defId],o=fp(t,d=>Nz(r,d));return o.defs[r.defId]=r,o.instances[n.instanceId]=n,o}return Di()}function Nz(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function Di(){return{defs:{},instances:{}}}function Gg(t,e){return{defs:Object.assign(Object.assign({},t.defs),e.defs),instances:Object.assign(Object.assign({},t.instances),e.instances)}}function fp(t,e){let n=Oa(t.defs,e),r=Oa(t.instances,o=>n[o.defId]);return{defs:n,instances:r}}function Bz(t,e){let{defs:n,instances:r}=t,o={},d={};for(let p in n)e.defs[p]||(o[p]=n[p]);for(let p in r)!e.instances[p]&&o[r[p].defId]&&(d[p]=r[p]);return{defs:o,instances:d}}function Vz(t,e){return Array.isArray(t)?Md(t,null,e,!0):typeof t=="object"&&t?Md([t],null,e,!0):t!=null?String(t):null}function J1(t){return Array.isArray(t)?t:typeof t=="string"?t.split(/\s+/):[]}const mp={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:De,overlap:De,allow:De,className:J1,classNames:J1,color:String,backgroundColor:String,borderColor:String,textColor:String},zz={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function gp(t,e){let n=Vz(t.constraint,e);return{display:t.display||null,startEditable:t.startEditable!=null?t.startEditable:t.editable,durationEditable:t.durationEditable!=null?t.durationEditable:t.editable,constraints:n!=null?[n]:[],overlap:t.overlap!=null?t.overlap:null,allows:t.allow!=null?[t.allow]:[],backgroundColor:t.backgroundColor||t.color||"",borderColor:t.borderColor||t.color||"",textColor:t.textColor||"",classNames:(t.className||[]).concat(t.classNames||[])}}function Q1(t){return t.reduce(Oz,zz)}function Oz(t,e){return{display:e.display!=null?e.display:t.display,startEditable:e.startEditable!=null?e.startEditable:t.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:t.durationEditable,constraints:t.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:t.overlap,allows:t.allows.concat(e.allows),backgroundColor:e.backgroundColor||t.backgroundColor,borderColor:e.borderColor||t.borderColor,textColor:e.textColor||t.textColor,classNames:t.classNames.concat(e.classNames)}}const Lz={id:String,defaultAllDay:Boolean,url:String,format:String,events:De,eventDataTransform:De,success:De,failure:De};function ew(t,e,n=tw(e)){let r;if(typeof t=="string"?r={url:t}:typeof t=="function"||Array.isArray(t)?r={events:t}:typeof t=="object"&&t&&(r=t),r){let{refined:o,extra:d}=Ng(r,n),p=Fz(o,e);if(p)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:Ba(),sourceDefId:p.sourceDefId,meta:p.meta,ui:gp(o,e),extendedProps:d}}return null}function tw(t){return Object.assign(Object.assign(Object.assign({},mp),Lz),t.pluginHooks.eventSourceRefiners)}function Fz(t,e){let n=e.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let d=n[r].parseMeta(t);if(d)return{sourceDefId:r,meta:d}}return null}function $z(t,e,n,r,o){switch(e.type){case"RECEIVE_EVENTS":return jz(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,o);case"RESET_RAW_EVENTS":return Uz(t,n[e.sourceId],e.rawEvents,r.activeRange,o);case"ADD_EVENTS":return Hz(t,e.eventStore,r?r.activeRange:null,o);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return Gg(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Fa(t,r.activeRange,o):t;case"REMOVE_EVENTS":return Bz(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return sw(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return fp(t,d=>!d.sourceId);case"REMOVE_ALL_EVENTS":return Di();default:return t}}function jz(t,e,n,r,o,d){if(e&&n===e.latestFetchId){let p=Md(nw(o,e,d),e,d);return r&&(p=Fa(p,r,d)),Gg(sw(t,e.sourceId),p)}return t}function Uz(t,e,n,r,o){const{defIdMap:d,instanceIdMap:p}=qz(t);let c=Md(nw(n,e,o),e,o,!1,d,p);return Fa(c,r,o)}function nw(t,e,n){let r=n.options.eventDataTransform,o=e?e.eventDataTransform:null;return o&&(t=rw(t,o)),r&&(t=rw(t,r)),t}function rw(t,e){let n;if(!e)n=t;else{n=[];for(let r of t){let o=e(r);o?n.push(o):o==null&&n.push(r)}}return n}function Hz(t,e,n,r){return n&&(e=Fa(e,n,r)),Gg(t,e)}function iw(t,e,n){let{defs:r}=t,o=ro(t.instances,d=>r[d.defId].allDay?d:Object.assign(Object.assign({},d),{range:{start:n.createMarker(e.toDate(d.range.start,d.forcedStartTzo)),end:n.createMarker(e.toDate(d.range.end,d.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:d.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:d.forcedEndTzo}));return{defs:r,instances:o}}function sw(t,e){return fp(t,n=>n.sourceId!==e)}function Wz(t,e){return{defs:t.defs,instances:Oa(t.instances,n=>!e[n.instanceId])}}function qz(t){const{defs:e,instances:n}=t,r={},o={};for(let d in e){const p=e[d],{publicId:c}=p;c&&(r[c]=d)}for(let d in n){const p=n[d],c=e[p.defId],{publicId:b}=c;b&&(o[b]=d)}return{defIdMap:r,instanceIdMap:o}}class yp{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){Gz(this.handlers,e,n)}off(e,n){Zz(this.handlers,e,n)}trigger(e,...n){let r=this.handlers[e]||[],o=this.options&&this.options[e],d=[].concat(o||[],r);for(let p of d)p.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function Gz(t,e,n){(t[e]||(t[e]=[])).push(n)}function Zz(t,e,n){n?t[e]&&(t[e]=t[e].filter(r=>r!==n)):delete t[e]}const Yz={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Xz(t,e){return Md(Kz(t),null,e)}function Kz(t){let e;return t===!0?e=[{}]:Array.isArray(t)?e=t.filter(n=>n.daysOfWeek):typeof t=="object"&&t?e=[t]:e=[],e=e.map(n=>Object.assign(Object.assign({},Yz),n)),e}function ow(t,e,n){n.emitter.trigger("select",Object.assign(Object.assign({},Zg(t,n)),{jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Jz(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function Zg(t,e){let n={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(n,r(t,e));return Object.assign(n,hO(t,e.dateEnv)),n}function aw(t,e,n){let{dateEnv:r,options:o}=n,d=e;return t?(d=Un(d),d=r.add(d,o.defaultAllDayEventDuration)):d=r.add(d,o.defaultTimedEventDuration),d}function Yg(t,e,n,r){let o=_p(t.defs,e),d=Di();for(let p in t.defs){let c=t.defs[p];d.defs[p]=Qz(c,o[p],n,r)}for(let p in t.instances){let c=t.instances[p],b=d.defs[c.defId];d.instances[p]=eO(c,b,o[c.defId],n,r)}return d}function Qz(t,e,n,r){let o=n.standardProps||{};o.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);let d=Object.assign(Object.assign(Object.assign({},t),o),{ui:Object.assign(Object.assign({},t.ui),o.ui)});n.extendedProps&&(d.extendedProps=Object.assign(Object.assign({},d.extendedProps),n.extendedProps));for(let p of r.pluginHooks.eventDefMutationAppliers)p(d,n,r);return!d.hasEnd&&r.options.forceEventDuration&&(d.hasEnd=!0),d}function eO(t,e,n,r,o){let{dateEnv:d}=o,p=r.standardProps&&r.standardProps.allDay===!0,c=r.standardProps&&r.standardProps.hasEnd===!1,b=Object.assign({},t);return p&&(b.range=G1(b.range)),r.datesDelta&&n.startEditable&&(b.range={start:d.add(b.range.start,r.datesDelta),end:d.add(b.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(b.range={start:d.add(b.range.start,r.startDelta),end:b.range.end}),r.endDelta&&n.durationEditable&&(b.range={start:b.range.start,end:d.add(b.range.end,r.endDelta)}),c&&(b.range={start:b.range.start,end:aw(e.allDay,b.range.start,o)}),e.allDay&&(b.range={start:Un(b.range.start),end:Un(b.range.end)}),b.range.end<b.range.start&&(b.range.end=aw(e.allDay,b.range.start,o)),b}class ql{constructor(e,n){this.context=e,this.internalEventSource=n}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class Qn{constructor(e,n,r){this._context=e,this._def=n,this._instance=r||null}setProp(e,n){if(e in Y1)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")n=pp[e](n),this.mutate({standardProps:{publicId:n}});else if(e in pp)n=pp[e](n),this.mutate({standardProps:{[e]:n}});else if(e in mp){let r=mp[e](n);e==="color"?r={backgroundColor:n,borderColor:n}:e==="editable"?r={startEditable:n,durationEditable:n}:r={[e]:n},this.mutate({standardProps:{ui:r}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:r}=this._context,o=r.createMarker(e);if(o&&this._instance){let d=this._instance.range,p=Wl(d.start,o,r,n.granularity);n.maintainDuration?this.mutate({datesDelta:p}):this.mutate({startDelta:p})}}setEnd(e,n={}){let{dateEnv:r}=this._context,o;if(!(e!=null&&(o=r.createMarker(e),!o))&&this._instance)if(o){let d=Wl(this._instance.range.end,o,r,n.granularity);this.mutate({endDelta:d})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,r={}){let{dateEnv:o}=this._context,d={allDay:r.allDay},p=o.createMarker(e),c;if(p&&!(n!=null&&(c=o.createMarker(n),!c))&&this._instance){let b=this._instance.range;r.allDay===!0&&(b=G1(b));let k=Wl(b.start,p,o,r.granularity);if(c){let E=Wl(b.end,c,o,r.granularity);E3(k,E)?this.mutate({datesDelta:k,standardProps:d}):this.mutate({startDelta:k,endDelta:E,standardProps:d})}else d.hasEnd=!1,this.mutate({datesDelta:k,standardProps:d})}}moveStart(e){let n=on(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=on(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=on(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let r={allDay:e},{maintainDuration:o}=n;o==null&&(o=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=o),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:n}=this._context,r=this._instance,o=Yn(e);return this._def.hasEnd?n.formatRange(r.range.start,r.range.end,o,{forcedStartTzo:r.forcedStartTzo,forcedEndTzo:r.forcedEndTzo}):n.format(r.range.start,o,{forcedTzo:r.forcedStartTzo})}mutate(e){let n=this._instance;if(n){let r=this._def,o=this._context,{eventStore:d}=o.getCurrentData(),p=qg(d,n.instanceId);p=Yg(p,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,o);let b=new Qn(o,r,n);this._def=p.defs[r.defId],this._instance=p.instances[n.instanceId],o.dispatch({type:"MERGE_EVENTS",eventStore:p}),o.emitter.trigger("eventChange",{oldEvent:b,event:this,relatedEvents:$a(p,o,n),revert(){o.dispatch({type:"RESET_EVENTS",eventStore:d})}})}}remove(){let e=this._context,n=lw(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:n}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:n})}})}get source(){let{sourceId:e}=this._def;return e?new ql(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let n=this._def,{ui:r}=n,{startStr:o,endStr:d}=this,p={allDay:n.allDay};return n.title&&(p.title=n.title),o&&(p.start=o),d&&(p.end=d),n.publicId&&(p.id=n.publicId),n.groupId&&(p.groupId=n.groupId),n.url&&(p.url=n.url),r.display&&r.display!=="auto"&&(p.display=r.display),e.collapseColor&&r.backgroundColor&&r.backgroundColor===r.borderColor?p.color=r.backgroundColor:(r.backgroundColor&&(p.backgroundColor=r.backgroundColor),r.borderColor&&(p.borderColor=r.borderColor)),r.textColor&&(p.textColor=r.textColor),r.classNames.length&&(p.classNames=r.classNames),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(p,n.extendedProps):p.extendedProps=n.extendedProps),p}toJSON(){return this.toPlainObject()}}function lw(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function $a(t,e,n){let{defs:r,instances:o}=t,d=[],p=n?n.instanceId:"";for(let c in o){let b=o[c],k=r[b.defId];b.instanceId!==p&&d.push(new Qn(e,k,b))}return d}function Xg(t,e,n,r){let o={},d={},p={},c=[],b=[],k=_p(t.defs,e);for(let E in t.defs){let C=t.defs[E];k[C.defId].display==="inverse-background"&&(C.groupId?(o[C.groupId]=[],p[C.groupId]||(p[C.groupId]=C)):d[E]=[])}for(let E in t.instances){let C=t.instances[E],T=t.defs[C.defId],I=k[T.defId],N=C.range,$=!T.allDay&&r?$g(N,r):N,F=Fo($,n);F&&(I.display==="inverse-background"?T.groupId?o[T.groupId].push(F):d[C.defId].push(F):I.display!=="none"&&(I.display==="background"?c:b).push({def:T,ui:I,instance:C,range:F,isStart:$.start&&$.start.valueOf()===F.start.valueOf(),isEnd:$.end&&$.end.valueOf()===F.end.valueOf()}))}for(let E in o){let C=o[E],T=q1(C,n);for(let I of T){let N=p[E],$=k[N.defId];c.push({def:N,ui:$,instance:null,range:I,isStart:!1,isEnd:!1})}}for(let E in d){let C=d[E],T=q1(C,n);for(let I of T)c.push({def:t.defs[E],ui:k[E],instance:null,range:I,isStart:!1,isEnd:!1})}return{bg:c,fg:b}}function tO(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function cw(t,e){t.fcSeg=e}function Gl(t){return t.fcSeg||t.parentNode.fcSeg||null}function _p(t,e){return ro(t,n=>dw(n,e))}function dw(t,e){let n=[];return e[""]&&n.push(e[""]),e[t.defId]&&n.push(e[t.defId]),n.push(t.ui),Q1(n)}function Kg(t,e){let n=t.map(nO);return n.sort((r,o)=>y3(r,o,e)),n.map(r=>r._seg)}function nO(t){let{eventRange:e}=t,n=e.def,r=e.instance?e.instance.range:e.range,o=r.start?r.start.valueOf():0,d=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:o,end:d,duration:d-o,allDay:Number(n.allDay),_seg:t})}function rO(t,e){let{pluginHooks:n}=e,r=n.isDraggableTransformers,{def:o,ui:d}=t.eventRange,p=d.startEditable;for(let c of r)p=c(p,o,d,e);return p}function iO(t,e){return t.isStart&&t.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function sO(t,e){return t.isEnd&&t.eventRange.ui.durationEditable}function Id(t,e,n,r,o,d,p){let{dateEnv:c,options:b}=n,{displayEventTime:k,displayEventEnd:E}=b,C=t.eventRange.def,T=t.eventRange.instance;k==null&&(k=r!==!1),E==null&&(E=o!==!1);let I=T.range.start,N=T.range.end,$=d||t.start||t.eventRange.range.start,F=p||t.end||t.eventRange.range.end,q=Un(I).valueOf()===Un($).valueOf(),J=Un(Vo(N,-1)).valueOf()===Un(Vo(F,-1)).valueOf();return k&&!C.allDay&&(q||J)?($=q?I:$,F=J?N:F,E&&C.hasEnd?c.formatRange($,F,e,{forcedStartTzo:d?null:T.forcedStartTzo,forcedEndTzo:p?null:T.forcedEndTzo}):c.format($,e,{forcedTzo:d?null:T.forcedStartTzo})):""}function oo(t,e,n){let r=t.eventRange.range;return{isPast:r.end<=(n||e.start),isFuture:r.start>=(n||e.end),isToday:e&&so(e,r.start)}}function oO(t){let e=["fc-event"];return t.isMirror&&e.push("fc-event-mirror"),t.isDraggable&&e.push("fc-event-draggable"),(t.isStartResizable||t.isEndResizable)&&e.push("fc-event-resizable"),t.isDragging&&e.push("fc-event-dragging"),t.isResizing&&e.push("fc-event-resizing"),t.isSelected&&e.push("fc-event-selected"),t.isStart&&e.push("fc-event-start"),t.isEnd&&e.push("fc-event-end"),t.isPast&&e.push("fc-event-past"),t.isToday&&e.push("fc-event-today"),t.isFuture&&e.push("fc-event-future"),e}function uw(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function Jg(t,e){let{def:n,instance:r}=t.eventRange,{url:o}=n;if(o)return{href:o};let{emitter:d,options:p}=e,{eventInteractive:c}=p;return c==null&&(c=n.interactive,c==null&&(c=!!d.hasHandlers("eventClick"))),c?S1(b=>{d.trigger("eventClick",{el:b.target,event:new Qn(e,n,r),jsEvent:b,view:e.viewApi})}):{}}const aO={start:De,end:De,allDay:Boolean};function lO(t,e,n){let r=cO(t,e),{range:o}=r;if(!o.start)return null;if(!o.end){if(n==null)return null;o.end=e.add(o.start,n)}return r}function cO(t,e){let{refined:n,extra:r}=Ng(t,aO),o=n.start?e.createMarkerMeta(n.start):null,d=n.end?e.createMarkerMeta(n.end):null,{allDay:p}=n;return p==null&&(p=o&&o.isTimeUnspecified&&(!d||d.isTimeUnspecified)),Object.assign({range:{start:o?o.marker:null,end:d?d.marker:null},allDay:p},r)}function dO(t,e){return Sz(t.range,e.range)&&t.allDay===e.allDay&&uO(t,e)}function uO(t,e){for(let n in e)if(n!=="range"&&n!=="allDay"&&t[n]!==e[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}function hO(t,e){return Object.assign(Object.assign({},pw(t.range,e,t.allDay)),{allDay:t.allDay})}function hw(t,e,n){return Object.assign(Object.assign({},pw(t,e,n)),{timeZone:e.timeZone})}function pw(t,e,n){return{start:e.toDate(t.start),end:e.toDate(t.end),startStr:e.formatIso(t.start,{omitTime:n}),endStr:e.formatIso(t.end,{omitTime:n})}}function pO(t,e,n){let r=K1({editable:!1},n),o=Hg(r.refined,r.extra,"",t.allDay,!0,n);return{def:o,ui:dw(o,e),instance:jg(o.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function fO(t,e,n){let r=!1,o=function(c){r||(r=!0,e(c))},d=function(c){r||(r=!0,n(c))},p=t(o,d);p&&typeof p.then=="function"&&p.then(o,d)}class fw extends Error{constructor(e,n){super(e),this.response=n}}function mO(t,e,n){t=t.toUpperCase();const r={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,r).then(o=>{if(o.ok)return o.json().then(d=>[d,o],()=>{throw new fw("Failure parsing JSON",o)});throw new fw("Request failed",o)})}let Qg;function mw(){return Qg==null&&(Qg=gO()),Qg}function gO(){if(typeof document>"u")return!0;let t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.innerHTML="<table><tr><td><div></div></td></tr></table>",t.querySelector("table").style.height="100px",t.querySelector("div").style.height="100%",document.body.appendChild(t);let n=t.querySelector("div").offsetHeight>0;return document.body.removeChild(t),n}class yO extends bn{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{up(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{up(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:n}=e,{forPrint:r}=this.state,o=r||n.height==="auto"||n.contentHeight==="auto",d=!o&&n.height!=null?n.height:"",p=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${n.direction}`,e.theme.getClass("root")];return mw()||p.push("fc-liquid-hack"),e.children(p,d,o,r)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class Zl{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function _O(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function ey(t){return{[t.component.uid]:t}}const ty={};class ja extends Ai{constructor(e,n){super(e,n),this.handleRefresh=()=>{let r=this.computeTiming();r.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(r.state),this.clearTimeout(),this.setTimeout(r.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:n}=this;return e.children(n.nowDate,n.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener("visibilitychange",this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}computeTiming(){let{props:e,context:n}=this,r=n.nowManager.getDateMarker(),o=n.dateEnv.startOf(r,e.unit),p=n.dateEnv.add(o,on(1,e.unit)).valueOf()-r.valueOf();return p=Math.min(1e3*60*60*24,p),{state:{nowDate:o,todayRange:bO(o)},waitMs:p}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{const n=this.computeTiming();this.setState(n.state,()=>{this.setTimeout(n.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}ja.contextType=io;function bO(t){let e=Un(t),n=Er(e,1);return{start:e,end:n}}class xO{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,n){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:n})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,n){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[e]?r.emitter.on(e,n):console.warn(`Unknown listener name '${e}'`)}off(e,n){this.currentDataManager.emitter.off(e,n)}trigger(e,...n){this.currentDataManager.emitter.trigger(e,...n)}changeView(e,n){this.batchRendering(()=>{if(this.unselect(),n)if(n.start&&n.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:n});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let r=this.getCurrentData(),o;n=n||"day",o=r.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),o?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:o.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:r}=this.getCurrentData(),o=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),d,p;for(let c in n)o.push(c);for(d=0;d<o.length;d+=1)if(p=n[o[d]],p&&p.singleUnit===e)return p;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let n=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.createMarker(e)})}incrementDate(e){let n=this.getCurrentData(),r=on(e);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,r)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:r}=this.getCurrentData();return r.format(r.createMarker(e),Yn(n))}formatRange(e,n,r){let{dateEnv:o}=this.getCurrentData();return o.formatRange(o.createMarker(e),o.createMarker(n),Yn(r),r)}formatIso(e,n){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(e),{omitTime:n})}select(e,n){let r;n==null?e.start!=null?r=e:r={start:e,end:null}:r={start:e,end:n};let o=this.getCurrentData(),d=lO(r,o.dateEnv,on({days:1}));d&&(this.dispatch({type:"SELECT_DATES",selection:d}),ow(d,null,o))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),Jz(e,n))}addEvent(e,n){if(e instanceof Qn){let p=e._def,c=e._instance;return this.getCurrentData().eventStore.defs[p.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Wg({def:p,instance:c})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),o;if(n instanceof ql)o=n.internalEventSource;else if(typeof n=="boolean")n&&([o]=Vg(r.eventSources));else if(n!=null){let p=this.getEventSourceById(n);if(!p)return console.warn(`Could not find an event source with ID "${n}"`),null;o=p.internalEventSource}let d=X1(e,o,r,!1);if(d){let p=new Qn(r,d.def,d.def.recurringDef?null:d.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Wg(d)}),this.triggerEventAdd(p),p}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:lw(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:r,instances:o}=n.eventStore;e=String(e);for(let d in r){let p=r[d];if(p.publicId===e){if(p.recurringDef)return new Qn(n,p,null);for(let c in o){let b=o[c];if(b.defId===p.defId)return new Qn(n,p,b)}}}return null}getEvents(){let e=this.getCurrentData();return $a(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,r=[];for(let o in n)r.push(new ql(e,n[o]));return r}getEventSourceById(e){let n=this.getCurrentData(),r=n.eventSources;e=String(e);for(let o in r)if(r[o].publicId===e)return new ql(n,r[o]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof ql)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=ew(e,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new ql(n,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=on(e);n&&this.trigger("_scrollRequest",{time:n})}}function vO(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function gw(t,e){let n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom?n:!1}function wO(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}}function kO(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function EO(t,e){return{left:t.left-e.left,top:t.top-e.top}}const ny=Di();class CO{constructor(){this.getKeysForEventDefs=Pt(this._getKeysForEventDefs),this.splitDateSelection=Pt(this._splitDateSpan),this.splitEventStore=Pt(this._splitEventStore),this.splitIndividualUi=Pt(this._splitIndividualUi),this.splitEventDrag=Pt(this._splitInteraction),this.splitEventResize=Pt(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),d=this.splitIndividualUi(e.eventUiBases,r),p=this.splitEventStore(e.eventStore,r),c=this.splitEventDrag(e.eventDrag),b=this.splitEventResize(e.eventResize),k={};this.eventUiBuilders=ro(n,(E,C)=>this.eventUiBuilders[C]||Pt(SO));for(let E in n){let C=n[E],T=p[E]||ny,I=this.eventUiBuilders[E];k[E]={businessHours:C.businessHours||e.businessHours,dateSelection:o[E]||null,eventStore:T,eventUiBases:I(e.eventUiBases[""],C.ui,d[E]),eventSelection:T.instances[e.eventSelection]?e.eventSelection:"",eventDrag:c[E]||null,eventResize:b[E]||null}}return k}_splitDateSpan(e){let n={};if(e){let r=this.getKeysForDateSpan(e);for(let o of r)n[o]=e}return n}_getKeysForEventDefs(e){return ro(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:r,instances:o}=e,d={};for(let p in r)for(let c of n[p])d[c]||(d[c]=Di()),d[c].defs[p]=r[p];for(let p in o){let c=o[p];for(let b of n[c.defId])d[b]&&(d[b].instances[p]=c)}return d}_splitIndividualUi(e,n){let r={};for(let o in e)if(o)for(let d of n[o])r[d]||(r[d]={}),r[d][o]=e[o];return r}_splitInteraction(e){let n={};if(e){let r=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),o=this._getKeysForEventDefs(e.mutatedEvents),d=this._splitEventStore(e.mutatedEvents,o),p=c=>{n[c]||(n[c]={affectedEvents:r[c]||ny,mutatedEvents:d[c]||ny,isEvent:e.isEvent})};for(let c in r)p(c);for(let c in d)p(c)}return n}}function SO(t,e,n){let r=[];t&&r.push(t),e&&r.push(e);let o={"":Q1(r)};return n&&Object.assign(o,n),o}function ry(t,e,n,r){return{dow:t.getUTCDay(),isDisabled:!!(r&&(!r.activeRange||!so(r.activeRange,t))),isOther:!!(r&&!so(r.currentRange,t)),isToday:!!(e&&so(e,t)),isPast:!!(n?t<n:e&&t<e.start),isFuture:!!(n?t>n:e&&t>=e.end)}}function bp(t,e){let n=["fc-day",`fc-day-${D3[t.dow]}`];return t.isDisabled?n.push("fc-day-disabled"):(t.isToday&&(n.push("fc-day-today"),n.push(e.getClass("today"))),t.isPast&&n.push("fc-day-past"),t.isFuture&&n.push("fc-day-future"),t.isOther&&n.push("fc-day-other")),n}const TO=Yn({year:"numeric",month:"long",day:"numeric"}),AO=Yn({week:"long"});function Yl(t,e,n="day",r=!0){const{dateEnv:o,options:d,calendarApi:p}=t;let c=o.format(e,n==="week"?AO:TO);if(d.navLinks){let b=o.toDate(e);const k=E=>{let C=n==="day"?d.navLinkDayClick:n==="week"?d.navLinkWeekClick:null;typeof C=="function"?C.call(p,o.toDate(e),E):(typeof C=="string"&&(n=C),p.zoomTo(e,n))};return Object.assign({title:Cd(d.navLinkHint,[c,b],c),"data-navlink":""},r?C1(k):{onClick:k})}return{"aria-label":c}}let iy=null;function DO(){return iy===null&&(iy=MO()),iy}function MO(){let t=document.createElement("div");Ed(t,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),t.innerHTML="<div></div>",document.body.appendChild(t);let n=t.firstChild.getBoundingClientRect().left>t.getBoundingClientRect().left;return Eg(t),n}let sy;function IO(){return sy||(sy=PO()),sy}function PO(){let t=document.createElement("div");t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t);let e=yw(t);return document.body.removeChild(t),e}function yw(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}function RO(t,e=!1){let n=window.getComputedStyle(t),r=parseInt(n.borderLeftWidth,10)||0,o=parseInt(n.borderRightWidth,10)||0,d=parseInt(n.borderTopWidth,10)||0,p=parseInt(n.borderBottomWidth,10)||0,c=yw(t),b=c.y-r-o,k=c.x-d-p,E={borderLeft:r,borderRight:o,borderTop:d,borderBottom:p,scrollbarBottom:k,scrollbarLeft:0,scrollbarRight:0};return DO()&&n.direction==="rtl"?E.scrollbarLeft=b:E.scrollbarRight=b,e&&(E.paddingLeft=parseInt(n.paddingLeft,10)||0,E.paddingRight=parseInt(n.paddingRight,10)||0,E.paddingTop=parseInt(n.paddingTop,10)||0,E.paddingBottom=parseInt(n.paddingBottom,10)||0),E}function NO(t,e=!1,n){let r=oy(t),o=RO(t,e),d={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return e&&(d.left+=o.paddingLeft,d.right-=o.paddingRight,d.top+=o.paddingTop,d.bottom-=o.paddingBottom),d}function oy(t){let e=t.getBoundingClientRect();return{left:e.left+window.scrollX,top:e.top+window.scrollY,right:e.right+window.scrollX,bottom:e.bottom+window.scrollY}}function BO(t){let e=_w(t),n=t.getBoundingClientRect();for(let r of e){let o=gw(n,r.getBoundingClientRect());if(o)n=o;else return null}return n}function _w(t){let e=[];for(;t instanceof HTMLElement;){let n=window.getComputedStyle(t);if(n.position==="fixed")break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&e.push(t),t=t.parentNode}return e}class Xl{constructor(e,n,r,o){this.els=n;let d=this.originClientRect=e.getBoundingClientRect();r&&this.buildElHorizontals(d.left),o&&this.buildElVerticals(d.top)}buildElHorizontals(e){let n=[],r=[];for(let o of this.els){let d=o.getBoundingClientRect();n.push(d.left-e),r.push(d.right-e)}this.lefts=n,this.rights=r}buildElVerticals(e){let n=[],r=[];for(let o of this.els){let d=o.getBoundingClientRect();n.push(d.top-e),r.push(d.bottom-e)}this.tops=n,this.bottoms=r}leftToIndex(e){let{lefts:n,rights:r}=this,o=n.length,d;for(d=0;d<o;d+=1)if(e>=n[d]&&e<r[d])return d}topToIndex(e){let{tops:n,bottoms:r}=this,o=n.length,d;for(d=0;d<o;d+=1)if(e>=n[d]&&e<r[d])return d}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return xp(this.tops||[],e.tops||[])&&xp(this.bottoms||[],e.bottoms||[])&&xp(this.lefts||[],e.lefts||[])&&xp(this.rights||[],e.rights||[])}}function xp(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(Math.round(t[r])!==Math.round(e[r]))return!1;return!0}class ay{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}}class VO extends ay{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}}class zO extends ay{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(e){window.scroll(window.scrollX,e)}setScrollLeft(e){window.scroll(e,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}}class fs extends bn{constructor(){super(...arguments),this.uid=Ba()}prepareHits(){}queryHit(e,n,r,o){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!jr(e,".fc-event-mirror")}isValidDateDownEl(e){return!jr(e,".fc-event:not(.fc-bg-event)")&&!jr(e,".fc-more-link")&&!jr(e,"a[data-navlink]")&&!jr(e,".fc-popover")}}class bw{constructor(e=n=>n.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let n=[];for(let r of e)this.insertEntry(r,n);return n}insertEntry(e,n){let r=this.findInsertion(e);this.isInsertionValid(r,e)?this.insertEntryAt(e,r):this.handleInvalidInsertion(r,e,n)}isInsertionValid(e,n){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(n)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,n,r){if(this.allowReslicing&&e.touchingEntry){const o=Object.assign(Object.assign({},n),{span:cy(n.span,e.touchingEntry.span)});r.push(o),this.splitEntry(n,e.touchingEntry,r)}else r.push(n)}splitEntry(e,n,r){let o=e.span,d=n.span;o.start<d.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:o.start,end:d.start}},r),o.end>d.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:d.end,end:o.end}},r)}insertEntryAt(e,n){let{entriesByLevel:r,levelCoords:o}=this;n.lateral===-1?(dy(o,n.level,n.levelCoord),dy(r,n.level,[e])):dy(r[n.level],n.lateral,e),this.stackCnts[Ua(e)]=n.stackCnt}findInsertion(e){let{levelCoords:n,entriesByLevel:r,strictOrder:o,stackCnts:d}=this,p=n.length,c=0,b=-1,k=-1,E=null,C=0;for(let N=0;N<p;N+=1){const $=n[N];if(!o&&$>=c+this.getEntryThickness(e))break;let F=r[N],q,J=uy(F,e.span.start,ly),Q=J[0]+J[1];for(;(q=F[Q])&&q.span.start<e.span.end;){let me=$+this.getEntryThickness(q);me>c&&(c=me,E=q,b=N,k=Q),me===c&&(C=Math.max(C,d[Ua(q)]+1)),Q+=1}}let T=0;if(E)for(T=b+1;T<p&&n[T]<c;)T+=1;let I=-1;return T<p&&n[T]===c&&(I=uy(r[T],e.span.end,ly)[0]),{touchingLevel:b,touchingLateral:k,touchingEntry:E,stackCnt:C,levelCoord:c,level:T,lateral:I}}toRects(){let{entriesByLevel:e,levelCoords:n}=this,r=e.length,o=[];for(let d=0;d<r;d+=1){let p=e[d],c=n[d];for(let b of p)o.push(Object.assign(Object.assign({},b),{thickness:this.getEntryThickness(b),levelCoord:c}))}return o}}function ly(t){return t.span.end}function Ua(t){return t.index+":"+t.span.start}function OO(t){let e=[];for(let n of t){let r=[],o={span:n.span,entries:[n]};for(let d of e)cy(d.span,o.span)?o={entries:d.entries.concat(o.entries),span:LO(d.span,o.span)}:r.push(d);r.push(o),e=r}return e}function LO(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function cy(t,e){let n=Math.max(t.start,e.start),r=Math.min(t.end,e.end);return n<r?{start:n,end:r}:null}function dy(t,e,n){t.splice(e,0,n)}function uy(t,e,n){let r=0,o=t.length;if(!o||e<n(t[r]))return[0,0];if(e>n(t[o-1]))return[o,0];for(;r<o;){let d=Math.floor(r+(o-r)/2),p=n(t[d]);if(e<p)o=d;else if(e>p)r=d+1;else return[d,1]}return[r,0]}class FO{constructor(e,n){this.emitter=new yp}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const hy={};function $O(t,e){return!t||e>10?Yn({weekday:"short"}):e>1?Yn({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):Yn({weekday:"long"})}const xw="fc-col-header-cell";function vw(t){return t.text}class jO extends bn{render(){let{dateEnv:e,options:n,theme:r,viewApi:o}=this.context,{props:d}=this,{date:p,dateProfile:c}=d,b=ry(p,d.todayRange,null,c),k=[xw].concat(bp(b,r)),E=e.format(p,d.dayHeaderFormat),C=!b.isDisabled&&d.colCnt>1?Yl(this.context,p):{},T=e.toDate(p);e.namedTimeZoneImpl&&(T=Vo(T,36e5));let I=Object.assign(Object.assign(Object.assign({date:T,view:o},d.extraRenderProps),{text:E}),b);return le(Ur,{elTag:"th",elClasses:k,elAttrs:Object.assign({role:"columnheader",colSpan:d.colSpan,"data-date":b.isDisabled?void 0:Sd(p)},d.extraDataAttrs),renderProps:I,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:vw,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},N=>le("div",{className:"fc-scrollgrid-sync-inner"},!b.isDisabled&&le(N,{elTag:"a",elAttrs:C,elClasses:["fc-col-header-cell-cushion",d.isSticky&&"fc-sticky"]})))}}const UO=Yn({weekday:"long"});class HO extends bn{render(){let{props:e}=this,{dateEnv:n,theme:r,viewApi:o,options:d}=this.context,p=Er(new Date(2592e5),e.dow),c={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},b=n.format(p,e.dayHeaderFormat),k=Object.assign(Object.assign(Object.assign(Object.assign({date:p},c),{view:o}),e.extraRenderProps),{text:b});return le(Ur,{elTag:"th",elClasses:[xw,...bp(c,r),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:k,generatorName:"dayHeaderContent",customGenerator:d.dayHeaderContent,defaultGenerator:vw,classNameGenerator:d.dayHeaderClassNames,didMount:d.dayHeaderDidMount,willUnmount:d.dayHeaderWillUnmount},E=>le("div",{className:"fc-scrollgrid-sync-inner"},le(E,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":n.format(p,UO)}})))}}class ww extends bn{constructor(){super(...arguments),this.createDayHeaderFormatter=Pt(WO)}render(){let{context:e}=this,{dates:n,dateProfile:r,datesRepDistinctDays:o,renderIntro:d}=this.props,p=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return le(ja,{unit:"day"},(c,b)=>le("tr",{role:"row"},d&&d("day"),n.map(k=>o?le(jO,{key:k.toISOString(),date:k,dateProfile:r,todayRange:b,colCnt:n.length,dayHeaderFormat:p}):le(HO,{key:k.getUTCDay(),dow:k.getUTCDay(),dayHeaderFormat:p}))))}}function WO(t,e,n){return t||$O(e,n)}class kw{constructor(e,n){let r=e.start,{end:o}=e,d=[],p=[],c=-1;for(;r<o;)n.isHiddenDay(r)?d.push(c+.5):(c+=1,d.push(c),p.push(r)),r=Er(r,1);this.dates=p,this.indices=d,this.cnt=p.length}sliceRange(e){let n=this.getDateDayIndex(e.start),r=this.getDateDayIndex(Er(e.end,-1)),o=Math.max(0,n),d=Math.min(this.cnt-1,r);return o=Math.ceil(o),d=Math.floor(d),o<=d?{firstIndex:o,lastIndex:d,isStart:n===o,isEnd:r===d}:null}getDateDayIndex(e){let{indices:n}=this,r=Math.floor(zo(this.dates[0],e));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class Ew{constructor(e,n){let{dates:r}=e,o,d,p;if(n){for(d=r[0].getUTCDay(),o=1;o<r.length&&r[o].getUTCDay()!==d;o+=1);p=Math.ceil(r.length/o)}else p=1,o=r.length;this.rowCnt=p,this.colCnt=o,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCnt;n+=1){let r=[];for(let o=0;o<this.colCnt;o+=1)r.push(this.buildCell(n,o));e.push(r)}return e}buildCell(e,n){let r=this.daySeries.dates[e*this.colCnt+n];return{key:r.toISOString(),date:r}}buildHeaderDates(){let e=[];for(let n=0;n<this.colCnt;n+=1)e.push(this.cells[0][n].date);return e}sliceRange(e){let{colCnt:n}=this,r=this.daySeries.sliceRange(e),o=[];if(r){let{firstIndex:d,lastIndex:p}=r,c=d;for(;c<=p;){let b=Math.floor(c/n),k=Math.min((b+1)*n,p+1);o.push({row:b,firstCol:c%n,lastCol:(k-1)%n,isStart:r.isStart&&c===d,isEnd:r.isEnd&&k-1===p}),c=k}}return o}}class Cw{constructor(){this.sliceBusinessHours=Pt(this._sliceBusinessHours),this.sliceDateSelection=Pt(this._sliceDateSpan),this.sliceEventStore=Pt(this._sliceEventStore),this.sliceEventDrag=Pt(this._sliceInteraction),this.sliceEventResize=Pt(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,r,o,...d){let{eventUiBases:p}=e,c=this.sliceEventStore(e.eventStore,p,n,r,...d);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,r,p,o,...d),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,r,o,...d),fgEventSegs:c.fg,bgEventSegs:c.bg,eventDrag:this.sliceEventDrag(e.eventDrag,p,n,r,...d),eventResize:this.sliceEventResize(e.eventResize,p,n,r,...d),eventSelection:e.eventSelection}}sliceNowDate(e,n,r,o,...d){return this._sliceDateSpan({range:{start:e,end:Vo(e,1)},allDay:!1},n,r,{},o,...d)}_sliceBusinessHours(e,n,r,o,...d){return e?this._sliceEventStore(Fa(e,vp(n,!!r),o),{},n,r,...d).bg:[]}_sliceEventStore(e,n,r,o,...d){if(e){let p=Xg(e,n,vp(r,!!o),o);return{bg:this.sliceEventRanges(p.bg,d),fg:this.sliceEventRanges(p.fg,d)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,r,o,...d){if(!e)return null;let p=Xg(e.mutatedEvents,n,vp(r,!!o),o);return{segs:this.sliceEventRanges(p.fg,d),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,r,o,d,...p){if(!e)return[];let c=vp(n,!!r),b=Fo(e.range,c);if(b){e=Object.assign(Object.assign({},e),{range:b});let k=pO(e,o,d),E=this.sliceRange(e.range,...p);for(let C of E)C.eventRange=k;return E}return[]}sliceEventRanges(e,n){let r=[];for(let o of e)r.push(...this.sliceEventRange(o,n));return r}sliceEventRange(e,n){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:Er(r.start,1)});let o=this.sliceRange(r,...n);for(let d of o)d.eventRange=e,d.isStart=e.isStart&&d.isStart,d.isEnd=e.isEnd&&d.isEnd;return o}}function vp(t,e){let n=t.activeRange;return e?n:{start:Vo(n.start,t.slotMinTime.milliseconds),end:Vo(n.end,t.slotMaxTime.milliseconds-864e5)}}function Sw(t,e,n){let{instances:r}=t.mutatedEvents;for(let o in r)if(!hp(e.validRange,r[o].range))return!1;return Tw({eventDrag:t},n)}function qO(t,e,n){return hp(e.validRange,t.range)?Tw({dateSelection:t},n):!1}function Tw(t,e){let n=e.getCurrentData(),r=Object.assign({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},t);return(e.pluginHooks.isPropsValid||GO)(r,e)}function GO(t,e,n={},r){return!(t.eventDrag&&!ZO(t,e,n,r)||t.dateSelection&&!YO(t,e,n,r))}function ZO(t,e,n,r){let o=e.getCurrentData(),d=t.eventDrag,p=d.mutatedEvents,c=p.defs,b=p.instances,k=_p(c,d.isEvent?t.eventUiBases:{"":o.selectionConfig});r&&(k=ro(k,r));let E=Wz(t.eventStore,d.affectedEvents.instances),C=E.defs,T=E.instances,I=_p(C,t.eventUiBases);for(let N in b){let $=b[N],F=$.range,q=k[$.defId],J=c[$.defId];if(!Aw(q.constraints,F,E,t.businessHours,e))return!1;let{eventOverlap:Q}=e.options,me=typeof Q=="function"?Q:null;for(let Re in T){let Ee=T[Re];if(Fg(F,Ee.range)&&(I[Ee.defId].overlap===!1&&d.isEvent||q.overlap===!1||me&&!me(new Qn(e,C[Ee.defId],Ee),new Qn(e,J,$))))return!1}let ke=o.eventStore;for(let Re of q.allows){let Ee=Object.assign(Object.assign({},n),{range:$.range,allDay:J.allDay}),Ve=ke.defs[J.defId],Be=ke.instances[N],Ze;if(Ve?Ze=new Qn(e,Ve,Be):Ze=new Qn(e,J),!Re(Zg(Ee,e),Ze))return!1}}return!0}function YO(t,e,n,r){let o=t.eventStore,d=o.defs,p=o.instances,c=t.dateSelection,b=c.range,{selectionConfig:k}=e.getCurrentData();if(r&&(k=r(k)),!Aw(k.constraints,b,o,t.businessHours,e))return!1;let{selectOverlap:E}=e.options,C=typeof E=="function"?E:null;for(let T in p){let I=p[T];if(Fg(b,I.range)&&(k.overlap===!1||C&&!C(new Qn(e,d[I.defId],I),null)))return!1}for(let T of k.allows){let I=Object.assign(Object.assign({},n),c);if(!T(Zg(I,e),null))return!1}return!0}function Aw(t,e,n,r,o){for(let d of t)if(!KO(XO(d,e,n,r,o),e))return!1;return!0}function XO(t,e,n,r,o){return t==="businessHours"?py(Fa(r,e,o)):typeof t=="string"?py(fp(n,d=>d.groupId===t)):typeof t=="object"&&t?py(Fa(t,e,o)):[]}function py(t){let{instances:e}=t,n=[];for(let r in e)n.push(e[r].range);return n}function KO(t,e){for(let n of t)if(hp(n,e))return!0;return!1}const wp=/^(visible|hidden)$/;class Dw extends bn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Ms(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:n,liquidIsAbsolute:r}=e,o=n&&r,d=["fc-scroller"];return n&&(r?d.push("fc-scroller-liquid-absolute"):d.push("fc-scroller-liquid")),le("div",{ref:this.handleEl,className:d.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:o&&-(e.overcomeLeft||0)||"",right:o&&-(e.overcomeRight||0)||"",bottom:o&&-(e.overcomeBottom||0)||"",marginLeft:!o&&-(e.overcomeLeft||0)||"",marginRight:!o&&-(e.overcomeRight||0)||"",marginBottom:!o&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(wp.test(this.props.overflowX))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=e;for(let o=0;o<r.length;o+=1)if(r[o].getBoundingClientRect().width>n)return!0;return!1}needsYScrolling(){if(wp.test(this.props.overflowY))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=e;for(let o=0;o<r.length;o+=1)if(r[o].getBoundingClientRect().height>n)return!0;return!1}getXScrollbarWidth(){return wp.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return wp.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class ao{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(n,r)=>{let{depths:o,currentMap:d}=this,p=!1,c=!1;n!==null?(p=r in d,d[r]=n,o[r]=(o[r]||0)+1,c=!0):(o[r]-=1,o[r]||(delete d[r],delete this.callbackMap[r],p=!0)),this.masterCallback&&(p&&this.masterCallback(null,String(r)),c&&this.masterCallback(n,String(r)))}}createRef(e){let n=this.callbackMap[e];return n||(n=this.callbackMap[e]=r=>{this.handleValue(r,String(e))}),n}collect(e,n,r){return cz(this.currentMap,e,n,r)}getAll(){return Vg(this.currentMap)}}function JO(t){let e=a3(t,".fc-scrollgrid-shrink"),n=0;for(let r of e)n=Math.max(n,v3(r));return Math.ceil(n)}function Mw(t,e){return t.liquid&&e.liquid}function QO(t,e){return e.maxHeight!=null||Mw(t,e)}function eL(t,e,n,r){let{expandRows:o}=n;return typeof e.content=="function"?e.content(n):le("table",{role:"presentation",className:[e.tableClassName,t.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:o?n.clientHeight:""}},n.tableColGroupNode,le(r?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(n):e.rowContent))}function tL(t,e){return Bo(t,e,ps)}function nL(t,e){let n=[];for(let r of t){let o=r.span||1;for(let d=0;d<o;d+=1)n.push(le("col",{style:{width:r.width==="shrink"?rL(e):r.width||"",minWidth:r.minWidth||""}}))}return le("colgroup",{},...n)}function rL(t){return t??4}function iL(t){for(let e of t)if(e.width==="shrink")return!0;return!1}function sL(t,e){let n=["fc-scrollgrid",e.theme.getClass("table")];return t&&n.push("fc-scrollgrid-liquid"),n}function oL(t,e){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${t.type}`,t.className];return e&&t.liquid&&t.maxHeight==null&&n.push("fc-scrollgrid-section-liquid"),t.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function fy(t){return le("div",{className:"fc-scrollgrid-sticky-shim",style:{width:t.clientWidth,minWidth:t.tableMinWidth}})}function kp(t){let{stickyHeaderDates:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}function Iw(t){let{stickyFooterScrollbar:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}class my extends bn{constructor(){super(...arguments),this.processCols=Pt(e=>e,tL),this.renderMicroColGroup=Pt(nL),this.scrollerRefs=new ao,this.scrollerElRefs=new ao(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:n,context:r}=this,o=e.sections||[],d=this.processCols(e.cols),p=this.renderMicroColGroup(d,n.shrinkWidth),c=sL(e.liquid,r);e.collapsibleWidth&&c.push("fc-scrollgrid-collapsible");let b=o.length,k=0,E,C=[],T=[],I=[];for(;k<b&&(E=o[k]).type==="header";)C.push(this.renderSection(E,p,!0)),k+=1;for(;k<b&&(E=o[k]).type==="body";)T.push(this.renderSection(E,p,!1)),k+=1;for(;k<b&&(E=o[k]).type==="footer";)I.push(this.renderSection(E,p,!0)),k+=1;let N=!mw();const $={role:"rowgroup"};return le("table",{role:"grid",className:c.join(" "),style:{height:e.height}},!!(!N&&C.length)&&le("thead",$,...C),!!(!N&&T.length)&&le("tbody",$,...T),!!(!N&&I.length)&&le("tfoot",$,...I),N&&le("tbody",$,...C,...T,...I))}renderSection(e,n,r){return"outerContent"in e?le(Bn,{key:e.key},e.outerContent):le("tr",{key:e.key,role:"presentation",className:oL(e,this.props.liquid).join(" ")},this.renderChunkTd(e,n,e.chunk,r))}renderChunkTd(e,n,r,o){if("outerContent"in r)return r.outerContent;let{props:d}=this,{forceYScrollbars:p,scrollerClientWidths:c,scrollerClientHeights:b}=this.state,k=QO(d,e),E=Mw(d,e),C=d.liquid?p?"scroll":k?"auto":"hidden":"visible",T=e.key,I=eL(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:!d.collapsibleWidth&&c[T]!==void 0?c[T]:null,clientHeight:b[T]!==void 0?b[T]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},o);return le(o?"th":"td",{ref:r.elRef,role:"presentation"},le("div",{className:`fc-scroller-harness${E?" fc-scroller-harness-liquid":""}`},le(Dw,{ref:this.scrollerRefs.createRef(T),elRef:this.scrollerElRefs.createRef(T),overflowY:C,overflowX:d.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:E,liquidIsAbsolute:!0},I)))}_handleScrollerEl(e,n){let r=aL(this.props.sections,n);r&&Ms(r.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return iL(this.props.cols)?JO(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=IO(),{scrollerRefs:n,scrollerElRefs:r}=this,o=!1,d={},p={};for(let c in n.currentMap){let b=n.currentMap[c];if(b&&b.needsYScrolling()){o=!0;break}}for(let c of this.props.sections){let b=c.key,k=r.currentMap[b];if(k){let E=k.parentNode;d[b]=Math.floor(E.getBoundingClientRect().width-(o?e.y:0)),p[b]=Math.floor(E.getBoundingClientRect().height)}}return{forceYScrollbars:o,scrollerClientWidths:d,scrollerClientHeights:p}}}my.addStateEquality({scrollerClientWidths:ps,scrollerClientHeights:ps});function aL(t,e){for(let n of t)if(n.key===e)return n;return null}class Ep extends bn{constructor(){super(...arguments),this.buildPublicEvent=Pt((e,n,r)=>new Qn(e,n,r)),this.handleEl=e=>{this.el=e,Ms(this.props.elRef,e),e&&cw(e,this.props.seg)}}render(){const{props:e,context:n}=this,{options:r}=n,{seg:o}=e,{eventRange:d}=o,{ui:p}=d,c={event:this.buildPublicEvent(n,d.def,d.instance),view:n.viewApi,timeText:e.timeText,textColor:p.textColor,backgroundColor:p.backgroundColor,borderColor:p.borderColor,isDraggable:!e.disableDragging&&rO(o,n),isStartResizable:!e.disableResizing&&iO(o,n),isEndResizable:!e.disableResizing&&sO(o),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!o.isStart,isEnd:!!o.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return le(Ur,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...oO(c),...o.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:c,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&cw(this.el,this.props.seg)}}class gy extends bn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:o}=e,{ui:d}=o.eventRange,p=r.eventTimeFormat||e.defaultTimeFormat,c=Id(o,p,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return le(Ep,Object.assign({},e,{elTag:"a",elStyle:{borderColor:d.borderColor,backgroundColor:d.backgroundColor},elAttrs:Jg(o,n),defaultGenerator:lL,timeText:c}),(b,k)=>le(Bn,null,le(b,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:k.textColor}}),!!k.isStartResizable&&le("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!k.isEndResizable&&le("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}gy.addPropsEquality({seg:ps});function lL(t){return le("div",{className:"fc-event-main-frame"},t.timeText&&le("div",{className:"fc-event-time"},t.timeText),le("div",{className:"fc-event-title-container"},le("div",{className:"fc-event-title fc-sticky"},t.event.title||le(Bn,null," "))))}const yy=t=>le(io.Consumer,null,e=>{let{options:n}=e,r={isAxis:t.isAxis,date:e.dateEnv.toDate(t.date),view:e.viewApi};return le(Ur,{elRef:t.elRef,elTag:t.elTag||"div",elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},t.children)}),cL=Yn({day:"numeric"});class _y extends bn{constructor(){super(...arguments),this.refineRenderProps=sp(dL)}render(){let{props:e,context:n}=this,{options:r}=n,o=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:n.viewApi,dateEnv:n.dateEnv,monthStartFormat:r.monthStartFormat});return le(Ur,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),o.isDisabled?{}:{"data-date":Sd(e.date)}),elClasses:[...bp(o,n.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:o.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount},e.children)}}function by(t){return!!(t.dayCellContent||Lg("dayCellContent",t))}function dL(t){let{date:e,dateEnv:n,dateProfile:r,isMonthStart:o}=t,d=ry(e,t.todayRange,null,r),p=t.showDayNumber?n.format(e,o?t.monthStartFormat:cL):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(e),view:t.viewApi},d),{isMonthStart:o,dayNumberText:p}),t.extraRenderProps)}class Pw extends bn{render(){let{props:e}=this,{seg:n}=e;return le(Ep,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:n.eventRange.ui.backgroundColor},defaultGenerator:uL,seg:n,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function uL(t){let{title:e}=t.event;return e&&le("div",{className:"fc-event-title"},t.event.title)}function Rw(t){return le("div",{className:`fc-${t}`})}const Nw=t=>le(io.Consumer,null,e=>{let{dateEnv:n,options:r}=e,{date:o}=t,d=r.weekNumberFormat||t.defaultFormat,p=n.computeWeekNumber(o),c=n.format(o,d),b={num:p,text:c,date:o};return le(Ur,{elRef:t.elRef,elTag:t.elTag,elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:b,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:hL,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},t.children)});function hL(t){return t.text}const xy=10;class pL extends bn{constructor(){super(...arguments),this.state={titleId:No()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Ms(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const n=v1(e);this.rootEl.contains(n)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:n}=this.context,{props:r,state:o}=this,d=["fc-popover",e.getClass("popover")].concat(r.extraClassNames||[]);return G5(le("div",Object.assign({},r.extraAttrs,{id:r.id,className:d.join(" "),"aria-labelledby":o.titleId,ref:this.handleRootEl}),le("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},le("span",{className:"fc-popover-title",id:o.titleId},r.title),le("span",{className:"fc-popover-close "+e.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),le("div",{className:"fc-popover-body "+e.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:n,alignGridTop:r}=this.props,{rootEl:o}=this,d=BO(n);if(d){let p=o.getBoundingClientRect(),c=r?jr(n,".fc-scrollgrid").getBoundingClientRect().top:d.top,b=e?d.right-p.width:d.left;c=Math.max(c,xy),b=Math.min(b,document.documentElement.clientWidth-xy-p.width),b=Math.max(b,xy);let k=o.offsetParent.getBoundingClientRect();Ed(o,{top:c-k.top,left:b-k.left})}}}class fL extends fs{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:n}=this.context,{props:r}=this,{startDate:o,todayRange:d,dateProfile:p}=r,c=n.format(o,e.dayPopoverFormat);return le(_y,{elRef:this.handleRootEl,date:o,dateProfile:p,todayRange:d},(b,k,E)=>le(pL,{elRef:E.ref,id:r.id,title:c,extraClassNames:["fc-more-popover"].concat(E.className||[]),extraAttrs:E,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},by(e)&&le(b,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(e,n,r,o){let{rootEl:d,props:p}=this;return e>=0&&e<r&&n>=0&&n<o?{dateProfile:p.dateProfile,dateSpan:Object.assign({allDay:!p.forceTimed,range:{start:p.startDate,end:p.endDate}},p.extraDateSpan),dayEl:d,rect:{left:0,top:0,right:r,bottom:o},layer:1}:null}}class Bw extends bn{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:No()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Ms(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:r}=this,{moreLinkClick:o}=r.options,d=Vw(n).start;function p(c){let{def:b,instance:k,range:E}=c.eventRange;return{event:new Qn(r,b,k),start:r.dateEnv.toDate(E.start),end:r.dateEnv.toDate(E.end),isStart:c.isStart,isEnd:c.isEnd}}typeof o=="function"&&(o=o({date:d,allDay:!!n.allDayDate,allSegs:n.allSegs.map(p),hiddenSegs:n.hiddenSegs.map(p),jsEvent:e,view:r.viewApi})),!o||o==="popover"?this.setState({isPopoverOpen:!0}):typeof o=="string"&&r.calendarApi.zoomTo(d,o)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return le(io.Consumer,null,r=>{let{viewApi:o,options:d,calendarApi:p}=r,{moreLinkText:c}=d,{moreCnt:b}=e,k=Vw(e),E=typeof c=="function"?c.call(p,b):`+${b} ${c}`,C=Cd(d.moreLinkHint,[b],E),T={num:b,shortText:`+${b}`,text:E,view:o};return le(Bn,null,!!e.moreCnt&&le(Ur,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),C1(this.handleClick)),{title:C,"aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?n.popoverId:""}),renderProps:T,generatorName:"moreLinkContent",customGenerator:d.moreLinkContent,defaultGenerator:e.defaultGenerator||mL,classNameGenerator:d.moreLinkClassNames,didMount:d.moreLinkDidMount,willUnmount:d.moreLinkWillUnmount},e.children),n.isPopoverOpen&&le(fL,{id:n.popoverId,startDate:k.start,endDate:k.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=jr(this.linkEl,".fc-view-harness"))}}function mL(t){return t.text}function Vw(t){if(t.allDayDate)return{start:t.allDayDate,end:Er(t.allDayDate,1)};let{hiddenSegs:e}=t;return{start:zw(e),end:yL(e)}}function zw(t){return t.reduce(gL).eventRange.range.start}function gL(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function yL(t){return t.reduce(_L).eventRange.range.end}function _L(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class bL{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let n of this.handlers)n(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}}class xL extends bL{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:n}=this;let r=!1;e.isActive?(n.set(e.id,e),r=!0):n.has(e.id)&&(n.delete(e.id),r=!0),r&&this.set(n)}}const vL=[],Ow={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Lw=Object.assign(Object.assign({},Ow),{buttonHints:{prev:"Previous $0",next:"Next $0",today(t,e){return e==="day"?"Today":`This ${t}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(t){return`Show ${t} more event${t===1?"":"s"}`}});function wL(t){let e=t.length>0?t[0].code:"en",n=vL.concat(t),r={en:Lw};for(let o of n)r[o.code]=o;return{map:r,defaultCode:e}}function Fw(t,e){return typeof t=="object"&&!Array.isArray(t)?$w(t.code,[t.code],t):kL(t,e)}function kL(t,e){let n=[].concat(t||[]),r=EL(n,e)||Lw;return $w(t,n,r)}function EL(t,e){for(let n=0;n<t.length;n+=1){let r=t[n].toLocaleLowerCase().split("-");for(let o=r.length;o>0;o-=1){let d=r.slice(0,o).join("-");if(e[d])return e[d]}}return null}function $w(t,e,n){let r=Bg([Ow,n],["buttonText"]);delete r.code;let{week:o}=r;return delete r.week,{codeArg:t,codes:e,week:o,simpleNumberFormat:new Intl.NumberFormat(t),options:r}}function Is(t){return{id:Ba(),name:t.name,premiumReleaseDate:t.premiumReleaseDate?new Date(t.premiumReleaseDate):void 0,deps:t.deps||[],reducers:t.reducers||[],isLoadingFuncs:t.isLoadingFuncs||[],contextInit:[].concat(t.contextInit||[]),eventRefiners:t.eventRefiners||{},eventDefMemberAdders:t.eventDefMemberAdders||[],eventSourceRefiners:t.eventSourceRefiners||{},isDraggableTransformers:t.isDraggableTransformers||[],eventDragMutationMassagers:t.eventDragMutationMassagers||[],eventDefMutationAppliers:t.eventDefMutationAppliers||[],dateSelectionTransformers:t.dateSelectionTransformers||[],datePointTransforms:t.datePointTransforms||[],dateSpanTransforms:t.dateSpanTransforms||[],views:t.views||{},viewPropsTransformers:t.viewPropsTransformers||[],isPropsValid:t.isPropsValid||null,externalDefTransforms:t.externalDefTransforms||[],viewContainerAppends:t.viewContainerAppends||[],eventDropTransformers:t.eventDropTransformers||[],componentInteractions:t.componentInteractions||[],calendarInteractions:t.calendarInteractions||[],themeClasses:t.themeClasses||{},eventSourceDefs:t.eventSourceDefs||[],cmdFormatter:t.cmdFormatter,recurringTypes:t.recurringTypes||[],namedTimeZonedImpl:t.namedTimeZonedImpl,initialView:t.initialView||"",elementDraggingImpl:t.elementDraggingImpl,optionChangeHandlers:t.optionChangeHandlers||{},scrollGridImpl:t.scrollGridImpl||null,listenerRefiners:t.listenerRefiners||{},optionRefiners:t.optionRefiners||{},propSetHandlers:t.propSetHandlers||{}}}function CL(t,e){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(d){for(let p of d){const c=p.name,b=n[c];b===void 0?(n[c]=p.id,o(p.deps),r=TL(r,p)):b!==p.id&&console.warn(`Duplicate plugin '${c}'`)}}return t&&o(t),o(e),r}function SL(){let t=[],e=[],n;return(r,o)=>((!n||!Bo(r,t)||!Bo(o,e))&&(n=CL(r,o)),t=r,e=o,n)}function TL(t,e){return{premiumReleaseDate:AL(t.premiumReleaseDate,e.premiumReleaseDate),reducers:t.reducers.concat(e.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:t.contextInit.concat(e.contextInit),eventRefiners:Object.assign(Object.assign({},t.eventRefiners),e.eventRefiners),eventDefMemberAdders:t.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},t.eventSourceRefiners),e.eventSourceRefiners),isDraggableTransformers:t.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:t.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:t.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:t.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:t.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:t.dateSpanTransforms.concat(e.dateSpanTransforms),views:Object.assign(Object.assign({},t.views),e.views),viewPropsTransformers:t.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||t.isPropsValid,externalDefTransforms:t.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:t.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:t.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:t.calendarInteractions.concat(e.calendarInteractions),componentInteractions:t.componentInteractions.concat(e.componentInteractions),themeClasses:Object.assign(Object.assign({},t.themeClasses),e.themeClasses),eventSourceDefs:t.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(e.recurringTypes),namedTimeZonedImpl:e.namedTimeZonedImpl||t.namedTimeZonedImpl,initialView:t.initialView||e.initialView,elementDraggingImpl:t.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},t.optionChangeHandlers),e.optionChangeHandlers),scrollGridImpl:e.scrollGridImpl||t.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},t.listenerRefiners),e.listenerRefiners),optionRefiners:Object.assign(Object.assign({},t.optionRefiners),e.optionRefiners),propSetHandlers:Object.assign(Object.assign({},t.propSetHandlers),e.propSetHandlers)}}function AL(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}class $o extends Ad{}$o.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},$o.prototype.baseIconClass="fc-icon",$o.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},$o.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},$o.prototype.iconOverrideOption="buttonIcons",$o.prototype.iconOverrideCustomButtonOption="icon",$o.prototype.iconOverridePrefix="fc-icon-";function DL(t,e){let n={},r;for(r in t)vy(r,n,t,e);for(r in e)vy(r,n,t,e);return n}function vy(t,e,n,r){if(e[t])return e[t];let o=ML(t,e,n,r);return o&&(e[t]=o),o}function ML(t,e,n,r){let o=n[t],d=r[t],p=E=>o&&o[E]!==null?o[E]:d&&d[E]!==null?d[E]:null,c=p("component"),b=p("superType"),k=null;if(b){if(b===t)throw new Error("Can't have a custom view type that references itself");k=vy(b,e,n,r)}return!c&&k&&(c=k.component),c?{type:t,component:c,defaults:Object.assign(Object.assign({},k?k.defaults:{}),o?o.rawOptions:{}),overrides:Object.assign(Object.assign({},k?k.overrides:{}),d?d.rawOptions:{})}:null}function jw(t){return ro(t,IL)}function IL(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=Uw(e):n&&!(n.prototype instanceof bn)&&(n=Uw(Object.assign(Object.assign({},e),{content:n}))),{superType:e.type,component:n,rawOptions:e}}function Uw(t){return e=>le(io.Consumer,null,n=>le(Ur,{elTag:"div",elClasses:W1(n.viewSpec),renderProps:Object.assign(Object.assign({},e),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:t.content,classNameGenerator:t.classNames,didMount:t.didMount,willUnmount:t.willUnmount}))}function PL(t,e,n,r){let o=jw(t),d=jw(e.views),p=DL(o,d);return ro(p,c=>RL(c,d,e,n,r))}function RL(t,e,n,r,o){let d=t.overrides.duration||t.defaults.duration||r.duration||n.duration,p=null,c="",b="",k={};if(d&&(p=NL(d),p)){let T=Dg(p);c=T.unit,T.value===1&&(b=c,k=e[c]?e[c].rawOptions:{})}let E=T=>{let I=T.buttonText||{},N=t.defaults.buttonTextKey;return N!=null&&I[N]!=null?I[N]:I[t.type]!=null?I[t.type]:I[b]!=null?I[b]:null},C=T=>{let I=T.buttonHints||{},N=t.defaults.buttonTextKey;return N!=null&&I[N]!=null?I[N]:I[t.type]!=null?I[t.type]:I[b]!=null?I[b]:null};return{type:t.type,component:t.component,duration:p,durationUnit:c,singleUnit:b,optionDefaults:t.defaults,optionOverrides:Object.assign(Object.assign({},k),t.overrides),buttonTextOverride:E(r)||E(n)||t.overrides.buttonText,buttonTextDefault:E(o)||t.defaults.buttonText||E(Td)||t.type,buttonTitleOverride:C(r)||C(n)||t.overrides.buttonHint,buttonTitleDefault:C(o)||t.defaults.buttonHint||C(Td)}}let Hw={};function NL(t){let e=JSON.stringify(t),n=Hw[e];return n===void 0&&(n=on(t),Hw[e]=n),n}function BL(t,e){switch(e.type){case"CHANGE_VIEW_TYPE":t=e.viewType}return t}function VL(t,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return t}}function zL(t,e,n){let r=t.initialDate;return r!=null?e.createMarker(r):n.getDateMarker()}function OL(t,e){switch(e.type){case"SET_OPTION":return Object.assign(Object.assign({},t),{[e.optionName]:e.rawOptionValue});default:return t}}function LL(t,e,n,r){let o;switch(e.type){case"CHANGE_VIEW_TYPE":return r.build(e.dateMarker||n);case"CHANGE_DATE":return r.build(e.dateMarker);case"PREV":if(o=r.buildPrev(t,n),o.isValid)return o;break;case"NEXT":if(o=r.buildNext(t,n),o.isValid)return o;break}return t}function FL(t,e,n){let r=e?e.activeRange:null;return qw({},GL(t,n),r,n)}function $L(t,e,n,r){let o=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return qw(t,e.sources,o,r);case"REMOVE_EVENT_SOURCE":return UL(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Gw(t,o,r):t;case"FETCH_EVENT_SOURCES":return wy(t,e.sourceIds?F1(e.sourceIds):Zw(t,r),o,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return qL(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function jL(t,e,n){let r=e?e.activeRange:null;return wy(t,Zw(t,n),r,!0,n)}function Ww(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function qw(t,e,n,r){let o={};for(let d of e)o[d.sourceId]=d;return n&&(o=Gw(o,n,r)),Object.assign(Object.assign({},t),o)}function UL(t,e){return Oa(t,n=>n.sourceId!==e)}function Gw(t,e,n){return wy(t,Oa(t,r=>HL(r,e,n)),e,!1,n)}function HL(t,e,n){return Yw(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function wy(t,e,n,r,o){let d={};for(let p in t){let c=t[p];e[p]?d[p]=WL(c,n,r,o):d[p]=c}return d}function WL(t,e,n,r){let{options:o,calendarApi:d}=r,p=r.pluginHooks.eventSourceDefs[t.sourceDefId],c=Ba();return p.fetch({eventSource:t,range:e,isRefetch:n,context:r},b=>{let{rawEvents:k}=b;o.eventSourceSuccess&&(k=o.eventSourceSuccess.call(d,k,b.response)||k),t.success&&(k=t.success.call(d,k,b.response)||k),r.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:c,fetchRange:e,rawEvents:k})},b=>{let k=!1;o.eventSourceFailure&&(o.eventSourceFailure.call(d,b),k=!0),t.failure&&(t.failure(b),k=!0),k||console.warn(b.message,b),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:c,fetchRange:e,error:b})}),Object.assign(Object.assign({},t),{isFetching:!0,latestFetchId:c})}function qL(t,e,n,r){let o=t[e];return o&&n===o.latestFetchId?Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},o),{isFetching:!1,fetchRange:r})}):t}function Zw(t,e){return Oa(t,n=>Yw(n,e))}function GL(t,e){let n=tw(e),r=[].concat(t.eventSources||[]),o=[];t.initialEvents&&r.unshift(t.initialEvents),t.events&&r.unshift(t.events);for(let d of r){let p=ew(d,e,n);p&&o.push(p)}return o}function Yw(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}function ZL(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function YL(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function XL(t,e){let n;switch(e.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function KL(t,e){let n;switch(e.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function JL(t,e,n,r,o){let d=t.headerToolbar?Xw(t.headerToolbar,t,e,n,r,o):null,p=t.footerToolbar?Xw(t.footerToolbar,t,e,n,r,o):null;return{header:d,footer:p}}function Xw(t,e,n,r,o,d){let p={},c=[],b=!1;for(let k in t){let E=t[k],C=QL(E,e,n,r,o,d);p[k]=C.widgets,c.push(...C.viewsWithButtons),b=b||C.hasTitle}return{sectionWidgets:p,viewsWithButtons:c,hasTitle:b}}function QL(t,e,n,r,o,d){let p=e.direction==="rtl",c=e.customButtons||{},b=n.buttonText||{},k=e.buttonText||{},E=n.buttonHints||{},C=e.buttonHints||{},T=t?t.split(" "):[],I=[],N=!1;return{widgets:T.map(F=>F.split(",").map(q=>{if(q==="title")return N=!0,{buttonName:q};let J,Q,me,ke,Re,Ee;if(J=c[q])me=Ve=>{J.click&&J.click.call(Ve.target,Ve,Ve.target)},(ke=r.getCustomButtonIconClass(J))||(ke=r.getIconClass(q,p))||(Re=J.text),Ee=J.hint||J.text;else if(Q=o[q]){I.push(q),me=()=>{d.changeView(q)},(Re=Q.buttonTextOverride)||(ke=r.getIconClass(q,p))||(Re=Q.buttonTextDefault);let Ve=Q.buttonTextOverride||Q.buttonTextDefault;Ee=Cd(Q.buttonTitleOverride||Q.buttonTitleDefault||e.viewHint,[Ve,q],Ve)}else if(d[q])if(me=()=>{d[q]()},(Re=b[q])||(ke=r.getIconClass(q,p))||(Re=k[q]),q==="prevYear"||q==="nextYear"){let Ve=q==="prevYear"?"prev":"next";Ee=Cd(E[Ve]||C[Ve],[k.year||"year","year"],k[q])}else Ee=Ve=>Cd(E[q]||C[q],[k[Ve]||Ve,Ve],k[q]);return{buttonName:q,buttonClick:me,buttonIcon:ke,buttonText:Re,buttonHint:Ee}})),viewsWithButtons:I,hasTitle:N}}class eF{constructor(e,n,r){this.type=e,this.getCurrentData=n,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}const tF=Is({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}}]}),nF=Is({name:"func-event-source",eventSourceDefs:[{parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:r}=t.context,o=t.eventSource.meta;fO(o.bind(null,hw(t.range,r)),d=>e({rawEvents:d}),n)}}]}),rF=Is({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:De,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(t){return t.url&&(t.format==="json"||!t.format)?{url:t.url,format:"json",method:(t.method||"GET").toUpperCase(),extraParams:t.extraParams,startParam:t.startParam,endParam:t.endParam,timeZoneParam:t.timeZoneParam}:null},fetch(t,e,n){const{meta:r}=t.eventSource,o=iF(r,t.range,t.context);mO(r.method,r.url,o).then(([d,p])=>{e({rawEvents:d,response:p})},n)}}]});function iF(t,e,n){let{dateEnv:r,options:o}=n,d,p,c,b,k={};return d=t.startParam,d==null&&(d=o.startParam),p=t.endParam,p==null&&(p=o.endParam),c=t.timeZoneParam,c==null&&(c=o.timeZoneParam),typeof t.extraParams=="function"?b=t.extraParams():b=t.extraParams||{},Object.assign(k,b),k[d]=r.formatIso(e.start),k[p]=r.formatIso(e.end),r.timeZone!=="local"&&(k[c]=r.timeZone),k}const sF=Is({name:"simple-recurring-event",recurringTypes:[{parse(t,e){if(t.daysOfWeek||t.startTime||t.endTime||t.startRecur||t.endRecur){let n={daysOfWeek:t.daysOfWeek||null,startTime:t.startTime||null,endTime:t.endTime||null,startRecur:t.startRecur?e.createMarker(t.startRecur):null,endRecur:t.endRecur?e.createMarker(t.endRecur):null,dateEnv:e},r;return t.duration&&(r=t.duration),!r&&t.startTime&&t.endTime&&(r=C3(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:r,typeData:n}}return null},expand(t,e,n){let r=Fo(e,{start:t.startRecur,end:t.endRecur});return r?oF(t.daysOfWeek,t.startTime,t.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:De,startTime:on,endTime:on,duration:on,startRecur:De,endRecur:De}});function oF(t,e,n,r,o){let d=t?F1(t):null,p=Un(o.start),c=o.end,b=[];for(;p<c;){let k;(!d||d[p.getUTCDay()])&&(e?k=r.add(p,e):k=p,b.push(r.createMarker(n.toDate(k)))),p=Er(p,1)}return b}const aF=Is({name:"change-handler",optionChangeHandlers:{events(t,e){Kw([t],e)},eventSources:Kw}});function Kw(t,e){let n=Vg(e.getCurrentData().eventSources);if(n.length===1&&t.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(t[0])){e.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:t[0]});return}let r=[];for(let o of t){let d=!1;for(let p=0;p<n.length;p+=1)if(n[p]._raw===o){n.splice(p,1),d=!0;break}d||r.push(o)}for(let o of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:o.sourceId});for(let o of r)e.calendarApi.addEventSource(o)}function lF(t,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},hw(t.activeRange,e.dateEnv)),{view:e.viewApi}))}function cF(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",$a(t,e))}const dF=[tF,nF,rF,sF,aF,Is({name:"misc",isLoadingFuncs:[t=>Ww(t.eventSources)],propSetHandlers:{dateProfile:lF,eventStore:cF}})];class uF{constructor(e,n){this.runTaskOption=e,this.drainedOption=n,this.queue=[],this.delayedRunner=new kg(this.drain.bind(this))}request(e,n){this.queue.push(e),this.delayedRunner.request(n)}pause(e){this.delayedRunner.pause(e)}resume(e,n){this.delayedRunner.resume(e,n)}drain(){let{queue:e}=this;for(;e.length;){let n=[],r;for(;r=e.shift();)this.runTask(r),n.push(r);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function hF(t,e,n){let r;return/^(year|month)$/.test(t.currentRangeUnit)?r=t.currentRange:r=t.activeRange,n.formatRange(r.start,r.end,Yn(e.titleFormat||pF(t)),{isEndExclusive:t.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function pF(t){let{currentRangeUnit:e}=t;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let n=ip(t.currentRange.start,t.currentRange.end);return n!==null&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class Jw{constructor(){this.resetListeners=new Set}handleInput(e,n){const r=this.dateEnv;if(e!==r&&(typeof n=="function"?this.nowFn=n:r||(this.nowAnchorDate=e.toDate(n?e.createMarker(n):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,r))for(const o of this.resetListeners.values())o()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}}class fF{constructor(e){this.computeCurrentViewData=Pt(this._computeCurrentViewData),this.organizeRawLocales=Pt(wL),this.buildLocale=Pt(Fw),this.buildPluginHooks=SL(),this.buildDateEnv=Pt(mF),this.buildTheme=Pt(gF),this.parseToolbars=Pt(JL),this.buildViewSpecs=Pt(PL),this.buildDateProfileGenerator=sp(yF),this.buildViewApi=Pt(_F),this.buildViewUiProps=sp(vF),this.buildEventUiBySource=Pt(bF,ps),this.buildEventUiBases=Pt(xF),this.parseContextBusinessHours=sp(wF),this.buildTitle=Pt(hF),this.nowManager=new Jw,this.emitter=new yp,this.actionRunner=new uF(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=T=>{this.actionRunner.request(T)},this.props=e,this.actionRunner.pause(),this.nowManager=new Jw;let n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=r.calendarOptions.initialView||r.pluginHooks.initialView,d=this.computeCurrentViewData(o,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(d.options);let p={nowManager:this.nowManager,dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},c=zL(r.calendarOptions,r.dateEnv,this.nowManager),b=d.dateProfileGenerator.build(c);so(b.activeRange,c)||(c=b.currentRange.start);for(let T of r.pluginHooks.contextInit)T(p);let k=FL(r.calendarOptions,b,p),E={dynamicOptionOverrides:n,currentViewType:o,currentDate:c,dateProfile:b,businessHours:this.parseContextBusinessHours(p),eventSources:k,eventUiBases:{},eventStore:Di(),renderableEventStore:Di(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(p).selectionConfig},C=Object.assign(Object.assign({},p),E);for(let T of r.pluginHooks.reducers)Object.assign(E,T(null,null,C));ky(E,p)&&this.emitter.trigger("loading",!0),this.state=E,this.updateData(),this.actionRunner.resume()}resetOptions(e,n){let{props:r}=this;n===void 0?r.optionOverrides=e:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),e),this.optionsForRefining.push(...n)),(n===void 0||n.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:n,state:r,emitter:o}=this,d=OL(r.dynamicOptionOverrides,e),p=this.computeOptionsData(n.optionOverrides,d,n.calendarApi),c=BL(r.currentViewType,e),b=this.computeCurrentViewData(c,p,n.optionOverrides,d);n.calendarApi.currentDataManager=this,o.setThisContext(n.calendarApi),o.setOptions(b.options);let k={nowManager:this.nowManager,dateEnv:p.dateEnv,options:p.calendarOptions,pluginHooks:p.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:o,getCurrentData:this.getCurrentData},{currentDate:E,dateProfile:C}=r;this.data&&this.data.dateProfileGenerator!==b.dateProfileGenerator&&(C=b.dateProfileGenerator.build(E)),E=VL(E,e),C=LL(C,e,E,b.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!so(C.currentRange,E))&&(E=C.currentRange.start);let T=$L(r.eventSources,e,C,k),I=$z(r.eventStore,e,T,C,k),$=Ww(T)&&!b.options.progressiveEventRendering&&r.renderableEventStore||I,{eventUiSingleBase:F,selectionConfig:q}=this.buildViewUiProps(k),J=this.buildEventUiBySource(T),Q=this.buildEventUiBases($.defs,F,J),me={dynamicOptionOverrides:d,currentViewType:c,currentDate:E,dateProfile:C,eventSources:T,eventStore:I,renderableEventStore:$,selectionConfig:q,eventUiBases:Q,businessHours:this.parseContextBusinessHours(k),dateSelection:ZL(r.dateSelection,e),eventSelection:YL(r.eventSelection,e),eventDrag:XL(r.eventDrag,e),eventResize:KL(r.eventResize,e)},ke=Object.assign(Object.assign({},k),me);for(let Ve of p.pluginHooks.reducers)Object.assign(me,Ve(r,e,ke));let Re=ky(r,k),Ee=ky(me,k);!Re&&Ee?o.trigger("loading",!0):Re&&!Ee&&o.trigger("loading",!1),this.state=me,n.onAction&&n.onAction(e)}updateData(){let{props:e,state:n}=this,r=this.data,o=this.computeOptionsData(e.optionOverrides,n.dynamicOptionOverrides,e.calendarApi),d=this.computeCurrentViewData(n.currentViewType,o,e.optionOverrides,n.dynamicOptionOverrides),p=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(n.dateProfile,d.options,o.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o),d),n),c=o.pluginHooks.optionChangeHandlers,b=r&&r.calendarOptions,k=o.calendarOptions;if(b&&b!==k){b.timeZone!==k.timeZone&&(n.eventSources=p.eventSources=jL(p.eventSources,n.dateProfile,p),n.eventStore=p.eventStore=iw(p.eventStore,r.dateEnv,p.dateEnv),n.renderableEventStore=p.renderableEventStore=iw(p.renderableEventStore,r.dateEnv,p.dateEnv));for(let E in c)(this.optionsForHandling.indexOf(E)!==-1||b[E]!==k[E])&&c[E](k[E],p)}this.optionsForHandling=[],e.onData&&e.onData(p)}computeOptionsData(e,n,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:o,pluginHooks:d,localeDefaults:p,availableLocaleData:c,extra:b}=this.processRawCalendarOptions(e,n);Qw(b);let k=this.buildDateEnv(o.timeZone,o.locale,o.weekNumberCalculation,o.firstDay,o.weekText,d,c,o.defaultRangeSeparator),E=this.buildViewSpecs(d.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,p),C=this.buildTheme(o,d),T=this.parseToolbars(o,this.stableOptionOverrides,C,E,r);return this.stableCalendarOptionsData={calendarOptions:o,pluginHooks:d,dateEnv:k,viewSpecs:E,theme:C,toolbarConfig:T,localeDefaults:p,availableRawLocales:c.map}}processRawCalendarOptions(e,n){let{locales:r,locale:o}=Rg([Td,e,n]),d=this.organizeRawLocales(r),p=d.map,c=this.buildLocale(o||d.defaultCode,p).options,b=this.buildPluginHooks(e.plugins||[],dF),k=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},z1),O1),L1),b.listenerRefiners),b.optionRefiners),E={},C=Rg([Td,c,e,n]),T={},I=this.currentCalendarOptionsInput,N=this.currentCalendarOptionsRefined,$=!1;for(let F in C)this.optionsForRefining.indexOf(F)===-1&&(C[F]===I[F]||Va[F]&&F in I&&Va[F](I[F],C[F]))?T[F]=N[F]:k[F]?(T[F]=k[F](C[F]),$=!0):E[F]=I[F];return $&&(this.currentCalendarOptionsInput=C,this.currentCalendarOptionsRefined=T,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:b,availableLocaleData:d,localeDefaults:c,extra:E}}_computeCurrentViewData(e,n,r,o){let d=n.viewSpecs[e];if(!d)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:p,extra:c}=this.processRawViewOptions(d,n.pluginHooks,n.localeDefaults,r,o);Qw(c),this.nowManager.handleInput(n.dateEnv,p.now);let b=this.buildDateProfileGenerator({dateProfileGeneratorClass:d.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:d.duration,durationUnit:d.durationUnit,usesMinMaxTime:d.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:p.slotMinTime,slotMaxTime:p.slotMaxTime,showNonCurrentDates:p.showNonCurrentDates,dayCount:p.dayCount,dateAlignment:p.dateAlignment,dateIncrement:p.dateIncrement,hiddenDays:p.hiddenDays,weekends:p.weekends,validRangeInput:p.validRange,visibleRangeInput:p.visibleRange,fixedWeekCount:p.fixedWeekCount}),k=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:d,options:p,dateProfileGenerator:b,viewApi:k}}processRawViewOptions(e,n,r,o,d){let p=Rg([Td,e.optionDefaults,r,o,e.optionOverrides,d]),c=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},z1),O1),L1),iz),n.listenerRefiners),n.optionRefiners),b={},k=this.currentViewOptionsInput,E=this.currentViewOptionsRefined,C=!1,T={};for(let I in p)p[I]===k[I]||Va[I]&&Va[I](p[I],k[I])?b[I]=E[I]:(p[I]===this.currentCalendarOptionsInput[I]||Va[I]&&Va[I](p[I],this.currentCalendarOptionsInput[I])?I in this.currentCalendarOptionsRefined&&(b[I]=this.currentCalendarOptionsRefined[I]):c[I]?b[I]=c[I](p[I]):T[I]=p[I],C=!0);return C&&(this.currentViewOptionsInput=p,this.currentViewOptionsRefined=b),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:T}}}function mF(t,e,n,r,o,d,p,c){let b=Fw(e||p.defaultCode,p.map);return new mz({calendarSystem:"gregory",timeZone:t,namedTimeZoneImpl:d.namedTimeZonedImpl,locale:b,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:d.cmdFormatter,defaultSeparator:c})}function gF(t,e){let n=e.themeClasses[t.themeSystem]||$o;return new n(t)}function yF(t){let e=t.dateProfileGeneratorClass||Z1;return new e(t)}function _F(t,e,n){return new eF(t,e,n)}function bF(t){return ro(t,e=>e.ui)}function xF(t,e,n){let r={"":e};for(let o in t){let d=t[o];d.sourceId&&n[d.sourceId]&&(r[o]=n[d.sourceId])}return r}function vF(t){let{options:e}=t;return{eventUiSingleBase:gp({display:e.eventDisplay,editable:e.editable,startEditable:e.eventStartEditable,durationEditable:e.eventDurationEditable,constraint:e.eventConstraint,overlap:typeof e.eventOverlap=="boolean"?e.eventOverlap:void 0,allow:e.eventAllow,backgroundColor:e.eventBackgroundColor,borderColor:e.eventBorderColor,textColor:e.eventTextColor,color:e.eventColor},t),selectionConfig:gp({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function ky(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function wF(t){return Xz(t.options.businessHours,t)}function Qw(t,e){for(let n in t)console.warn(`Unknown option '${n}'`)}class kF extends bn{render(){let e=this.props.widgetGroups.map(n=>this.renderWidgetGroup(n));return le("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:n}=this,{theme:r}=this.context,o=[],d=!0;for(let p of e){let{buttonName:c,buttonClick:b,buttonText:k,buttonIcon:E,buttonHint:C}=p;if(c==="title")d=!1,o.push(le("h2",{className:"fc-toolbar-title",id:n.titleId},n.title));else{let T=c===n.activeButton,I=!n.isTodayEnabled&&c==="today"||!n.isPrevEnabled&&c==="prev"||!n.isNextEnabled&&c==="next",N=[`fc-${c}-button`,r.getClass("button")];T&&N.push(r.getClass("buttonActive")),o.push(le("button",{type:"button",title:typeof C=="function"?C(n.navUnit):C,disabled:I,"aria-pressed":T,className:N.join(" "),onClick:b},k||(E?le("span",{className:E,role:"img"}):"")))}}if(o.length>1){let p=d&&r.getClass("buttonGroup")||"";return le("div",{className:p},...o)}return o[0]}}class ek extends bn{render(){let{model:e,extraClassName:n}=this.props,r=!1,o,d,p=e.sectionWidgets,c=p.center;return p.left?(r=!0,o=p.left):o=p.start,p.right?(r=!0,d=p.right):d=p.end,le("div",{className:[n||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",o||[]),this.renderSection("center",c||[]),this.renderSection("end",d||[]))}renderSection(e,n){let{props:r}=this;return le(kF,{key:e,widgetGroups:n,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}}class EF extends bn{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Ms(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:n}=this,{aspectRatio:r}=e,o=["fc-view-harness",r||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],d="",p="";return r?n.availableWidth!==null?d=n.availableWidth/r:p=`${1/r*100}%`:d=e.height||"",le("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:o.join(" "),style:{height:d,paddingBottom:p}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class CF extends Zl{constructor(e){super(e),this.handleSegClick=(n,r)=>{let{component:o}=this,{context:d}=o,p=Gl(r);if(p&&o.isValidSegDownEl(n.target)){let c=jr(n.target,".fc-event-forced-url"),b=c?c.querySelector("a[href]").href:"";d.emitter.trigger("eventClick",{el:r,event:new Qn(o.context,p.eventRange.def,p.eventRange.instance),jsEvent:n,view:d.viewApi}),b&&!n.defaultPrevented&&(window.location.href=b)}},this.destroy=k1(e.el,"click",".fc-event",this.handleSegClick)}}class SF extends Zl{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{Gl(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",n,r))},this.handleSegLeave=(n,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,r))},this.removeHoverListeners=d3(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,r){let{component:o}=this,{context:d}=o,p=Gl(r);(!n||o.isValidSegDownEl(n.target))&&d.emitter.trigger(e,{el:r,event:new Qn(d,p.eventRange.def,p.eventRange.instance),jsEvent:n,view:d.viewApi})}}class TF extends La{constructor(){super(...arguments),this.buildViewContext=Pt(_z),this.buildViewPropTransformers=Pt(DF),this.buildToolbarProps=Pt(AF),this.headerRef=Qr(),this.footerRef=Qr(),this.interactionsStore={},this.state={viewLabelId:No()},this.registerInteractiveComponent=(e,n)=>{let r=_O(e,n),p=[CF,SF].concat(this.props.pluginHooks.componentInteractions).map(c=>new c(r));this.interactionsStore[e.uid]=p,ty[e.uid]=r},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let r of n)r.destroy();delete this.interactionsStore[e.uid]}delete ty[e.uid]},this.resizeRunner=new kg(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:n}=this.props;n.handleWindowResize&&e.target===window&&this.resizeRunner.request(n.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:n,options:r}=e,o=!1,d="",p;e.isHeightAuto||e.forPrint?d="":r.height!=null?o=!0:r.contentHeight!=null?d=r.contentHeight:p=Math.max(r.aspectRatio,.5);let c=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),b=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return le(io.Provider,{value:c},le(ja,{unit:"day"},k=>{let E=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,k,e.viewTitle);return le(Bn,null,n.header&&le(ek,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:b},E)),le(EF,{liquid:o,height:d,aspectRatio:p,labeledById:b},this.renderView(e),this.buildAppendContent()),n.footer&&le(ek,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},E)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:n}=e.pluginHooks;for(let r in n)n[r](e[r],e)}componentDidUpdate(e){let{props:n}=this,{propSetHandlers:r}=n.pluginHooks;for(let o in r)n[o]!==e[o]&&r[o](n[o],n)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this,n=e.pluginHooks.viewContainerAppends.map(r=>r(e));return le(Bn,{},...n)}renderView(e){let{pluginHooks:n}=e,{viewSpec:r}=e,o={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},d=this.buildViewPropTransformers(n.viewPropsTransformers);for(let c of d)Object.assign(o,c.transform(o,e));let p=r.component;return le(p,Object.assign({},o))}}function AF(t,e,n,r,o,d){let p=n.build(o,void 0,!1),c=n.buildPrev(e,r,!1),b=n.buildNext(e,r,!1);return{title:d,activeButton:t.type,navUnit:t.singleUnit,isTodayEnabled:p.isValid&&!so(e.currentRange,o),isPrevEnabled:c.isValid,isNextEnabled:b.isValid}}function DF(t){return t.map(e=>new e)}class MF extends xO{constructor(e,n={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;up(()=>{kd(le(yO,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(o,d,p,c)=>(this.setClassNames(o),this.setHeight(d),le(H1.Provider,{value:this.customContentRenderId},le(TF,Object.assign({isHeightAuto:p,forPrint:c},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,kd(null,this.el),this.setClassNames([]),this.setHeight(""))},t3(e),this.el=e,this.renderRunner=new kg(this.handleRenderRequest),new fF({optionOverrides:n,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){up(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,n){this.currentDataManager.resetOptions(e,n)}setClassNames(e){if(!Bo(e,this.currentClassNames)){let{classList:n}=this.el;for(let r of this.currentClassNames)n.remove(r);for(let r of e)n.add(r);this.currentClassNames=e}}setHeight(e){x1(this.el,"height",e)}}const IF={headerToolbar:!0,footerToolbar:!0,events:!0,eventSources:!0,resources:!0},PF=a.defineComponent({props:{options:Object},data(){return{renderId:0,customRenderingMap:new Map}},methods:{getApi(){return this.calendar},buildOptions(t){return{...t,customRenderingMetaMap:BF(this.$slots),handleCustomRendering:this.handleCustomRendering}}},render(){const t=[];for(const e of this.customRenderingMap.values())t.push(a.h(RF,{key:e.id,customRendering:e}));return a.h("div",{attrs:{"data-fc-render-id":this.renderId}},a.h(a.Fragment,t))},mounted(){const t=new xL;this.handleCustomRendering=t.handle.bind(t);const e=this.buildOptions(this.options),n=new MF(this.$el,e);this.calendar=n,n.render(),t.subscribe(r=>{this.customRenderingMap=r,this.renderId++,this.needCustomRenderingResize=!0})},beforeUpdate(){this.getApi().resumeRendering()},updated(){this.needCustomRenderingResize&&(this.needCustomRenderingResize=!1,this.getApi().updateSize())},beforeUnmount(){this.getApi().destroy()},watch:NF()}),RF=a.defineComponent({props:{customRendering:Object},render(){const t=this.customRendering,e=typeof t.generatorMeta=="function"?t.generatorMeta(t.renderProps):t.generatorMeta;return a.h(a.Teleport,{to:t.containerEl},e)}});function aK(t){return t}function NF(){let t={options:{deep:!0,handler(e){let n=this.getApi();n.pauseRendering();let r=this.buildOptions(e);n.resetOptions(r),this.renderId++}}};for(let e in IF)t[`options.${e}`]={deep:!0,handler(n){if(n!==void 0){let r=this.getApi();r.pauseRendering(),r.resetOptions({[e]:n},[e]),this.renderId++}}};return t}function BF(t){const e={};for(const n in t)e[VF(n)]=t[n];return e}function VF(t){return t.split("-").map((e,n)=>n?zF(e):e).join("")}function zF(t){return t.charAt(0).toUpperCase()+t.slice(1)}class OF extends fs{constructor(){super(...arguments),this.headerElRef=Qr()}renderSimpleLayout(e,n){let{props:r,context:o}=this,d=[],p=kp(o.options);return e&&d.push({type:"header",key:"header",isSticky:p,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),d.push({type:"body",key:"body",liquid:!0,chunk:{content:n}}),le(Dd,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},le(my,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:d}))}renderHScrollLayout(e,n,r,o){let d=this.context.pluginHooks.scrollGridImpl;if(!d)throw new Error("No ScrollGrid implementation");let{props:p,context:c}=this,b=!p.forPrint&&kp(c.options),k=!p.forPrint&&Iw(c.options),E=[];return e&&E.push({type:"header",key:"header",isSticky:b,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),E.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:n}]}),k&&E.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:fy}]}),le(Dd,{elClasses:["fc-daygrid"],viewSpec:c.viewSpec},le(d,{liquid:!p.isHeightAuto&&!p.forPrint,forPrint:p.forPrint,collapsibleWidth:p.forPrint,colGroups:[{cols:[{span:r,minWidth:o}]}],sections:E}))}}function Cp(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.row].push(r);return n}function Sp(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.firstCol].push(r);return n}function tk(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.row].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}const nk=Yn({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function rk(t){let{display:e}=t.eventRange.ui;return e==="list-item"||e==="auto"&&!t.eventRange.def.allDay&&t.firstCol===t.lastCol&&t.isStart&&t.isEnd}class ik extends bn{render(){let{props:e}=this;return le(gy,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:nk,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class sk extends bn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:o}=e,d=r.eventTimeFormat||nk,p=Id(o,d,n,!0,e.defaultDisplayEventEnd);return le(Ep,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:Jg(e.seg,n),defaultGenerator:LF,timeText:p,isResizing:!1,isDateSelecting:!1}))}}function LF(t){return le(Bn,null,le("div",{className:"fc-daygrid-event-dot",style:{borderColor:t.borderColor||t.backgroundColor}}),t.timeText&&le("div",{className:"fc-event-time"},t.timeText),le("div",{className:"fc-event-title"},t.event.title||le(Bn,null," ")))}class FF extends bn{constructor(){super(...arguments),this.compileSegs=Pt($F)}render(){let{props:e}=this,{allSegs:n,invisibleSegs:r}=this.compileSegs(e.singlePlacements);return le(Bw,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let o=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return le(Bn,null,n.map(d=>{let p=d.eventRange.instance.instanceId;return le("div",{className:"fc-daygrid-event-harness",key:p,style:{visibility:o[p]?"hidden":""}},rk(d)?le(sk,Object.assign({seg:d,isDragging:!1,isSelected:p===e.eventSelection,defaultDisplayEventEnd:!1},oo(d,e.todayRange))):le(ik,Object.assign({seg:d,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:p===e.eventSelection,defaultDisplayEventEnd:!1},oo(d,e.todayRange))))}))}})}}function $F(t){let e=[],n=[];for(let r of t)e.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:e,invisibleSegs:n}}const jF=Yn({week:"narrow"});class UF extends fs{constructor(){super(...arguments),this.rootElRef=Qr(),this.state={dayNumberId:No()},this.handleRootEl=e=>{Ms(this.rootElRef,e),Ms(this.props.elRef,e)}}render(){let{context:e,props:n,state:r,rootElRef:o}=this,{options:d,dateEnv:p}=e,{date:c,dateProfile:b}=n;const k=n.showDayNumber&&WF(c,b.currentRange,p);return le(_y,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...n.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},n.extraDataAttrs),n.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:HF,date:c,dateProfile:b,todayRange:n.todayRange,showDayNumber:n.showDayNumber,isMonthStart:k,extraRenderProps:n.extraRenderProps},(E,C)=>le("div",{ref:n.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:n.minHeight}},n.showWeekNumber&&le(Nw,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Yl(e,c,"week"),date:c,defaultFormat:jF}),!C.isDisabled&&(n.showDayNumber||by(d)||n.forceDayTop)?le("div",{className:"fc-daygrid-day-top"},le(E,{elTag:"a",elClasses:["fc-daygrid-day-number",k&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Yl(e,c)),{id:r.dayNumberId})})):n.showDayNumber?le("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},le("a",{className:"fc-daygrid-day-number"}," ")):void 0,le("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,le("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},le(FF,{allDayDate:c,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:o,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),le("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}}function HF(t){return t.dayNumberText||le(Bn,null," ")}function WF(t,e,n){const{start:r,end:o}=e,d=Vo(o,-1),p=n.getYear(r),c=n.getMonth(r),b=n.getYear(d),k=n.getMonth(d);return!(p===b&&c===k)&&(t.valueOf()===r.valueOf()||n.getDay(t)===1&&t.valueOf()<o.valueOf())}function ok(t){return t.eventRange.instance.instanceId+":"+t.firstCol}function ak(t){return ok(t)+":"+t.lastCol}function qF(t,e,n,r,o,d,p){let c=new YF(q=>{let J=t[q.index].eventRange.instance.instanceId+":"+q.span.start+":"+(q.span.end-1);return o[J]||1});c.allowReslicing=!0,c.strictOrder=r,e===!0||n===!0?(c.maxCoord=d,c.hiddenConsumes=!0):typeof e=="number"?c.maxStackCnt=e:typeof n=="number"&&(c.maxStackCnt=n,c.hiddenConsumes=!0);let b=[],k=[];for(let q=0;q<t.length;q+=1){let J=t[q],Q=ak(J);o[Q]!=null?b.push({index:q,span:{start:J.firstCol,end:J.lastCol+1}}):k.push(J)}let E=c.addSegs(b),C=c.toRects(),{singleColPlacements:T,multiColPlacements:I,leftoverMargins:N}=GF(C,t,p),$=[],F=[];for(let q of k){I[q.firstCol].push({seg:q,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let J=q.firstCol;J<=q.lastCol;J+=1)T[J].push({seg:Kl(q,J,J+1,p),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let q=0;q<p.length;q+=1)$.push(0);for(let q of E){let J=t[q.index],Q=q.span;I[Q.start].push({seg:Kl(J,Q.start,Q.end,p),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let me=Q.start;me<Q.end;me+=1)$[me]+=1,T[me].push({seg:Kl(J,me,me+1,p),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let q=0;q<p.length;q+=1)F.push(N[q]);return{singleColPlacements:T,multiColPlacements:I,moreCnts:$,moreMarginTops:F}}function GF(t,e,n){let r=ZF(t,n.length),o=[],d=[],p=[];for(let c=0;c<n.length;c+=1){let b=r[c],k=[],E=0,C=0;for(let I of b){let N=e[I.index];k.push({seg:Kl(N,c,c+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:I.levelCoord,marginTop:I.levelCoord-E}),E=I.levelCoord+I.thickness}let T=[];E=0,C=0;for(let I of b){let N=e[I.index],$=I.span.end-I.span.start>1,F=I.span.start===c;C+=I.levelCoord-E,E=I.levelCoord+I.thickness,$?(C+=I.thickness,F&&T.push({seg:Kl(N,I.span.start,I.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:I.levelCoord,marginTop:0})):F&&(T.push({seg:Kl(N,I.span.start,I.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:I.levelCoord,marginTop:C}),C=0)}o.push(k),d.push(T),p.push(C)}return{singleColPlacements:o,multiColPlacements:d,leftoverMargins:p}}function ZF(t,e){let n=[];for(let r=0;r<e;r+=1)n.push([]);for(let r of t)for(let o=r.span.start;o<r.span.end;o+=1)n[o].push(r);return n}function Kl(t,e,n,r){if(t.firstCol===e&&t.lastCol===n-1)return t;let o=t.eventRange,d=o.range,p=Fo(d,{start:r[e].date,end:Er(r[n-1].date,1)});return Object.assign(Object.assign({},t),{firstCol:e,lastCol:n-1,eventRange:{def:o.def,ui:Object.assign(Object.assign({},o.ui),{durationEditable:!1}),instance:o.instance,range:p},isStart:t.isStart&&p.start.valueOf()===d.start.valueOf(),isEnd:t.isEnd&&p.end.valueOf()===d.end.valueOf()})}class YF extends bw{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const n=super.addSegs(e),{entriesByLevel:r}=this,o=d=>!this.forceHidden[Ua(d)];for(let d=0;d<r.length;d+=1)r[d]=r[d].filter(o);return n}handleInvalidInsertion(e,n,r){const{entriesByLevel:o,forceHidden:d}=this,{touchingEntry:p,touchingLevel:c,touchingLateral:b}=e;if(this.hiddenConsumes&&p){const k=Ua(p);if(!d[k])if(this.allowReslicing){const E=Object.assign(Object.assign({},p),{span:cy(p.span,n.span)}),C=Ua(E);d[C]=!0,o[c][b]=E,r.push(E),this.splitEntry(p,n,r)}else d[k]=!0,r.push(p)}super.handleInvalidInsertion(e,n,r)}}class lk extends fs{constructor(){super(...arguments),this.cellElRefs=new ao,this.frameElRefs=new ao,this.fgElRefs=new ao,this.segHarnessRefs=new ao,this.rootElRef=Qr(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:n,context:r}=this,{options:o}=r,d=e.cells.length,p=Sp(e.businessHourSegs,d),c=Sp(e.bgEventSegs,d),b=Sp(this.getHighlightSegs(),d),k=Sp(this.getMirrorSegs(),d),{singleColPlacements:E,multiColPlacements:C,moreCnts:T,moreMarginTops:I}=qF(Kg(e.fgEventSegs,o.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,o.eventOrderStrict,n.segHeights,n.maxContentHeight,e.cells),N=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return le("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(($,F)=>{let q=this.renderFgSegs(F,e.forPrint?E[F]:C[F],e.todayRange,N),J=this.renderFgSegs(F,XF(k[F],C),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return le(UF,{key:$.key,elRef:this.cellElRefs.createRef($.key),innerElRef:this.frameElRefs.createRef($.key),dateProfile:e.dateProfile,date:$.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&F===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:$.extraRenderProps,extraDataAttrs:$.extraDataAttrs,extraClassNames:$.extraClassNames,extraDateSpan:$.extraDateSpan,moreCnt:T[F],moreMarginTop:I[F],singlePlacements:E[F],fgContentElRef:this.fgElRefs.createRef($.key),fgContent:le(Bn,null,le(Bn,null,q),le(Bn,null,J)),bgContent:le(Bn,null,this.renderFillSegs(b[F],"highlight"),this.renderFillSegs(p[F],"non-business"),this.renderFillSegs(c[F],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,n){let r=this.props;this.updateSizing(!ps(e,r))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,n,r,o,d,p,c){let{context:b}=this,{eventSelection:k}=this.props,{framePositions:E}=this.state,C=this.props.cells.length===1,T=d||p||c,I=[];if(E)for(let N of n){let{seg:$}=N,{instanceId:F}=$.eventRange.instance,q=N.isVisible&&!o[F],J=N.isAbsolute,Q="",me="";J&&(b.isRtl?(me=0,Q=E.lefts[$.lastCol]-E.lefts[$.firstCol]):(Q=0,me=E.rights[$.firstCol]-E.rights[$.lastCol])),I.push(le("div",{className:"fc-daygrid-event-harness"+(J?" fc-daygrid-event-harness-abs":""),key:ok($),ref:T?null:this.segHarnessRefs.createRef(ak($)),style:{visibility:q?"":"hidden",marginTop:J?"":N.marginTop,top:J?N.absoluteTop:"",left:Q,right:me}},rk($)?le(sk,Object.assign({seg:$,isDragging:d,isSelected:F===k,defaultDisplayEventEnd:C},oo($,r))):le(ik,Object.assign({seg:$,isDragging:d,isResizing:p,isDateSelecting:c,isSelected:F===k,defaultDisplayEventEnd:C},oo($,r)))))}return I}renderFillSegs(e,n){let{isRtl:r}=this.context,{todayRange:o}=this.props,{framePositions:d}=this.state,p=[];if(d)for(let c of e){let b=r?{right:0,left:d.lefts[c.lastCol]-d.lefts[c.firstCol]}:{left:0,right:d.rights[c.firstCol]-d.rights[c.lastCol]};p.push(le("div",{key:uw(c.eventRange),className:"fc-daygrid-bg-harness",style:b},n==="bg-event"?le(Pw,Object.assign({seg:c},oo(c,o))):Rw(n)))}return le(Bn,{},...p)}updateSizing(e){let{props:n,state:r,frameElRefs:o}=this;if(!n.forPrint&&n.clientWidth!==null){if(e){let b=n.cells.map(k=>o.currentMap[k.key]);if(b.length){let k=this.rootElRef.current,E=new Xl(k,b,!0,!1);(!r.framePositions||!r.framePositions.similarTo(E))&&this.setState({framePositions:new Xl(k,b,!0,!1)})}}const d=this.state.segHeights,p=this.querySegHeights(),c=n.dayMaxEvents===!0||n.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},d),p),maxContentHeight:c?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,n={};for(let r in e){let o=Math.round(e[r].getBoundingClientRect().height);n[r]=Math.max(n[r]||0,o)}return n}computeMaxContentHeight(){let e=this.props.cells[0].key,n=this.cellElRefs.currentMap[e],r=this.fgElRefs.currentMap[e];return n.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(n=>e[n.key])}}lk.addStateEquality({segHeights:ps});function XF(t,e){if(!t.length)return[];let n=KF(e);return t.map(r=>({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:n[r.eventRange.instance.instanceId],marginTop:0}))}function KF(t){let e={};for(let n of t)for(let r of n)e[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return e}class JF extends fs{constructor(){super(...arguments),this.splitBusinessHourSegs=Pt(Cp),this.splitBgEventSegs=Pt(QF),this.splitFgEventSegs=Pt(Cp),this.splitDateSelectionSegs=Pt(Cp),this.splitEventDrag=Pt(tk),this.splitEventResize=Pt(tk),this.rowRefs=new ao}render(){let{props:e,context:n}=this,r=e.cells.length,o=this.splitBusinessHourSegs(e.businessHourSegs,r),d=this.splitBgEventSegs(e.bgEventSegs,r),p=this.splitFgEventSegs(e.fgEventSegs,r),c=this.splitDateSelectionSegs(e.dateSelectionSegs,r),b=this.splitEventDrag(e.eventDrag,r),k=this.splitEventResize(e.eventResize,r),E=r>=7&&e.clientWidth?e.clientWidth/n.options.aspectRatio/6:null;return le(ja,{unit:"day"},(C,T)=>le(Bn,null,e.cells.map((I,N)=>le(lk,{ref:this.rowRefs.createRef(N),key:I.length?I[0].date.toISOString():N,showDayNumbers:r>1,showWeekNumbers:e.showWeekNumbers,todayRange:T,dateProfile:e.dateProfile,cells:I,renderIntro:e.renderRowIntro,businessHourSegs:o[N],eventSelection:e.eventSelection,bgEventSegs:d[N],fgEventSegs:p[N],dateSelectionSegs:c[N],eventDrag:b[N],eventResize:k[N],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:E,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],n=e?e.closest(".fc-daygrid-body"):null;n&&(this.rootEl=n,this.context.registerInteractiveComponent(this,{el:n,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new Xl(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new Xl(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,n){let{colPositions:r,rowPositions:o}=this,d=r.leftToIndex(e),p=o.topToIndex(n);if(p!=null&&d!=null){let c=this.props.cells[p][d];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(p,d),allDay:!0},c.extraDateSpan),dayEl:this.getCellEl(p,d),rect:{left:r.lefts[d],right:r.rights[d],top:o.tops[p],bottom:o.bottoms[p]},layer:0}}return null}getCellEl(e,n){return this.rowRefs.currentMap[e].getCellEls()[n]}getCellRange(e,n){let r=this.props.cells[e][n].date,o=Er(r,1);return{start:r,end:o}}}function QF(t,e){return Cp(t.filter(e6),e)}function e6(t){return t.eventRange.def.allDay}class t6 extends fs{constructor(){super(...arguments),this.elRef=Qr(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:n,dayMaxEvents:r,expandRows:o}=e,d=r===!0||n===!0;d&&!o&&(d=!1,n=null,r=null);let p=["fc-daygrid-body",d?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"];return le("div",{ref:this.elRef,className:p.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},le("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:o?e.clientHeight:""}},e.colGroupNode,le("tbody",{role:"presentation"},le(JF,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:r,dayMaxEventRows:n,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=n6(this.elRef.current,this.props.dateProfile);if(e){const n=e.closest(".fc-daygrid-body"),r=n.closest(".fc-scroller"),o=e.getBoundingClientRect().top-n.getBoundingClientRect().top;r.scrollTop=o?o+1:0}this.needsScrollReset=!1}}}function n6(t,e){let n;return e.currentRangeUnit.match(/year|month/)&&(n=t.querySelector(`[data-date="${$3(e.currentDate)}-01"]`)),n||(n=t.querySelector(`[data-date="${Sd(e.currentDate)}"]`)),n}class r6 extends Cw{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}class ck extends fs{constructor(){super(...arguments),this.slicer=new r6,this.tableRef=Qr()}render(){let{props:e,context:n}=this;return le(t6,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,n,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}class i6 extends OF{constructor(){super(...arguments),this.buildDayTableModel=Pt(s6),this.headerRef=Qr(),this.tableRef=Qr()}render(){let{options:e,dateProfileGenerator:n}=this.context,{props:r}=this,o=this.buildDayTableModel(r.dateProfile,n),d=e.dayHeaders&&le(ww,{ref:this.headerRef,dateProfile:r.dateProfile,dates:o.headerDates,datesRepDistinctDays:o.rowCnt===1}),p=c=>le(ck,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:o,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:c.tableColGroupNode,tableMinWidth:c.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:c.clientWidth,clientHeight:c.clientHeight,forPrint:r.forPrint});return e.dayMinWidth?this.renderHScrollLayout(d,p,o.colCnt,e.dayMinWidth):this.renderSimpleLayout(d,p)}}function s6(t,e){let n=new kw(t.renderRange,e);return new Ew(n,/year|month|week/.test(t.currentRangeUnit))}class o6 extends Z1{buildRenderRange(e,n,r){let o=super.buildRenderRange(e,n,r),{props:d}=this;return a6({currentRange:o,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:d.fixedWeekCount,dateEnv:d.dateEnv})}}function a6(t){let{dateEnv:e,currentRange:n}=t,{start:r,end:o}=n,d;if(t.snapToWeek&&(r=e.startOfWeek(r),d=e.startOfWeek(o),d.valueOf()!==o.valueOf()&&(o=M1(d,1))),t.fixedWeekCount){let p=e.startOfWeek(e.startOfMonth(Er(n.end,-1))),c=Math.ceil(M3(p,o));o=M1(o,6-c)}return{start:r,end:o}}var l6=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';tp(l6);var c6=Is({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:i6,dateProfileGeneratorClass:o6},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class d6 extends CO{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?tO(e)?["timed","allDay"]:["allDay"]:["timed"]}}const u6=Yn({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function dk(t){let e=["fc-timegrid-slot","fc-timegrid-slot-label",t.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return le(io.Consumer,null,n=>{if(!t.isLabeled)return le("td",{className:e.join(" "),"data-time":t.isoTimeStr});let{dateEnv:r,options:o,viewApi:d}=n,p=o.slotLabelFormat==null?u6:Array.isArray(o.slotLabelFormat)?Yn(o.slotLabelFormat[0]):Yn(o.slotLabelFormat),c={level:0,time:t.time,date:r.toDate(t.date),view:d,text:r.format(t.date,p)};return le(Ur,{elTag:"td",elClasses:e,elAttrs:{"data-time":t.isoTimeStr},renderProps:c,generatorName:"slotLabelContent",customGenerator:o.slotLabelContent,defaultGenerator:h6,classNameGenerator:o.slotLabelClassNames,didMount:o.slotLabelDidMount,willUnmount:o.slotLabelWillUnmount},b=>le("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},le(b,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function h6(t){return t.text}class p6 extends bn{render(){return this.props.slatMetas.map(e=>le("tr",{key:e.key},le(dk,Object.assign({},e))))}}const f6=Yn({week:"short"}),m6=5;class g6 extends fs{constructor(){super(...arguments),this.allDaySplitter=new d6,this.headerElRef=Qr(),this.rootElRef=Qr(),this.scrollerElRef=Qr(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let n=this.scrollerElRef.current;n&&(n.scrollTop=e)},this.renderHeadAxis=(e,n="")=>{let{options:r}=this.context,{dateProfile:o}=this.props,d=o.renderRange,c=zo(d.start,d.end)===1?Yl(this.context,d.start,"week"):{};return r.weekNumbers&&e==="day"?le(Nw,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:d.start,defaultFormat:f6},b=>le("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:n}},le(b,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:c}))):le("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},le("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},this.renderTableRowAxis=e=>{let{options:n,viewApi:r}=this.context,o={text:n.allDayText,view:r};return le(Ur,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:o,generatorName:"allDayContent",customGenerator:n.allDayContent,defaultGenerator:y6,classNameGenerator:n.allDayClassNames,didMount:n.allDayDidMount,willUnmount:n.allDayWillUnmount},d=>le("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},le(d,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,n,r){let{context:o,props:d}=this,p=[],c=kp(o.options);return e&&p.push({type:"header",key:"header",isSticky:c,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),n&&(p.push({type:"body",key:"all-day",chunk:{content:n}}),p.push({type:"body",key:"all-day-divider",outerContent:le("tr",{role:"presentation",className:"fc-scrollgrid-section"},le("td",{className:"fc-timegrid-divider "+o.theme.getClass("tableCellShaded")}))})),p.push({type:"body",key:"body",liquid:!0,expandRows:!!o.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:r}}),le(Dd,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:o.viewSpec},le(my,{liquid:!d.isHeightAuto&&!d.forPrint,collapsibleWidth:d.forPrint,cols:[{width:"shrink"}],sections:p}))}renderHScrollLayout(e,n,r,o,d,p,c){let b=this.context.pluginHooks.scrollGridImpl;if(!b)throw new Error("No ScrollGrid implementation");let{context:k,props:E}=this,C=!E.forPrint&&kp(k.options),T=!E.forPrint&&Iw(k.options),I=[];e&&I.push({type:"header",key:"header",isSticky:C,syncRowHeights:!0,chunks:[{key:"axis",rowContent:$=>le("tr",{role:"presentation"},this.renderHeadAxis("day",$.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),n&&(I.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:$=>le("tr",{role:"presentation"},this.renderTableRowAxis($.rowSyncHeights[0]))},{key:"cols",content:n}]}),I.push({key:"all-day-divider",type:"body",outerContent:le("tr",{role:"presentation",className:"fc-scrollgrid-section"},le("td",{colSpan:2,className:"fc-timegrid-divider "+k.theme.getClass("tableCellShaded")}))}));let N=k.options.nowIndicator;return I.push({type:"body",key:"body",liquid:!0,expandRows:!!k.options.expandRows,chunks:[{key:"axis",content:$=>le("div",{className:"fc-timegrid-axis-chunk"},le("table",{"aria-hidden":!0,style:{height:$.expandRows?$.clientHeight:""}},$.tableColGroupNode,le("tbody",null,le(p6,{slatMetas:p}))),le("div",{className:"fc-timegrid-now-indicator-container"},le(ja,{unit:N?"minute":"day"},F=>{let q=N&&c&&c.safeComputeTop(F);return typeof q=="number"?le(yy,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:q},isAxis:!0,date:F}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:r}]}),T&&I.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:fy},{key:"cols",content:fy}]}),le(Dd,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:k.viewSpec},le(b,{liquid:!E.isHeightAuto&&!E.forPrint,forPrint:E.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:o,minWidth:d}]}],sections:I}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:n}=this.context.options;return(e===!0||n===!0)&&(e=void 0,n=m6),{dayMaxEvents:e,dayMaxEventRows:n}}}function y6(t){return t.text}class _6{constructor(e,n,r){this.positions=e,this.dateProfile=n,this.slotDuration=r}safeComputeTop(e){let{dateProfile:n}=this;if(so(n.currentRange,e)){let r=Un(e),o=e.valueOf()-r.valueOf();if(o>=hs(n.slotMinTime)&&o<hs(n.slotMaxTime))return this.computeTimeTop(on(o))}return null}computeDateTop(e,n){return n||(n=Un(e)),this.computeTimeTop(on(e.valueOf()-n.valueOf()))}computeTimeTop(e){let{positions:n,dateProfile:r}=this,o=n.els.length,d=(e.milliseconds-hs(r.slotMinTime))/hs(this.slotDuration),p,c;return d=Math.max(0,d),d=Math.min(o,d),p=Math.floor(d),p=Math.min(p,o-1),c=d-p,n.tops[p]+n.getHeight(p)*c}}class b6 extends bn{render(){let{props:e,context:n}=this,{options:r}=n,{slatElRefs:o}=e;return le("tbody",null,e.slatMetas.map((d,p)=>{let c={time:d.time,date:n.dateEnv.toDate(d.date),view:n.viewApi};return le("tr",{key:d.key,ref:o.createRef(d.key)},e.axis&&le(dk,Object.assign({},d)),le(Ur,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!d.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":d.isoTimeStr},renderProps:c,generatorName:"slotLaneContent",customGenerator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount}))}))}}class x6 extends bn{constructor(){super(...arguments),this.rootElRef=Qr(),this.slatElRefs=new ao}render(){let{props:e,context:n}=this;return le("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},le("table",{"aria-hidden":!0,className:n.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,le(b6,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:n}=this;n.onCoords&&n.clientWidth!==null&&this.rootElRef.current.offsetHeight&&n.onCoords(new _6(new Xl(this.rootElRef.current,v6(this.slatElRefs.currentMap,n.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function v6(t,e){return e.map(n=>t[n.key])}function Pd(t,e){let n=[],r;for(r=0;r<e;r+=1)n.push([]);if(t)for(r=0;r<t.length;r+=1)n[t[r].col].push(t[r]);return n}function uk(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.col].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}class w6 extends bn{render(){let{props:e}=this;return le(Bw,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>mk(e.hiddenSegs,e),defaultGenerator:k6,forceTimed:!0},n=>le(n,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function k6(t){return t.shortText}function E6(t,e,n){let r=new bw;e!=null&&(r.strictOrder=e),n!=null&&(r.maxStackCnt=n);let o=r.addSegs(t),d=OO(o),p=C6(r);return p=D6(p,1),{segRects:M6(p),hiddenGroups:d}}function C6(t){const{entriesByLevel:e}=t,n=Ey((r,o)=>r+":"+o,(r,o)=>{let d=A6(t,r,o),p=hk(d,n),c=e[r][o];return[Object.assign(Object.assign({},c),{nextLevelNodes:p[0]}),c.thickness+p[1]]});return hk(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n)[0]}function hk(t,e){if(!t)return[[],0];let{level:n,lateralStart:r,lateralEnd:o}=t,d=r,p=[];for(;d<o;)p.push(e(n,d)),d+=1;return p.sort(S6),[p.map(T6),p[0][1]]}function S6(t,e){return e[1]-t[1]}function T6(t){return t[0]}function A6(t,e,n){let{levelCoords:r,entriesByLevel:o}=t,d=o[e][n],p=r[e]+d.thickness,c=r.length,b=e;for(;b<c&&r[b]<p;b+=1);for(;b<c;b+=1){let k=o[b],E,C=uy(k,d.span.start,ly),T=C[0]+C[1],I=T;for(;(E=k[I])&&E.span.start<d.span.end;)I+=1;if(T<I)return{level:b,lateralStart:T,lateralEnd:I}}return null}function D6(t,e){const n=Ey((r,o,d)=>Ua(r),(r,o,d)=>{let{nextLevelNodes:p,thickness:c}=r,b=c+d,k=c/b,E,C=[];if(!p.length)E=e;else for(let I of p)if(E===void 0){let N=n(I,o,b);E=N[0],C.push(N[1])}else{let N=n(I,E,0);C.push(N[1])}let T=(E-o)*k;return[E-T,Object.assign(Object.assign({},r),{thickness:T,nextLevelNodes:C})]});return t.map(r=>n(r,0,0)[1])}function M6(t){let e=[];const n=Ey((o,d,p)=>Ua(o),(o,d,p)=>{let c=Object.assign(Object.assign({},o),{levelCoord:d,stackDepth:p,stackForward:0});return e.push(c),c.stackForward=r(o.nextLevelNodes,d+o.thickness,p+1)+1});function r(o,d,p){let c=0;for(let b of o)c=Math.max(n(b,d,p),c);return c}return r(t,0,0),e}function Ey(t,e){const n={};return(...r)=>{let o=t(...r);return o in n?n[o]:n[o]=e(...r)}}function pk(t,e,n=null,r=0){let o=[];if(n)for(let d=0;d<t.length;d+=1){let p=t[d],c=n.computeDateTop(p.start,e),b=Math.max(c+(r||0),n.computeDateTop(p.end,e));o.push({start:Math.round(c),end:Math.round(b)})}return o}function I6(t,e,n,r){let o=[],d=[];for(let k=0;k<t.length;k+=1){let E=e[k];E?o.push({index:k,thickness:1,span:E}):d.push(t[k])}let{segRects:p,hiddenGroups:c}=E6(o,n,r),b=[];for(let k of p)b.push({seg:t[k.index],rect:k});for(let k of d)b.push({seg:k,rect:null});return{segPlacements:b,hiddenGroups:c}}const P6=Yn({hour:"numeric",minute:"2-digit",meridiem:!1});class fk extends bn{render(){return le(gy,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:P6}))}}class R6 extends bn{constructor(){super(...arguments),this.sortEventSegs=Pt(Kg)}render(){let{props:e,context:n}=this,{options:r}=n,o=r.selectMirror,d=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||o&&e.dateSelectionSegs||[],p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},c=this.sortEventSegs(e.fgEventSegs,r.eventOrder);return le(_y,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},b=>le("div",{className:"fc-timegrid-col-frame"},le("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),le("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(c,p,!1,!1,!1)),le("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(d,{},!!e.eventDrag,!!e.eventResize,!!o,"mirror")),le("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),by(r)&&le(b,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,n,r,o,d,p){let{props:c}=this;return c.forPrint?mk(e,c):this.renderPositionedFgSegs(e,n,r,o,d,p)}renderPositionedFgSegs(e,n,r,o,d,p){let{eventMaxStack:c,eventShortHeight:b,eventOrderStrict:k,eventMinHeight:E}=this.context.options,{date:C,slatCoords:T,eventSelection:I,todayRange:N,nowDate:$}=this.props,F=r||o||d,q=pk(e,C,T,E),{segPlacements:J,hiddenGroups:Q}=I6(e,q,k,c);return le(Bn,null,this.renderHiddenGroups(Q,e),J.map(me=>{let{seg:ke,rect:Re}=me,Ee=ke.eventRange.instance.instanceId,Ve=F||!!(!n[Ee]&&Re),Be=Cy(Re&&Re.span),Ze=!F&&Re?this.computeSegHStyle(Re):{left:0,right:0},tt=!!Re&&Re.stackForward>0,Xe=!!Re&&Re.span.end-Re.span.start<b;return le("div",{className:"fc-timegrid-event-harness"+(tt?" fc-timegrid-event-harness-inset":""),key:p||Ee,style:Object.assign(Object.assign({visibility:Ve?"":"hidden"},Be),Ze)},le(fk,Object.assign({seg:ke,isDragging:r,isResizing:o,isDateSelecting:d,isSelected:Ee===I,isShort:Xe},oo(ke,N,$))))}))}renderHiddenGroups(e,n){let{extraDateSpan:r,dateProfile:o,todayRange:d,nowDate:p,eventSelection:c,eventDrag:b,eventResize:k}=this.props;return le(Bn,null,e.map(E=>{let C=Cy(E.span),T=N6(E.entries,n);return le(w6,{key:N1(zw(T)),hiddenSegs:T,top:C.top,bottom:C.bottom,extraDateSpan:r,dateProfile:o,todayRange:d,nowDate:p,eventSelection:c,eventDrag:b,eventResize:k})}))}renderFillSegs(e,n){let{props:r,context:o}=this,p=pk(e,r.date,r.slatCoords,o.options.eventMinHeight).map((c,b)=>{let k=e[b];return le("div",{key:uw(k.eventRange),className:"fc-timegrid-bg-harness",style:Cy(c)},n==="bg-event"?le(Pw,Object.assign({seg:k},oo(k,r.todayRange,r.nowDate))):Rw(n))});return le(Bn,null,p)}renderNowIndicator(e){let{slatCoords:n,date:r}=this.props;return n?e.map((o,d)=>le(yy,{key:d,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:n.computeDateTop(o.start,r)},isAxis:!1,date:r})):null}computeSegHStyle(e){let{isRtl:n,options:r}=this.context,o=r.slotEventOverlap,d=e.levelCoord,p=e.levelCoord+e.thickness,c,b;o&&(p=Math.min(1,d+(p-d)*2)),n?(c=1-p,b=d):(c=d,b=1-p);let k={zIndex:e.stackDepth+1,left:c*100+"%",right:b*100+"%"};return o&&!e.stackForward&&(k[n?"marginLeft":"marginRight"]=10*2),k}}function mk(t,{todayRange:e,nowDate:n,eventSelection:r,eventDrag:o,eventResize:d}){let p=(o?o.affectedInstances:null)||(d?d.affectedInstances:null)||{};return le(Bn,null,t.map(c=>{let b=c.eventRange.instance.instanceId;return le("div",{key:b,style:{visibility:p[b]?"hidden":""}},le(fk,Object.assign({seg:c,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:b===r,isShort:!1},oo(c,e,n))))}))}function Cy(t){return t?{top:t.start,bottom:-t.end}:{top:"",bottom:""}}function N6(t,e){return t.map(n=>e[n.index])}class B6 extends bn{constructor(){super(...arguments),this.splitFgEventSegs=Pt(Pd),this.splitBgEventSegs=Pt(Pd),this.splitBusinessHourSegs=Pt(Pd),this.splitNowIndicatorSegs=Pt(Pd),this.splitDateSelectionSegs=Pt(Pd),this.splitEventDrag=Pt(uk),this.splitEventResize=Pt(uk),this.rootElRef=Qr(),this.cellElRefs=new ao}render(){let{props:e,context:n}=this,r=n.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),o=e.cells.length,d=this.splitFgEventSegs(e.fgEventSegs,o),p=this.splitBgEventSegs(e.bgEventSegs,o),c=this.splitBusinessHourSegs(e.businessHourSegs,o),b=this.splitNowIndicatorSegs(e.nowIndicatorSegs,o),k=this.splitDateSelectionSegs(e.dateSelectionSegs,o),E=this.splitEventDrag(e.eventDrag,o),C=this.splitEventResize(e.eventResize,o);return le("div",{className:"fc-timegrid-cols",ref:this.rootElRef},le("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,le("tbody",{role:"presentation"},le("tr",{role:"row"},e.axis&&le("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},le("div",{className:"fc-timegrid-col-frame"},le("div",{className:"fc-timegrid-now-indicator-container"},typeof r=="number"&&le(yy,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:r},isAxis:!0,date:e.nowDate})))),e.cells.map((T,I)=>le(R6,{key:T.key,elRef:this.cellElRefs.createRef(T.key),dateProfile:e.dateProfile,date:T.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:T.extraRenderProps,extraDataAttrs:T.extraDataAttrs,extraClassNames:T.extraClassNames,extraDateSpan:T.extraDateSpan,fgEventSegs:d[I],bgEventSegs:p[I],businessHourSegs:c[I],nowIndicatorSegs:b[I],dateSelectionSegs:k[I],eventDrag:E[I],eventResize:C[I],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new Xl(this.rootElRef.current,V6(this.cellElRefs.currentMap,e.cells),!0,!1))}}function V6(t,e){return e.map(n=>t[n.key])}class z6 extends fs{constructor(){super(...arguments),this.processSlotOptions=Pt(O6),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:n}=this.props,{slatCoords:r}=this.state;if(n&&r){if(e.time){let o=r.computeTimeTop(e.time);o=Math.ceil(o),o&&(o+=1),n(o)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:n}=this;return le("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},le(x6,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),le(B6,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:n.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,n){let{dateEnv:r,options:o}=this.context,{colCoords:d}=this,{dateProfile:p}=this.props,{slatCoords:c}=this.state,{snapDuration:b,snapsPerSlot:k}=this.processSlotOptions(this.props.slotDuration,o.snapDuration),E=d.leftToIndex(e),C=c.positions.topToIndex(n);if(E!=null&&C!=null){let T=this.props.cells[E],I=c.positions.tops[C],N=c.positions.getHeight(C),$=(n-I)/N,F=Math.floor($*k),q=C*k+F,J=this.props.cells[E].date,Q=Tg(p.slotMinTime,S3(b,q)),me=r.add(J,Q),ke=r.add(me,b);return{dateProfile:p,dateSpan:Object.assign({range:{start:me,end:ke},allDay:!1},T.extraDateSpan),dayEl:d.els[E],rect:{left:d.lefts[E],right:d.rights[E],top:I,bottom:I+N},layer:0}}return null}}function O6(t,e){let n=e||t,r=Ag(t,n);return r===null&&(n=t,r=1),{snapDuration:n,snapsPerSlot:r}}class L6 extends Cw{sliceRange(e,n){let r=[];for(let o=0;o<n.length;o+=1){let d=Fo(e,n[o]);d&&r.push({start:d.start,end:d.end,isStart:d.start.valueOf()===e.start.valueOf(),isEnd:d.end.valueOf()===e.end.valueOf(),col:o})}return r}}class F6 extends fs{constructor(){super(...arguments),this.buildDayRanges=Pt($6),this.slicer=new L6,this.timeColsRef=Qr()}render(){let{props:e,context:n}=this,{dateProfile:r,dayTableModel:o}=e,{nowIndicator:d,nextDayThreshold:p}=n.options,c=this.buildDayRanges(o,r,n.dateEnv);return le(ja,{unit:d?"minute":"day"},(b,k)=>le(z6,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,r,null,n,c),{forPrint:e.forPrint,axis:e.axis,dateProfile:r,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:o.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:b,nowIndicatorSegs:d&&this.slicer.sliceNowDate(b,r,p,n,c),todayRange:k,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function $6(t,e,n){let r=[];for(let o of t.headerDates)r.push({start:n.add(o,e.slotMinTime),end:n.add(o,e.slotMaxTime)});return r}const gk=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function j6(t,e,n,r,o){let d=new Date(0),p=t,c=on(0),b=n||U6(r),k=[];for(;hs(p)<hs(e);){let E=o.add(d,p),C=Ag(c,b)!==null;k.push({date:E,time:p,key:E.toISOString(),isoTimeStr:j3(E),isLabeled:C}),p=Tg(p,r),c=Tg(c,r)}return k}function U6(t){let e,n,r;for(e=gk.length-1;e>=0;e-=1)if(n=on(gk[e]),r=Ag(n,t),r!==null&&r>1)return n;return t}class H6 extends g6{constructor(){super(...arguments),this.buildTimeColsModel=Pt(W6),this.buildSlatMetas=Pt(j6)}render(){let{options:e,dateEnv:n,dateProfileGenerator:r}=this.context,{props:o}=this,{dateProfile:d}=o,p=this.buildTimeColsModel(d,r),c=this.allDaySplitter.splitProps(o),b=this.buildSlatMetas(d.slotMinTime,d.slotMaxTime,e.slotLabelInterval,e.slotDuration,n),{dayMinWidth:k}=e,E=!k,C=k,T=e.dayHeaders&&le(ww,{dates:p.headerDates,dateProfile:d,datesRepDistinctDays:!0,renderIntro:E?this.renderHeadAxis:null}),I=e.allDaySlot!==!1&&($=>le(ck,Object.assign({},c.allDay,{dateProfile:d,dayTableModel:p,nextDayThreshold:e.nextDayThreshold,tableMinWidth:$.tableMinWidth,colGroupNode:$.tableColGroupNode,renderRowIntro:E?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:$.clientWidth,clientHeight:$.clientHeight,forPrint:o.forPrint},this.getAllDayMaxEventProps()))),N=$=>le(F6,Object.assign({},c.timed,{dayTableModel:p,dateProfile:d,axis:E,slotDuration:e.slotDuration,slatMetas:b,forPrint:o.forPrint,tableColGroupNode:$.tableColGroupNode,tableMinWidth:$.tableMinWidth,clientWidth:$.clientWidth,clientHeight:$.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:$.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return C?this.renderHScrollLayout(T,I,N,p.colCnt,k,b,this.state.slatCoords):this.renderSimpleLayout(T,I,N)}}function W6(t,e){let n=new kw(t.renderRange,e);return new Ew(n,!1)}var q6='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';tp(q6);var G6=Is({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:H6,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class Z6 extends bn{constructor(){super(...arguments),this.state={textId:No()}}render(){let{theme:e,dateEnv:n,options:r,viewApi:o}=this.context,{cellId:d,dayDate:p,todayRange:c}=this.props,{textId:b}=this.state,k=ry(p,c),E=r.listDayFormat?n.format(p,r.listDayFormat):"",C=r.listDaySideFormat?n.format(p,r.listDaySideFormat):"",T=Object.assign({date:n.toDate(p),view:o,textId:b,text:E,sideText:C,navLinkAttrs:Yl(this.context,p),sideNavLinkAttrs:Yl(this.context,p,"day",!1)},k);return le(Ur,{elTag:"tr",elClasses:["fc-list-day",...bp(k,e)],elAttrs:{"data-date":Sd(p)},renderProps:T,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:Y6,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},I=>le("th",{scope:"colgroup",colSpan:3,id:d,"aria-labelledby":b},le(I,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}}function Y6(t){return le(Bn,null,t.text&&le("a",Object.assign({id:t.textId,className:"fc-list-day-text"},t.navLinkAttrs),t.text),t.sideText&&le("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},t.sideNavLinkAttrs),t.sideText))}const X6=Yn({hour:"numeric",minute:"2-digit",meridiem:"short"});class K6 extends bn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:o,timeHeaderId:d,eventHeaderId:p,dateHeaderId:c}=e,b=r.eventTimeFormat||X6;return le(Ep,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",o.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>J6(o,n),seg:o,timeText:"",disableDragging:!0,disableResizing:!0}),(k,E)=>le(Bn,null,Q6(o,b,n,d,c),le("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},le("span",{className:"fc-list-event-dot",style:{borderColor:E.borderColor||E.backgroundColor}})),le(k,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${p} ${c}`}})))}}function J6(t,e){let n=Jg(t,e);return le("a",Object.assign({},n),t.eventRange.def.title)}function Q6(t,e,n,r,o){let{options:d}=n;if(d.displayEventTime!==!1){let p=t.eventRange.def,c=t.eventRange.instance,b=!1,k;if(p.allDay?b=!0:Az(t.eventRange.range)?t.isStart?k=Id(t,e,n,null,null,c.range.start,t.end):t.isEnd?k=Id(t,e,n,null,null,t.start,c.range.end):b=!0:k=Id(t,e,n),b){let E={text:n.options.allDayText,view:n.viewApi};return le(Ur,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${o}`},renderProps:E,generatorName:"allDayContent",customGenerator:d.allDayContent,defaultGenerator:e$,classNameGenerator:d.allDayClassNames,didMount:d.allDayDidMount,willUnmount:d.allDayWillUnmount})}return le("td",{className:"fc-list-event-time"},k)}return null}function e$(t){return t.text}class t$ extends fs{constructor(){super(...arguments),this.computeDateVars=Pt(r$),this.eventStoreToSegs=Pt(this._eventStoreToSegs),this.state={timeHeaderId:No(),eventHeaderId:No(),dateHeaderIdRoot:No()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:n}=this,{dayDates:r,dayRanges:o}=this.computeDateVars(e.dateProfile),d=this.eventStoreToSegs(e.eventStore,e.eventUiBases,o);return le(Dd,{elRef:this.setRootEl,elClasses:["fc-list",n.theme.getClass("table"),n.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:n.viewSpec},le(Dw,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},d.length>0?this.renderSegList(d,r):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:n}=this.context,r={text:e.noEventsText,view:n};return le(Ur,{elTag:"div",elClasses:["fc-list-empty"],renderProps:r,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:n$,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},o=>le(o,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,n){let{theme:r,options:o}=this.context,{timeHeaderId:d,eventHeaderId:p,dateHeaderIdRoot:c}=this.state,b=i$(e);return le(ja,{unit:"day"},(k,E)=>{let C=[];for(let T=0;T<b.length;T+=1){let I=b[T];if(I){let N=Sd(n[T]),$=c+"-"+N;C.push(le(Z6,{key:N,cellId:$,dayDate:n[T],todayRange:E})),I=Kg(I,o.eventOrder);for(let F of I)C.push(le(K6,Object.assign({key:N+":"+F.eventRange.instance.instanceId,seg:F,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:d,eventHeaderId:p,dateHeaderId:$},oo(F,E,k))))}}return le("table",{className:"fc-list-table "+r.getClass("table")},le("thead",null,le("tr",null,le("th",{scope:"col",id:d},o.timeHint),le("th",{scope:"col","aria-hidden":!0}),le("th",{scope:"col",id:p},o.eventHint))),le("tbody",null,C))})}_eventStoreToSegs(e,n,r){return this.eventRangesToSegs(Xg(e,n,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,r)}eventRangesToSegs(e,n){let r=[];for(let o of e)r.push(...this.eventRangeToSegs(o,n));return r}eventRangeToSegs(e,n){let{dateEnv:r}=this.context,{nextDayThreshold:o}=this.context.options,d=e.range,p=e.def.allDay,c,b,k,E=[];for(c=0;c<n.length;c+=1)if(b=Fo(d,n[c]),b&&(k={component:this,eventRange:e,start:b.start,end:b.end,isStart:e.isStart&&b.start.valueOf()===d.start.valueOf(),isEnd:e.isEnd&&b.end.valueOf()===d.end.valueOf(),dayIndex:c},E.push(k),!k.isEnd&&!p&&c+1<n.length&&d.end<r.add(n[c+1].start,o))){k.end=d.end,k.isEnd=!0;break}return E}}function n$(t){return t.text}function r$(t){let e=Un(t.renderRange.start),n=t.renderRange.end,r=[],o=[];for(;e<n;)r.push(e),o.push({start:e,end:Er(e,1)}),e=Er(e,1);return{dayDates:r,dayRanges:o}}function i$(t){let e=[],n,r;for(n=0;n<t.length;n+=1)r=t[n],(e[r.dayIndex]||(e[r.dayIndex]=[])).push(r);return e}var s$=':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}';tp(s$);const o$={listDayFormat:yk,listDaySideFormat:yk,noEventsClassNames:De,noEventsContent:De,noEventsDidMount:De,noEventsWillUnmount:De};function yk(t){return t===!1?null:Yn(t)}var a$=Is({name:"@fullcalendar/list",optionRefiners:o$,views:{list:{component:t$,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});hy.touchMouseIgnoreWait=500;let Sy=0,Tp=0,Ty=!1;class _k{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=n=>{if(!this.shouldIgnoreMouse()&&l$(n)&&this.tryStart(n)){let r=this.createEventFromMouse(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=n=>{let r=this.createEventFromMouse(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleMouseUp=n=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(n)),this.cleanup()},this.handleTouchStart=n=>{if(this.tryStart(n)){this.isTouchDragging=!0;let r=this.createEventFromTouch(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r);let o=n.target;this.shouldIgnoreMove||o.addEventListener("touchmove",this.handleTouchMove),o.addEventListener("touchend",this.handleTouchEnd),o.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=n=>{let r=this.createEventFromTouch(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleTouchEnd=n=>{if(this.isDragging){let r=n.target;r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",this.handleTouchEnd),r.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(n)),this.cleanup(),this.isTouchDragging=!1,c$()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let r=window.scrollX-this.prevScrollX+this.prevPageX,o=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:o,deltaX:r-this.origPageX,deltaY:o-this.origPageY})}},this.containerEl=e,this.emitter=new yp,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),d$()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),u$()}tryStart(e){let n=this.querySubjectEl(e),r=e.target;return n&&(!this.handleSelector||jr(r,this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){Ty=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?jr(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return Sy||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Ty=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,n){let r=0,o=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(r=e.pageX-this.origPageX,o=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:r,deltaY:o}}createEventFromTouch(e,n){let r=e.touches,o,d,p=0,c=0;return r&&r.length?(o=r[0].pageX,d=r[0].pageY):(o=e.pageX,d=e.pageY),n?(this.origPageX=o,this.origPageY=d):(p=o-this.origPageX,c=d-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:o,pageY:d,deltaX:p,deltaY:c}}}function l$(t){return t.button===0&&!t.ctrlKey}function c$(){Sy+=1,setTimeout(()=>{Sy-=1},hy.touchMouseIgnoreWait)}function d$(){Tp+=1,Tp===1&&window.addEventListener("touchmove",bk,{passive:!1})}function u$(){Tp-=1,Tp||window.removeEventListener("touchmove",bk,{passive:!1})}function bk(t){Ty&&t.preventDefault()}class h${constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,n,r){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=n-window.scrollX,this.origScreenY=r-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,n){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=n-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,n){let r=()=>{this.cleanup(),n()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)}doRevertAnimation(e,n){let r=this.mirrorEl,o=this.sourceEl.getBoundingClientRect();r.style.transition="top "+n+"ms,left "+n+"ms",Ed(r,{left:o.left,top:o.top}),u3(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(Eg(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&Ed(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,n=this.mirrorEl;return n||(n=this.mirrorEl=this.sourceEl.cloneNode(!0),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.pointerEvents="none",n.classList.add("fc-event-dragging"),Ed(n,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(n)),n}}class xk extends ay{constructor(e,n){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=n,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class vk extends xk{constructor(e,n){super(new VO(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return NO(this.scrollController.el)}}class p$ extends xk{constructor(e){super(new zO,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const wk=typeof performance=="function"?performance.now:Date.now;class f${constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let n=wk();this.handleSide(e,(n-this.msSinceRequest)/1e3),this.requestAnimation(n)}else this.isAnimating=!1}}}start(e,n,r){this.isEnabled&&(this.scrollCaches=this.buildCaches(r),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,n))}handleMove(e,n){if(this.isEnabled){let r=e-window.scrollX,o=n-window.scrollY,d=this.pointerScreenY===null?0:o-this.pointerScreenY,p=this.pointerScreenX===null?0:r-this.pointerScreenX;d<0?this.everMovedUp=!0:d>0&&(this.everMovedDown=!0),p<0?this.everMovedLeft=!0:p>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=o,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(wk()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,n){let{scrollCache:r}=e,{edgeThreshold:o}=this,d=o-e.distance,p=d*d/(o*o)*this.maxVelocity*n,c=1;switch(e.name){case"left":c=-1;case"right":r.setScrollLeft(r.getScrollLeft()+p*c);break;case"top":c=-1;case"bottom":r.setScrollTop(r.getScrollTop()+p*c);break}}computeBestEdge(e,n){let{edgeThreshold:r}=this,o=null,d=this.scrollCaches||[];for(let p of d){let c=p.clientRect,b=e-c.left,k=c.right-e,E=n-c.top,C=c.bottom-n;b>=0&&k>=0&&E>=0&&C>=0&&(E<=r&&this.everMovedUp&&p.canScrollUp()&&(!o||o.distance>E)&&(o={scrollCache:p,name:"top",distance:E}),C<=r&&this.everMovedDown&&p.canScrollDown()&&(!o||o.distance>C)&&(o={scrollCache:p,name:"bottom",distance:C}),b<=r&&this.everMovedLeft&&p.canScrollLeft()&&(!o||o.distance>b)&&(o={scrollCache:p,name:"left",distance:b}),k<=r&&this.everMovedRight&&p.canScrollRight()&&(!o||o.distance>k)&&(o={scrollCache:p,name:"right",distance:k}))}return o}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new p$(!1):new vk(n,!1))}queryScrollEls(e){let n=[];for(let r of this.scrollQuery)typeof r=="object"?n.push(r):n.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(r)));return n}}class Rd extends FO{constructor(e,n){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=o=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,h3(document.body),f3(document.body),o.isTouch||o.origEvent.preventDefault(),this.emitter.trigger("pointerdown",o),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(o.subjectEl,o.pageX,o.pageY),this.startDelay(o),this.minDistance||this.handleDistanceSurpassed(o)))},this.onPointerMove=o=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",o),!this.isDistanceSurpassed){let d=this.minDistance,p,{deltaX:c,deltaY:b}=o;p=c*c+b*b,p>=d*d&&this.handleDistanceSurpassed(o)}this.isDragging&&(o.origEvent.type!=="scroll"&&(this.mirror.handleMove(o.pageX,o.pageY),this.autoScroller.handleMove(o.pageX,o.pageY)),this.emitter.trigger("dragmove",o))}},this.onPointerUp=o=>{this.isInteracting&&(this.isInteracting=!1,p3(document.body),m3(document.body),this.emitter.trigger("pointerup",o),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(o)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new _k(e);r.emitter.on("pointerdown",this.onPointerDown),r.emitter.on("pointermove",this.onPointerMove),r.emitter.on("pointerup",this.onPointerUp),n&&(r.selector=n),this.mirror=new h$,this.autoScroller=new f$}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class m${constructor(e){this.el=e,this.origRect=oy(e),this.scrollCaches=_w(e).map(n=>new vk(n,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let n of this.scrollCaches)e+=n.origScrollLeft-n.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let n of this.scrollCaches)e+=n.origScrollTop-n.getScrollTop();return e}isWithinClipping(e,n){let r={left:e,top:n};for(let o of this.scrollCaches)if(!g$(o.getEventTarget())&&!vO(r,o.clientRect))return!1;return!0}}function g$(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class Ap{constructor(e,n){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=r=>{let{dragging:o}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?(o.setIgnoreMove(!1),this.emitter.trigger("pointerdown",r)):o.setIgnoreMove(!0)},this.handleDragStart=r=>{this.emitter.trigger("dragstart",r),this.handleMove(r,!0)},this.handleDragMove=r=>{this.emitter.trigger("dragmove",r),this.handleMove(r)},this.handlePointerUp=r=>{this.releaseHits(),this.emitter.trigger("pointerup",r)},this.handleDragEnd=r=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,r),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",r)},this.droppableStore=n,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new yp}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},r=n,o=e.subjectEl,d;o instanceof HTMLElement&&(d=oy(o),r=wO(r,d));let p=this.initialHit=this.queryHitForOffset(r.left,r.top);if(p){if(this.useSubjectCenter&&d){let c=gw(d,p.rect);c&&(r=kO(c))}this.coordAdjust=EO(r,n)}else this.coordAdjust={left:0,top:0}}handleMove(e,n){let r=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(n||!Dp(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=ro(this.droppableStore,e=>(e.component.prepareHits(),new m$(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:r,offsetTrackers:o}=this,d=null;for(let p in r){let c=r[p].component,b=o[p];if(b&&b.isWithinClipping(e,n)){let k=b.computeLeft(),E=b.computeTop(),C=e-k,T=n-E,{origRect:I}=b,N=I.right-I.left,$=I.bottom-I.top;if(C>=0&&C<N&&T>=0&&T<$){let F=c.queryHit(C,T,N,$);F&&hp(F.dateProfile.activeRange,F.dateSpan.range)&&(this.disablePointCheck||b.el.contains(b.el.getRootNode().elementFromPoint(C+k-window.scrollX,T+E-window.scrollY)))&&(!d||F.layer>d.layer)&&(F.componentId=p,F.context=c.context,F.rect.left+=k,F.rect.right+=k,F.rect.top+=E,F.rect.bottom+=E,d=F)}}}return d}}function Dp(t,e){return!t&&!e?!0:!!t!=!!e?!1:dO(t.dateSpan,e.dateSpan)}function kk(t,e){let n={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(n,r(t,e));return Object.assign(n,y$(t,e.dateEnv)),n}function y$(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class _$ extends Zl{constructor(e){super(e),this.handlePointerDown=r=>{let{dragging:o}=this,d=r.origEvent.target;o.setIgnoreMove(!this.component.isValidDateDownEl(d))},this.handleDragEnd=r=>{let{component:o}=this,{pointer:d}=this.dragging;if(!d.wasTouchScroll){let{initialHit:p,finalHit:c}=this.hitDragging;if(p&&c&&Dp(p,c)){let{context:b}=o,k=Object.assign(Object.assign({},kk(p.dateSpan,b)),{dayEl:p.dayEl,jsEvent:r.origEvent,view:b.viewApi||b.calendarApi.view});b.emitter.trigger("dateClick",k)}}},this.dragging=new Rd(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new Ap(this.dragging,ey(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class b$ extends Zl{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=p=>{let{component:c,dragging:b}=this,{options:k}=c.context,E=k.selectable&&c.isValidDateDownEl(p.origEvent.target);b.setIgnoreMove(!E),b.delay=p.isTouch?x$(c):null},this.handleDragStart=p=>{this.component.context.calendarApi.unselect(p)},this.handleHitUpdate=(p,c)=>{let{context:b}=this.component,k=null,E=!1;if(p){let C=this.hitDragging.initialHit;p.componentId===C.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(C,p)||(k=v$(C,p,b.pluginHooks.dateSelectionTransformers)),(!k||!qO(k,p.dateProfile,b))&&(E=!0,k=null)}k?b.dispatch({type:"SELECT_DATES",selection:k}):c||b.dispatch({type:"UNSELECT_DATES"}),E?Cg():Sg(),c||(this.dragSelection=k)},this.handlePointerUp=p=>{this.dragSelection&&(ow(this.dragSelection,p,this.component.context),this.dragSelection=null)};let{component:n}=e,{options:r}=n.context,o=this.dragging=new Rd(e.el);o.touchScrollAllowed=!1,o.minDistance=r.selectMinDistance||0,o.autoScroller.isEnabled=r.dragScroll;let d=this.hitDragging=new Ap(this.dragging,ey(e));d.emitter.on("pointerdown",this.handlePointerDown),d.emitter.on("dragstart",this.handleDragStart),d.emitter.on("hitupdate",this.handleHitUpdate),d.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function x$(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function v$(t,e,n){let r=t.dateSpan,o=e.dateSpan,d=[r.range.start,r.range.end,o.range.start,o.range.end];d.sort(x3);let p={};for(let c of n){let b=c(t,e);if(b===!1)return null;b&&Object.assign(p,b)}return p.range={start:d[0],end:d[3]},p.allDay=r.allDay,p}class Nd extends Zl{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=p=>{let c=p.origEvent.target,{component:b,dragging:k}=this,{mirror:E}=k,{options:C}=b.context,T=b.context;this.subjectEl=p.subjectEl;let I=this.subjectSeg=Gl(p.subjectEl),$=(this.eventRange=I.eventRange).instance.instanceId;this.relevantEvents=qg(T.getCurrentData().eventStore,$),k.minDistance=p.isTouch?0:C.eventDragMinDistance,k.delay=p.isTouch&&$!==b.props.eventSelection?k$(b):null,C.fixedMirrorParent?E.parentNode=C.fixedMirrorParent:E.parentNode=jr(c,".fc"),E.revertDuration=C.dragRevertDuration;let F=b.isValidSegDownEl(c)&&!jr(c,".fc-event-resizer");k.setIgnoreMove(!F),this.isDragging=F&&p.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=p=>{let c=this.component.context,b=this.eventRange,k=b.instance.instanceId;p.isTouch?k!==this.component.props.eventSelection&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:k}):c.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(c.calendarApi.unselect(p),c.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new Qn(c,b.def,b.instance),jsEvent:p.origEvent,view:c.viewApi}))},this.handleHitUpdate=(p,c)=>{if(!this.isDragging)return;let b=this.relevantEvents,k=this.hitDragging.initialHit,E=this.component.context,C=null,T=null,I=null,N=!1,$={affectedEvents:b,mutatedEvents:Di(),isEvent:!0};if(p){C=p.context;let F=C.options;E===C||F.editable&&F.droppable?(T=w$(k,p,this.eventRange.instance.range.start,C.getCurrentData().pluginHooks.eventDragMutationMassagers),T&&(I=Yg(b,C.getCurrentData().eventUiBases,T,C),$.mutatedEvents=I,Sw($,p.dateProfile,C)||(N=!0,T=null,I=null,$.mutatedEvents=Di()))):C=null}this.displayDrag(C,$),N?Cg():Sg(),c||(E===C&&Dp(k,p)&&(T=null),this.dragging.setMirrorNeedsRevert(!T),this.dragging.setMirrorIsVisible(!p||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=C,this.validMutation=T,this.mutatedRelevantEvents=I)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=p=>{if(this.isDragging){let c=this.component.context,b=c.viewApi,{receivingContext:k,validMutation:E}=this,C=this.eventRange.def,T=this.eventRange.instance,I=new Qn(c,C,T),N=this.relevantEvents,$=this.mutatedRelevantEvents,{finalHit:F}=this.hitDragging;if(this.clearDrag(),c.emitter.trigger("eventDragStop",{el:this.subjectEl,event:I,jsEvent:p.origEvent,view:b}),E){if(k===c){let q=new Qn(c,$.defs[C.defId],T?$.instances[T.instanceId]:null);c.dispatch({type:"MERGE_EVENTS",eventStore:$});let J={oldEvent:I,event:q,relatedEvents:$a($,c,T),revert(){c.dispatch({type:"MERGE_EVENTS",eventStore:N})}},Q={};for(let me of c.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(Q,me(E,c));c.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},J),Q),{el:p.subjectEl,delta:E.datesDelta,jsEvent:p.origEvent,view:b})),c.emitter.trigger("eventChange",J)}else if(k){let q={event:I,relatedEvents:$a(N,c,T),revert(){c.dispatch({type:"MERGE_EVENTS",eventStore:N})}};c.emitter.trigger("eventLeave",Object.assign(Object.assign({},q),{draggedEl:p.subjectEl,view:b})),c.dispatch({type:"REMOVE_EVENTS",eventStore:N}),c.emitter.trigger("eventRemove",q);let J=$.defs[C.defId],Q=$.instances[T.instanceId],me=new Qn(k,J,Q);k.dispatch({type:"MERGE_EVENTS",eventStore:$});let ke={event:me,relatedEvents:$a($,k,Q),revert(){k.dispatch({type:"REMOVE_EVENTS",eventStore:$})}};k.emitter.trigger("eventAdd",ke),p.isTouch&&k.dispatch({type:"SELECT_EVENT",eventInstanceId:T.instanceId}),k.emitter.trigger("drop",Object.assign(Object.assign({},kk(F.dateSpan,k)),{draggedEl:p.subjectEl,jsEvent:p.origEvent,view:F.context.viewApi})),k.emitter.trigger("eventReceive",Object.assign(Object.assign({},ke),{draggedEl:p.subjectEl,view:F.context.viewApi}))}}else c.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:r}=n.context,o=this.dragging=new Rd(e.el);o.pointer.selector=Nd.SELECTOR,o.touchScrollAllowed=!1,o.autoScroller.isEnabled=r.dragScroll;let d=this.hitDragging=new Ap(this.dragging,ty);d.useSubjectCenter=e.useEventCenter,d.emitter.on("pointerdown",this.handlePointerDown),d.emitter.on("dragstart",this.handleDragStart),d.emitter.on("hitupdate",this.handleHitUpdate),d.emitter.on("pointerup",this.handlePointerUp),d.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,n){let r=this.component.context,o=this.receivingContext;o&&o!==e&&(o===r?o.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:Di(),isEvent:!0}}):o.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:n})}clearDrag(){let e=this.component.context,{receivingContext:n}=this;n&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e!==n&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}Nd.SELECTOR=".fc-event-draggable, .fc-event-resizable";function w$(t,e,n,r){let o=t.dateSpan,d=e.dateSpan,p=o.range.start,c=d.range.start,b={};o.allDay!==d.allDay&&(b.allDay=d.allDay,b.hasEnd=e.context.options.allDayMaintainDuration,d.allDay?p=Un(n):p=n);let k=Wl(p,c,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);k.milliseconds&&(b.allDay=!1);let E={datesDelta:k,standardProps:b};for(let C of r)C(E,t,e);return E}function k$(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class E$ extends Zl{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=d=>{let{component:p}=this,c=this.querySegEl(d),b=Gl(c),k=this.eventRange=b.eventRange;this.dragging.minDistance=p.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(d.origEvent.target)||d.isTouch&&this.component.props.eventSelection!==k.instance.instanceId)},this.handleDragStart=d=>{let{context:p}=this.component,c=this.eventRange;this.relevantEvents=qg(p.getCurrentData().eventStore,this.eventRange.instance.instanceId);let b=this.querySegEl(d);this.draggingSegEl=b,this.draggingSeg=Gl(b),p.calendarApi.unselect(),p.emitter.trigger("eventResizeStart",{el:b,event:new Qn(p,c.def,c.instance),jsEvent:d.origEvent,view:p.viewApi})},this.handleHitUpdate=(d,p,c)=>{let{context:b}=this.component,k=this.relevantEvents,E=this.hitDragging.initialHit,C=this.eventRange.instance,T=null,I=null,N=!1,$={affectedEvents:k,mutatedEvents:Di(),isEvent:!0};d&&(d.componentId===E.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(E,d)||(T=C$(E,d,c.subjectEl.classList.contains("fc-event-resizer-start"),C.range))),T&&(I=Yg(k,b.getCurrentData().eventUiBases,T,b),$.mutatedEvents=I,Sw($,d.dateProfile,b)||(N=!0,T=null,I=null,$.mutatedEvents=null)),I?b.dispatch({type:"SET_EVENT_RESIZE",state:$}):b.dispatch({type:"UNSET_EVENT_RESIZE"}),N?Cg():Sg(),p||(T&&Dp(E,d)&&(T=null),this.validMutation=T,this.mutatedRelevantEvents=I)},this.handleDragEnd=d=>{let{context:p}=this.component,c=this.eventRange.def,b=this.eventRange.instance,k=new Qn(p,c,b),E=this.relevantEvents,C=this.mutatedRelevantEvents;if(p.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:k,jsEvent:d.origEvent,view:p.viewApi}),this.validMutation){let T=new Qn(p,C.defs[c.defId],b?C.instances[b.instanceId]:null);p.dispatch({type:"MERGE_EVENTS",eventStore:C});let I={oldEvent:k,event:T,relatedEvents:$a(C,p,b),revert(){p.dispatch({type:"MERGE_EVENTS",eventStore:E})}};p.emitter.trigger("eventResize",Object.assign(Object.assign({},I),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||on(0),endDelta:this.validMutation.endDelta||on(0),jsEvent:d.origEvent,view:p.viewApi})),p.emitter.trigger("eventChange",I)}else p.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:n}=e,r=this.dragging=new Rd(e.el);r.pointer.selector=".fc-event-resizer",r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.context.options.dragScroll;let o=this.hitDragging=new Ap(this.dragging,ey(e));o.emitter.on("pointerdown",this.handlePointerDown),o.emitter.on("dragstart",this.handleDragStart),o.emitter.on("hitupdate",this.handleHitUpdate),o.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return jr(e.subjectEl,".fc-event")}}function C$(t,e,n,r){let o=t.context.dateEnv,d=t.dateSpan.range.start,p=e.dateSpan.range.start,c=Wl(d,p,o,t.largeUnit);if(n){if(o.add(r.start,c)<r.end)return{startDelta:c}}else if(o.add(r.end,c)>r.start)return{endDelta:c};return null}class S${constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=r=>{r.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=r=>{let o=this.context.options.unselectCancel,d=v1(r.origEvent);this.matchesCancel=!!jr(d,o),this.matchesEvent=!!jr(d,Nd.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:o}=this,{documentPointer:d}=this,p=o.getCurrentData();if(!d.wasTouchScroll){if(p.dateSelection&&!this.isRecentPointerDateSelect){let c=o.options.unselectAuto;c&&(!c||!this.matchesCancel)&&o.calendarApi.unselect(r)}p.eventSelection&&!this.matchesEvent&&o.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new _k(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}const T$={fixedMirrorParent:De},A$={dateClick:De,eventDragStart:De,eventDragStop:De,eventDrop:De,eventResizeStart:De,eventResizeStop:De,eventResize:De,drop:De,eventReceive:De,eventLeave:De};hy.dataAttrPrefix="";var D$=Is({name:"@fullcalendar/interaction",componentInteractions:[_$,b$,Nd,E$],calendarInteractions:[S$],elementDraggingImpl:Rd,optionRefiners:T$,listenerRefiners:A$}),M$={code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",year:"рік",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText(t){return"+ще "+t+"..."},noEventsText:"Немає подій для відображення"};const I$={},P$={class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function R$(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",P$,e[0]||(e[0]=[a.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),a.createElementVNode("path",{d:"M15 3v18"},null,-1),a.createElementVNode("path",{d:"m8 9 3 3-3 3"},null,-1)]))}const Ek=Oe(I$,[["render",R$]]),N$={},B$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function V$(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",B$,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Bd=Oe(N$,[["render",V$]]),z$={components:{FullCalendar:PF,IconOpenCard:Ek,IconChevronDown:Bd},data(){return{isVisible:!0,isVisibleBar:!0,currentPeriod:"",calendarOptions:{plugins:[c6,G6,a$,D$],initialView:"dayGridMonth",locale:M$,events:[{title:"Событие 1",date:"2025-02-23"},{title:"Событие 3",date:"2025-02-04"},{title:"Событие 2",start:"2025-02-02",end:"2025-02-06"}]},currentView:"dayGridMonth",views:{timeGridWeek:"Тиждень",dayGridMonth:"Місяць"},scheme:[{id:"type",type:"Check",label:"Тип",inline:!0,options:[{color:"red",text:"Зайняті",id:"red"},{color:"green",text:"Вільні",id:"green"},{color:"gray",text:"Без статусу",id:"gray"}]}]}},mounted(){this.updateCurrentPeriod()},methods:{updateCurrentPeriod(){const e=this.$refs.fullCalendar.getApi().getDate(),n=e.toLocaleString("default",{month:"long"}),r=e.getFullYear();this.currentPeriod=`${n} ${r}`},changeView(t){var e,n;this.isVisible=!1,this.currentView=t,this.calendarOptions={...this.calendarOptions,initialView:t},queueMicrotask(()=>this.isVisible=!0),(n=(e=this.$refs)==null?void 0:e.popover)==null||n.togglePopover(),this.updateCurrentPeriod()},prev(){this.$refs.fullCalendar.getApi().prev(),this.updateCurrentPeriod()},next(){this.$refs.fullCalendar.getApi().next(),this.updateCurrentPeriod()}}},O$={class:"flex p-[10px]"},L$={class:"flex-grow bg-white"},F$={class:"p-[10px] flex justify-start gap-2 items-center border-gray-200"},$$={class:"flex items-center gap-2 ml-auto"},j$={class:"text-lg font-semibold text-gray-700"},U$={class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 bg-gray-100 border border-transparent rounded-lg gap-x-2 hover:bg-gray-200 focus:bg-gray-200"},H$={class:"flex flex-col p-[2px] gap-[2px] w-[170px]"},W$=["onClick"];function q$(t,e,n,r,o,d){const p=a.resolveComponent("VsText"),c=a.resolveComponent("VsFilterList"),b=a.resolveComponent("IconChevronDown"),k=a.resolveComponent("VsPopover"),E=a.resolveComponent("FullCalendar");return a.openBlock(),a.createElementBlock("div",O$,[a.createElementVNode("div",L$,[a.createElementVNode("div",F$,[a.createVNode(p,{type:"text",modelValue:t.searchValue,"onUpdate:modelValue":e[0]||(e[0]=C=>t.searchValue=C),clearable:!0,placeholder:"Пошук ",class:"w-[300px] [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"]),a.createVNode(c,{scheme:o.scheme,isDialog:!1,view:"plain"},null,8,["scheme"]),a.createElementVNode("div",$$,[a.createElementVNode("div",j$,a.toDisplayString(o.currentPeriod),1),a.createVNode(k,{placement:"bottom-right",ref:"popover"},{reference:a.withCtx(()=>{var C;return[a.createElementVNode("button",U$,[a.createTextVNode(a.toDisplayString((C=o.views)==null?void 0:C[o.currentView])+" ",1),a.createVNode(b,{height:"14",width:"14"})])]}),default:a.withCtx(()=>[a.createElementVNode("div",H$,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.views,(C,T)=>(a.openBlock(),a.createElementBlock("button",{key:T,onClick:I=>d.changeView(T),class:a.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",[T===o.currentView?"bg-gray-100":""]])},a.toDisplayString(C),11,W$))),128))])]),_:1},512),a.createElementVNode("button",{onClick:e[1]||(e[1]=(...C)=>d.prev&&d.prev(...C)),class:"inline-flex h-[38px] items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 bg-gray-100 border border-transparent rounded-lg gap-x-2 hover:bg-gray-200 focus:bg-gray-200"},[a.createVNode(b,{height:"14",width:"14",class:"rotate-90"})]),a.createElementVNode("button",{onClick:e[2]||(e[2]=(...C)=>d.next&&d.next(...C)),class:"inline-flex h-[38px] items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 bg-gray-100 border border-transparent rounded-lg gap-x-2 hover:bg-gray-200 focus:bg-gray-200"},[a.createVNode(b,{height:"14",width:"14",class:"-rotate-90"})])])]),o.isVisible?(a.openBlock(),a.createBlock(E,{key:0,options:o.calendarOptions,class:"px-[10px] py-[4px]",ref:"fullCalendar"},null,8,["options"])):a.createCommentVNode("",!0)])])}const Ck=Oe(z$,[["render",q$]]),G$={key:0,class:"text-[12px]"},Z$=Oe({__name:"map",props:{modelValue:Array},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,o=a.ref(null),d=a.ref(null),p=a.ref(null),c=a.ref(!1),b=[[22.1372,44.3804],[40.2276,52.3792]];a.onMounted(()=>{var E;d.value=new Dh.Map({container:o.value,style:{version:8,sources:{voyager:{type:"raster",tiles:["https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"],tileSize:256,attribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, © <a href='https://carto.com/attributions'>CARTO</a>"}},layers:[{id:"voyager-layer",type:"raster",source:"voyager",minzoom:0,maxzoom:22}]},center:((E=n.modelValue)==null?void 0:E.length)===2?n.modelValue:[30.5234,50.4501],zoom:10,maxBounds:b}),setTimeout(()=>d.value.resize()),d.value.addControl(new Dh.NavigationControl,"top-right"),n.modelValue&&n.modelValue.length===2&&k(n.modelValue),d.value.on("click",C=>{const T=[C.lngLat.lng,C.lngLat.lat];r("update:modelValue",T),k(T)}),d.value.on("move",()=>{if(p.value){const C=d.value.getCenter();p.value.setLngLat(C),r("update:modelValue",[(C==null?void 0:C.lng)!==void 0?Number(C.lng).toFixed(5):null,(C==null?void 0:C.lat)!==void 0?Number(C.lat).toFixed(5):null])}})});const k=E=>{p.value?p.value.setLngLat(E):p.value=new Dh.Marker().setLngLat(E).addTo(d.value),c.value||d.value.setCenter(E)};return(E,C)=>{var T,I,N;return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{ref_key:"mapContainer",ref:o,class:"map-container"},null,512),(T=t.modelValue)!=null&&T.length?(a.openBlock(),a.createElementBlock("span",G$,a.toDisplayString((I=t.modelValue)==null?void 0:I[0])+", "+a.toDisplayString((N=t.modelValue)==null?void 0:N[1]),1)):a.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-b076dfdf"]]),Y$={},X$={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-map"};function K$(t,e){return a.openBlock(),a.createElementBlock("svg",X$,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13"},null,-1),a.createElementVNode("path",{d:"M9 4v13"},null,-1),a.createElementVNode("path",{d:"M15 7v13"},null,-1)]))}const J$=Oe(Y$,[["render",K$]]),Q$={class:"flex w-full gap-1"},e8={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},t8=["onClick"],n8={__name:"vs-form-map",props:{modelValue:{type:Array,default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=a.useModel(t,"modelValue"),n=a.ref(e.value||[]),r=a.ref(!1);return a.watch(e,o=>n.value=o,{deep:!0}),(o,d)=>{const p=a.resolveComponent("VsText"),c=a.resolveComponent("VsPopover"),b=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Q$,[a.createVNode(p,{modelValue:e.value[0],"onUpdate:modelValue":d[0]||(d[0]=k=>e.value[0]=k),placeholder:"lng"},null,8,["modelValue"]),a.createVNode(p,{modelValue:e.value[1],"onUpdate:modelValue":d[1]||(d[1]=k=>e.value[1]=k),placeholder:"lat"},null,8,["modelValue"]),a.createVNode(c,{placement:"left",trigger:"hover"},{reference:a.withCtx(()=>[a.createElementVNode("button",{onClick:d[2]||(d[2]=k=>r.value=!0),class:a.normalizeClass("inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-gray-500 border border-transparent rounded-lg gap-x-2 hover:bg-gray-700 hover:text-white")},[a.createVNode(J$,{height:"22",width:"16"})])]),default:a.withCtx(()=>[d[6]||(d[6]=a.createElementVNode("div",{class:"p-1"},"Додати точку через карту",-1))]),_:1,__:[6]})]),a.createVNode(b,{visible:r.value,"onUpdate:visible":d[5]||(d[5]=k=>r.value=k),title:"Додати точку на карті"},{footer:a.withCtx(({handleClose:k})=>[a.createElementVNode("div",e8,[a.createElementVNode("button",{style:{border:"1px solid #000"},onClick:k,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати ",8,t8),a.createElementVNode("button",{onClick:d[4]||(d[4]=E=>{e.value=n.value,r.value=!1}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:a.withCtx(()=>[r.value?(a.openBlock(),a.createBlock(Z$,{key:0,modelValue:n.value,"onUpdate:modelValue":d[3]||(d[3]=k=>n.value=k)},null,8,["modelValue"])):a.createCommentVNode("",!0)]),_:1},8,["visible"])],64)}}},r8={class:"flex items-center gap-2 capitalize text-[13px]"},i8={class:"flex w-[324px] flex-wrap gap-[4px]"},s8={class:"border border-[2px] border-transparent flex items-center justify-center h-[32px] w-[32px] rounded hover:border-blue-500"},o8=["onClick"],a8={class:"text-[10px] p-0"},l8={"vs-widget-map":Fm,"vs-widget-gallery":ZN,"vs-widget-comments":Sv,"vs-widget-file":Cv,"vs-widget-history":M4,"vs-widget-table":WV,"vs-widget-calendar":Ck,"admin-notifications":fg,"vs-widget-print":O4,"vs-form-map":n8,"vs-form-palette":{__name:"vs-form-palette",props:{modelValue:{type:String,default:()=>"blue-600"},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=a.useModel(t,"modelValue"),n=a.ref(),r=[{color:"red",title:"Red"},{color:"orange",title:"Orange"},{color:"amber",title:"Amber"},{color:"yellow",title:"Yellow"},{color:"lime",title:"Lime"},{color:"green",title:"Green"},{color:"emerald",title:"Emerald"},{color:"teal",title:"Teal"},{color:"cyan",title:"Cyan"},{color:"sky",title:"Sky"},{color:"blue",title:"Blue"},{color:"indigo",title:"Indigo"},{color:"violet",title:"Violet"},{color:"purple",title:"Purple"},{color:"fuchsia",title:"Fuchsia"},{color:"pink",title:"Pink"},{color:"rose",title:"Rose"},{color:"slate",title:"Slate"},{color:"gray",title:"Gray"},{color:"zinc",title:"Zinc"},{color:"neutral",title:"Neutral"},{color:"stone",title:"Stone"}];return(o,d)=>{const p=a.resolveComponent("VsPopover");return a.openBlock(),a.createElementBlock("div",r8,[a.createVNode(p,{ref_key:"popover",ref:n,placement:"bottom-right"},{reference:a.withCtx(()=>[a.createElementVNode("button",{class:a.normalizeClass(["h-[37px] w-[37px] rounded-lg flex items-center justify-center",`bg-${e.value}-400`])},null,2)]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createElementVNode("ul",i8,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(r,(c,b)=>a.createElementVNode("li",{key:b},[a.createVNode(p,{placement:"bottom",trigger:"hover"},{reference:a.withCtx(()=>[a.createElementVNode("div",s8,[a.createElementVNode("div",{class:a.normalizeClass(["flex items-center justify-center h-[24px] shrink-0 w-[24px] rounded-[2px]",`bg-${c==null?void 0:c.color}-400`]),onClick:k=>{var E;e.value=c==null?void 0:c.color,(E=n.value)==null||E.togglePopover()}},[e.value===(c==null?void 0:c.color)?(a.openBlock(),a.createBlock(kl,{key:0,height:"16",width:"16",class:"text-white"})):a.createCommentVNode("",!0)],10,o8)])]),default:a.withCtx(()=>[a.createElementVNode("div",a8,a.toDisplayString(c==null?void 0:c.title),1)]),_:2},1024)])),64))])])]),_:1},512),a.createTextVNode(" "+a.toDisplayString(e.value),1)])}}}},c8={"table-format-text":ah,"table-format-select":vb,"table-format-badge":bb,"table-format-switch":Ea,"table-format-check":Ea,"table-format-switch":Ea,"table-format-yes/no":Ea,"table-format-html":ah,"table-format-tags":wb,"table-format-date":Om,"table-format-number":xx,"table-format-slot":vx},d8={style:{width:"calc(100vw - 300px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 flex items-center justify-center"},u8={class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},h8={class:"mb-4 xl:mb-8"},p8={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},f8={__name:"vs-dashboard",setup(t){return(e,n)=>{var r,o,d;return a.openBlock(),a.createElementBlock("div",d8,[a.createElementVNode("div",u8,[a.createElementVNode("div",h8,[a.createElementVNode("h1",p8," Members "+a.toDisplayString((r=e.$user)==null?void 0:r.user_name)+', "'+a.toDisplayString((d=(o=e.$settings)==null?void 0:o.admin)==null?void 0:d.title)+'" ',1),n[0]||(n[0]=a.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ",-1))]),n[1]||(n[1]=a.createElementVNode("div",{class:"space-y-5"},[a.createElementVNode("div",{class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5"},[a.createElementVNode("div",{class:"relative w-full"},[a.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5"},[a.createElementVNode("svg",{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),a.createElementVNode("path",{d:"m21 21-4.3-4.3"})])]),a.createElementVNode("input",{type:"text",class:"py-2 ps-10 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Search by name or email"}),a.createElementVNode("div",{class:"hidden absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-1"},[a.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-6 rounded-full text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600 dark:text-neutral-500 dark:hover:text-blue-500 dark:focus:text-blue-500","aria-label":"Close"},[a.createElementVNode("span",{class:"sr-only"},"Close"),a.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),a.createElementVNode("path",{d:"m15 9-6 6"}),a.createElementVNode("path",{d:"m9 9 6 6"})])])])]),a.createElementVNode("div",{class:"flex justify-end items-center gap-x-2"},[a.createElementVNode("button",{type:"button",class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[a.createElementVNode("svg",{class:"shrink-0 sm:me-2 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a.createElementVNode("polyline",{points:"7 10 12 15 17 10"}),a.createElementVNode("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]),a.createElementVNode("span",{class:"hidden sm:block"}," Download CSV ")]),a.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-1 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500","data-hs-overlay":"#hs-pro-dshm"},[a.createElementVNode("span",{class:"hidden sm:block"},"Send"),a.createTextVNode("Invite ")])])]),a.createElementVNode("div",{class:"grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-4"},[a.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[a.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[a.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}),a.createElementVNode("div",{class:"flex items-center -space-x-2"},[a.createElementVNode("img",{class:"shrink-0 size-7 rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"})])]),a.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Admin")]),a.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[a.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[a.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 5 "),a.createElementVNode("div",{class:"flex items-center -space-x-2"},[a.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),a.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482634023-2c4fda99ac0c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O ")])]),a.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[a.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Members"),a.createElementVNode("div",{class:"hs-tooltip inline-block"},[a.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[a.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),a.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),a.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(689px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),a.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[a.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[a.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 2 "),a.createElementVNode("div",{class:"flex items-center -space-x-2"},[a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," 0 ")])]),a.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[a.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"}," Limited access members "),a.createElementVNode("div",{class:"hs-tooltip inline-block"},[a.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[a.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),a.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),a.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(1198px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),a.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[a.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[a.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 0 "),a.createElementVNode("div",{class:"flex items-center -space-x-2"})]),a.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Pending invites")])]),a.createElementVNode("div",{class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[a.createElementVNode("div",{class:"min-w-full inline-block align-middle"},[a.createElementVNode("table",{class:"min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},[a.createElementVNode("thead",null,[a.createElementVNode("tr",null,[a.createElementVNode("th",{scope:"col",class:"min-w-[250px]"},[a.createElementVNode("div",{class:"pe-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Member ")]),a.createElementVNode("th",{scope:"col",class:"min-w-48"},[a.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Role ")]),a.createElementVNode("th",{scope:"col"},[a.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Email ")]),a.createElementVNode("th",{scope:"col",class:"min-w-36"},[a.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Last activity ")]),a.createElementVNode("th",{scope:"col"},[a.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Status ")])])]),a.createElementVNode("tbody",{class:"divide-y divide-gray-200 dark:divide-neutral-700"},[a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Admin ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," james@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),a.createTextVNode(" Active ")])])]),a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," liza@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 2 days ago ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),a.createTextVNode(" Inactive ")])])]),a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1601935111741-ae98b2b230b0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Daniel Hobbs ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," dhobbs@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),a.createTextVNode(" Inactive ")])])]),a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Brian Warner ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," brian@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 1 months ago ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),a.createTextVNode(" Active ")])])]),a.createElementVNode("tr",null,[a.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[a.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[a.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O "),a.createElementVNode("div",{class:"grow"},[a.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Ols Shols ")])])]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," olsshols@site.com ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 6 days ago ")]),a.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[a.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[a.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),a.createTextVNode(" Inactive ")])])])])])])])],-1))])])}}},m8={methods:{notify(){this.$notify({type:"error",title:"Тестова нотифікація",text:"Нотифікація для показу функціонала"})}}};function g8(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",{onClick:e[0]||(e[0]=(...p)=>d.notify&&d.notify(...p)),class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50"}," Custom component ")}const y8=Oe(m8,[["render",g8]]),_8={props:{item:{type:Object},actions:{type:Array}},data(){return{toggletMap:{}}},methods:{toggleHandler(t){this.toggletMap[t]=!this.toggletMap[t],this.$emit("on:toggled",{optionID:t,toggled:this.toggletMap[t]})}}},b8={class:"md:col-span-2"},x8={class:"font-semibold text-gray-800 dark:text-neutral-200"},v8={class:"md:block md:col-span-1 md:text-center"},w8=["onClick"];function k8(t,e,n,r,o,d){var p,c;return a.openBlock(),a.createElementBlock("ul",{class:a.normalizeClass(["grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700",`grid-cols-${((p=n.actions)==null?void 0:p.length)+2}`])},[a.createElementVNode("li",b8,[a.createElementVNode("h3",x8,a.toDisplayString(n.item.ua),1)]),(c=n.item.menu)!=null&&c.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(n.actions,b=>(a.openBlock(),a.createElementBlock("li",v8,[a.createElementVNode("button",{onClick:k=>d.toggleHandler(b),type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline focus:outline-none focus:underline dark:text-blue-400 dark:hover:text-blue-500"}," Toggle all ",8,w8)]))),256)):a.createCommentVNode("",!0)],2)}const E8=Oe(_8,[["render",k8]]),C8={props:{subitem:{type:Object,required:!0},toggled:{type:Boolean,default:!1},optionID:{type:Number},actions:{type:Array,default:()=>[]},routes:{type:Array,required:!0}},data(){return{checkedActions:[]}},watch:{routes:{handler(){this.initializeCheckedActions()},deep:!0,immediate:!0}},methods:{initializeCheckedActions(){const t=this.routes.find(e=>e.path===this.subitem.path);this.checkedActions=t?[...t.actions]:[]},inputHandler(t){var e;this.$emit("on:checked",{subitemPath:(e=this.subitem)==null?void 0:e.path,checkedActions:this.checkedActions})}},mounted(){this.initializeCheckedActions()}},S8={class:"md:col-span-2"},T8={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},A8={class:"text-sm text-gray-500 dark:text-neutral-500"},D8={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},M8=["value","onChange"];function I8(t,e,n,r,o,d){var p,c;return a.openBlock(),a.createElementBlock("ul",{class:a.normalizeClass(["grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3",`grid-cols-${n.actions.length+2}`])},[a.createElementVNode("li",S8,[a.createElementVNode("p",T8,a.toDisplayString(((p=n.subitem)==null?void 0:p.ua)||""),1),a.createElementVNode("p",A8,a.toDisplayString(((c=n.subitem)==null?void 0:c.path)||""),1)]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.actions,(b,k)=>(a.openBlock(),a.createElementBlock("li",{class:"col-span-1",key:b},[a.createElementVNode("div",D8,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",value:b,onChange:E=>d.inputHandler(b),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500 dark:bg-neutral-800 dark:border-neutral-600 dark:checked:bg-blue-500 dark:checked:border-blue-500","onUpdate:modelValue":e[0]||(e[0]=E=>o.checkedActions=E)},null,40,M8),[[a.vModelCheckbox,o.checkedActions]])])]))),128))],2)}const P8=Oe(C8,[["render",I8]]),ei=a.ref(null),Ay=t=>{const e=[];return t.forEach(n=>{n.menu?e.push(...Ay(n.menu)):e.push(n)}),e},R8={props:{options:{type:String},token:{type:String},routes:{type:Array,default:[]}},components:{VsGrouptFirstLevel:E8,VsGroupSecondLevel:P8,AdminNodata:pg},data(){return{list:ei.value,history:this.routes,toggledInputs:!1,searchValue:""}},computed:{getList(){var e,n;const t={ua:"Без категорії",menu:(e=this.list)==null?void 0:e.filter(r=>!(r!=null&&r.menu))};return this.filterMenu([t,...(n=this.list)==null?void 0:n.filter(r=>r==null?void 0:r.menu)],this.searchValue).filter(r=>{var o;return(o=r==null?void 0:r.menu)==null?void 0:o.length})}},methods:{async Save(){var t,e;try{const n=location.href.split("/").pop();await Le.post(`/api/access-group/${n}`,{routes:(t=this.history)==null?void 0:t.filter(r=>{var o;return(o=r==null?void 0:r.actions)==null?void 0:o.length}).map(({path:r,actions:o})=>({path:r,actions:[...new Set(o)]}))}),await this.$notify({type:"success",title:"Успішно!",message:"Данні успішно оновлені"}),await nh()}catch(n){console.error(((e=n.response)==null?void 0:e.data)||n.message),this.$notify({type:"error",title:"Помилка!",message:"При спробі оновити данні виникла помилка"})}},resetAll(){debugger;this.history=this.history.map(t=>({...t,actions:[]}))},async getData(){var t,e;try{const n=location.href.split("/").pop(),o=(await Le.get(`/api/access-group/${n}`)).data;this.history=this.getUniqueByPath([...o.routes,...(t=Ay(this.list))==null?void 0:t.map(d=>({path:d==null?void 0:d.path,actions:[]}))])}catch(n){console.error(((e=n.response)==null?void 0:e.data)||n.message)}},toggleCheck(t){var n,r;if(!((n=this.history)!=null&&n.length))return;const e=(r=this.history)==null?void 0:r.findIndex(o=>(o==null?void 0:o.path)===(t==null?void 0:t.subitemPath));this.history[e].actions=t==null?void 0:t.checkedActions},toggleAll(t,e){var r,o,d,p,c,b,k;const n=(d=(o=(r=this.getList)==null?void 0:r[e])==null?void 0:o.menu)==null?void 0:d.map(E=>E==null?void 0:E.path);t!=null&&t.toggled?(c=(p=this.history)==null?void 0:p.filter(E=>n==null?void 0:n.includes(E==null?void 0:E.path)))==null||c.forEach(E=>{var C;(C=E==null?void 0:E.actions)==null||C.push(t==null?void 0:t.optionID)}):(k=(b=this.history)==null?void 0:b.filter(E=>n==null?void 0:n.includes(E==null?void 0:E.path)))==null||k.forEach(E=>{var C;E.actions=(C=E==null?void 0:E.actions)==null?void 0:C.filter(T=>T!==(t==null?void 0:t.optionID))})},getUniqueByPath(t){return t.reduce((e,n)=>(e.some(o=>o.path===n.path)||e.push(n),e),[])},filterMenu(t,e){return t.map(n=>{var r,o;if(n.menu){const d=this.filterMenu(n.menu,e);if(d.length>0)return{...n,menu:d}}return(o=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&o.includes(e==null?void 0:e.toLowerCase())?n:null}).filter(Boolean)}},async mounted(){await this.getData()}},N8={class:"flex gap-[6px]"},B8={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},V8={key:0,class:"space-y-8"},z8={class:"space-y-5"};function O8(t,e,n,r,o,d){var E;const p=a.resolveComponent("VsText"),c=a.resolveComponent("VsGrouptFirstLevel"),b=a.resolveComponent("VsGroupSecondLevel"),k=a.resolveComponent("AdminNodata");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",N8,[a.createVNode(p,{placeholder:"Пошук",class:"flex-grow",modelValue:o.searchValue,"onUpdate:modelValue":e[0]||(e[0]=C=>o.searchValue=C)},null,8,["modelValue"]),a.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100",onClick:e[1]||(e[1]=(...C)=>d.resetAll&&d.resetAll(...C))}," Скинути всі "),a.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:e[2]||(e[2]=(...C)=>d.Save&&d.Save(...C))}," Зберегти ")]),a.createElementVNode("div",{class:a.normalizeClass(["grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5",`grid-cols-${n.options.length+2}`])},[e[3]||(e[3]=a.createElementVNode("div",{class:"self-center col-span-2"},[a.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.options,(C,T)=>(a.openBlock(),a.createElementBlock("div",{class:"col-span-1 text-center",key:T},[a.createElementVNode("h3",B8,a.toDisplayString(C),1)]))),128))],2),(E=d.getList)!=null&&E.length?(a.openBlock(),a.createElementBlock("div",V8,[a.createElementVNode("div",z8,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.getList,(C,T)=>(a.openBlock(),a.createElementBlock("div",{key:T},[a.createVNode(c,{item:C,"onOn:toggled":I=>d.toggleAll(I,T),actions:n.options},null,8,["item","onOn:toggled","actions"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(C.menu,I=>(a.openBlock(),a.createBlock(b,{toggled:(C==null?void 0:C.toggled)||!1,optionID:C==null?void 0:C.optionID,key:I==null?void 0:I.path,subitem:I,actions:n.options,"onOn:checked":N=>d.toggleCheck(N,T),routes:o.history},null,8,["toggled","optionID","subitem","actions","onOn:checked","routes"]))),128))]))),128))])])):(a.openBlock(),a.createBlock(k,{key:1}))])}const L8=Oe(R8,[["render",O8]]),F8={__name:"vs-group-interface-page",setup(t){const e=["view","add","edit","del"];return(n,r)=>(a.openBlock(),a.createBlock(a.unref(L8),{options:e,routes:n.routes},null,8,["routes"]))}},$8={},j8={class:"shrink-0 size-4 text-gray-400 dark:text-white/60",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function U8(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",j8,e[0]||(e[0]=[a.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),a.createElementVNode("path",{d:"m21 21-4.3-4.3"},null,-1)]))}const Mp=Oe($8,[["render",U8]]),H8={components:{IconSearch:Mp,IconPlus:$l},data(){return{link:null,color:void 0,data:null,searchValue:"",isFormAdd:!1,formValues:{},scheme:{name:{type:"text",ua:"Назва",placeholder:"Назва",validators:["required"]}}}},mounted(){this.link="/admin.user-cls",this.getData()},computed:{rows(){var t,e;return((e=(t=this.data)==null?void 0:t.rows)==null?void 0:e.filter(n=>{var r;return(r=n==null?void 0:n.name)==null?void 0:r.includes(this.searchValue)}))||null}},methods:{async getData(){try{const{data:t}=await Le.get("/api/user-cls?type=json");this.data=t}catch{}},async createNewCls(){var t;try{await((t=this.$refs.form)==null?void 0:t.doValidation()),await Le.post("/api/user-cls",{...this.formValues}),this.isFormAdd=!1,this.formValues={},await this.getData(),this.$notify({type:"success",title:"Успішно!",message:"Новий об'єкт успішно створений"})}catch{this.$notify({type:"error",title:"Помилка",message:"При спробі створити новий об'єкт виникла помилка"})}}}},W8={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},q8={class:"flex items-center justify-between p-2 ps-5 gap-x-2"},G8={class:"relative px-[10px] py-[4px] flex gap-[8px] items-center"},Z8={class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},Y8=["data-index"],X8={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},K8={class:"ml-auto flex items-center gap-[12px]"},J8={class:"text-xs opacity-60"},Q8={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function ej(t,e,n,r,o,d){const p=a.resolveComponent("IconPlus"),c=a.resolveComponent("VsText"),b=a.resolveComponent("router-link"),k=a.resolveComponent("VsForm"),E=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",W8,[a.createElementVNode("div",q8,[e[7]||(e[7]=a.createElementVNode("span",{id:"hs-pro-chat-sidebar-label",class:"block font-semibold text-gray-800 truncate dark:text-neutral-200"}," Довідники ",-1)),a.createElementVNode("button",{onClick:e[0]||(e[0]=C=>o.isFormAdd=!0),class:"bg-[#DBEAFE] h-[30px] w-[30px] text-blue-700 shrink-0 flex items-center justify-center rounded-lg hover:bg-blue-200"},[a.createVNode(p,{height:"16",width:"16"})])]),a.createElementVNode("div",G8,[a.createVNode(c,{type:"text",modelValue:o.searchValue,"onUpdate:modelValue":e[1]||(e[1]=C=>o.searchValue=C),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),a.createElementVNode("ul",Z8,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.rows,C=>{var T,I;return a.openBlock(),a.createElementBlock("li",{key:C==null?void 0:C.id,"data-index":t.index,class:"w-full"},[a.createVNode(b,{class:a.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((I=(T=t.$route)==null?void 0:T.query)==null?void 0:I.name)===(C==null?void 0:C.name)}]),to:o.link+"?name="+((C==null?void 0:C.name)||(C==null?void 0:C.id))},{default:a.withCtx(()=>[a.createElementVNode("span",X8,a.toDisplayString((C==null?void 0:C.name)||(C==null?void 0:C.id)||"Не вказано"),1),a.createElementVNode("div",K8,[a.createElementVNode("div",J8,a.toDisplayString((C==null?void 0:C.children)||"0"),1)])]),_:2},1032,["to","class"])],8,Y8)}),128))])]),a.createVNode(E,{visible:o.isFormAdd,"onUpdate:visible":e[5]||(e[5]=C=>o.isFormAdd=C),title:"Створити давідник",onOnClose:e[6]||(e[6]=C=>o.formValues={})},{footer:a.withCtx(()=>[a.createElementVNode("div",Q8,[a.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[3]||(e[3]=C=>{o.isFormAdd=!1,o.formValues={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:e[4]||(e[4]=(...C)=>d.createNewCls&&d.createNewCls(...C)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode(k,{scheme:o.scheme,ref:"form",modelValue:o.formValues,"onUpdate:modelValue":e[2]||(e[2]=C=>o.formValues=C),class:"p-[10px]"},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}const tj=Oe(H8,[["render",ej]]),nj={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},rj={class:"w-full"},ij={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},sj={class:"max-w-sm mx-auto mt-6"},oj={class:"font-medium text-gray-800 dark:text-neutral-200"},aj={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function lj(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",rj,[a.createElementVNode("div",ij,[e[0]||(e[0]=a.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),a.createElementVNode("div",sj,[a.createElementVNode("p",oj,a.toDisplayString(n.title),1),a.createElementVNode("p",aj,a.toDisplayString(n.text),1)])])])}const Ha=Oe(nj,[["render",lj]]),cj={props:{modelValue:{type:String,default:()=>"#172B4D"},colors:{type:Array,default:()=>["#172B4D","#0055CC","#206A83","#216E4E","#E56910","#AE2E24","#5E4DB2","#758195","#FF0000","#008000","#28A9AB","#AB7222"]}},methods:{updateColor(t){this.$emit("update:modelValue",t),this.$refs.popover.togglePopover()}}},dj={class:"flex w-[160px] flex-wrap gap-[4px]"},uj=["onClick"];function hj(t,e,n,r,o,d){const p=a.resolveComponent("VsPopover");return a.openBlock(),a.createBlock(p,{ref:"popover",placement:"bottom"},{reference:a.withCtx(()=>[a.createElementVNode("button",{class:"h-[37px] w-[37px] rounded-lg flex items-center justify-center",style:a.normalizeStyle({backgroundColor:n.modelValue})},null,4)]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createElementVNode("ul",dj,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.colors,c=>(a.openBlock(),a.createElementBlock("li",{class:"h-[37px] w-[37px] rounded",style:a.normalizeStyle({backgroundColor:c}),onClick:b=>d.updateColor(c),key:c},null,12,uj))),128))])])]),_:1},512)}const Sk=Oe(cj,[["render",hj]]),pj={components:{VsChoceColor:Sk},props:{item:Object},data(){var t,e,n;return{color:((t=this.item)==null?void 0:t.color)||"#D1D5DB",text:((e=this.item)==null?void 0:e.text)||"",id:(n=this.item)==null?void 0:n.id}},watch:{color(t){this.$emit("update-item",{...this.item,color:t})},text(t){this.$emit("update-item",{...this.item,text:t})},id(t){this.$emit("update-item",{...this.item},t)}}},fj={class:"relative flex items-center p-3 bg-white border border-gray-200 group gap-x-3 rounded-xl"},mj={class:"flex flex-col"},gj={class:"flex gap-[30px]"},yj={class:"block text-sm font-semibold text-gray-800 text-start z-[10] cursor-pointer"},_j={class:"block text-sm font-semibold text-gray-400 text-start z-[10] cursor-pointer"},bj={class:"block text-xs text-gray-500 truncate dark:text-neutral-500"};function xj(t,e,n,r,o,d){var b;const p=a.resolveComponent("VsChoceColor"),c=a.resolveComponent("VsInlineEdit");return a.openBlock(),a.createElementBlock("div",fj,[a.createVNode(p,{modelValue:o.color,"onUpdate:modelValue":e[0]||(e[0]=k=>o.color=k)},null,8,["modelValue"]),a.createElementVNode("div",mj,[a.createElementVNode("div",gj,[a.createVNode(c,{modelValue:o.text,"onUpdate:modelValue":e[1]||(e[1]=k=>o.text=k),onUpdateValue:e[2]||(e[2]=k=>o.text=k)},{default:a.withCtx(()=>[a.createElementVNode("p",yj,a.toDisplayString(o.text),1)]),_:1},8,["modelValue"]),a.createVNode(c,{modelValue:o.id,"onUpdate:modelValue":e[3]||(e[3]=k=>o.id=k),onUpdateValue:e[4]||(e[4]=k=>o.id=k)},{default:a.withCtx(()=>[a.createElementVNode("p",_j,a.toDisplayString(o.id),1)]),_:1},8,["modelValue"])]),a.createElementVNode("p",bj,a.toDisplayString((b=n.item)==null?void 0:b.parent),1)])])}const vj={components:{VsReesterUsersItem:Oe(pj,[["render",xj]])},props:{list:Array},data(){return{draggedItemIndex:null}},methods:{dragStart(t,e){this.draggedItemIndex=e,t.dataTransfer.effectAllowed="move"},dragOver(t){t.preventDefault()},drop(t,e){t.preventDefault();const n=this.draggedItemIndex;if(n!==e){const r=[...this.list],o=r[n];r.splice(n,1),r.splice(e,0,o),this.$emit("update-list",r)}this.draggedItemIndex=null},dragEnd(){this.draggedItemIndex=null},updateItem(t,e){var r;const n=(r=this.list)==null?void 0:r.findIndex(o=>(o==null?void 0:o.id)===(t==null?void 0:t.id));this.list[n]=t,e&&(this.list[n].id=e),this.$emit("update-list",this.list)}}},wj={class:"flex flex w-full flex-col gap-[10px] p-[10px] pt-[40px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{"max-height":"calc(100vh - 430px)"}},kj=["onDragstart","onDrop"];function Ej(t,e,n,r,o,d){const p=a.resolveComponent("VsReesterUsersItem");return a.openBlock(),a.createElementBlock("ul",wj,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.list,(c,b)=>(a.openBlock(),a.createElementBlock("li",{key:c==null?void 0:c.id,draggable:!0,onDragstart:k=>d.dragStart(k,b),onDragover:e[0]||(e[0]=k=>d.dragOver(k)),onDrop:k=>d.drop(k,b),onDragend:e[1]||(e[1]=(...k)=>d.dragEnd&&d.dragEnd(...k))},[a.createVNode(p,{item:c,onUpdateItem:d.updateItem},null,8,["item","onUpdateItem"])],40,kj))),128))])}const Cj={components:{VsNoData:Ha,VsChoceColor:Sk,IconCheck:xb,VsReesterUsersList:Oe(vj,[["render",Ej],["__scopeId","data-v-17ce7688"]])},data(){return{scheme:{text:{type:"Text",ua:"Ім'я",placeholder:"Ім'я нового класифікатора",validators:["required"]}},formVisible:!0,formValues:{},color:"#172B4D",data:null}},watch:{$route:{handler(t,e){var n,r;((n=t==null?void 0:t.query)==null?void 0:n.name)!==((r=e==null?void 0:e.query)==null?void 0:r.name)&&this.getData()}}},mounted(){this.getData()},methods:{async getData(){var t;this.data=null;try{const{data:e}=await Le.get(`/api/user-cls/${(t=this.$route.query)==null?void 0:t.name}`);this.data=e}catch{}},async addOneChild(){var t,e,n,r;try{const{form:o}=this.$refs;await o.doValidation(),await Le.post("/api/user-cls",{name:(t=this.$route.query)==null?void 0:t.name,children:[...((e=this.data)==null?void 0:e.children)||[],{...this.formValues,color:this.color,id:(((r=(n=this.data)==null?void 0:n.children)==null?void 0:r.length)||0)+1}]}),this.formVisible=!1,this.formValues={},setTimeout(()=>this.formVisible=!0),await this.getData()}catch(o){console.log(o)}},async updateChildren(t){var e,n;this.data.children=t;try{await Le.post("/api/user-cls",{name:(e=this.$route.query)==null?void 0:e.name,children:[...((n=this.data)==null?void 0:n.children)||[]]}),await this.getData()}catch(r){console.log(r)}}}},Sj={class:"flex justify-center bg-gray-50",style:{height:"calc(100vh - 60px)",width:"calc(100vw - 560px)"}},Tj={key:0,class:"mt-[100px] p-[10px] w-full max-w-[1000px]",style:{"max-height":"calc(100vh - 300px)"}},Aj={class:"font-bold mb-[10px]"},Dj={class:"flex items-end max-w-[1000px] gap-[4px]"};function Mj(t,e,n,r,o,d){var C,T,I,N,$,F,q;const p=a.resolveComponent("VsForm"),c=a.resolveComponent("VsChoceColor"),b=a.resolveComponent("IconCheck"),k=a.resolveComponent("VsReesterUsersList"),E=a.resolveComponent("VsNoData");return a.openBlock(),a.createElementBlock("div",Sj,[(T=(C=t.$route)==null?void 0:C.query)!=null&&T.name?(a.openBlock(),a.createElementBlock("div",Tj,[a.createElementVNode("h2",Aj,a.toDisplayString((N=(I=t.$route)==null?void 0:I.query)==null?void 0:N.name),1),a.createElementVNode("div",Dj,[o.formVisible?(a.openBlock(),a.createBlock(p,{key:0,ref:"form",scheme:o.scheme,modelValue:o.formValues,"onUpdate:modelValue":e[0]||(e[0]=J=>o.formValues=J),class:"p-0 m-0 h-[65px] w-full"},null,8,["scheme","modelValue"])):a.createCommentVNode("",!0),a.createVNode(c,{modelValue:o.color,"onUpdate:modelValue":e[1]||(e[1]=J=>o.color=J)},null,8,["modelValue"]),a.createElementVNode("button",{onClick:e[2]||(e[2]=(...J)=>d.addOneChild&&d.addOneChild(...J)),class:"h-[37px] w-[37px] rounded-lg bg-blue-600 ml-[6px] flex items-center justify-center text-white hover:bg-blue-700 duration-300"},[a.createVNode(b,{height:"20",width:"20"})])]),(F=($=o.data)==null?void 0:$.children)!=null&&F.length?(a.openBlock(),a.createBlock(k,{key:0,class:"w-full max-w-[1000px]",list:(q=o.data)==null?void 0:q.children,onUpdateList:d.updateChildren},null,8,["list","onUpdateList"])):a.createCommentVNode("",!0)])):(a.openBlock(),a.createBlock(E,{key:1,class:"mt-[100px]",text:"Оберіть один з пунктів меню для відображення"}))])}const Ij={components:{VsReesterNavList:tj,VsReesterContent:Oe(Cj,[["render",Mj]])}},Pj={class:"flex items-start gap-0"};function Rj(t,e,n,r,o,d){const p=a.resolveComponent("VsReesterNavList"),c=a.resolveComponent("VsReesterContent");return a.openBlock(),a.createElementBlock("div",Pj,[a.createVNode(p),a.createVNode(c)])}const Nj=Oe(Ij,[["render",Rj]]),Bj={class:"h-[76px] bg-white rounded-xl flex items-center justify-start px-[20px] mb-[16px]"},Vj={class:"mr-[10px]"},zj={class:"text-[20px] font-semibold"},Oj={class:""},Lj={__name:"admin-card-header",props:{title:{type:String},tableName:{type:String},getRoute:{type:String,required:!0},slots:{type:Object},isHeaderEditButton:{type:Boolean,default:()=>!0}},setup(t){var C,T,I,N,$;const{asyncTemplateSlot:e}=($=(N=(I=(T=(C=a.getCurrentInstance())==null?void 0:C.appContext)==null?void 0:T.app)==null?void 0:I.config)==null?void 0:N.globalProperties)==null?void 0:$.utils,n=t,r=ST(),o=id(),d=a.ref(""),p=a.ref(""),c=()=>{var F;r.back()||r.push(`/${(F=o==null?void 0:o.params)==null?void 0:F.table}`)},b=a.computed(()=>{var F;return`/edit?table=${n.getRoute}&id=${(F=o==null?void 0:o.params)==null?void 0:F.id}`}),k=()=>{var F,q,J,Q;if(!((F=n.slots)!=null&&F.panelLeft))return"div";if((q=n.slots)!=null&&q.panelLeft.includes("<")){const me=e("PanelLeft",(J=n.slots)==null?void 0:J.panelLeft,["name"]);p.value=me}else p.value=(Q=n.slots)==null?void 0:Q.panelLeft},E=()=>{var F,q,J,Q;if(!((F=n.slots)!=null&&F.panelRight))return"div";if((q=n.slots)!=null&&q.panelRight.includes("<")){const me=e("PanelRight",(J=n.slots)==null?void 0:J.panelRight,["name"]);d.value=me}else d.value=(Q=n.slots)==null?void 0:Q.panelRight};return k(),E(),(F,q)=>{const J=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",Bj,[a.createElementVNode("div",Vj,[a.createElementVNode("h2",zj,a.toDisplayString(t.title),1),t.tableName?(a.openBlock(),a.createElementBlock("div",{key:0,class:"text-[14px] font-medium text-[#676A6C] cursor-pointer hover:underline",onClick:q[0]||(q[0]=Q=>a.unref(r).push("/"+n.getRoute))},a.toDisplayString(t.tableName),1)):a.createCommentVNode("",!0)]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(p.value))),a.createElementVNode("div",{class:a.normalizeClass([{"gap-[6px]":t.isHeaderEditButton},"flex items-center ml-auto"])},[a.createElementVNode("button",{onClick:c,class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},q[1]||(q[1]=[a.createElementVNode("svg",{class:"transition duration-200 ease-in-out group-hover:stroke-white",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M7.00008 11.5833L2.91675 7.49999L7.00008 3.41666",stroke:"#1f2937","stroke-linecap":"round","stroke-linejoin":"round"}),a.createElementVNode("path",{d:"M11.0834 7.5H2.91675",stroke:"#2563EB","stroke-linecap":"round","stroke-linejoin":"round"})],-1),a.createElementVNode("span",{class:"hidden sm:block ml-[8px]"},"Повернутися до реєстру",-1)])),a.createElementVNode("div",Oj,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(d.value)))]),t.isHeaderEditButton?(a.openBlock(),a.createBlock(J,{key:0,to:b.value,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"},{default:a.withCtx(()=>q[2]||(q[2]=[a.createTextVNode(" Редагувати ",-1)])),_:1,__:[2]},8,["to"])):a.createCommentVNode("",!0)],2)])}}},Fj={__name:"admin-card-async-component",props:{slot:String,data:Object,objectData:Object},setup(t){var d,p,c,b,k;const{asyncTemplateSlot:e}=(k=(b=(c=(p=(d=a.getCurrentInstance())==null?void 0:d.appContext)==null?void 0:p.app)==null?void 0:c.config)==null?void 0:b.globalProperties)==null?void 0:k.utils,n=a.ref(""),r=t;return(()=>{const E=e("CustomComponent",r.slot,["data"]);n.value=E})(),(E,C)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value),{data:t.objectData},null,8,["data"]))}},$j={},jj={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function Uj(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",jj,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Ip=Oe($j,[["render",Uj]]),Hj={class:"px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none"},Wj={class:"flex flex-col gap-[4px]"},qj=["onClick"],Gj={props:["table","id","isHeader"],components:{AdminCardHeader:Lj,AdminCardAsyncComponent:Fj,IconChevron:Bd,AdminCardTabsDropdown:{__name:"admin-card-tabs-dropdown",props:a.mergeModels({options:{type:Array}},{activeTab:{},activeTabModifiers:{}}),emits:["update:activeTab"],setup(t){const e=t,n=a.useModel(t,"activeTab"),r=a.ref(),o=a.computed(()=>{var c;const p=(c=e.options)==null?void 0:c.find(b=>(b==null?void 0:b.name)===n.value||(b==null?void 0:b.component)===n.value);return(p==null?void 0:p.title)||"Показати більше"}),d=p=>{var c;n.value=p,(c=r.value)==null||c.togglePopover()};return(p,c)=>{const b=a.resolveComponent("VsPopover");return a.openBlock(),a.createBlock(b,{ref_key:"popover",ref:r,placement:"bottom"},{reference:a.withCtx(()=>[a.createElementVNode("button",Hj,[a.createTextVNode(a.toDisplayString(o.value)+" ",1),a.createVNode(Ip,{height:"12",width:"12"})])]),default:a.withCtx(()=>[a.createElementVNode("div",Wj,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.options,k=>(a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["cursor-pointer py-1.5 px-2 text-[13px] text-start text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100",{"bg-gray-100":n.value===(k==null?void 0:k.component)||n.value===(k==null?void 0:k.name)}]),onClick:E=>d((k==null?void 0:k.component)||(k==null?void 0:k.name))},a.toDisplayString(k==null?void 0:k.title),11,qj))),256))])]),_:1},512)}}}},data(){return{objectData:null,showTabs:!1,component:""}},computed:{getRoute(){const t=this.flattenMenu(ei.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(n=>{var r,o;return(n==null?void 0:n.table)==((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.table)});return e||this.$router.replace("/404"),e==null?void 0:e.path},getTable(){const t=this.flattenMenu(ei.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(n=>{var r,o;return(n==null?void 0:n.table)==((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.table)});return e||this.$router.replace("/404"),e==null?void 0:e.ua},getTitle(){var t,e,n,r,o,d,p,c,b,k,E,C;return((o=(e=(t=this.objectData)==null?void 0:t.rows)==null?void 0:e[0])==null?void 0:o[(r=(n=this.objectData)==null?void 0:n.meta)==null?void 0:r.title])||((E=(p=(d=this.objectData)==null?void 0:d.rows)==null?void 0:p[0])==null?void 0:E[(k=(b=(c=this.objectData)==null?void 0:c.columns)==null?void 0:b.find(T=>(T==null?void 0:T.meta)==="title"))==null?void 0:k.name])||((C=this.objectData)==null?void 0:C.title)||this.getTable}},async mounted(){await this.getObjectData(),await this.checkActiveComponent(),addEventListener("reloadCardPage",this.getObjectData)},unmounted(){removeEventListener("reloadCardPage",this.getObjectData)},watch:{component(t){var e;this.showTabs=!1,this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,tab:t}})},$route:{async handler(t,e){var n,r,o,d;(((n=t==null?void 0:t.params)==null?void 0:n.table)!==((r=e==null?void 0:e.params)==null?void 0:r.table)||((o=t==null?void 0:t.params)==null?void 0:o.id)!==((d=e==null?void 0:e.params)==null?void 0:d.id))&&await this.getObjectData(),await this.checkActiveComponent()}}},methods:{async getObjectData(){var n,r;const t=this.table||((n=this.$route)==null?void 0:n.params.table),e=this.id||((r=this.$route)==null?void 0:r.params.id);(!t||!e)&&this.$router.replace("/404");try{const{data:o}=await Le.get(`/api/table-data/${t}/${e}`);this.objectData=o}catch(o){console.error(o)}},getColClass(t){return`lg:col-span-${t||12}`},getGridClass(){return"grid-cols-12"},checkActiveComponent(){var t,e,n,r,o,d,p,c,b;if((e=(t=this.$route)==null?void 0:t.query)!=null&&e.tab)this.component=(r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.tab;else{const k=(d=(o=this.objectData)==null?void 0:o.panels)==null?void 0:d.find(E=>(E==null?void 0:E.type)==="tabs"||(E==null?void 0:E.type)==="vertical-tabs");(p=k==null?void 0:k.items)!=null&&p.length&&(this.component=((c=k.items[0])==null?void 0:c.component)||((b=k.items[0])==null?void 0:b.name))}},getProps(t){var n,r,o;const e={};for(const d in t)["name","component","title","token"].includes(d)||(e[d]=((o=(r=(n=this.objectData)==null?void 0:n.rows)==null?void 0:r[0])==null?void 0:o[t[d]])||t[d]);return e},columnClass(t=12){return{1:"md:w-1/12 sm:w-full",2:"md:w-1/6 sm:w-full",3:"md:w-1/4 sm:w-full",4:"md:w-1/3 sm:w-full",6:"md:w-1/2 sm:w-full",8:"md:w-2/3 sm:w-full",10:"md:w-5/6 sm:w-full",12:"w-full"}[t]||"w-full"},flattenMenu(t){const e=[];return t==null||t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e}}},Zj={class:"flex gap-[20px]"},Yj={key:0,class:"p-[10px] pl-[20px] text-md font-[500]"},Xj=["innerHTML"],Kj={key:0,class:"bg-white rounded-xl"},Jj={class:"p-[10px] pl-[20px] text-md font-[500]"},Qj=["innerHTML"],e7={key:1},t7={key:0,class:"p-[10px] pl-[20px] text-md font-[500]"},n7={key:2,class:"p-[20px]"},r7=["innerHTML"],i7={class:"flex flex-wrap gap-1 w-full bg-white py-[16px] border-b-0 rounded-tr-xl rounded-tl-xl min-h-[60px] pl-[20px]"},s7=["onClick"],o7={class:"p-1"},a7={key:1},l7={key:2,class:"absolute right-[-4px] top-[-5px] text-[10px] leading-[1] text-white bg-blue-600 rounded-full min-w-[16px] h-[16px] flex items-center justify-center p-1"},c7={key:0},d7={key:0,class:"bg-white border-t-0 rounded-bl-xl rounded-br-xl"},u7={key:0,class:"p-[20px]"},h7={key:1,class:"p-[20px]"},p7=["innerHTML"],f7={key:3,class:"flex"},m7=["onClick"],g7={class:"flex-grow w-[80%]"},y7={key:0,class:"w-full h-full overflow-auto bg-white rounded-xl [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},_7={key:0,class:"p-[20px]"},b7={key:1,class:"p-[20px]"},x7=["innerHTML"];function v7(t,e,n,r,o,d){var C,T,I,N,$,F,q,J;const p=a.resolveComponent("AdminCardHeader"),c=a.resolveComponent("AdminCardAsyncComponent"),b=a.resolveComponent("VsPopover"),k=a.resolveComponent("AdminCardTabsDropdown"),E=a.resolveComponent("IconChevron");return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle({height:((C=t.$adminSettings)==null?void 0:C.header)===!1?"calc(100vh)":"calc(100vh - 60px)"}),class:"p-4 overflow-y-auto bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw] text-[13px]"},[o.objectData&&((T=o.objectData)==null?void 0:T.isHeader)!==!1&&n.isHeader!==!1?(a.openBlock(),a.createBlock(p,{key:0,title:d.getTitle,tableName:d.getTable,"get-route":d.getRoute,slots:(I=o.objectData)==null?void 0:I.slots,isHeaderEditButton:(N=o.objectData)==null?void 0:N.isHeaderEditButton},null,8,["title","tableName","get-route","slots","isHeaderEditButton"])):a.createCommentVNode("",!0),a.createElementVNode("div",Zj,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((F=($=o.objectData)==null?void 0:$.panels)==null?void 0:F.filter(Q=>(Q==null?void 0:Q.type)==="pin"),(Q,me)=>(a.openBlock(),a.createElementBlock("div",{key:me,class:a.normalizeClass(["col-span-12 shrink-0",d.columnClass(Q.col)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.items,(ke,Re)=>{var Ee,Ve,Be,Ze,tt,Xe,ot,ue,Ut,wt,$t,an,xn,mn;return a.openBlock(),a.createElementBlock("div",{key:Re,class:a.normalizeClass([{"mb-[20px]":Q.items.length>1},"bg-white rounded-xl"])},[ke!=null&&ke.title?(a.openBlock(),a.createElementBlock("h2",Yj,a.toDisplayString((ke==null?void 0:ke.title)||"Панель"),1)):a.createCommentVNode("",!0),ke!=null&&ke.component?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["p-[20px]",{"border-t":ke==null?void 0:ke.title}])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ke.component),a.mergeProps({geometry:(Ve=(Ee=o.objectData)==null?void 0:Ee.rows[0])==null?void 0:Ve.geom,columns:ke==null?void 0:ke.columns,token:(Ze=(Be=o.objectData)==null?void 0:Be.tokens)==null?void 0:Ze[ke==null?void 0:ke.token],zoom:16},{ref_for:!0},d.getProps(ke),{data:o.objectData,id:(Xe=(tt=t.$route)==null?void 0:tt.params)==null?void 0:Xe.id}),null,16,["geometry","columns","token","data","id"]))],2)):a.createCommentVNode("",!0),ke!=null&&ke.name?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["p-[20px]",{"border-t":ke==null?void 0:ke.title}])},[(ue=(ot=o.objectData)==null?void 0:ot.html)!=null&&ue[ke==null?void 0:ke.name]?(a.openBlock(),a.createElementBlock("div",{key:0,innerHTML:(wt=(Ut=o.objectData)==null?void 0:Ut.html)==null?void 0:wt[ke==null?void 0:ke.name]},null,8,Xj)):(a.openBlock(),a.createBlock(c,{key:1,slot:(an=($t=o.objectData)==null?void 0:$t.vue)==null?void 0:an[ke==null?void 0:ke.name],data:(mn=(xn=o.objectData)==null?void 0:xn.rows)==null?void 0:mn[0],objectData:o.objectData},null,8,["slot","data","objectData"]))],2)):a.createCommentVNode("",!0)],2)}),128))],2))),128)),a.createElementVNode("div",{class:a.normalizeClass(["grid gap-[20px] flex-grow h-fit",d.getGridClass()])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((J=(q=o.objectData)==null?void 0:q.panels)==null?void 0:J.filter(Q=>(Q==null?void 0:Q.type)!=="pin"),(Q,me)=>{var ke,Re,Ee,Ve,Be,Ze,tt,Xe,ot;return a.openBlock(),a.createElementBlock("div",{key:me,class:a.normalizeClass(["col-span-12",d.getColClass(Q.col)])},[Q!=null&&Q.name?(a.openBlock(),a.createElementBlock("div",Kj,[a.createElementVNode("h2",Jj,a.toDisplayString((Q==null?void 0:Q.title)||"Панель"),1),(ke=o.objectData)!=null&&ke.html[Q==null?void 0:Q.name]?(a.openBlock(),a.createElementBlock("div",{key:0,class:"p-[20px]",innerHTML:(Re=o.objectData)==null?void 0:Re.html[Q==null?void 0:Q.name]},null,8,Qj)):(a.openBlock(),a.createBlock(c,{key:1,slot:(Ee=o.objectData)==null?void 0:Ee.vue[Q==null?void 0:Q.name],data:(Be=(Ve=o.objectData)==null?void 0:Ve.rows)==null?void 0:Be[0],objectData:o.objectData},null,8,["slot","data","objectData"]))])):Q.type==="container"?(a.openBlock(),a.createElementBlock("div",e7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.items,(ue,Ut)=>{var wt,$t,an,xn,mn,hn,vn,Dn,In,Hn,Wn,Te,Ke,nt;return a.openBlock(),a.createElementBlock("div",{key:Ut,class:a.normalizeClass([{"mb-[20px]":Q.items.length>1},"bg-white rounded-xl"])},[ue!=null&&ue.title?(a.openBlock(),a.createElementBlock("h2",t7,a.toDisplayString((ue==null?void 0:ue.title)||"Панель"),1)):a.createCommentVNode("",!0),ue!=null&&ue.component?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["p-[20px]",{"border-t":ue==null?void 0:ue.title}])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ue.component),a.mergeProps({geometry:($t=(wt=o.objectData)==null?void 0:wt.rows[0])==null?void 0:$t.geom,columns:ue==null?void 0:ue.columns,token:(xn=(an=o.objectData)==null?void 0:an.tokens)==null?void 0:xn[ue==null?void 0:ue.token],zoom:16},{ref_for:!0},d.getProps(ue),{data:o.objectData,id:(hn=(mn=t.$route)==null?void 0:mn.params)==null?void 0:hn.id}),null,16,["geometry","columns","token","data","id"]))],2)):a.createCommentVNode("",!0),ue!=null&&ue.name?(a.openBlock(),a.createElementBlock("div",n7,[(Dn=(vn=o.objectData)==null?void 0:vn.html)!=null&&Dn[ue==null?void 0:ue.name]?(a.openBlock(),a.createElementBlock("div",{key:0,innerHTML:(Hn=(In=o.objectData)==null?void 0:In.html)==null?void 0:Hn[ue==null?void 0:ue.name]},null,8,r7)):(a.openBlock(),a.createBlock(c,{key:1,slot:(Te=(Wn=o.objectData)==null?void 0:Wn.vue)==null?void 0:Te[ue==null?void 0:ue.name],data:(nt=(Ke=o.objectData)==null?void 0:Ke.rows)==null?void 0:nt[0],objectData:o.objectData},null,8,["slot","data","objectData"]))])):a.createCommentVNode("",!0)],2)}),128))])):a.createCommentVNode("",!0),(Q==null?void 0:Q.type)==="tabs"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createElementVNode("nav",i7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ze=Q==null?void 0:Q.items)==null?void 0:Ze.slice(0,Q==null?void 0:Q.limit),ue=>(a.openBlock(),a.createElementBlock("button",{key:(ue==null?void 0:ue.name)||(ue==null?void 0:ue.component),onClick:Ut=>o.component=(ue==null?void 0:ue.component)||(ue==null?void 0:ue.name),class:a.normalizeClass(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none",{"bg-gray-100":o.component===(ue==null?void 0:ue.component)||o.component===(ue==null?void 0:ue.name),"":o.component!==(ue==null?void 0:ue.component)&&o.component!==(ue==null?void 0:ue.name)}])},[ue!=null&&ue.info?(a.openBlock(),a.createBlock(b,{key:0,trigger:"hover",placement:"top"},{reference:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(ue==null?void 0:ue.title),1)]),default:a.withCtx(()=>[a.createElementVNode("span",o7,a.toDisplayString(ue==null?void 0:ue.info),1)]),_:2},1024)):(a.openBlock(),a.createElementBlock("div",a7,a.toDisplayString(ue==null?void 0:ue.title),1)),(ue==null?void 0:ue.component)==="vs-widget-comments"&&(ue!=null&&ue.count)&&(ue==null?void 0:ue.count)>0?(a.openBlock(),a.createElementBlock("div",l7,a.toDisplayString(ue==null?void 0:ue.count),1)):a.createCommentVNode("",!0)],10,s7))),128)),Q!=null&&Q.limit&&((Xe=(tt=Q==null?void 0:Q.items)==null?void 0:tt.slice(Q==null?void 0:Q.limit))!=null&&Xe.length)?(a.openBlock(),a.createElementBlock("div",c7,[a.createVNode(k,{options:(ot=Q==null?void 0:Q.items)==null?void 0:ot.slice(Q==null?void 0:Q.limit),"active-tab":o.component,"onUpdate:activeTab":e[0]||(e[0]=ue=>o.component=ue)},null,8,["options","active-tab"])])):a.createCommentVNode("",!0)]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.items,(ue,Ut)=>{var wt,$t,an,xn,mn,hn,vn,Dn,In,Hn,Wn,Te;return a.openBlock(),a.createElementBlock(a.Fragment,{key:Ut},[o.component===(ue==null?void 0:ue.component)||o.component===(ue==null?void 0:ue.name)?(a.openBlock(),a.createElementBlock("div",d7,[ue!=null&&ue.component?(a.openBlock(),a.createElementBlock("div",u7,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ue.component),a.mergeProps({data:o.objectData,token:($t=(wt=o.objectData)==null?void 0:wt.tokens)==null?void 0:$t[ue==null?void 0:ue.token],columns:ue==null?void 0:ue.columns,geometry:(xn=(an=o.objectData)==null?void 0:an.rows[0])==null?void 0:xn.geom},{ref_for:!0},d.getProps(ue),{zoom:16,id:(hn=(mn=t.$route)==null?void 0:mn.params)==null?void 0:hn.id}),null,16,["data","token","columns","geometry","id"]))])):a.createCommentVNode("",!0),ue!=null&&ue.name?(a.openBlock(),a.createElementBlock("div",h7,[(Dn=(vn=o.objectData)==null?void 0:vn.html)!=null&&Dn[ue==null?void 0:ue.name]?(a.openBlock(),a.createElementBlock("div",{key:0,innerHTML:(In=o.objectData)==null?void 0:In.html[ue==null?void 0:ue.name]},null,8,p7)):(a.openBlock(),a.createBlock(c,{key:1,slot:(Hn=o.objectData)==null?void 0:Hn.vue[ue==null?void 0:ue.name],data:(Te=(Wn=o.objectData)==null?void 0:Wn.rows)==null?void 0:Te[0],objectData:o.objectData},null,8,["slot","data","objectData"]))])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)}),128))],64)):a.createCommentVNode("",!0),(Q==null?void 0:Q.type)==="vertical-tabs"?(a.openBlock(),a.createElementBlock("div",f7,[a.createElementVNode("div",{class:a.normalizeClass(["p-[5px] bg-white absolute left-0 rounded-lg rounded-tl-[0] rounded-bl-[0]",[{"left-[260px]":o.showTabs}]]),onClick:e[1]||(e[1]=ue=>o.showTabs=!o.showTabs)},[a.createVNode(E,{height:"16",width:"16",class:"-rotate-90"})],2),a.createElementVNode("nav",{class:a.normalizeClass(["lg:relative lg:left-0 flex flex-col space-y-2 max-w-[260px] w-full rounded-xl mr-4 items-start pl-[10px] z-[2] lg:z-0 bg-white py-[20px] absolute left-[-100%]",[{"left-0 rounded-tr-[0]":o.showTabs}]])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q==null?void 0:Q.items,ue=>(a.openBlock(),a.createElementBlock("button",{key:(ue==null?void 0:ue.name)||(ue==null?void 0:ue.component),onClick:Ut=>o.component=(ue==null?void 0:ue.component)||(ue==null?void 0:ue.name),class:a.normalizeClass(["relative inline-flex items-center w-full py-1 text-sm text-left whitespace-pre-wrap border-transparent pe-4 gap-x-2 border-e-2 hover:text-blue-600 focus:outline-none focus:text-blue-600",{"font-semibold after:absolute after:top-[0] after:right-[-1px] after:h-full text-blue-600 after:w-[2px] after:bg-blue-600 ":o.component===(ue==null?void 0:ue.component)||o.component===(ue==null?void 0:ue.name),"text-gray-500":o.component!==(ue==null?void 0:ue.component)&&o.component!==(ue==null?void 0:ue.name)}])},a.toDisplayString(ue==null?void 0:ue.title),11,m7))),128))],2),a.createElementVNode("div",g7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.items,(ue,Ut)=>{var wt,$t,an,xn,mn,hn,vn,Dn,In,Hn,Wn,Te;return a.openBlock(),a.createElementBlock(a.Fragment,{key:Ut},[o.component===(ue==null?void 0:ue.component)||o.component===(ue==null?void 0:ue.name)?(a.openBlock(),a.createElementBlock("div",y7,[ue!=null&&ue.component?(a.openBlock(),a.createElementBlock("div",_7,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ue.component),a.mergeProps({token:($t=(wt=o.objectData)==null?void 0:wt.tokens)==null?void 0:$t[ue==null?void 0:ue.token],data:o.objectData,columns:ue==null?void 0:ue.columns,geometry:(xn=(an=o.objectData)==null?void 0:an.rows[0])==null?void 0:xn.geom},{ref_for:!0},d.getProps(ue),{id:(hn=(mn=t.$route)==null?void 0:mn.params)==null?void 0:hn.id}),null,16,["token","data","columns","geometry","id"]))])):a.createCommentVNode("",!0),ue!=null&&ue.name?(a.openBlock(),a.createElementBlock("div",b7,[(Dn=(vn=o.objectData)==null?void 0:vn.html)!=null&&Dn[ue==null?void 0:ue.name]?(a.openBlock(),a.createElementBlock("div",{key:0,innerHTML:(In=o.objectData)==null?void 0:In.html[ue==null?void 0:ue.name]},null,8,x7)):(a.openBlock(),a.createBlock(c,{key:1,slot:(Hn=o.objectData)==null?void 0:Hn.vue[ue==null?void 0:ue.name],data:(Te=(Wn=o.objectData)==null?void 0:Wn.rows)==null?void 0:Te[0],objectData:o.objectData},null,8,["slot","data","objectData"]))])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)}),128))])])):a.createCommentVNode("",!0)],2)}),128))],2)])],4)}const Dy=Oe(Gj,[["render",v7],["__scopeId","data-v-0cba3c4e"]]),w7=Object.freeze(Object.defineProperty({__proto__:null,default:Dy},Symbol.toStringTag,{value:"Module"})),k7={__name:"vs-calendar-page",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",null,[a.createVNode(Ck)]))}},E7={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},C7={class:"relative px-[10px] py-[10px] flex gap-[8px] items-center"},S7={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},T7=["data-index"],A7={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},D7="/admin.interfaces",M7={__name:"vs-table-settings-nav-list",props:{list:{},listModifiers:{}},emits:["update:list"],setup(t){const e=a.useModel(t,"list"),n=a.ref(""),r=a.computed(()=>{var d;return(d=e.value)==null?void 0:d.filter(p=>{var c,b,k;return(k=(c=p==null?void 0:p.title)==null?void 0:c.toLowerCase())==null?void 0:k.includes((b=n.value)==null?void 0:b.toLowerCase())})});return(async()=>{try{const{data:d}=await Le.get("/api/interfaces");e.value=d}catch{}})(),(d,p)=>{var k;const c=a.resolveComponent("VsText"),b=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",E7,[a.createElementVNode("div",C7,[a.createVNode(c,{type:"text",modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=E=>n.value=E),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(k=r.value)!=null&&k.length?(a.openBlock(),a.createElementBlock("ul",S7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.value,E=>{var C,T;return a.openBlock(),a.createElementBlock("li",{key:E==null?void 0:E.name,"data-index":d.index,class:"w-full"},[a.createVNode(b,{class:a.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((T=(C=d.$route)==null?void 0:C.query)==null?void 0:T.name)===(E==null?void 0:E.alias)}]),to:D7+"?name="+(E==null?void 0:E.alias)},{default:a.withCtx(()=>[a.createElementVNode("span",A7,a.toDisplayString((E==null?void 0:E.title)||(E==null?void 0:E.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,T7)}),128))])):a.createCommentVNode("",!0)])}}},I7={class:"bg-white"},P7={class:"flex flex-col gap-[5px]"},R7={class:"flex items-center gap-2 cursor-pointer"},N7=["checked","onChange"],B7={class:"text-gray-800 underline decoration-dashed decoration-[1px] decoration-blue-600"},Tk={__name:"vs-table-settings-tab-list",props:{columns:{type:Array,required:!0,default:()=>[]},table:{type:String,default:""}},emits:["update"],setup(t,{emit:e}){const n=a.getCurrentInstance().proxy.$notify,r=t,o=e,d=a.ref(r.columns.map(k=>({...k,editableValue:k.ua!==void 0?k.ua:k.title})));a.watch(()=>r.columns,k=>{d.value=k.map(E=>({...E,editableValue:E.ua!==void 0?E.ua:E.title}))},{deep:!0});const p=k=>{k.hidden=!k.hidden},c=async()=>{try{await Le.post(`/api/settings-table/${r.table}`,{columns:d.value}),await n({type:"success",title:"Успішно!",message:"Дані було успішно оновлено"}),o("update")}catch(k){console.error("Помилка збереження:",k),await n({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},b=(k,E)=>{k.editableValue=E,k.ua!==void 0?k.ua=E:k.title=E};return(k,E)=>{const C=a.resolveComponent("VsInlineEdit");return a.openBlock(),a.createElementBlock("div",I7,[a.createElementVNode("div",{class:"flex justify-end p-3"},[a.createElementVNode("button",{onClick:c,class:"px-4 py-2 text-white bg-blue-600 rounded-lg shadow-sm hover:bg-blue-700 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")]),a.createElementVNode("div",P7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,T=>(a.openBlock(),a.createElementBlock("div",{key:T.name,class:"flex items-center justify-between p-3 border rounded-lg shadow-sm"},[a.createElementVNode("div",R7,[a.createElementVNode("input",{type:"checkbox",checked:!T.hidden,onChange:()=>p(T),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,N7),a.createVNode(C,{modelValue:T.editableValue,"onUpdate:modelValue":I=>T.editableValue=I,component:"vs-text",onUpdateValue:I=>b(T,I)},{default:a.withCtx(()=>[a.createElementVNode("span",B7,a.toDisplayString(T.editableValue),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onUpdateValue"])])]))),128))])])}}},V7={created(){this.isVisible=!1},mounted(){this.type==="customColumns"&&(this.colModel=[{key:"title",placeholder:"Назва колонки українською",ua:"Назва колонки українською",type:"text",slots:{row:'<div class="flex items-center gap-2"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${row?.type}.svg`"/> <span class="text-[12px]">{{ row?.title }}</span></div>'},validators:["required"]},{key:"type",type:"radio",ua:"Тип колонки",view:"buttons",style:{class:"!w-[calc(50%-5px)]"},slots:{label:'<div class="flex items-center justify-start w-full gap-4"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${id}.svg`"/><div class="flex flex-col items-start gap-1"><span class="text-black text-[14px]">{{text}}</span><span class="text-[12px]">{{description}}</span></div></div>'},options:[{id:"text",text:"Текст",description:"Маленький або довгий текст, наприклад заголовок або опис"},{id:"number",text:"Цифри",description:"Числа (цілі, з плаваючою точкою, десяткові)"},{id:"date",text:"Дата",description:"Вибір дати з годинами, хвилинами та секундами"},{id:"switcher",text:"Так/Ні",description:"Так чи ні, 1 або 0, вірно чи хибно"},{id:"file",text:"Файл",description:"Різноманітні файли"},{id:"select",text:"Селект",description:"Список значень, а потім виберіть одне"},{id:"badge",text:"Бейдж",description:"Стилізоване значення з переліку"}],validators:["required"]},{key:"enabled",type:"Switcher",ua:"Увімкнено",col:6}]),setTimeout(()=>this.isVisible=!0,100)},props:{data:Array,table:String,type:String},data(){return{localData:this.data?[...this.data]:[],isVisible:!1,colModel:[{key:"name",name:"name",type:"Text",ua:"Назва"},{key:"description",name:"description",type:"Text",ua:"Опис"},{key:"query",name:"query",type:"Text",ua:"Query"}]}},methods:{async handleSave(){try{await Le.post(`/api/settings-table/${this.table}`,{[this.type]:this.localData}),this.$emit("update")}catch(t){console.error("Помилка збереження:",t)}}},watch:{data:{deep:!0,handler(t){t?this.localData=[...t]:this.localData=[]}}}},z7={class:"flex justify-end p-3"};function O7(t,e,n,r,o,d){const p=a.resolveComponent("VsDataTable");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",z7,[a.createElementVNode("button",{onClick:e[0]||(e[0]=(...c)=>d.handleSave&&d.handleSave(...c)),class:"px-4 py-2 text-white bg-blue-600 rounded-lg shadow-sm hover:bg-blue-700 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")]),o.isVisible?(a.openBlock(),a.createBlock(p,{class:"w-full",modelValue:o.localData,"onUpdate:modelValue":e[1]||(e[1]=c=>o.localData=c),colModel:o.colModel,key:o.localData,addition:!1,import:!1,additionBottom:!0},null,8,["modelValue","colModel"])):a.createCommentVNode("",!0)])}const Ak=Oe(V7,[["render",O7]]),L7={"vs-table-settings-tab-list":Tk,"vs-table-settings-tab-datetable":Ak},F7={components:{VsNoData:Ha,IconMore:dg,IconEdit:hg,IconDelete:ug,TableSettingsTabList:Tk,TableSettingsDataTable:Ak},props:{list:{type:Array,default:()=>[]}},data(){return{tableSettingsTabs:L7,tabs:{customColumns:{id:"vs-table-settings-tab-datetable",title:"Користувацькі колонки"},customFilters:{id:"vs-table-settings-tab-datetable",title:"Користувацькі фільтри"},columns:{id:"vs-table-settings-tab-list",title:"Колонки"}},currentTab:"customColumns",tableData:null}},computed:{table(){var t,e;return(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.name}},watch:{$route:{handler(t,e){var n,r;((n=t==null?void 0:t.query)==null?void 0:n.name)!==((r=e==null?void 0:e.query)==null?void 0:r.name)&&this.getData()},immediate:!0}},methods:{async getData(){var t,e;try{const n=(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.name,r=await Le.get(`/api/settings-table/${n}`);this.tableData=r.data}catch(n){console.error("Помилка завантаження даних таблиці:",n),this.tableData=null}},changeTab(t){this.currentTab=t}}},$7={class:"flex bg-gray-50",style:{height:"calc(-80px + 100vh)",width:"calc(-560px + 100vw)"}},j7={key:0,class:"flex flex-col flex-1 w-full p-2 space-y-3 sm:p-5 sm:py-0 md:pt-5"},U7={class:"ml-2 text-2xl"},H7={class:"w-full flex flex-row whitespace-nowrap overflow-x-auto overflow-y-hidden pb-1 [&::-webkit-scrollbar]:h-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},W7=["onClick"],q7={class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700 flex-1 overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},G7={key:0},Z7={key:1,class:"text-gray-500"};function Y7(t,e,n,r,o,d){var c,b;const p=a.resolveComponent("VsNoData");return a.openBlock(),a.createElementBlock("div",$7,[d.table?(a.openBlock(),a.createElementBlock("div",j7,[a.createElementVNode("h2",U7,a.toDisplayString((b=(c=n.list)==null?void 0:c.find(k=>{var E,C,T,I;return(k==null?void 0:k.table)==((C=(E=t.$route)==null?void 0:E.query)==null?void 0:C.name)||(k==null?void 0:k.alias)==((I=(T=t.$route)==null?void 0:T.query)==null?void 0:I.name)}))==null?void 0:b.title),1),a.createElementVNode("div",H7,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.tabs,(k,E)=>(a.openBlock(),a.createElementBlock("button",{key:E,onClick:C=>d.changeTab(E),class:a.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-800",[o.currentTab===E?"bg-white shadow-sm !border-gray-200":""]])},a.toDisplayString(k.title),11,W7))),128))]),a.createElementVNode("div",q7,[o.tableData?(a.openBlock(),a.createElementBlock("div",G7,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.tableSettingsTabs[o.tabs[o.currentTab].id]),a.mergeProps({key:o.currentTab},o.tableData,{data:o.tableData[o.currentTab],type:o.currentTab,table:d.table,onUpdate:d.getData}),null,16,["data","type","table","onUpdate"]))])):(a.openBlock(),a.createElementBlock("div",Z7," Дані завантажуються або відсутні... "))])])):(a.openBlock(),a.createBlock(p,{key:1,class:"mt-[100px]",text:"Оберіть один з пунктів меню для відображення"}))])}const X7=Oe(F7,[["render",Y7]]),K7={class:"flex items-start gap-0"},J7={__name:"vs-table-settings-page",setup(t){const e=a.ref();return(n,r)=>(a.openBlock(),a.createElementBlock("div",K7,[a.createVNode(M7,{list:e.value,"onUpdate:list":r[0]||(r[0]=o=>e.value=o)},null,8,["list"]),a.createVNode(X7,{list:e.value,"onUpdate:list":r[1]||(r[1]=o=>e.value=o)},null,8,["list"])]))}},My=a.ref({}),Q7={components:{VsNoData:Ha},data(){return{forms:[],formValues:[]}},created(){this.getSettingsAfterEditing()},computed:{activeForm(){const t=this.forms.find(e=>{var n,r;return e.name===((r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.name)});return t!=null&&t.form&&this.getForm(t==null?void 0:t.form),t},properties(){return{...My.value,...et.value}}},watch:{properties:{handler(t){t&&(this.forms=t.forms||[],this.formValues=t.settings||{},!this.$route.query.name&&this.forms.length>0&&this.changeTab(this.forms[0]))},deep:!0,immediate:!0}},methods:{changeTab(t){this.$router.push({path:this.link,query:{name:t.name}})},async saveForm(){try{const t=Object.keys(this.activeForm.body).reduce((e,n)=>{var p;const[r,o]=n.split("."),d=this.formValues[n]||((p=this.formValues[r])==null?void 0:p[o]);return{...e,[n]:d}},{});await Le.post("/api/settings-app",t),await this.getSettingsAfterEditing(),this.$notify({title:"Успішно!",message:"Дані успішно оновлені",type:"success"}),this.$router.go(this.$router.currentRoute)}catch(t){console.error("Помилка збереження даних:",t)}},async getForm(t){const{data:e}=await Le.get(`/api/template/form/${t}`),n=this.forms.find(r=>r.form===t);n.body=(e==null?void 0:e.schema)||e},async getSettingsAfterEditing(){try{const{data:t}=await Le.get("/api/settings-app");My.value=t}catch(t){console.error("Помилка збереження даних:",t)}}}},eU={style:{height:"calc(-60px + 100vh)"},class:"p-2 space-y-3 bg-gray-50 sm:p-5 sm:py-0 md:pt-5"},tU={class:"flex flex-col flex-1 space-y-3"},nU={class:"w-full flex flex-row whitespace-nowrap overflow-y-auto pb-1 [&::-webkit-scrollbar]:h-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},rU=["onClick"],iU={class:"flex justify-end w-full"};function sU(t,e,n,r,o,d){var b,k,E,C;const p=a.resolveComponent("VsForm"),c=a.resolveComponent("VsNoData");return a.openBlock(),a.createElementBlock("div",eU,[a.createElementVNode("div",tU,[a.createElementVNode("div",nU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.forms,T=>{var I,N;return a.openBlock(),a.createElementBlock("button",{key:T.name,onClick:$=>d.changeTab(T),class:a.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-800",[((N=(I=t.$route)==null?void 0:I.query)==null?void 0:N.name)===T.name?"bg-white shadow-sm !border-gray-200":""]])},a.toDisplayString((T==null?void 0:T.ua)||(T==null?void 0:T.title)||(T==null?void 0:T.name)||"Не вказано"),11,rU)}),128)),a.createElementVNode("div",iU,[a.createElementVNode("button",{onClick:e[0]||(e[0]=(...T)=>d.saveForm&&d.saveForm(...T)),class:"mи-4 px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")])])]),d.activeForm?(a.openBlock(),a.createElementBlock("div",{key:JSON.stringify(d.activeForm),class:"p-5 bg-white border border-gray-200 max-h-[calc(100vh-160px)] shadow-sm md:p-8 rounded-xl dark:bg-neutral-800 dark:border-neutral-700 overflow-auto h-full [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},[(b=d.activeForm)!=null&&b.body?(a.openBlock(),a.createBlock(p,{key:0,scheme:(k=d.activeForm)==null?void 0:k.body,style:a.normalizeStyle(t.style),modelValue:o.formValues,"onUpdate:modelValue":e[1]||(e[1]=T=>o.formValues=T)},null,8,["scheme","style","modelValue"])):(E=d.activeForm)!=null&&E.component?(a.openBlock(),a.createBlock(a.resolveDynamicComponent((C=d.activeForm)==null?void 0:C.component),{key:1})):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),o.forms.length?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(c,{key:1,class:"mt-[100px]",text:""}))])}const oU=Oe(Q7,[["render",sU]]),aU={},lU={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function cU(t,e){return a.openBlock(),a.createElementBlock("svg",lU,e[0]||(e[0]=[a.createElementVNode("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},null,-1),a.createElementVNode("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},null,-1)]))}const dU=Oe(aU,[["render",cU]]),uU={class:"h-full w-full flex overflow-auto relative [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},hU={class:"flex-grow"},pU={class:"sticky top-0 flex justify-end gap-1 pb-[10px] bg-white z-[1] px-[10px]"},fU={class:"px-[10px] shrink-0 w-[400px]"},mU={class:"max-h-[calc(100%-50px)] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},gU={class:"text-sm text-gray-500 dark:text-neutral-500"},yU={class:"inline-flex items-center justify-end text-sm font-medium text-gray-800 gap-x-2 text-end dark:text-neutral-200"},_U=["onClick"],bU={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},xU={__name:"print-tab-editor",props:{templateData:{type:Object,default:()=>{}},controlNavbar:Object},emits:["update-template"],setup(t,{emit:e}){var $;const n=a.getCurrentInstance().proxy.$notify,r=id(),o=a.computed(()=>{var F;return(F=r==null?void 0:r.query)==null?void 0:F.name}),d=t,p=e,c=a.ref((($=d.templateData)==null?void 0:$.html)||""),b=a.ref({}),k=a.ref(!1),E=a.ref(),C=async()=>{try{await Le.put(`/api/print-template/${o.value}`,{...d.templateData,html:c.value}),p("update-template"),n({type:"success",title:"Успішно!",message:"Шаблон успішно оновлено"})}catch{n({type:"success",title:"Помилка!",message:"При спробі оновити шаблон виникла помилка"})}},T=F=>{const q=`{{ ${F} }}`;try{const J=document.createElement("textarea");J.value=q,document.body.appendChild(J),J.select(),J.setSelectionRange(0,q.length);const Q=document.execCommand("copy");document.body.removeChild(J),n(Q?{type:"success",title:"Успішно!",message:"Ключ успішно скопійовано"}:{type:"error",title:"Помилка!",message:"Не вдалося скопіювати ключ"})}catch(J){n({type:"error",title:"Помилка!",message:"Не вдалося скопіювати ключ"}),console.error("Copy failed",J)}},I=async()=>{try{await E.value.doValidation(),await Le.put(`/api/print-template/${o.value}`,{...d.templateData,...b.value}),k.value=!1,n({type:"success",title:"Успішно!",message:"Шаблон успішно оновлено"}),await d.controlNavbar.getMenuData()}catch{n({type:"success",title:"Помилка!",message:"При спробі оновити шаблон виникла помилка"})}};a.watch(()=>d.templateData,F=>{b.value={name:F==null?void 0:F.name,title:F==null?void 0:F.title,route:F==null?void 0:F.route}}),a.onMounted(()=>{var F,q,J;b.value={name:(F=d.templateData)==null?void 0:F.name,title:(q=d.templateData)==null?void 0:q.title,route:(J=d.templateData)==null?void 0:J.route}});const N={name:{type:"Text",ua:"Назва",validators:["required"]},title:{type:"Text",ua:"Заголовок",validators:["required"]},route:{type:"Text",ua:"Route"}};return(F,q)=>{var Re;const J=a.resolveComponent("VsTiptapEditor"),Q=a.resolveComponent("VsPopover"),me=a.resolveComponent("VsForm"),ke=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",uU,[a.createElementVNode("div",hU,[a.createElementVNode("div",pU,[a.createElementVNode("button",{onClick:q[0]||(q[0]=Ee=>k.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Редагувати "),a.createElementVNode("button",{onClick:C,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")]),a.createVNode(J,{modelValue:c.value,"onUpdate:modelValue":q[1]||(q[1]=Ee=>c.value=Ee),class:"text-[13px] h-[calc(100%-50px)]"},null,8,["modelValue"])]),a.createElementVNode("div",fU,[q[6]||(q[6]=a.createElementVNode("h2",{class:"block font-semibold mb-[20px] text-gray-800 truncate dark:text-neutral-200"}," Список колонок ",-1)),a.createElementVNode("dl",mU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Re=t.templateData)==null?void 0:Re.columns,Ee=>(a.openBlock(),a.createElementBlock("div",{key:Ee==null?void 0:Ee.name,class:"flex items-center justify-between w-full"},[a.createElementVNode("dt",gU,a.toDisplayString(Ee==null?void 0:Ee.title)+": ",1),a.createElementVNode("dd",yU,[a.createTextVNode(a.toDisplayString(Ee==null?void 0:Ee.name)+" ",1),a.createVNode(Q,{trigger:"hover",placement:"left"},{reference:a.withCtx(()=>[a.createElementVNode("button",{onClick:Ve=>T(Ee==null?void 0:Ee.name),class:"h-[24px] w-[24px] flex items-center justify-center hover:bg-gray-100 rounded-lg duration-300"},[a.createVNode(dU)],8,_U)]),default:a.withCtx(()=>[q[5]||(q[5]=a.createTextVNode(" Скопіювати ключ ",-1))]),_:2,__:[5]},1024)])]))),128))])])]),a.createVNode(ke,{visible:k.value,"onUpdate:visible":q[4]||(q[4]=Ee=>k.value=Ee),title:"Створти шаблон"},{footer:a.withCtx(()=>[a.createElementVNode("div",bU,[a.createElementVNode("button",{style:{border:"1px solid #000"},onClick:q[3]||(q[3]=Ee=>{k.value=!1,b.value={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:I,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode(me,{ref_key:"form",ref:E,scheme:N,modelValue:b.value,"onUpdate:modelValue":q[2]||(q[2]=Ee=>b.value=Ee)},null,8,["modelValue"])]),_:1},8,["visible"])],64)}}},Iy=(t,e=300)=>{let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}},vU={class:"h-full"},wU={class:"flex justify-between mb-[10px]"},kU={class:"flex items-center gap-2"},EU=["disabled"],CU={class:"flex h-full"},SU={class:"w-[50%]"},TU={class:"flex flex-wrap items-center lg:justify-between lg:grow"},AU={class:"relative min-h-[30px] gap-[20px] inline-flex items-center"},DU={class:"text-xs text-gray-800 me-1 sm:text-sm dark:text-neutral-200"},MU={class:"relative py-1 ps-1.5 pe-7 inline-flex shrink-0 justify-center items-center gap-x-1.5 border border-transparent text-sm text-gray-500 rounded-lg underline-offset-4 hover:underline hover:text-gray-600 focus:outline-none focus:underline focus:text-gray-600"},IU={class:"w-[300px] relative p-1 max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},PU={class:""},RU={class:"flex items-center gap-2 font-normal text-[14px] cursor-pointer"},NU=["value"],BU={class:"pr-2"},VU={class:"flex items-center gap-2 font-normal text-[14px] cursor-pointer"},zU=["value"],OU=["src"],LU={__name:"print-tab-list",props:{templateData:Object},setup(t){const e=id(),n=a.computed(()=>{var J;return(J=e==null?void 0:e.query)==null?void 0:J.name}),r=t,o=a.ref(null),d=a.ref(null),p=a.ref(""),c=a.ref([]),b=a.ref(null),k=a.ref([]),E=async(J=null)=>{o.value=null;try{const{data:Q}=await Le.get(`/api/table-data/${r.templateData.alias}`,{params:{filter:b.value,search:J}});o.value=Q}catch{}},C=async()=>{try{const{data:{list:J}}=await Le.get(`/api/table-filter/${r.templateData.alias}`);d.value=J==null?void 0:J.map(Q=>({...Q,label:(Q==null?void 0:Q.label)||(Q==null?void 0:Q.ua)}))}catch{}},T=({url:J})=>{J==="no-url"?b.value=null:b.value=J},I=({target:J})=>{var Q,me;if(J.checked){const ke=(Q=o.value.rows)==null?void 0:Q.find(Re=>(Re==null?void 0:Re.id)==J.value);c.value=[...c.value,ke]}else c.value=(me=c.value)==null?void 0:me.filter(ke=>(ke==null?void 0:ke.id)!=(J==null?void 0:J.value))},N=()=>{var J;(J=o.value.rows)==null||J.forEach(Q=>{var me;(me=k.value)!=null&&me.includes(Q==null?void 0:Q.id)||(k.value=[...k.value,Q==null?void 0:Q.id],c.value=[...c.value,Q])})},$=()=>{var Q,me;const J=(Q=c.value)==null?void 0:Q.map(ke=>ke==null?void 0:ke.id);k.value=(me=k.value)==null?void 0:me.filter(ke=>!(J!=null&&J.includes(ke))),c.value=[]},F=async()=>{if(k.value.length===0)return;const J=k.value.join(",");p.value=`/api/print-template/${n.value}/${J}`},q=Iy(E,300);return a.watch(b,()=>E()),a.onMounted(async()=>{await E(),await C()}),(J,Q)=>{var Re,Ee,Ve;const me=a.resolveComponent("VsFilterList"),ke=a.resolveComponent("VsPopover");return a.openBlock(),a.createElementBlock("div",vU,[a.createElementVNode("div",wU,[a.createElementVNode("div",kU,[a.createElementVNode("input",{type:"text",class:"w-[200px] h-[38px] px-[10px] placeholder:text-[14px] placeholder:text-gray-600 rounded-lg bg-gray-100 focus:outline-blue-500",placeholder:"Пошук...",onInput:Q[0]||(Q[0]=({target:Be})=>a.unref(q)(Be.value))},null,32),d.value?(a.openBlock(),a.createBlock(me,{key:0,view:"plain",scheme:d.value,isDialog:!1,"apply-vue-router":"",history:"",name:"filter",onFilterChange:T},null,8,["scheme"])):a.createCommentVNode("",!0)]),o.value?(a.openBlock(),a.createElementBlock("button",{key:0,onClick:F,disabled:!k.value.length,class:"py-2 px-3 inline-flex disabled:text-gray-200 disabled:cursor-not-allowed items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Згенерувати документ ",8,EU)):a.createCommentVNode("",!0)]),a.createElementVNode("div",CU,[a.createElementVNode("div",SU,[a.createElementVNode("div",TU,[a.createElementVNode("div",AU,[a.createElementVNode("span",DU," Знайдено "+a.toDisplayString((Re=o.value)==null?void 0:Re.filtered),1),a.createElementVNode("button",{onClick:N,class:"relative py-1 ps-1.5 pe-7 inline-flex shrink-0 justify-center items-center gap-x-1.5 border border-transparent text-sm text-gray-500 rounded-lg underline-offset-4 hover:underline hover:text-gray-600 focus:outline-none focus:underline focus:text-gray-600"}," Обрати всі ")]),(Ee=c.value)!=null&&Ee.length?(a.openBlock(),a.createBlock(ke,{key:0,placement:"bottom"},{reference:a.withCtx(()=>{var Be;return[a.createElementVNode("button",MU,[a.createTextVNode(" Обранo: "+a.toDisplayString((Be=c.value)==null?void 0:Be.length)+" ",1),a.createVNode(Ip,{height:"14",width:"14"})])]}),default:a.withCtx(()=>[a.createElementVNode("div",IU,[a.createElementVNode("ul",PU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,Be=>{var Ze,tt;return a.openBlock(),a.createElementBlock("li",{key:Be==null?void 0:Be.id,class:"p-2 hover:bg-gray-100 rounded-[8px] cursor-pointer"},[a.createElementVNode("label",RU,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",class:"hidden",onChange:I,"onUpdate:modelValue":Q[1]||(Q[1]=Xe=>k.value=Xe),value:Be==null?void 0:Be.id},null,40,NU),[[a.vModelCheckbox,k.value]]),a.createElementVNode("span",{class:a.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded size-4 shrink-0 focus:ring-blue-500",k.value.includes(Be==null?void 0:Be.id)?"bg-blue-600 border-0":"bg-white"])},[a.createVNode(kl,{height:"12",width:"12"})],2),a.createTextVNode(" "+a.toDisplayString(Be[(tt=(Ze=o.value)==null?void 0:Ze.meta)==null?void 0:tt.title]),1)])])}),128))]),a.createElementVNode("button",{onClick:$,class:"w-full bg-white sticky bottom-0 h-[34px] border rounded-lg text-[16px] hover:bg-gray-100 duration-300 disabled:cursor-not-allowed disabled:hover:bg-white disabled:text-gray-200"}," Очистити ")])]),_:1})):a.createCommentVNode("",!0)]),a.createElementVNode("ul",BU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ve=o.value)==null?void 0:Ve.rows,Be=>{var Ze,tt;return a.openBlock(),a.createElementBlock("li",{key:Be==null?void 0:Be.id,class:"p-2 hover:bg-gray-100 rounded-[8px] cursor-pointer"},[a.createElementVNode("label",VU,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",class:"hidden",onChange:I,"onUpdate:modelValue":Q[2]||(Q[2]=Xe=>k.value=Xe),value:Be==null?void 0:Be.id},null,40,zU),[[a.vModelCheckbox,k.value]]),a.createElementVNode("span",{class:a.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded size-4 shrink-0 focus:ring-blue-500",k.value.includes(Be==null?void 0:Be.id)?"bg-blue-600 border-0":"bg-white"])},[a.createVNode(kl,{height:"12",width:"12"})],2),a.createTextVNode(" "+a.toDisplayString(Be[(tt=(Ze=o.value)==null?void 0:Ze.meta)==null?void 0:tt.title]),1)])])}),128))])]),a.createElementVNode("iframe",{class:"h-[calc(100%-60px)] w-[50%] bg-gray-100",src:p.value},null,8,OU)])])}}},FU={class:"p-[20px]"},$U={class:"flex gap-[10px]"},jU=["onClick"],UU={class:"rounded-xl flex justify-between overflow-hidden bg-white border max-w-[1400px] h-[calc(100vh-160px)] mt-[20px]"},HU={key:0,class:"w-full h-full"},WU={key:0,class:"p-[10px] w-full h-full"},qU={key:1,class:"p-[10px]"},GU={__name:"print-content",props:{controlNavbar:Object},setup(t){const e={"print-tab-editor":{text:"Шаблон",component:xU},"print-tab-list":{text:"Друк",component:LU}},n=id(),r=a.computed(()=>{var b;return(b=n==null?void 0:n.query)==null?void 0:b.name}),o=a.ref("print-tab-editor"),d=a.ref(null),p=a.ref(!1),c=async()=>{p.value=!1;try{const{data:b}=await Le.get(`/api/print-template/${r.value}`);d.value=b}catch(b){console.log(b),d.value=null}finally{p.value=!0}};return a.onMounted(c),a.watch(r,()=>c()),(b,k)=>(a.openBlock(),a.createElementBlock("div",FU,[a.createElementVNode("div",$U,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(e,(E,C)=>a.createElementVNode("button",{key:C,onClick:T=>o.value=C,class:a.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500",[o.value===C?" shadow bg-white":""]])},a.toDisplayString(E.text),11,jU)),64))]),a.createElementVNode("div",UU,[d.value?(a.openBlock(),a.createElementBlock("div",HU,[p.value?(a.openBlock(),a.createElementBlock("div",WU,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e[o.value].component),{templateData:d.value,onUpdateTemplate:c,controlNavbar:t.controlNavbar},null,40,["templateData","controlNavbar"]))])):(a.openBlock(),a.createElementBlock("div",qU,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e[o.value].component),{templateData:d.value},null,8,["templateData"]))]))])):(a.openBlock(),a.createBlock(Ha,{key:1}))])]))}},ZU={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},YU={class:"flex items-center justify-between p-2 ps-5 gap-x-2"},XU={class:"relative px-[10px] py-[4px] flex gap-[8px] items-center"},KU={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 170px)"}},JU=["data-index"],QU={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},eH={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},tH="/admin.templates",nH={__name:"print-navbar",props:{controlNavbar:{},controlNavbarModifiers:{}},emits:["update:controlNavbar"],setup(t){const e={name:{type:"Text",ua:"Назва",validators:["required"]},title:{type:"Text",ua:"Заголовок",validators:["required"]},route:{type:"Text",ua:"Route"},html:{type:"TextEditor",ua:"Розмітка"}},n=a.ref(""),r=a.ref(null),o=a.ref({}),d=a.ref(!1),p=a.ref(),c=a.useModel(t,"controlNavbar"),b=a.computed(()=>{var C;return(C=r.value)==null?void 0:C.filter(T=>{var I,N,$;return($=(I=T==null?void 0:T.title)==null?void 0:I.toLowerCase())==null?void 0:$.includes((N=n.value)==null?void 0:N.toLowerCase())})}),k=async()=>{try{const{data:C}=await Le.get("/api/print-template");r.value=C==null?void 0:C.rows}catch{}},E=async()=>{try{await p.value.doValidation(),await Le.post("/api/print-template",o.value)}catch{}};return k(),a.onMounted(()=>{c.value={getMenuData:()=>{k()}}}),(C,T)=>{var q;const I=a.resolveComponent("VsText"),N=a.resolveComponent("router-link"),$=a.resolveComponent("VsForm"),F=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",ZU,[a.createElementVNode("div",YU,[T[5]||(T[5]=a.createElementVNode("span",{id:"hs-pro-chat-sidebar-label",class:"block font-semibold text-gray-800 truncate dark:text-neutral-200"}," Друк ",-1)),a.createElementVNode("button",{onClick:T[0]||(T[0]=J=>d.value=!0),class:"bg-[#DBEAFE] h-[30px] w-[30px] text-blue-700 shrink-0 flex items-center justify-center rounded-lg hover:bg-blue-200"},[a.createVNode($l,{height:"16",width:"16"})])]),a.createElementVNode("div",XU,[a.createVNode(I,{type:"text",modelValue:n.value,"onUpdate:modelValue":T[1]||(T[1]=J=>n.value=J),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(q=b.value)!=null&&q.length?(a.openBlock(),a.createElementBlock("ul",KU,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,J=>{var Q,me;return a.openBlock(),a.createElementBlock("li",{key:J==null?void 0:J.name,"data-index":C.index,class:"w-full"},[a.createVNode(N,{class:a.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((me=(Q=C.$route)==null?void 0:Q.query)==null?void 0:me.name)===(J==null?void 0:J.name)}]),to:tH+"?name="+(J==null?void 0:J.name)},{default:a.withCtx(()=>[a.createElementVNode("span",QU,a.toDisplayString((J==null?void 0:J.title)||(J==null?void 0:J.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,JU)}),128))])):a.createCommentVNode("",!0)]),a.createVNode(F,{visible:d.value,"onUpdate:visible":T[4]||(T[4]=J=>d.value=J),title:"Створти шаблон"},{footer:a.withCtx(()=>[a.createElementVNode("div",eH,[a.createElementVNode("button",{style:{border:"1px solid #000"},onClick:T[3]||(T[3]=J=>{d.value=!1,o.value={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),a.createElementVNode("button",{onClick:E,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:a.withCtx(()=>[a.createVNode($,{ref_key:"form",ref:p,scheme:e,modelValue:o.value,"onUpdate:modelValue":T[2]||(T[2]=J=>o.value=J)},null,8,["modelValue"])]),_:1},8,["visible"])],64)}}},rH={class:"flex"},iH={class:"w-[calc(100vw-560px)] bg-gray-50"},sH={__name:"template-print-page",setup(t){const e=a.ref();return(n,r)=>{var o,d;return a.openBlock(),a.createElementBlock("div",rH,[a.createVNode(nH,{controlNavbar:e.value,"onUpdate:controlNavbar":r[0]||(r[0]=p=>e.value=p)},null,8,["controlNavbar"]),a.createElementVNode("div",iH,[(d=(o=n.$route)==null?void 0:o.query)!=null&&d.name?(a.openBlock(),a.createBlock(GU,{key:0,controlNavbar:e.value},null,8,["controlNavbar"])):(a.openBlock(),a.createBlock(Ha,{key:1}))])])}}},oH={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},aH={class:"relative px-[10px] py-[10px] flex gap-[8px] items-center"},lH={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},cH=["data-index"],dH={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},uH="/admin.reports",hH={__name:"reports-navbar",setup(t){const e=a.ref(""),n=a.ref(null),r=a.computed(()=>{var d;return(d=n.value)==null?void 0:d.filter(p=>{var c,b,k;return(k=(c=p==null?void 0:p.title)==null?void 0:c.toLowerCase())==null?void 0:k.includes((b=e.value)==null?void 0:b.toLowerCase())})});return(async()=>{try{const{data:d}=await Le.get("/api/reports");n.value=d==null?void 0:d.rows}catch{}})(),(d,p)=>{var k;const c=a.resolveComponent("VsText"),b=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",oH,[a.createElementVNode("div",aH,[a.createVNode(c,{type:"text",modelValue:e.value,"onUpdate:modelValue":p[0]||(p[0]=E=>e.value=E),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(k=r.value)!=null&&k.length?(a.openBlock(),a.createElementBlock("ul",lH,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.value,E=>{var C,T;return a.openBlock(),a.createElementBlock("li",{key:E==null?void 0:E.name,"data-index":d.index,class:"w-full"},[a.createVNode(b,{class:a.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((T=(C=d.$route)==null?void 0:C.query)==null?void 0:T.name)===(E==null?void 0:E.name)}]),to:uH+"?name="+(E==null?void 0:E.name)},{default:a.withCtx(()=>[a.createElementVNode("span",dH,a.toDisplayString((E==null?void 0:E.title)||(E==null?void 0:E.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,cH)}),128))])):a.createCommentVNode("",!0)])}}},pH={class:"p-5 bg-white border border-gray-200 shadow-sm md:p-8 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},fH={class:"space-y-5"},mH={class:"flex items-center gap-[4px]"},gH={class:"flex items-center gap-2"},yH={class:"flex flex-col flex-grow w-full p-4 border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},_H={class:"py-4 sm:py-0 ps-1 sm:pe-4"},bH={class:"text-sm text-gray-800 dark:text-neutral-200"},xH={class:"flex flex-wrap items-center gap-2 mt-3"},vH={class:"block text-2xl font-medium text-gray-800 dark:text-neutral-200"},wH={class:"overflow-x-auto h-[calc(100vh-430px)] [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},kH={class:"inline-block min-w-full align-middle"},EH={class:"relative min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},CH={class:"sticky top-[0px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},SH={class:"flex items-center py-3 text-sm font-medium text-gray-800 pe-4 text-start gap-x-1 dark:text-neutral-200"},TH={class:"divide-y divide-gray-200 dark:divide-neutral-700"},AH={class:"px-4 py-3 size-px whitespace-nowrap"},DH={class:"text-sm text-gray-600 dark:text-neutral-400"},MH={__name:"reports-table",setup(t){const e=[{id:"period",type:"date",inline:!0,placeholder:"Оберіть період"}],n=[{id:"spent",type:"check",label:"Spent",inline:!0,options:[{id:"1",text:"text 1"},{id:"2",text:"text 2"},{id:"3",text:"text 3"}]}],r=id(),o=a.ref(null),d=a.ref(null),p=a.ref(null),c=a.ref(!0),b=a.computed(()=>{var I;return(I=r==null?void 0:r.query)==null?void 0:I.name}),k=async(I=null)=>{try{const{data:N}=await Le.get(`/api/reports/${b.value}`,{params:{filter:d.value,period:p.value,search:I||null}});o.value=N}catch{}},E=Iy(k,300),C=({url:I})=>{I==="no-url"?d.value=null:d.value=I,k()},T=I=>{var N;(N=Object.keys(I))!=null&&N.length&&(p.value=I==null?void 0:I.period,k())};return a.watch(b,()=>{c.value=!1,setTimeout(()=>c.value=!0),d.value=null,p.value=null}),(I,N)=>{var q,J,Q;const $=a.resolveComponent("VsText"),F=a.resolveComponent("VsFilterList");return a.openBlock(),a.createElementBlock("div",pH,[N[0]||(N[0]=a.createElementVNode("div",{class:"mb-4 xl:mb-8"},[a.createElementVNode("h1",{class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"}," Members "),a.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ")],-1)),a.createElementVNode("div",fH,[a.createElementVNode("div",mH,[a.createVNode($,{type:"text",placeholder:"Пошук...","onUpdate:modelValue":a.unref(E),class:"flex-grow [&>input]:h-[38px] max-w-[300px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 admin-input-text [&>input]:border-0"},null,8,["onUpdate:modelValue"]),c.value?(a.openBlock(),a.createBlock(F,{key:0,scheme:e,isDialog:!1,view:"plain",clearable:!1,"onUpdate:modelValue":T})):a.createCommentVNode("",!0),c.value?(a.openBlock(),a.createBlock(F,{key:1,scheme:n,isDialog:!1,view:"plain",clearable:!1,onFilterChange:C})):a.createCommentVNode("",!0)]),a.createElementVNode("div",gH,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((q=o.value)==null?void 0:q.kpi,me=>(a.openBlock(),a.createElementBlock("div",yH,[a.createElementVNode("div",_H,[a.createElementVNode("p",bH,a.toDisplayString(me==null?void 0:me.title),1),a.createElementVNode("div",xH,[a.createElementVNode("span",vH,a.toDisplayString(me==null?void 0:me.count),1)])])]))),256))]),a.createElementVNode("div",wH,[a.createElementVNode("div",kH,[a.createElementVNode("table",EH,[a.createElementVNode("thead",CH,[a.createElementVNode("tr",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((J=o.value)==null?void 0:J.columns,me=>(a.openBlock(),a.createElementBlock("th",{scope:"col",class:"min-w-[250px]",key:me==null?void 0:me.name},[a.createElementVNode("div",SH,a.toDisplayString(me==null?void 0:me.title),1)]))),128))])]),a.createElementVNode("tbody",TH,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Q=o.value)==null?void 0:Q.rows,me=>{var ke;return a.openBlock(),a.createElementBlock("tr",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ke=o.value)==null?void 0:ke.columns,Re=>(a.openBlock(),a.createElementBlock("td",AH,[a.createElementVNode("span",DH,a.toDisplayString((me==null?void 0:me[Re==null?void 0:Re.name])||"-"),1)]))),256))])}),256))])])])])])])}}},IH={class:"flex"},PH={class:"w-[calc(100vw-560px)] p-[20px] bg-gray-50"},RH={__name:"reports-page",setup(t){return(e,n)=>{var r,o;return a.openBlock(),a.createElementBlock("div",IH,[a.createVNode(hH),a.createElementVNode("div",PH,[(o=(r=e.$route)==null?void 0:r.query)!=null&&o.name?(a.openBlock(),a.createBlock(MH,{key:0})):(a.openBlock(),a.createBlock(Ha,{key:1}))])])}}},NH={props:{task:{type:Object,default:()=>({})}},computed:{badgeColor(){const t={Design:"purple","Feature Request":"teal",Backend:"blue",QA:"green",default:"teal"};return t[this.task.type]||t.default}}},BH={class:"px-3 pt-3 pb-5 bg-white border border-white rounded shadow"},VH={class:"flex justify-between"},zH={class:"font-sans text-sm font-semibold tracking-wide text-gray-700"},OH={class:"flex items-center justify-between mt-4"},LH={class:"text-sm text-gray-600"};function FH(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",BH,[a.createElementVNode("div",VH,[a.createElementVNode("p",zH,a.toDisplayString(n.task.title),1)]),a.createElementVNode("div",OH,[a.createElementVNode("span",LH,a.toDisplayString(n.task.date),1)])])}const $H={name:"App",components:{KanbanItem:Oe(NH,[["render",FH]]),draggable:qc},data(){return{columns:[{title:"Backlog",tasks:[{id:1,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:2,title:"Provide documentation on integrations",date:"Sep 12"},{id:3,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:4,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:5,title:"Test checkout flow",date:"Sep 15",type:"QA"}]},{title:"In Progress",tasks:[{id:6,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:7,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:8,title:"Provide documentation on integrations",date:"Sep 12",type:"Backend"}]},{title:"Review",tasks:[{id:9,title:"Provide documentation on integrations",date:"Sep 12"},{id:10,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:11,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:12,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:13,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"}]},{title:"Done",tasks:[{id:14,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"},{id:15,title:"Design shopping cart dropdown",date:"Sep 9",type:"Design"},{id:16,title:"Add discount code to checkout page",date:"Sep 14",type:"Feature Request"}]}]}}},jH={class:"flex h-full p-[20px]"},UH={class:"flex h-full"},HH={class:"font-sans text-sm font-semibold tracking-wide text-gray-700"};function WH(t,e,n,r,o,d){const p=a.resolveComponent("KanbanItem"),c=a.resolveComponent("draggable");return a.openBlock(),a.createElementBlock("div",jH,[a.createElementVNode("div",UH,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.columns,b=>(a.openBlock(),a.createElementBlock("div",{key:b.title,class:"px-3 py-3 mr-4 bg-gray-100 rounded rounded-lg column-width"},[a.createElementVNode("p",HH,a.toDisplayString(b.title),1),a.createVNode(c,{list:b.tasks,animation:200,"ghost-class":"ghost-card",group:"tasks"},a.createSlots({_:2},[a.renderList(b.tasks,k=>({name:"item",fn:a.withCtx(()=>[a.createVNode(p,{task:k,class:"mt-3 cursor-move"},null,8,["task"])])}))]),1032,["list"])]))),128))])])}const qH=Oe($H,[["render",WH],["__scopeId","data-v-ccf91ca9"]]),GH={class:"h-[calc(100vh-60px)]"},ZH={"card-page":Dy,"user-cls-page":Nj,"calendar-page":k7,"table-settings-page":J7,"admin-properties-page":oU,"template-print-page":sH,"reports-page":RH,"kanban-page":{__name:"kanban",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",GH,[a.createVNode(qH)]))}}},YH={},XH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-info-circle"};function KH(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",XH,e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},null,-1),a.createElementVNode("path",{d:"M12 9h.01"},null,-1),a.createElementVNode("path",{d:"M11 12h1v4h1"},null,-1)]))}const JH=Oe(YH,[["render",KH]]),QH={},e9={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-loader"};function t9(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",e9,e[0]||(e[0]=[a.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 6l0 -3"></path><path d="M16.25 7.75l2.15 -2.15"></path><path d="M18 12l3 0"></path><path d="M16.25 16.25l2.15 2.15"></path><path d="M12 18l0 3"></path><path d="M7.75 16.25l-2.15 2.15"></path><path d="M6 12l-3 0"></path><path d="M7.75 7.75l-2.15 -2.15"></path>',9)]))}const n9=Oe(QH,[["render",t9]]),r9={class:"flex items-center justify-between py-1 gap-x-4"},i9={class:"col-span-1"},s9={class:"inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500"},o9={class:"col-span-2"},a9={class:"font-medium text-[13px] text-gray-800 dark:text-neutral-200"},l9={key:1,class:"w-[300px] h-[300px] flex items-center justify-center"},Py={__name:"admin-info-popover",props:{table:{type:String,default:()=>""},id:{type:String,default:()=>""},api:{type:String,default:()=>""}},setup(t){var C,T;const e=(T=(C=a.getCurrentInstance())==null?void 0:C.appContext)==null?void 0:T.app;window.v3core.install(e),Object.entries(wx).forEach(([I,N])=>{e==null||e.component(I,N)});const n=t,r=a.ref(null),o=a.ref(!1),d=a.ref(null),p=a.ref(null);let c=null;const b=async()=>{try{const{data:I}=await Le.get(`${n.api}/${n.table}/${n.id}`);r.value=I}catch{}},k=async()=>{clearTimeout(c),o.value=!0,r.value||await b(),await Mv("right",d.value,p.value,40)},E=()=>{c=setTimeout(()=>{o.value=!1},300)};return a.onBeforeUnmount(()=>{clearTimeout(c)}),(I,N)=>(a.openBlock(),a.createElementBlock("div",{style:{display:"inline-block"},onMouseenter:k,onMouseleave:E,ref_key:"infoPopover",ref:d},[a.createVNode(JH,{height:"20",width:"20",class:"text-gray-700 cursor-pointer"}),(a.openBlock(),a.createBlock(a.Teleport,{to:"#modal"},[a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var $;return[a.withDirectives(a.createElementVNode("div",{onMouseenter:k,onMouseleave:E,ref_key:"infoPopoverContent",ref:p,class:"fixed p-[20px] border z-[10002] rounded-xl bg-white max-h-[400px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-thumb]:rounded-[100px] [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[r.value?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(($=r.value)==null?void 0:$.columns,F=>{var q,J;return a.openBlock(),a.createElementBlock("dl",r9,[a.createElementVNode("dt",i9,[a.createElementVNode("p",s9,a.toDisplayString((F==null?void 0:F.ua)||(F==null?void 0:F.title))+": ",1)]),a.createElementVNode("dd",o9,[a.createElementVNode("p",a9,[a.createVNode(vd,{row:(J=(q=r.value)==null?void 0:q.rows)==null?void 0:J[0],column:{...F,edit:!1}},null,8,["row","column"])])])])}),256)):(a.openBlock(),a.createElementBlock("div",l9,[a.createVNode(n9,{height:"40",width:"40",class:"animate-spin"})]))],544),[[a.vShow,o.value]])]}),_:1})]))],544))}},Ry={...l8,...c8,"vs-dashboard":f8,"vs-custom-button":y8,"vs-group-interface":F8,"vs-test-widget":{__name:"vs-test-widget",props:{data:Object,dataName:String,table:String,geom:null},setup(t){var d;const{$v3plugin:e,$confirm:n}=(d=a.getCurrentInstance())==null?void 0:d.appContext.app.config.globalProperties,r=a.ref(!1),o=()=>{n({title:"Are you sure?",message:"Are you sure you want to delete this message?"})};return(p,c)=>{var k,E,C,T;const b=a.resolveComponent("VsConfirm");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createVNode(Py,{table:(E=(k=p.$route)==null?void 0:k.params)==null?void 0:E.table,id:(T=(C=p.$route)==null?void 0:C.params)==null?void 0:T.id},null,8,["table","id"]),a.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:c[0]||(c[0]=I=>r.value=!0)}," Редагувати Tokens "),a.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:o}," Редагувати Tokens 1212 ")]),a.createVNode(b,{visible:r.value,"onUpdate:visible":c[1]||(c[1]=I=>r.value=I),title:"Are you sure?"},{footer:a.withCtx(()=>c[2]||(c[2]=[a.createElementVNode("div",{class:"flex gap-[4px] p-[16px]"},[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50","data-hs-overlay":"#hs-pro-chhdl"}," Скасувати "),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 disabled:opacity-50 disabled:pointer-events-none"}," Видалити ")],-1)])),default:a.withCtx(()=>[c[3]||(c[3]=a.createElementVNode("p",{class:"mt-1 text-sm text-gray-600 dark:text-neutral-400"}," Are you sure you want to delete this message? ",-1)),c[4]||(c[4]=a.createElementVNode("div",{class:"flex items-center mt-5"},[a.createElementVNode("input",{type:"checkbox",class:"shrink-0 size-3.5 border-gray-300 rounded text-blue-700 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-600 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"hs-pro-chhdlcch"}),a.createElementVNode("label",{for:"hs-pro-chhdlcch",class:"text-sm text-gray-600 ms-2 dark:text-neutral-400"}," Don't show me this again ")],-1))]),_:1,__:[3,4]},8,["visible"])],64)}}},"vs-card-list":Dy,"vs-info-popover":Py,...ZH},c9=t=>new Promise(e=>{const n=new CustomEvent("openFormPlugin");n.options=t,window.dispatchEvent(n);const r=({message:o})=>{window.removeEventListener("closeFormPlugin",r),e(o)};window.addEventListener("closeFormPlugin",r)});function d9(t){const e=typeof t;return e==="object"?t:{title:"Підтвердити операцію",text:e==="string"?t:"Ви впевнені що хочете виконати операцію?",cancel:"Скасувати",confirm:"Виконати"}}const u9=({api:t,confirm:e,method:n,isId:r,id:o,redirect:d})=>new Promise(p=>{var T,I,N,$;const{VsDialog:c}=(I=(T=window.app)==null?void 0:T._context)==null?void 0:I.components,{$notify:b}=($=(N=window.app)==null?void 0:N.config)==null?void 0:$.globalProperties,k=document.querySelector("#modal");if(!k){console.error('Modal root element with id "#modal" not found!');return}const E=document.createElement("div");k.appendChild(E);const C=a.createApp({components:{VsDialog:c},data(){return{visible:!1,getConfirm:d9(e)}},methods:{close(F){this.visible=!1,this.$el.remove(),C.unmount(),p(F||"Success")},async doRequest(){var F,q,J,Q,me,ke;try{const{data:Re}=await Le({url:t+(r?`/${o}`:""),method:n||"POST"});this.close(Re),await b({title:"Успішно!",type:"success",message:"Операція виконана успішно"}),d&&((me=(Q=(J=(q=(F=window.app)==null?void 0:F._context)==null?void 0:q.config)==null?void 0:J.globalProperties)==null?void 0:Q.$router)==null||me.back()),await nh()}catch(Re){b({title:"Помилка!",type:"error",message:((ke=Re==null?void 0:Re.response)==null?void 0:ke.data)||"Сталася помилка"})}}},mounted(){e?this.visible=!0:this.doRequest()},template:`
|
626
626
|
<div style="position: relative; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000;">
|
627
627
|
<VsDialog v-model:visible="visible" size="small" :title="getConfirm?.title">
|
628
628
|
<div class="p-4">
|