@frumu/tandem-panel 0.4.19 → 0.4.21
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/bin/setup.js +38 -1
- package/dist/assets/{index-B_avj5aY.css → index-B3iGh6pG.css} +1 -1
- package/dist/assets/index-BsbwdhBh.js +2910 -0
- package/dist/assets/{react-query-BiFBqyAt.js → react-query-DtPmeC_c.js} +1 -1
- package/dist/assets/{vendor-Q0KoFXrG.js → vendor-UNKt3GY8.js} +49 -49
- package/dist/index.html +4 -4
- package/lib/automations/workflow-list.js +147 -0
- package/lib/setup/control-panel-preferences.js +125 -0
- package/lib/setup/control-panel-principal.js +60 -0
- package/package.json +3 -3
- package/server/routes/control-panel-preferences.js +97 -0
- package/dist/assets/index-7omBpQ9G.js +0 -2900
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{l as Ds,D as Qs,y,x as Xn,G as uu,i as du,_ as q,j as fu,d as ue,a as hu,b as pu,c as Ks,E as Ir,N as gu,$ as mu}from"./preact-vendor-CWXGD9A4.js";var rt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yu={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},vu=class{#t=yu;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},qe=new vu;function bu(t){setTimeout(t,0)}var Tt=typeof window>"u"||"Deno"in globalThis;function le(){}function wu(t,e){return typeof t=="function"?t(e):t}function Ys(t){return typeof t=="number"&&t>=0&&t!==1/0}function oa(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Me(t,e){return typeof t=="function"?t(e):t}function ce(t,e){return typeof t=="function"?t(e):t}function Or(t,e){const{type:n="all",exact:s,fetchStatus:i,predicate:r,queryKey:o,stale:a}=t;if(o){if(s){if(e.queryHash!==Ci(o,e.options))return!1}else if(!Yt(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||r&&!r(e))}function Mr(t,e){const{exact:n,status:s,predicate:i,mutationKey:r}=t;if(r){if(!e.options.mutationKey)return!1;if(n){if(et(e.options.mutationKey)!==et(r))return!1}else if(!Yt(e.options.mutationKey,r))return!1}return!(s&&e.state.status!==s||i&&!i(e))}function Ci(t,e){return(e?.queryKeyHashFn||et)(t)}function et(t){return JSON.stringify(t,(e,n)=>Js(n)?Object.keys(n).sort().reduce((s,i)=>(s[i]=n[i],s),{}):n)}function Yt(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Yt(t[n],e[n])):!1}var Su=Object.prototype.hasOwnProperty;function Di(t,e,n=0){if(t===e)return t;if(n>500)return e;const s=_r(t)&&_r(e);if(!s&&!(Js(t)&&Js(e)))return e;const r=(s?t:Object.keys(t)).length,o=s?e:Object.keys(e),a=o.length,l=s?new Array(a):{};let c=0;for(let u=0;u<a;u++){const d=s?u:o[u],f=t[d],h=e[d];if(f===h){l[d]=f,(s?u<r:Su.call(t,d))&&c++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){l[d]=h;continue}const m=Di(f,h,n+1);l[d]=m,m===f&&c++}return r===a&&c===r?t:l}function Jt(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function _r(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Js(t){if(!Nr(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Nr(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Nr(t){return Object.prototype.toString.call(t)==="[object Object]"}function Eu(t){return new Promise(e=>{qe.setTimeout(e,t)})}function Xs(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Di(t,e):e}function Au(t,e,n=0){const s=[...t,e];return n&&s.length>n?s.slice(1):s}function Cu(t,e,n=0){const s=[e,...t];return n&&s.length>n?s.slice(0,-1):s}var ki=Symbol();function aa(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===ki?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function iE(t,e){return typeof t=="function"?t(...e):!!t}function Du(t,e,n){let s=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),s||(s=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}var ku=class extends rt{#t;#e;#n;constructor(){super(),this.#n=t=>{if(!Tt&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Ti=new ku;function ei(){let t,e;const n=new Promise((i,r)=>{t=i,e=r});n.status="pending",n.catch(()=>{});function s(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{s({status:"fulfilled",value:i}),t(i)},n.reject=i=>{s({status:"rejected",reason:i}),e(i)},n}var Tu=bu;function Ru(){let t=[],e=0,n=a=>{a()},s=a=>{a()},i=Tu;const r=a=>{e?t.push(a):i(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&i(()=>{s(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{r(()=>{a(...l)})},schedule:r,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{s=a},setScheduler:a=>{i=a}}}var K=Ru(),Iu=class extends rt{#t=!0;#e;#n;constructor(){super(),this.#n=t=>{if(!Tt&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#t}},xn=new Iu;function Ou(t){return Math.min(1e3*2**t,3e4)}function la(t){return(t??"online")==="online"?xn.isOnline():!0}var ti=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function ca(t){let e=!1,n=0,s;const i=ei(),r=()=>i.status!=="pending",o=p=>{if(!r()){const g=new ti(p);f(g),t.onCancel?.(g)}},a=()=>{e=!0},l=()=>{e=!1},c=()=>Ti.isFocused()&&(t.networkMode==="always"||xn.isOnline())&&t.canRun(),u=()=>la(t.networkMode)&&t.canRun(),d=p=>{r()||(s?.(),i.resolve(p))},f=p=>{r()||(s?.(),i.reject(p))},h=()=>new Promise(p=>{s=g=>{(r()||c())&&p(g)},t.onPause?.()}).then(()=>{s=void 0,r()||t.onContinue?.()}),m=()=>{if(r())return;let p;const g=n===0?t.initialPromise:void 0;try{p=g??t.fn()}catch(v){p=Promise.reject(v)}Promise.resolve(p).then(d).catch(v=>{if(r())return;const w=t.retry??(Tt?0:3),E=t.retryDelay??Ou,A=typeof E=="function"?E(n,v):E,D=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,v);if(e||!D){f(v);return}n++,t.onFail?.(n,v),Eu(A).then(()=>c()?void 0:h()).then(()=>{e?f(v):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(s?.(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?m():h().then(m),i)}}var ua=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ys(this.gcTime)&&(this.#t=qe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Tt?1/0:300*1e3))}clearGcTimeout(){this.#t&&(qe.clearTimeout(this.#t),this.#t=void 0)}},Mu=class extends ua{#t;#e;#n;#i;#s;#r;#a;constructor(t){super(),this.#a=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#n=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Pr(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#r,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Pr(this.options);e.data!==void 0&&(this.setState(xr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,e){const n=Xs(this.state.data,t,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#s?.promise;return this.#s?.cancel(t),e?e.then(le).catch(le):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>ce(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ki||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Me(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!oa(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#a?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const a=this.observers.find(l=>l.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,s=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const a=aa(this.options,e),c=(()=>{const u={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(u),u})();return this.#a=!1,this.options.persister?this.options.persister(a,c,this):a(c)},o=(()=>{const a={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return s(a),a})();this.options.behavior?.onFetch(o,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#s=ca({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof ti&&a.revert&&this.setState({...this.#e,fetchStatus:"idle"}),n.abort()},onFail:(a,l)=>{this.#o({type:"failed",failureCount:a,error:l})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const a=await this.#s.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof ti){if(a.silent)return this.#s.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#o({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#o(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...da(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...xr(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?s:void 0,s;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),K.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function da(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:la(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function xr(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Pr(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,s=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var _u=class extends rt{constructor(t,e){super(),this.options=e,this.#t=t,this.#o=null,this.#a=ei(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#n=void 0;#i=void 0;#s;#r;#a;#o;#p;#d;#f;#c;#u;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),zr(this.#e,this.options)?this.#g():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ni(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ni(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#S(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,n=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ce(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#e.setOptions(this.options),e._defaulted&&!Jt(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const s=this.hasListeners();s&&Lr(this.#e,n,this.options,e)&&this.#g(),this.updateResult(),s&&(this.#e!==n||ce(this.options.enabled,this.#e)!==ce(e.enabled,this.#e)||Me(this.options.staleTime,this.#e)!==Me(e.staleTime,this.#e))&&this.#m();const i=this.#y();s&&(this.#e!==n||ce(this.options.enabled,this.#e)!==ce(e.enabled,this.#e)||i!==this.#l)&&this.#v(i)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),n=this.createResult(e,t);return xu(this,n)&&(this.#i=n,this.#r=this.options,this.#s=this.#e.state),n}getCurrentResult(){return this.#i}trackResult(t,e){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),e?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){this.#h.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),n=this.#t.getQueryCache().build(this.#t,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#g({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#g(t){this.#E();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(le)),e}#m(){this.#w();const t=Me(this.options.staleTime,this.#e);if(Tt||this.#i.isStale||!Ys(t))return;const n=oa(this.#i.dataUpdatedAt,t)+1;this.#c=qe.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#S(),this.#l=t,!(Tt||ce(this.options.enabled,this.#e)===!1||!Ys(this.#l)||this.#l===0)&&(this.#u=qe.setInterval(()=>{(this.options.refetchIntervalInBackground||Ti.isFocused())&&this.#g()},this.#l))}#b(){this.#m(),this.#v(this.#y())}#w(){this.#c&&(qe.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(qe.clearInterval(this.#u),this.#u=void 0)}createResult(t,e){const n=this.#e,s=this.options,i=this.#i,r=this.#s,o=this.#r,l=t!==n?t.state:this.#n,{state:c}=t;let u={...c},d=!1,f;if(e._optimisticResults){const C=this.hasListeners(),N=!C&&zr(t,e),Q=C&&Lr(t,n,e,s);(N||Q)&&(u={...u,...da(c.data,t.options)}),e._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:p}=u;f=u.data;let g=!1;if(e.placeholderData!==void 0&&f===void 0&&p==="pending"){let C;i?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(C=i.data,g=!0):C=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,C!==void 0&&(p="success",f=Xs(i?.data,C,e),d=!0)}if(e.select&&f!==void 0&&!g)if(i&&f===r?.data&&e.select===this.#p)f=this.#d;else try{this.#p=e.select,f=e.select(f),f=Xs(i?.data,f,e),this.#d=f,this.#o=null}catch(C){this.#o=C}this.#o&&(h=this.#o,f=this.#d,m=Date.now(),p="error");const v=u.fetchStatus==="fetching",w=p==="pending",E=p==="error",A=w&&v,D=f!==void 0,T={status:p,fetchStatus:u.fetchStatus,isPending:w,isSuccess:p==="success",isError:E,isInitialLoading:A,isLoading:A,data:f,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:E&&!D,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:E&&D,isStale:Ri(t,e),refetch:this.refetch,promise:this.#a,isEnabled:ce(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=T.data!==void 0,N=T.status==="error"&&!C,Q=Ve=>{N?Ve.reject(T.error):C&&Ve.resolve(T.data)},pe=()=>{const Ve=this.#a=T.promise=ei();Q(Ve)},z=this.#a;switch(z.status){case"pending":t.queryHash===n.queryHash&&Q(z);break;case"fulfilled":(N||T.data!==z.value)&&pe();break;case"rejected":(!N||T.error!==z.reason)&&pe();break}}return T}updateResult(){const t=this.#i,e=this.createResult(this.#e,this.options);if(this.#s=this.#e.state,this.#r=this.options,this.#s.data!==void 0&&(this.#f=this.#e),Jt(e,t))return;this.#i=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!this.#h.size)return!0;const r=new Set(i??this.#h);return this.options.throwOnError&&r.add("error"),Object.keys(this.#i).some(o=>{const a=o;return this.#i[a]!==t[a]&&r.has(a)})};this.#A({listeners:n()})}#E(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#A(t){K.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Nu(t,e){return ce(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function zr(t,e){return Nu(t,e)||t.state.data!==void 0&&ni(t,e,e.refetchOnMount)}function ni(t,e,n){if(ce(e.enabled,t)!==!1&&Me(e.staleTime,t)!=="static"){const s=typeof n=="function"?n(t):n;return s==="always"||s!==!1&&Ri(t,e)}return!1}function Lr(t,e,n,s){return(t!==e||ce(s.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Ri(t,n)}function Ri(t,e){return ce(e.enabled,t)!==!1&&t.isStaleByTime(Me(e.staleTime,t))}function xu(t,e){return!Jt(t.getCurrentResult(),e)}function jr(t){return{onFetch:(e,n)=>{const s=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],o=e.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let u=!1;const d=m=>{Du(m,()=>e.signal,()=>u=!0)},f=aa(e.options,e.fetchOptions),h=async(m,p,g)=>{if(u)return Promise.reject();if(p==null&&m.pages.length)return Promise.resolve(m);const w=(()=>{const k={client:e.client,queryKey:e.queryKey,pageParam:p,direction:g?"backward":"forward",meta:e.options.meta};return d(k),k})(),E=await f(w),{maxPages:A}=e.options,D=g?Cu:Au;return{pages:D(m.pages,E,A),pageParams:D(m.pageParams,p,A)}};if(i&&r.length){const m=i==="backward",p=m?Pu:Br,g={pages:r,pageParams:o},v=p(s,g);a=await h(g,v,m)}else{const m=t??r.length;do{const p=l===0?o[0]??s.initialPageParam:Br(s,a);if(l>0&&p==null)break;a=await h(a,p),l++}while(l<m)}return a};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=c}}}function Br(t,{pages:e,pageParams:n}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,n[s],n):void 0}function Pu(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var zu=class extends ua{#t;#e;#n;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#e=[],this.state=t.state||fa(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#s({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=ca({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(r,o)=>{this.#s({type:"failed",failureCount:r,error:o})},onPause:()=>{this.#s({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",i=!this.#i.canStart();try{if(s)e();else{this.#s({type:"pending",variables:t,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const o=await this.options.onMutate?.(t,n);o!==this.state.context&&this.#s({type:"pending",context:o,variables:t,isPaused:i})}const r=await this.#i.start();return await this.#n.config.onSuccess?.(r,t,this.state.context,this,n),await this.options.onSuccess?.(r,t,this.state.context,n),await this.#n.config.onSettled?.(r,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(r,null,t,this.state.context,n),this.#s({type:"success",data:r}),r}catch(r){try{await this.#n.config.onError?.(r,t,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onError?.(r,t,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,r,t,this.state.context,n)}catch(o){Promise.reject(o)}throw this.#s({type:"error",error:r}),r}finally{this.#n.runNext(this)}}#s(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),K.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function fa(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Lu=class extends rt{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(t,e,n){const s=new zu({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(s),s}add(t){this.#t.add(t);const e=dn(t);if(typeof e=="string"){const n=this.#e.get(e);n?n.push(t):this.#e.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const e=dn(t);if(typeof e=="string"){const n=this.#e.get(e);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&this.#e.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=dn(t);if(typeof e=="string"){const s=this.#e.get(e)?.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){const e=dn(t);return typeof e=="string"?this.#e.get(e)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){K.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>Mr(e,n))}findAll(t={}){return this.getAll().filter(e=>Mr(t,e))}notify(t){K.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return K.batch(()=>Promise.all(t.map(e=>e.continue().catch(le))))}};function dn(t){return t.options.scope?.id}var rE=class extends rt{#t;#e=void 0;#n;#i;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),Jt(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&et(e.mutationKey)!==et(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#s(),this.#r(t)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#r()}mutate(t,e){return this.#i=e,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#s(){const t=this.#n?.state??fa();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#r(t){K.batch(()=>{if(this.#i&&this.hasListeners()){const e=this.#e.variables,n=this.#e.context,s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,e,n,s)}catch(i){Promise.reject(i)}try{this.#i.onSettled?.(t.data,null,e,n,s)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,e,n,s)}catch(i){Promise.reject(i)}try{this.#i.onSettled?.(void 0,t.error,e,n,s)}catch(i){Promise.reject(i)}}}this.listeners.forEach(e=>{e(this.#e)})})}};function Fr(t,e){const n=new Set(e);return t.filter(s=>!n.has(s))}function ju(t,e,n){const s=t.slice(0);return s[e]=n,s}var oE=class extends rt{#t;#e;#n;#i;#s;#r;#a;#o;#p;#d=[];constructor(t,e,n){super(),this.#t=t,this.#i=n,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(t=>{t.subscribe(e=>{this.#l(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(t=>{t.destroy()})}setQueries(t,e){this.#n=t,this.#i=e,K.batch(()=>{const n=this.#s,s=this.#u(this.#n);s.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));const i=s.map(u=>u.observer),r=i.map(u=>u.getCurrentResult()),o=n.length!==i.length,a=i.some((u,d)=>u!==n[d]),l=o||a,c=l?!0:r.some((u,d)=>{const f=this.#e[d];return!f||!Jt(u,f)});!l&&!c||(l&&(this.#d=s,this.#s=i),this.#e=r,this.hasListeners()&&(l&&(Fr(n,i).forEach(u=>{u.destroy()}),Fr(i,n).forEach(u=>{u.subscribe(d=>{this.#l(u,d)})})),this.#h()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(t=>t.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(t,e){const n=this.#u(t),s=n.map(r=>r.observer.getOptimisticResult(r.defaultedQueryOptions)),i=n.map(r=>r.defaultedQueryOptions.queryHash);return[s,r=>this.#c(r??s,e,i),()=>this.#f(s,n)]}#f(t,e){return e.map((n,s)=>{const i=t[s];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,r=>{e.forEach(o=>{o.observer.trackProp(r)})})})}#c(t,e,n){if(e){const s=this.#p,i=n!==void 0&&s!==void 0&&(s.length!==n.length||n.some((r,o)=>r!==s[o]));return(!this.#r||this.#e!==this.#o||i||e!==this.#a)&&(this.#a=e,this.#o=this.#e,n!==void 0&&(this.#p=n),this.#r=Di(this.#r,e(t))),this.#r}return t}#u(t){const e=new Map;this.#s.forEach(s=>{const i=s.options.queryHash;if(!i)return;const r=e.get(i);r?r.push(s):e.set(i,[s])});const n=[];return t.forEach(s=>{const i=this.#t.defaultQueryOptions(s),o=e.get(i.queryHash)?.shift()??new _u(this.#t,i);n.push({defaultedQueryOptions:i,observer:o})}),n}#l(t,e){const n=this.#s.indexOf(t);n!==-1&&(this.#e=ju(this.#e,n,e),this.#h())}#h(){if(this.hasListeners()){const t=this.#r,e=this.#f(this.#e,this.#d),n=this.#c(e,this.#i?.combine);t!==n&&K.batch(()=>{this.listeners.forEach(s=>{s(this.#e)})})}}},Bu=class extends rt{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,e,n){const s=e.queryKey,i=e.queryHash??Ci(s,e);let r=this.get(i);return r||(r=new Mu({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(r)),r}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){K.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>Or(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>Or(t,n)):e}notify(t){K.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){K.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){K.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},aE=class{#t;#e;#n;#i;#s;#r;#a;#o;constructor(t={}){this.#t=t.queryCache||new Bu,this.#e=t.mutationCache||new Lu,this.#n=t.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=Ti.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=xn.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#t.build(this,e),s=n.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Me(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:e,state:n})=>{const s=n.data;return[e,s]})}setQueryData(t,e,n){const s=this.defaultQueryOptions({queryKey:t}),r=this.#t.get(s.queryHash)?.state.data,o=wu(e,r);if(o!==void 0)return this.#t.build(this,s).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return K.batch(()=>this.#t.findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state}removeQueries(t){const e=this.#t;K.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#t;return K.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},s=K.batch(()=>this.#t.findAll(t).map(i=>i.cancel(n)));return Promise.all(s).then(le).catch(le)}invalidateQueries(t,e={}){return K.batch(()=>(this.#t.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},s=K.batch(()=>this.#t.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let r=i.fetch(void 0,n);return n.throwOnError||(r=r.catch(le)),i.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(s).then(le)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#t.build(this,e);return n.isStaleByTime(Me(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(le).catch(le)}fetchInfiniteQuery(t){return t.behavior=jr(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(le).catch(le)}ensureInfiniteQueryData(t){return t.behavior=jr(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return xn.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#i.set(et(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#i.values()],n={};return e.forEach(s=>{Yt(t,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(t,e){this.#s.set(et(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#s.values()],n={};return e.forEach(s=>{Yt(t,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Ci(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ki&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}};function S(t,e,n){function s(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);const c=o.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){const f=u[d];f in a||(a[f]=c[f].bind(a))}}const i=n?.Parent??Object;class r extends i{}Object.defineProperty(r,"name",{value:t});function o(a){var l;const c=n?.Parent?new r:this;s(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(o,"init",{value:s}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class St extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ha extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const pa={};function xe(t){return pa}function ga(t){const e=Object.values(t).filter(s=>typeof s=="number");return Object.entries(t).filter(([s,i])=>e.indexOf(+s)===-1).map(([s,i])=>i)}function si(t,e){return typeof e=="bigint"?e.toString():e}function Ii(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function Oi(t){return t==null}function Mi(t){const e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Fu(t,e){const n=(t.toString().split(".")[1]||"").length,s=e.toString();let i=(s.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(s)){const l=s.match(/\d?e-(\d?)/);l?.[1]&&(i=Number.parseInt(l[1]))}const r=n>i?n:i,o=Number.parseInt(t.toFixed(r).replace(".","")),a=Number.parseInt(e.toFixed(r).replace(".",""));return o%a/10**r}const $r=Symbol("evaluating");function x(t,e,n){let s;Object.defineProperty(t,e,{get(){if(s!==$r)return s===void 0&&(s=$r,s=n()),s},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function ot(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Be(...t){const e={};for(const n of t){const s=Object.getOwnPropertyDescriptors(n);Object.assign(e,s)}return Object.defineProperties({},e)}function Hr(t){return JSON.stringify(t)}function $u(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ma="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Pn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Hu=Ii(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Rt(t){if(Pn(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const n=e.prototype;return!(Pn(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ya(t){return Rt(t)?{...t}:Array.isArray(t)?[...t]:t}const Uu=new Set(["string","number","symbol"]);function es(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fe(t,e,n){const s=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(s._zod.parent=t),s}function R(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Vu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const Zu={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Wu(t,e){const n=t._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const r=Be(t._zod.def,{get shape(){const o={};for(const a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(o[a]=n.shape[a])}return ot(this,"shape",o),o},checks:[]});return Fe(t,r)}function qu(t,e){const n=t._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=Be(t._zod.def,{get shape(){const o={...t._zod.def.shape};for(const a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete o[a]}return ot(this,"shape",o),o},checks:[]});return Fe(t,r)}function Gu(t,e){if(!Rt(e))throw new Error("Invalid input to extend: expected a plain object");const n=t._zod.def.checks;if(n&&n.length>0){const r=t._zod.def.shape;for(const o in e)if(Object.getOwnPropertyDescriptor(r,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Be(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e};return ot(this,"shape",r),r}});return Fe(t,i)}function Qu(t,e){if(!Rt(e))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Be(t._zod.def,{get shape(){const s={...t._zod.def.shape,...e};return ot(this,"shape",s),s}});return Fe(t,n)}function Ku(t,e){const n=Be(t._zod.def,{get shape(){const s={...t._zod.def.shape,...e._zod.def.shape};return ot(this,"shape",s),s},get catchall(){return e._zod.def.catchall},checks:[]});return Fe(t,n)}function Yu(t,e,n){const i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=Be(e._zod.def,{get shape(){const a=e._zod.def.shape,l={...a};if(n)for(const c in n){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=t?new t({type:"optional",innerType:a[c]}):a[c])}else for(const c in a)l[c]=t?new t({type:"optional",innerType:a[c]}):a[c];return ot(this,"shape",l),l},checks:[]});return Fe(e,o)}function Ju(t,e,n){const s=Be(e._zod.def,{get shape(){const i=e._zod.def.shape,r={...i};if(n)for(const o in n){if(!(o in r))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(r[o]=new t({type:"nonoptional",innerType:i[o]}))}else for(const o in i)r[o]=new t({type:"nonoptional",innerType:i[o]});return ot(this,"shape",r),r}});return Fe(e,s)}function pt(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function gt(t,e){return e.map(n=>{var s;return(s=n).path??(s.path=[]),n.path.unshift(t),n})}function fn(t){return typeof t=="string"?t:t?.message}function Pe(t,e,n){const s={...t,path:t.path??[]};if(!t.message){const i=fn(t.inst?._zod.def?.error?.(t))??fn(e?.error?.(t))??fn(n.customError?.(t))??fn(n.localeError?.(t))??"Invalid input";s.message=i}return delete s.inst,delete s.continue,e?.reportInput||delete s.input,s}function _i(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Xt(...t){const[e,n,s]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:s}:{...e}}const va=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,si,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ba=S("$ZodError",va),wa=S("$ZodError",va,{Parent:Error});function Xu(t,e=n=>n.message){const n={},s=[];for(const i of t.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):s.push(e(i));return{formErrors:s,fieldErrors:n}}function ed(t,e=n=>n.message){const n={_errors:[]},s=i=>{for(const r of i.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(o=>s({issues:o}));else if(r.code==="invalid_key")s({issues:r.issues});else if(r.code==="invalid_element")s({issues:r.issues});else if(r.path.length===0)n._errors.push(e(r));else{let o=n,a=0;for(;a<r.path.length;){const l=r.path[a];a===r.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(r))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return s(t),n}const Ni=t=>(e,n,s,i)=>{const r=s?Object.assign(s,{async:!1}):{async:!1},o=e._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new St;if(o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Pe(l,r,xe())));throw ma(a,i?.callee),a}return o.value},xi=t=>async(e,n,s,i)=>{const r=s?Object.assign(s,{async:!0}):{async:!0};let o=e._zod.run({value:n,issues:[]},r);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Pe(l,r,xe())));throw ma(a,i?.callee),a}return o.value},ts=t=>(e,n,s)=>{const i=s?{...s,async:!1}:{async:!1},r=e._zod.run({value:n,issues:[]},i);if(r instanceof Promise)throw new St;return r.issues.length?{success:!1,error:new(t??ba)(r.issues.map(o=>Pe(o,i,xe())))}:{success:!0,data:r.value}},td=ts(wa),ns=t=>async(e,n,s)=>{const i=s?Object.assign(s,{async:!0}):{async:!0};let r=e._zod.run({value:n,issues:[]},i);return r instanceof Promise&&(r=await r),r.issues.length?{success:!1,error:new t(r.issues.map(o=>Pe(o,i,xe())))}:{success:!0,data:r.value}},nd=ns(wa),sd=t=>(e,n,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Ni(t)(e,n,i)},id=t=>(e,n,s)=>Ni(t)(e,n,s),rd=t=>async(e,n,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return xi(t)(e,n,i)},od=t=>async(e,n,s)=>xi(t)(e,n,s),ad=t=>(e,n,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return ts(t)(e,n,i)},ld=t=>(e,n,s)=>ts(t)(e,n,s),cd=t=>async(e,n,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return ns(t)(e,n,i)},ud=t=>async(e,n,s)=>ns(t)(e,n,s),dd=/^[cC][^\s-]{8,}$/,fd=/^[0-9a-z]+$/,hd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pd=/^[0-9a-vA-V]{20}$/,gd=/^[A-Za-z0-9]{27}$/,md=/^[a-zA-Z0-9_-]{21}$/,yd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vd=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ur=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,bd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Sd(){return new RegExp(wd,"u")}const Ed=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ad=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Cd=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Dd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Sa=/^[A-Za-z0-9_-]*$/,Td=/^\+[1-9]\d{6,14}$/,Ea="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Rd=new RegExp(`^${Ea}$`);function Aa(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Id(t){return new RegExp(`^${Aa(t)}$`)}function Od(t){const e=Aa({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${e}(?:${n.join("|")})`;return new RegExp(`^${Ea}T(?:${s})$`)}const Md=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},_d=/^-?\d+$/,Ca=/^-?\d+(?:\.\d+)?$/,Nd=/^(?:true|false)$/i,xd=/^[^A-Z]*$/,Pd=/^[^a-z]*$/,se=S("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Da={number:"number",bigint:"bigint",object:"date"},ka=S("$ZodCheckLessThan",(t,e)=>{se.init(t,e);const n=Da[typeof e.value];t._zod.onattach.push(s=>{const i=s._zod.bag,r=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<r&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=s=>{(e.inclusive?s.value<=e.value:s.value<e.value)||s.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:s.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ta=S("$ZodCheckGreaterThan",(t,e)=>{se.init(t,e);const n=Da[typeof e.value];t._zod.onattach.push(s=>{const i=s._zod.bag,r=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>r&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=s=>{(e.inclusive?s.value>=e.value:s.value>e.value)||s.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:s.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),zd=S("$ZodCheckMultipleOf",(t,e)=>{se.init(t,e),t._zod.onattach.push(n=>{var s;(s=n._zod.bag).multipleOf??(s.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Fu(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Ld=S("$ZodCheckNumberFormat",(t,e)=>{se.init(t,e),e.format=e.format||"float64";const n=e.format?.includes("int"),s=n?"int":"number",[i,r]=Zu[e.format];t._zod.onattach.push(o=>{const a=o._zod.bag;a.format=e.format,a.minimum=i,a.maximum=r,n&&(a.pattern=_d)}),t._zod.check=o=>{const a=o.value;if(n){if(!Number.isInteger(a)){o.issues.push({expected:s,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:s,inclusive:!0,continue:!e.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:s,inclusive:!0,continue:!e.abort});return}}a<i&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),a>r&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:r,inclusive:!0,inst:t,continue:!e.abort})}}),jd=S("$ZodCheckMaxLength",(t,e)=>{var n;se.init(t,e),(n=t._zod.def).when??(n.when=s=>{const i=s.value;return!Oi(i)&&i.length!==void 0}),t._zod.onattach.push(s=>{const i=s._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(s._zod.bag.maximum=e.maximum)}),t._zod.check=s=>{const i=s.value;if(i.length<=e.maximum)return;const o=_i(i);s.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Bd=S("$ZodCheckMinLength",(t,e)=>{var n;se.init(t,e),(n=t._zod.def).when??(n.when=s=>{const i=s.value;return!Oi(i)&&i.length!==void 0}),t._zod.onattach.push(s=>{const i=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(s._zod.bag.minimum=e.minimum)}),t._zod.check=s=>{const i=s.value;if(i.length>=e.minimum)return;const o=_i(i);s.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Fd=S("$ZodCheckLengthEquals",(t,e)=>{var n;se.init(t,e),(n=t._zod.def).when??(n.when=s=>{const i=s.value;return!Oi(i)&&i.length!==void 0}),t._zod.onattach.push(s=>{const i=s._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=s=>{const i=s.value,r=i.length;if(r===e.length)return;const o=_i(i),a=r>e.length;s.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:s.value,inst:t,continue:!e.abort})}}),ss=S("$ZodCheckStringFormat",(t,e)=>{var n,s;se.init(t,e),t._zod.onattach.push(i=>{const r=i._zod.bag;r.format=e.format,e.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(s=t._zod).check??(s.check=()=>{})}),$d=S("$ZodCheckRegex",(t,e)=>{ss.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Hd=S("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=xd),ss.init(t,e)}),Ud=S("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Pd),ss.init(t,e)}),Vd=S("$ZodCheckIncludes",(t,e)=>{se.init(t,e);const n=es(e.includes),s=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=s,t._zod.onattach.push(i=>{const r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(s)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Zd=S("$ZodCheckStartsWith",(t,e)=>{se.init(t,e);const n=new RegExp(`^${es(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=s=>{s.value.startsWith(e.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:s.value,inst:t,continue:!e.abort})}}),Wd=S("$ZodCheckEndsWith",(t,e)=>{se.init(t,e);const n=new RegExp(`.*${es(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=s=>{s.value.endsWith(e.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:s.value,inst:t,continue:!e.abort})}}),qd=S("$ZodCheckOverwrite",(t,e)=>{se.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class Gd{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const s=e.split(`
|
|
1
|
+
import{l as Ds,D as Qs,y,x as Xn,G as uu,i as du,_ as q,j as fu,d as ue,a as hu,b as pu,c as Ks,E as Mr,N as gu,$ as mu}from"./preact-vendor-CWXGD9A4.js";var rt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yu={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},vu=class{#t=yu;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},qe=new vu;function bu(t){setTimeout(t,0)}var Rt=typeof window>"u"||"Deno"in globalThis;function le(){}function wu(t,e){return typeof t=="function"?t(e):t}function Ys(t){return typeof t=="number"&&t>=0&&t!==1/0}function oa(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Oe(t,e){return typeof t=="function"?t(e):t}function ce(t,e){return typeof t=="function"?t(e):t}function Ir(t,e){const{type:n="all",exact:s,fetchStatus:i,predicate:r,queryKey:o,stale:a}=t;if(o){if(s){if(e.queryHash!==Ci(o,e.options))return!1}else if(!Yt(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||r&&!r(e))}function Or(t,e){const{exact:n,status:s,predicate:i,mutationKey:r}=t;if(r){if(!e.options.mutationKey)return!1;if(n){if(et(e.options.mutationKey)!==et(r))return!1}else if(!Yt(e.options.mutationKey,r))return!1}return!(s&&e.state.status!==s||i&&!i(e))}function Ci(t,e){return(e?.queryKeyHashFn||et)(t)}function et(t){return JSON.stringify(t,(e,n)=>Js(n)?Object.keys(n).sort().reduce((s,i)=>(s[i]=n[i],s),{}):n)}function Yt(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Yt(t[n],e[n])):!1}var Su=Object.prototype.hasOwnProperty;function Di(t,e,n=0){if(t===e)return t;if(n>500)return e;const s=_r(t)&&_r(e);if(!s&&!(Js(t)&&Js(e)))return e;const r=(s?t:Object.keys(t)).length,o=s?e:Object.keys(e),a=o.length,l=s?new Array(a):{};let c=0;for(let u=0;u<a;u++){const d=s?u:o[u],f=t[d],h=e[d];if(f===h){l[d]=f,(s?u<r:Su.call(t,d))&&c++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){l[d]=h;continue}const m=Di(f,h,n+1);l[d]=m,m===f&&c++}return r===a&&c===r?t:l}function Jt(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function _r(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Js(t){if(!Nr(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Nr(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Nr(t){return Object.prototype.toString.call(t)==="[object Object]"}function Eu(t){return new Promise(e=>{qe.setTimeout(e,t)})}function Xs(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Di(t,e):e}function Au(t,e,n=0){const s=[...t,e];return n&&s.length>n?s.slice(1):s}function Cu(t,e,n=0){const s=[e,...t];return n&&s.length>n?s.slice(0,-1):s}var ki=Symbol();function aa(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===ki?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function iS(t,e){return typeof t=="function"?t(...e):!!t}function Du(t,e,n){let s=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),s||(s=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}var ku=class extends rt{#t;#e;#n;constructor(){super(),this.#n=t=>{if(!Rt&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Ri=new ku;function ei(){let t,e;const n=new Promise((i,r)=>{t=i,e=r});n.status="pending",n.catch(()=>{});function s(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{s({status:"fulfilled",value:i}),t(i)},n.reject=i=>{s({status:"rejected",reason:i}),e(i)},n}var Ru=bu;function Tu(){let t=[],e=0,n=a=>{a()},s=a=>{a()},i=Ru;const r=a=>{e?t.push(a):i(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&i(()=>{s(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{r(()=>{a(...l)})},schedule:r,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{s=a},setScheduler:a=>{i=a}}}var K=Tu(),Mu=class extends rt{#t=!0;#e;#n;constructor(){super(),this.#n=t=>{if(!Rt&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#t}},xn=new Mu;function Iu(t){return Math.min(1e3*2**t,3e4)}function la(t){return(t??"online")==="online"?xn.isOnline():!0}var ti=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function ca(t){let e=!1,n=0,s;const i=ei(),r=()=>i.status!=="pending",o=p=>{if(!r()){const g=new ti(p);f(g),t.onCancel?.(g)}},a=()=>{e=!0},l=()=>{e=!1},c=()=>Ri.isFocused()&&(t.networkMode==="always"||xn.isOnline())&&t.canRun(),u=()=>la(t.networkMode)&&t.canRun(),d=p=>{r()||(s?.(),i.resolve(p))},f=p=>{r()||(s?.(),i.reject(p))},h=()=>new Promise(p=>{s=g=>{(r()||c())&&p(g)},t.onPause?.()}).then(()=>{s=void 0,r()||t.onContinue?.()}),m=()=>{if(r())return;let p;const g=n===0?t.initialPromise:void 0;try{p=g??t.fn()}catch(v){p=Promise.reject(v)}Promise.resolve(p).then(d).catch(v=>{if(r())return;const w=t.retry??(Rt?0:3),E=t.retryDelay??Iu,A=typeof E=="function"?E(n,v):E,D=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,v);if(e||!D){f(v);return}n++,t.onFail?.(n,v),Eu(A).then(()=>c()?void 0:h()).then(()=>{e?f(v):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(s?.(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?m():h().then(m),i)}}var ua=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ys(this.gcTime)&&(this.#t=qe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Rt?1/0:300*1e3))}clearGcTimeout(){this.#t&&(qe.clearTimeout(this.#t),this.#t=void 0)}},Ou=class extends ua{#t;#e;#n;#i;#s;#r;#a;constructor(t){super(),this.#a=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#n=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Pr(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#r,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Pr(this.options);e.data!==void 0&&(this.setState(xr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,e){const n=Xs(this.state.data,t,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t,e){this.#o({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#s?.promise;return this.#s?.cancel(t),e?e.then(le).catch(le):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>ce(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ki||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Oe(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!oa(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#a?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const a=this.observers.find(l=>l.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,s=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const a=aa(this.options,e),c=(()=>{const u={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(u),u})();return this.#a=!1,this.options.persister?this.options.persister(a,c,this):a(c)},o=(()=>{const a={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return s(a),a})();this.options.behavior?.onFetch(o,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#s=ca({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof ti&&a.revert&&this.setState({...this.#e,fetchStatus:"idle"}),n.abort()},onFail:(a,l)=>{this.#o({type:"failed",failureCount:a,error:l})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const a=await this.#s.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof ti){if(a.silent)return this.#s.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#o({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#o(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...da(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...xr(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?s:void 0,s;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),K.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function da(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:la(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function xr(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Pr(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,s=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var _u=class extends rt{constructor(t,e){super(),this.options=e,this.#t=t,this.#o=null,this.#a=ei(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#n=void 0;#i=void 0;#s;#r;#a;#o;#p;#d;#f;#c;#u;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),zr(this.#e,this.options)?this.#g():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ni(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ni(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#S(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,n=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ce(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#e.setOptions(this.options),e._defaulted&&!Jt(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const s=this.hasListeners();s&&Lr(this.#e,n,this.options,e)&&this.#g(),this.updateResult(),s&&(this.#e!==n||ce(this.options.enabled,this.#e)!==ce(e.enabled,this.#e)||Oe(this.options.staleTime,this.#e)!==Oe(e.staleTime,this.#e))&&this.#m();const i=this.#y();s&&(this.#e!==n||ce(this.options.enabled,this.#e)!==ce(e.enabled,this.#e)||i!==this.#l)&&this.#v(i)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),n=this.createResult(e,t);return xu(this,n)&&(this.#i=n,this.#r=this.options,this.#s=this.#e.state),n}getCurrentResult(){return this.#i}trackResult(t,e){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),e?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){this.#h.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),n=this.#t.getQueryCache().build(this.#t,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#g({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#g(t){this.#E();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(le)),e}#m(){this.#w();const t=Oe(this.options.staleTime,this.#e);if(Rt||this.#i.isStale||!Ys(t))return;const n=oa(this.#i.dataUpdatedAt,t)+1;this.#c=qe.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#S(),this.#l=t,!(Rt||ce(this.options.enabled,this.#e)===!1||!Ys(this.#l)||this.#l===0)&&(this.#u=qe.setInterval(()=>{(this.options.refetchIntervalInBackground||Ri.isFocused())&&this.#g()},this.#l))}#b(){this.#m(),this.#v(this.#y())}#w(){this.#c&&(qe.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(qe.clearInterval(this.#u),this.#u=void 0)}createResult(t,e){const n=this.#e,s=this.options,i=this.#i,r=this.#s,o=this.#r,l=t!==n?t.state:this.#n,{state:c}=t;let u={...c},d=!1,f;if(e._optimisticResults){const C=this.hasListeners(),N=!C&&zr(t,e),Q=C&&Lr(t,n,e,s);(N||Q)&&(u={...u,...da(c.data,t.options)}),e._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:m,status:p}=u;f=u.data;let g=!1;if(e.placeholderData!==void 0&&f===void 0&&p==="pending"){let C;i?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(C=i.data,g=!0):C=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,C!==void 0&&(p="success",f=Xs(i?.data,C,e),d=!0)}if(e.select&&f!==void 0&&!g)if(i&&f===r?.data&&e.select===this.#p)f=this.#d;else try{this.#p=e.select,f=e.select(f),f=Xs(i?.data,f,e),this.#d=f,this.#o=null}catch(C){this.#o=C}this.#o&&(h=this.#o,f=this.#d,m=Date.now(),p="error");const v=u.fetchStatus==="fetching",w=p==="pending",E=p==="error",A=w&&v,D=f!==void 0,R={status:p,fetchStatus:u.fetchStatus,isPending:w,isSuccess:p==="success",isError:E,isInitialLoading:A,isLoading:A,data:f,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:E&&!D,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:E&&D,isStale:Ti(t,e),refetch:this.refetch,promise:this.#a,isEnabled:ce(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=R.data!==void 0,N=R.status==="error"&&!C,Q=Ve=>{N?Ve.reject(R.error):C&&Ve.resolve(R.data)},pe=()=>{const Ve=this.#a=R.promise=ei();Q(Ve)},z=this.#a;switch(z.status){case"pending":t.queryHash===n.queryHash&&Q(z);break;case"fulfilled":(N||R.data!==z.value)&&pe();break;case"rejected":(!N||R.error!==z.reason)&&pe();break}}return R}updateResult(){const t=this.#i,e=this.createResult(this.#e,this.options);if(this.#s=this.#e.state,this.#r=this.options,this.#s.data!==void 0&&(this.#f=this.#e),Jt(e,t))return;this.#i=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!this.#h.size)return!0;const r=new Set(i??this.#h);return this.options.throwOnError&&r.add("error"),Object.keys(this.#i).some(o=>{const a=o;return this.#i[a]!==t[a]&&r.has(a)})};this.#A({listeners:n()})}#E(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#A(t){K.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Nu(t,e){return ce(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function zr(t,e){return Nu(t,e)||t.state.data!==void 0&&ni(t,e,e.refetchOnMount)}function ni(t,e,n){if(ce(e.enabled,t)!==!1&&Oe(e.staleTime,t)!=="static"){const s=typeof n=="function"?n(t):n;return s==="always"||s!==!1&&Ti(t,e)}return!1}function Lr(t,e,n,s){return(t!==e||ce(s.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Ti(t,n)}function Ti(t,e){return ce(e.enabled,t)!==!1&&t.isStaleByTime(Oe(e.staleTime,t))}function xu(t,e){return!Jt(t.getCurrentResult(),e)}function jr(t){return{onFetch:(e,n)=>{const s=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],o=e.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let u=!1;const d=m=>{Du(m,()=>e.signal,()=>u=!0)},f=aa(e.options,e.fetchOptions),h=async(m,p,g)=>{if(u)return Promise.reject();if(p==null&&m.pages.length)return Promise.resolve(m);const w=(()=>{const k={client:e.client,queryKey:e.queryKey,pageParam:p,direction:g?"backward":"forward",meta:e.options.meta};return d(k),k})(),E=await f(w),{maxPages:A}=e.options,D=g?Cu:Au;return{pages:D(m.pages,E,A),pageParams:D(m.pageParams,p,A)}};if(i&&r.length){const m=i==="backward",p=m?Pu:Br,g={pages:r,pageParams:o},v=p(s,g);a=await h(g,v,m)}else{const m=t??r.length;do{const p=l===0?o[0]??s.initialPageParam:Br(s,a);if(l>0&&p==null)break;a=await h(a,p),l++}while(l<m)}return a};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=c}}}function Br(t,{pages:e,pageParams:n}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,n[s],n):void 0}function Pu(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var zu=class extends ua{#t;#e;#n;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#e=[],this.state=t.state||fa(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#s({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=ca({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(r,o)=>{this.#s({type:"failed",failureCount:r,error:o})},onPause:()=>{this.#s({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",i=!this.#i.canStart();try{if(s)e();else{this.#s({type:"pending",variables:t,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const o=await this.options.onMutate?.(t,n);o!==this.state.context&&this.#s({type:"pending",context:o,variables:t,isPaused:i})}const r=await this.#i.start();return await this.#n.config.onSuccess?.(r,t,this.state.context,this,n),await this.options.onSuccess?.(r,t,this.state.context,n),await this.#n.config.onSettled?.(r,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(r,null,t,this.state.context,n),this.#s({type:"success",data:r}),r}catch(r){try{await this.#n.config.onError?.(r,t,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onError?.(r,t,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,r,t,this.state.context,n)}catch(o){Promise.reject(o)}throw this.#s({type:"error",error:r}),r}finally{this.#n.runNext(this)}}#s(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),K.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function fa(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Lu=class extends rt{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(t,e,n){const s=new zu({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(s),s}add(t){this.#t.add(t);const e=dn(t);if(typeof e=="string"){const n=this.#e.get(e);n?n.push(t):this.#e.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const e=dn(t);if(typeof e=="string"){const n=this.#e.get(e);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&this.#e.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=dn(t);if(typeof e=="string"){const s=this.#e.get(e)?.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){const e=dn(t);return typeof e=="string"?this.#e.get(e)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){K.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>Or(e,n))}findAll(t={}){return this.getAll().filter(e=>Or(t,e))}notify(t){K.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return K.batch(()=>Promise.all(t.map(e=>e.continue().catch(le))))}};function dn(t){return t.options.scope?.id}var rS=class extends rt{#t;#e=void 0;#n;#i;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),Jt(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&et(e.mutationKey)!==et(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#s(),this.#r(t)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#r()}mutate(t,e){return this.#i=e,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#s(){const t=this.#n?.state??fa();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#r(t){K.batch(()=>{if(this.#i&&this.hasListeners()){const e=this.#e.variables,n=this.#e.context,s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,e,n,s)}catch(i){Promise.reject(i)}try{this.#i.onSettled?.(t.data,null,e,n,s)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,e,n,s)}catch(i){Promise.reject(i)}try{this.#i.onSettled?.(void 0,t.error,e,n,s)}catch(i){Promise.reject(i)}}}this.listeners.forEach(e=>{e(this.#e)})})}};function Fr(t,e){const n=new Set(e);return t.filter(s=>!n.has(s))}function ju(t,e,n){const s=t.slice(0);return s[e]=n,s}var oS=class extends rt{#t;#e;#n;#i;#s;#r;#a;#o;#p;#d=[];constructor(t,e,n){super(),this.#t=t,this.#i=n,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(t=>{t.subscribe(e=>{this.#l(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(t=>{t.destroy()})}setQueries(t,e){this.#n=t,this.#i=e,K.batch(()=>{const n=this.#s,s=this.#u(this.#n);s.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));const i=s.map(u=>u.observer),r=i.map(u=>u.getCurrentResult()),o=n.length!==i.length,a=i.some((u,d)=>u!==n[d]),l=o||a,c=l?!0:r.some((u,d)=>{const f=this.#e[d];return!f||!Jt(u,f)});!l&&!c||(l&&(this.#d=s,this.#s=i),this.#e=r,this.hasListeners()&&(l&&(Fr(n,i).forEach(u=>{u.destroy()}),Fr(i,n).forEach(u=>{u.subscribe(d=>{this.#l(u,d)})})),this.#h()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(t=>t.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(t,e){const n=this.#u(t),s=n.map(r=>r.observer.getOptimisticResult(r.defaultedQueryOptions)),i=n.map(r=>r.defaultedQueryOptions.queryHash);return[s,r=>this.#c(r??s,e,i),()=>this.#f(s,n)]}#f(t,e){return e.map((n,s)=>{const i=t[s];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,r=>{e.forEach(o=>{o.observer.trackProp(r)})})})}#c(t,e,n){if(e){const s=this.#p,i=n!==void 0&&s!==void 0&&(s.length!==n.length||n.some((r,o)=>r!==s[o]));return(!this.#r||this.#e!==this.#o||i||e!==this.#a)&&(this.#a=e,this.#o=this.#e,n!==void 0&&(this.#p=n),this.#r=Di(this.#r,e(t))),this.#r}return t}#u(t){const e=new Map;this.#s.forEach(s=>{const i=s.options.queryHash;if(!i)return;const r=e.get(i);r?r.push(s):e.set(i,[s])});const n=[];return t.forEach(s=>{const i=this.#t.defaultQueryOptions(s),o=e.get(i.queryHash)?.shift()??new _u(this.#t,i);n.push({defaultedQueryOptions:i,observer:o})}),n}#l(t,e){const n=this.#s.indexOf(t);n!==-1&&(this.#e=ju(this.#e,n,e),this.#h())}#h(){if(this.hasListeners()){const t=this.#r,e=this.#f(this.#e,this.#d),n=this.#c(e,this.#i?.combine);t!==n&&K.batch(()=>{this.listeners.forEach(s=>{s(this.#e)})})}}},Bu=class extends rt{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,e,n){const s=e.queryKey,i=e.queryHash??Ci(s,e);let r=this.get(i);return r||(r=new Ou({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(r)),r}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){K.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>Ir(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>Ir(t,n)):e}notify(t){K.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){K.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){K.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},aS=class{#t;#e;#n;#i;#s;#r;#a;#o;constructor(t={}){this.#t=t.queryCache||new Bu,this.#e=t.mutationCache||new Lu,this.#n=t.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=Ri.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=xn.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#t.build(this,e),s=n.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Oe(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:e,state:n})=>{const s=n.data;return[e,s]})}setQueryData(t,e,n){const s=this.defaultQueryOptions({queryKey:t}),r=this.#t.get(s.queryHash)?.state.data,o=wu(e,r);if(o!==void 0)return this.#t.build(this,s).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return K.batch(()=>this.#t.findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state}removeQueries(t){const e=this.#t;K.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#t;return K.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},s=K.batch(()=>this.#t.findAll(t).map(i=>i.cancel(n)));return Promise.all(s).then(le).catch(le)}invalidateQueries(t,e={}){return K.batch(()=>(this.#t.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},s=K.batch(()=>this.#t.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let r=i.fetch(void 0,n);return n.throwOnError||(r=r.catch(le)),i.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(s).then(le)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#t.build(this,e);return n.isStaleByTime(Oe(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(le).catch(le)}fetchInfiniteQuery(t){return t.behavior=jr(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(le).catch(le)}ensureInfiniteQueryData(t){return t.behavior=jr(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return xn.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#i.set(et(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#i.values()],n={};return e.forEach(s=>{Yt(t,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(t,e){this.#s.set(et(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#s.values()],n={};return e.forEach(s=>{Yt(t,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Ci(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ki&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}};function S(t,e,n){function s(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);const c=o.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){const f=u[d];f in a||(a[f]=c[f].bind(a))}}const i=n?.Parent??Object;class r extends i{}Object.defineProperty(r,"name",{value:t});function o(a){var l;const c=n?.Parent?new r:this;s(c,a),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(o,"init",{value:s}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class St extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ha extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const pa={};function xe(t){return pa}function ga(t){const e=Object.values(t).filter(s=>typeof s=="number");return Object.entries(t).filter(([s,i])=>e.indexOf(+s)===-1).map(([s,i])=>i)}function si(t,e){return typeof e=="bigint"?e.toString():e}function Mi(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function Ii(t){return t==null}function Oi(t){const e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Fu(t,e){const n=(t.toString().split(".")[1]||"").length,s=e.toString();let i=(s.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(s)){const l=s.match(/\d?e-(\d?)/);l?.[1]&&(i=Number.parseInt(l[1]))}const r=n>i?n:i,o=Number.parseInt(t.toFixed(r).replace(".","")),a=Number.parseInt(e.toFixed(r).replace(".",""));return o%a/10**r}const Hr=Symbol("evaluating");function x(t,e,n){let s;Object.defineProperty(t,e,{get(){if(s!==Hr)return s===void 0&&(s=Hr,s=n()),s},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function ot(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Be(...t){const e={};for(const n of t){const s=Object.getOwnPropertyDescriptors(n);Object.assign(e,s)}return Object.defineProperties({},e)}function $r(t){return JSON.stringify(t)}function Hu(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ma="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Pn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const $u=Mi(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Tt(t){if(Pn(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const n=e.prototype;return!(Pn(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ya(t){return Tt(t)?{...t}:Array.isArray(t)?[...t]:t}const Uu=new Set(["string","number","symbol"]);function es(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fe(t,e,n){const s=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(s._zod.parent=t),s}function T(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Vu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const Zu={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Wu(t,e){const n=t._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const r=Be(t._zod.def,{get shape(){const o={};for(const a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(o[a]=n.shape[a])}return ot(this,"shape",o),o},checks:[]});return Fe(t,r)}function qu(t,e){const n=t._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=Be(t._zod.def,{get shape(){const o={...t._zod.def.shape};for(const a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete o[a]}return ot(this,"shape",o),o},checks:[]});return Fe(t,r)}function Gu(t,e){if(!Tt(e))throw new Error("Invalid input to extend: expected a plain object");const n=t._zod.def.checks;if(n&&n.length>0){const r=t._zod.def.shape;for(const o in e)if(Object.getOwnPropertyDescriptor(r,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Be(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e};return ot(this,"shape",r),r}});return Fe(t,i)}function Qu(t,e){if(!Tt(e))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Be(t._zod.def,{get shape(){const s={...t._zod.def.shape,...e};return ot(this,"shape",s),s}});return Fe(t,n)}function Ku(t,e){const n=Be(t._zod.def,{get shape(){const s={...t._zod.def.shape,...e._zod.def.shape};return ot(this,"shape",s),s},get catchall(){return e._zod.def.catchall},checks:[]});return Fe(t,n)}function Yu(t,e,n){const i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=Be(e._zod.def,{get shape(){const a=e._zod.def.shape,l={...a};if(n)for(const c in n){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=t?new t({type:"optional",innerType:a[c]}):a[c])}else for(const c in a)l[c]=t?new t({type:"optional",innerType:a[c]}):a[c];return ot(this,"shape",l),l},checks:[]});return Fe(e,o)}function Ju(t,e,n){const s=Be(e._zod.def,{get shape(){const i=e._zod.def.shape,r={...i};if(n)for(const o in n){if(!(o in r))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(r[o]=new t({type:"nonoptional",innerType:i[o]}))}else for(const o in i)r[o]=new t({type:"nonoptional",innerType:i[o]});return ot(this,"shape",r),r}});return Fe(e,s)}function pt(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function gt(t,e){return e.map(n=>{var s;return(s=n).path??(s.path=[]),n.path.unshift(t),n})}function fn(t){return typeof t=="string"?t:t?.message}function Pe(t,e,n){const s={...t,path:t.path??[]};if(!t.message){const i=fn(t.inst?._zod.def?.error?.(t))??fn(e?.error?.(t))??fn(n.customError?.(t))??fn(n.localeError?.(t))??"Invalid input";s.message=i}return delete s.inst,delete s.continue,e?.reportInput||delete s.input,s}function _i(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Xt(...t){const[e,n,s]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:s}:{...e}}const va=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,si,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ba=S("$ZodError",va),wa=S("$ZodError",va,{Parent:Error});function Xu(t,e=n=>n.message){const n={},s=[];for(const i of t.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):s.push(e(i));return{formErrors:s,fieldErrors:n}}function ed(t,e=n=>n.message){const n={_errors:[]},s=i=>{for(const r of i.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(o=>s({issues:o}));else if(r.code==="invalid_key")s({issues:r.issues});else if(r.code==="invalid_element")s({issues:r.issues});else if(r.path.length===0)n._errors.push(e(r));else{let o=n,a=0;for(;a<r.path.length;){const l=r.path[a];a===r.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(r))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return s(t),n}const Ni=t=>(e,n,s,i)=>{const r=s?Object.assign(s,{async:!1}):{async:!1},o=e._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new St;if(o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Pe(l,r,xe())));throw ma(a,i?.callee),a}return o.value},xi=t=>async(e,n,s,i)=>{const r=s?Object.assign(s,{async:!0}):{async:!0};let o=e._zod.run({value:n,issues:[]},r);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(i?.Err??t)(o.issues.map(l=>Pe(l,r,xe())));throw ma(a,i?.callee),a}return o.value},ts=t=>(e,n,s)=>{const i=s?{...s,async:!1}:{async:!1},r=e._zod.run({value:n,issues:[]},i);if(r instanceof Promise)throw new St;return r.issues.length?{success:!1,error:new(t??ba)(r.issues.map(o=>Pe(o,i,xe())))}:{success:!0,data:r.value}},td=ts(wa),ns=t=>async(e,n,s)=>{const i=s?Object.assign(s,{async:!0}):{async:!0};let r=e._zod.run({value:n,issues:[]},i);return r instanceof Promise&&(r=await r),r.issues.length?{success:!1,error:new t(r.issues.map(o=>Pe(o,i,xe())))}:{success:!0,data:r.value}},nd=ns(wa),sd=t=>(e,n,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Ni(t)(e,n,i)},id=t=>(e,n,s)=>Ni(t)(e,n,s),rd=t=>async(e,n,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return xi(t)(e,n,i)},od=t=>async(e,n,s)=>xi(t)(e,n,s),ad=t=>(e,n,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return ts(t)(e,n,i)},ld=t=>(e,n,s)=>ts(t)(e,n,s),cd=t=>async(e,n,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return ns(t)(e,n,i)},ud=t=>async(e,n,s)=>ns(t)(e,n,s),dd=/^[cC][^\s-]{8,}$/,fd=/^[0-9a-z]+$/,hd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pd=/^[0-9a-vA-V]{20}$/,gd=/^[A-Za-z0-9]{27}$/,md=/^[a-zA-Z0-9_-]{21}$/,yd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vd=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ur=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,bd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Sd(){return new RegExp(wd,"u")}const Ed=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ad=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Cd=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Dd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Sa=/^[A-Za-z0-9_-]*$/,Rd=/^\+[1-9]\d{6,14}$/,Ea="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Td=new RegExp(`^${Ea}$`);function Aa(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Md(t){return new RegExp(`^${Aa(t)}$`)}function Id(t){const e=Aa({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${e}(?:${n.join("|")})`;return new RegExp(`^${Ea}T(?:${s})$`)}const Od=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},_d=/^-?\d+$/,Ca=/^-?\d+(?:\.\d+)?$/,Nd=/^(?:true|false)$/i,xd=/^[^A-Z]*$/,Pd=/^[^a-z]*$/,se=S("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Da={number:"number",bigint:"bigint",object:"date"},ka=S("$ZodCheckLessThan",(t,e)=>{se.init(t,e);const n=Da[typeof e.value];t._zod.onattach.push(s=>{const i=s._zod.bag,r=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<r&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=s=>{(e.inclusive?s.value<=e.value:s.value<e.value)||s.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:s.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ra=S("$ZodCheckGreaterThan",(t,e)=>{se.init(t,e);const n=Da[typeof e.value];t._zod.onattach.push(s=>{const i=s._zod.bag,r=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>r&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=s=>{(e.inclusive?s.value>=e.value:s.value>e.value)||s.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:s.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),zd=S("$ZodCheckMultipleOf",(t,e)=>{se.init(t,e),t._zod.onattach.push(n=>{var s;(s=n._zod.bag).multipleOf??(s.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Fu(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Ld=S("$ZodCheckNumberFormat",(t,e)=>{se.init(t,e),e.format=e.format||"float64";const n=e.format?.includes("int"),s=n?"int":"number",[i,r]=Zu[e.format];t._zod.onattach.push(o=>{const a=o._zod.bag;a.format=e.format,a.minimum=i,a.maximum=r,n&&(a.pattern=_d)}),t._zod.check=o=>{const a=o.value;if(n){if(!Number.isInteger(a)){o.issues.push({expected:s,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:s,inclusive:!0,continue:!e.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:s,inclusive:!0,continue:!e.abort});return}}a<i&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),a>r&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:r,inclusive:!0,inst:t,continue:!e.abort})}}),jd=S("$ZodCheckMaxLength",(t,e)=>{var n;se.init(t,e),(n=t._zod.def).when??(n.when=s=>{const i=s.value;return!Ii(i)&&i.length!==void 0}),t._zod.onattach.push(s=>{const i=s._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(s._zod.bag.maximum=e.maximum)}),t._zod.check=s=>{const i=s.value;if(i.length<=e.maximum)return;const o=_i(i);s.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Bd=S("$ZodCheckMinLength",(t,e)=>{var n;se.init(t,e),(n=t._zod.def).when??(n.when=s=>{const i=s.value;return!Ii(i)&&i.length!==void 0}),t._zod.onattach.push(s=>{const i=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(s._zod.bag.minimum=e.minimum)}),t._zod.check=s=>{const i=s.value;if(i.length>=e.minimum)return;const o=_i(i);s.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Fd=S("$ZodCheckLengthEquals",(t,e)=>{var n;se.init(t,e),(n=t._zod.def).when??(n.when=s=>{const i=s.value;return!Ii(i)&&i.length!==void 0}),t._zod.onattach.push(s=>{const i=s._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=s=>{const i=s.value,r=i.length;if(r===e.length)return;const o=_i(i),a=r>e.length;s.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:s.value,inst:t,continue:!e.abort})}}),ss=S("$ZodCheckStringFormat",(t,e)=>{var n,s;se.init(t,e),t._zod.onattach.push(i=>{const r=i._zod.bag;r.format=e.format,e.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(s=t._zod).check??(s.check=()=>{})}),Hd=S("$ZodCheckRegex",(t,e)=>{ss.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),$d=S("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=xd),ss.init(t,e)}),Ud=S("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Pd),ss.init(t,e)}),Vd=S("$ZodCheckIncludes",(t,e)=>{se.init(t,e);const n=es(e.includes),s=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=s,t._zod.onattach.push(i=>{const r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(s)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Zd=S("$ZodCheckStartsWith",(t,e)=>{se.init(t,e);const n=new RegExp(`^${es(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=s=>{s.value.startsWith(e.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:s.value,inst:t,continue:!e.abort})}}),Wd=S("$ZodCheckEndsWith",(t,e)=>{se.init(t,e);const n=new RegExp(`.*${es(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=s=>{s.value.endsWith(e.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:s.value,inst:t,continue:!e.abort})}}),qd=S("$ZodCheckOverwrite",(t,e)=>{se.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class Gd{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const s=e.split(`
|
|
2
2
|
`).filter(o=>o),i=Math.min(...s.map(o=>o.length-o.trimStart().length)),r=s.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(const o of r)this.content.push(o)}compile(){const e=Function,n=this?.args,i=[...(this?.content??[""]).map(r=>` ${r}`)];return new e(...n,i.join(`
|
|
3
|
-
`))}}const Qd={major:4,minor:3,patch:6},V=S("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Qd;const s=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&s.unshift(t);for(const i of s)for(const r of i._zod.onattach)r(t);if(s.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(o,a,l)=>{let c=pt(o),u;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(c)continue;const f=o.issues.length,h=d._zod.check(o);if(h instanceof Promise&&l?.async===!1)throw new St;if(u||h instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await h,o.issues.length!==f&&(c||(c=pt(o,f)))});else{if(o.issues.length===f)continue;c||(c=pt(o,f))}}return u?u.then(()=>o):o},r=(o,a,l)=>{if(pt(o))return o.aborted=!0,o;const c=i(a,s,l);if(c instanceof Promise){if(l.async===!1)throw new St;return c.then(u=>t._zod.parse(u,l))}return t._zod.parse(c,l)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){const c=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>r(u,o,a)):r(c,o,a)}const l=t._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new St;return l.then(c=>i(c,s,a))}return i(l,s,a)}}x(t,"~standard",()=>({validate:i=>{try{const r=td(t,i);return r.success?{value:r.data}:{issues:r.error?.issues}}catch{return nd(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Pi=S("$ZodString",(t,e)=>{V.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??
|
|
3
|
+
`))}}const Qd={major:4,minor:3,patch:6},V=S("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Qd;const s=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&s.unshift(t);for(const i of s)for(const r of i._zod.onattach)r(t);if(s.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(o,a,l)=>{let c=pt(o),u;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(c)continue;const f=o.issues.length,h=d._zod.check(o);if(h instanceof Promise&&l?.async===!1)throw new St;if(u||h instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await h,o.issues.length!==f&&(c||(c=pt(o,f)))});else{if(o.issues.length===f)continue;c||(c=pt(o,f))}}return u?u.then(()=>o):o},r=(o,a,l)=>{if(pt(o))return o.aborted=!0,o;const c=i(a,s,l);if(c instanceof Promise){if(l.async===!1)throw new St;return c.then(u=>t._zod.parse(u,l))}return t._zod.parse(c,l)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){const c=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(u=>r(u,o,a)):r(c,o,a)}const l=t._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new St;return l.then(c=>i(c,s,a))}return i(l,s,a)}}x(t,"~standard",()=>({validate:i=>{try{const r=td(t,i);return r.success?{value:r.data}:{issues:r.error?.issues}}catch{return nd(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Pi=S("$ZodString",(t,e)=>{V.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Od(t._zod.bag),t._zod.parse=(n,s)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),F=S("$ZodStringFormat",(t,e)=>{ss.init(t,e),Pi.init(t,e)}),Kd=S("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=vd),F.init(t,e)}),Yd=S("$ZodUUID",(t,e)=>{if(e.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(s===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Ur(s))}else e.pattern??(e.pattern=Ur());F.init(t,e)}),Jd=S("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=bd),F.init(t,e)}),Xd=S("$ZodURL",(t,e)=>{F.init(t,e),t._zod.check=n=>{try{const s=n.value.trim(),i=new URL(s);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=i.href:n.value=s;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),ef=S("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Sd()),F.init(t,e)}),tf=S("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=md),F.init(t,e)}),nf=S("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=dd),F.init(t,e)}),sf=S("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=fd),F.init(t,e)}),rf=S("$ZodULID",(t,e)=>{e.pattern??(e.pattern=hd),F.init(t,e)}),of=S("$ZodXID",(t,e)=>{e.pattern??(e.pattern=pd),F.init(t,e)}),af=S("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=gd),F.init(t,e)}),lf=S("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Id(e)),F.init(t,e)}),cf=S("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Td),F.init(t,e)}),uf=S("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Md(e)),F.init(t,e)}),df=S("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=yd),F.init(t,e)}),ff=S("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Ed),F.init(t,e),t._zod.bag.format="ipv4"}),hf=S("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Ad),F.init(t,e),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),pf=S("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Cd),F.init(t,e)}),gf=S("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Dd),F.init(t,e),t._zod.check=n=>{const s=n.value.split("/");try{if(s.length!==2)throw new Error;const[i,r]=s;if(!r)throw new Error;const o=Number(r);if(`${o}`!==r)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function Ta(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const mf=S("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=kd),F.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{Ta(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function yf(t){if(!Sa.test(t))return!1;const e=t.replace(/[-_]/g,s=>s==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Ta(n)}const vf=S("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Sa),F.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{yf(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),bf=S("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Rd),F.init(t,e)});function wf(t,e=null){try{const n=t.split(".");if(n.length!==3)return!1;const[s]=n;if(!s)return!1;const i=JSON.parse(atob(s));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const Sf=S("$ZodJWT",(t,e)=>{F.init(t,e),t._zod.check=n=>{wf(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),Ma=S("$ZodNumber",(t,e)=>{V.init(t,e),t._zod.pattern=t._zod.bag.pattern??Ca,t._zod.parse=(n,s)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const r=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...r?{received:r}:{}}),n}}),Ef=S("$ZodNumberFormat",(t,e)=>{Ld.init(t,e),Ma.init(t,e)}),Af=S("$ZodBoolean",(t,e)=>{V.init(t,e),t._zod.pattern=Nd,t._zod.parse=(n,s)=>{if(e.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),n}}),Cf=S("$ZodAny",(t,e)=>{V.init(t,e),t._zod.parse=n=>n}),Df=S("$ZodUnknown",(t,e)=>{V.init(t,e),t._zod.parse=n=>n}),kf=S("$ZodNever",(t,e)=>{V.init(t,e),t._zod.parse=(n,s)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)});function Vr(t,e,n){t.issues.length&&e.issues.push(...gt(n,t.issues)),e.value[n]=t.value}const Rf=S("$ZodArray",(t,e)=>{V.init(t,e),t._zod.parse=(n,s)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),n;n.value=Array(i.length);const r=[];for(let o=0;o<i.length;o++){const a=i[o],l=e.element._zod.run({value:a,issues:[]},s);l instanceof Promise?r.push(l.then(c=>Vr(c,n,o))):Vr(l,n,o)}return r.length?Promise.all(r).then(()=>n):n}});function zn(t,e,n,s,i){if(t.issues.length){if(i&&!(n in s))return;e.issues.push(...gt(n,t.issues))}t.value===void 0?n in s&&(e.value[n]=void 0):e.value[n]=t.value}function Ia(t){const e=Object.keys(t.shape);for(const s of e)if(!t.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);const n=Vu(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function Oa(t,e,n,s,i,r){const o=[],a=i.keySet,l=i.catchall._zod,c=l.def.type,u=l.optout==="optional";for(const d in e){if(a.has(d))continue;if(c==="never"){o.push(d);continue}const f=l.run({value:e[d],issues:[]},s);f instanceof Promise?t.push(f.then(h=>zn(h,n,d,e,u))):zn(f,n,d,e,u)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:r}),t.length?Promise.all(t).then(()=>n):n}const Tf=S("$ZodObject",(t,e)=>{if(V.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){const a=e.shape;Object.defineProperty(e,"shape",{get:()=>{const l={...a};return Object.defineProperty(e,"shape",{value:l}),l}})}const s=Mi(()=>Ia(e));x(t._zod,"propValues",()=>{const a=e.shape,l={};for(const c in a){const u=a[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(const d of u.values)l[c].add(d)}}return l});const i=Pn,r=e.catchall;let o;t._zod.parse=(a,l)=>{o??(o=s.value);const c=a.value;if(!i(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),a;a.value={};const u=[],d=o.shape;for(const f of o.keys){const h=d[f],m=h._zod.optout==="optional",p=h._zod.run({value:c[f],issues:[]},l);p instanceof Promise?u.push(p.then(g=>zn(g,a,f,c,m))):zn(p,a,f,c,m)}return r?Oa(u,c,a,l,s.value,t):u.length?Promise.all(u).then(()=>a):a}}),Mf=S("$ZodObjectJIT",(t,e)=>{Tf.init(t,e);const n=t._zod.parse,s=Mi(()=>Ia(e)),i=f=>{const h=new Gd(["shape","payload","ctx"]),m=s.value,p=E=>{const A=$r(E);return`shape[${A}]._zod.run({ value: input[${A}], issues: [] }, ctx)`};h.write("const input = payload.value;");const g=Object.create(null);let v=0;for(const E of m.keys)g[E]=`key_${v++}`;h.write("const newResult = {};");for(const E of m.keys){const A=g[E],D=$r(E),R=f[E]?._zod?.optout==="optional";h.write(`const ${A} = ${p(E)};`),R?h.write(`
|
|
4
4
|
if (${A}.issues.length) {
|
|
5
5
|
if (${D} in input) {
|
|
6
6
|
payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
|
|
@@ -34,82 +34,82 @@ import{l as Ds,D as Qs,y,x as Xn,G as uu,i as du,_ as q,j as fu,d as ue,a as hu,
|
|
|
34
34
|
newResult[${D}] = ${A}.value;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
`)}h.write("payload.value = newResult;"),h.write("return payload;");const w=h.compile();return(E,A)=>w(f,E,A)};let r;const o=Pn,a=!pa.jitless,c=a&&Hu.value,u=e.catchall;let d;t._zod.parse=(f,h)=>{d??(d=s.value);const m=f.value;return o(m)?a&&c&&h?.async===!1&&h.jitless!==!0?(r||(r=i(e.shape)),f=r(f,h),u?Ma([],m,f,h,d,t):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),f)}});function Zr(t,e,n,s){for(const r of t)if(r.issues.length===0)return e.value=r.value,e;const i=t.filter(r=>!pt(r));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(r=>r.issues.map(o=>Pe(o,s,xe())))}),e)}const Of=S("$ZodUnion",(t,e)=>{V.init(t,e),x(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),x(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),x(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),x(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){const i=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>Mi(r.source)).join("|")})$`)}});const n=e.options.length===1,s=e.options[0]._zod.run;t._zod.parse=(i,r)=>{if(n)return s(i,r);let o=!1;const a=[];for(const l of e.options){const c=l._zod.run({value:i.value,issues:[]},r);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(l=>Zr(l,i,t,r)):Zr(a,i,t,r)}}),Mf=S("$ZodIntersection",(t,e)=>{V.init(t,e),t._zod.parse=(n,s)=>{const i=n.value,r=e.left._zod.run({value:i,issues:[]},s),o=e.right._zod.run({value:i,issues:[]},s);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then(([l,c])=>Wr(n,l,c)):Wr(n,r,o)}});function ii(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Rt(t)&&Rt(e)){const n=Object.keys(e),s=Object.keys(t).filter(r=>n.indexOf(r)!==-1),i={...t,...e};for(const r of s){const o=ii(t[r],e[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};i[r]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let s=0;s<t.length;s++){const i=t[s],r=e[s],o=ii(i,r);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Wr(t,e,n){const s=new Map;let i;for(const a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)s.has(l)||s.set(l,{}),s.get(l).l=!0}else t.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)s.has(l)||s.set(l,{}),s.get(l).r=!0;else t.issues.push(a);const r=[...s].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(r.length&&i&&t.issues.push({...i,keys:r}),pt(t))return t;const o=ii(e.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}const _f=S("$ZodRecord",(t,e)=>{V.init(t,e),t._zod.parse=(n,s)=>{const i=n.value;if(!Rt(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),n;const r=[],o=e.keyType._zod.values;if(o){n.value={};const a=new Set;for(const c of o)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);const u=e.valueType._zod.run({value:i[c],issues:[]},s);u instanceof Promise?r.push(u.then(d=>{d.issues.length&&n.issues.push(...gt(c,d.issues)),n.value[c]=d.value})):(u.issues.length&&n.issues.push(...gt(c,u.issues)),n.value[c]=u.value)}let l;for(const c in i)a.has(c)||(l=l??[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let l=e.keyType._zod.run({value:a,issues:[]},s);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Ca.test(a)&&l.issues.length){const d=e.keyType._zod.run({value:Number(a),issues:[]},s);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){e.mode==="loose"?n.value[a]=i[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>Pe(d,s,xe())),input:a,path:[a],inst:t});continue}const u=e.valueType._zod.run({value:i[a],issues:[]},s);u instanceof Promise?r.push(u.then(d=>{d.issues.length&&n.issues.push(...gt(a,d.issues)),n.value[l.value]=d.value})):(u.issues.length&&n.issues.push(...gt(a,u.issues)),n.value[l.value]=u.value)}}return r.length?Promise.all(r).then(()=>n):n}}),Nf=S("$ZodEnum",(t,e)=>{V.init(t,e);const n=ga(e.entries),s=new Set(n);t._zod.values=s,t._zod.pattern=new RegExp(`^(${n.filter(i=>Uu.has(typeof i)).map(i=>typeof i=="string"?es(i):i.toString()).join("|")})$`),t._zod.parse=(i,r)=>{const o=i.value;return s.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:t}),i}}),xf=S("$ZodTransform",(t,e)=>{V.init(t,e),t._zod.parse=(n,s)=>{if(s.direction==="backward")throw new ha(t.constructor.name);const i=e.transform(n.value,n);if(s.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(n.value=o,n));if(i instanceof Promise)throw new St;return n.value=i,n}});function qr(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const _a=S("$ZodOptional",(t,e)=>{V.init(t,e),t._zod.optin="optional",t._zod.optout="optional",x(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),x(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${Mi(n.source)})?$`):void 0}),t._zod.parse=(n,s)=>{if(e.innerType._zod.optin==="optional"){const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(r=>qr(r,n.value)):qr(i,n.value)}return n.value===void 0?n:e.innerType._zod.run(n,s)}}),Pf=S("$ZodExactOptional",(t,e)=>{_a.init(t,e),x(t._zod,"values",()=>e.innerType._zod.values),x(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(n,s)=>e.innerType._zod.run(n,s)}),zf=S("$ZodNullable",(t,e)=>{V.init(t,e),x(t._zod,"optin",()=>e.innerType._zod.optin),x(t._zod,"optout",()=>e.innerType._zod.optout),x(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${Mi(n.source)}|null)$`):void 0}),x(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,s)=>n.value===null?n:e.innerType._zod.run(n,s)}),Lf=S("$ZodDefault",(t,e)=>{V.init(t,e),t._zod.optin="optional",x(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,s)=>{if(s.direction==="backward")return e.innerType._zod.run(n,s);if(n.value===void 0)return n.value=e.defaultValue,n;const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(r=>Gr(r,e)):Gr(i,e)}});function Gr(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const jf=S("$ZodPrefault",(t,e)=>{V.init(t,e),t._zod.optin="optional",x(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,s)=>(s.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,s))}),Bf=S("$ZodNonOptional",(t,e)=>{V.init(t,e),x(t._zod,"values",()=>{const n=e.innerType._zod.values;return n?new Set([...n].filter(s=>s!==void 0)):void 0}),t._zod.parse=(n,s)=>{const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(r=>Qr(r,t)):Qr(i,t)}});function Qr(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const Ff=S("$ZodCatch",(t,e)=>{V.init(t,e),x(t._zod,"optin",()=>e.innerType._zod.optin),x(t._zod,"optout",()=>e.innerType._zod.optout),x(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,s)=>{if(s.direction==="backward")return e.innerType._zod.run(n,s);const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(r=>(n.value=r.value,r.issues.length&&(n.value=e.catchValue({...n,error:{issues:r.issues.map(o=>Pe(o,s,xe()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(r=>Pe(r,s,xe()))},input:n.value}),n.issues=[]),n)}}),$f=S("$ZodPipe",(t,e)=>{V.init(t,e),x(t._zod,"values",()=>e.in._zod.values),x(t._zod,"optin",()=>e.in._zod.optin),x(t._zod,"optout",()=>e.out._zod.optout),x(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,s)=>{if(s.direction==="backward"){const r=e.out._zod.run(n,s);return r instanceof Promise?r.then(o=>hn(o,e.in,s)):hn(r,e.in,s)}const i=e.in._zod.run(n,s);return i instanceof Promise?i.then(r=>hn(r,e.out,s)):hn(i,e.out,s)}});function hn(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},n)}const Hf=S("$ZodReadonly",(t,e)=>{V.init(t,e),x(t._zod,"propValues",()=>e.innerType._zod.propValues),x(t._zod,"values",()=>e.innerType._zod.values),x(t._zod,"optin",()=>e.innerType?._zod?.optin),x(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(n,s)=>{if(s.direction==="backward")return e.innerType._zod.run(n,s);const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(Kr):Kr(i)}});function Kr(t){return t.value=Object.freeze(t.value),t}const Uf=S("$ZodCustom",(t,e)=>{se.init(t,e),V.init(t,e),t._zod.parse=(n,s)=>n,t._zod.check=n=>{const s=n.value,i=e.fn(s);if(i instanceof Promise)return i.then(r=>Yr(r,n,s,t));Yr(i,n,s,t)}});function Yr(t,e,n,s){if(!t){const i={code:"custom",input:n,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(i.params=s._zod.def.params),e.issues.push(Xt(i))}}var Jr;class Vf{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){const s=n[0];return this._map.set(e,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){const n=e._zod.parent;if(n){const s={...this.get(n)??{}};delete s.id;const i={...s,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Zf(){return new Vf}(Jr=globalThis).__zod_globalRegistry??(Jr.__zod_globalRegistry=Zf());const Zt=globalThis.__zod_globalRegistry;function Wf(t,e){return new t({type:"string",...R(e)})}function qf(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...R(e)})}function Xr(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...R(e)})}function Gf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...R(e)})}function Qf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...R(e)})}function Kf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...R(e)})}function Yf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...R(e)})}function Jf(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...R(e)})}function Xf(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...R(e)})}function eh(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...R(e)})}function th(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...R(e)})}function nh(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...R(e)})}function sh(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...R(e)})}function ih(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...R(e)})}function rh(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...R(e)})}function oh(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...R(e)})}function ah(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...R(e)})}function lh(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...R(e)})}function ch(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...R(e)})}function uh(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...R(e)})}function dh(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...R(e)})}function fh(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...R(e)})}function hh(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...R(e)})}function ph(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...R(e)})}function gh(t,e){return new t({type:"string",format:"date",check:"string_format",...R(e)})}function mh(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...R(e)})}function yh(t,e){return new t({type:"string",format:"duration",check:"string_format",...R(e)})}function vh(t,e){return new t({type:"number",checks:[],...R(e)})}function bh(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...R(e)})}function wh(t,e){return new t({type:"boolean",...R(e)})}function Sh(t){return new t({type:"any"})}function Eh(t){return new t({type:"unknown"})}function Ah(t,e){return new t({type:"never",...R(e)})}function eo(t,e){return new ka({check:"less_than",...R(e),value:t,inclusive:!1})}function ks(t,e){return new ka({check:"less_than",...R(e),value:t,inclusive:!0})}function to(t,e){return new Ta({check:"greater_than",...R(e),value:t,inclusive:!1})}function Ts(t,e){return new Ta({check:"greater_than",...R(e),value:t,inclusive:!0})}function no(t,e){return new zd({check:"multiple_of",...R(e),value:t})}function Na(t,e){return new jd({check:"max_length",...R(e),maximum:t})}function Ln(t,e){return new Bd({check:"min_length",...R(e),minimum:t})}function xa(t,e){return new Fd({check:"length_equals",...R(e),length:t})}function Ch(t,e){return new $d({check:"string_format",format:"regex",...R(e),pattern:t})}function Dh(t){return new Hd({check:"string_format",format:"lowercase",...R(t)})}function kh(t){return new Ud({check:"string_format",format:"uppercase",...R(t)})}function Th(t,e){return new Vd({check:"string_format",format:"includes",...R(e),includes:t})}function Rh(t,e){return new Zd({check:"string_format",format:"starts_with",...R(e),prefix:t})}function Ih(t,e){return new Wd({check:"string_format",format:"ends_with",...R(e),suffix:t})}function Nt(t){return new qd({check:"overwrite",tx:t})}function Oh(t){return Nt(e=>e.normalize(t))}function Mh(){return Nt(t=>t.trim())}function _h(){return Nt(t=>t.toLowerCase())}function Nh(){return Nt(t=>t.toUpperCase())}function xh(){return Nt(t=>$u(t))}function Ph(t,e,n){return new t({type:"array",element:e,...R(n)})}function zh(t,e,n){return new t({type:"custom",check:"custom",fn:e,...R(n)})}function Lh(t){const e=jh(n=>(n.addIssue=s=>{if(typeof s=="string")n.issues.push(Xt(s,n.value,e._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),n.issues.push(Xt(i))}},t(n.value,n)));return e}function jh(t,e){const n=new se({check:"custom",...R(e)});return n._zod.check=t,n}function Pa(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??Zt,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function G(t,e,n={path:[],schemaPath:[]}){var s;const i=t._zod.def,r=e.seen.get(t);if(r)return r.count++,n.schemaPath.includes(t)&&(r.cycle=n.path),r.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,o);const a=t._zod.toJSONSchema?.();if(a)o.schema=a;else{const u={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,u);else{const f=o.schema,h=e.processors[i.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);h(t,e,f,u)}const d=t._zod.parent;d&&(o.ref||(o.ref=d),G(d,e,u),e.seen.get(d).isParent=!0)}const l=e.metadataRegistry.get(t);return l&&Object.assign(o.schema,l),e.io==="input"&&ee(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((s=o.schema).default??(s.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function za(t,e){const n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const o of t.seen.entries()){const a=t.metadataRegistry.get(o[0])?.id;if(a){const l=s.get(a);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(a,o[0])}}const i=o=>{const a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const d=t.external.registry.get(o[0])?.id,f=t.external.uri??(m=>m);if(d)return{ref:f(d)};const h=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=h,{defId:h,ref:`${f("__shared")}#/${a}/${h}`}}if(o[1]===n)return{ref:"#"};const c=`#/${a}/`,u=o[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:c+u}},r=o=>{if(o[1].schema.$ref)return;const a=o[1],{ref:l,defId:c}=i(o);a.def={...a.schema},c&&(a.defId=c);const u=a.schema;for(const d in u)delete u[d];u.$ref=l};if(t.cycles==="throw")for(const o of t.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
37
|
+
`)}h.write("payload.value = newResult;"),h.write("return payload;");const w=h.compile();return(E,A)=>w(f,E,A)};let r;const o=Pn,a=!pa.jitless,c=a&&$u.value,u=e.catchall;let d;t._zod.parse=(f,h)=>{d??(d=s.value);const m=f.value;return o(m)?a&&c&&h?.async===!1&&h.jitless!==!0?(r||(r=i(e.shape)),f=r(f,h),u?Oa([],m,f,h,d,t):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),f)}});function Zr(t,e,n,s){for(const r of t)if(r.issues.length===0)return e.value=r.value,e;const i=t.filter(r=>!pt(r));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(r=>r.issues.map(o=>Pe(o,s,xe())))}),e)}const If=S("$ZodUnion",(t,e)=>{V.init(t,e),x(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),x(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),x(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),x(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){const i=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>Oi(r.source)).join("|")})$`)}});const n=e.options.length===1,s=e.options[0]._zod.run;t._zod.parse=(i,r)=>{if(n)return s(i,r);let o=!1;const a=[];for(const l of e.options){const c=l._zod.run({value:i.value,issues:[]},r);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(l=>Zr(l,i,t,r)):Zr(a,i,t,r)}}),Of=S("$ZodIntersection",(t,e)=>{V.init(t,e),t._zod.parse=(n,s)=>{const i=n.value,r=e.left._zod.run({value:i,issues:[]},s),o=e.right._zod.run({value:i,issues:[]},s);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then(([l,c])=>Wr(n,l,c)):Wr(n,r,o)}});function ii(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Tt(t)&&Tt(e)){const n=Object.keys(e),s=Object.keys(t).filter(r=>n.indexOf(r)!==-1),i={...t,...e};for(const r of s){const o=ii(t[r],e[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};i[r]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let s=0;s<t.length;s++){const i=t[s],r=e[s],o=ii(i,r);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Wr(t,e,n){const s=new Map;let i;for(const a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)s.has(l)||s.set(l,{}),s.get(l).l=!0}else t.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)s.has(l)||s.set(l,{}),s.get(l).r=!0;else t.issues.push(a);const r=[...s].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(r.length&&i&&t.issues.push({...i,keys:r}),pt(t))return t;const o=ii(e.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}const _f=S("$ZodRecord",(t,e)=>{V.init(t,e),t._zod.parse=(n,s)=>{const i=n.value;if(!Tt(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),n;const r=[],o=e.keyType._zod.values;if(o){n.value={};const a=new Set;for(const c of o)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);const u=e.valueType._zod.run({value:i[c],issues:[]},s);u instanceof Promise?r.push(u.then(d=>{d.issues.length&&n.issues.push(...gt(c,d.issues)),n.value[c]=d.value})):(u.issues.length&&n.issues.push(...gt(c,u.issues)),n.value[c]=u.value)}let l;for(const c in i)a.has(c)||(l=l??[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let l=e.keyType._zod.run({value:a,issues:[]},s);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Ca.test(a)&&l.issues.length){const d=e.keyType._zod.run({value:Number(a),issues:[]},s);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){e.mode==="loose"?n.value[a]=i[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>Pe(d,s,xe())),input:a,path:[a],inst:t});continue}const u=e.valueType._zod.run({value:i[a],issues:[]},s);u instanceof Promise?r.push(u.then(d=>{d.issues.length&&n.issues.push(...gt(a,d.issues)),n.value[l.value]=d.value})):(u.issues.length&&n.issues.push(...gt(a,u.issues)),n.value[l.value]=u.value)}}return r.length?Promise.all(r).then(()=>n):n}}),Nf=S("$ZodEnum",(t,e)=>{V.init(t,e);const n=ga(e.entries),s=new Set(n);t._zod.values=s,t._zod.pattern=new RegExp(`^(${n.filter(i=>Uu.has(typeof i)).map(i=>typeof i=="string"?es(i):i.toString()).join("|")})$`),t._zod.parse=(i,r)=>{const o=i.value;return s.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:t}),i}}),xf=S("$ZodTransform",(t,e)=>{V.init(t,e),t._zod.parse=(n,s)=>{if(s.direction==="backward")throw new ha(t.constructor.name);const i=e.transform(n.value,n);if(s.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(n.value=o,n));if(i instanceof Promise)throw new St;return n.value=i,n}});function qr(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const _a=S("$ZodOptional",(t,e)=>{V.init(t,e),t._zod.optin="optional",t._zod.optout="optional",x(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),x(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${Oi(n.source)})?$`):void 0}),t._zod.parse=(n,s)=>{if(e.innerType._zod.optin==="optional"){const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(r=>qr(r,n.value)):qr(i,n.value)}return n.value===void 0?n:e.innerType._zod.run(n,s)}}),Pf=S("$ZodExactOptional",(t,e)=>{_a.init(t,e),x(t._zod,"values",()=>e.innerType._zod.values),x(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(n,s)=>e.innerType._zod.run(n,s)}),zf=S("$ZodNullable",(t,e)=>{V.init(t,e),x(t._zod,"optin",()=>e.innerType._zod.optin),x(t._zod,"optout",()=>e.innerType._zod.optout),x(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${Oi(n.source)}|null)$`):void 0}),x(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,s)=>n.value===null?n:e.innerType._zod.run(n,s)}),Lf=S("$ZodDefault",(t,e)=>{V.init(t,e),t._zod.optin="optional",x(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,s)=>{if(s.direction==="backward")return e.innerType._zod.run(n,s);if(n.value===void 0)return n.value=e.defaultValue,n;const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(r=>Gr(r,e)):Gr(i,e)}});function Gr(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const jf=S("$ZodPrefault",(t,e)=>{V.init(t,e),t._zod.optin="optional",x(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,s)=>(s.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,s))}),Bf=S("$ZodNonOptional",(t,e)=>{V.init(t,e),x(t._zod,"values",()=>{const n=e.innerType._zod.values;return n?new Set([...n].filter(s=>s!==void 0)):void 0}),t._zod.parse=(n,s)=>{const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(r=>Qr(r,t)):Qr(i,t)}});function Qr(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const Ff=S("$ZodCatch",(t,e)=>{V.init(t,e),x(t._zod,"optin",()=>e.innerType._zod.optin),x(t._zod,"optout",()=>e.innerType._zod.optout),x(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,s)=>{if(s.direction==="backward")return e.innerType._zod.run(n,s);const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(r=>(n.value=r.value,r.issues.length&&(n.value=e.catchValue({...n,error:{issues:r.issues.map(o=>Pe(o,s,xe()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(r=>Pe(r,s,xe()))},input:n.value}),n.issues=[]),n)}}),Hf=S("$ZodPipe",(t,e)=>{V.init(t,e),x(t._zod,"values",()=>e.in._zod.values),x(t._zod,"optin",()=>e.in._zod.optin),x(t._zod,"optout",()=>e.out._zod.optout),x(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,s)=>{if(s.direction==="backward"){const r=e.out._zod.run(n,s);return r instanceof Promise?r.then(o=>hn(o,e.in,s)):hn(r,e.in,s)}const i=e.in._zod.run(n,s);return i instanceof Promise?i.then(r=>hn(r,e.out,s)):hn(i,e.out,s)}});function hn(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},n)}const $f=S("$ZodReadonly",(t,e)=>{V.init(t,e),x(t._zod,"propValues",()=>e.innerType._zod.propValues),x(t._zod,"values",()=>e.innerType._zod.values),x(t._zod,"optin",()=>e.innerType?._zod?.optin),x(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(n,s)=>{if(s.direction==="backward")return e.innerType._zod.run(n,s);const i=e.innerType._zod.run(n,s);return i instanceof Promise?i.then(Kr):Kr(i)}});function Kr(t){return t.value=Object.freeze(t.value),t}const Uf=S("$ZodCustom",(t,e)=>{se.init(t,e),V.init(t,e),t._zod.parse=(n,s)=>n,t._zod.check=n=>{const s=n.value,i=e.fn(s);if(i instanceof Promise)return i.then(r=>Yr(r,n,s,t));Yr(i,n,s,t)}});function Yr(t,e,n,s){if(!t){const i={code:"custom",input:n,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(i.params=s._zod.def.params),e.issues.push(Xt(i))}}var Jr;class Vf{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){const s=n[0];return this._map.set(e,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){const n=e._zod.parent;if(n){const s={...this.get(n)??{}};delete s.id;const i={...s,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Zf(){return new Vf}(Jr=globalThis).__zod_globalRegistry??(Jr.__zod_globalRegistry=Zf());const Zt=globalThis.__zod_globalRegistry;function Wf(t,e){return new t({type:"string",...T(e)})}function qf(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...T(e)})}function Xr(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...T(e)})}function Gf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...T(e)})}function Qf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(e)})}function Kf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(e)})}function Yf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(e)})}function Jf(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...T(e)})}function Xf(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...T(e)})}function eh(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(e)})}function th(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...T(e)})}function nh(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(e)})}function sh(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...T(e)})}function ih(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...T(e)})}function rh(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(e)})}function oh(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(e)})}function ah(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(e)})}function lh(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(e)})}function ch(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(e)})}function uh(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...T(e)})}function dh(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...T(e)})}function fh(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...T(e)})}function hh(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...T(e)})}function ph(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(e)})}function gh(t,e){return new t({type:"string",format:"date",check:"string_format",...T(e)})}function mh(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...T(e)})}function yh(t,e){return new t({type:"string",format:"duration",check:"string_format",...T(e)})}function vh(t,e){return new t({type:"number",checks:[],...T(e)})}function bh(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...T(e)})}function wh(t,e){return new t({type:"boolean",...T(e)})}function Sh(t){return new t({type:"any"})}function Eh(t){return new t({type:"unknown"})}function Ah(t,e){return new t({type:"never",...T(e)})}function eo(t,e){return new ka({check:"less_than",...T(e),value:t,inclusive:!1})}function ks(t,e){return new ka({check:"less_than",...T(e),value:t,inclusive:!0})}function to(t,e){return new Ra({check:"greater_than",...T(e),value:t,inclusive:!1})}function Rs(t,e){return new Ra({check:"greater_than",...T(e),value:t,inclusive:!0})}function no(t,e){return new zd({check:"multiple_of",...T(e),value:t})}function Na(t,e){return new jd({check:"max_length",...T(e),maximum:t})}function Ln(t,e){return new Bd({check:"min_length",...T(e),minimum:t})}function xa(t,e){return new Fd({check:"length_equals",...T(e),length:t})}function Ch(t,e){return new Hd({check:"string_format",format:"regex",...T(e),pattern:t})}function Dh(t){return new $d({check:"string_format",format:"lowercase",...T(t)})}function kh(t){return new Ud({check:"string_format",format:"uppercase",...T(t)})}function Rh(t,e){return new Vd({check:"string_format",format:"includes",...T(e),includes:t})}function Th(t,e){return new Zd({check:"string_format",format:"starts_with",...T(e),prefix:t})}function Mh(t,e){return new Wd({check:"string_format",format:"ends_with",...T(e),suffix:t})}function Nt(t){return new qd({check:"overwrite",tx:t})}function Ih(t){return Nt(e=>e.normalize(t))}function Oh(){return Nt(t=>t.trim())}function _h(){return Nt(t=>t.toLowerCase())}function Nh(){return Nt(t=>t.toUpperCase())}function xh(){return Nt(t=>Hu(t))}function Ph(t,e,n){return new t({type:"array",element:e,...T(n)})}function zh(t,e,n){return new t({type:"custom",check:"custom",fn:e,...T(n)})}function Lh(t){const e=jh(n=>(n.addIssue=s=>{if(typeof s=="string")n.issues.push(Xt(s,n.value,e._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),n.issues.push(Xt(i))}},t(n.value,n)));return e}function jh(t,e){const n=new se({check:"custom",...T(e)});return n._zod.check=t,n}function Pa(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??Zt,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function G(t,e,n={path:[],schemaPath:[]}){var s;const i=t._zod.def,r=e.seen.get(t);if(r)return r.count++,n.schemaPath.includes(t)&&(r.cycle=n.path),r.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,o);const a=t._zod.toJSONSchema?.();if(a)o.schema=a;else{const u={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,u);else{const f=o.schema,h=e.processors[i.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);h(t,e,f,u)}const d=t._zod.parent;d&&(o.ref||(o.ref=d),G(d,e,u),e.seen.get(d).isParent=!0)}const l=e.metadataRegistry.get(t);return l&&Object.assign(o.schema,l),e.io==="input"&&ee(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((s=o.schema).default??(s.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function za(t,e){const n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const o of t.seen.entries()){const a=t.metadataRegistry.get(o[0])?.id;if(a){const l=s.get(a);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(a,o[0])}}const i=o=>{const a=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const d=t.external.registry.get(o[0])?.id,f=t.external.uri??(m=>m);if(d)return{ref:f(d)};const h=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=h,{defId:h,ref:`${f("__shared")}#/${a}/${h}`}}if(o[1]===n)return{ref:"#"};const c=`#/${a}/`,u=o[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:c+u}},r=o=>{if(o[1].schema.$ref)return;const a=o[1],{ref:l,defId:c}=i(o);a.def={...a.schema},c&&(a.defId=c);const u=a.schema;for(const d in u)delete u[d];u.$ref=l};if(t.cycles==="throw")for(const o of t.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
38
38
|
|
|
39
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of t.seen.entries()){const a=o[1];if(e===o[0]){r(o);continue}if(t.external){const c=t.external.registry.get(o[0])?.id;if(e!==o[0]&&c){r(o);continue}}if(t.metadataRegistry.get(o[0])?.id){r(o);continue}if(a.cycle){r(o);continue}if(a.count>1&&t.reused==="ref"){r(o);continue}}}function La(t,e){const n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=o=>{const a=t.seen.get(o);if(a.ref===null)return;const l=a.def??a.schema,c={...l},u=a.ref;if(a.ref=null,u){s(u);const f=t.seen.get(u),h=f.schema;if(h.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Object.assign(l,h),Object.assign(l,c),o._zod.parent===u)for(const p in l)p==="$ref"||p==="allOf"||p in c||delete l[p];if(h.$ref&&f.def)for(const p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}const d=o._zod.parent;if(d&&d!==u){s(d);const f=t.seen.get(d);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(const h in l)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h])&&delete l[h]}t.override({zodSchema:o,jsonSchema:l,path:a.path??[]})};for(const o of[...t.seen.entries()].reverse())s(o[0]);const i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const o=t.external.registry.get(e)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(o)}Object.assign(i,n.def??n.schema);const r=t.external?.defs??{};for(const o of t.seen.entries()){const a=o[1];a.def&&a.defId&&(r[a.defId]=a.def)}t.external||Object.keys(r).length>0&&(t.target==="draft-2020-12"?i.$defs=r:i.definitions=r);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...e["~standard"],jsonSchema:{input:jn(e,"input",t.processors),output:jn(e,"output",t.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function ee(t,e){const n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);const s=t._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return ee(s.element,n);if(s.type==="set")return ee(s.valueType,n);if(s.type==="lazy")return ee(s.getter(),n);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return ee(s.innerType,n);if(s.type==="intersection")return ee(s.left,n)||ee(s.right,n);if(s.type==="record"||s.type==="map")return ee(s.keyType,n)||ee(s.valueType,n);if(s.type==="pipe")return ee(s.in,n)||ee(s.out,n);if(s.type==="object"){for(const i in s.shape)if(ee(s.shape[i],n))return!0;return!1}if(s.type==="union"){for(const i of s.options)if(ee(i,n))return!0;return!1}if(s.type==="tuple"){for(const i of s.items)if(ee(i,n))return!0;return!!(s.rest&&ee(s.rest,n))}return!1}const Bh=(t,e={})=>n=>{const s=Pa({...n,processors:e});return G(t,s),za(s,t),La(s,t)},jn=(t,e,n={})=>s=>{const{libraryOptions:i,target:r}=s??{},o=Pa({...i??{},target:r,io:e,processors:n});return G(t,o),za(o,t),La(o,t)},Fh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$h=(t,e,n,s)=>{const i=n;i.type="string";const{minimum:r,maximum:o,format:a,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof r=="number"&&(i.minLength=r),typeof o=="number"&&(i.maxLength=o),a&&(i.format=Fh[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Hh=(t,e,n,s)=>{const i=n,{minimum:r,maximum:o,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=t._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof r=="number"&&(i.minimum=r,typeof u=="number"&&e.target!=="draft-04"&&(u>=r?delete i.minimum:delete i.exclusiveMinimum)),typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c),typeof o=="number"&&(i.maximum=o,typeof c=="number"&&e.target!=="draft-04"&&(c<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof l=="number"&&(i.multipleOf=l)},Uh=(t,e,n,s)=>{n.type="boolean"},Vh=(t,e,n,s)=>{n.not={}},Zh=(t,e,n,s)=>{},Wh=(t,e,n,s)=>{},qh=(t,e,n,s)=>{const i=t._zod.def,r=ga(i.entries);r.every(o=>typeof o=="number")&&(n.type="number"),r.every(o=>typeof o=="string")&&(n.type="string"),n.enum=r},Gh=(t,e,n,s)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Qh=(t,e,n,s)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Kh=(t,e,n,s)=>{const i=n,r=t._zod.def,{minimum:o,maximum:a}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=G(r.element,e,{...s,path:[...s.path,"items"]})},Yh=(t,e,n,s)=>{const i=n,r=t._zod.def;i.type="object",i.properties={};const o=r.shape;for(const c in o)i.properties[c]=G(o[c],e,{...s,path:[...s.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(c=>{const u=r.shape[c]._zod;return e.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(i.required=Array.from(l)),r.catchall?._zod.def.type==="never"?i.additionalProperties=!1:r.catchall?r.catchall&&(i.additionalProperties=G(r.catchall,e,{...s,path:[...s.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},Jh=(t,e,n,s)=>{const i=t._zod.def,r=i.inclusive===!1,o=i.options.map((a,l)=>G(a,e,{...s,path:[...s.path,r?"oneOf":"anyOf",l]}));r?n.oneOf=o:n.anyOf=o},Xh=(t,e,n,s)=>{const i=t._zod.def,r=G(i.left,e,{...s,path:[...s.path,"allOf",0]}),o=G(i.right,e,{...s,path:[...s.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(r)?r.allOf:[r],...a(o)?o.allOf:[o]];n.allOf=l},ep=(t,e,n,s)=>{const i=n,r=t._zod.def;i.type="object";const o=r.keyType,l=o._zod.bag?.patterns;if(r.mode==="loose"&&l&&l.size>0){const u=G(r.valueType,e,{...s,path:[...s.path,"patternProperties","*"]});i.patternProperties={};for(const d of l)i.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=G(r.keyType,e,{...s,path:[...s.path,"propertyNames"]})),i.additionalProperties=G(r.valueType,e,{...s,path:[...s.path,"additionalProperties"]});const c=o._zod.values;if(c){const u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(i.required=u)}},tp=(t,e,n,s)=>{const i=t._zod.def,r=G(i.innerType,e,s),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[r,{type:"null"}]},np=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType},sp=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ip=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},rp=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},op=(t,e,n,s)=>{const i=t._zod.def,r=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;G(r,e,s);const o=e.seen.get(t);o.ref=r},ap=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType,n.readOnly=!0},ja=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType},lp=S("ZodISODateTime",(t,e)=>{lf.init(t,e),W.init(t,e)});function cp(t){return ph(lp,t)}const up=S("ZodISODate",(t,e)=>{cf.init(t,e),W.init(t,e)});function dp(t){return gh(up,t)}const fp=S("ZodISOTime",(t,e)=>{uf.init(t,e),W.init(t,e)});function hp(t){return mh(fp,t)}const pp=S("ZodISODuration",(t,e)=>{df.init(t,e),W.init(t,e)});function gp(t){return yh(pp,t)}const mp=(t,e)=>{ba.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>ed(t,n)},flatten:{value:n=>Xu(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,si,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,si,2)}},isEmpty:{get(){return t.issues.length===0}}})},he=S("ZodError",mp,{Parent:Error}),yp=Ni(he),vp=xi(he),bp=ts(he),wp=ns(he),Sp=sd(he),Ep=id(he),Ap=rd(he),Cp=od(he),Dp=ad(he),kp=ld(he),Tp=cd(he),Rp=ud(he),Z=S("ZodType",(t,e)=>(V.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:jn(t,"input"),output:jn(t,"output")}}),t.toJSONSchema=Bh(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone(Be(e,{checks:[...e.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0}),t.with=t.check,t.clone=(n,s)=>Fe(t,n,s),t.brand=()=>t,t.register=((n,s)=>(n.add(t,s),t)),t.parse=(n,s)=>yp(t,n,s,{callee:t.parse}),t.safeParse=(n,s)=>bp(t,n,s),t.parseAsync=async(n,s)=>vp(t,n,s,{callee:t.parseAsync}),t.safeParseAsync=async(n,s)=>wp(t,n,s),t.spa=t.safeParseAsync,t.encode=(n,s)=>Sp(t,n,s),t.decode=(n,s)=>Ep(t,n,s),t.encodeAsync=async(n,s)=>Ap(t,n,s),t.decodeAsync=async(n,s)=>Cp(t,n,s),t.safeEncode=(n,s)=>Dp(t,n,s),t.safeDecode=(n,s)=>kp(t,n,s),t.safeEncodeAsync=async(n,s)=>Tp(t,n,s),t.safeDecodeAsync=async(n,s)=>Rp(t,n,s),t.refine=(n,s)=>t.check(Cg(n,s)),t.superRefine=n=>t.check(Dg(n)),t.overwrite=n=>t.check(Nt(n)),t.optional=()=>oo(t),t.exactOptional=()=>dg(t),t.nullable=()=>ao(t),t.nullish=()=>oo(ao(t)),t.nonoptional=n=>yg(t,n),t.array=()=>eg(t),t.or=n=>sg([t,n]),t.and=n=>rg(t,n),t.transform=n=>lo(t,cg(n)),t.default=n=>pg(t,n),t.prefault=n=>mg(t,n),t.catch=n=>bg(t,n),t.pipe=n=>lo(t,n),t.readonly=()=>Eg(t),t.describe=n=>{const s=t.clone();return Zt.add(s,{description:n}),s},Object.defineProperty(t,"description",{get(){return Zt.get(t)?.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return Zt.get(t);const s=t.clone();return Zt.add(s,n[0]),s},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=n=>n(t),t)),Ba=S("_ZodString",(t,e)=>{Pi.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(s,i,r)=>$h(t,s,i);const n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...s)=>t.check(Ch(...s)),t.includes=(...s)=>t.check(Th(...s)),t.startsWith=(...s)=>t.check(Rh(...s)),t.endsWith=(...s)=>t.check(Ih(...s)),t.min=(...s)=>t.check(Ln(...s)),t.max=(...s)=>t.check(Na(...s)),t.length=(...s)=>t.check(xa(...s)),t.nonempty=(...s)=>t.check(Ln(1,...s)),t.lowercase=s=>t.check(Dh(s)),t.uppercase=s=>t.check(kh(s)),t.trim=()=>t.check(Mh()),t.normalize=(...s)=>t.check(Oh(...s)),t.toLowerCase=()=>t.check(_h()),t.toUpperCase=()=>t.check(Nh()),t.slugify=()=>t.check(xh())}),Ip=S("ZodString",(t,e)=>{Pi.init(t,e),Ba.init(t,e),t.email=n=>t.check(qf(Op,n)),t.url=n=>t.check(Jf(Mp,n)),t.jwt=n=>t.check(hh(Wp,n)),t.emoji=n=>t.check(Xf(_p,n)),t.guid=n=>t.check(Xr(so,n)),t.uuid=n=>t.check(Gf(pn,n)),t.uuidv4=n=>t.check(Qf(pn,n)),t.uuidv6=n=>t.check(Kf(pn,n)),t.uuidv7=n=>t.check(Yf(pn,n)),t.nanoid=n=>t.check(eh(Np,n)),t.guid=n=>t.check(Xr(so,n)),t.cuid=n=>t.check(th(xp,n)),t.cuid2=n=>t.check(nh(Pp,n)),t.ulid=n=>t.check(sh(zp,n)),t.base64=n=>t.check(uh(Up,n)),t.base64url=n=>t.check(dh(Vp,n)),t.xid=n=>t.check(ih(Lp,n)),t.ksuid=n=>t.check(rh(jp,n)),t.ipv4=n=>t.check(oh(Bp,n)),t.ipv6=n=>t.check(ah(Fp,n)),t.cidrv4=n=>t.check(lh($p,n)),t.cidrv6=n=>t.check(ch(Hp,n)),t.e164=n=>t.check(fh(Zp,n)),t.datetime=n=>t.check(cp(n)),t.date=n=>t.check(dp(n)),t.time=n=>t.check(hp(n)),t.duration=n=>t.check(gp(n))});function lE(t){return Wf(Ip,t)}const W=S("ZodStringFormat",(t,e)=>{F.init(t,e),Ba.init(t,e)}),Op=S("ZodEmail",(t,e)=>{Jd.init(t,e),W.init(t,e)}),so=S("ZodGUID",(t,e)=>{Kd.init(t,e),W.init(t,e)}),pn=S("ZodUUID",(t,e)=>{Yd.init(t,e),W.init(t,e)}),Mp=S("ZodURL",(t,e)=>{Xd.init(t,e),W.init(t,e)}),_p=S("ZodEmoji",(t,e)=>{ef.init(t,e),W.init(t,e)}),Np=S("ZodNanoID",(t,e)=>{tf.init(t,e),W.init(t,e)}),xp=S("ZodCUID",(t,e)=>{nf.init(t,e),W.init(t,e)}),Pp=S("ZodCUID2",(t,e)=>{sf.init(t,e),W.init(t,e)}),zp=S("ZodULID",(t,e)=>{rf.init(t,e),W.init(t,e)}),Lp=S("ZodXID",(t,e)=>{of.init(t,e),W.init(t,e)}),jp=S("ZodKSUID",(t,e)=>{af.init(t,e),W.init(t,e)}),Bp=S("ZodIPv4",(t,e)=>{ff.init(t,e),W.init(t,e)}),Fp=S("ZodIPv6",(t,e)=>{hf.init(t,e),W.init(t,e)}),$p=S("ZodCIDRv4",(t,e)=>{pf.init(t,e),W.init(t,e)}),Hp=S("ZodCIDRv6",(t,e)=>{gf.init(t,e),W.init(t,e)}),Up=S("ZodBase64",(t,e)=>{mf.init(t,e),W.init(t,e)}),Vp=S("ZodBase64URL",(t,e)=>{vf.init(t,e),W.init(t,e)}),Zp=S("ZodE164",(t,e)=>{bf.init(t,e),W.init(t,e)}),Wp=S("ZodJWT",(t,e)=>{Sf.init(t,e),W.init(t,e)}),Fa=S("ZodNumber",(t,e)=>{Ia.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(s,i,r)=>Hh(t,s,i),t.gt=(s,i)=>t.check(to(s,i)),t.gte=(s,i)=>t.check(Ts(s,i)),t.min=(s,i)=>t.check(Ts(s,i)),t.lt=(s,i)=>t.check(eo(s,i)),t.lte=(s,i)=>t.check(ks(s,i)),t.max=(s,i)=>t.check(ks(s,i)),t.int=s=>t.check(io(s)),t.safe=s=>t.check(io(s)),t.positive=s=>t.check(to(0,s)),t.nonnegative=s=>t.check(Ts(0,s)),t.negative=s=>t.check(eo(0,s)),t.nonpositive=s=>t.check(ks(0,s)),t.multipleOf=(s,i)=>t.check(no(s,i)),t.step=(s,i)=>t.check(no(s,i)),t.finite=()=>t;const n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function cE(t){return vh(Fa,t)}const qp=S("ZodNumberFormat",(t,e)=>{Ef.init(t,e),Fa.init(t,e)});function io(t){return bh(qp,t)}const Gp=S("ZodBoolean",(t,e)=>{Af.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Uh(t,n,s)});function uE(t){return wh(Gp,t)}const Qp=S("ZodAny",(t,e)=>{Cf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Zh()});function dE(){return Sh(Qp)}const Kp=S("ZodUnknown",(t,e)=>{Df.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Wh()});function ro(){return Eh(Kp)}const Yp=S("ZodNever",(t,e)=>{kf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Vh(t,n,s)});function Jp(t){return Ah(Yp,t)}const Xp=S("ZodArray",(t,e)=>{Tf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Kh(t,n,s,i),t.element=e.element,t.min=(n,s)=>t.check(Ln(n,s)),t.nonempty=n=>t.check(Ln(1,n)),t.max=(n,s)=>t.check(Na(n,s)),t.length=(n,s)=>t.check(xa(n,s)),t.unwrap=()=>t.element});function eg(t,e){return Ph(Xp,t,e)}const tg=S("ZodObject",(t,e)=>{If.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Yh(t,n,s,i),x(t,"shape",()=>e.shape),t.keyof=()=>ag(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:ro()}),t.loose=()=>t.clone({...t._zod.def,catchall:ro()}),t.strict=()=>t.clone({...t._zod.def,catchall:Jp()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>Gu(t,n),t.safeExtend=n=>Qu(t,n),t.merge=n=>Ku(t,n),t.pick=n=>Wu(t,n),t.omit=n=>qu(t,n),t.partial=(...n)=>Yu($a,t,n[0]),t.required=(...n)=>Ju(Ha,t,n[0])});function fE(t,e){const n={type:"object",shape:t??{},...R(e)};return new tg(n)}const ng=S("ZodUnion",(t,e)=>{Of.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Jh(t,n,s,i),t.options=e.options});function sg(t,e){return new ng({type:"union",options:t,...R(e)})}const ig=S("ZodIntersection",(t,e)=>{Mf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Xh(t,n,s,i)});function rg(t,e){return new ig({type:"intersection",left:t,right:e})}const og=S("ZodRecord",(t,e)=>{_f.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ep(t,n,s,i),t.keyType=e.keyType,t.valueType=e.valueType});function hE(t,e,n){return new og({type:"record",keyType:t,valueType:e,...R(n)})}const ri=S("ZodEnum",(t,e)=>{Nf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(s,i,r)=>qh(t,s,i),t.enum=e.entries,t.options=Object.values(e.entries);const n=new Set(Object.keys(e.entries));t.extract=(s,i)=>{const r={};for(const o of s)if(n.has(o))r[o]=e.entries[o];else throw new Error(`Key ${o} not found in enum`);return new ri({...e,checks:[],...R(i),entries:r})},t.exclude=(s,i)=>{const r={...e.entries};for(const o of s)if(n.has(o))delete r[o];else throw new Error(`Key ${o} not found in enum`);return new ri({...e,checks:[],...R(i),entries:r})}});function ag(t,e){const n=Array.isArray(t)?Object.fromEntries(t.map(s=>[s,s])):t;return new ri({type:"enum",entries:n,...R(e)})}const lg=S("ZodTransform",(t,e)=>{xf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Qh(t,n),t._zod.parse=(n,s)=>{if(s.direction==="backward")throw new ha(t.constructor.name);n.addIssue=r=>{if(typeof r=="string")n.issues.push(Xt(r,n.value,e));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),n.issues.push(Xt(o))}};const i=e.transform(n.value,n);return i instanceof Promise?i.then(r=>(n.value=r,n)):(n.value=i,n)}});function cg(t){return new lg({type:"transform",transform:t})}const $a=S("ZodOptional",(t,e)=>{_a.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ja(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function oo(t){return new $a({type:"optional",innerType:t})}const ug=S("ZodExactOptional",(t,e)=>{Pf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ja(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function dg(t){return new ug({type:"optional",innerType:t})}const fg=S("ZodNullable",(t,e)=>{zf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>tp(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function ao(t){return new fg({type:"nullable",innerType:t})}const hg=S("ZodDefault",(t,e)=>{Lf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>sp(t,n,s,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function pg(t,e){return new hg({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():ya(e)}})}const gg=S("ZodPrefault",(t,e)=>{jf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ip(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function mg(t,e){return new gg({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():ya(e)}})}const Ha=S("ZodNonOptional",(t,e)=>{Bf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>np(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function yg(t,e){return new Ha({type:"nonoptional",innerType:t,...R(e)})}const vg=S("ZodCatch",(t,e)=>{Ff.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>rp(t,n,s,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function bg(t,e){return new vg({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const wg=S("ZodPipe",(t,e)=>{$f.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>op(t,n,s,i),t.in=e.in,t.out=e.out});function lo(t,e){return new wg({type:"pipe",in:t,out:e})}const Sg=S("ZodReadonly",(t,e)=>{Hf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ap(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function Eg(t){return new Sg({type:"readonly",innerType:t})}const Ag=S("ZodCustom",(t,e)=>{Uf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Gh(t,n)});function Cg(t,e={}){return zh(Ag,t,e)}function Dg(t){return Lh(t)}const Ua={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"};const Va=([t,e,n])=>{const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.keys(e).forEach(i=>{s.setAttribute(i,String(e[i]))}),n?.length&&n.forEach(i=>{const r=Va(i);s.appendChild(r)}),s},kg=(t,e={})=>{const s={...Ua,...e};return Va(["svg",s,t])};const Tg=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const Rg=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim();const Ig=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,s)=>s?s.toUpperCase():n.toLowerCase());const Og=t=>{const e=Ig(t);return e.charAt(0).toUpperCase()+e.slice(1)};const Mg=t=>Array.from(t.attributes).reduce((e,n)=>(e[n.name]=n.value,e),{}),co=t=>typeof t=="string"?t:!t||!t.class?"":t.class&&typeof t.class=="string"?t.class.split(" "):t.class&&Array.isArray(t.class)?t.class:"",uo=(t,{nameAttr:e,icons:n,attrs:s})=>{const i=t.getAttribute(e);if(i==null)return;const r=Og(i),o=n[r];if(!o)return console.warn(`${t.outerHTML} icon name was not found in the provided icons object.`);const a=Mg(t),l=Tg(a)?{}:{"aria-hidden":"true"},c={...Ua,"data-lucide":i,...l,...s,...a},u=co(a),d=co(s),f=Rg("lucide",`lucide-${i}`,...u,...d);f&&Object.assign(c,{class:f});const h=kg(o,c);return t.parentNode?.replaceChild(h,t)};const pE=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"}]];const gE=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"}],["path",{d:"M10 12h4"}]];const mE=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]];const yE=[["path",{d:"M3 19V5"}],["path",{d:"m13 6-6 6 6 6"}],["path",{d:"M7 12h14"}]];const vE=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"}],["path",{d:"m9 12 2 2 4-4"}]];const bE=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2"}],["path",{d:"M6 20h4"}],["path",{d:"M14 10h4"}],["path",{d:"M6 14h2v6"}],["path",{d:"M14 4h2v6"}]];const wE=[["path",{d:"M12 7v14"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}]];const SE=[["path",{d:"M12 8V4H8"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}],["path",{d:"M2 14h2"}],["path",{d:"M20 14h2"}],["path",{d:"M15 13v2"}],["path",{d:"M9 13v2"}]];const EE=[["path",{d:"M10 19.655A6 6 0 0 1 6 14v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 3.97"}],["path",{d:"M14 15.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];const AE=[["path",{d:"M12 20v-9"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M22 13h-4"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];const CE=[["path",{d:"M8 2v4"}],["path",{d:"M16 2v4"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}],["path",{d:"M3 10h18"}]];const DE=[["path",{d:"M20 6 9 17l-5-5"}]];const kE=[["path",{d:"m6 9 6 6 6-6"}]];const TE=[["path",{d:"m9 18 6-6-6-6"}]];const RE=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 12-4-4-4 4"}],["path",{d:"M12 16V8"}]];const IE=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];const OE=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}],["path",{d:"M12 11h4"}],["path",{d:"M12 16h4"}],["path",{d:"M8 11h.01"}],["path",{d:"M8 16h.01"}]];const ME=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6h4"}]];const _E=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]];const NE=[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]];const xE=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z"}]];const PE=[["line",{x1:"15",x2:"15",y1:"12",y2:"18"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];const zE=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];const LE=[["path",{d:"M12 20v2"}],["path",{d:"M12 2v2"}],["path",{d:"M17 20v2"}],["path",{d:"M17 2v2"}],["path",{d:"M2 12h2"}],["path",{d:"M2 17h2"}],["path",{d:"M2 7h2"}],["path",{d:"M20 12h2"}],["path",{d:"M20 17h2"}],["path",{d:"M20 7h2"}],["path",{d:"M7 20v2"}],["path",{d:"M7 2v2"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1"}]];const jE=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];const BE=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];const FE=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];const $E=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M12 12v6"}],["path",{d:"m15 15-3-3-3 3"}]];const HE=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"}],["path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];const UE=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];const VE=[["path",{d:"M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473"}],["path",{d:"m16.5 3.5 5 5"}],["path",{d:"m21.5 3.5-5 5"}]];const ZE=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];const WE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M12 7v5l4 2"}]];const qE=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]];const GE=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];const QE=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"}]];const KE=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];const YE=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];const JE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];const XE=[["path",{d:"m16 17 5-5-5-5"}],["path",{d:"M21 12H9"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}]];const eA=[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]];const tA=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"}]];const nA=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]];const sA=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1"}]];const iA=[["path",{d:"M12 17v4"}],["path",{d:"m14.305 7.53.923-.382"}],["path",{d:"m15.228 4.852-.923-.383"}],["path",{d:"m16.852 3.228-.383-.924"}],["path",{d:"m16.852 8.772-.383.923"}],["path",{d:"m19.148 3.228.383-.924"}],["path",{d:"m19.53 9.696-.382-.924"}],["path",{d:"m20.772 4.852.924-.383"}],["path",{d:"m20.772 7.148.924.383"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7"}],["path",{d:"M8 21h8"}],["circle",{cx:"18",cy:"6",r:"3"}]];const rA=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"}],["path",{d:"M12 12V8"}]];const oA=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];const aA=[["path",{d:"M11 7 6 2"}],["path",{d:"M18.992 12H2.041"}],["path",{d:"M21.145 18.38A3.34 3.34 0 0 1 20 16.5a3.3 3.3 0 0 1-1.145 1.88c-.575.46-.855 1.02-.855 1.595A2 2 0 0 0 20 22a2 2 0 0 0 2-2.025c0-.58-.285-1.13-.855-1.595"}],["path",{d:"m8.5 4.5 2.148-2.148a1.205 1.205 0 0 1 1.704 0l7.296 7.296a1.205 1.205 0 0 1 0 1.704l-7.592 7.592a3.615 3.615 0 0 1-5.112 0l-3.888-3.888a3.615 3.615 0 0 1 0-5.112L5.67 7.33"}]];const lA=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"}]];const cA=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]];const uA=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];const dA=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]];const fA=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"}],["path",{d:"m2 22 3-3"}],["path",{d:"M7.5 13.5 10 11"}],["path",{d:"M10.5 16.5 13 14"}],["path",{d:"m18 3-4 4h6l-4 4"}]];const hA=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];const pA=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478"}],["circle",{cx:"12",cy:"12",r:"2"}]];const gA=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];const mA=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];const yA=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];const vA=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]];const bA=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];const wA=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];const SA=[["path",{d:"M14 17H5"}],["path",{d:"M19 7h-9"}],["circle",{cx:"17",cy:"17",r:"3"}],["circle",{cx:"7",cy:"7",r:"3"}]];const EA=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];const AA=[["circle",{cx:"18",cy:"5",r:"3"}],["circle",{cx:"6",cy:"12",r:"3"}],["circle",{cx:"18",cy:"19",r:"3"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49"}]];const CA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"M12 8v4"}],["path",{d:"M12 16h.01"}]];const DA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"m9 12 2 2 4-4"}]];const kA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}]];const TA=[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z"}],["path",{d:"M21 12h1"}],["path",{d:"M18.5 4.5 18 5"}],["path",{d:"M2 12h1"}],["path",{d:"M12 2v1"}],["path",{d:"m4.929 4.929.707.707"}],["path",{d:"M12 12v6"}]];const RA=[["path",{d:"M21 4v16"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z"}]];const IA=[["path",{d:"M10 5H3"}],["path",{d:"M12 19H3"}],["path",{d:"M14 3v4"}],["path",{d:"M16 17v4"}],["path",{d:"M21 12h-9"}],["path",{d:"M21 19h-5"}],["path",{d:"M21 5h-7"}],["path",{d:"M8 10v4"}],["path",{d:"M8 12H3"}]];const OA=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"}],["path",{d:"M20 2v4"}],["path",{d:"M22 4h-4"}],["circle",{cx:"4",cy:"20",r:"2"}]];const MA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];const _A=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];const NA=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];const xA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]];const PA=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2"}]];const zA=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];const _g=({icons:t={},nameAttr:e="data-lucide",attrs:n={},root:s=document,inTemplates:i}={})=>{if(!Object.values(t).length)throw new Error(`Please provide an icons object.
|
|
39
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of t.seen.entries()){const a=o[1];if(e===o[0]){r(o);continue}if(t.external){const c=t.external.registry.get(o[0])?.id;if(e!==o[0]&&c){r(o);continue}}if(t.metadataRegistry.get(o[0])?.id){r(o);continue}if(a.cycle){r(o);continue}if(a.count>1&&t.reused==="ref"){r(o);continue}}}function La(t,e){const n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=o=>{const a=t.seen.get(o);if(a.ref===null)return;const l=a.def??a.schema,c={...l},u=a.ref;if(a.ref=null,u){s(u);const f=t.seen.get(u),h=f.schema;if(h.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Object.assign(l,h),Object.assign(l,c),o._zod.parent===u)for(const p in l)p==="$ref"||p==="allOf"||p in c||delete l[p];if(h.$ref&&f.def)for(const p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}const d=o._zod.parent;if(d&&d!==u){s(d);const f=t.seen.get(d);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(const h in l)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h])&&delete l[h]}t.override({zodSchema:o,jsonSchema:l,path:a.path??[]})};for(const o of[...t.seen.entries()].reverse())s(o[0]);const i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const o=t.external.registry.get(e)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(o)}Object.assign(i,n.def??n.schema);const r=t.external?.defs??{};for(const o of t.seen.entries()){const a=o[1];a.def&&a.defId&&(r[a.defId]=a.def)}t.external||Object.keys(r).length>0&&(t.target==="draft-2020-12"?i.$defs=r:i.definitions=r);try{const o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...e["~standard"],jsonSchema:{input:jn(e,"input",t.processors),output:jn(e,"output",t.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function ee(t,e){const n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);const s=t._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return ee(s.element,n);if(s.type==="set")return ee(s.valueType,n);if(s.type==="lazy")return ee(s.getter(),n);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return ee(s.innerType,n);if(s.type==="intersection")return ee(s.left,n)||ee(s.right,n);if(s.type==="record"||s.type==="map")return ee(s.keyType,n)||ee(s.valueType,n);if(s.type==="pipe")return ee(s.in,n)||ee(s.out,n);if(s.type==="object"){for(const i in s.shape)if(ee(s.shape[i],n))return!0;return!1}if(s.type==="union"){for(const i of s.options)if(ee(i,n))return!0;return!1}if(s.type==="tuple"){for(const i of s.items)if(ee(i,n))return!0;return!!(s.rest&&ee(s.rest,n))}return!1}const Bh=(t,e={})=>n=>{const s=Pa({...n,processors:e});return G(t,s),za(s,t),La(s,t)},jn=(t,e,n={})=>s=>{const{libraryOptions:i,target:r}=s??{},o=Pa({...i??{},target:r,io:e,processors:n});return G(t,o),za(o,t),La(o,t)},Fh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Hh=(t,e,n,s)=>{const i=n;i.type="string";const{minimum:r,maximum:o,format:a,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof r=="number"&&(i.minLength=r),typeof o=="number"&&(i.maxLength=o),a&&(i.format=Fh[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){const u=[...l];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},$h=(t,e,n,s)=>{const i=n,{minimum:r,maximum:o,format:a,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=t._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof r=="number"&&(i.minimum=r,typeof u=="number"&&e.target!=="draft-04"&&(u>=r?delete i.minimum:delete i.exclusiveMinimum)),typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c),typeof o=="number"&&(i.maximum=o,typeof c=="number"&&e.target!=="draft-04"&&(c<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof l=="number"&&(i.multipleOf=l)},Uh=(t,e,n,s)=>{n.type="boolean"},Vh=(t,e,n,s)=>{n.not={}},Zh=(t,e,n,s)=>{},Wh=(t,e,n,s)=>{},qh=(t,e,n,s)=>{const i=t._zod.def,r=ga(i.entries);r.every(o=>typeof o=="number")&&(n.type="number"),r.every(o=>typeof o=="string")&&(n.type="string"),n.enum=r},Gh=(t,e,n,s)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Qh=(t,e,n,s)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Kh=(t,e,n,s)=>{const i=n,r=t._zod.def,{minimum:o,maximum:a}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=G(r.element,e,{...s,path:[...s.path,"items"]})},Yh=(t,e,n,s)=>{const i=n,r=t._zod.def;i.type="object",i.properties={};const o=r.shape;for(const c in o)i.properties[c]=G(o[c],e,{...s,path:[...s.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(c=>{const u=r.shape[c]._zod;return e.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(i.required=Array.from(l)),r.catchall?._zod.def.type==="never"?i.additionalProperties=!1:r.catchall?r.catchall&&(i.additionalProperties=G(r.catchall,e,{...s,path:[...s.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},Jh=(t,e,n,s)=>{const i=t._zod.def,r=i.inclusive===!1,o=i.options.map((a,l)=>G(a,e,{...s,path:[...s.path,r?"oneOf":"anyOf",l]}));r?n.oneOf=o:n.anyOf=o},Xh=(t,e,n,s)=>{const i=t._zod.def,r=G(i.left,e,{...s,path:[...s.path,"allOf",0]}),o=G(i.right,e,{...s,path:[...s.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,l=[...a(r)?r.allOf:[r],...a(o)?o.allOf:[o]];n.allOf=l},ep=(t,e,n,s)=>{const i=n,r=t._zod.def;i.type="object";const o=r.keyType,l=o._zod.bag?.patterns;if(r.mode==="loose"&&l&&l.size>0){const u=G(r.valueType,e,{...s,path:[...s.path,"patternProperties","*"]});i.patternProperties={};for(const d of l)i.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=G(r.keyType,e,{...s,path:[...s.path,"propertyNames"]})),i.additionalProperties=G(r.valueType,e,{...s,path:[...s.path,"additionalProperties"]});const c=o._zod.values;if(c){const u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(i.required=u)}},tp=(t,e,n,s)=>{const i=t._zod.def,r=G(i.innerType,e,s),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[r,{type:"null"}]},np=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType},sp=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ip=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},rp=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},op=(t,e,n,s)=>{const i=t._zod.def,r=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;G(r,e,s);const o=e.seen.get(t);o.ref=r},ap=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType,n.readOnly=!0},ja=(t,e,n,s)=>{const i=t._zod.def;G(i.innerType,e,s);const r=e.seen.get(t);r.ref=i.innerType},lp=S("ZodISODateTime",(t,e)=>{lf.init(t,e),W.init(t,e)});function cp(t){return ph(lp,t)}const up=S("ZodISODate",(t,e)=>{cf.init(t,e),W.init(t,e)});function dp(t){return gh(up,t)}const fp=S("ZodISOTime",(t,e)=>{uf.init(t,e),W.init(t,e)});function hp(t){return mh(fp,t)}const pp=S("ZodISODuration",(t,e)=>{df.init(t,e),W.init(t,e)});function gp(t){return yh(pp,t)}const mp=(t,e)=>{ba.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>ed(t,n)},flatten:{value:n=>Xu(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,si,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,si,2)}},isEmpty:{get(){return t.issues.length===0}}})},he=S("ZodError",mp,{Parent:Error}),yp=Ni(he),vp=xi(he),bp=ts(he),wp=ns(he),Sp=sd(he),Ep=id(he),Ap=rd(he),Cp=od(he),Dp=ad(he),kp=ld(he),Rp=cd(he),Tp=ud(he),Z=S("ZodType",(t,e)=>(V.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:jn(t,"input"),output:jn(t,"output")}}),t.toJSONSchema=Bh(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone(Be(e,{checks:[...e.checks??[],...n.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0}),t.with=t.check,t.clone=(n,s)=>Fe(t,n,s),t.brand=()=>t,t.register=((n,s)=>(n.add(t,s),t)),t.parse=(n,s)=>yp(t,n,s,{callee:t.parse}),t.safeParse=(n,s)=>bp(t,n,s),t.parseAsync=async(n,s)=>vp(t,n,s,{callee:t.parseAsync}),t.safeParseAsync=async(n,s)=>wp(t,n,s),t.spa=t.safeParseAsync,t.encode=(n,s)=>Sp(t,n,s),t.decode=(n,s)=>Ep(t,n,s),t.encodeAsync=async(n,s)=>Ap(t,n,s),t.decodeAsync=async(n,s)=>Cp(t,n,s),t.safeEncode=(n,s)=>Dp(t,n,s),t.safeDecode=(n,s)=>kp(t,n,s),t.safeEncodeAsync=async(n,s)=>Rp(t,n,s),t.safeDecodeAsync=async(n,s)=>Tp(t,n,s),t.refine=(n,s)=>t.check(Cg(n,s)),t.superRefine=n=>t.check(Dg(n)),t.overwrite=n=>t.check(Nt(n)),t.optional=()=>oo(t),t.exactOptional=()=>dg(t),t.nullable=()=>ao(t),t.nullish=()=>oo(ao(t)),t.nonoptional=n=>yg(t,n),t.array=()=>eg(t),t.or=n=>sg([t,n]),t.and=n=>rg(t,n),t.transform=n=>lo(t,cg(n)),t.default=n=>pg(t,n),t.prefault=n=>mg(t,n),t.catch=n=>bg(t,n),t.pipe=n=>lo(t,n),t.readonly=()=>Eg(t),t.describe=n=>{const s=t.clone();return Zt.add(s,{description:n}),s},Object.defineProperty(t,"description",{get(){return Zt.get(t)?.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return Zt.get(t);const s=t.clone();return Zt.add(s,n[0]),s},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=n=>n(t),t)),Ba=S("_ZodString",(t,e)=>{Pi.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(s,i,r)=>Hh(t,s,i);const n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...s)=>t.check(Ch(...s)),t.includes=(...s)=>t.check(Rh(...s)),t.startsWith=(...s)=>t.check(Th(...s)),t.endsWith=(...s)=>t.check(Mh(...s)),t.min=(...s)=>t.check(Ln(...s)),t.max=(...s)=>t.check(Na(...s)),t.length=(...s)=>t.check(xa(...s)),t.nonempty=(...s)=>t.check(Ln(1,...s)),t.lowercase=s=>t.check(Dh(s)),t.uppercase=s=>t.check(kh(s)),t.trim=()=>t.check(Oh()),t.normalize=(...s)=>t.check(Ih(...s)),t.toLowerCase=()=>t.check(_h()),t.toUpperCase=()=>t.check(Nh()),t.slugify=()=>t.check(xh())}),Mp=S("ZodString",(t,e)=>{Pi.init(t,e),Ba.init(t,e),t.email=n=>t.check(qf(Ip,n)),t.url=n=>t.check(Jf(Op,n)),t.jwt=n=>t.check(hh(Wp,n)),t.emoji=n=>t.check(Xf(_p,n)),t.guid=n=>t.check(Xr(so,n)),t.uuid=n=>t.check(Gf(pn,n)),t.uuidv4=n=>t.check(Qf(pn,n)),t.uuidv6=n=>t.check(Kf(pn,n)),t.uuidv7=n=>t.check(Yf(pn,n)),t.nanoid=n=>t.check(eh(Np,n)),t.guid=n=>t.check(Xr(so,n)),t.cuid=n=>t.check(th(xp,n)),t.cuid2=n=>t.check(nh(Pp,n)),t.ulid=n=>t.check(sh(zp,n)),t.base64=n=>t.check(uh(Up,n)),t.base64url=n=>t.check(dh(Vp,n)),t.xid=n=>t.check(ih(Lp,n)),t.ksuid=n=>t.check(rh(jp,n)),t.ipv4=n=>t.check(oh(Bp,n)),t.ipv6=n=>t.check(ah(Fp,n)),t.cidrv4=n=>t.check(lh(Hp,n)),t.cidrv6=n=>t.check(ch($p,n)),t.e164=n=>t.check(fh(Zp,n)),t.datetime=n=>t.check(cp(n)),t.date=n=>t.check(dp(n)),t.time=n=>t.check(hp(n)),t.duration=n=>t.check(gp(n))});function lS(t){return Wf(Mp,t)}const W=S("ZodStringFormat",(t,e)=>{F.init(t,e),Ba.init(t,e)}),Ip=S("ZodEmail",(t,e)=>{Jd.init(t,e),W.init(t,e)}),so=S("ZodGUID",(t,e)=>{Kd.init(t,e),W.init(t,e)}),pn=S("ZodUUID",(t,e)=>{Yd.init(t,e),W.init(t,e)}),Op=S("ZodURL",(t,e)=>{Xd.init(t,e),W.init(t,e)}),_p=S("ZodEmoji",(t,e)=>{ef.init(t,e),W.init(t,e)}),Np=S("ZodNanoID",(t,e)=>{tf.init(t,e),W.init(t,e)}),xp=S("ZodCUID",(t,e)=>{nf.init(t,e),W.init(t,e)}),Pp=S("ZodCUID2",(t,e)=>{sf.init(t,e),W.init(t,e)}),zp=S("ZodULID",(t,e)=>{rf.init(t,e),W.init(t,e)}),Lp=S("ZodXID",(t,e)=>{of.init(t,e),W.init(t,e)}),jp=S("ZodKSUID",(t,e)=>{af.init(t,e),W.init(t,e)}),Bp=S("ZodIPv4",(t,e)=>{ff.init(t,e),W.init(t,e)}),Fp=S("ZodIPv6",(t,e)=>{hf.init(t,e),W.init(t,e)}),Hp=S("ZodCIDRv4",(t,e)=>{pf.init(t,e),W.init(t,e)}),$p=S("ZodCIDRv6",(t,e)=>{gf.init(t,e),W.init(t,e)}),Up=S("ZodBase64",(t,e)=>{mf.init(t,e),W.init(t,e)}),Vp=S("ZodBase64URL",(t,e)=>{vf.init(t,e),W.init(t,e)}),Zp=S("ZodE164",(t,e)=>{bf.init(t,e),W.init(t,e)}),Wp=S("ZodJWT",(t,e)=>{Sf.init(t,e),W.init(t,e)}),Fa=S("ZodNumber",(t,e)=>{Ma.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(s,i,r)=>$h(t,s,i),t.gt=(s,i)=>t.check(to(s,i)),t.gte=(s,i)=>t.check(Rs(s,i)),t.min=(s,i)=>t.check(Rs(s,i)),t.lt=(s,i)=>t.check(eo(s,i)),t.lte=(s,i)=>t.check(ks(s,i)),t.max=(s,i)=>t.check(ks(s,i)),t.int=s=>t.check(io(s)),t.safe=s=>t.check(io(s)),t.positive=s=>t.check(to(0,s)),t.nonnegative=s=>t.check(Rs(0,s)),t.negative=s=>t.check(eo(0,s)),t.nonpositive=s=>t.check(ks(0,s)),t.multipleOf=(s,i)=>t.check(no(s,i)),t.step=(s,i)=>t.check(no(s,i)),t.finite=()=>t;const n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function cS(t){return vh(Fa,t)}const qp=S("ZodNumberFormat",(t,e)=>{Ef.init(t,e),Fa.init(t,e)});function io(t){return bh(qp,t)}const Gp=S("ZodBoolean",(t,e)=>{Af.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Uh(t,n,s)});function uS(t){return wh(Gp,t)}const Qp=S("ZodAny",(t,e)=>{Cf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Zh()});function dS(){return Sh(Qp)}const Kp=S("ZodUnknown",(t,e)=>{Df.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Wh()});function ro(){return Eh(Kp)}const Yp=S("ZodNever",(t,e)=>{kf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Vh(t,n,s)});function Jp(t){return Ah(Yp,t)}const Xp=S("ZodArray",(t,e)=>{Rf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Kh(t,n,s,i),t.element=e.element,t.min=(n,s)=>t.check(Ln(n,s)),t.nonempty=n=>t.check(Ln(1,n)),t.max=(n,s)=>t.check(Na(n,s)),t.length=(n,s)=>t.check(xa(n,s)),t.unwrap=()=>t.element});function eg(t,e){return Ph(Xp,t,e)}const tg=S("ZodObject",(t,e)=>{Mf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Yh(t,n,s,i),x(t,"shape",()=>e.shape),t.keyof=()=>ag(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:ro()}),t.loose=()=>t.clone({...t._zod.def,catchall:ro()}),t.strict=()=>t.clone({...t._zod.def,catchall:Jp()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>Gu(t,n),t.safeExtend=n=>Qu(t,n),t.merge=n=>Ku(t,n),t.pick=n=>Wu(t,n),t.omit=n=>qu(t,n),t.partial=(...n)=>Yu(Ha,t,n[0]),t.required=(...n)=>Ju($a,t,n[0])});function fS(t,e){const n={type:"object",shape:t??{},...T(e)};return new tg(n)}const ng=S("ZodUnion",(t,e)=>{If.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Jh(t,n,s,i),t.options=e.options});function sg(t,e){return new ng({type:"union",options:t,...T(e)})}const ig=S("ZodIntersection",(t,e)=>{Of.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Xh(t,n,s,i)});function rg(t,e){return new ig({type:"intersection",left:t,right:e})}const og=S("ZodRecord",(t,e)=>{_f.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ep(t,n,s,i),t.keyType=e.keyType,t.valueType=e.valueType});function hS(t,e,n){return new og({type:"record",keyType:t,valueType:e,...T(n)})}const ri=S("ZodEnum",(t,e)=>{Nf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(s,i,r)=>qh(t,s,i),t.enum=e.entries,t.options=Object.values(e.entries);const n=new Set(Object.keys(e.entries));t.extract=(s,i)=>{const r={};for(const o of s)if(n.has(o))r[o]=e.entries[o];else throw new Error(`Key ${o} not found in enum`);return new ri({...e,checks:[],...T(i),entries:r})},t.exclude=(s,i)=>{const r={...e.entries};for(const o of s)if(n.has(o))delete r[o];else throw new Error(`Key ${o} not found in enum`);return new ri({...e,checks:[],...T(i),entries:r})}});function ag(t,e){const n=Array.isArray(t)?Object.fromEntries(t.map(s=>[s,s])):t;return new ri({type:"enum",entries:n,...T(e)})}const lg=S("ZodTransform",(t,e)=>{xf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Qh(t,n),t._zod.parse=(n,s)=>{if(s.direction==="backward")throw new ha(t.constructor.name);n.addIssue=r=>{if(typeof r=="string")n.issues.push(Xt(r,n.value,e));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),n.issues.push(Xt(o))}};const i=e.transform(n.value,n);return i instanceof Promise?i.then(r=>(n.value=r,n)):(n.value=i,n)}});function cg(t){return new lg({type:"transform",transform:t})}const Ha=S("ZodOptional",(t,e)=>{_a.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ja(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function oo(t){return new Ha({type:"optional",innerType:t})}const ug=S("ZodExactOptional",(t,e)=>{Pf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ja(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function dg(t){return new ug({type:"optional",innerType:t})}const fg=S("ZodNullable",(t,e)=>{zf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>tp(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function ao(t){return new fg({type:"nullable",innerType:t})}const hg=S("ZodDefault",(t,e)=>{Lf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>sp(t,n,s,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function pg(t,e){return new hg({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():ya(e)}})}const gg=S("ZodPrefault",(t,e)=>{jf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ip(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function mg(t,e){return new gg({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():ya(e)}})}const $a=S("ZodNonOptional",(t,e)=>{Bf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>np(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function yg(t,e){return new $a({type:"nonoptional",innerType:t,...T(e)})}const vg=S("ZodCatch",(t,e)=>{Ff.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>rp(t,n,s,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function bg(t,e){return new vg({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const wg=S("ZodPipe",(t,e)=>{Hf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>op(t,n,s,i),t.in=e.in,t.out=e.out});function lo(t,e){return new wg({type:"pipe",in:t,out:e})}const Sg=S("ZodReadonly",(t,e)=>{$f.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>ap(t,n,s,i),t.unwrap=()=>t._zod.def.innerType});function Eg(t){return new Sg({type:"readonly",innerType:t})}const Ag=S("ZodCustom",(t,e)=>{Uf.init(t,e),Z.init(t,e),t._zod.processJSONSchema=(n,s,i)=>Gh(t,n)});function Cg(t,e={}){return zh(Ag,t,e)}function Dg(t){return Lh(t)}const Ua={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"};const Va=([t,e,n])=>{const s=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.keys(e).forEach(i=>{s.setAttribute(i,String(e[i]))}),n?.length&&n.forEach(i=>{const r=Va(i);s.appendChild(r)}),s},kg=(t,e={})=>{const s={...Ua,...e};return Va(["svg",s,t])};const Rg=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const Tg=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim();const Mg=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,s)=>s?s.toUpperCase():n.toLowerCase());const Ig=t=>{const e=Mg(t);return e.charAt(0).toUpperCase()+e.slice(1)};const Og=t=>Array.from(t.attributes).reduce((e,n)=>(e[n.name]=n.value,e),{}),co=t=>typeof t=="string"?t:!t||!t.class?"":t.class&&typeof t.class=="string"?t.class.split(" "):t.class&&Array.isArray(t.class)?t.class:"",uo=(t,{nameAttr:e,icons:n,attrs:s})=>{const i=t.getAttribute(e);if(i==null)return;const r=Ig(i),o=n[r];if(!o)return console.warn(`${t.outerHTML} icon name was not found in the provided icons object.`);const a=Og(t),l=Rg(a)?{}:{"aria-hidden":"true"},c={...Ua,"data-lucide":i,...l,...s,...a},u=co(a),d=co(s),f=Tg("lucide",`lucide-${i}`,...u,...d);f&&Object.assign(c,{class:f});const h=kg(o,c);return t.parentNode?.replaceChild(h,t)};const pS=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"}]];const gS=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"}],["path",{d:"M10 12h4"}]];const mS=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]];const yS=[["path",{d:"M3 19V5"}],["path",{d:"m13 6-6 6 6 6"}],["path",{d:"M7 12h14"}]];const vS=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]];const bS=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"}],["path",{d:"m9 12 2 2 4-4"}]];const wS=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2"}],["path",{d:"M6 20h4"}],["path",{d:"M14 10h4"}],["path",{d:"M6 14h2v6"}],["path",{d:"M14 4h2v6"}]];const SS=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1"}]];const ES=[["path",{d:"M12 7v14"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}]];const AS=[["path",{d:"M12 8V4H8"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}],["path",{d:"M2 14h2"}],["path",{d:"M20 14h2"}],["path",{d:"M15 13v2"}],["path",{d:"M9 13v2"}]];const CS=[["path",{d:"M10 19.655A6 6 0 0 1 6 14v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 3.97"}],["path",{d:"M14 15.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];const DS=[["path",{d:"M12 20v-9"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M22 13h-4"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];const kS=[["path",{d:"M8 2v4"}],["path",{d:"M16 2v4"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}],["path",{d:"M3 10h18"}]];const RS=[["path",{d:"M20 6 9 17l-5-5"}]];const TS=[["path",{d:"m6 9 6 6 6-6"}]];const MS=[["path",{d:"m9 18 6-6-6-6"}]];const IS=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 12-4-4-4 4"}],["path",{d:"M12 16V8"}]];const OS=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];const _S=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}],["path",{d:"M12 11h4"}],["path",{d:"M12 16h4"}],["path",{d:"M8 11h.01"}],["path",{d:"M8 16h.01"}]];const NS=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6h4"}]];const xS=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]];const PS=[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]];const zS=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z"}]];const LS=[["line",{x1:"15",x2:"15",y1:"12",y2:"18"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];const jS=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];const BS=[["path",{d:"M12 20v2"}],["path",{d:"M12 2v2"}],["path",{d:"M17 20v2"}],["path",{d:"M17 2v2"}],["path",{d:"M2 12h2"}],["path",{d:"M2 17h2"}],["path",{d:"M2 7h2"}],["path",{d:"M20 12h2"}],["path",{d:"M20 17h2"}],["path",{d:"M20 7h2"}],["path",{d:"M7 20v2"}],["path",{d:"M7 2v2"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1"}]];const FS=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 15 21.84"}],["path",{d:"M21 5V8"}],["path",{d:"M21 12L18 17H22L19 22"}],["path",{d:"M3 12A9 3 0 0 0 14.59 14.87"}]];const HS=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];const $S=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];const US=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21"}],["path",{d:"m5.082 11.09 8.828 8.828"}]];const VS=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];const ZS=[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M2 15h10"}],["path",{d:"m9 18 3-3-3-3"}]];const WS=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5"}],["path",{d:"M13.3 16.3 15 18"}]];const qS=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M12 12v6"}],["path",{d:"m15 15-3-3-3 3"}]];const GS=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"}],["path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];const QS=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];const KS=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1"}]];const YS=[["path",{d:"M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473"}],["path",{d:"m16.5 3.5 5 5"}],["path",{d:"m21.5 3.5-5 5"}]];const JS=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];const XS=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];const eE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M12 7v5l4 2"}]];const tE=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]];const nE=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];const sE=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"}]];const iE=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];const rE=[["path",{d:"M13 5h8"}],["path",{d:"M13 12h8"}],["path",{d:"M13 19h8"}],["path",{d:"m3 17 2 2 4-4"}],["path",{d:"m3 7 2 2 4-4"}]];const oE=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];const aE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];const lE=[["path",{d:"m16 17 5-5-5-5"}],["path",{d:"M21 12H9"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}]];const cE=[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]];const uE=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"}]];const dE=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]];const fE=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1"}]];const hE=[["path",{d:"M12 17v4"}],["path",{d:"m14.305 7.53.923-.382"}],["path",{d:"m15.228 4.852-.923-.383"}],["path",{d:"m16.852 3.228-.383-.924"}],["path",{d:"m16.852 8.772-.383.923"}],["path",{d:"m19.148 3.228.383-.924"}],["path",{d:"m19.53 9.696-.382-.924"}],["path",{d:"m20.772 4.852.924-.383"}],["path",{d:"m20.772 7.148.924.383"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7"}],["path",{d:"M8 21h8"}],["circle",{cx:"18",cy:"6",r:"3"}]];const pE=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"}],["path",{d:"M12 12V8"}]];const gE=[["path",{d:"M16 16h6"}],["path",{d:"M19 13v6"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14"}],["path",{d:"m7.5 4.27 9 5.15"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12"}]];const mE=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];const yE=[["path",{d:"M11 7 6 2"}],["path",{d:"M18.992 12H2.041"}],["path",{d:"M21.145 18.38A3.34 3.34 0 0 1 20 16.5a3.3 3.3 0 0 1-1.145 1.88c-.575.46-.855 1.02-.855 1.595A2 2 0 0 0 20 22a2 2 0 0 0 2-2.025c0-.58-.285-1.13-.855-1.595"}],["path",{d:"m8.5 4.5 2.148-2.148a1.205 1.205 0 0 1 1.704 0l7.296 7.296a1.205 1.205 0 0 1 0 1.704l-7.592 7.592a3.615 3.615 0 0 1-5.112 0l-3.888-3.888a3.615 3.615 0 0 1 0-5.112L5.67 7.33"}]];const vE=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"}]];const bE=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]];const wE=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];const SE=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]];const EE=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"}],["path",{d:"m2 22 3-3"}],["path",{d:"M7.5 13.5 10 11"}],["path",{d:"M10.5 16.5 13 14"}],["path",{d:"m18 3-4 4h6l-4 4"}]];const AE=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];const CE=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34"}],["path",{d:"M4 6h.01"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67"}],["path",{d:"M12 18h.01"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67"}],["circle",{cx:"12",cy:"12",r:"2"}],["path",{d:"m13.41 10.59 5.66-5.66"}]];const DE=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478"}],["circle",{cx:"12",cy:"12",r:"2"}]];const kE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];const RE=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05"}]];const TE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];const ME=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];const IE=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]];const OE=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];const _E=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];const NE=[["path",{d:"M14 17H5"}],["path",{d:"M19 7h-9"}],["circle",{cx:"17",cy:"17",r:"3"}],["circle",{cx:"7",cy:"7",r:"3"}]];const xE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];const PE=[["circle",{cx:"18",cy:"5",r:"3"}],["circle",{cx:"6",cy:"12",r:"3"}],["circle",{cx:"18",cy:"19",r:"3"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49"}]];const zE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"M12 8v4"}],["path",{d:"M12 16h.01"}]];const LE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"m9 12 2 2 4-4"}]];const jE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}]];const BE=[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z"}],["path",{d:"M21 12h1"}],["path",{d:"M18.5 4.5 18 5"}],["path",{d:"M2 12h1"}],["path",{d:"M12 2v1"}],["path",{d:"m4.929 4.929.707.707"}],["path",{d:"M12 12v6"}]];const FE=[["path",{d:"M21 4v16"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z"}]];const HE=[["path",{d:"M10 5H3"}],["path",{d:"M12 19H3"}],["path",{d:"M14 3v4"}],["path",{d:"M16 17v4"}],["path",{d:"M21 12h-9"}],["path",{d:"M21 19h-5"}],["path",{d:"M21 5h-7"}],["path",{d:"M8 10v4"}],["path",{d:"M8 12H3"}]];const $E=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"}],["path",{d:"M20 2v4"}],["path",{d:"M22 4h-4"}],["circle",{cx:"4",cy:"20",r:"2"}]];const UE=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];const VE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];const ZE=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"}]];const WE=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];const qE=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];const GE=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16"}]];const QE=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["circle",{cx:"9",cy:"7",r:"4"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11"}]];const KE=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]];const YE=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2"}]];const JE=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];const _g=({icons:t={},nameAttr:e="data-lucide",attrs:n={},root:s=document,inTemplates:i}={})=>{if(!Object.values(t).length)throw new Error(`Please provide an icons object.
|
|
40
40
|
If you want to use all the icons you can import it like:
|
|
41
41
|
\`import { createIcons, icons } from 'lucide';
|
|
42
|
-
lucide.createIcons({icons});\``);if(typeof s>"u")throw new Error("`createIcons()` only works in a browser environment.");if(Array.from(s.querySelectorAll(`[${e}]`)).forEach(o=>uo(o,{nameAttr:e,icons:t,attrs:n})),i&&Array.from(s.querySelectorAll("template")).forEach(a=>_g({icons:t,nameAttr:e,attrs:n,root:a.content,inTemplates:i})),e==="data-lucide"){const o=s.querySelectorAll("[icon-name]");o.length>0&&(console.warn("[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide"),Array.from(o).forEach(a=>uo(a,{nameAttr:"icon-name",icons:t,attrs:n})))}},zi=Symbol.for("yaml.alias"),oi=Symbol.for("yaml.document"),_e=Symbol.for("yaml.map"),Za=Symbol.for("yaml.pair"),we=Symbol.for("yaml.scalar"),xt=Symbol.for("yaml.seq"),fe=Symbol.for("yaml.node.type")
|
|
43
|
-
`)}}te.defaultYaml={explicit:!1,version:"1.2"};te.defaultTags={"!!":"tag:yaml.org,2002:"};function Ya(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function Ja(t){const e=new Set;return lt(t,{Value(n,s){s.anchor&&e.add(s.anchor)}}),e}function Xa(t,e){for(let n=1;;++n){const s=`${t}${n}`;if(!e.has(s))return s}}function Pg(t,e){const n=[],s=new Map;let i=null;return{onAnchor:r=>{n.push(r),i??(i=Ja(t));const o=Xa(e,i);return i.add(o),o},setAnchors:()=>{for(const r of n){const o=s.get(r);if(typeof o=="object"&&o.anchor&&(P(o.node)
|
|
42
|
+
lucide.createIcons({icons});\``);if(typeof s>"u")throw new Error("`createIcons()` only works in a browser environment.");if(Array.from(s.querySelectorAll(`[${e}]`)).forEach(o=>uo(o,{nameAttr:e,icons:t,attrs:n})),i&&Array.from(s.querySelectorAll("template")).forEach(a=>_g({icons:t,nameAttr:e,attrs:n,root:a.content,inTemplates:i})),e==="data-lucide"){const o=s.querySelectorAll("[icon-name]");o.length>0&&(console.warn("[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide"),Array.from(o).forEach(a=>uo(a,{nameAttr:"icon-name",icons:t,attrs:n})))}},zi=Symbol.for("yaml.alias"),oi=Symbol.for("yaml.document"),_e=Symbol.for("yaml.map"),Za=Symbol.for("yaml.pair"),we=Symbol.for("yaml.scalar"),xt=Symbol.for("yaml.seq"),fe=Symbol.for("yaml.node.type"),He=t=>!!t&&typeof t=="object"&&t[fe]===zi,at=t=>!!t&&typeof t=="object"&&t[fe]===oi,Pt=t=>!!t&&typeof t=="object"&&t[fe]===_e,B=t=>!!t&&typeof t=="object"&&t[fe]===Za,P=t=>!!t&&typeof t=="object"&&t[fe]===we,zt=t=>!!t&&typeof t=="object"&&t[fe]===xt;function H(t){if(t&&typeof t=="object")switch(t[fe]){case _e:case xt:return!0}return!1}function U(t){if(t&&typeof t=="object")switch(t[fe]){case zi:case _e:case we:case xt:return!0}return!1}const Wa=t=>(P(t)||H(t))&&!!t.anchor,ne=Symbol("break visit"),qa=Symbol("skip children"),be=Symbol("remove node");function lt(t,e){const n=Ga(e);at(t)?mt(null,t.contents,n,Object.freeze([t]))===be&&(t.contents=null):mt(null,t,n,Object.freeze([]))}lt.BREAK=ne;lt.SKIP=qa;lt.REMOVE=be;function mt(t,e,n,s){const i=Qa(t,e,n,s);if(U(i)||B(i))return Ka(t,s,i),mt(t,i,n,s);if(typeof i!="symbol"){if(H(e)){s=Object.freeze(s.concat(e));for(let r=0;r<e.items.length;++r){const o=mt(r,e.items[r],n,s);if(typeof o=="number")r=o-1;else{if(o===ne)return ne;o===be&&(e.items.splice(r,1),r-=1)}}}else if(B(e)){s=Object.freeze(s.concat(e));const r=mt("key",e.key,n,s);if(r===ne)return ne;r===be&&(e.key=null);const o=mt("value",e.value,n,s);if(o===ne)return ne;o===be&&(e.value=null)}}return i}async function is(t,e){const n=Ga(e);at(t)?await yt(null,t.contents,n,Object.freeze([t]))===be&&(t.contents=null):await yt(null,t,n,Object.freeze([]))}is.BREAK=ne;is.SKIP=qa;is.REMOVE=be;async function yt(t,e,n,s){const i=await Qa(t,e,n,s);if(U(i)||B(i))return Ka(t,s,i),yt(t,i,n,s);if(typeof i!="symbol"){if(H(e)){s=Object.freeze(s.concat(e));for(let r=0;r<e.items.length;++r){const o=await yt(r,e.items[r],n,s);if(typeof o=="number")r=o-1;else{if(o===ne)return ne;o===be&&(e.items.splice(r,1),r-=1)}}}else if(B(e)){s=Object.freeze(s.concat(e));const r=await yt("key",e.key,n,s);if(r===ne)return ne;r===be&&(e.key=null);const o=await yt("value",e.value,n,s);if(o===ne)return ne;o===be&&(e.value=null)}}return i}function Ga(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Qa(t,e,n,s){if(typeof n=="function")return n(t,e,s);if(Pt(e))return n.Map?.(t,e,s);if(zt(e))return n.Seq?.(t,e,s);if(B(e))return n.Pair?.(t,e,s);if(P(e))return n.Scalar?.(t,e,s);if(He(e))return n.Alias?.(t,e,s)}function Ka(t,e,n){const s=e[e.length-1];if(H(s))s.items[t]=n;else if(B(s))t==="key"?s.key=n:s.value=n;else if(at(s))s.contents=n;else{const i=He(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const Ng={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},xg=t=>t.replace(/[!,[\]{}]/g,e=>Ng[e]);class te{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},te.defaultYaml,e),this.tags=Object.assign({},te.defaultTags,n)}clone(){const e=new te(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new te(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:te.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},te.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:te.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},te.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),i=s.shift();switch(i){case"%TAG":{if(s.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[r,o]=s;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[r]=s;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{const o=/^\d+\.\d+$/.test(r);return n(6,`Unsupported YAML version ${r}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,s,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);const r=this.tags[s];if(r)try{return r+decodeURIComponent(i)}catch(o){return n(String(o)),null}return s==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,s]of Object.entries(this.tags))if(e.startsWith(s))return n+xg(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let i;if(e&&s.length>0&&U(e.contents)){const r={};lt(e.contents,(o,a)=>{U(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[r,o]of s)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&n.push(`%TAG ${r} ${o}`);return n.join(`
|
|
43
|
+
`)}}te.defaultYaml={explicit:!1,version:"1.2"};te.defaultTags={"!!":"tag:yaml.org,2002:"};function Ya(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function Ja(t){const e=new Set;return lt(t,{Value(n,s){s.anchor&&e.add(s.anchor)}}),e}function Xa(t,e){for(let n=1;;++n){const s=`${t}${n}`;if(!e.has(s))return s}}function Pg(t,e){const n=[],s=new Map;let i=null;return{onAnchor:r=>{n.push(r),i??(i=Ja(t));const o=Xa(e,i);return i.add(o),o},setAnchors:()=>{for(const r of n){const o=s.get(r);if(typeof o=="object"&&o.anchor&&(P(o.node)||H(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:s}}function vt(t,e,n,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let i=0,r=s.length;i<r;++i){const o=s[i],a=vt(t,s,String(i),o);a===void 0?delete s[i]:a!==o&&(s[i]=a)}else if(s instanceof Map)for(const i of Array.from(s.keys())){const r=s.get(i),o=vt(t,s,i,r);o===void 0?s.delete(i):o!==r&&s.set(i,o)}else if(s instanceof Set)for(const i of Array.from(s)){const r=vt(t,s,i,i);r===void 0?s.delete(i):r!==i&&(s.delete(i),s.add(r))}else for(const[i,r]of Object.entries(s)){const o=vt(t,s,i,r);o===void 0?delete s[i]:o!==r&&(s[i]=o)}return t.call(e,n,s)}function de(t,e,n){if(Array.isArray(t))return t.map((s,i)=>de(s,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!Wa(t))return t.toJSON(e,n);const s={aliasCount:0,count:1,res:void 0};n.anchors.set(t,s),n.onCreate=r=>{s.res=r,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!n?.keep?Number(t):t}class Li{constructor(e){Object.defineProperty(this,fe,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:s,onAnchor:i,reviver:r}={}){if(!at(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=de(this,"",o);if(typeof i=="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof r=="function"?vt(r,{"":a},"",a):a}}class rs extends Li{constructor(e){super(zi),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){let s;n?.aliasResolveCache?s=n.aliasResolveCache:(s=[],lt(e,{Node:(r,o)=>{(He(o)||Wa(o))&&s.push(o)}}),n&&(n.aliasResolveCache=s));let i;for(const r of s){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,n){if(!n)return{source:this.source};const{anchors:s,doc:i,maxAliasCount:r}=n,o=this.resolve(i,n);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=s.get(o);if(a||(de(o,null,n),a=s.get(o)),a?.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=kn(i,o,s)),a.count*a.aliasCount>r)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,n,s){const i=`*${this.source}`;if(e){if(Ya(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}}function kn(t,e,n){if(He(e)){const s=e.resolve(t),i=n&&s&&n.get(s);return i?i.count*i.aliasCount:0}else if(H(e)){let s=0;for(const i of e.items){const r=kn(t,i,n);r>s&&(s=r)}return s}else if(B(e)){const s=kn(t,e.key,n),i=kn(t,e.value,n);return Math.max(s,i)}return 1}const el=t=>!t||typeof t!="function"&&typeof t!="object";class I extends Li{constructor(e){super(we),this.value=e}toJSON(e,n){return n?.keep?this.value:de(this.value,e,n)}toString(){return String(this.value)}}I.BLOCK_FOLDED="BLOCK_FOLDED";I.BLOCK_LITERAL="BLOCK_LITERAL";I.PLAIN="PLAIN";I.QUOTE_DOUBLE="QUOTE_DOUBLE";I.QUOTE_SINGLE="QUOTE_SINGLE";const zg="tag:yaml.org,2002:";function Lg(t,e,n){if(e){const s=n.filter(r=>r.tag===e),i=s.find(r=>!r.format)??s[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return n.find(s=>s.identify?.(t)&&!s.format)}function en(t,e,n){if(at(t)&&(t=t.contents),U(t))return t;if(B(t)){const d=n.schema[_e].createNode?.(n.schema,null,n);return d.items.push(t),d}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:s,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=n;let l;if(s&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=i(t)),new rs(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=zg+e.slice(2));let c=Lg(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const d=new I(t);return l&&(l.node=d),d}c=t instanceof Map?o[_e]:Symbol.iterator in Object(t)?o[xt]:o[_e]}r&&(r(c),delete n.onTagObj);const u=c?.createNode?c.createNode(n.schema,t,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,t,n):new I(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}function Bn(t,e,n){let s=n;for(let i=e.length-1;i>=0;--i){const r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){const o=[];o[r]=s,s=o}else s=new Map([[r,s]])}return en(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Wt=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class tl extends Li{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(s=>U(s)||B(s)?s.clone(e):s),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Wt(e))this.add(n);else{const[s,...i]=e,r=this.get(s,!0);if(H(r))r.addIn(i,n);else if(r===void 0&&this.schema)this.set(s,Bn(this.schema,i,n));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}deleteIn(e){const[n,...s]=e;if(s.length===0)return this.delete(n);const i=this.get(n,!0);if(H(i))return i.deleteIn(s);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}getIn(e,n){const[s,...i]=e,r=this.get(s,!0);return i.length===0?!n&&P(r)?r.value:r:H(r)?r.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!B(n))return!1;const s=n.value;return s==null||e&&P(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[n,...s]=e;if(s.length===0)return this.has(n);const i=this.get(n,!0);return H(i)?i.hasIn(s):!1}setIn(e,n){const[s,...i]=e;if(i.length===0)this.set(s,n);else{const r=this.get(s,!0);if(H(r))r.setIn(i,n);else if(r===void 0&&this.schema)this.set(s,Bn(this.schema,i,n));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}}const jg=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Ee(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Ge=(t,e,n)=>t.endsWith(`
|
|
44
44
|
`)?Ee(n,e):n.includes(`
|
|
45
45
|
`)?`
|
|
46
|
-
`+Ee(n,e):(t.endsWith(" ")?"":" ")+n,nl="flow",ai="block",
|
|
46
|
+
`+Ee(n,e):(t.endsWith(" ")?"":" ")+n,nl="flow",ai="block",Rn="quoted";function os(t,e,n="flow",{indentAtStart:s,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return t;i<r&&(r=0);const l=Math.max(1+r,1+i-e.length);if(t.length<=l)return t;const c=[],u={};let d=i-e.length;typeof s=="number"&&(s>i-Math.max(2,r)?c.push(0):d=i-s);let f,h,m=!1,p=-1,g=-1,v=-1;n===ai&&(p=fo(t,p,e.length),p!==-1&&(d=p+l));for(let E;E=t[p+=1];){if(n===Rn&&E==="\\"){switch(g=p,t[p+1]){case"x":p+=3;break;case"u":p+=5;break;case"U":p+=9;break;default:p+=1}v=p}if(E===`
|
|
47
47
|
`)n===ai&&(p=fo(t,p,e.length)),d=p+e.length+l,f=void 0;else{if(E===" "&&h&&h!==" "&&h!==`
|
|
48
48
|
`&&h!==" "){const A=t[p+1];A&&A!==" "&&A!==`
|
|
49
|
-
`&&A!==" "&&(f=p)}if(p>=d)if(f)c.push(f),d=f+l,f=void 0;else if(n===
|
|
50
|
-
${e}${t.slice(0,D)}`:(n===
|
|
49
|
+
`&&A!==" "&&(f=p)}if(p>=d)if(f)c.push(f),d=f+l,f=void 0;else if(n===Rn){for(;h===" "||h===" ";)h=E,E=t[p+=1],m=!0;const A=p>v+1?p-2:g-1;if(u[A])return t;c.push(A),u[A]=!0,d=A+l,f=void 0}else m=!0}h=E}if(m&&a&&a(),c.length===0)return t;o&&o();let w=t.slice(0,c[0]);for(let E=0;E<c.length;++E){const A=c[E],D=c[E+1]||t.length;A===0?w=`
|
|
50
|
+
${e}${t.slice(0,D)}`:(n===Rn&&u[A]&&(w+=`${t[A]}\\`),w+=`
|
|
51
51
|
${e}${t.slice(A+1,D)}`)}return w}function fo(t,e,n){let s=e,i=e+1,r=t[i];for(;r===" "||r===" ";)if(e<i+n)r=t[++e];else{do r=t[++e];while(r&&r!==`
|
|
52
52
|
`);s=e,i=e+1,r=t[i]}return s}const as=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),ls=t=>/^(%|---|\.\.\.)/m.test(t);function Bg(t,e,n){if(!e||e<0)return!1;const s=e-n,i=t.length;if(i<=s)return!1;for(let r=0,o=0;r<i;++r)if(t[r]===`
|
|
53
53
|
`){if(r-o>s)return!0;if(o=r+1,i-o<=s)return!1}return!0}function qt(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:s}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(ls(t)?" ":"");let o="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(o+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{o+=n.slice(a,l);const u=n.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(s||n[l+2]==='"'||n.length<i)l+=1;else{for(o+=n.slice(a,l)+`
|
|
54
54
|
|
|
55
55
|
`;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)o+=`
|
|
56
|
-
`,l+=2;o+=r,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,s?o:os(o,r,
|
|
56
|
+
`,l+=2;o+=r,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,s?o:os(o,r,Rn,as(e,!1))}function li(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
57
57
|
`)||/[ \t]\n|\n[ \t]/.test(t))return qt(t,e);const n=e.indent||(ls(t)?" ":""),s="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
58
58
|
${n}`)+"'";return e.implicitKey?s:os(s,n,nl,as(e,!1))}function bt(t,e){const{singleQuote:n}=e.options;let s;if(n===!1)s=qt;else{const i=t.includes('"'),r=t.includes("'");i&&!r?s=li:r&&!i?s=qt:s=n?li:qt}return s(t,e)}let ci;try{ci=new RegExp(`(^|(?<!
|
|
59
59
|
))
|
|
60
60
|
+(?!
|
|
61
|
-
|$)`,"g")}catch{ci=/\n+(?!\n|$)/g}function
|
|
61
|
+
|$)`,"g")}catch{ci=/\n+(?!\n|$)/g}function Tn({comment:t,type:e,value:n},s,i,r){const{blockQuote:o,commentString:a,lineWidth:l}=s.options;if(!o||/\n[\t ]+$/.test(n))return bt(n,s);const c=s.indent||(s.forceBlockIndent||ls(n)?" ":""),u=o==="literal"?!0:o==="folded"||e===I.BLOCK_FOLDED?!1:e===I.BLOCK_LITERAL?!0:!Bg(n,l,c.length);if(!n)return u?`|
|
|
62
62
|
`:`>
|
|
63
63
|
`;let d,f;for(f=n.length;f>0;--f){const D=n[f-1];if(D!==`
|
|
64
64
|
`&&D!==" "&&D!==" ")break}let h=n.substring(f);const m=h.indexOf(`
|
|
65
65
|
`);m===-1?d="-":n===h||m!==h.length-1?(d="+",r&&r()):d="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
|
|
66
66
|
`&&(h=h.slice(0,-1)),h=h.replace(ci,`$&${c}`));let p=!1,g,v=-1;for(g=0;g<n.length;++g){const D=n[g];if(D===" ")p=!0;else if(D===`
|
|
67
67
|
`)v=g;else break}let w=n.substring(0,v<g?v+1:g);w&&(n=n.substring(w.length),w=w.replace(/\n+/g,`$&${c}`));let A=(p?c?"2":"1":"")+d;if(t&&(A+=" "+a(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!u){const D=n.replace(/\n+/g,`
|
|
68
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let k=!1;const
|
|
68
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let k=!1;const R=as(s,!0);o!=="folded"&&e!==I.BLOCK_FOLDED&&(R.onOverflow=()=>{k=!0});const C=os(`${w}${D}${h}`,c,ai,R);if(!k)return`>${A}
|
|
69
69
|
${c}${C}`}return n=n.replace(/\n+/g,`$&${c}`),`|${A}
|
|
70
70
|
${c}${w}${n}${h}`}function Fg(t,e,n,s){const{type:i,value:r}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&r.includes(`
|
|
71
71
|
`)||u&&/[[\]{},]/.test(r))return bt(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||u||!r.includes(`
|
|
72
|
-
`)?bt(r,e):
|
|
73
|
-
`))return
|
|
74
|
-
${l}`);if(o){const f=p=>p.default&&p.tag!=="tag:yaml.org,2002:str"&&p.test?.test(d),{compat:h,tags:m}=e.doc.schema;if(m.some(f)||h?.some(f))return bt(r,e)}return a?d:os(d,l,nl,as(e,!1))}function rn(t,e,n,s){const{implicitKey:i,inFlow:r}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==
|
|
75
|
-
${e.indent}${a}`:a}function Ug({key:t,value:e},n,s,i){const{allNullValues:r,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:d}}=n;let f=U(t)&&t.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(
|
|
76
|
-
${a}:`):(g=`${g}:`,f&&(g+=Ge(g,n.indent,c(f))));let v,w,E;U(e)?(v=!!e.spaceBefore,w=e.commentBefore,E=e.comment):(v=!1,w=null,E=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!h&&!f&&P(e)&&(n.indentAtStart=g.length+1),p=!1,!u&&l.length>=2&&!n.inFlow&&!h&&zt(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let A=!1;const D=
|
|
77
|
-
`:"",w){const
|
|
78
|
-
${Ee(
|
|
72
|
+
`)?bt(r,e):Tn(t,e,n,s);if(!a&&!u&&i!==I.PLAIN&&r.includes(`
|
|
73
|
+
`))return Tn(t,e,n,s);if(ls(r)){if(l==="")return e.forceBlockIndent=!0,Tn(t,e,n,s);if(a&&l===c)return bt(r,e)}const d=r.replace(/\n+/g,`$&
|
|
74
|
+
${l}`);if(o){const f=p=>p.default&&p.tag!=="tag:yaml.org,2002:str"&&p.test?.test(d),{compat:h,tags:m}=e.doc.schema;if(m.some(f)||h?.some(f))return bt(r,e)}return a?d:os(d,l,nl,as(e,!1))}function rn(t,e,n,s){const{implicitKey:i,inFlow:r}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==I.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=I.QUOTE_DOUBLE);const l=u=>{switch(u){case I.BLOCK_FOLDED:case I.BLOCK_LITERAL:return i||r?bt(o.value,e):Tn(o,e,n,s);case I.QUOTE_DOUBLE:return qt(o.value,e);case I.QUOTE_SINGLE:return li(o.value,e);case I.PLAIN:return Fg(o,e,n,s);default:return null}};let c=l(a);if(c===null){const{defaultKeyType:u,defaultStringType:d}=e.options,f=i&&u||d;if(c=l(f),c===null)throw new Error(`Unsupported default string type ${f}`)}return c}function sl(t,e){const n=Object.assign({blockQuote:!0,commentString:jg,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let s;switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:s,options:n}}function Hg(t,e){if(e.tag){const i=t.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let n,s;if(P(e)){s=e.value;let i=t.filter(r=>r.identify?.(s));if(i.length>1){const r=i.filter(o=>o.test);r.length>0&&(i=r)}n=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else s=e,n=t.find(i=>i.nodeClass&&s instanceof i.nodeClass);if(!n){const i=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${i} value`)}return n}function $g(t,e,{anchors:n,doc:s}){if(!s.directives)return"";const i=[],r=(P(t)||H(t))&&t.anchor;r&&Ya(r)&&(n.add(r),i.push(`&${r}`));const o=t.tag??(e.default?null:e.tag);return o&&i.push(s.directives.tagString(o)),i.join(" ")}function Mt(t,e,n,s){if(B(t))return t.toString(e,n,s);if(He(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const r=U(t)?t:e.doc.createNode(t,{onTagObj:l=>i=l});i??(i=Hg(e.doc.schema.tags,r));const o=$g(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(r,e,n,s):P(r)?rn(r,e,n,s):r.toString(e,n,s);return o?P(r)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
75
|
+
${e.indent}${a}`:a}function Ug({key:t,value:e},n,s,i){const{allNullValues:r,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:d}}=n;let f=U(t)&&t.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(H(t)||!U(t)&&typeof t=="object"){const R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let h=!d&&(!t||f&&e==null&&!n.inFlow||H(t)||(P(t)?t.type===I.BLOCK_FOLDED||t.type===I.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(d||!r),indent:a+l});let m=!1,p=!1,g=Mt(t,n,()=>m=!0,()=>p=!0);if(!h&&!n.inFlow&&g.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(r||e==null)return m&&s&&s(),g===""?"?":h?`? ${g}`:g}else if(r&&!d||e==null&&h)return g=`? ${g}`,f&&!m?g+=Ge(g,n.indent,c(f)):p&&i&&i(),g;m&&(f=null),h?(f&&(g+=Ge(g,n.indent,c(f))),g=`? ${g}
|
|
76
|
+
${a}:`):(g=`${g}:`,f&&(g+=Ge(g,n.indent,c(f))));let v,w,E;U(e)?(v=!!e.spaceBefore,w=e.commentBefore,E=e.comment):(v=!1,w=null,E=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!h&&!f&&P(e)&&(n.indentAtStart=g.length+1),p=!1,!u&&l.length>=2&&!n.inFlow&&!h&&zt(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let A=!1;const D=Mt(e,n,()=>A=!0,()=>p=!0);let k=" ";if(f||v||w){if(k=v?`
|
|
77
|
+
`:"",w){const R=c(w);k+=`
|
|
78
|
+
${Ee(R,n.indent)}`}D===""&&!n.inFlow?k===`
|
|
79
79
|
`&&E&&(k=`
|
|
80
80
|
|
|
81
81
|
`):k+=`
|
|
82
|
-
${n.indent}`}else if(!h
|
|
83
|
-
`),N=C!==-1,Q=n.inFlow??e.flow??e.items.length===0;if(N||!Q){let pe=!1;if(N&&(
|
|
82
|
+
${n.indent}`}else if(!h&&H(e)){const R=D[0],C=D.indexOf(`
|
|
83
|
+
`),N=C!==-1,Q=n.inFlow??e.flow??e.items.length===0;if(N||!Q){let pe=!1;if(N&&(R==="&"||R==="!")){let z=D.indexOf(" ");R==="&"&&z!==-1&&z<C&&D[z+1]==="!"&&(z=D.indexOf(" ",z+1)),(z===-1||C<z)&&(pe=!0)}pe||(k=`
|
|
84
84
|
${n.indent}`)}}else(D===""||D[0]===`
|
|
85
|
-
`)&&(k="");return g+=k+D,n.inFlow?A&&s&&s():E&&!A?g+=Ge(g,n.indent,c(E)):p&&i&&i(),g}function il(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const gn="<<",Ce={identify:t=>t===gn||typeof t=="symbol"&&t.description===gn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new
|
|
85
|
+
`)&&(k="");return g+=k+D,n.inFlow?A&&s&&s():E&&!A?g+=Ge(g,n.indent,c(E)):p&&i&&i(),g}function il(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const gn="<<",Ce={identify:t=>t===gn||typeof t=="symbol"&&t.description===gn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new I(Symbol(gn)),{addToJSMap:rl}),stringify:()=>gn},Vg=(t,e)=>(Ce.identify(e)||P(e)&&(!e.type||e.type===I.PLAIN)&&Ce.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===Ce.tag&&n.default);function rl(t,e,n){if(n=t&&He(n)?n.resolve(t.doc):n,zt(n))for(const s of n.items)Ts(t,e,s);else if(Array.isArray(n))for(const s of n)Ts(t,e,s);else Ts(t,e,n)}function Ts(t,e,n){const s=t&&He(n)?n.resolve(t.doc):n;if(!Pt(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,t,Map);for(const[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function ol(t,e,{key:n,value:s}){if(U(n)&&n.addToJSMap)n.addToJSMap(t,e,s);else if(Vg(t,n))rl(t,e,s);else{const i=de(n,"",t);if(e instanceof Map)e.set(i,de(s,i,t));else if(e instanceof Set)e.add(i);else{const r=Zg(n,i,t),o=de(s,r,t);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function Zg(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(U(t)&&n?.doc){const s=sl(n.doc,{});s.anchors=new Set;for(const r of n.anchors.keys())s.anchors.add(r.anchor);s.inFlow=!0,s.inStringifyKey=!0;const i=t.toString(s);if(!n.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),il(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function ji(t,e,n){const s=en(t,void 0,n),i=en(e,void 0,n);return new X(s,i)}class X{constructor(e,n=null){Object.defineProperty(this,fe,{value:Za}),this.key=e,this.value=n}clone(e){let{key:n,value:s}=this;return U(n)&&(n=n.clone(e)),U(s)&&(s=s.clone(e)),new X(n,s)}toJSON(e,n){const s=n?.mapAsMap?new Map:{};return ol(n,s,this)}toString(e,n,s){return e?.doc?Ug(this,e,n,s):JSON.stringify(this)}}function al(t,e,n){return(e.inFlow??t.flow?qg:Wg)(t,e,n)}function Wg({comment:t,items:e},n,{blockItemPrefix:s,flowChars:i,itemIndent:r,onChompKeep:o,onComment:a}){const{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:r,type:null});let d=!1;const f=[];for(let m=0;m<e.length;++m){const p=e[m];let g=null;if(U(p))!d&&p.spaceBefore&&f.push(""),Fn(n,f,p.commentBefore,d),p.comment&&(g=p.comment);else if(B(p)){const w=U(p.key)?p.key:null;w&&(!d&&w.spaceBefore&&f.push(""),Fn(n,f,w.commentBefore,d))}d=!1;let v=Mt(p,u,()=>g=null,()=>d=!0);g&&(v+=Ge(v,r,c(g))),d&&g&&(d=!1),f.push(s+v)}let h;if(f.length===0)h=i.start+i.end;else{h=f[0];for(let m=1;m<f.length;++m){const p=f[m];h+=p?`
|
|
86
86
|
${l}${p}`:`
|
|
87
87
|
`}}return t?(h+=`
|
|
88
|
-
`+Ee(c(t),l),a&&a()):d&&o&&o(),h}function qg({items:t},e,{flowChars:n,itemIndent:s}){const{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:a}}=e;s+=r;const l=Object.assign({},e,{indent:s,inFlow:!0,type:null});let c=!1,u=0;const d=[];for(let m=0;m<t.length;++m){const p=t[m];let g=null;if(U(p))p.spaceBefore&&d.push(""),Fn(e,d,p.commentBefore,!1),p.comment&&(g=p.comment);else if(B(p)){const w=U(p.key)?p.key:null;w&&(w.spaceBefore&&d.push(""),Fn(e,d,w.commentBefore,!1),w.comment&&(c=!0));const E=U(p.value)?p.value:null;E?(E.comment&&(g=E.comment),E.commentBefore&&(c=!0)):p.value==null&&w?.comment&&(g=w.comment)}g&&(c=!0);let v=
|
|
88
|
+
`+Ee(c(t),l),a&&a()):d&&o&&o(),h}function qg({items:t},e,{flowChars:n,itemIndent:s}){const{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:a}}=e;s+=r;const l=Object.assign({},e,{indent:s,inFlow:!0,type:null});let c=!1,u=0;const d=[];for(let m=0;m<t.length;++m){const p=t[m];let g=null;if(U(p))p.spaceBefore&&d.push(""),Fn(e,d,p.commentBefore,!1),p.comment&&(g=p.comment);else if(B(p)){const w=U(p.key)?p.key:null;w&&(w.spaceBefore&&d.push(""),Fn(e,d,w.commentBefore,!1),w.comment&&(c=!0));const E=U(p.value)?p.value:null;E?(E.comment&&(g=E.comment),E.commentBefore&&(c=!0)):p.value==null&&w?.comment&&(g=w.comment)}g&&(c=!0);let v=Mt(p,l,()=>g=null);m<t.length-1&&(v+=","),g&&(v+=Ge(v,s,a(g))),!c&&(d.length>u||v.includes(`
|
|
89
89
|
`))&&(c=!0),d.push(v),u=d.length}const{start:f,end:h}=n;if(d.length===0)return f+h;if(!c){const m=d.reduce((p,g)=>p+g.length+2,2);c=e.options.lineWidth>0&&m>e.options.lineWidth}if(c){let m=f;for(const p of d)m+=p?`
|
|
90
90
|
${r}${i}${p}`:`
|
|
91
91
|
`;return`${m}
|
|
92
|
-
${i}${h}`}else return`${f}${o}${d.join(" ")}${o}${h}`}function Fn({indent:t,options:{commentString:e}},n,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const r=Ee(e(s),t);n.push(r.trimStart())}}function Qe(t,e){const n=P(e)?e.value:e;for(const s of t)if(B(s)&&(s.key===e||s.key===n||P(s.key)&&s.key.value===n))return s}class ie extends tl{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(_e,e),this.items=[]}static from(e,n,s){const{keepUndefined:i,replacer:r}=s,o=new this(e),a=(l,c)=>{if(typeof r=="function")c=r.call(n,l,c);else if(Array.isArray(r)&&!r.includes(l))return;(c!==void 0||i)&&o.items.push(ji(l,c,s))};if(n instanceof Map)for(const[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(const l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let s;B(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new X(e,e?.value):s=new X(e.key,e.value);const i=Qe(this.items,s.key),r=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${s.key} already set`);P(i.value)&&el(s.value)?i.value.value=s.value:i.value=s.value}else if(r){const o=this.items.findIndex(a=>r(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){const n=Qe(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const i=Qe(this.items,e)?.value;return(!n&&P(i)?i.value:i)??void 0}has(e){return!!Qe(this.items,e)}set(e,n){this.add(new X(e,n),!0)}toJSON(e,n,s){const i=s?new s:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(const r of this.items)ol(n,i,r);return i}toString(e,n,s){if(!e)return JSON.stringify(this);for(const i of this.items)if(!B(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),al(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:n})}}const Lt={collection:"map",default:!0,nodeClass:ie,tag:"tag:yaml.org,2002:map",resolve(t,e){return Pt(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>ie.from(t,e,n)};class ze extends tl{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(xt,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=mn(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const s=mn(e);if(typeof s!="number")return;const i=this.items[s];return!n&&P(i)?i.value:i}has(e){const n=mn(e);return typeof n=="number"&&n<this.items.length}set(e,n){const s=mn(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[s];P(i)&&el(n)?i.value=n:this.items[s]=n}toJSON(e,n){const s=[];n?.onCreate&&n.onCreate(s);let i=0;for(const r of this.items)s.push(de(r,String(i++),n));return s}toString(e,n,s){return e?al(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}static from(e,n,s){const{replacer:i}=s,r=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof i=="function"){const l=n instanceof Set?a:String(o++);a=i.call(n,l,a)}r.items.push(en(a,void 0,s))}}return r}}function mn(t){let e=P(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const jt={collection:"seq",default:!0,nodeClass:ze,tag:"tag:yaml.org,2002:seq",resolve(t,e){return zt(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>ze.from(t,e,n)},cs={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,s){return e=Object.assign({actualString:!0},e),rn(t,e,n,s)}},us={identify:t=>t==null,createNode:()=>new
|
|
93
|
-
`:" ")}return rn({comment:t,type:e,value:a},s,i,r)}};function gl(t,e){if(zt(t))for(let n=0;n<t.items.length;++n){let s=t.items[n];if(!B(s)){if(Pt(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const i=s.items[0]||new X(new
|
|
92
|
+
${i}${h}`}else return`${f}${o}${d.join(" ")}${o}${h}`}function Fn({indent:t,options:{commentString:e}},n,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const r=Ee(e(s),t);n.push(r.trimStart())}}function Qe(t,e){const n=P(e)?e.value:e;for(const s of t)if(B(s)&&(s.key===e||s.key===n||P(s.key)&&s.key.value===n))return s}class ie extends tl{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(_e,e),this.items=[]}static from(e,n,s){const{keepUndefined:i,replacer:r}=s,o=new this(e),a=(l,c)=>{if(typeof r=="function")c=r.call(n,l,c);else if(Array.isArray(r)&&!r.includes(l))return;(c!==void 0||i)&&o.items.push(ji(l,c,s))};if(n instanceof Map)for(const[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(const l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let s;B(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new X(e,e?.value):s=new X(e.key,e.value);const i=Qe(this.items,s.key),r=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${s.key} already set`);P(i.value)&&el(s.value)?i.value.value=s.value:i.value=s.value}else if(r){const o=this.items.findIndex(a=>r(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){const n=Qe(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const i=Qe(this.items,e)?.value;return(!n&&P(i)?i.value:i)??void 0}has(e){return!!Qe(this.items,e)}set(e,n){this.add(new X(e,n),!0)}toJSON(e,n,s){const i=s?new s:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(const r of this.items)ol(n,i,r);return i}toString(e,n,s){if(!e)return JSON.stringify(this);for(const i of this.items)if(!B(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),al(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:n})}}const Lt={collection:"map",default:!0,nodeClass:ie,tag:"tag:yaml.org,2002:map",resolve(t,e){return Pt(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>ie.from(t,e,n)};class ze extends tl{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(xt,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=mn(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const s=mn(e);if(typeof s!="number")return;const i=this.items[s];return!n&&P(i)?i.value:i}has(e){const n=mn(e);return typeof n=="number"&&n<this.items.length}set(e,n){const s=mn(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[s];P(i)&&el(n)?i.value=n:this.items[s]=n}toJSON(e,n){const s=[];n?.onCreate&&n.onCreate(s);let i=0;for(const r of this.items)s.push(de(r,String(i++),n));return s}toString(e,n,s){return e?al(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}static from(e,n,s){const{replacer:i}=s,r=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof i=="function"){const l=n instanceof Set?a:String(o++);a=i.call(n,l,a)}r.items.push(en(a,void 0,s))}}return r}}function mn(t){let e=P(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const jt={collection:"seq",default:!0,nodeClass:ze,tag:"tag:yaml.org,2002:seq",resolve(t,e){return zt(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>ze.from(t,e,n)},cs={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,s){return e=Object.assign({actualString:!0},e),rn(t,e,n,s)}},us={identify:t=>t==null,createNode:()=>new I(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new I(null),stringify:({source:t},e)=>typeof t=="string"&&us.test.test(t)?t:e.options.nullStr},Bi={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new I(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Bi.test.test(t)){const s=t[0]==="t"||t[0]==="T";if(e===s)return t}return e?n.options.trueStr:n.options.falseStr}};function ve({format:t,minFractionDigits:e,tag:n,value:s}){if(typeof s=="bigint")return String(s);const i=typeof s=="number"?s:Number(s);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(s,-0)?"-0":JSON.stringify(s);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let a=e-(r.length-o-1);for(;a-- >0;)r+="0"}return r}const ll={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ve},cl={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():ve(t)}},ul={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new I(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:ve},ds=t=>typeof t=="bigint"||Number.isInteger(t),Fi=(t,e,n,{intAsBigInt:s})=>s?BigInt(t):parseInt(t.substring(e),n);function dl(t,e,n){const{value:s}=t;return ds(s)&&s>=0?n+s.toString(e):ve(t)}const fl={identify:t=>ds(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Fi(t,2,8,n),stringify:t=>dl(t,8,"0o")},hl={identify:ds,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Fi(t,0,10,n),stringify:ve},pl={identify:t=>ds(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Fi(t,2,16,n),stringify:t=>dl(t,16,"0x")},Gg=[Lt,jt,cs,us,Bi,fl,hl,pl,ll,cl,ul];function ho(t){return typeof t=="bigint"||Number.isInteger(t)}const yn=({value:t})=>JSON.stringify(t),Qg=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:yn},{identify:t=>t==null,createNode:()=>new I(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:yn},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:yn},{identify:ho,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>ho(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:yn}],Kg={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Yg=[Lt,jt].concat(Qg,Kg),Hi={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),s=new Uint8Array(n.length);for(let i=0;i<n.length;++i)s[i]=n.charCodeAt(i);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},s,i,r){if(!n)return"";const o=n;let a;if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=I.BLOCK_LITERAL),e!==I.QUOTE_DOUBLE){const l=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let d=0,f=0;d<c;++d,f+=l)u[d]=a.substr(f,l);a=u.join(e===I.BLOCK_LITERAL?`
|
|
93
|
+
`:" ")}return rn({comment:t,type:e,value:a},s,i,r)}};function gl(t,e){if(zt(t))for(let n=0;n<t.items.length;++n){let s=t.items[n];if(!B(s)){if(Pt(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const i=s.items[0]||new X(new I(null));if(s.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${s.commentBefore}
|
|
94
94
|
${i.key.commentBefore}`:s.commentBefore),s.comment){const r=i.value??i.key;r.comment=r.comment?`${s.comment}
|
|
95
|
-
${r.comment}`:s.comment}s=i}t.items[n]=B(s)?s:new X(s)}}else e("Expected a sequence for this tag");return t}function ml(t,e,n){const{replacer:s}=n,i=new ze(t);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(r++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(ji(a,l,n))}return i}const
|
|
95
|
+
${r.comment}`:s.comment}s=i}t.items[n]=B(s)?s:new X(s)}}else e("Expected a sequence for this tag");return t}function ml(t,e,n){const{replacer:s}=n,i=new ze(t);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(r++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;i.items.push(ji(a,l,n))}return i}const $i={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:gl,createNode:ml};class Et extends ze{constructor(){super(),this.add=ie.prototype.add.bind(this),this.delete=ie.prototype.delete.bind(this),this.get=ie.prototype.get.bind(this),this.has=ie.prototype.has.bind(this),this.set=ie.prototype.set.bind(this),this.tag=Et.tag}toJSON(e,n){if(!n)return super.toJSON(e);const s=new Map;n?.onCreate&&n.onCreate(s);for(const i of this.items){let r,o;if(B(i)?(r=de(i.key,"",n),o=de(i.value,r,n)):r=de(i,"",n),s.has(r))throw new Error("Ordered maps must not include duplicate keys");s.set(r,o)}return s}static from(e,n,s){const i=ml(e,n,s),r=new this;return r.items=i.items,r}}Et.tag="tag:yaml.org,2002:omap";const Ui={collection:"seq",identify:t=>t instanceof Map,nodeClass:Et,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=gl(t,e),s=[];for(const{key:i}of n.items)P(i)&&(s.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):s.push(i.value));return Object.assign(new Et,n)},createNode:(t,e,n)=>Et.from(t,e,n)};function yl({value:t,source:e},n){return e&&(t?vl:bl).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const vl={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new I(!0),stringify:yl},bl={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new I(!1),stringify:yl},Jg={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ve},Xg={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():ve(t)}},em={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new I(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const s=t.substring(n+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:ve},on=t=>typeof t=="bigint"||Number.isInteger(t);function fs(t,e,n,{intAsBigInt:s}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),s){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return i==="-"?BigInt(-1)*o:o}const r=parseInt(t,n);return i==="-"?-1*r:r}function Vi(t,e,n){const{value:s}=t;if(on(s)){const i=s.toString(e);return s<0?"-"+n+i.substr(1):n+i}return ve(t)}const tm={identify:on,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>fs(t,2,2,n),stringify:t=>Vi(t,2,"0b")},nm={identify:on,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>fs(t,1,8,n),stringify:t=>Vi(t,8,"0")},sm={identify:on,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>fs(t,0,10,n),stringify:ve},im={identify:on,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>fs(t,2,16,n),stringify:t=>Vi(t,16,"0x")};class At extends ie{constructor(e){super(e),this.tag=At.tag}add(e){let n;B(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new X(e.key,null):n=new X(e,null),Qe(this.items,n.key)||this.items.push(n)}get(e,n){const s=Qe(this.items,e);return!n&&B(s)?P(s.key)?s.key.value:s.key:s}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const s=Qe(this.items,e);s&&!n?this.items.splice(this.items.indexOf(s),1):!s&&n&&this.items.push(new X(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,s);throw new Error("Set items must all have null values")}static from(e,n,s){const{replacer:i}=s,r=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),r.items.push(ji(o,null,s));return r}}At.tag="tag:yaml.org,2002:set";const Zi={collection:"map",identify:t=>t instanceof Set,nodeClass:At,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>At.from(t,e,n),resolve(t,e){if(Pt(t)){if(t.hasAllNullValues(!0))return Object.assign(new At,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function Wi(t,e){const n=t[0],s=n==="-"||n==="+"?t.substring(1):t,i=o=>e?BigInt(o):Number(o),r=s.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return n==="-"?i(-1)*r:r}function wl(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return ve(t);let s="";e<0&&(s="-",e*=n(-1));const i=n(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),s+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Sl={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>Wi(t,n),stringify:wl},El={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Wi(t,!1),stringify:wl},hs={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(hs.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,s,i,r,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(n,s-1,i,r||0,o||0,a||0,l);const u=e[8];if(u&&u!=="Z"){let d=Wi(u,!1);Math.abs(d)<30&&(d*=60),c-=6e4*d}return new Date(c)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},po=[Lt,jt,cs,us,vl,bl,tm,nm,sm,im,Jg,Xg,em,Hi,Ce,Ui,$i,Zi,Sl,El,hs],go=new Map([["core",Gg],["failsafe",[Lt,jt,cs]],["json",Yg],["yaml11",po],["yaml-1.1",po]]),mo={binary:Hi,bool:Bi,float:ul,floatExp:cl,floatNaN:ll,floatTime:El,int:hl,intHex:pl,intOct:fl,intTime:Sl,map:Lt,merge:Ce,null:us,omap:Ui,pairs:$i,seq:jt,set:Zi,timestamp:hs},rm={"tag:yaml.org,2002:binary":Hi,"tag:yaml.org,2002:merge":Ce,"tag:yaml.org,2002:omap":Ui,"tag:yaml.org,2002:pairs":$i,"tag:yaml.org,2002:set":Zi,"tag:yaml.org,2002:timestamp":hs};function Ms(t,e,n){const s=go.get(e);if(s&&!t)return n&&!s.includes(Ce)?s.concat(Ce):s.slice();let i=s;if(!i)if(Array.isArray(t))i=[];else{const r=Array.from(go.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(t))for(const r of t)i=i.concat(r);else typeof t=="function"&&(i=t(i.slice()));return n&&(i=i.concat(Ce)),i.reduce((r,o)=>{const a=typeof o=="string"?mo[o]:o;if(!a){const l=JSON.stringify(o),c=Object.keys(mo).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return r.includes(a)||r.push(a),r},[])}const om=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class ps{constructor({compat:e,customTags:n,merge:s,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Ms(e,"compat"):e?Ms(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?rm:{},this.tags=Ms(n,this.name,s),this.toStringOptions=a??null,Object.defineProperty(this,_e,{value:Lt}),Object.defineProperty(this,we,{value:cs}),Object.defineProperty(this,xt,{value:jt}),this.sortMapEntries=typeof o=="function"?o:o===!0?om:null}clone(){const e=Object.create(ps.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function am(t,e){const n=[];let s=e.directives===!0;if(e.directives!==!1&&t.directives){const l=t.directives.toString(t);l?(n.push(l),s=!0):t.directives.docStart&&(s=!0)}s&&n.push("---");const i=sl(t,e),{commentString:r}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const l=r(t.commentBefore);n.unshift(Ee(l,""))}let o=!1,a=null;if(t.contents){if(U(t.contents)){if(t.contents.spaceBefore&&s&&n.push(""),t.contents.commentBefore){const u=r(t.contents.commentBefore);n.push(Ee(u,""))}i.forceBlockIndent=!!t.comment,a=t.contents.comment}const l=a?void 0:()=>o=!0;let c=Mt(t.contents,i,()=>a=null,l);a&&(c+=Ge(c,"",r(a))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Mt(t.contents,i));if(t.directives?.docEnd)if(t.comment){const l=r(t.comment);l.includes(`
|
|
96
96
|
`)?(n.push("..."),n.push(Ee(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=t.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(Ee(r(l),"")))}return n.join(`
|
|
97
97
|
`)+`
|
|
98
|
-
`}class Bt{constructor(e,n,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,fe,{value:oi});let i=null;typeof n=="function"||Array.isArray(n)?i=n:s===void 0&&n&&(s=n,n=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=r;let{version:o}=r;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new te({version:o}),this.setSchema(o,s),this.contents=e===void 0?null:this.createNode(e,i,s)}clone(){const e=Object.create(Bt.prototype,{[fe]:{value:oi}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=U(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){dt(this.contents)&&this.contents.add(e)}addIn(e,n){dt(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const s=Ja(this);e.anchor=!n||s.has(n)?Xa(n||"a",s):n}return new rs(e.anchor)}createNode(e,n,s){let i;if(typeof n=="function")e=n.call({"":e},"",e),i=n;else if(Array.isArray(n)){const g=w=>typeof w=="number"||w instanceof String||w instanceof Number,v=n.filter(g).map(String);v.length>0&&(n=n.concat(v)),i=n}else s===void 0&&n&&(s=n,n=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=s??{},{onAnchor:d,setAnchors:f,sourceObjects:h}=Pg(this,o||"a"),m={aliasDuplicateObjects:r??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:h},p=en(e,u,m);return a
|
|
98
|
+
`}class Bt{constructor(e,n,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,fe,{value:oi});let i=null;typeof n=="function"||Array.isArray(n)?i=n:s===void 0&&n&&(s=n,n=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=r;let{version:o}=r;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new te({version:o}),this.setSchema(o,s),this.contents=e===void 0?null:this.createNode(e,i,s)}clone(){const e=Object.create(Bt.prototype,{[fe]:{value:oi}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=U(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){dt(this.contents)&&this.contents.add(e)}addIn(e,n){dt(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const s=Ja(this);e.anchor=!n||s.has(n)?Xa(n||"a",s):n}return new rs(e.anchor)}createNode(e,n,s){let i;if(typeof n=="function")e=n.call({"":e},"",e),i=n;else if(Array.isArray(n)){const g=w=>typeof w=="number"||w instanceof String||w instanceof Number,v=n.filter(g).map(String);v.length>0&&(n=n.concat(v)),i=n}else s===void 0&&n&&(s=n,n=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=s??{},{onAnchor:d,setAnchors:f,sourceObjects:h}=Pg(this,o||"a"),m={aliasDuplicateObjects:r??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:h},p=en(e,u,m);return a&&H(p)&&(p.flow=!0),f(),p}createPair(e,n,s={}){const i=this.createNode(e,null,s),r=this.createNode(n,null,s);return new X(i,r)}delete(e){return dt(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Wt(e)?this.contents==null?!1:(this.contents=null,!0):dt(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return H(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Wt(e)?!n&&P(this.contents)?this.contents.value:this.contents:H(this.contents)?this.contents.getIn(e,n):void 0}has(e){return H(this.contents)?this.contents.has(e):!1}hasIn(e){return Wt(e)?this.contents!==void 0:H(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Bn(this.schema,[e],n):dt(this.contents)&&this.contents.set(e,n)}setIn(e,n){Wt(e)?this.contents=n:this.contents==null?this.contents=Bn(this.schema,Array.from(e),n):dt(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new te({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new te({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(s)this.schema=new ps(Object.assign(s,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:s,maxAliasCount:i,onAnchor:r,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=de(this.contents,n??"",a);if(typeof r=="function")for(const{count:c,res:u}of a.anchors.values())r(u,c);return typeof o=="function"?vt(o,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return am(this,e)}}function dt(t){if(H(t))return!0;throw new Error("Expected a YAML collection as document contents")}class qi extends Error{constructor(e,n,s,i){super(),this.name=e,this.code=s,this.message=i,this.pos=n}}class Ke extends qi{constructor(e,n,s){super("YAMLParseError",e,n,s)}}class Al extends qi{constructor(e,n,s){super("YAMLWarning",e,n,s)}}const Hn=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));const{line:s,col:i}=n.linePos[0];n.message+=` at line ${s}, column ${i}`;let r=i-1,o=t.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){const a=Math.min(r-39,o.length-79);o="…"+o.substring(a),r-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),s>1&&/^ *$/.test(o.substring(0,r))){let a=t.substring(e.lineStarts[s-2],e.lineStarts[s-1]);a.length>80&&(a=a.substring(0,79)+`…
|
|
99
99
|
`),o=a+o}if(/[^ ]/.test(o)){let a=1;const l=n.linePos[1];l?.line===s&&l.col>i&&(a=Math.max(1,Math.min(l.col-i,80-r)));const c=" ".repeat(r)+"^".repeat(a);n.message+=`:
|
|
100
100
|
|
|
101
101
|
${o}
|
|
102
102
|
${c}
|
|
103
|
-
`}};function
|
|
104
|
-
`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(tn(e.key)||tn(e.value))return!0}return!1;default:return!0}}function ui(t,e,n){if(e?.type==="flow-collection"){const s=e.end[0];s.indent===t&&(s.source==="]"||s.source==="}")&&tn(e)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Cl(t,e,n){const{uniqueKeys:s}=t.options;if(s===!1)return!1;const i=typeof s=="function"?s:(r,o)=>r===o||P(r)&&P(o)&&r.value===o.value;return e.some(r=>i(r.key,n))}const yo="All mapping items must start at the same column";function lm({composeNode:t,composeEmptyNode:e},n,s,i,r){const o=r?.nodeClass??ie,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset,c=null;for(const u of s.items){const{start:d,key:f,sep:h,value:m}=u,p=
|
|
105
|
-
`+p.comment:a.comment=p.comment);continue}(p.newlineAfterProp||tn(f))&&i(f??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==s.indent&&i(l,"BAD_INDENT",yo);n.atKey=!0;const v=p.end,w=f?t(n,f,p,i):e(n,v,d,null,p,i);n.schema.compat&&ui(s.indent,f,i),n.atKey=!1,Cl(n,a.items,w)&&i(v,"DUPLICATE_KEY","Map keys must be unique");const E=
|
|
106
|
-
`+E.comment:w.comment=E.comment);const A=new X(w);n.options.keepSourceTokens&&(A.srcToken=u),a.items.push(A)}}return c&&c<l&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[s.offset,l,c??l],a}function cm({composeNode:t,composeEmptyNode:e},n,s,i,r){const o=r?.nodeClass??ze,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=s.offset,c=null;for(const{start:u,value:d}of s.items){const f=
|
|
107
|
-
`+k.comment:c.comment=k.comment),d=k.end;continue}!o&&n.options.strict&&tn(E)&&i(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)k.comma&&i(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(k.comma||i(k.start,"MISSING_CHAR",`Missing , between ${a} items`),k.comment){let
|
|
108
|
-
`+
|
|
109
|
-
`+N.comment:C.comment=N.comment);const pe=new X(C,Q);if(n.options.keepSourceTokens&&(pe.srcToken=v),o){const z=c;Cl(n,z.items,C)&&i(
|
|
110
|
-
`+g.comment:c.comment=g.comment),c.range=[s.offset,p,g.offset]}else c.range=[s.offset,p,p];return c}function _s(t,e,n,s,i,r){const o=n.type==="block-map"?lm(t,e,n,s,r):n.type==="block-seq"?cm(t,e,n,s,r):um(t,e,n,s,r),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function dm(t,e,n,s,i){const r=s.tag,o=r?e.directives.tagName(r.source,f=>i(r,"TAG_RESOLVE_FAILED",f)):null;if(n.type==="block-seq"){const{anchor:f,newlineAfterProp:h}=s,m=f&&r?f.offset>r.offset?f:r:f??r;m&&(!h||h.offset<m.offset)&&i(m,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===ie.tagName&&a==="map"||o===ze.tagName&&a==="seq")return _s(t,e,n,i,o);let l=e.schema.tags.find(f=>f.tag===o&&f.collection===a);if(!l){const f=e.schema.knownTags[o];if(f?.collection===a)e.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else return f?i(r,"BAD_COLLECTION_TYPE",`${f.tag} used for ${a} collection, but expects ${f.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),_s(t,e,n,i,o)}const c=_s(t,e,n,i,o,l),u=l.resolve?.(c,f=>i(r,"TAG_RESOLVE_FAILED",f),e.options)??c,d=U(u)?u:new
|
|
103
|
+
`}};function It(t,{flow:e,indicator:n,next:s,offset:i,onError:r,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,d="",f="",h=!1,m=!1,p=null,g=null,v=null,w=null,E=null,A=null,D=null;for(const C of t)switch(m&&(C.type!=="space"&&C.type!=="newline"&&C.type!=="comma"&&r(C.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),p&&(c&&C.type!=="comment"&&C.type!=="newline"&&r(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),p=null),C.type){case"space":!e&&(n!=="doc-start"||s?.type!=="flow-collection")&&C.source.includes(" ")&&(p=C),u=!0;break;case"comment":{u||r(C,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const N=C.source.substring(1)||" ";d?d+=f+N:d=N,f="",c=!1;break}case"newline":c?d?d+=C.source:(!A||n!=="seq-item-ind")&&(l=!0):f+=C.source,c=!0,h=!0,(g||v)&&(w=C),u=!0;break;case"anchor":g&&r(C,"MULTIPLE_ANCHORS","A node can have at most one anchor"),C.source.endsWith(":")&&r(C.offset+C.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=C,D??(D=C.offset),c=!1,u=!1,m=!0;break;case"tag":{v&&r(C,"MULTIPLE_TAGS","A node can have at most one tag"),v=C,D??(D=C.offset),c=!1,u=!1,m=!0;break}case n:(g||v)&&r(C,"BAD_PROP_ORDER",`Anchors and tags must be after the ${C.source} indicator`),A&&r(C,"UNEXPECTED_TOKEN",`Unexpected ${C.source} in ${e??"collection"}`),A=C,c=n==="seq-item-ind"||n==="explicit-key-ind",u=!1;break;case"comma":if(e){E&&r(C,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),E=C,c=!1,u=!1;break}default:r(C,"UNEXPECTED_TOKEN",`Unexpected ${C.type} token`),c=!1,u=!1}const k=t[t.length-1],R=k?k.offset+k.source.length:i;return m&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p&&(c&&p.indent<=o||s?.type==="block-map"||s?.type==="block-seq")&&r(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:A,spaceBefore:l,comment:d,hasNewline:h,anchor:g,tag:v,newlineAfterProp:w,end:R,start:D??R}}function tn(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
104
|
+
`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(tn(e.key)||tn(e.value))return!0}return!1;default:return!0}}function ui(t,e,n){if(e?.type==="flow-collection"){const s=e.end[0];s.indent===t&&(s.source==="]"||s.source==="}")&&tn(e)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Cl(t,e,n){const{uniqueKeys:s}=t.options;if(s===!1)return!1;const i=typeof s=="function"?s:(r,o)=>r===o||P(r)&&P(o)&&r.value===o.value;return e.some(r=>i(r.key,n))}const yo="All mapping items must start at the same column";function lm({composeNode:t,composeEmptyNode:e},n,s,i,r){const o=r?.nodeClass??ie,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset,c=null;for(const u of s.items){const{start:d,key:f,sep:h,value:m}=u,p=It(d,{indicator:"explicit-key-ind",next:f??h?.[0],offset:l,onError:i,parentIndent:s.indent,startOnNewline:!0}),g=!p.found;if(g){if(f&&(f.type==="block-seq"?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==s.indent&&i(l,"BAD_INDENT",yo)),!p.anchor&&!p.tag&&!h){c=p.end,p.comment&&(a.comment?a.comment+=`
|
|
105
|
+
`+p.comment:a.comment=p.comment);continue}(p.newlineAfterProp||tn(f))&&i(f??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==s.indent&&i(l,"BAD_INDENT",yo);n.atKey=!0;const v=p.end,w=f?t(n,f,p,i):e(n,v,d,null,p,i);n.schema.compat&&ui(s.indent,f,i),n.atKey=!1,Cl(n,a.items,w)&&i(v,"DUPLICATE_KEY","Map keys must be unique");const E=It(h??[],{indicator:"map-value-ind",next:m,offset:w.range[2],onError:i,parentIndent:s.indent,startOnNewline:!f||f.type==="block-scalar"});if(l=E.end,E.found){g&&(m?.type==="block-map"&&!E.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&p.start<E.found.offset-1024&&i(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const A=m?t(n,m,E,i):e(n,l,h,null,E,i);n.schema.compat&&ui(s.indent,m,i),l=A.range[2];const D=new X(w,A);n.options.keepSourceTokens&&(D.srcToken=u),a.items.push(D)}else{g&&i(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(w.comment?w.comment+=`
|
|
106
|
+
`+E.comment:w.comment=E.comment);const A=new X(w);n.options.keepSourceTokens&&(A.srcToken=u),a.items.push(A)}}return c&&c<l&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[s.offset,l,c??l],a}function cm({composeNode:t,composeEmptyNode:e},n,s,i,r){const o=r?.nodeClass??ze,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=s.offset,c=null;for(const{start:u,value:d}of s.items){const f=It(u,{indicator:"seq-item-ind",next:d,offset:l,onError:i,parentIndent:s.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||d)d?.type==="block-seq"?i(f.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{c=f.end,f.comment&&(a.comment=f.comment);continue}const h=d?t(n,d,f,i):e(n,f.end,u,null,f,i);n.schema.compat&&ui(s.indent,d,i),l=h.range[2],a.items.push(h)}return a.range=[s.offset,l,c??l],a}function an(t,e,n,s){let i="";if(t){let r=!1,o="";for(const a of t){const{source:l,type:c}=a;switch(c){case"space":r=!0;break;case"comment":{n&&!r&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=l.substring(1)||" ";i?i+=o+u:i=u,o="";break}case"newline":i&&(o+=l),r=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:i,offset:e}}const Is="Block collections are not allowed within flow collections",Os=t=>t&&(t.type==="block-map"||t.type==="block-seq");function um({composeNode:t,composeEmptyNode:e},n,s,i,r){const o=s.start.source==="{",a=o?"flow map":"flow sequence",l=r?.nodeClass??(o?ie:ze),c=new l(n.schema);c.flow=!0;const u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=s.offset+s.start.source.length;for(let g=0;g<s.items.length;++g){const v=s.items[g],{start:w,key:E,sep:A,value:D}=v,k=It(w,{flow:a,indicator:"explicit-key-ind",next:E??A?.[0],offset:d,onError:i,parentIndent:s.indent,startOnNewline:!1});if(!k.found){if(!k.anchor&&!k.tag&&!A&&!D){g===0&&k.comma?i(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):g<s.items.length-1&&i(k.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),k.comment&&(c.comment?c.comment+=`
|
|
107
|
+
`+k.comment:c.comment=k.comment),d=k.end;continue}!o&&n.options.strict&&tn(E)&&i(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)k.comma&&i(k.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(k.comma||i(k.start,"MISSING_CHAR",`Missing , between ${a} items`),k.comment){let R="";e:for(const C of w)switch(C.type){case"comma":case"space":break;case"comment":R=C.source.substring(1);break e;default:break e}if(R){let C=c.items[c.items.length-1];B(C)&&(C=C.value??C.key),C.comment?C.comment+=`
|
|
108
|
+
`+R:C.comment=R,k.comment=k.comment.substring(R.length+1)}}if(!o&&!A&&!k.found){const R=D?t(n,D,k,i):e(n,k.end,A,null,k,i);c.items.push(R),d=R.range[2],Os(D)&&i(R.range,"BLOCK_IN_FLOW",Is)}else{n.atKey=!0;const R=k.end,C=E?t(n,E,k,i):e(n,R,w,null,k,i);Os(E)&&i(C.range,"BLOCK_IN_FLOW",Is),n.atKey=!1;const N=It(A??[],{flow:a,indicator:"map-value-ind",next:D,offset:C.range[2],onError:i,parentIndent:s.indent,startOnNewline:!1});if(N.found){if(!o&&!k.found&&n.options.strict){if(A)for(const z of A){if(z===N.found)break;if(z.type==="newline"){i(z,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}k.start<N.found.offset-1024&&i(N.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else D&&("source"in D&&D.source?.[0]===":"?i(D,"MISSING_CHAR",`Missing space after : in ${a}`):i(N.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const Q=D?t(n,D,N,i):N.found?e(n,N.end,A,null,N,i):null;Q?Os(D)&&i(Q.range,"BLOCK_IN_FLOW",Is):N.comment&&(C.comment?C.comment+=`
|
|
109
|
+
`+N.comment:C.comment=N.comment);const pe=new X(C,Q);if(n.options.keepSourceTokens&&(pe.srcToken=v),o){const z=c;Cl(n,z.items,C)&&i(R,"DUPLICATE_KEY","Map keys must be unique"),z.items.push(pe)}else{const z=new ie(n.schema);z.flow=!0,z.items.push(pe);const Ve=(Q??C).range;z.range=[C.range[0],Ve[1],Ve[2]],c.items.push(z)}d=Q?Q.range[2]:N.end}}const f=o?"}":"]",[h,...m]=s.end;let p=d;if(h?.source===f)p=h.offset+h.source.length;else{const g=a[0].toUpperCase()+a.substring(1),v=u?`${g} must end with a ${f}`:`${g} in block collection must be sufficiently indented and end with a ${f}`;i(d,u?"MISSING_CHAR":"BAD_INDENT",v),h&&h.source.length!==1&&m.unshift(h)}if(m.length>0){const g=an(m,p,n.options.strict,i);g.comment&&(c.comment?c.comment+=`
|
|
110
|
+
`+g.comment:c.comment=g.comment),c.range=[s.offset,p,g.offset]}else c.range=[s.offset,p,p];return c}function _s(t,e,n,s,i,r){const o=n.type==="block-map"?lm(t,e,n,s,r):n.type==="block-seq"?cm(t,e,n,s,r):um(t,e,n,s,r),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function dm(t,e,n,s,i){const r=s.tag,o=r?e.directives.tagName(r.source,f=>i(r,"TAG_RESOLVE_FAILED",f)):null;if(n.type==="block-seq"){const{anchor:f,newlineAfterProp:h}=s,m=f&&r?f.offset>r.offset?f:r:f??r;m&&(!h||h.offset<m.offset)&&i(m,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===ie.tagName&&a==="map"||o===ze.tagName&&a==="seq")return _s(t,e,n,i,o);let l=e.schema.tags.find(f=>f.tag===o&&f.collection===a);if(!l){const f=e.schema.knownTags[o];if(f?.collection===a)e.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else return f?i(r,"BAD_COLLECTION_TYPE",`${f.tag} used for ${a} collection, but expects ${f.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),_s(t,e,n,i,o)}const c=_s(t,e,n,i,o,l),u=l.resolve?.(c,f=>i(r,"TAG_RESOLVE_FAILED",f),e.options)??c,d=U(u)?u:new I(u);return d.range=c.range,d.tag=o,l?.format&&(d.format=l.format),d}function Dl(t,e,n){const s=e.offset,i=fm(e,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};const r=i.mode===">"?I.BLOCK_FOLDED:I.BLOCK_LITERAL,o=e.source?hm(e.source):[];let a=o.length;for(let p=o.length-1;p>=0;--p){const g=o[p][1];if(g===""||g==="\r")a=p;else break}if(a===0){const p=i.chomp==="+"&&o.length>0?`
|
|
111
111
|
`.repeat(Math.max(1,o.length-1)):"";let g=s+i.length;return e.source&&(g+=e.source.length),{value:p,type:r,comment:i.comment,range:[s,g,g]}}let l=e.indent+i.indent,c=e.offset+i.length,u=0;for(let p=0;p<a;++p){const[g,v]=o[p];if(v===""||v==="\r")i.indent===0&&g.length>l&&(l=g.length);else{g.length<l&&n(c+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(l=g.length),u=p,l===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=g.length+v.length+1}for(let p=o.length-1;p>=a;--p)o[p][0].length>l&&(a=p+1);let d="",f="",h=!1;for(let p=0;p<u;++p)d+=o[p][0].slice(l)+`
|
|
112
|
-
`;for(let p=u;p<a;++p){let[g,v]=o[p];c+=g.length+v.length+1;const w=v[v.length-1]==="\r";if(w&&(v=v.slice(0,-1)),v&&g.length<l){const A=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(c-v.length-(w?2:1),"BAD_INDENT",A),g=""}r===
|
|
112
|
+
`;for(let p=u;p<a;++p){let[g,v]=o[p];c+=g.length+v.length+1;const w=v[v.length-1]==="\r";if(w&&(v=v.slice(0,-1)),v&&g.length<l){const A=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(c-v.length-(w?2:1),"BAD_INDENT",A),g=""}r===I.BLOCK_LITERAL?(d+=f+g.slice(l)+v,f=`
|
|
113
113
|
`):g.length>l||v[0]===" "?(f===" "?f=`
|
|
114
114
|
`:!h&&f===`
|
|
115
115
|
`&&(f=`
|
|
@@ -122,7 +122,7 @@ ${c}
|
|
|
122
122
|
`+o[p][0].slice(l);d[d.length-1]!==`
|
|
123
123
|
`&&(d+=`
|
|
124
124
|
`);break;default:d+=`
|
|
125
|
-
`}const m=s+i.length+e.source.length;return{value:d,type:r,comment:i.comment,range:[s,m,m]}}function fm({offset:t,props:e},n,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],r=i[0];let o=0,a="",l=-1;for(let f=1;f<i.length;++f){const h=i[f];if(!a&&(h==="-"||h==="+"))a=h;else{const m=Number(h);!o&&m?o=m:l===-1&&(l=t+f)}}l!==-1&&s(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,u="",d=i.length;for(let f=1;f<e.length;++f){const h=e[f];switch(h.type){case"space":c=!0;case"newline":d+=h.source.length;break;case"comment":n&&!c&&s(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=h.source.length,u=h.source.substring(1);break;case"error":s(h,"UNEXPECTED_TOKEN",h.message),d+=h.source.length;break;default:{const m=`Unexpected token in block scalar header: ${h.type}`;s(h,"UNEXPECTED_TOKEN",m);const p=h.source;p&&typeof p=="string"&&(d+=p.length)}}}return{mode:r,indent:o,chomp:a,comment:u,length:d}}function hm(t){const e=t.split(/\n( *)/),n=e[0],s=n.match(/^( *)/),r=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}function kl(t,e,n){const{offset:s,type:i,source:r,end:o}=t;let a,l;const c=(f,h,m)=>n(s+f,h,m);switch(i){case"scalar":a=
|
|
125
|
+
`}const m=s+i.length+e.source.length;return{value:d,type:r,comment:i.comment,range:[s,m,m]}}function fm({offset:t,props:e},n,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],r=i[0];let o=0,a="",l=-1;for(let f=1;f<i.length;++f){const h=i[f];if(!a&&(h==="-"||h==="+"))a=h;else{const m=Number(h);!o&&m?o=m:l===-1&&(l=t+f)}}l!==-1&&s(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,u="",d=i.length;for(let f=1;f<e.length;++f){const h=e[f];switch(h.type){case"space":c=!0;case"newline":d+=h.source.length;break;case"comment":n&&!c&&s(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=h.source.length,u=h.source.substring(1);break;case"error":s(h,"UNEXPECTED_TOKEN",h.message),d+=h.source.length;break;default:{const m=`Unexpected token in block scalar header: ${h.type}`;s(h,"UNEXPECTED_TOKEN",m);const p=h.source;p&&typeof p=="string"&&(d+=p.length)}}}return{mode:r,indent:o,chomp:a,comment:u,length:d}}function hm(t){const e=t.split(/\n( *)/),n=e[0],s=n.match(/^( *)/),r=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}function kl(t,e,n){const{offset:s,type:i,source:r,end:o}=t;let a,l;const c=(f,h,m)=>n(s+f,h,m);switch(i){case"scalar":a=I.PLAIN,l=pm(r,c);break;case"single-quoted-scalar":a=I.QUOTE_SINGLE,l=gm(r,c);break;case"double-quoted-scalar":a=I.QUOTE_DOUBLE,l=mm(r,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[s,s+r.length,s+r.length]}}const u=s+r.length,d=an(o,u,e,n);return{value:l,type:a,comment:d.comment,range:[s,u,d.offset]}}function pm(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Rl(t)}function gm(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Rl(t.slice(1,-1)).replace(/''/g,"'")}function Rl(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
126
126
|
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
127
127
|
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(t);if(!s)return t;let i=s[1],r=" ",o=e.lastIndex;for(n.lastIndex=o;s=n.exec(t);)s[1]===""?r===`
|
|
128
128
|
`?i+=r:r=`
|
|
@@ -137,24 +137,24 @@ ${c}
|
|
|
137
137
|
`);)s===`
|
|
138
138
|
`&&(n+=`
|
|
139
139
|
`),e+=1,s=t[e+1];return n||(n=" "),{fold:n,offset:e}}const vm={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
140
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function bm(t,e,n,s){const i=t.substr(e,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=t.substr(e-2,n+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function
|
|
140
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function bm(t,e,n,s){const i=t.substr(e,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=t.substr(e-2,n+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function Tl(t,e,n,s){const{value:i,type:r,comment:o,range:a}=e.type==="block-scalar"?Dl(t,e,s):kl(e,t.options.strict,s),l=n?t.directives.tagName(n.source,d=>s(n,"TAG_RESOLVE_FAILED",d)):null;let c;t.options.stringKeys&&t.atKey?c=t.schema[we]:l?c=wm(t.schema,i,l,n,s):e.type==="scalar"?c=Sm(t,i,e,s):c=t.schema[we];let u;try{const d=c.resolve(i,f=>s(n??e,"TAG_RESOLVE_FAILED",f),t.options);u=P(d)?d:new I(d)}catch(d){const f=d instanceof Error?d.message:String(d);s(n??e,"TAG_RESOLVE_FAILED",f),u=new I(i)}return u.range=a,u.source=i,r&&(u.type=r),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function wm(t,e,n,s,i){if(n==="!")return t[we];const r=[];for(const a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)r.push(a);else return a;for(const a of r)if(a.test?.test(e))return a;const o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[we])}function Sm({atKey:t,directives:e,schema:n},s,i,r){const o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(s))||n[we];if(n.compat){const a=n.compat.find(l=>l.default&&l.test?.test(s))??n[we];if(o.tag!==a.tag){const l=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;r(i,"TAG_RESOLVE_FAILED",u,!0)}}return o}function Em(t,e,n){if(e){n??(n=e.length);for(let s=n-1;s>=0;--s){let i=e[s];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++s];i?.type==="space";)t+=i.source.length,i=e[++s];break}}return t}const Am={composeNode:Ml,composeEmptyNode:Gi};function Ml(t,e,n,s){const i=t.atKey,{spaceBefore:r,comment:o,anchor:a,tag:l}=n;let c,u=!0;switch(e.type){case"alias":c=Cm(t,e,s),(a||l)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Tl(t,e,l,s),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=dm(Am,t,e,n,s),a&&(c.anchor=a.source.substring(1));break;default:{const d=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",d),c=Gi(t,e.offset,void 0,null,n,s),u=!1}}return a&&c.anchor===""&&s(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!P(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Gi(t,e,n,s,{spaceBefore:i,comment:r,anchor:o,tag:a,end:l},c){const u={type:"scalar",offset:Em(e,n,s),indent:-1,source:""},d=Tl(t,u,a,c);return o&&(d.anchor=o.source.substring(1),d.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),r&&(d.comment=r,d.range[2]=l),d}function Cm({options:t},{offset:e,source:n,end:s},i){const r=new rs(n.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+n.length,a=an(s,o,t.strict,i);return r.range=[e,o,a.offset],a.comment&&(r.comment=a.comment),r}function Dm(t,e,{offset:n,start:s,value:i,end:r},o){const a=Object.assign({_directives:e},t),l=new Bt(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=It(s,{indicator:"doc-start",next:i??r?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?Ml(c,i,u,o):Gi(c,u.end,s,null,u,o);const d=l.contents.range[2],f=an(r,d,!1,o);return f.comment&&(l.comment=f.comment),l.range=[n,d,f.offset],l}function Ut(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function vo(t){let e="",n=!1,s=!1;for(let i=0;i<t.length;++i){const r=t[i];switch(r[0]){case"#":e+=(e===""?"":s?`
|
|
141
141
|
|
|
142
142
|
`:`
|
|
143
143
|
`)+(r.substring(1)||" "),n=!0,s=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:e,afterEmptyLine:s}}class Qi{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,s,i,r)=>{const o=Ut(n);r?this.warnings.push(new Al(o,s,i)):this.errors.push(new Ke(o,s,i))},this.directives=new te({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:s,afterEmptyLine:i}=vo(this.prelude);if(s){const r=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
|
144
|
-
${s}`:s;else if(i||e.directives.docStart||!r)e.commentBefore=s;else if(
|
|
144
|
+
${s}`:s;else if(i||e.directives.docStart||!r)e.commentBefore=s;else if(H(r)&&!r.flow&&r.items.length>0){let o=r.items[0];B(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${s}
|
|
145
145
|
${a}`:s}else{const o=r.commentBefore;r.commentBefore=o?`${s}
|
|
146
146
|
${o}`:s}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:vo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,s=-1){for(const i of e)yield*this.next(i);yield*this.end(n,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,s,i)=>{const r=Ut(e);r[0]+=n,this.onError(r,"BAD_DIRECTIVE",s,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=Dm(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new Ke(Ut(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new Ke(Ut(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const n=an(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
|
|
147
|
-
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ke(Ut(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),i=new Bt(void 0,s);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function km(t,e=!0,n){if(t){const s=(i,r,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(a,r,o);else throw new Ke([a,a+1],r,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return kl(t,e,s);case"block-scalar":return Dl({options:{strict:e}},t,s)}}return null}function
|
|
147
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ke(Ut(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),i=new Bt(void 0,s);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function km(t,e=!0,n){if(t){const s=(i,r,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(a,r,o);else throw new Ke([a,a+1],r,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return kl(t,e,s);case"block-scalar":return Dl({options:{strict:e}},t,s)}}return null}function Rm(t,e){const{implicitKey:n=!1,indent:s,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,a=rn({type:o,value:t},{implicitKey:n,indent:s>0?" ".repeat(s):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:s,source:`
|
|
148
148
|
`}];switch(a[0]){case"|":case">":{const c=a.indexOf(`
|
|
149
149
|
`),u=a.substring(0,c),d=a.substring(c+1)+`
|
|
150
|
-
`,f=[{type:"block-scalar-header",offset:r,indent:s,source:u}];return
|
|
151
|
-
`}),{type:"block-scalar",offset:r,indent:s,props:f,source:d}}case'"':return{type:"double-quoted-scalar",offset:r,indent:s,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:s,source:a,end:l};default:return{type:"scalar",offset:r,indent:s,source:a,end:l}}}function
|
|
150
|
+
`,f=[{type:"block-scalar-header",offset:r,indent:s,source:u}];return Il(f,l)||f.push({type:"newline",offset:-1,indent:s,source:`
|
|
151
|
+
`}),{type:"block-scalar",offset:r,indent:s,props:f,source:d}}case'"':return{type:"double-quoted-scalar",offset:r,indent:s,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:s,source:a,end:l};default:return{type:"scalar",offset:r,indent:s,source:a,end:l}}}function Tm(t,e,n={}){let{afterKey:s=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=n,a="indent"in t?t.indent:null;if(s&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const l=rn({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":Mm(t,l);break;case'"':Ns(t,l,"double-quoted-scalar");break;case"'":Ns(t,l,"single-quoted-scalar");break;default:Ns(t,l,"scalar")}}function Mm(t,e){const n=e.indexOf(`
|
|
152
152
|
`),s=e.substring(0,n),i=e.substring(n+1)+`
|
|
153
|
-
`;if(t.type==="block-scalar"){const r=t.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=s,t.source=i}else{const{offset:r}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:r,indent:o,source:s}];
|
|
154
|
-
`});for(const l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:i})}}function
|
|
155
|
-
`};delete t.items,Object.assign(t,{type:n,source:e,end:[i]});break}default:{const s="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(const r of Object.keys(t))r!=="type"&&r!=="offset"&&delete t[r];Object.assign(t,{type:n,indent:s,source:e,end:i})}}}const
|
|
153
|
+
`;if(t.type==="block-scalar"){const r=t.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=s,t.source=i}else{const{offset:r}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:r,indent:o,source:s}];Il(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|
154
|
+
`});for(const l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:i})}}function Il(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Ns(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const s=t.props.slice(1);let i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(const r of s)r.offset+=i;delete t.props,Object.assign(t,{type:n,source:e,end:s});break}case"block-map":case"block-seq":{const i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
|
155
|
+
`};delete t.items,Object.assign(t,{type:n,source:e,end:[i]});break}default:{const s="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(const r of Object.keys(t))r!=="type"&&r!=="offset"&&delete t[r];Object.assign(t,{type:n,indent:s,source:e,end:i})}}}const Im=t=>"type"in t?$n(t):Mn(t);function $n(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=$n(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=Mn(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=Mn(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=Mn(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function Mn({start:t,key:e,sep:n,value:s}){let i="";for(const r of t)i+=r.source;if(e&&(i+=$n(e)),n)for(const r of n)i+=r.source;return s&&(i+=$n(s)),i}const di=Symbol("break visit"),Om=Symbol("skip children"),Ol=Symbol("remove item");function tt(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),_l(Object.freeze([]),t,e)}tt.BREAK=di;tt.SKIP=Om;tt.REMOVE=Ol;tt.itemAtPath=(t,e)=>{let n=t;for(const[s,i]of e){const r=n?.[s];if(r&&"items"in r)n=r.items[i];else return}return n};tt.parentCollection=(t,e)=>{const n=tt.itemAtPath(t,e.slice(0,-1)),s=e[e.length-1][0],i=n?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function _l(t,e,n){let s=n(e,t);if(typeof s=="symbol")return s;for(const i of["key","value"]){const r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){const a=_l(Object.freeze(t.concat([[i,o]])),r.items[o],n);if(typeof a=="number")o=a-1;else{if(a===di)return di;a===Ol&&(r.items.splice(o,1),o-=1)}}typeof s=="function"&&i==="key"&&(s=s(e,t))}}return typeof s=="function"?s(e,t):s}const gs="\uFEFF",ms="",ys="",nn="",_m=t=>!!t&&"items"in t,Nm=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function xm(t){switch(t){case gs:return"<BOM>";case ms:return"<DOC>";case ys:return"<FLOW_END>";case nn:return"<SCALAR>";default:return JSON.stringify(t)}}function Nl(t){switch(t){case gs:return"byte-order-mark";case ms:return"doc-mode";case ys:return"flow-error-end";case nn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
156
156
|
`:case`\r
|
|
157
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const Pm=Object.freeze(Object.defineProperty({__proto__:null,BOM:gs,DOCUMENT:ms,FLOW_END:ys,SCALAR:nn,createScalarToken:
|
|
157
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const Pm=Object.freeze(Object.defineProperty({__proto__:null,BOM:gs,DOCUMENT:ms,FLOW_END:ys,SCALAR:nn,createScalarToken:Rm,isCollection:_m,isScalar:Nm,prettyToken:xm,resolveAsScalar:km,setScalarValue:Tm,stringify:Im,tokenType:Nl,visit:tt},Symbol.toStringTag,{value:"Module"}));function ge(t){switch(t){case void 0:case" ":case`
|
|
158
158
|
`:case"\r":case" ":return!0;default:return!1}}const bo=new Set("0123456789ABCDEFabcdef"),zm=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),vn=new Set(",[]{}"),Lm=new Set(` ,[]{}
|
|
159
159
|
\r `),xs=t=>!t||Lm.has(t);class xl{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let s=this.next??"stream";for(;s&&(n||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
|
160
160
|
`?!0:n==="\r"?this.buffer[e+1]===`
|
|
@@ -173,8 +173,8 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
173
173
|
`,r=this.buffer[s+1]):n=s),r==="#"||e&&vn.has(r))break;if(i===`
|
|
174
174
|
`){const o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(e&&vn.has(i))break;n=s}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield nn,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(xs))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(ge(n)||e&&vn.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!ge(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(zm.has(n))n=this.buffer[++e];else if(n==="%"&&bo.has(this.buffer[e+1])&&bo.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
|
175
175
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
176
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,s;do s=this.buffer[++n];while(s===" "||e&&s===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let n=this.pos,s=this.buffer[n];for(;!e(s);)s=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class Pl{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,s=this.lineStarts.length;for(;n<s;){const r=n+s>>1;this.lineStarts[r]<e?n=r+1:s=r}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const i=this.lineStarts[n-1];return{line:n,col:e-i+1}}}}function
|
|
176
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,s;do s=this.buffer[++n];while(s===" "||e&&s===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let n=this.pos,s=this.buffer[n];for(;!e(s);)s=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class Pl{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,s=this.lineStarts.length;for(;n<s;){const r=n+s>>1;this.lineStarts[r]<e?n=r+1:s=r}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const i=this.lineStarts[n-1];return{line:n,col:e-i+1}}}}function Me(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function wo(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function zl(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function bn(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function ft(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function So(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Me(e.start,"explicit-key-ind")&&!Me(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,zl(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Ki{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new xl,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,n))yield*this.next(s);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=Nl(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const s=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in s?s.indent:0:n.type==="flow-collection"&&s.type==="document"&&(n.indent=0),n.type==="flow-collection"&&So(n),s.type){case"document":s.value=n;break;case"block-scalar":s.props.push(n);break;case"block-map":{const i=s.items[s.items.length-1];if(i.value){s.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{const i=s.items[s.items.length-1];i.value?s.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{const i=s.items[s.items.length-1];!i||i.value?s.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&wo(i.start)===-1&&(n.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<n.indent))&&(s.type==="document"?s.end=i.start:s.items.push({start:i.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{wo(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const n=bn(this.peek(2)),s=ft(n);let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
177
177
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
178
|
-
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const s=!this.onKeyLine&&this.indent===e.indent,i=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let r=[];if(i&&n.sep&&!n.value){const o=[];for(let a=0;a<n.sep.length;++a){const l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(
|
|
178
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const s=!this.onKeyLine&&this.indent===e.indent,i=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let r=[];if(i&&n.sep&&!n.value){const o=[];for(let a=0;a<n.sep.length;++a){const l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Me(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(zl(n.key)&&!Me(n.sep,"newline")){const o=ft(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else r.length>0?n.sep=n.sep.concat(r,this.sourceToken):n.sep.push(this.sourceToken);else if(Me(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=ft(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):Me(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||n.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Me(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Me(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const i=bn(s),r=ft(i);So(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
|
|
179
179
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
180
|
-
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=bn(e),s=ft(n);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=bn(e),s=ft(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Ll(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Pl||null,prettyErrors:e}}function jm(t,e={}){const{lineCounter:n,prettyErrors:s}=Ll(e),i=new Ki(n?.addNewLine),r=new Qi(e),o=Array.from(r.compose(i.parse(t)));if(s&&n)for(const a of o)a.errors.forEach($n(t,n)),a.warnings.forEach($n(t,n));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function jl(t,e={}){const{lineCounter:n,prettyErrors:s}=Ll(e),i=new Ki(n?.addNewLine),r=new Qi(e);let o=null;for(const a of r.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Ke(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&n&&(o.errors.forEach($n(t,n)),o.warnings.forEach($n(t,n))),o}function Bm(t,e,n){let s;typeof e=="function"?s=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=jl(t,n);if(!i)return null;if(i.warnings.forEach(r=>il(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))}function Fm(t,e,n){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return at(t)&&!s?t.toString(n):new Bt(t,s,n).toString(n)}const LA=Object.freeze(Object.defineProperty({__proto__:null,Alias:rs,CST:Pm,Composer:Qi,Document:Bt,Lexer:xl,LineCounter:Pl,Pair:X,Parser:Ki,Scalar:O,Schema:ps,YAMLError:qi,YAMLMap:ie,YAMLParseError:Ke,YAMLSeq:ze,YAMLWarning:Al,isAlias:$e,isCollection:$,isDocument:at,isMap:Pt,isNode:U,isPair:B,isScalar:P,isSeq:zt,parse:Bm,parseAllDocuments:jm,parseDocument:jl,stringify:Fm,visit:lt,visitAsync:is},Symbol.toStringTag,{value:"Module"})),Bl=[],fi=new Map;function Yi(t){Bl.push(t),fi.forEach(e=>{$l(e,t)})}function $m(t){t.isConnected&&t.getRootNode&&Fl(t.getRootNode())}function Fl(t){let e=fi.get(t);if(!e||!e.isConnected){if(e=t.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");const n=Um();n&&(e.nonce=n);const s=t===document?document.head:t,i=t===document?s.querySelector("script,link[rel=stylesheet],link[as=style],style"):s.firstChild;s.insertBefore(e,i)}fi.set(t,e),Hm(e)}}function Hm(t){for(const e of Bl)$l(t,e)}function $l(t,e){const{sheet:n}=t,s=n.cssRules.length;e.split("}").forEach((i,r)=>{i=i.trim(),i&&n.insertRule(i+"}",s+r)})}let Ps;function Um(){return Ps===void 0&&(Ps=Vm()),Ps}function Vm(){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"&&Fl(document);var Zm=':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)}';Yi(Zm);class Ji{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:s}=this;e in s&&(n?delete s[e]:(s[e]-=1,s[e]<=0&&delete s[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 Xi(t){t.parentNode&&t.parentNode.removeChild(t)}function J(t,e){if(t.closest)return t.closest(e);if(!document.documentElement.contains(t))return null;do{if(Wm(t,e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}function Wm(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector).call(t,e)}function qm(t,e){let n=t instanceof HTMLElement?[t]:t,s=[];for(let i=0;i<n.length;i+=1){let r=n[i].querySelectorAll(e);for(let o=0;o<r.length;o+=1)s.push(r[o])}return s}const Gm=/(top|left|right|bottom|width|height)$/i;function Gt(t,e){for(let n in e)Hl(t,n,e[n])}function Hl(t,e,n){n==null?t.style[e]="":typeof n=="number"&&Gm.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function Ul(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 Eo=0;function vs(){return Eo+=1,"fc-dom-"+Eo}function bs(t){t.preventDefault()}function Qm(t,e){return n=>{let s=J(n.target,t);s&&e.call(s,n,s)}}function Vl(t,e,n,s){let i=Qm(n,s);return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}}function Km(t,e,n,s){let i;return Vl(t,"mouseover",e,(r,o)=>{if(o!==i){i=o,n(r,o);let a=l=>{i=null,s(l,o),o.removeEventListener("mouseleave",a)};o.addEventListener("mouseleave",a)}})}const Ao=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Ym(t,e){let n=s=>{e(s),Ao.forEach(i=>{t.removeEventListener(i,n)})};Ao.forEach(s=>{t.addEventListener(s,n)})}function Zl(t){return Object.assign({onClick:t},Wl(t))}function Wl(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let Co=0;function ct(){return Co+=1,String(Co)}function er(){document.body.classList.add("fc-not-allowed")}function tr(){document.body.classList.remove("fc-not-allowed")}function Jm(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",bs)}function Xm(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",bs)}function ey(t){t.addEventListener("contextmenu",bs)}function ty(t){t.removeEventListener("contextmenu",bs)}function ny(t){let e=[],n=[],s,i;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),s=0;s<n.length;s+=1)i=n[s],typeof i=="string"?e.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&e.push({func:i});return e}function sy(t,e,n){let s,i;for(s=0;s<n.length;s+=1)if(i=iy(t,e,n[s]),i)return i;return 0}function iy(t,e,n){return n.func?n.func(t,e):ry(t[n.field],e[n.field])*(n.order||1)}function ry(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 Ct(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}function Qt(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((s,i,r)=>s.replace("$"+r,i||""),t):n}function oy(t,e){return t-e}function On(t){return t%1===0}function ay(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 Do=["years","months","days","milliseconds"],ly=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function M(t,e){return typeof t=="string"?cy(t):typeof t=="object"&&t?ko(t):typeof t=="number"?ko({[e||"milliseconds"]:t}):null}function cy(t){let e=ly.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 ko(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 uy(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function hi(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function dy(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function fy(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function hy(t){return Dt(t)/365}function py(t){return Dt(t)/30}function Dt(t){return me(t)/864e5}function me(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function nr(t,e){let n=null;for(let s=0;s<Do.length;s+=1){let i=Do[s];if(e[i]){let r=t[i]/e[i];if(!On(r)||n!==null&&n!==r)return null;n=r}else if(t[i])return null}return n}function pi(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 Le(t,e,n){if(t===e)return!0;let s=t.length,i;if(s!==e.length)return!1;for(i=0;i<s;i+=1)if(!(n?n(t[i],e[i]):t[i]===e[i]))return!1;return!0}const gy=["sun","mon","tue","wed","thu","fri","sat"];function Y(t,e){let n=Ye(t);return n[2]+=e,re(n)}function je(t,e){let n=Ye(t);return n[6]+=e,re(n)}function Ft(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function my(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function yy(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function vy(t,e){return(e.valueOf()-t.valueOf())/1e3}function by(t,e){let n=L(t),s=L(e);return{years:0,months:0,days:Math.round(Ft(n,s)),milliseconds:e.valueOf()-s.valueOf()-(t.valueOf()-n.valueOf())}}function wy(t,e){let n=Un(t,e);return n!==null&&n%7===0?n/7:null}function Un(t,e){return Oe(t)===Oe(e)?Math.round(Ft(t,e)):null}function L(t){return re([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function Sy(t){return re([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function Ey(t){return re([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function Ay(t){return re([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function Cy(t,e,n){let s=t.getUTCFullYear(),i=zs(t,s,e,n);if(i<1)return zs(t,s-1,e,n);let r=zs(t,s+1,e,n);return r>=1?Math.min(i,r):i}function zs(t,e,n,s){let i=re([e,0,1+Dy(e,n,s)]),r=L(t),o=Math.round(Ft(i,r));return Math.floor(o/7)+1}function Dy(t,e,n){let s=7+e-n;return-((7+re([t,0,s]).getUTCDay()-e)%7)+s-1}function To(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function Ro(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 Ye(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function re(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function ql(t){return!isNaN(t.valueOf())}function Oe(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}function Gl(t,e,n=!1){let s=t.toISOString();return s=s.replace(".000",""),n&&(s=s.replace("T00:00:00Z","")),s.length>10&&(e==null?s=s.replace("Z",""):e!==0&&(s=s.replace("Z",ir(e,!0)))),s}function sr(t){return t.toISOString().replace(/T.*$/,"")}function ky(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function Ty(t){return Ct(t.getUTCHours(),2)+":"+Ct(t.getUTCMinutes(),2)+":"+Ct(t.getUTCSeconds(),2)}function ir(t,e=!1){let n=t<0?"-":"+",s=Math.abs(t),i=Math.floor(s/60),r=Math.round(s%60);return e?`${n+Ct(i,2)}:${Ct(r,2)}`:`GMT${n}${i}${r?`:${Ct(r,2)}`:""}`}function I(t,e,n){let s,i;return function(...r){if(!s)i=t.apply(this,r);else if(!Le(s,r)){let o=t.apply(this,r);(!e||!e(o,i))&&(i=o)}return s=r,i}}function Mn(t,e,n){let s,i;return r=>(s?ye(s,r)||(i=t.call(this,r)):i=t.call(this,r),s=r,i)}const Ls={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},Vn={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},wn=/\s*([ap])\.?m\.?/i,Ry=/,/g,Iy=/\s+/g,Oy=/\u200e/g,My=/UTC|GMT/;class _y{constructor(e){let n={},s={},i=9;for(let r in e)r in Ls?(s[r]=e[r],Ls[r]<9&&(i=Math.min(Ls[r],i))):(n[r]=e[r],r in Vn&&(i=Math.min(Vn[r],i)));this.standardDateProps=n,this.extendedSettings=s,this.smallestUnitNum=i,this.buildFormattingFunc=I(Io)}format(e,n){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,n)(e)}formatRange(e,n,s,i){let{standardDateProps:r,extendedSettings:o}=this,a=jy(e.marker,n.marker,s.calendarSystem);if(!a)return this.format(e,s);let l=a;l>1&&(r.year==="numeric"||r.year==="2-digit")&&(r.month==="numeric"||r.month==="2-digit")&&(r.day==="numeric"||r.day==="2-digit")&&(l=1);let c=this.format(e,s),u=this.format(n,s);if(c===u)return c;let d=By(r,l),f=Io(d,o,s),h=f(e),m=f(n),p=Fy(c,h,u,m),g=o.separator||i||s.defaultSeparator||"";return p?p.before+h+g+m+p.after:c+g+u}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 Io(t,e,n){let s=Object.keys(t).length;return s===1&&t.timeZoneName==="short"?i=>ir(i.timeZoneOffset):s===0&&e.week?i=>Ly(n.computeWeekNumber(i.marker),n.weekText,n.weekTextLong,n.locale,e.week):Ny(t,e,n)}function Ny(t,e,n){t=Object.assign({},t),e=Object.assign({},e),xy(t,e),t.timeZone="UTC";let s=new Intl.DateTimeFormat(n.locale.codes,t),i;if(e.omitZeroMinute){let r=Object.assign({},t);delete r.minute,i=new Intl.DateTimeFormat(n.locale.codes,r)}return r=>{let{marker:o}=r,a;i&&!o.getUTCMinutes()?a=i:a=s;let l=a.format(o);return Py(l,r,t,e,n)}}function xy(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 Py(t,e,n,s,i){return t=t.replace(Oy,""),n.timeZoneName==="short"&&(t=zy(t,i.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":ir(e.timeZoneOffset))),s.omitCommas&&(t=t.replace(Ry,"").trim()),s.omitZeroMinute&&(t=t.replace(":00","")),s.meridiem===!1?t=t.replace(wn,"").trim():s.meridiem==="narrow"?t=t.replace(wn,(r,o)=>o.toLocaleLowerCase()):s.meridiem==="short"?t=t.replace(wn,(r,o)=>`${o.toLocaleLowerCase()}m`):s.meridiem==="lowercase"&&(t=t.replace(wn,r=>r.toLocaleLowerCase())),t=t.replace(Iy," "),t=t.trim(),t}function zy(t,e){let n=!1;return t=t.replace(My,()=>(n=!0,e)),n||(t+=` ${e}`),t}function Ly(t,e,n,s,i){let r=[];return i==="long"?r.push(n):(i==="short"||i==="narrow")&&r.push(e),(i==="long"||i==="short")&&r.push(" "),r.push(s.simpleNumberFormat.format(t)),s.options.direction==="rtl"&&r.reverse(),r.join("")}function jy(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:Oe(t)!==Oe(e)?1:0}function By(t,e){let n={};for(let s in t)(!(s in Vn)||Vn[s]<=e)&&(n[s]=t[s]);return n}function Fy(t,e,n,s){let i=0;for(;i<t.length;){let r=t.indexOf(e,i);if(r===-1)break;let o=t.substr(0,r);i=r+e.length;let a=t.substr(i),l=0;for(;l<n.length;){let c=n.indexOf(s,l);if(c===-1)break;let u=n.substr(0,c);l=c+s.length;let d=n.substr(l);if(o===u&&a===d)return{before:o,after:a}}}return null}function Oo(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 Zn(t,e,n,s){let i=Oo(t,n.calendarSystem),r=e?Oo(e,n.calendarSystem):null;return{date:i,start:i,end:r,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:s||n.defaultSeparator}}class $y{constructor(e){this.cmdStr=e}format(e,n,s){return n.cmdFormatter(this.cmdStr,Zn(e,null,n,s))}formatRange(e,n,s,i){return s.cmdFormatter(this.cmdStr,Zn(e,n,s,i))}}class Hy{constructor(e){this.func=e}format(e,n,s){return this.func(Zn(e,null,n,s))}formatRange(e,n,s,i){return this.func(Zn(e,n,s,i))}}function H(t){return typeof t=="object"&&t?new _y(t):typeof t=="string"?new $y(t):typeof t=="function"?new Hy(t):null}const Mo={navLinkDayClick:b,navLinkWeekClick:b,duration:M,bootstrapFontAwesome:b,buttonIcons:b,customButtons:b,defaultAllDayEventDuration:M,defaultTimedEventDuration:M,nextDayThreshold:M,scrollTime:M,scrollTimeReset:Boolean,slotMinTime:M,slotMaxTime:M,dayPopoverFormat:H,slotDuration:M,snapDuration:M,headerToolbar:b,footerToolbar:b,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:H,dayHeaderClassNames:b,dayHeaderContent:b,dayHeaderDidMount:b,dayHeaderWillUnmount:b,dayCellClassNames:b,dayCellContent:b,dayCellDidMount:b,dayCellWillUnmount:b,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:b,weekNumbers:Boolean,weekNumberClassNames:b,weekNumberContent:b,weekNumberDidMount:b,weekNumberWillUnmount:b,editable:Boolean,viewClassNames:b,viewDidMount:b,viewWillUnmount:b,nowIndicator:Boolean,nowIndicatorSnap:b,nowIndicatorClassNames:b,nowIndicatorContent:b,nowIndicatorDidMount:b,nowIndicatorWillUnmount:b,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:b,locale:b,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:b,eventOrder:ny,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:b,contentHeight:b,direction:String,weekNumberFormat:H,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:b,initialDate:b,now:b,eventDataTransform:b,stickyHeaderDates:b,stickyFooterScrollbar:b,viewHeight:b,defaultAllDay:Boolean,eventSourceFailure:b,eventSourceSuccess:b,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:b,eventConstraint:b,eventAllow:b,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:b,eventContent:b,eventDidMount:b,eventWillUnmount:b,selectConstraint:b,selectOverlap:b,selectAllow:b,droppable:Boolean,unselectCancel:String,slotLabelFormat:b,slotLaneClassNames:b,slotLaneContent:b,slotLaneDidMount:b,slotLaneWillUnmount:b,slotLabelClassNames:b,slotLabelContent:b,slotLabelDidMount:b,slotLabelWillUnmount:b,dayMaxEvents:b,dayMaxEventRows:b,dayMinWidth:Number,slotLabelInterval:M,allDayText:String,allDayClassNames:b,allDayContent:b,allDayDidMount:b,allDayWillUnmount:b,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:H,rerenderDelay:Number,moreLinkText:b,moreLinkHint:b,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:b,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:M,hiddenDays:b,fixedWeekCount:Boolean,validRange:b,visibleRange:b,titleFormat:b,eventInteractive:Boolean,noEventsText:String,viewHint:b,navLinkHint:b,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:b,moreLinkClassNames:b,moreLinkContent:b,moreLinkDidMount:b,moreLinkWillUnmount:b,monthStartFormat:H,handleCustomRendering:b,customRenderingMetaMap:b,customRenderingReplaces:Boolean},Kt={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"},nowIndicatorSnap:"auto"},_o={datesSet:b,eventsSet:b,eventAdd:b,eventChange:b,eventRemove:b,windowResize:b,eventClick:b,eventMouseEnter:b,eventMouseLeave:b,select:b,unselect:b,loading:b,_unmount:b,_beforeprint:b,_afterprint:b,_noEventDrop:b,_noEventResize:b,_resize:b,_scrollRequest:b},No={buttonText:b,buttonHints:b,views:b,plugins:b,initialEvents:b,events:b,eventSources:b},Ze={headerToolbar:We,footerToolbar:We,buttonText:We,buttonHints:We,buttonIcons:We,dateIncrement:We,plugins:Sn,events:Sn,eventSources:Sn,resources:Sn};function We(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?ye(t,e):t===e}function Sn(t,e){return Array.isArray(t)&&Array.isArray(e)?Le(t,e):t===e}const Uy={type:String,component:b,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:b,usesMinMaxTime:Boolean,classNames:b,content:b,didMount:b,willUnmount:b};function js(t){return or(t,Ze)}function rr(t,e){let n={},s={};for(let i in e)i in t&&(n[i]=e[i](t[i]));for(let i in t)i in e||(s[i]=t[i]);return{refined:n,extra:s}}function b(t){return t}const{hasOwnProperty:Wn}=Object.prototype;function or(t,e){let n={};if(e){for(let s in e)if(e[s]===We){let i=[];for(let r=t.length-1;r>=0;r-=1){let o=t[r][s];if(typeof o=="object"&&o)i.unshift(o);else if(o!==void 0){n[s]=o;break}}i.length&&(n[s]=or(i))}}for(let s=t.length-1;s>=0;s-=1){let i=t[s];for(let r in i)r in n||(n[r]=i[r])}return n}function nt(t,e){let n={};for(let s in t)e(t[s],s)&&(n[s]=t[s]);return n}function ke(t,e){let n={};for(let s in t)n[s]=e(t[s],s);return n}function Ql(t){let e={};for(let n of t)e[n]=!0;return e}function ar(t){let e=[];for(let n in t)e.push(t[n]);return e}function ye(t,e){if(t===e)return!0;for(let n in t)if(Wn.call(t,n)&&!(n in e))return!1;for(let n in e)if(Wn.call(e,n)&&t[n]!==e[n])return!1;return!0}const Vy=/^on[A-Z]/;function Zy(t,e){const n=Wy(t,e);for(let s of n)if(!Vy.test(s))return!1;return!0}function Wy(t,e){let n=[];for(let s in t)Wn.call(t,s)&&(s in e||n.push(s));for(let s in e)Wn.call(e,s)&&t[s]!==e[s]&&n.push(s);return n}function Bs(t,e,n={}){if(t===e)return!0;for(let s in e)if(!(s in t&&qy(t[s],e[s],n[s])))return!1;for(let s in t)if(!(s in e))return!1;return!0}function qy(t,e,n){return t===e||n===!0?!0:n?n(t,e):!1}function Gy(t,e=0,n,s=1){let i=[];n==null&&(n=Object.keys(t).length);for(let r=e;r<n;r+=s){let o=t[r];o!==void 0&&i.push(o)}return i}let Kl={};function Qy(t,e){Kl[t]=e}function Ky(t){return new Kl[t]}class Yy{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return re(e)}markerToArray(e){return Ye(e)}}Qy("gregory",Yy);const Jy=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Xy(t){let e=Jy.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(ql(n)){let s=null;return e[13]&&(s=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:s}}}return null}class ev{constructor(e){let n=this.timeZone=e.timeZone,s=n!=="local"&&n!=="UTC";e.namedTimeZoneImpl&&s&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(n)),this.canComputeOffset=!!(!s||this.namedTimeZoneImpl),this.calendarSystem=Ky(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()):re(To(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=re(e)),n===null||!ql(n)?null:{marker:n,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let n=Xy(e);if(n===null)return null;let{marker:s}=n,i=null;return n.timeZoneOffset!==null&&(this.canComputeOffset?s=this.timestampToMarker(s.valueOf()-n.timeZoneOffset*60*1e3):i=n.timeZoneOffset),{marker:s,isTimeUnspecified:n.isTimeUnspecified,forcedTzo:i}}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 s=this.calendarSystem.markerToArray(e);return s[0]+=n.years,s[1]+=n.months,s[2]+=n.days,s[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(s)}subtract(e,n){let s=this.calendarSystem.markerToArray(e);return s[0]-=n.years,s[1]-=n.months,s[2]-=n.days,s[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(s)}addYears(e,n){let s=this.calendarSystem.markerToArray(e);return s[0]+=n,this.calendarSystem.arrayToMarker(s)}addMonths(e,n){let s=this.calendarSystem.markerToArray(e);return s[1]+=n,this.calendarSystem.arrayToMarker(s)}diffWholeYears(e,n){let{calendarSystem:s}=this;return Oe(e)===Oe(n)&&s.getMarkerDay(e)===s.getMarkerDay(n)&&s.getMarkerMonth(e)===s.getMarkerMonth(n)?s.getMarkerYear(n)-s.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:s}=this;return Oe(e)===Oe(n)&&s.getMarkerDay(e)===s.getMarkerDay(n)?s.getMarkerMonth(n)-s.getMarkerMonth(e)+(s.getMarkerYear(n)-s.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let s=this.diffWholeYears(e,n);return s!==null?{unit:"year",value:s}:(s=this.diffWholeMonths(e,n),s!==null?{unit:"month",value:s}:(s=wy(e,n),s!==null?{unit:"week",value:s}:(s=Un(e,n),s!==null?{unit:"day",value:s}:(s=my(e,n),On(s)?{unit:"hour",value:s}:(s=yy(e,n),On(s)?{unit:"minute",value:s}:(s=vy(e,n),On(s)?{unit:"second",value:s}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,s){let i;return s.years&&(i=this.diffWholeYears(e,n),i!==null)?i/hy(s):s.months&&(i=this.diffWholeMonths(e,n),i!==null)?i/py(s):s.days&&(i=Un(e,n),i!==null)?i/Dt(s):(n.valueOf()-e.valueOf())/me(s)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?L(e):n==="hour"?Sy(e):n==="minute"?Ey(e):n==="second"?Ay(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)):Cy(e,this.weekDow,this.weekDoy)}format(e,n,s={}){return n.format({marker:e,timeZoneOffset:s.forcedTzo!=null?s.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,n,s,i={}){return i.isEndExclusive&&(n=je(n,-1)),s.formatRange({marker:e,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(e)},{marker:n,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(n)},this,i.defaultSeparator)}formatIso(e,n={}){let s=null;return n.omitTimeZoneOffset||(n.forcedTzo!=null?s=n.forcedTzo:s=this.offsetForMarker(e)),Gl(e,s,n.omitTime)}timestampToMarker(e){return this.timeZone==="local"?re(To(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):re(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-Ro(Ye(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ye(e)):null}toDate(e,n){return this.timeZone==="local"?Ro(Ye(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Ye(e))*1e3*60):new Date(e.valueOf()-(n||0))}}class ln{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let n,s;if(typeof e=="object"&&e){n=Object.assign({},this.iconClasses);for(s in e)n[s]=this.applyIconOverridePrefix(e[s]);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 s;return n&&this.rtlIconClasses?s=this.rtlIconClasses[e]||this.iconClasses[e]:s=this.iconClasses[e],s?`${this.baseIconClass} ${s}`:""}getCustomButtonIconClass(e){let n;return this.iconOverrideCustomButtonOption&&(n=e[this.iconOverrideCustomButtonOption],n)?`${this.baseIconClass} ${this.applyIconOverridePrefix(n)}`:""}}ln.prototype.classes={};ln.prototype.iconClasses={};ln.prototype.baseIconClass="";ln.prototype.iconOverridePrefix="";function qn(t){t();let e=Ds.debounceRendering,n=[];function s(i){n.push(i)}for(Ds.debounceRendering=s,Qs(y(tv,{}),document.createElement("div"));n.length;)n.shift()();Ds.debounceRendering=e}class tv extends Xn{render(){return y("div",{})}componentDidMount(){this.setState({})}}function Yl(t){let e=uu(t),n=e.Provider;return e.Provider=function(){let s=!this.getChildContext,i=n.apply(this,arguments);if(s){let r=[];this.shouldComponentUpdate=o=>{this.props.value!==o.value&&r.forEach(a=>{a.context=o.value,a.forceUpdate()})},this.sub=o=>{r.push(o);let a=o.componentWillUnmount;o.componentWillUnmount=()=>{r.splice(r.indexOf(o),1),a&&a.call(o)}}}return i},e}class nv{constructor(e,n,s,i){this.execFunc=e,this.emitter=n,this.scrollTime=s,this.scrollTimeReset=i,this.handleScrollRequest=r=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},r),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 Te=Yl({});function sv(t,e,n,s,i,r,o,a,l,c,u,d,f,h){return{dateEnv:i,nowManager:r,options:n,pluginHooks:a,emitter:u,dispatch:l,getCurrentData:c,calendarApi:d,viewSpec:t,viewApi:e,dateProfileGenerator:s,theme:o,isRtl:n.direction==="rtl",addResizeHandler(m){u.on("_resize",m)},removeResizeHandler(m){u.off("_resize",m)},createScrollResponder(m){return new nv(m,u,M(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:f,unregisterInteractiveComponent:h}}class ut extends Xn{shouldComponentUpdate(e,n){return!Bs(this.props,e,this.propEquality)||!Bs(this.state,n,this.stateEquality)}safeSetState(e){Bs(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}ut.addPropsEquality=iv;ut.addStateEquality=rv;ut.contextType=Te;ut.prototype.propEquality={};ut.prototype.stateEquality={};class _ extends ut{}_.contextType=Te;function iv(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function rv(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function Se(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class lr extends _{constructor(){super(...arguments),this.id=ct(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:n}=this.context,{generatorName:s}=this.props;(!n.customRenderingReplaces||!gi(s,n))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Se(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:s}=n,{customGenerator:i,defaultGenerator:r,renderProps:o}=e,a=Jl(e,[],this.handleEl);let l=!1,c,u=[],d;if(i!=null){const f=typeof i=="function"?i(o,y):i;if(f===!0)l=!0;else{const h=f&&typeof f=="object";h&&"html"in f?a.dangerouslySetInnerHTML={__html:f.html}:h&&"domNodes"in f?u=Array.prototype.slice.call(f.domNodes):(h?du(f):typeof f!="function")?c=f:d=f}}else l=!gi(e.generatorName,s);return l&&r&&(c=r(o)),this.queuedDomNodes=u,this.currentGeneratorMeta=d,y(e.elTag,a,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var n;const{props:s,context:i}=this,{handleCustomRendering:r,customRenderingMetaMap:o}=i.options;if(r){const a=(n=this.currentGeneratorMeta)!==null&&n!==void 0?n:o?.[s.generatorName];a&&r(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:a},s),{elClasses:(s.elClasses||[]).filter(ov)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,s=this.base;if(!Le(e,n)){n.forEach(Xi);for(let i of e)s.appendChild(i);this.currentDomNodes=e}}}lr.addPropsEquality({elClasses:Le,elStyle:ye,elAttrs:Zy,renderProps:ye});function gi(t,e){var n;return!!(e.handleCustomRendering&&t&&(!((n=e.customRenderingMetaMap)===null||n===void 0)&&n[t]))}function Jl(t,e,n){const s=Object.assign(Object.assign({},t.elAttrs),{ref:n});return(t.elClasses||e)&&(s.className=(t.elClasses||[]).concat(e||[]).concat(s.className||[]).filter(Boolean).join(" ")),t.elStyle&&(s.style=t.elStyle),s}function ov(t){return!!t}const Xl=Yl(0);class ae extends Xn{constructor(){super(...arguments),this.InnerContent=av.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Se(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=lv(e.classNameGenerator,e.renderProps);if(e.children){const s=Jl(e,n,this.handleEl),i=e.children(this.InnerContent,e.renderProps,s);return e.elTag?y(e.elTag,s,i):i}else return y(lr,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}))}}ae.contextType=Xl;function av(t,e){const n=t.props;return y(lr,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context},e))}function lv(t,e){const n=typeof t=="function"?t(e):t||[];return typeof n=="string"?[n]:n}class xo extends _{render(){let{props:e,context:n}=this,{options:s}=n,i={view:n.viewApi};return y(ae,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:[...ec(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:i,classNameGenerator:s.viewClassNames,generatorName:void 0,didMount:s.viewDidMount,willUnmount:s.viewWillUnmount},()=>e.children)}}function ec(t){return[`fc-${t.type}-view`,"fc-view"]}function cv(t,e){let n=null,s=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(s=e.createMarker(t.end)),!n&&!s||n&&s&&s<n?null:{start:n,end:s}}function Po(t,e){let n=[],{start:s}=e,i,r;for(t.sort(uv),i=0;i<t.length;i+=1)r=t[i],r.start>s&&n.push({start:s,end:r.start}),r.end>s&&(s=r.end);return s<e.end&&n.push({start:s,end:e.end}),n}function uv(t,e){return t.start.valueOf()-e.start.valueOf()}function st(t,e){let{start:n,end:s}=t,i=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(s===null?s=e.end:s=new Date(Math.min(s.valueOf(),e.end.valueOf()))),(n===null||s===null||n<s)&&(i={start:n,end:s}),i}function dv(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 cr(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function ws(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function De(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function fv(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 tc(t){let e=Math.floor(Ft(t.start,t.end))||1,n=L(t.start),s=Y(n,e);return{start:n,end:s}}function nc(t,e=M(0)){let n=null,s=null;if(t.end){s=L(t.end);let i=t.end.valueOf()-s.valueOf();i&&i>=me(e)&&(s=Y(s,1))}return t.start&&(n=L(t.start),s&&s<=n&&(s=Y(n,1))),{start:n,end:s}}function wt(t,e,n,s){return s==="year"?M(n.diffWholeYears(t,e),"year"):s==="month"?M(n.diffWholeMonths(t,e),"month"):by(t,e)}class hv{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,n,s){let{dateEnv:i}=this.props,r=i.subtract(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(r,-1,s)}buildNext(e,n,s){let{dateEnv:i}=this.props,r=i.add(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(r,1,s)}build(e,n,s=!0){let{props:i}=this,r,o,a,l,c,u;return r=this.buildValidRange(),r=this.trimHiddenDays(r),s&&(e=fv(e,r)),o=this.buildCurrentRangeInfo(e,n),a=/^(year|month|week|day)$/.test(o.unit),l=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,a),l=this.trimHiddenDays(l),c=l,i.showNonCurrentDates||(c=st(c,o.range)),c=this.adjustActiveRange(c),c=st(c,r),u=cr(o.range,r),De(l,e)||(e=l.start),{currentDate:e,validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:a,activeRange:c,renderRange:l,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:u,dateIncrement:this.buildDateIncrement(o.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:s}=this,i=null,r=null,o=null,a;return s.duration?(i=s.duration,r=s.durationUnit,o=this.buildRangeFromDuration(e,n,i,r)):(a=this.props.dayCount)?(r="day",o=this.buildRangeFromDayCount(e,n,a)):(o=this.buildCustomVisibleRange(e))?r=s.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),r=pi(i).unit,o=this.buildRangeFromDuration(e,n,i,r)),{duration:i,unit:r,range:o}}getFallbackDuration(){return M({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:s,slotMinTime:i,slotMaxTime:r}=this.props,{start:o,end:a}=e;return s&&(Dt(i)<0&&(o=L(o),o=n.add(o,i)),Dt(r)>1&&(a=L(a),a=Y(a,-1),a=n.add(a,r))),{start:o,end:a}}buildRangeFromDuration(e,n,s,i){let{dateEnv:r,dateAlignment:o}=this.props,a,l,c;if(!o){let{dateIncrement:d}=this.props;d&&me(d)<me(s)?o=pi(d).unit:o=i}Dt(s)<=1&&this.isHiddenDay(a)&&(a=this.skipHiddenDays(a,n),a=L(a));function u(){a=r.startOf(e,o),l=r.add(a,s),c={start:a,end:l}}return u(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,n),u()),c}buildRangeFromDayCount(e,n,s){let{dateEnv:i,dateAlignment:r}=this.props,o=0,a=e,l;r&&(a=i.startOf(a,r)),a=L(a),a=this.skipHiddenDays(a,n),l=a;do l=Y(l,1),this.isHiddenDay(l)||(o+=1);while(o<s);return{start:a,end:l}}buildCustomVisibleRange(e){let{props:n}=this,s=n.visibleRangeInput,i=typeof s=="function"?s.call(n.calendarApi,n.dateEnv.toDate(e)):s,r=this.refineRange(i);return r&&(r.start==null||r.end==null)?null:r}buildRenderRange(e,n,s){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,s;return n||((s=this.props.dateAlignment)?M(1,s):e||M({days:1}))}refineRange(e){if(e){let n=cv(e,this.props.dateEnv);return n&&(n=nc(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],s=0,i;for(this.props.weekends===!1&&e.push(0,6),i=0;i<7;i+=1)(n[i]=e.indexOf(i)!==-1)||(s+=1);if(!s)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:s}=e;return n&&(n=this.skipHiddenDays(n)),s&&(s=this.skipHiddenDays(s,-1,!0)),n==null||s==null||n<s?{start:n,end:s}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,s=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(s?n:0)+7)%7];)e=Y(e,n);return e}}function ur(t,e,n,s){return{instanceId:ct(),defId:t,range:e,forcedStartTzo:n??null,forcedEndTzo:s??null}}function pv(t,e,n,s){for(let i=0;i<s.length;i+=1){let r=s[i].parse(t,n);if(r){let{allDay:o}=t;return o==null&&(o=e,o==null&&(o=r.allDayGuess,o==null&&(o=!1))),{allDay:o,duration:r.duration,typeData:r.typeData,typeId:i}}}return null}function it(t,e,n){let{dateEnv:s,pluginHooks:i,options:r}=n,{defs:o,instances:a}=t;a=nt(a,l=>!o[l.defId].recurringDef);for(let l in o){let c=o[l];if(c.recurringDef){let{duration:u}=c.recurringDef;u||(u=c.allDay?r.defaultAllDayEventDuration:r.defaultTimedEventDuration);let d=gv(c,u,e,s,i.recurringTypes);for(let f of d){let h=ur(l,{start:f,end:s.add(f,u)});a[h.instanceId]=h}}}return{defs:o,instances:a}}function gv(t,e,n,s,i){let o=i[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:s.subtract(n.start,e),end:n.end},s);return t.allDay&&(o=o.map(L)),o}const _n={id:String,groupId:String,title:String,url:String,interactive:Boolean},sc={start:b,end:b,date:b,allDay:Boolean},mv=Object.assign(Object.assign(Object.assign({},_n),sc),{extendedProps:b});function ic(t,e,n,s,i=dr(n),r,o){let{refined:a,extra:l}=rc(t,n,i),c=vv(e,n),u=pv(a,c,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let f=mi(a,l,e?e.sourceId:"",u.allDay,!!u.duration,n,r);return f.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:f,instance:null}}let d=yv(a,c,n,s);if(d){let f=mi(a,l,e?e.sourceId:"",d.allDay,d.hasEnd,n,r),h=ur(f.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return o&&f.publicId&&o[f.publicId]&&(h.instanceId=o[f.publicId]),{def:f,instance:h}}return null}function rc(t,e,n=dr(e)){return rr(t,n)}function dr(t){return Object.assign(Object.assign(Object.assign({},Gn),mv),t.pluginHooks.eventRefiners)}function mi(t,e,n,s,i,r,o){let a={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(o&&t.id?o[t.id]:"")||ct(),sourceId:n,allDay:s,hasEnd:i,interactive:t.interactive,ui:Qn(t,r),extendedProps:Object.assign(Object.assign({},t.extendedProps||{}),e)};for(let l of r.pluginHooks.eventDefMemberAdders)Object.assign(a,l(t));return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function yv(t,e,n,s){let{allDay:i}=t,r,o=null,a=!1,l,c=null,u=t.start!=null?t.start:t.date;if(r=n.dateEnv.createMarkerMeta(u),r)o=r.marker;else if(!s)return null;return t.end!=null&&(l=n.dateEnv.createMarkerMeta(t.end)),i==null&&(e!=null?i=e:i=(!r||r.isTimeUnspecified)&&(!l||l.isTimeUnspecified)),i&&o&&(o=L(o)),l&&(c=l.marker,i&&(c=L(c)),o&&c<=o&&(c=null)),c?a=!0:s||(a=n.options.forceEventDuration||!1,c=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:a,range:{start:o,end:c},forcedStartTzo:r?r.forcedTzo:null,forcedEndTzo:l?l.forcedTzo:null}}function vv(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}function sn(t,e,n,s,i,r){let o=oe(),a=dr(n);for(let l of t){let c=ic(l,e,n,s,a,i,r);c&&yi(c,o)}return o}function yi(t,e=oe()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function fr(t,e){let n=t.instances[e];if(n){let s=t.defs[n.defId],i=Ss(t,r=>bv(s,r));return i.defs[s.defId]=s,i.instances[n.instanceId]=n,i}return oe()}function bv(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function oe(){return{defs:{},instances:{}}}function hr(t,e){return{defs:Object.assign(Object.assign({},t.defs),e.defs),instances:Object.assign(Object.assign({},t.instances),e.instances)}}function Ss(t,e){let n=nt(t.defs,e),s=nt(t.instances,i=>n[i.defId]);return{defs:n,instances:s}}function wv(t,e){let{defs:n,instances:s}=t,i={},r={};for(let o in n)e.defs[o]||(i[o]=n[o]);for(let o in s)!e.instances[o]&&i[s[o].defId]&&(r[o]=s[o]);return{defs:i,instances:r}}function Sv(t,e){return Array.isArray(t)?sn(t,null,e,!0):typeof t=="object"&&t?sn([t],null,e,!0):t!=null?String(t):null}function zo(t){return Array.isArray(t)?t:typeof t=="string"?t.split(/\s+/):[]}const Gn={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:b,overlap:b,allow:b,className:zo,classNames:zo,color:String,backgroundColor:String,borderColor:String,textColor:String},Ev={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Qn(t,e){let n=Sv(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 oc(t){return t.reduce(Av,Ev)}function Av(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 Cv={id:String,defaultAllDay:Boolean,url:String,format:String,events:b,eventDataTransform:b,success:b,failure:b};function ac(t,e,n=lc(e)){let s;if(typeof t=="string"?s={url:t}:typeof t=="function"||Array.isArray(t)?s={events:t}:typeof t=="object"&&t&&(s=t),s){let{refined:i,extra:r}=rr(s,n),o=Dv(i,e);if(o)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:ct(),sourceDefId:o.sourceDefId,meta:o.meta,ui:Qn(i,e),extendedProps:r}}return null}function lc(t){return Object.assign(Object.assign(Object.assign({},Gn),Cv),t.pluginHooks.eventSourceRefiners)}function Dv(t,e){let n=e.pluginHooks.eventSourceDefs;for(let s=n.length-1;s>=0;s-=1){let r=n[s].parseMeta(t);if(r)return{sourceDefId:s,meta:r}}return null}function kv(t,e,n,s,i){switch(e.type){case"RECEIVE_EVENTS":return Tv(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,i);case"RESET_RAW_EVENTS":return Rv(t,n[e.sourceId],e.rawEvents,s.activeRange,i);case"ADD_EVENTS":return Iv(t,e.eventStore,s?s.activeRange:null,i);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return hr(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return s?it(t,s.activeRange,i):t;case"REMOVE_EVENTS":return wv(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return uc(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Ss(t,r=>!r.sourceId);case"REMOVE_ALL_EVENTS":return oe();default:return t}}function Tv(t,e,n,s,i,r){if(e&&n===e.latestFetchId){let o=sn(cc(i,e,r),e,r);return s&&(o=it(o,s,r)),hr(uc(t,e.sourceId),o)}return t}function Rv(t,e,n,s,i){const{defIdMap:r,instanceIdMap:o}=Mv(t);let a=sn(cc(n,e,i),e,i,!1,r,o);return it(a,s,i)}function cc(t,e,n){let s=n.options.eventDataTransform,i=e?e.eventDataTransform:null;return i&&(t=Lo(t,i)),s&&(t=Lo(t,s)),t}function Lo(t,e){let n;if(!e)n=t;else{n=[];for(let s of t){let i=e(s);i?n.push(i):i==null&&n.push(s)}}return n}function Iv(t,e,n,s){return n&&(e=it(e,n,s)),hr(t,e)}function jo(t,e,n){let{defs:s}=t,i=ke(t.instances,r=>s[r.defId].allDay?r:Object.assign(Object.assign({},r),{range:{start:n.createMarker(e.toDate(r.range.start,r.forcedStartTzo)),end:n.createMarker(e.toDate(r.range.end,r.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:r.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:r.forcedEndTzo}));return{defs:s,instances:i}}function uc(t,e){return Ss(t,n=>n.sourceId!==e)}function Ov(t,e){return{defs:t.defs,instances:nt(t.instances,n=>!e[n.instanceId])}}function Mv(t){const{defs:e,instances:n}=t,s={},i={};for(let r in e){const o=e[r],{publicId:a}=o;a&&(s[a]=r)}for(let r in n){const o=n[r],a=e[o.defId],{publicId:l}=a;l&&(i[l]=r)}return{defIdMap:s,instanceIdMap:i}}class Es{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){_v(this.handlers,e,n)}off(e,n){Nv(this.handlers,e,n)}trigger(e,...n){let s=this.handlers[e]||[],i=this.options&&this.options[e],r=[].concat(i||[],s);for(let o of r)o.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function _v(t,e,n){(t[e]||(t[e]=[])).push(n)}function Nv(t,e,n){n?t[e]&&(t[e]=t[e].filter(s=>s!==n)):delete t[e]}const xv={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Pv(t,e){return sn(zv(t),null,e)}function zv(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({},xv),n)),e}function dc(t,e,n){n.emitter.trigger("select",Object.assign(Object.assign({},pr(t,n)),{jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Lv(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function pr(t,e){let n={};for(let s of e.pluginHooks.dateSpanTransforms)Object.assign(n,s(t,e));return Object.assign(n,Yv(t,e.dateEnv)),n}function Bo(t,e,n){let{dateEnv:s,options:i}=n,r=e;return t?(r=L(r),r=s.add(r,i.defaultAllDayEventDuration)):r=s.add(r,i.defaultTimedEventDuration),r}function gr(t,e,n,s){let i=Kn(t.defs,e),r=oe();for(let o in t.defs){let a=t.defs[o];r.defs[o]=jv(a,i[o],n,s)}for(let o in t.instances){let a=t.instances[o],l=r.defs[a.defId];r.instances[o]=Bv(a,l,i[a.defId],n,s)}return r}function jv(t,e,n,s){let i=n.standardProps||{};i.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let r=Object.assign(Object.assign(Object.assign({},t),i),{ui:Object.assign(Object.assign({},t.ui),i.ui)});n.extendedProps&&(r.extendedProps=Object.assign(Object.assign({},r.extendedProps),n.extendedProps));for(let o of s.pluginHooks.eventDefMutationAppliers)o(r,n,s);return!r.hasEnd&&s.options.forceEventDuration&&(r.hasEnd=!0),r}function Bv(t,e,n,s,i){let{dateEnv:r}=i,o=s.standardProps&&s.standardProps.allDay===!0,a=s.standardProps&&s.standardProps.hasEnd===!1,l=Object.assign({},t);return o&&(l.range=tc(l.range)),s.datesDelta&&n.startEditable&&(l.range={start:r.add(l.range.start,s.datesDelta),end:r.add(l.range.end,s.datesDelta)}),s.startDelta&&n.durationEditable&&(l.range={start:r.add(l.range.start,s.startDelta),end:l.range.end}),s.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:r.add(l.range.end,s.endDelta)}),a&&(l.range={start:l.range.start,end:Bo(e.allDay,l.range.start,i)}),e.allDay&&(l.range={start:L(l.range.start),end:L(l.range.end)}),l.range.end<l.range.start&&(l.range.end=Bo(e.allDay,l.range.start,i)),l}class ht{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 j{constructor(e,n,s){this._context=e,this._def=n,this._instance=s||null}setProp(e,n){if(e in sc)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")n=_n[e](n),this.mutate({standardProps:{publicId:n}});else if(e in _n)n=_n[e](n),this.mutate({standardProps:{[e]:n}});else if(e in Gn){let s=Gn[e](n);e==="color"?s={backgroundColor:n,borderColor:n}:e==="editable"?s={startEditable:n,durationEditable:n}:s={[e]:n},this.mutate({standardProps:{ui:s}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:s}=this._context,i=s.createMarker(e);if(i&&this._instance){let r=this._instance.range,o=wt(r.start,i,s,n.granularity);n.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}}setEnd(e,n={}){let{dateEnv:s}=this._context,i;if(!(e!=null&&(i=s.createMarker(e),!i))&&this._instance)if(i){let r=wt(this._instance.range.end,i,s,n.granularity);this.mutate({endDelta:r})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,s={}){let{dateEnv:i}=this._context,r={allDay:s.allDay},o=i.createMarker(e),a;if(o&&!(n!=null&&(a=i.createMarker(n),!a))&&this._instance){let l=this._instance.range;s.allDay===!0&&(l=tc(l));let c=wt(l.start,o,i,s.granularity);if(a){let u=wt(l.end,a,i,s.granularity);uy(c,u)?this.mutate({datesDelta:c,standardProps:r}):this.mutate({startDelta:c,endDelta:u,standardProps:r})}else r.hasEnd=!1,this.mutate({datesDelta:c,standardProps:r})}}moveStart(e){let n=M(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=M(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=M(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let s={allDay:e},{maintainDuration:i}=n;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(s.hasEnd=i),this.mutate({standardProps:s})}formatRange(e){let{dateEnv:n}=this._context,s=this._instance,i=H(e);return this._def.hasEnd?n.formatRange(s.range.start,s.range.end,i,{forcedStartTzo:s.forcedStartTzo,forcedEndTzo:s.forcedEndTzo}):n.format(s.range.start,i,{forcedTzo:s.forcedStartTzo})}mutate(e){let n=this._instance;if(n){let s=this._def,i=this._context,{eventStore:r}=i.getCurrentData(),o=fr(r,n.instanceId);o=gr(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,i);let l=new j(i,s,n);this._def=o.defs[s.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:l,event:this,relatedEvents:Je(o,i,n),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:r})}})}}remove(){let e=this._context,n=fc(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 ht(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:s}=n,{startStr:i,endStr:r}=this,o={allDay:n.allDay};return n.title&&(o.title=n.title),i&&(o.start=i),r&&(o.end=r),n.publicId&&(o.id=n.publicId),n.groupId&&(o.groupId=n.groupId),n.url&&(o.url=n.url),s.display&&s.display!=="auto"&&(o.display=s.display),e.collapseColor&&s.backgroundColor&&s.backgroundColor===s.borderColor?o.color=s.backgroundColor:(s.backgroundColor&&(o.backgroundColor=s.backgroundColor),s.borderColor&&(o.borderColor=s.borderColor)),s.textColor&&(o.textColor=s.textColor),s.classNames.length&&(o.classNames=s.classNames),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(o,n.extendedProps):o.extendedProps=n.extendedProps),o}toJSON(){return this.toPlainObject()}}function fc(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function Je(t,e,n){let{defs:s,instances:i}=t,r=[],o=n?n.instanceId:"";for(let a in i){let l=i[a],c=s[l.defId];l.instanceId!==o&&r.push(new j(e,c,l))}return r}function Fo(t,e,n,s){let i={},r={},o={},a=[],l=[],c=Kn(t.defs,e);for(let u in t.defs){let d=t.defs[u];c[d.defId].display==="inverse-background"&&(d.groupId?(i[d.groupId]=[],o[d.groupId]||(o[d.groupId]=d)):r[u]=[])}for(let u in t.instances){let d=t.instances[u],f=t.defs[d.defId],h=c[f.defId],m=d.range,p=!f.allDay&&s?nc(m,s):m,g=st(p,n);g&&(h.display==="inverse-background"?f.groupId?i[f.groupId].push(g):r[d.defId].push(g):h.display!=="none"&&(h.display==="background"?a:l).push({def:f,ui:h,instance:d,range:g,isStart:p.start&&p.start.valueOf()===g.start.valueOf(),isEnd:p.end&&p.end.valueOf()===g.end.valueOf()}))}for(let u in i){let d=i[u],f=Po(d,n);for(let h of f){let m=o[u],p=c[m.defId];a.push({def:m,ui:p,instance:null,range:h,isStart:!1,isEnd:!1})}}for(let u in r){let d=r[u],f=Po(d,n);for(let h of f)a.push({def:t.defs[u],ui:c[u],instance:null,range:h,isStart:!1,isEnd:!1})}return{bg:a,fg:l}}function Fv(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function $o(t,e){t.fcSeg=e}function Mt(t){return t.fcSeg||t.parentNode.fcSeg||null}function Kn(t,e){return ke(t,n=>hc(n,e))}function hc(t,e){let n=[];return e[""]&&n.push(e[""]),e[t.defId]&&n.push(e[t.defId]),n.push(t.ui),oc(n)}function pc(t,e){let n=t.map($v);return n.sort((s,i)=>sy(s,i,e)),n.map(s=>s._seg)}function $v(t){let{eventRange:e}=t,n=e.def,s=e.instance?e.instance.range:e.range,i=s.start?s.start.valueOf():0,r=s.end?s.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:r,duration:r-i,allDay:Number(n.allDay),_seg:t})}function Hv(t,e){let{pluginHooks:n}=e,s=n.isDraggableTransformers,{def:i,ui:r}=t.eventRange,o=r.startEditable;for(let a of s)o=a(o,i,r,e);return o}function Uv(t,e){return t.isStart&&t.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function Vv(t,e){return t.isEnd&&t.eventRange.ui.durationEditable}function gc(t,e,n,s,i,r,o){let{dateEnv:a,options:l}=n,{displayEventTime:c,displayEventEnd:u}=l,d=t.eventRange.def,f=t.eventRange.instance;c==null&&(c=s!==!1),u==null&&(u=i!==!1);let h=f.range.start,m=f.range.end,p=t.start||t.eventRange.range.start,g=t.end||t.eventRange.range.end,v=L(h).valueOf()===L(p).valueOf(),w=L(je(m,-1)).valueOf()===L(je(g,-1)).valueOf();return c&&!d.allDay&&(v||w)?(p=v?h:p,g=w?m:g,u&&d.hasEnd?a.formatRange(p,g,e,{forcedStartTzo:f.forcedStartTzo,forcedEndTzo:f.forcedEndTzo}):a.format(p,e,{forcedTzo:f.forcedStartTzo})):""}function Ne(t,e,n){let s=t.eventRange.range;return{isPast:s.end<=(n||e.start),isFuture:s.start>=(n||e.end),isToday:e&&De(e,s.start)}}function Zv(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 mc(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function yc(t,e){let{def:n,instance:s}=t.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:r,options:o}=e,{eventInteractive:a}=o;return a==null&&(a=n.interactive,a==null&&(a=!!r.hasHandlers("eventClick"))),a?Wl(l=>{r.trigger("eventClick",{el:l.target,event:new j(e,n,s),jsEvent:l,view:e.viewApi})}):{}}const Wv={start:b,end:b,allDay:Boolean};function qv(t,e,n){let s=Gv(t,e),{range:i}=s;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=e.add(i.start,n)}return s}function Gv(t,e){let{refined:n,extra:s}=rr(t,Wv),i=n.start?e.createMarkerMeta(n.start):null,r=n.end?e.createMarkerMeta(n.end):null,{allDay:o}=n;return o==null&&(o=i&&i.isTimeUnspecified&&(!r||r.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:r?r.marker:null},allDay:o},s)}function Qv(t,e){return dv(t.range,e.range)&&t.allDay===e.allDay&&Kv(t,e)}function Kv(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 Yv(t,e){return Object.assign(Object.assign({},bc(t.range,e,t.allDay)),{allDay:t.allDay})}function vc(t,e,n){return Object.assign(Object.assign({},bc(t,e,n)),{timeZone:e.timeZone})}function bc(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 Jv(t,e,n){let s=rc({editable:!1},n),i=mi(s.refined,s.extra,"",t.allDay,!0,n);return{def:i,ui:hc(i,e),instance:ur(i.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function Xv(t,e,n){let s=!1,i=function(a){s||(s=!0,e(a))},r=function(a){s||(s=!0,n(a))},o=t(i,r);o&&typeof o.then=="function"&&o.then(i,r)}class Ho extends Error{constructor(e,n){super(e),this.response=n}}function eb(t,e,n){t=t.toUpperCase();const s={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(s.body=new URLSearchParams(n),s.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,s).then(i=>{if(i.ok)return i.json().then(r=>[r,i],()=>{throw new Ho("Failure parsing JSON",i)});throw new Ho("Request failed",i)})}let Fs;function wc(){return Fs==null&&(Fs=tb()),Fs}function tb(){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 nb extends _{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{qn(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{qn(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:n}=e,{forPrint:s}=this.state,i=s||n.height==="auto"||n.contentHeight==="auto",r=!i&&n.height!=null?n.height:"",o=["fc",s?"fc-media-print":"fc-media-screen",`fc-direction-${n.direction}`,e.theme.getClass("root")];return wc()||o.push("fc-liquid-hack"),e.children(o,r,i,s)}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 $t{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function sb(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function mr(t){return{[t.component.uid]:t}}const vi={};class Ht extends Xn{constructor(e,n){super(e,n),this.handleRefresh=()=>{let s=this.computeTiming();s.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(s.state),this.clearTimeout(),this.setTimeout(s.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,s=n.nowManager.getDateMarker(),{nowIndicatorSnap:i}=n.options;i==="auto"&&(i=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let r,o;return i?(r=n.dateEnv.startOf(s,e.unit),o=n.dateEnv.add(r,M(1,e.unit)).valueOf()-s.valueOf()):(r=s,o=1e3*60),o=Math.min(1e3*60*60*24,o),{state:{nowDate:r,todayRange:ib(r)},waitMs:o}}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)}}Ht.contextType=Te;function ib(t){let e=L(t),n=Y(e,1);return{start:e,end:n}}class rb{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:s}=this;s.currentCalendarOptionsRefiners[e]?s.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:s}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:s.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let s=this.getCurrentData(),i;n=n||"day",i=s.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:s}=this.getCurrentData(),i=[].concat(s.header?s.header.viewsWithButtons:[],s.footer?s.footer.viewsWithButtons:[]),r,o;for(let a in n)i.push(a);for(r=0;r<i.length;r+=1)if(o=n[i[r]],o&&o.singleUnit===e)return o;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(),s=M(e);s&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,s)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:s}=this.getCurrentData();return s.format(s.createMarker(e),H(n))}formatRange(e,n,s){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(e),i.createMarker(n),H(s),s)}formatIso(e,n){let{dateEnv:s}=this.getCurrentData();return s.formatIso(s.createMarker(e),{omitTime:n})}select(e,n){let s;n==null?e.start!=null?s=e:s={start:e,end:null}:s={start:e,end:n};let i=this.getCurrentData(),r=qv(s,i.dateEnv,M({days:1}));r&&(this.dispatch({type:"SELECT_DATES",selection:r}),dc(r,null,i))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),Lv(e,n))}addEvent(e,n){if(e instanceof j){let o=e._def,a=e._instance;return this.getCurrentData().eventStore.defs[o.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:yi({def:o,instance:a})}),this.triggerEventAdd(e)),e}let s=this.getCurrentData(),i;if(n instanceof ht)i=n.internalEventSource;else if(typeof n=="boolean")n&&([i]=ar(s.eventSources));else if(n!=null){let o=this.getEventSourceById(n);if(!o)return console.warn(`Could not find an event source with ID "${n}"`),null;i=o.internalEventSource}let r=ic(e,i,s,!1);if(r){let o=new j(s,r.def,r.def.recurringDef?null:r.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:yi(r)}),this.triggerEventAdd(o),o}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:fc(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:s,instances:i}=n.eventStore;e=String(e);for(let r in s){let o=s[r];if(o.publicId===e){if(o.recurringDef)return new j(n,o,null);for(let a in i){let l=i[a];if(l.defId===o.defId)return new j(n,o,l)}}}return null}getEvents(){let e=this.getCurrentData();return Je(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,s=[];for(let i in n)s.push(new ht(e,n[i]));return s}getEventSourceById(e){let n=this.getCurrentData(),s=n.eventSources;e=String(e);for(let i in s)if(s[i].publicId===e)return new ht(n,s[i]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof ht)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let s=ac(e,n);return s?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[s]}),new ht(n,s)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=M(e);n&&this.trigger("_scrollRequest",{time:n})}}function ob(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function Sc(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 ab(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 lb(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function cb(t,e){return{left:t.left-e.left,top:t.top-e.top}}const $s=oe();class ub{constructor(){this.getKeysForEventDefs=I(this._getKeysForEventDefs),this.splitDateSelection=I(this._splitDateSpan),this.splitEventStore=I(this._splitEventStore),this.splitIndividualUi=I(this._splitIndividualUi),this.splitEventDrag=I(this._splitInteraction),this.splitEventResize=I(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),s=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),r=this.splitIndividualUi(e.eventUiBases,s),o=this.splitEventStore(e.eventStore,s),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),c={};this.eventUiBuilders=ke(n,(u,d)=>this.eventUiBuilders[d]||I(db));for(let u in n){let d=n[u],f=o[u]||$s,h=this.eventUiBuilders[u];c[u]={businessHours:d.businessHours||e.businessHours,dateSelection:i[u]||null,eventStore:f,eventUiBases:h(e.eventUiBases[""],d.ui,r[u]),eventSelection:f.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[u]||null,eventResize:l[u]||null}}return c}_splitDateSpan(e){let n={};if(e){let s=this.getKeysForDateSpan(e);for(let i of s)n[i]=e}return n}_getKeysForEventDefs(e){return ke(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:s,instances:i}=e,r={};for(let o in s)for(let a of n[o])r[a]||(r[a]=oe()),r[a].defs[o]=s[o];for(let o in i){let a=i[o];for(let l of n[a.defId])r[l]&&(r[l].instances[o]=a)}return r}_splitIndividualUi(e,n){let s={};for(let i in e)if(i)for(let r of n[i])s[r]||(s[r]={}),s[r][i]=e[i];return s}_splitInteraction(e){let n={};if(e){let s=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),i=this._getKeysForEventDefs(e.mutatedEvents),r=this._splitEventStore(e.mutatedEvents,i),o=a=>{n[a]||(n[a]={affectedEvents:s[a]||$s,mutatedEvents:r[a]||$s,isEvent:e.isEvent})};for(let a in s)o(a);for(let a in r)o(a)}return n}}function db(t,e,n){let s=[];t&&s.push(t),e&&s.push(e);let i={"":oc(s)};return n&&Object.assign(i,n),i}function Ec(t,e,n,s){return{dow:t.getUTCDay(),isDisabled:!!(s&&(!s.activeRange||!De(s.activeRange,t))),isOther:!!(s&&!De(s.currentRange,t)),isToday:!!(e&&De(e,t)),isPast:!!(e&&t<e.start),isFuture:!!(e&&t>=e.end)}}function yr(t,e){let n=["fc-day",`fc-day-${gy[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 fb=H({year:"numeric",month:"long",day:"numeric"}),hb=H({week:"long"});function Yn(t,e,n="day",s=!0){const{dateEnv:i,options:r,calendarApi:o}=t;let a=i.format(e,n==="week"?hb:fb);if(r.navLinks){let l=i.toDate(e);const c=u=>{let d=n==="day"?r.navLinkDayClick:n==="week"?r.navLinkWeekClick:null;typeof d=="function"?d.call(o,i.toDate(e),u):(typeof d=="string"&&(n=d),o.zoomTo(e,n))};return Object.assign({title:Qt(r.navLinkHint,[a,l],a),"data-navlink":""},s?Zl(c):{onClick:c})}return{"aria-label":a}}let Hs=null;function pb(){return Hs===null&&(Hs=gb()),Hs}function gb(){let t=document.createElement("div");Gt(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 Xi(t),n}let Us;function mb(){return Us||(Us=yb()),Us}function yb(){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=Ac(t);return document.body.removeChild(t),e}function Ac(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}function vb(t,e=!1){let n=window.getComputedStyle(t),s=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,r=parseInt(n.borderTopWidth,10)||0,o=parseInt(n.borderBottomWidth,10)||0,a=Ac(t),l=a.y-s-i,c=a.x-r-o,u={borderLeft:s,borderRight:i,borderTop:r,borderBottom:o,scrollbarBottom:c,scrollbarLeft:0,scrollbarRight:0};return pb()&&n.direction==="rtl"?u.scrollbarLeft=l:u.scrollbarRight=l,e&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function bb(t,e=!1,n){let s=vr(t),i=vb(t,e),r={left:s.left+i.borderLeft+i.scrollbarLeft,right:s.right-i.borderRight-i.scrollbarRight,top:s.top+i.borderTop,bottom:s.bottom-i.borderBottom-i.scrollbarBottom};return e&&(r.left+=i.paddingLeft,r.right-=i.paddingRight,r.top+=i.paddingTop,r.bottom-=i.paddingBottom),r}function vr(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 wb(t){let e=Cc(t),n=t.getBoundingClientRect();for(let s of e){let i=Sc(n,s.getBoundingClientRect());if(i)n=i;else return null}return n}function Cc(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 _t{constructor(e,n,s,i){this.els=n;let r=this.originClientRect=e.getBoundingClientRect();s&&this.buildElHorizontals(r.left),i&&this.buildElVerticals(r.top)}buildElHorizontals(e){let n=[],s=[];for(let i of this.els){let r=i.getBoundingClientRect();n.push(r.left-e),s.push(r.right-e)}this.lefts=n,this.rights=s}buildElVerticals(e){let n=[],s=[];for(let i of this.els){let r=i.getBoundingClientRect();n.push(r.top-e),s.push(r.bottom-e)}this.tops=n,this.bottoms=s}leftToIndex(e){let{lefts:n,rights:s}=this,i=n.length,r;for(r=0;r<i;r+=1)if(e>=n[r]&&e<s[r])return r}topToIndex(e){let{tops:n,bottoms:s}=this,i=n.length,r;for(r=0;r<i;r+=1)if(e>=n[r]&&e<s[r])return r}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return En(this.tops||[],e.tops||[])&&En(this.bottoms||[],e.bottoms||[])&&En(this.lefts||[],e.lefts||[])&&En(this.rights||[],e.rights||[])}}function En(t,e){const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(Math.round(t[s])!==Math.round(e[s]))return!1;return!0}class br{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 Sb extends br{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 Eb extends br{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 Re extends _{constructor(){super(...arguments),this.uid=ct()}prepareHits(){}queryHit(e,n,s,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!J(e,".fc-event-mirror")}isValidDateDownEl(e){return!J(e,".fc-event:not(.fc-bg-event)")&&!J(e,".fc-more-link")&&!J(e,"a[data-navlink]")&&!J(e,".fc-popover")}}class Dc{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 s of e)this.insertEntry(s,n);return n}insertEntry(e,n){let s=this.findInsertion(e);this.isInsertionValid(s,e)?this.insertEntryAt(e,s):this.handleInvalidInsertion(s,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,s){if(this.allowReslicing&&e.touchingEntry){const i=Object.assign(Object.assign({},n),{span:wr(n.span,e.touchingEntry.span)});s.push(i),this.splitEntry(n,e.touchingEntry,s)}else s.push(n)}splitEntry(e,n,s){let i=e.span,r=n.span;i.start<r.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:r.start}},s),i.end>r.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.end,end:i.end}},s)}insertEntryAt(e,n){let{entriesByLevel:s,levelCoords:i}=this;n.lateral===-1?(Vs(i,n.level,n.levelCoord),Vs(s,n.level,[e])):Vs(s[n.level],n.lateral,e),this.stackCnts[Xe(e)]=n.stackCnt}findInsertion(e){let{levelCoords:n,entriesByLevel:s,strictOrder:i,stackCnts:r}=this,o=n.length,a=0,l=-1,c=-1,u=null,d=0;for(let m=0;m<o;m+=1){const p=n[m];if(!i&&p>=a+this.getEntryThickness(e))break;let g=s[m],v,w=wi(g,e.span.start,bi),E=w[0]+w[1];for(;(v=g[E])&&v.span.start<e.span.end;){let A=p+this.getEntryThickness(v);A>a&&(a=A,u=v,l=m,c=E),A===a&&(d=Math.max(d,r[Xe(v)]+1)),E+=1}}let f=0;if(u)for(f=l+1;f<o&&n[f]<a;)f+=1;let h=-1;return f<o&&n[f]===a&&(h=wi(s[f],e.span.end,bi)[0]),{touchingLevel:l,touchingLateral:c,touchingEntry:u,stackCnt:d,levelCoord:a,level:f,lateral:h}}toRects(){let{entriesByLevel:e,levelCoords:n}=this,s=e.length,i=[];for(let r=0;r<s;r+=1){let o=e[r],a=n[r];for(let l of o)i.push(Object.assign(Object.assign({},l),{thickness:this.getEntryThickness(l),levelCoord:a}))}return i}}function bi(t){return t.span.end}function Xe(t){return t.index+":"+t.span.start}function Ab(t){let e=[];for(let n of t){let s=[],i={span:n.span,entries:[n]};for(let r of e)wr(r.span,i.span)?i={entries:r.entries.concat(i.entries),span:Cb(r.span,i.span)}:s.push(r);s.push(i),e=s}return e}function Cb(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function wr(t,e){let n=Math.max(t.start,e.start),s=Math.min(t.end,e.end);return n<s?{start:n,end:s}:null}function Vs(t,e,n){t.splice(e,0,n)}function wi(t,e,n){let s=0,i=t.length;if(!i||e<n(t[s]))return[0,0];if(e>n(t[i-1]))return[i,0];for(;s<i;){let r=Math.floor(s+(i-s)/2),o=n(t[r]);if(e<o)i=r;else if(e>o)s=r+1;else return[r,1]}return[s,0]}class Db{constructor(e,n){this.emitter=new Es}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const Sr={};function kb(t,e){return!t||e>10?H({weekday:"short"}):e>1?H({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):H({weekday:"long"})}const kc="fc-col-header-cell";function Tc(t){return t.text}class Tb extends _{render(){let{dateEnv:e,options:n,theme:s,viewApi:i}=this.context,{props:r}=this,{date:o,dateProfile:a}=r,l=Ec(o,r.todayRange,null,a),c=[kc].concat(yr(l,s)),u=e.format(o,r.dayHeaderFormat),d=!l.isDisabled&&r.colCnt>1?Yn(this.context,o):{},f=e.toDate(o);e.namedTimeZoneImpl&&(f=je(f,36e5));let h=Object.assign(Object.assign(Object.assign({date:f,view:i},r.extraRenderProps),{text:u}),l);return y(ae,{elTag:"th",elClasses:c,elAttrs:Object.assign({role:"columnheader",colSpan:r.colSpan,"data-date":l.isDisabled?void 0:sr(o)},r.extraDataAttrs),renderProps:h,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:Tc,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},m=>y("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&y(m,{elTag:"a",elAttrs:d,elClasses:["fc-col-header-cell-cushion",r.isSticky&&"fc-sticky"]})))}}const Rb=H({weekday:"long"});class Ib extends _{render(){let{props:e}=this,{dateEnv:n,theme:s,viewApi:i,options:r}=this.context,o=Y(new Date(2592e5),e.dow),a={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=n.format(o,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:o},a),{view:i}),e.extraRenderProps),{text:l});return y(ae,{elTag:"th",elClasses:[kc,...yr(a,s),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:Tc,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},u=>y("div",{className:"fc-scrollgrid-sync-inner"},y(u,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":n.format(o,Rb)}})))}}class Ob extends _{constructor(){super(...arguments),this.createDayHeaderFormatter=I(Mb)}render(){let{context:e}=this,{dates:n,dateProfile:s,datesRepDistinctDays:i,renderIntro:r}=this.props,o=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return y(Ht,{unit:"day"},(a,l)=>y("tr",{role:"row"},r&&r("day"),n.map(c=>i?y(Tb,{key:c.toISOString(),date:c,dateProfile:s,todayRange:l,colCnt:n.length,dayHeaderFormat:o}):y(Ib,{key:c.getUTCDay(),dow:c.getUTCDay(),dayHeaderFormat:o}))))}}function Mb(t,e,n){return t||kb(e,n)}class _b{constructor(e,n){let s=e.start,{end:i}=e,r=[],o=[],a=-1;for(;s<i;)n.isHiddenDay(s)?r.push(a+.5):(a+=1,r.push(a),o.push(s)),s=Y(s,1);this.dates=o,this.indices=r,this.cnt=o.length}sliceRange(e){let n=this.getDateDayIndex(e.start),s=this.getDateDayIndex(Y(e.end,-1)),i=Math.max(0,n),r=Math.min(this.cnt-1,s);return i=Math.ceil(i),r=Math.floor(r),i<=r?{firstIndex:i,lastIndex:r,isStart:n===i,isEnd:s===r}:null}getDateDayIndex(e){let{indices:n}=this,s=Math.floor(Ft(this.dates[0],e));return s<0?n[0]-1:s>=n.length?n[n.length-1]+1:n[s]}}class Nb{constructor(e,n){let{dates:s}=e,i,r,o;if(n){for(r=s[0].getUTCDay(),i=1;i<s.length&&s[i].getUTCDay()!==r;i+=1);o=Math.ceil(s.length/i)}else o=1,i=s.length;this.rowCnt=o,this.colCnt=i,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCnt;n+=1){let s=[];for(let i=0;i<this.colCnt;i+=1)s.push(this.buildCell(n,i));e.push(s)}return e}buildCell(e,n){let s=this.daySeries.dates[e*this.colCnt+n];return{key:s.toISOString(),date:s}}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,s=this.daySeries.sliceRange(e),i=[];if(s){let{firstIndex:r,lastIndex:o}=s,a=r;for(;a<=o;){let l=Math.floor(a/n),c=Math.min((l+1)*n,o+1);i.push({row:l,firstCol:a%n,lastCol:(c-1)%n,isStart:s.isStart&&a===r,isEnd:s.isEnd&&c-1===o}),a=c}}return i}}class Rc{constructor(){this.sliceBusinessHours=I(this._sliceBusinessHours),this.sliceDateSelection=I(this._sliceDateSpan),this.sliceEventStore=I(this._sliceEventStore),this.sliceEventDrag=I(this._sliceInteraction),this.sliceEventResize=I(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,s,i,...r){let{eventUiBases:o}=e,a=this.sliceEventStore(e.eventStore,o,n,s,...r);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,s,o,i,...r),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,s,i,...r),fgEventSegs:a.fg,bgEventSegs:a.bg,eventDrag:this.sliceEventDrag(e.eventDrag,o,n,s,...r),eventResize:this.sliceEventResize(e.eventResize,o,n,s,...r),eventSelection:e.eventSelection}}sliceNowDate(e,n,s,i,...r){return this._sliceDateSpan({range:{start:e,end:je(e,1)},allDay:!1},n,s,{},i,...r)}_sliceBusinessHours(e,n,s,i,...r){return e?this._sliceEventStore(it(e,An(n,!!s),i),{},n,s,...r).bg:[]}_sliceEventStore(e,n,s,i,...r){if(e){let o=Fo(e,n,An(s,!!i),i);return{bg:this.sliceEventRanges(o.bg,r),fg:this.sliceEventRanges(o.fg,r)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,s,i,...r){if(!e)return null;let o=Fo(e.mutatedEvents,n,An(s,!!i),i);return{segs:this.sliceEventRanges(o.fg,r),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,s,i,r,...o){if(!e)return[];let a=An(n,!!s),l=st(e.range,a);if(l){e=Object.assign(Object.assign({},e),{range:l});let c=Jv(e,i,r),u=this.sliceRange(e.range,...o);for(let d of u)d.eventRange=c;return u}return[]}sliceEventRanges(e,n){let s=[];for(let i of e)s.push(...this.sliceEventRange(i,n));return s}sliceEventRange(e,n){let s=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(s={start:s.start,end:Y(s.start,1)});let i=this.sliceRange(s,...n);for(let r of i)r.eventRange=e,r.isStart=e.isStart&&r.isStart,r.isEnd=e.isEnd&&r.isEnd;return i}}function An(t,e){let n=t.activeRange;return e?n:{start:je(n.start,t.slotMinTime.milliseconds),end:je(n.end,t.slotMaxTime.milliseconds-864e5)}}function Ic(t,e,n){let{instances:s}=t.mutatedEvents;for(let i in s)if(!ws(e.validRange,s[i].range))return!1;return Oc({eventDrag:t},n)}function xb(t,e,n){return ws(e.validRange,t.range)?Oc({dateSelection:t},n):!1}function Oc(t,e){let n=e.getCurrentData(),s=Object.assign({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},t);return(e.pluginHooks.isPropsValid||Pb)(s,e)}function Pb(t,e,n={},s){return!(t.eventDrag&&!zb(t,e,n,s)||t.dateSelection&&!Lb(t,e,n,s))}function zb(t,e,n,s){let i=e.getCurrentData(),r=t.eventDrag,o=r.mutatedEvents,a=o.defs,l=o.instances,c=Kn(a,r.isEvent?t.eventUiBases:{"":i.selectionConfig});s&&(c=ke(c,s));let u=Ov(t.eventStore,r.affectedEvents.instances),d=u.defs,f=u.instances,h=Kn(d,t.eventUiBases);for(let m in l){let p=l[m],g=p.range,v=c[p.defId],w=a[p.defId];if(!Mc(v.constraints,g,u,t.businessHours,e))return!1;let{eventOverlap:E}=e.options,A=typeof E=="function"?E:null;for(let k in f){let T=f[k];if(cr(g,T.range)&&(h[T.defId].overlap===!1&&r.isEvent||v.overlap===!1||A&&!A(new j(e,d[T.defId],T),new j(e,w,p))))return!1}let D=i.eventStore;for(let k of v.allows){let T=Object.assign(Object.assign({},n),{range:p.range,allDay:w.allDay}),C=D.defs[w.defId],N=D.instances[m],Q;if(C?Q=new j(e,C,N):Q=new j(e,w),!k(pr(T,e),Q))return!1}}return!0}function Lb(t,e,n,s){let i=t.eventStore,r=i.defs,o=i.instances,a=t.dateSelection,l=a.range,{selectionConfig:c}=e.getCurrentData();if(s&&(c=s(c)),!Mc(c.constraints,l,i,t.businessHours,e))return!1;let{selectOverlap:u}=e.options,d=typeof u=="function"?u:null;for(let f in o){let h=o[f];if(cr(l,h.range)&&(c.overlap===!1||d&&!d(new j(e,r[h.defId],h),null)))return!1}for(let f of c.allows){let h=Object.assign(Object.assign({},n),a);if(!f(pr(h,e),null))return!1}return!0}function Mc(t,e,n,s,i){for(let r of t)if(!Bb(jb(r,e,n,s,i),e))return!1;return!0}function jb(t,e,n,s,i){return t==="businessHours"?Zs(it(s,e,i)):typeof t=="string"?Zs(Ss(n,r=>r.groupId===t)):typeof t=="object"&&t?Zs(it(t,e,i)):[]}function Zs(t){let{instances:e}=t,n=[];for(let s in e)n.push(e[s].range);return n}function Bb(t,e){for(let n of t)if(ws(n,e))return!0;return!1}const Cn=/^(visible|hidden)$/;class Fb extends _{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Se(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:n,liquidIsAbsolute:s}=e,i=n&&s,r=["fc-scroller"];return n&&(s?r.push("fc-scroller-liquid-absolute"):r.push("fc-scroller-liquid")),y("div",{ref:this.handleEl,className:r.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:i&&-(e.overcomeLeft||0)||"",right:i&&-(e.overcomeRight||0)||"",bottom:i&&-(e.overcomeBottom||0)||"",marginLeft:!i&&-(e.overcomeLeft||0)||"",marginRight:!i&&-(e.overcomeRight||0)||"",marginBottom:!i&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(Cn.test(this.props.overflowX))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:s}=e;for(let i=0;i<s.length;i+=1)if(s[i].getBoundingClientRect().width>n)return!0;return!1}needsYScrolling(){if(Cn.test(this.props.overflowY))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:s}=e;for(let i=0;i<s.length;i+=1)if(s[i].getBoundingClientRect().height>n)return!0;return!1}getXScrollbarWidth(){return Cn.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return Cn.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class Ae{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(n,s)=>{let{depths:i,currentMap:r}=this,o=!1,a=!1;n!==null?(o=s in r,r[s]=n,i[s]=(i[s]||0)+1,a=!0):(i[s]-=1,i[s]||(delete r[s],delete this.callbackMap[s],o=!0)),this.masterCallback&&(o&&this.masterCallback(null,String(s)),a&&this.masterCallback(n,String(s)))}}createRef(e){let n=this.callbackMap[e];return n||(n=this.callbackMap[e]=s=>{this.handleValue(s,String(e))}),n}collect(e,n,s){return Gy(this.currentMap,e,n,s)}getAll(){return ar(this.currentMap)}}function $b(t){let e=qm(t,".fc-scrollgrid-shrink"),n=0;for(let s of e)n=Math.max(n,ay(s));return Math.ceil(n)}function _c(t,e){return t.liquid&&e.liquid}function Hb(t,e){return e.maxHeight!=null||_c(t,e)}function Ub(t,e,n,s){let{expandRows:i}=n;return typeof e.content=="function"?e.content(n):y("table",{role:"presentation",className:[e.tableClassName,t.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,y(s?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(n):e.rowContent))}function Vb(t,e){return Le(t,e,ye)}function Zb(t,e){let n=[];for(let s of t){let i=s.span||1;for(let r=0;r<i;r+=1)n.push(y("col",{style:{width:s.width==="shrink"?Wb(e):s.width||"",minWidth:s.minWidth||""}}))}return y("colgroup",{},...n)}function Wb(t){return t??4}function qb(t){for(let e of t)if(e.width==="shrink")return!0;return!1}function Gb(t,e){let n=["fc-scrollgrid",e.theme.getClass("table")];return t&&n.push("fc-scrollgrid-liquid"),n}function Qb(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 Uo(t){return y("div",{className:"fc-scrollgrid-sticky-shim",style:{width:t.clientWidth,minWidth:t.tableMinWidth}})}function Vo(t){let{stickyHeaderDates:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}function Kb(t){let{stickyFooterScrollbar:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}class Nc extends _{constructor(){super(...arguments),this.processCols=I(e=>e,Vb),this.renderMicroColGroup=I(Zb),this.scrollerRefs=new Ae,this.scrollerElRefs=new Ae(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:s}=this,i=e.sections||[],r=this.processCols(e.cols),o=this.renderMicroColGroup(r,n.shrinkWidth),a=Gb(e.liquid,s);e.collapsibleWidth&&a.push("fc-scrollgrid-collapsible");let l=i.length,c=0,u,d=[],f=[],h=[];for(;c<l&&(u=i[c]).type==="header";)d.push(this.renderSection(u,o,!0)),c+=1;for(;c<l&&(u=i[c]).type==="body";)f.push(this.renderSection(u,o,!1)),c+=1;for(;c<l&&(u=i[c]).type==="footer";)h.push(this.renderSection(u,o,!0)),c+=1;let m=!wc();const p={role:"rowgroup"};return y("table",{role:"grid",className:a.join(" "),style:{height:e.height}},!!(!m&&d.length)&&y("thead",p,...d),!!(!m&&f.length)&&y("tbody",p,...f),!!(!m&&h.length)&&y("tfoot",p,...h),m&&y("tbody",p,...d,...f,...h))}renderSection(e,n,s){return"outerContent"in e?y(q,{key:e.key},e.outerContent):y("tr",{key:e.key,role:"presentation",className:Qb(e,this.props.liquid).join(" ")},this.renderChunkTd(e,n,e.chunk,s))}renderChunkTd(e,n,s,i){if("outerContent"in s)return s.outerContent;let{props:r}=this,{forceYScrollbars:o,scrollerClientWidths:a,scrollerClientHeights:l}=this.state,c=Hb(r,e),u=_c(r,e),d=r.liquid?o?"scroll":c?"auto":"hidden":"visible",f=e.key,h=Ub(e,s,{tableColGroupNode:n,tableMinWidth:"",clientWidth:!r.collapsibleWidth&&a[f]!==void 0?a[f]:null,clientHeight:l[f]!==void 0?l[f]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return y(i?"th":"td",{ref:s.elRef,role:"presentation"},y("div",{className:`fc-scroller-harness${u?" fc-scroller-harness-liquid":""}`},y(Fb,{ref:this.scrollerRefs.createRef(f),elRef:this.scrollerElRefs.createRef(f),overflowY:d,overflowX:r.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:u,liquidIsAbsolute:!0},h)))}_handleScrollerEl(e,n){let s=Yb(this.props.sections,n);s&&Se(s.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return qb(this.props.cols)?$b(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=mb(),{scrollerRefs:n,scrollerElRefs:s}=this,i=!1,r={},o={};for(let a in n.currentMap){let l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(let a of this.props.sections){let l=a.key,c=s.currentMap[l];if(c){let u=c.parentNode;r[l]=Math.floor(u.getBoundingClientRect().width-(i?e.y:0)),o[l]=Math.floor(u.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:r,scrollerClientHeights:o}}}Nc.addStateEquality({scrollerClientWidths:ye,scrollerClientHeights:ye});function Yb(t,e){for(let n of t)if(n.key===e)return n;return null}class Er extends _{constructor(){super(...arguments),this.buildPublicEvent=I((e,n,s)=>new j(e,n,s)),this.handleEl=e=>{this.el=e,Se(this.props.elRef,e),e&&$o(e,this.props.seg)}}render(){const{props:e,context:n}=this,{options:s}=n,{seg:i}=e,{eventRange:r}=i,{ui:o}=r,a={event:this.buildPublicEvent(n,r.def,r.instance),view:n.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&Hv(i,n),isStartResizable:!e.disableResizing&&Uv(i,n),isEndResizable:!e.disableResizing&&Vv(i),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return y(ae,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...Zv(a),...i.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:a,generatorName:"eventContent",customGenerator:s.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:s.eventClassNames,didMount:s.eventDidMount,willUnmount:s.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&$o(this.el,this.props.seg)}}class Ar extends _{render(){let{props:e,context:n}=this,{options:s}=n,{seg:i}=e,{ui:r}=i.eventRange,o=s.eventTimeFormat||e.defaultTimeFormat,a=gc(i,o,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return y(Er,Object.assign({},e,{elTag:"a",elStyle:{borderColor:r.borderColor,backgroundColor:r.backgroundColor},elAttrs:yc(i,n),defaultGenerator:Jb,timeText:a}),(l,c)=>y(q,null,y(l,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:c.textColor}}),!!c.isStartResizable&&y("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!c.isEndResizable&&y("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}Ar.addPropsEquality({seg:ye});function Jb(t){return y("div",{className:"fc-event-main-frame"},t.timeText&&y("div",{className:"fc-event-time"},t.timeText),y("div",{className:"fc-event-title-container"},y("div",{className:"fc-event-title fc-sticky"},t.event.title||y(q,null," "))))}const Cr=t=>y(Te.Consumer,null,e=>{let{options:n}=e,s={isAxis:t.isAxis,date:e.dateEnv.toDate(t.date),view:e.viewApi};return y(ae,{elRef:t.elRef,elTag:t.elTag||"div",elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:s,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},t.children)}),Xb=H({day:"numeric"});class Dr extends _{constructor(){super(...arguments),this.refineRenderProps=Mn(e0)}render(){let{props:e,context:n}=this,{options:s}=n,i=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:s.monthStartFormat});return y(ae,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),i.isDisabled?{}:{"data-date":sr(e.date)}),elClasses:[...yr(i,n.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:i,generatorName:"dayCellContent",customGenerator:s.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:i.isDisabled?void 0:s.dayCellClassNames,didMount:s.dayCellDidMount,willUnmount:s.dayCellWillUnmount},e.children)}}function kr(t){return!!(t.dayCellContent||gi("dayCellContent",t))}function e0(t){let{date:e,dateEnv:n,dateProfile:s,isMonthStart:i}=t,r=Ec(e,t.todayRange,null,s),o=t.showDayNumber?n.format(e,i?t.monthStartFormat:Xb):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(e),view:t.viewApi},r),{isMonthStart:i,dayNumberText:o}),t.extraRenderProps)}class xc extends _{render(){let{props:e}=this,{seg:n}=e;return y(Er,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:n.eventRange.ui.backgroundColor},defaultGenerator:t0,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 t0(t){let{title:e}=t.event;return e&&y("div",{className:"fc-event-title"},t.event.title)}function Pc(t){return y("div",{className:`fc-${t}`})}const zc=t=>y(Te.Consumer,null,e=>{let{dateEnv:n,options:s}=e,{date:i}=t,r=s.weekNumberFormat||t.defaultFormat,o=n.computeWeekNumber(i),a=n.format(i,r),l={num:o,text:a,date:i};return y(ae,{elRef:t.elRef,elTag:t.elTag,elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:l,generatorName:"weekNumberContent",customGenerator:s.weekNumberContent,defaultGenerator:n0,classNameGenerator:s.weekNumberClassNames,didMount:s.weekNumberDidMount,willUnmount:s.weekNumberWillUnmount},t.children)});function n0(t){return t.text}const Ws=10;class s0 extends _{constructor(){super(...arguments),this.state={titleId:vs()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Se(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const n=Ul(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:s,state:i}=this,r=["fc-popover",e.getClass("popover")].concat(s.extraClassNames||[]);return fu(y("div",Object.assign({},s.extraAttrs,{id:s.id,className:r.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),y("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},y("span",{className:"fc-popover-title",id:i.titleId},s.title),y("span",{className:"fc-popover-close "+e.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),y("div",{className:"fc-popover-body "+e.getClass("popoverContent")},s.children)),s.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:s}=this.props,{rootEl:i}=this,r=wb(n);if(r){let o=i.getBoundingClientRect(),a=s?J(n,".fc-scrollgrid").getBoundingClientRect().top:r.top,l=e?r.right-o.width:r.left;a=Math.max(a,Ws),l=Math.min(l,document.documentElement.clientWidth-Ws-o.width),l=Math.max(l,Ws);let c=i.offsetParent.getBoundingClientRect();Gt(i,{top:a-c.top,left:l-c.left})}}}class i0 extends Re{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:s}=this,{startDate:i,todayRange:r,dateProfile:o}=s,a=n.format(i,e.dayPopoverFormat);return y(Dr,{elRef:this.handleRootEl,date:i,dateProfile:o,todayRange:r},(l,c,u)=>y(s0,{elRef:u.ref,id:s.id,title:a,extraClassNames:["fc-more-popover"].concat(u.className||[]),extraAttrs:u,parentEl:s.parentEl,alignmentEl:s.alignmentEl,alignGridTop:s.alignGridTop,onClose:s.onClose},kr(e)&&y(l,{elTag:"div",elClasses:["fc-more-popover-misc"]}),s.children))}queryHit(e,n,s,i){let{rootEl:r,props:o}=this;return e>=0&&e<s&&n>=0&&n<i?{dateProfile:o.dateProfile,dateSpan:Object.assign({allDay:!o.forceTimed,range:{start:o.startDate,end:o.endDate}},o.extraDateSpan),dayEl:r,rect:{left:0,top:0,right:s,bottom:i},layer:1}:null}}class Lc extends _{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:vs()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Se(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:s}=this,{moreLinkClick:i}=s.options,r=Zo(n).start;function o(a){let{def:l,instance:c,range:u}=a.eventRange;return{event:new j(s,l,c),start:s.dateEnv.toDate(u.start),end:s.dateEnv.toDate(u.end),isStart:a.isStart,isEnd:a.isEnd}}typeof i=="function"&&(i=i({date:r,allDay:!!n.allDayDate,allSegs:n.allSegs.map(o),hiddenSegs:n.hiddenSegs.map(o),jsEvent:e,view:s.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&s.calendarApi.zoomTo(r,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return y(Te.Consumer,null,s=>{let{viewApi:i,options:r,calendarApi:o}=s,{moreLinkText:a}=r,{moreCnt:l}=e,c=Zo(e),u=typeof a=="function"?a.call(o,l):`+${l} ${a}`,d=Qt(r.moreLinkHint,[l],u),f={num:l,shortText:`+${l}`,text:u,view:i};return y(q,null,!!e.moreCnt&&y(ae,{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),Zl(this.handleClick)),{title:d,"aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?n.popoverId:""}),renderProps:f,generatorName:"moreLinkContent",customGenerator:r.moreLinkContent,defaultGenerator:e.defaultGenerator||r0,classNameGenerator:r.moreLinkClassNames,didMount:r.moreLinkDidMount,willUnmount:r.moreLinkWillUnmount},e.children),n.isPopoverOpen&&y(i0,{id:n.popoverId,startDate:c.start,endDate:c.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=J(this.linkEl,".fc-view-harness"))}}function r0(t){return t.text}function Zo(t){if(t.allDayDate)return{start:t.allDayDate,end:Y(t.allDayDate,1)};let{hiddenSegs:e}=t;return{start:jc(e),end:a0(e)}}function jc(t){return t.reduce(o0).eventRange.range.start}function o0(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function a0(t){return t.reduce(l0).eventRange.range.end}function l0(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class c0{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 u0 extends c0{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:n}=this;let s=!1;e.isActive?(n.set(e.id,e),s=!0):n.has(e.id)&&(n.delete(e.id),s=!0),s&&this.set(n)}}const d0=[],Bc={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"},Fc=Object.assign(Object.assign({},Bc),{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 f0(t){let e=t.length>0?t[0].code:"en",n=d0.concat(t),s={en:Fc};for(let i of n)s[i.code]=i;return{map:s,defaultCode:e}}function $c(t,e){return typeof t=="object"&&!Array.isArray(t)?Hc(t.code,[t.code],t):h0(t,e)}function h0(t,e){let n=[].concat(t||[]),s=p0(n,e)||Fc;return Hc(t,n,s)}function p0(t,e){for(let n=0;n<t.length;n+=1){let s=t[n].toLocaleLowerCase().split("-");for(let i=s.length;i>0;i-=1){let r=s.slice(0,i).join("-");if(e[r])return e[r]}}return null}function Hc(t,e,n){let s=or([Bc,n],["buttonText"]);delete s.code;let{week:i}=s;return delete s.week,{codeArg:t,codes:e,week:i,simpleNumberFormat:new Intl.NumberFormat(t),options:s}}function He(t){return{id:ct(),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 g0(t,e){let n={},s={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 i(r){for(let o of r){const a=o.name,l=n[a];l===void 0?(n[a]=o.id,i(o.deps),s=y0(s,o)):l!==o.id&&console.warn(`Duplicate plugin '${a}'`)}}return t&&i(t),i(e),s}function m0(){let t=[],e=[],n;return(s,i)=>((!n||!Le(s,t)||!Le(i,e))&&(n=g0(s,i)),t=s,e=i,n)}function y0(t,e){return{premiumReleaseDate:v0(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 v0(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}class Ue extends ln{}Ue.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};Ue.prototype.baseIconClass="fc-icon";Ue.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"};Ue.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};Ue.prototype.iconOverrideOption="buttonIcons";Ue.prototype.iconOverrideCustomButtonOption="icon";Ue.prototype.iconOverridePrefix="fc-icon-";function b0(t,e){let n={},s;for(s in t)Si(s,n,t,e);for(s in e)Si(s,n,t,e);return n}function Si(t,e,n,s){if(e[t])return e[t];let i=w0(t,e,n,s);return i&&(e[t]=i),i}function w0(t,e,n,s){let i=n[t],r=s[t],o=u=>i&&i[u]!==null?i[u]:r&&r[u]!==null?r[u]:null,a=o("component"),l=o("superType"),c=null;if(l){if(l===t)throw new Error("Can't have a custom view type that references itself");c=Si(l,e,n,s)}return!a&&c&&(a=c.component),a?{type:t,component:a,defaults:Object.assign(Object.assign({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),r?r.rawOptions:{})}:null}function Wo(t){return ke(t,S0)}function S0(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=qo(e):n&&!(n.prototype instanceof _)&&(n=qo(Object.assign(Object.assign({},e),{content:n}))),{superType:e.type,component:n,rawOptions:e}}function qo(t){return e=>y(Te.Consumer,null,n=>y(ae,{elTag:"div",elClasses:ec(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 E0(t,e,n,s){let i=Wo(t),r=Wo(e.views),o=b0(i,r);return ke(o,a=>A0(a,r,e,n,s))}function A0(t,e,n,s,i){let r=t.overrides.duration||t.defaults.duration||s.duration||n.duration,o=null,a="",l="",c={};if(r&&(o=C0(r),o)){let f=pi(o);a=f.unit,f.value===1&&(l=a,c=e[a]?e[a].rawOptions:{})}let u=f=>{let h=f.buttonText||{},m=t.defaults.buttonTextKey;return m!=null&&h[m]!=null?h[m]:h[t.type]!=null?h[t.type]:h[l]!=null?h[l]:null},d=f=>{let h=f.buttonHints||{},m=t.defaults.buttonTextKey;return m!=null&&h[m]!=null?h[m]:h[t.type]!=null?h[t.type]:h[l]!=null?h[l]:null};return{type:t.type,component:t.component,duration:o,durationUnit:a,singleUnit:l,optionDefaults:t.defaults,optionOverrides:Object.assign(Object.assign({},c),t.overrides),buttonTextOverride:u(s)||u(n)||t.overrides.buttonText,buttonTextDefault:u(i)||t.defaults.buttonText||u(Kt)||t.type,buttonTitleOverride:d(s)||d(n)||t.overrides.buttonHint,buttonTitleDefault:d(i)||t.defaults.buttonHint||d(Kt)}}let Go={};function C0(t){let e=JSON.stringify(t),n=Go[e];return n===void 0&&(n=M(t),Go[e]=n),n}function D0(t,e){return e.type==="CHANGE_VIEW_TYPE"&&(t=e.viewType),t}function k0(t,e){return e.type==="CHANGE_DATE"?e.dateMarker:t}function T0(t,e,n){let s=t.initialDate;return s!=null?e.createMarker(s):n.getDateMarker()}function R0(t,e){return e.type==="SET_OPTION"?Object.assign(Object.assign({},t),{[e.optionName]:e.rawOptionValue}):t}function I0(t,e,n,s){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return s.build(e.dateMarker||n);case"CHANGE_DATE":return s.build(e.dateMarker);case"PREV":if(i=s.buildPrev(t,n),i.isValid)return i;break;case"NEXT":if(i=s.buildNext(t,n),i.isValid)return i;break}return t}function O0(t,e,n){let s=e?e.activeRange:null;return Vc({},L0(t,n),s,n)}function M0(t,e,n,s){let i=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return Vc(t,e.sources,i,s);case"REMOVE_EVENT_SOURCE":return N0(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Zc(t,i,s):t;case"FETCH_EVENT_SOURCES":return Tr(t,e.sourceIds?Ql(e.sourceIds):Wc(t,s),i,e.isRefetch||!1,s);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return z0(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function _0(t,e,n){let s=e?e.activeRange:null;return Tr(t,Wc(t,n),s,!0,n)}function Uc(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function Vc(t,e,n,s){let i={};for(let r of e)i[r.sourceId]=r;return n&&(i=Zc(i,n,s)),Object.assign(Object.assign({},t),i)}function N0(t,e){return nt(t,n=>n.sourceId!==e)}function Zc(t,e,n){return Tr(t,nt(t,s=>x0(s,e,n)),e,!1,n)}function x0(t,e,n){return qc(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function Tr(t,e,n,s,i){let r={};for(let o in t){let a=t[o];e[o]?r[o]=P0(a,n,s,i):r[o]=a}return r}function P0(t,e,n,s){let{options:i,calendarApi:r}=s,o=s.pluginHooks.eventSourceDefs[t.sourceDefId],a=ct();return o.fetch({eventSource:t,range:e,isRefetch:n,context:s},l=>{let{rawEvents:c}=l;i.eventSourceSuccess&&(c=i.eventSourceSuccess.call(r,c,l.response)||c),t.success&&(c=t.success.call(r,c,l.response)||c),s.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:a,fetchRange:e,rawEvents:c})},l=>{let c=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(r,l),c=!0),t.failure&&(t.failure(l),c=!0),c||console.warn(l.message,l),s.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:a,fetchRange:e,error:l})}),Object.assign(Object.assign({},t),{isFetching:!0,latestFetchId:a})}function z0(t,e,n,s){let i=t[e];return i&&n===i.latestFetchId?Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:s})}):t}function Wc(t,e){return nt(t,n=>qc(n,e))}function L0(t,e){let n=lc(e),s=[].concat(t.eventSources||[]),i=[];t.initialEvents&&s.unshift(t.initialEvents),t.events&&s.unshift(t.events);for(let r of s){let o=ac(r,e,n);o&&i.push(o)}return i}function qc(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}function j0(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function B0(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function F0(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 $0(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 H0(t,e,n,s,i){let r=t.headerToolbar?Qo(t.headerToolbar,t,e,n,s,i):null,o=t.footerToolbar?Qo(t.footerToolbar,t,e,n,s,i):null;return{header:r,footer:o}}function Qo(t,e,n,s,i,r){let o={},a=[],l=!1;for(let c in t){let u=t[c],d=U0(u,e,n,s,i,r);o[c]=d.widgets,a.push(...d.viewsWithButtons),l=l||d.hasTitle}return{sectionWidgets:o,viewsWithButtons:a,hasTitle:l}}function U0(t,e,n,s,i,r){let o=e.direction==="rtl",a=e.customButtons||{},l=n.buttonText||{},c=e.buttonText||{},u=n.buttonHints||{},d=e.buttonHints||{},f=t?t.split(" "):[],h=[],m=!1;return{widgets:f.map(g=>g.split(",").map(v=>{if(v==="title")return m=!0,{buttonName:v};let w,E,A,D,k,T;if(w=a[v])A=C=>{w.click&&w.click.call(C.target,C,C.target)},(D=s.getCustomButtonIconClass(w))||(D=s.getIconClass(v,o))||(k=w.text),T=w.hint||w.text;else if(E=i[v]){h.push(v),A=()=>{r.changeView(v)},(k=E.buttonTextOverride)||(D=s.getIconClass(v,o))||(k=E.buttonTextDefault);let C=E.buttonTextOverride||E.buttonTextDefault;T=Qt(E.buttonTitleOverride||E.buttonTitleDefault||e.viewHint,[C,v],C)}else if(r[v])if(A=()=>{r[v]()},(k=l[v])||(D=s.getIconClass(v,o))||(k=c[v]),v==="prevYear"||v==="nextYear"){let C=v==="prevYear"?"prev":"next";T=Qt(u[C]||d[C],[c.year||"year","year"],c[v])}else T=C=>Qt(u[v]||d[v],[c[C]||C,C],c[v]);return{buttonName:v,buttonClick:A,buttonIcon:D,buttonText:k,buttonHint:T}})),viewsWithButtons:h,hasTitle:m}}class V0{constructor(e,n,s){this.type=e,this.getCurrentData=n,this.dateEnv=s}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]}}let Z0={ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}};const W0=He({name:"array-event-source",eventSourceDefs:[Z0]});let q0={parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:s}=t.context,i=t.eventSource.meta;Xv(i.bind(null,vc(t.range,s)),r=>e({rawEvents:r}),n)}};const G0=He({name:"func-event-source",eventSourceDefs:[q0]}),Q0={method:String,extraParams:b,startParam:String,endParam:String,timeZoneParam:String};let K0={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:s}=t.eventSource,i=J0(s,t.range,t.context);eb(s.method,s.url,i).then(([r,o])=>{e({rawEvents:r,response:o})},n)}};const Y0=He({name:"json-event-source",eventSourceRefiners:Q0,eventSourceDefs:[K0]});function J0(t,e,n){let{dateEnv:s,options:i}=n,r,o,a,l,c={};return r=t.startParam,r==null&&(r=i.startParam),o=t.endParam,o==null&&(o=i.endParam),a=t.timeZoneParam,a==null&&(a=i.timeZoneParam),typeof t.extraParams=="function"?l=t.extraParams():l=t.extraParams||{},Object.assign(c,l),c[r]=s.formatIso(e.start),c[o]=s.formatIso(e.end),s.timeZone!=="local"&&(c[a]=s.timeZone),c}const X0={daysOfWeek:b,startTime:M,endTime:M,duration:M,startRecur:b,endRecur:b};let ew={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},s;return t.duration&&(s=t.duration),!s&&t.startTime&&t.endTime&&(s=dy(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:s,typeData:n}}return null},expand(t,e,n){let s=st(e,{start:t.startRecur,end:t.endRecur});return s?nw(t.daysOfWeek,t.startTime,t.dateEnv,n,s):[]}};const tw=He({name:"simple-recurring-event",recurringTypes:[ew],eventRefiners:X0});function nw(t,e,n,s,i){let r=t?Ql(t):null,o=L(i.start),a=i.end,l=[];for(e&&(e.milliseconds<0?a=Y(a,1):e.milliseconds>=1e3*60*60*24&&(o=Y(o,-1)));o<a;){let c;(!r||r[o.getUTCDay()])&&(e?c=s.add(o,e):c=o,l.push(s.createMarker(n.toDate(c)))),o=Y(o,1)}return l}const sw=He({name:"change-handler",optionChangeHandlers:{events(t,e){Ko([t],e)},eventSources:Ko}});function Ko(t,e){let n=ar(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 s=[];for(let i of t){let r=!1;for(let o=0;o<n.length;o+=1)if(n[o]._raw===i){n.splice(o,1),r=!0;break}r||s.push(i)}for(let i of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of s)e.calendarApi.addEventSource(i)}function iw(t,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},vc(t.activeRange,e.dateEnv)),{view:e.viewApi}))}function rw(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Je(t,e))}const ow=[W0,G0,Y0,tw,sw,He({name:"misc",isLoadingFuncs:[t=>Uc(t.eventSources)],propSetHandlers:{dateProfile:iw,eventStore:rw}})];class aw{constructor(e,n){this.runTaskOption=e,this.drainedOption=n,this.queue=[],this.delayedRunner=new Ji(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=[],s;for(;s=e.shift();)this.runTask(s),n.push(s);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function lw(t,e,n){let s;return/^(year|month)$/.test(t.currentRangeUnit)?s=t.currentRange:s=t.activeRange,n.formatRange(s.start,s.end,H(e.titleFormat||cw(t)),{isEndExclusive:t.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function cw(t){let{currentRangeUnit:e}=t;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let n=Un(t.currentRange.start,t.currentRange.end);return n!==null&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class Yo{constructor(){this.resetListeners=new Set}handleInput(e,n){const s=this.dateEnv;if(e!==s&&(typeof n=="function"?this.nowFn=n:s||(this.nowAnchorDate=e.toDate(n?e.createMarker(n):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,s))for(const i of this.resetListeners.values())i()}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 uw{constructor(e){this.computeCurrentViewData=I(this._computeCurrentViewData),this.organizeRawLocales=I(f0),this.buildLocale=I($c),this.buildPluginHooks=m0(),this.buildDateEnv=I(dw),this.buildTheme=I(fw),this.parseToolbars=I(H0),this.buildViewSpecs=I(E0),this.buildDateProfileGenerator=Mn(hw),this.buildViewApi=I(pw),this.buildViewUiProps=Mn(yw),this.buildEventUiBySource=I(gw,ye),this.buildEventUiBases=I(mw),this.parseContextBusinessHours=Mn(vw),this.buildTitle=I(lw),this.nowManager=new Yo,this.emitter=new Es,this.actionRunner=new aw(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=f=>{this.actionRunner.request(f)},this.props=e,this.actionRunner.pause(),this.nowManager=new Yo;let n={},s=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=s.calendarOptions.initialView||s.pluginHooks.initialView,r=this.computeCurrentViewData(i,s,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(r.options);let o={nowManager:this.nowManager,dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},a=T0(s.calendarOptions,s.dateEnv,this.nowManager),l=r.dateProfileGenerator.build(a);De(l.activeRange,a)||(a=l.currentRange.start);for(let f of s.pluginHooks.contextInit)f(o);let c=O0(s.calendarOptions,l,o),u={dynamicOptionOverrides:n,currentViewType:i,currentDate:a,dateProfile:l,businessHours:this.parseContextBusinessHours(o),eventSources:c,eventUiBases:{},eventStore:oe(),renderableEventStore:oe(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(o).selectionConfig},d=Object.assign(Object.assign({},o),u);for(let f of s.pluginHooks.reducers)Object.assign(u,f(null,null,d));qs(u,o)&&this.emitter.trigger("loading",!0),this.state=u,this.updateData(),this.actionRunner.resume()}resetOptions(e,n){let{props:s}=this;n===void 0?s.optionOverrides=e:(s.optionOverrides=Object.assign(Object.assign({},s.optionOverrides||{}),e),this.optionsForRefining.push(...n)),(n===void 0||n.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:n,state:s,emitter:i}=this,r=R0(s.dynamicOptionOverrides,e),o=this.computeOptionsData(n.optionOverrides,r,n.calendarApi),a=D0(s.currentViewType,e),l=this.computeCurrentViewData(a,o,n.optionOverrides,r);n.calendarApi.currentDataManager=this,i.setThisContext(n.calendarApi),i.setOptions(l.options);let c={nowManager:this.nowManager,dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:u,dateProfile:d}=s;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(u)),u=k0(u,e),d=I0(d,e,u,l.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!De(d.currentRange,u))&&(u=d.currentRange.start);let f=M0(s.eventSources,e,d,c),h=kv(s.eventStore,e,f,d,c),p=Uc(f)&&!l.options.progressiveEventRendering&&s.renderableEventStore||h,{eventUiSingleBase:g,selectionConfig:v}=this.buildViewUiProps(c),w=this.buildEventUiBySource(f),E=this.buildEventUiBases(p.defs,g,w),A={dynamicOptionOverrides:r,currentViewType:a,currentDate:u,dateProfile:d,eventSources:f,eventStore:h,renderableEventStore:p,selectionConfig:v,eventUiBases:E,businessHours:this.parseContextBusinessHours(c),dateSelection:j0(s.dateSelection,e),eventSelection:B0(s.eventSelection,e),eventDrag:F0(s.eventDrag,e),eventResize:$0(s.eventResize,e)},D=Object.assign(Object.assign({},c),A);for(let C of o.pluginHooks.reducers)Object.assign(A,C(s,e,D));let k=qs(s,c),T=qs(A,c);!k&&T?i.trigger("loading",!0):k&&!T&&i.trigger("loading",!1),this.state=A,n.onAction&&n.onAction(e)}updateData(){let{props:e,state:n}=this,s=this.data,i=this.computeOptionsData(e.optionOverrides,n.dynamicOptionOverrides,e.calendarApi),r=this.computeCurrentViewData(n.currentViewType,i,e.optionOverrides,n.dynamicOptionOverrides),o=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(n.dateProfile,r.options,i.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),r),n),a=i.pluginHooks.optionChangeHandlers,l=s&&s.calendarOptions,c=i.calendarOptions;if(l&&l!==c){l.timeZone!==c.timeZone&&(n.eventSources=o.eventSources=_0(o.eventSources,n.dateProfile,o),n.eventStore=o.eventStore=jo(o.eventStore,s.dateEnv,o.dateEnv),n.renderableEventStore=o.renderableEventStore=jo(o.renderableEventStore,s.dateEnv,o.dateEnv));for(let u in a)(this.optionsForHandling.indexOf(u)!==-1||l[u]!==c[u])&&a[u](c[u],o)}this.optionsForHandling=[],e.onData&&e.onData(o)}computeOptionsData(e,n,s){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:r,localeDefaults:o,availableLocaleData:a,extra:l}=this.processRawCalendarOptions(e,n);Jo(l);let c=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,r,a,i.defaultRangeSeparator),u=this.buildViewSpecs(r.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,o),d=this.buildTheme(i,r),f=this.parseToolbars(i,this.stableOptionOverrides,d,u,s);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:r,dateEnv:c,viewSpecs:u,theme:d,toolbarConfig:f,localeDefaults:o,availableRawLocales:a.map}}processRawCalendarOptions(e,n){let{locales:s,locale:i}=js([Kt,e,n]),r=this.organizeRawLocales(s),o=r.map,a=this.buildLocale(i||r.defaultCode,o).options,l=this.buildPluginHooks(e.plugins||[],ow),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Mo),_o),No),l.listenerRefiners),l.optionRefiners),u={},d=js([Kt,a,e,n]),f={},h=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,p=!1;for(let g in d)this.optionsForRefining.indexOf(g)===-1&&(d[g]===h[g]||Ze[g]&&g in h&&Ze[g](h[g],d[g]))?f[g]=m[g]:c[g]?(f[g]=c[g](d[g]),p=!0):u[g]=h[g];return p&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=f,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:l,availableLocaleData:r,localeDefaults:a,extra:u}}_computeCurrentViewData(e,n,s,i){let r=n.viewSpecs[e];if(!r)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:o,extra:a}=this.processRawViewOptions(r,n.pluginHooks,n.localeDefaults,s,i);Jo(a),this.nowManager.handleInput(n.dateEnv,o.now);let l=this.buildDateProfileGenerator({dateProfileGeneratorClass:r.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:r.duration,durationUnit:r.durationUnit,usesMinMaxTime:r.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:o.slotMinTime,slotMaxTime:o.slotMaxTime,showNonCurrentDates:o.showNonCurrentDates,dayCount:o.dayCount,dateAlignment:o.dateAlignment,dateIncrement:o.dateIncrement,hiddenDays:o.hiddenDays,weekends:o.weekends,validRangeInput:o.validRange,visibleRangeInput:o.visibleRange,fixedWeekCount:o.fixedWeekCount}),c=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:r,options:o,dateProfileGenerator:l,viewApi:c}}processRawViewOptions(e,n,s,i,r){let o=js([Kt,e.optionDefaults,s,i,e.optionOverrides,r]),a=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Mo),_o),No),Uy),n.listenerRefiners),n.optionRefiners),l={},c=this.currentViewOptionsInput,u=this.currentViewOptionsRefined,d=!1,f={};for(let h in o)o[h]===c[h]||Ze[h]&&Ze[h](o[h],c[h])?l[h]=u[h]:(o[h]===this.currentCalendarOptionsInput[h]||Ze[h]&&Ze[h](o[h],this.currentCalendarOptionsInput[h])?h in this.currentCalendarOptionsRefined&&(l[h]=this.currentCalendarOptionsRefined[h]):a[h]?l[h]=a[h](o[h]):f[h]=o[h],d=!0);return d&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:f}}}function dw(t,e,n,s,i,r,o,a){let l=$c(e||o.defaultCode,o.map);return new ev({calendarSystem:"gregory",timeZone:t,namedTimeZoneImpl:r.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:s,weekText:i,cmdFormatter:r.cmdFormatter,defaultSeparator:a})}function fw(t,e){let n=e.themeClasses[t.themeSystem]||Ue;return new n(t)}function hw(t){let e=t.dateProfileGeneratorClass||hv;return new e(t)}function pw(t,e,n){return new V0(t,e,n)}function gw(t){return ke(t,e=>e.ui)}function mw(t,e,n){let s={"":e};for(let i in t){let r=t[i];r.sourceId&&n[r.sourceId]&&(s[i]=n[r.sourceId])}return s}function yw(t){let{options:e}=t;return{eventUiSingleBase:Qn({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:Qn({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function qs(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function vw(t){return Pv(t.options.businessHours,t)}function Jo(t,e){for(let n in t)console.warn(`Unknown option '${n}'`)}class bw extends _{render(){let e=this.props.widgetGroups.map(n=>this.renderWidgetGroup(n));return y("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:n}=this,{theme:s}=this.context,i=[],r=!0;for(let o of e){let{buttonName:a,buttonClick:l,buttonText:c,buttonIcon:u,buttonHint:d}=o;if(a==="title")r=!1,i.push(y("h2",{className:"fc-toolbar-title",id:n.titleId},n.title));else{let f=a===n.activeButton,h=!n.isTodayEnabled&&a==="today"||!n.isPrevEnabled&&a==="prev"||!n.isNextEnabled&&a==="next",m=[`fc-${a}-button`,s.getClass("button")];f&&m.push(s.getClass("buttonActive")),i.push(y("button",{type:"button",title:typeof d=="function"?d(n.navUnit):d,disabled:h,"aria-pressed":f,className:m.join(" "),onClick:l},c||(u?y("span",{className:u,role:"img"}):"")))}}if(i.length>1){let o=r&&s.getClass("buttonGroup")||"";return y("div",{className:o},...i)}return i[0]}}class Xo extends _{render(){let{model:e,extraClassName:n}=this.props,s=!1,i,r,o=e.sectionWidgets,a=o.center;return o.left?(s=!0,i=o.left):i=o.start,o.right?(s=!0,r=o.right):r=o.end,y("div",{className:[n||"","fc-toolbar",s?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",a||[]),this.renderSection("end",r||[]))}renderSection(e,n){let{props:s}=this;return y(bw,{key:e,widgetGroups:n,title:s.title,navUnit:s.navUnit,activeButton:s.activeButton,isTodayEnabled:s.isTodayEnabled,isPrevEnabled:s.isPrevEnabled,isNextEnabled:s.isNextEnabled,titleId:s.titleId})}}class ww extends _{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Se(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:n}=this,{aspectRatio:s}=e,i=["fc-view-harness",s||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],r="",o="";return s?n.availableWidth!==null?r=n.availableWidth/s:o=`${1/s*100}%`:r=e.height||"",y("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:r,paddingBottom:o}},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 Sw extends $t{constructor(e){super(e),this.handleSegClick=(n,s)=>{let{component:i}=this,{context:r}=i,o=Mt(s);if(o&&i.isValidSegDownEl(n.target)){let a=J(n.target,".fc-event-forced-url"),l=a?a.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:s,event:new j(i.context,o.eventRange.def,o.eventRange.instance),jsEvent:n,view:r.viewApi}),l&&!n.defaultPrevented&&(window.location.href=l)}},this.destroy=Vl(e.el,"click",".fc-event",this.handleSegClick)}}class Ew extends $t{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,s)=>{Mt(s)&&(this.currentSegEl=s,this.triggerEvent("eventMouseEnter",n,s))},this.handleSegLeave=(n,s)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,s))},this.removeHoverListeners=Km(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,s){let{component:i}=this,{context:r}=i,o=Mt(s);(!n||i.isValidSegDownEl(n.target))&&r.emitter.trigger(e,{el:s,event:new j(r,o.eventRange.def,o.eventRange.instance),jsEvent:n,view:r.viewApi})}}class Aw extends ut{constructor(){super(...arguments),this.buildViewContext=I(sv),this.buildViewPropTransformers=I(Dw),this.buildToolbarProps=I(Cw),this.headerRef=ue(),this.footerRef=ue(),this.interactionsStore={},this.state={viewLabelId:vs()},this.registerInteractiveComponent=(e,n)=>{let s=sb(e,n),o=[Sw,Ew].concat(this.props.pluginHooks.componentInteractions).map(a=>new a(s));this.interactionsStore[e.uid]=o,vi[e.uid]=s},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let s of n)s.destroy();delete this.interactionsStore[e.uid]}delete vi[e.uid]},this.resizeRunner=new Ji(()=>{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:s}=e,i=!1,r="",o;e.isHeightAuto||e.forPrint?r="":s.height!=null?i=!0:s.contentHeight!=null?r=s.contentHeight:o=Math.max(s.aspectRatio,.5);let a=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),l=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return y(Te.Provider,{value:a},y(Ht,{unit:"day"},c=>{let u=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,c,e.viewTitle);return y(q,null,n.header&&y(Xo,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:l},u)),y(ww,{liquid:i,height:r,aspectRatio:o,labeledById:l},this.renderView(e),this.buildAppendContent()),n.footer&&y(Xo,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},u)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(s=>new s(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:n}=e.pluginHooks;for(let s in n)n[s](e[s],e)}componentDidUpdate(e){let{props:n}=this,{propSetHandlers:s}=n.pluginHooks;for(let i in s)n[i]!==e[i]&&s[i](n[i],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(s=>s(e));return y(q,{},...n)}renderView(e){let{pluginHooks:n}=e,{viewSpec:s}=e,i={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},r=this.buildViewPropTransformers(n.viewPropsTransformers);for(let a of r)Object.assign(i,a.transform(i,e));let o=s.component;return y(o,Object.assign({},i))}}function Cw(t,e,n,s,i,r){let o=n.build(i,void 0,!1),a=n.buildPrev(e,s,!1),l=n.buildNext(e,s,!1);return{title:r,activeButton:t.type,navUnit:t.singleUnit,isTodayEnabled:o.isValid&&!De(e.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function Dw(t){return t.map(e=>new e)}class kw extends rb{constructor(e,n={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=s=>{switch(s.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=s=>{this.currentData=s,this.renderRunner.request(s.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:s}=this;qn(()=>{Qs(y(nb,{options:s.calendarOptions,theme:s.theme,emitter:s.emitter},(i,r,o,a)=>(this.setClassNames(i),this.setHeight(r),y(Xl.Provider,{value:this.customContentRenderId},y(Aw,Object.assign({isHeightAuto:o,forPrint:a},s))))),this.el)})}else this.isRendered&&(this.isRendered=!1,Qs(null,this.el),this.setClassNames([]),this.setHeight(""))},$m(e),this.el=e,this.renderRunner=new Ji(this.handleRenderRequest),new uw({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(){qn(()=>{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(!Le(e,this.currentClassNames)){let{classList:n}=this.el;for(let s of this.currentClassNames)n.remove(s);for(let s of e)n.add(s);this.currentClassNames=e}}setHeight(e){Hl(this.el,"height",e)}}Sr.touchMouseIgnoreWait=500;let Ei=0,Jn=0,Ai=!1;class Gc{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()&&Tw(n)&&this.tryStart(n)){let s=this.createEventFromMouse(n,!0);this.emitter.trigger("pointerdown",s),this.initScrollWatch(s),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=n=>{let s=this.createEventFromMouse(n);this.recordCoords(s),this.emitter.trigger("pointermove",s)},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 s=this.createEventFromTouch(n,!0);this.emitter.trigger("pointerdown",s),this.initScrollWatch(s);let i=n.target;this.shouldIgnoreMove||i.addEventListener("touchmove",this.handleTouchMove),i.addEventListener("touchend",this.handleTouchEnd),i.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=n=>{let s=this.createEventFromTouch(n);this.recordCoords(s),this.emitter.trigger("pointermove",s)},this.handleTouchEnd=n=>{if(this.isDragging){let s=n.target;s.removeEventListener("touchmove",this.handleTouchMove),s.removeEventListener("touchend",this.handleTouchEnd),s.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(n)),this.cleanup(),this.isTouchDragging=!1,Rw()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let s=window.scrollX-this.prevScrollX+this.prevPageX,i=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:s,pageY:i,deltaX:s-this.origPageX,deltaY:i-this.origPageY})}},this.containerEl=e,this.emitter=new Es,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),Iw()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),Ow()}tryStart(e){let n=this.querySubjectEl(e),s=e.target;return n&&(!this.handleSelector||J(s,this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){Ai=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?J(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return Ei||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Ai=!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 s=0,i=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(s=e.pageX-this.origPageX,i=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:s,deltaY:i}}createEventFromTouch(e,n){let s=e.touches,i,r,o=0,a=0;return s&&s.length?(i=s[0].pageX,r=s[0].pageY):(i=e.pageX,r=e.pageY),n?(this.origPageX=i,this.origPageY=r):(o=i-this.origPageX,a=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:r,deltaX:o,deltaY:a}}}function Tw(t){return t.button===0&&!t.ctrlKey}function Rw(){Ei+=1,setTimeout(()=>{Ei-=1},Sr.touchMouseIgnoreWait)}function Iw(){Jn+=1,Jn===1&&window.addEventListener("touchmove",Qc,{passive:!1})}function Ow(){Jn-=1,Jn||window.removeEventListener("touchmove",Qc,{passive:!1})}function Qc(t){Ai&&t.preventDefault()}class Mw{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,s){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=n-window.scrollX,this.origScreenY=s-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 s=()=>{this.cleanup(),n()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(s,this.revertDuration):setTimeout(s,0)}doRevertAnimation(e,n){let s=this.mirrorEl,i=this.sourceEl.getBoundingClientRect();s.style.transition="top "+n+"ms,left "+n+"ms",Gt(s,{left:i.left,top:i.top}),Ym(s,()=>{s.style.transition="",e()})}cleanup(){this.mirrorEl&&(Xi(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&Gt(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"),Gt(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 Kc extends br{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 Yc extends Kc{constructor(e,n){super(new Sb(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return bb(this.scrollController.el)}}class _w extends Kc{constructor(e){super(new Eb,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 ea=typeof performance=="function"?performance.now:Date.now;class Nw{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=ea();this.handleSide(e,(n-this.msSinceRequest)/1e3),this.requestAnimation(n)}else this.isAnimating=!1}}}start(e,n,s){this.isEnabled&&(this.scrollCaches=this.buildCaches(s),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 s=e-window.scrollX,i=n-window.scrollY,r=this.pointerScreenY===null?0:i-this.pointerScreenY,o=this.pointerScreenX===null?0:s-this.pointerScreenX;r<0?this.everMovedUp=!0:r>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=s,this.pointerScreenY=i,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(ea()))}}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:s}=e,{edgeThreshold:i}=this,r=i-e.distance,o=r*r/(i*i)*this.maxVelocity*n,a=1;switch(e.name){case"left":a=-1;case"right":s.setScrollLeft(s.getScrollLeft()+o*a);break;case"top":a=-1;case"bottom":s.setScrollTop(s.getScrollTop()+o*a);break}}computeBestEdge(e,n){let{edgeThreshold:s}=this,i=null,r=this.scrollCaches||[];for(let o of r){let a=o.clientRect,l=e-a.left,c=a.right-e,u=n-a.top,d=a.bottom-n;l>=0&&c>=0&&u>=0&&d>=0&&(u<=s&&this.everMovedUp&&o.canScrollUp()&&(!i||i.distance>u)&&(i={scrollCache:o,name:"top",distance:u}),d<=s&&this.everMovedDown&&o.canScrollDown()&&(!i||i.distance>d)&&(i={scrollCache:o,name:"bottom",distance:d}),l<=s&&this.everMovedLeft&&o.canScrollLeft()&&(!i||i.distance>l)&&(i={scrollCache:o,name:"left",distance:l}),c<=s&&this.everMovedRight&&o.canScrollRight()&&(!i||i.distance>c)&&(i={scrollCache:o,name:"right",distance:c}))}return i}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new _w(!1):new Yc(n,!1))}queryScrollEls(e){let n=[];for(let s of this.scrollQuery)typeof s=="object"?n.push(s):n.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(s)));return n}}class cn extends Db{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=i=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,Jm(document.body),ey(document.body),i.isTouch||i.origEvent.preventDefault(),this.emitter.trigger("pointerdown",i),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(i.subjectEl,i.pageX,i.pageY),this.startDelay(i),this.minDistance||this.handleDistanceSurpassed(i)))},this.onPointerMove=i=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",i),!this.isDistanceSurpassed){let r=this.minDistance,o,{deltaX:a,deltaY:l}=i;o=a*a+l*l,o>=r*r&&this.handleDistanceSurpassed(i)}this.isDragging&&(i.origEvent.type!=="scroll"&&(this.mirror.handleMove(i.pageX,i.pageY),this.autoScroller.handleMove(i.pageX,i.pageY)),this.emitter.trigger("dragmove",i))}},this.onPointerUp=i=>{this.isInteracting&&(this.isInteracting=!1,Xm(document.body),ty(document.body),this.emitter.trigger("pointerup",i),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(i)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let s=this.pointer=new Gc(e);s.emitter.on("pointerdown",this.onPointerDown),s.emitter.on("pointermove",this.onPointerMove),s.emitter.on("pointerup",this.onPointerUp),n&&(s.selector=n),this.mirror=new Mw,this.autoScroller=new Nw}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 xw{constructor(e){this.el=e,this.origRect=vr(e),this.scrollCaches=Cc(e).map(n=>new Yc(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 s={left:e,top:n};for(let i of this.scrollCaches)if(!Pw(i.getEventTarget())&&!ob(s,i.clientRect))return!1;return!0}}function Pw(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class As{constructor(e,n){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=s=>{let{dragging:i}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(s),this.initialHit||!this.requireInitial?(i.setIgnoreMove(!1),this.emitter.trigger("pointerdown",s)):i.setIgnoreMove(!0)},this.handleDragStart=s=>{this.emitter.trigger("dragstart",s),this.handleMove(s,!0)},this.handleDragMove=s=>{this.emitter.trigger("dragmove",s),this.handleMove(s)},this.handlePointerUp=s=>{this.releaseHits(),this.emitter.trigger("pointerup",s)},this.handleDragEnd=s=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,s),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",s)},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 Es}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},s=n,i=e.subjectEl,r;i instanceof HTMLElement&&(r=vr(i),s=ab(s,r));let o=this.initialHit=this.queryHitForOffset(s.left,s.top);if(o){if(this.useSubjectCenter&&r){let a=Sc(r,o.rect);a&&(s=lb(a))}this.coordAdjust=cb(s,n)}else this.coordAdjust={left:0,top:0}}handleMove(e,n){let s=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(n||!Cs(this.movingHit,s))&&(this.movingHit=s,this.emitter.trigger("hitupdate",s,!1,e))}prepareHits(){this.offsetTrackers=ke(this.droppableStore,e=>(e.component.prepareHits(),new xw(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:s,offsetTrackers:i}=this,r=null;for(let o in s){let a=s[o].component,l=i[o];if(l&&l.isWithinClipping(e,n)){let c=l.computeLeft(),u=l.computeTop(),d=e-c,f=n-u,{origRect:h}=l,m=h.right-h.left,p=h.bottom-h.top;if(d>=0&&d<m&&f>=0&&f<p){let g=a.queryHit(d,f,m,p);g&&ws(g.dateProfile.activeRange,g.dateSpan.range)&&(this.disablePointCheck||l.el.contains(l.el.getRootNode().elementFromPoint(d+c-window.scrollX,f+u-window.scrollY)))&&(!r||g.layer>r.layer)&&(g.componentId=o,g.context=a.context,g.rect.left+=c,g.rect.right+=c,g.rect.top+=u,g.rect.bottom+=u,r=g)}}}return r}}function Cs(t,e){return!t&&!e?!0:!!t!=!!e?!1:Qv(t.dateSpan,e.dateSpan)}function Jc(t,e){let n={};for(let s of e.pluginHooks.datePointTransforms)Object.assign(n,s(t,e));return Object.assign(n,zw(t,e.dateEnv)),n}function zw(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class Lw extends $t{constructor(e){super(e),this.handlePointerDown=s=>{let{dragging:i}=this,r=s.origEvent.target;i.setIgnoreMove(!this.component.isValidDateDownEl(r))},this.handleDragEnd=s=>{let{component:i}=this,{pointer:r}=this.dragging;if(!r.wasTouchScroll){let{initialHit:o,finalHit:a}=this.hitDragging;if(o&&a&&Cs(o,a)){let{context:l}=i,c=Object.assign(Object.assign({},Jc(o.dateSpan,l)),{dayEl:o.dayEl,jsEvent:s.origEvent,view:l.viewApi||l.calendarApi.view});l.emitter.trigger("dateClick",c)}}},this.dragging=new cn(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new As(this.dragging,mr(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class jw extends $t{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=o=>{let{component:a,dragging:l}=this,{options:c}=a.context,u=c.selectable&&a.isValidDateDownEl(o.origEvent.target);l.setIgnoreMove(!u),l.delay=o.isTouch?Bw(a):null},this.handleDragStart=o=>{this.component.context.calendarApi.unselect(o)},this.handleHitUpdate=(o,a)=>{let{context:l}=this.component,c=null,u=!1;if(o){let d=this.hitDragging.initialHit;o.componentId===d.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(d,o)||(c=Fw(d,o,l.pluginHooks.dateSelectionTransformers)),(!c||!xb(c,o.dateProfile,l))&&(u=!0,c=null)}c?l.dispatch({type:"SELECT_DATES",selection:c}):a||l.dispatch({type:"UNSELECT_DATES"}),u?er():tr(),a||(this.dragSelection=c)},this.handlePointerUp=o=>{this.dragSelection&&(dc(this.dragSelection,o,this.component.context),this.dragSelection=null)};let{component:n}=e,{options:s}=n.context,i=this.dragging=new cn(e.el);i.touchScrollAllowed=!1,i.minDistance=s.selectMinDistance||0,i.autoScroller.isEnabled=s.dragScroll;let r=this.hitDragging=new As(this.dragging,mr(e));r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Bw(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function Fw(t,e,n){let s=t.dateSpan,i=e.dateSpan,r=[s.range.start,s.range.end,i.range.start,i.range.end];r.sort(oy);let o={};for(let a of n){let l=a(t,e);if(l===!1)return null;l&&Object.assign(o,l)}return o.range={start:r[0],end:r[3]},o.allDay=s.allDay,o}class un extends $t{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=o=>{let a=o.origEvent.target,{component:l,dragging:c}=this,{mirror:u}=c,{options:d}=l.context,f=l.context;this.subjectEl=o.subjectEl;let h=this.subjectSeg=Mt(o.subjectEl),p=(this.eventRange=h.eventRange).instance.instanceId;this.relevantEvents=fr(f.getCurrentData().eventStore,p),c.minDistance=o.isTouch?0:d.eventDragMinDistance,c.delay=o.isTouch&&p!==l.props.eventSelection?Hw(l):null,d.fixedMirrorParent?u.parentNode=d.fixedMirrorParent:u.parentNode=J(a,".fc"),u.revertDuration=d.dragRevertDuration;let g=l.isValidSegDownEl(a)&&!J(a,".fc-event-resizer");c.setIgnoreMove(!g),this.isDragging=g&&o.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=o=>{let a=this.component.context,l=this.eventRange,c=l.instance.instanceId;o.isTouch?c!==this.component.props.eventSelection&&a.dispatch({type:"SELECT_EVENT",eventInstanceId:c}):a.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(a.calendarApi.unselect(o),a.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new j(a,l.def,l.instance),jsEvent:o.origEvent,view:a.viewApi}))},this.handleHitUpdate=(o,a)=>{if(!this.isDragging)return;let l=this.relevantEvents,c=this.hitDragging.initialHit,u=this.component.context,d=null,f=null,h=null,m=!1,p={affectedEvents:l,mutatedEvents:oe(),isEvent:!0};if(o){d=o.context;let g=d.options;u===d||g.editable&&g.droppable?(f=$w(c,o,this.eventRange.instance.range.start,d.getCurrentData().pluginHooks.eventDragMutationMassagers),f&&(h=gr(l,d.getCurrentData().eventUiBases,f,d),p.mutatedEvents=h,Ic(p,o.dateProfile,d)||(m=!0,f=null,h=null,p.mutatedEvents=oe()))):d=null}this.displayDrag(d,p),m?er():tr(),a||(u===d&&Cs(c,o)&&(f=null),this.dragging.setMirrorNeedsRevert(!f),this.dragging.setMirrorIsVisible(!o||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=d,this.validMutation=f,this.mutatedRelevantEvents=h)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=o=>{if(this.isDragging){let a=this.component.context,l=a.viewApi,{receivingContext:c,validMutation:u}=this,d=this.eventRange.def,f=this.eventRange.instance,h=new j(a,d,f),m=this.relevantEvents,p=this.mutatedRelevantEvents,{finalHit:g}=this.hitDragging;if(this.clearDrag(),a.emitter.trigger("eventDragStop",{el:this.subjectEl,event:h,jsEvent:o.origEvent,view:l}),u){if(c===a){let v=new j(a,p.defs[d.defId],f?p.instances[f.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:p});let w={oldEvent:h,event:v,relatedEvents:Je(p,a,f),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:m})}},E={};for(let A of a.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(E,A(u,a));a.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},w),E),{el:o.subjectEl,delta:u.datesDelta,jsEvent:o.origEvent,view:l})),a.emitter.trigger("eventChange",w)}else if(c){let v={event:h,relatedEvents:Je(m,a,f),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:m})}};a.emitter.trigger("eventLeave",Object.assign(Object.assign({},v),{draggedEl:o.subjectEl,view:l})),a.dispatch({type:"REMOVE_EVENTS",eventStore:m}),a.emitter.trigger("eventRemove",v);let w=p.defs[d.defId],E=p.instances[f.instanceId],A=new j(c,w,E);c.dispatch({type:"MERGE_EVENTS",eventStore:p});let D={event:A,relatedEvents:Je(p,c,E),revert(){c.dispatch({type:"REMOVE_EVENTS",eventStore:p})}};c.emitter.trigger("eventAdd",D),o.isTouch&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:f.instanceId}),c.emitter.trigger("drop",Object.assign(Object.assign({},Jc(g.dateSpan,c)),{draggedEl:o.subjectEl,jsEvent:o.origEvent,view:g.context.viewApi})),c.emitter.trigger("eventReceive",Object.assign(Object.assign({},D),{draggedEl:o.subjectEl,view:g.context.viewApi}))}}else a.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:s}=n.context,i=this.dragging=new cn(e.el);i.pointer.selector=un.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=s.dragScroll;let r=this.hitDragging=new As(this.dragging,vi);r.useSubjectCenter=e.useEventCenter,r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("pointerup",this.handlePointerUp),r.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,n){let s=this.component.context,i=this.receivingContext;i&&i!==e&&(i===s?i.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:oe(),isEvent:!0}}):i.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}}un.SELECTOR=".fc-event-draggable, .fc-event-resizable";function $w(t,e,n,s){let i=t.dateSpan,r=e.dateSpan,o=i.range.start,a=r.range.start,l={};i.allDay!==r.allDay&&(l.allDay=r.allDay,l.hasEnd=e.context.options.allDayMaintainDuration,r.allDay?o=L(n):o=n);let c=wt(o,a,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);c.milliseconds&&(l.allDay=!1);let u={datesDelta:c,standardProps:l};for(let d of s)d(u,t,e);return u}function Hw(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class Uw extends $t{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=r=>{let{component:o}=this,a=this.querySegEl(r),l=Mt(a),c=this.eventRange=l.eventRange;this.dragging.minDistance=o.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(r.origEvent.target)||r.isTouch&&this.component.props.eventSelection!==c.instance.instanceId)},this.handleDragStart=r=>{let{context:o}=this.component,a=this.eventRange;this.relevantEvents=fr(o.getCurrentData().eventStore,this.eventRange.instance.instanceId);let l=this.querySegEl(r);this.draggingSegEl=l,this.draggingSeg=Mt(l),o.calendarApi.unselect(),o.emitter.trigger("eventResizeStart",{el:l,event:new j(o,a.def,a.instance),jsEvent:r.origEvent,view:o.viewApi})},this.handleHitUpdate=(r,o,a)=>{let{context:l}=this.component,c=this.relevantEvents,u=this.hitDragging.initialHit,d=this.eventRange.instance,f=null,h=null,m=!1,p={affectedEvents:c,mutatedEvents:oe(),isEvent:!0};r&&(r.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,r)||(f=Vw(u,r,a.subjectEl.classList.contains("fc-event-resizer-start"),d.range))),f&&(h=gr(c,l.getCurrentData().eventUiBases,f,l),p.mutatedEvents=h,Ic(p,r.dateProfile,l)||(m=!0,f=null,h=null,p.mutatedEvents=null)),h?l.dispatch({type:"SET_EVENT_RESIZE",state:p}):l.dispatch({type:"UNSET_EVENT_RESIZE"}),m?er():tr(),o||(f&&Cs(u,r)&&(f=null),this.validMutation=f,this.mutatedRelevantEvents=h)},this.handleDragEnd=r=>{let{context:o}=this.component,a=this.eventRange.def,l=this.eventRange.instance,c=new j(o,a,l),u=this.relevantEvents,d=this.mutatedRelevantEvents;if(o.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:c,jsEvent:r.origEvent,view:o.viewApi}),this.validMutation){let f=new j(o,d.defs[a.defId],l?d.instances[l.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:d});let h={oldEvent:c,event:f,relatedEvents:Je(d,o,l),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:u})}};o.emitter.trigger("eventResize",Object.assign(Object.assign({},h),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||M(0),endDelta:this.validMutation.endDelta||M(0),jsEvent:r.origEvent,view:o.viewApi})),o.emitter.trigger("eventChange",h)}else o.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:n}=e,s=this.dragging=new cn(e.el);s.pointer.selector=".fc-event-resizer",s.touchScrollAllowed=!1,s.autoScroller.isEnabled=n.context.options.dragScroll;let i=this.hitDragging=new As(this.dragging,mr(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return J(e.subjectEl,".fc-event")}}function Vw(t,e,n,s){let i=t.context.dateEnv,r=t.dateSpan.range.start,o=e.dateSpan.range.start,a=wt(r,o,i,t.largeUnit);if(n){if(i.add(s.start,a)<s.end)return{startDelta:a}}else if(i.add(s.end,a)>s.start)return{endDelta:a};return null}class Zw{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=s=>{s.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=s=>{let i=this.context.options.unselectCancel,r=Ul(s.origEvent);this.matchesCancel=!!J(r,i),this.matchesEvent=!!J(r,un.SELECTOR)},this.onDocumentPointerUp=s=>{let{context:i}=this,{documentPointer:r}=this,o=i.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!this.isRecentPointerDateSelect){let a=i.options.unselectAuto;a&&(!a||!this.matchesCancel)&&i.calendarApi.unselect(s)}o.eventSelection&&!this.matchesEvent&&i.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new Gc(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 Ww={fixedMirrorParent:b},qw={dateClick:b,eventDragStart:b,eventDragStop:b,eventDrop:b,eventResizeStart:b,eventResizeStop:b,eventResize:b,drop:b,eventReceive:b,eventLeave:b};Sr.dataAttrPrefix="";var jA=He({name:"@fullcalendar/interaction",componentInteractions:[Lw,jw,un,Uw],calendarInteractions:[Zw],elementDraggingImpl:cn,optionRefiners:Ww,listenerRefiners:qw});const Gw=parseInt(String(Ks.version).split(".")[0]),Qw=Gw<18;class Kw extends hu{constructor(){super(...arguments),this.elRef=pu(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){const e=[];for(const n of this.state.customRenderingMap.values())e.push(Ks.createElement(Yw,{key:n.id,customRendering:n}));return Ks.createElement("div",{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;const e=new u0;this.handleCustomRendering=e.handle.bind(e),this.calendar=new kw(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on("_beforeprint",()=>{Ir(()=>{})});let n;e.subscribe(s=>{const i=Date.now(),r=!n;(Qw||r||this.isUpdating||this.isUnmounting||i-n<100?Xc:Ir)(()=>{this.setState({customRenderingMap:s},()=>{n=i,r?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}Kw.act=Xc;class Yw extends gu{render(){const{customRendering:e}=this.props,{generatorMeta:n}=e,s=typeof n=="function"?n(e.renderProps):n;return mu(s,e.containerEl)}}function Xc(t){t()}function Nn(t,e){let n=[];for(let s=0;s<e;s+=1)n[s]=[];for(let s of t)n[s.row].push(s);return n}function Dn(t,e){let n=[];for(let s=0;s<e;s+=1)n[s]=[];for(let s of t)n[s.firstCol].push(s);return n}function ta(t,e){let n=[];if(t){for(let s=0;s<e;s+=1)n[s]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let s of t.segs)n[s.row].segs.push(s)}else for(let s=0;s<e;s+=1)n[s]=null;return n}const eu=H({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function tu(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 nu extends _{render(){let{props:e}=this;return y(Ar,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:eu,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class su extends _{render(){let{props:e,context:n}=this,{options:s}=n,{seg:i}=e,r=s.eventTimeFormat||eu,o=gc(i,r,n,!0,e.defaultDisplayEventEnd);return y(Er,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:yc(e.seg,n),defaultGenerator:Jw,timeText:o,isResizing:!1,isDateSelecting:!1}))}}function Jw(t){return y(q,null,y("div",{className:"fc-daygrid-event-dot",style:{borderColor:t.borderColor||t.backgroundColor}}),t.timeText&&y("div",{className:"fc-event-time"},t.timeText),y("div",{className:"fc-event-title"},t.event.title||y(q,null," ")))}class Xw extends _{constructor(){super(...arguments),this.compileSegs=I(eS)}render(){let{props:e}=this,{allSegs:n,invisibleSegs:s}=this.compileSegs(e.singlePlacements);return y(Lc,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:s,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let i=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return y(q,null,n.map(r=>{let o=r.eventRange.instance.instanceId;return y("div",{className:"fc-daygrid-event-harness",key:o,style:{visibility:i[o]?"hidden":""}},tu(r)?y(su,Object.assign({seg:r,isDragging:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},Ne(r,e.todayRange))):y(nu,Object.assign({seg:r,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},Ne(r,e.todayRange))))}))}})}}function eS(t){let e=[],n=[];for(let s of t)e.push(s.seg),s.isVisible||n.push(s.seg);return{allSegs:e,invisibleSegs:n}}const tS=H({week:"narrow"});class nS extends Re{constructor(){super(...arguments),this.rootElRef=ue(),this.state={dayNumberId:vs()},this.handleRootEl=e=>{Se(this.rootElRef,e),Se(this.props.elRef,e)}}render(){let{context:e,props:n,state:s,rootElRef:i}=this,{options:r,dateEnv:o}=e,{date:a,dateProfile:l}=n;const c=n.showDayNumber&&iS(a,l.currentRange,o);return y(Dr,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...n.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},n.extraDataAttrs),n.showDayNumber?{"aria-labelledby":s.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:sS,date:a,dateProfile:l,todayRange:n.todayRange,showDayNumber:n.showDayNumber,isMonthStart:c,extraRenderProps:n.extraRenderProps},(u,d)=>y("div",{ref:n.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:n.minHeight}},n.showWeekNumber&&y(zc,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Yn(e,a,"week"),date:a,defaultFormat:tS}),!d.isDisabled&&(n.showDayNumber||kr(r)||n.forceDayTop)?y("div",{className:"fc-daygrid-day-top"},y(u,{elTag:"a",elClasses:["fc-daygrid-day-number",c&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Yn(e,a)),{id:s.dayNumberId})})):n.showDayNumber?y("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},y("a",{className:"fc-daygrid-day-number"}," ")):void 0,y("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,y("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},y(Xw,{allDayDate:a,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:i,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),y("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}}function sS(t){return t.dayNumberText||y(q,null," ")}function iS(t,e,n){const{start:s,end:i}=e,r=je(i,-1),o=n.getYear(s),a=n.getMonth(s),l=n.getYear(r),c=n.getMonth(r);return!(o===l&&a===c)&&(t.valueOf()===s.valueOf()||n.getDay(t)===1&&t.valueOf()<i.valueOf())}function iu(t){return t.eventRange.instance.instanceId+":"+t.firstCol}function ru(t){return iu(t)+":"+t.lastCol}function rS(t,e,n,s,i,r,o){let a=new lS(v=>{let w=t[v.index].eventRange.instance.instanceId+":"+v.span.start+":"+(v.span.end-1);return i[w]||1});a.allowReslicing=!0,a.strictOrder=s,e===!0||n===!0?(a.maxCoord=r,a.hiddenConsumes=!0):typeof e=="number"?a.maxStackCnt=e:typeof n=="number"&&(a.maxStackCnt=n,a.hiddenConsumes=!0);let l=[],c=[];for(let v=0;v<t.length;v+=1){let w=t[v],E=ru(w);i[E]!=null?l.push({index:v,span:{start:w.firstCol,end:w.lastCol+1}}):c.push(w)}let u=a.addSegs(l),d=a.toRects(),{singleColPlacements:f,multiColPlacements:h,leftoverMargins:m}=oS(d,t,o),p=[],g=[];for(let v of c){h[v.firstCol].push({seg:v,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let w=v.firstCol;w<=v.lastCol;w+=1)f[w].push({seg:kt(v,w,w+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let v=0;v<o.length;v+=1)p.push(0);for(let v of u){let w=t[v.index],E=v.span;h[E.start].push({seg:kt(w,E.start,E.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let A=E.start;A<E.end;A+=1)p[A]+=1,f[A].push({seg:kt(w,A,A+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let v=0;v<o.length;v+=1)g.push(m[v]);return{singleColPlacements:f,multiColPlacements:h,moreCnts:p,moreMarginTops:g}}function oS(t,e,n){let s=aS(t,n.length),i=[],r=[],o=[];for(let a=0;a<n.length;a+=1){let l=s[a],c=[],u=0,d=0;for(let h of l){let m=e[h.index];c.push({seg:kt(m,a,a+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:h.levelCoord,marginTop:h.levelCoord-u}),u=h.levelCoord+h.thickness}let f=[];u=0,d=0;for(let h of l){let m=e[h.index],p=h.span.end-h.span.start>1,g=h.span.start===a;d+=h.levelCoord-u,u=h.levelCoord+h.thickness,p?(d+=h.thickness,g&&f.push({seg:kt(m,h.span.start,h.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:h.levelCoord,marginTop:0})):g&&(f.push({seg:kt(m,h.span.start,h.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:h.levelCoord,marginTop:d}),d=0)}i.push(c),r.push(f),o.push(d)}return{singleColPlacements:i,multiColPlacements:r,leftoverMargins:o}}function aS(t,e){let n=[];for(let s=0;s<e;s+=1)n.push([]);for(let s of t)for(let i=s.span.start;i<s.span.end;i+=1)n[i].push(s);return n}function kt(t,e,n,s){if(t.firstCol===e&&t.lastCol===n-1)return t;let i=t.eventRange,r=i.range,o=st(r,{start:s[e].date,end:Y(s[n-1].date,1)});return Object.assign(Object.assign({},t),{firstCol:e,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:t.isStart&&o.start.valueOf()===r.start.valueOf(),isEnd:t.isEnd&&o.end.valueOf()===r.end.valueOf()})}class lS extends Dc{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const n=super.addSegs(e),{entriesByLevel:s}=this,i=r=>!this.forceHidden[Xe(r)];for(let r=0;r<s.length;r+=1)s[r]=s[r].filter(i);return n}handleInvalidInsertion(e,n,s){const{entriesByLevel:i,forceHidden:r}=this,{touchingEntry:o,touchingLevel:a,touchingLateral:l}=e;if(this.hiddenConsumes&&o){const c=Xe(o);if(!r[c])if(this.allowReslicing){const u=Object.assign(Object.assign({},o),{span:wr(o.span,n.span)}),d=Xe(u);r[d]=!0,i[a][l]=u,s.push(u),this.splitEntry(o,n,s)}else r[c]=!0,s.push(o)}super.handleInvalidInsertion(e,n,s)}}class ou extends Re{constructor(){super(...arguments),this.cellElRefs=new Ae,this.frameElRefs=new Ae,this.fgElRefs=new Ae,this.segHarnessRefs=new Ae,this.rootElRef=ue(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:n,context:s}=this,{options:i}=s,r=e.cells.length,o=Dn(e.businessHourSegs,r),a=Dn(e.bgEventSegs,r),l=Dn(this.getHighlightSegs(),r),c=Dn(this.getMirrorSegs(),r),{singleColPlacements:u,multiColPlacements:d,moreCnts:f,moreMarginTops:h}=rS(pc(e.fgEventSegs,i.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,i.eventOrderStrict,n.segHeights,n.maxContentHeight,e.cells),m=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return y("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((p,g)=>{let v=this.renderFgSegs(g,e.forPrint?u[g]:d[g],e.todayRange,m),w=this.renderFgSegs(g,cS(c[g],d),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return y(nS,{key:p.key,elRef:this.cellElRefs.createRef(p.key),innerElRef:this.frameElRefs.createRef(p.key),dateProfile:e.dateProfile,date:p.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&g===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:p.extraRenderProps,extraDataAttrs:p.extraDataAttrs,extraClassNames:p.extraClassNames,extraDateSpan:p.extraDateSpan,moreCnt:f[g],moreMarginTop:h[g],singlePlacements:u[g],fgContentElRef:this.fgElRefs.createRef(p.key),fgContent:y(q,null,y(q,null,v),y(q,null,w)),bgContent:y(q,null,this.renderFillSegs(l[g],"highlight"),this.renderFillSegs(o[g],"non-business"),this.renderFillSegs(a[g],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,n){let s=this.props;this.updateSizing(!ye(e,s))}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,s,i,r,o,a){let{context:l}=this,{eventSelection:c}=this.props,{framePositions:u}=this.state,d=this.props.cells.length===1,f=r||o||a,h=[];if(u)for(let m of n){let{seg:p}=m,{instanceId:g}=p.eventRange.instance,v=m.isVisible&&!i[g],w=m.isAbsolute,E="",A="";w&&(l.isRtl?(A=0,E=u.lefts[p.lastCol]-u.lefts[p.firstCol]):(E=0,A=u.rights[p.firstCol]-u.rights[p.lastCol])),h.push(y("div",{className:"fc-daygrid-event-harness"+(w?" fc-daygrid-event-harness-abs":""),key:iu(p),ref:f?null:this.segHarnessRefs.createRef(ru(p)),style:{visibility:v?"":"hidden",marginTop:w?"":m.marginTop,top:w?m.absoluteTop:"",left:E,right:A}},tu(p)?y(su,Object.assign({seg:p,isDragging:r,isSelected:g===c,defaultDisplayEventEnd:d},Ne(p,s))):y(nu,Object.assign({seg:p,isDragging:r,isResizing:o,isDateSelecting:a,isSelected:g===c,defaultDisplayEventEnd:d},Ne(p,s)))))}return h}renderFillSegs(e,n){let{isRtl:s}=this.context,{todayRange:i}=this.props,{framePositions:r}=this.state,o=[];if(r)for(let a of e){let l=s?{right:0,left:r.lefts[a.lastCol]-r.lefts[a.firstCol]}:{left:0,right:r.rights[a.firstCol]-r.rights[a.lastCol]};o.push(y("div",{key:mc(a.eventRange),className:"fc-daygrid-bg-harness",style:l},n==="bg-event"?y(xc,Object.assign({seg:a},Ne(a,i))):Pc(n)))}return y(q,{},...o)}updateSizing(e){let{props:n,state:s,frameElRefs:i}=this;if(!n.forPrint&&n.clientWidth!==null){if(e){let l=n.cells.map(c=>i.currentMap[c.key]);if(l.length){let c=this.rootElRef.current,u=new _t(c,l,!0,!1);(!s.framePositions||!s.framePositions.similarTo(u))&&this.setState({framePositions:new _t(c,l,!0,!1)})}}const r=this.state.segHeights,o=this.querySegHeights(),a=n.dayMaxEvents===!0||n.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},r),o),maxContentHeight:a?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,n={};for(let s in e){let i=Math.round(e[s].getBoundingClientRect().height);n[s]=Math.max(n[s]||0,i)}return n}computeMaxContentHeight(){let e=this.props.cells[0].key,n=this.cellElRefs.currentMap[e],s=this.fgElRefs.currentMap[e];return n.getBoundingClientRect().bottom-s.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(n=>e[n.key])}}ou.addStateEquality({segHeights:ye});function cS(t,e){if(!t.length)return[];let n=uS(e);return t.map(s=>({seg:s,isVisible:!0,isAbsolute:!0,absoluteTop:n[s.eventRange.instance.instanceId],marginTop:0}))}function uS(t){let e={};for(let n of t)for(let s of n)e[s.seg.eventRange.instance.instanceId]=s.absoluteTop;return e}class dS extends Re{constructor(){super(...arguments),this.splitBusinessHourSegs=I(Nn),this.splitBgEventSegs=I(fS),this.splitFgEventSegs=I(Nn),this.splitDateSelectionSegs=I(Nn),this.splitEventDrag=I(ta),this.splitEventResize=I(ta),this.rowRefs=new Ae}render(){let{props:e,context:n}=this,s=e.cells.length,i=this.splitBusinessHourSegs(e.businessHourSegs,s),r=this.splitBgEventSegs(e.bgEventSegs,s),o=this.splitFgEventSegs(e.fgEventSegs,s),a=this.splitDateSelectionSegs(e.dateSelectionSegs,s),l=this.splitEventDrag(e.eventDrag,s),c=this.splitEventResize(e.eventResize,s),u=s>=7&&e.clientWidth?e.clientWidth/n.options.aspectRatio/6:null;return y(Ht,{unit:"day"},(d,f)=>y(q,null,e.cells.map((h,m)=>y(ou,{ref:this.rowRefs.createRef(m),key:h.length?h[0].date.toISOString():m,showDayNumbers:s>1,showWeekNumbers:e.showWeekNumbers,todayRange:f,dateProfile:e.dateProfile,cells:h,renderIntro:e.renderRowIntro,businessHourSegs:i[m],eventSelection:e.eventSelection,bgEventSegs:r[m],fgEventSegs:o[m],dateSelectionSegs:a[m],eventDrag:l[m],eventResize:c[m],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:u,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 _t(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new _t(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,n){let{colPositions:s,rowPositions:i}=this,r=s.leftToIndex(e),o=i.topToIndex(n);if(o!=null&&r!=null){let a=this.props.cells[o][r];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(o,r),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(o,r),rect:{left:s.lefts[r],right:s.rights[r],top:i.tops[o],bottom:i.bottoms[o]},layer:0}}return null}getCellEl(e,n){return this.rowRefs.currentMap[e].getCellEls()[n]}getCellRange(e,n){let s=this.props.cells[e][n].date,i=Y(s,1);return{start:s,end:i}}}function fS(t,e){return Nn(t.filter(hS),e)}function hS(t){return t.eventRange.def.allDay}class pS extends Re{constructor(){super(...arguments),this.elRef=ue(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:n,dayMaxEvents:s,expandRows:i}=e,r=s===!0||n===!0;r&&!i&&(r=!1,n=null,s=null);let o=["fc-daygrid-body",r?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return y("div",{ref:this.elRef,className:o.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},y("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:i?e.clientHeight:""}},e.colGroupNode,y("tbody",{role:"presentation"},y(dS,{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:s,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=gS(this.elRef.current,this.props.dateProfile);if(e){const n=e.closest(".fc-daygrid-body"),s=n.closest(".fc-scroller"),i=e.getBoundingClientRect().top-n.getBoundingClientRect().top;s.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function gS(t,e){let n;return e.currentRangeUnit.match(/year|month/)&&(n=t.querySelector(`[data-date="${ky(e.currentDate)}-01"]`)),n||(n=t.querySelector(`[data-date="${sr(e.currentDate)}"]`)),n}class mS extends Rc{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}class yS extends Re{constructor(){super(...arguments),this.slicer=new mS,this.tableRef=ue()}render(){let{props:e,context:n}=this;return y(pS,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}))}}var vS=':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}';Yi(vS);class bS extends ub{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?Fv(e)?["timed","allDay"]:["allDay"]:["timed"]}}const wS=H({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function au(t){let e=["fc-timegrid-slot","fc-timegrid-slot-label",t.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return y(Te.Consumer,null,n=>{if(!t.isLabeled)return y("td",{className:e.join(" "),"data-time":t.isoTimeStr});let{dateEnv:s,options:i,viewApi:r}=n,o=i.slotLabelFormat==null?wS:Array.isArray(i.slotLabelFormat)?H(i.slotLabelFormat[0]):H(i.slotLabelFormat),a={level:0,time:t.time,date:s.toDate(t.date),view:r,text:s.format(t.date,o)};return y(ae,{elTag:"td",elClasses:e,elAttrs:{"data-time":t.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:SS,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},l=>y("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},y(l,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function SS(t){return t.text}class ES extends _{render(){return this.props.slatMetas.map(e=>y("tr",{key:e.key},y(au,Object.assign({},e))))}}const AS=H({week:"short"}),CS=5;class DS extends Re{constructor(){super(...arguments),this.allDaySplitter=new bS,this.headerElRef=ue(),this.rootElRef=ue(),this.scrollerElRef=ue(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let n=this.scrollerElRef.current;n&&(n.scrollTop=e)},this.renderHeadAxis=(e,n="")=>{let{options:s}=this.context,{dateProfile:i}=this.props,r=i.renderRange,a=Ft(r.start,r.end)===1?Yn(this.context,r.start,"week"):{};return s.weekNumbers&&e==="day"?y(zc,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:r.start,defaultFormat:AS},l=>y("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:n}},y(l,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:a}))):y("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},y("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},this.renderTableRowAxis=e=>{let{options:n,viewApi:s}=this.context,i={text:n.allDayText,view:s};return y(ae,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:n.allDayContent,defaultGenerator:kS,classNameGenerator:n.allDayClassNames,didMount:n.allDayDidMount,willUnmount:n.allDayWillUnmount},r=>y("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},y(r,{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,s){let{context:i,props:r}=this,o=[],a=Vo(i.options);return e&&o.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),n&&(o.push({type:"body",key:"all-day",chunk:{content:n}}),o.push({type:"body",key:"all-day-divider",outerContent:y("tr",{role:"presentation",className:"fc-scrollgrid-section"},y("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:!!i.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:s}}),y(xo,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},y(Nc,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[{width:"shrink"}],sections:o}))}renderHScrollLayout(e,n,s,i,r,o,a){let l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");let{context:c,props:u}=this,d=!u.forPrint&&Vo(c.options),f=!u.forPrint&&Kb(c.options),h=[];e&&h.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:p=>y("tr",{role:"presentation"},this.renderHeadAxis("day",p.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),n&&(h.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:p=>y("tr",{role:"presentation"},this.renderTableRowAxis(p.rowSyncHeights[0]))},{key:"cols",content:n}]}),h.push({key:"all-day-divider",type:"body",outerContent:y("tr",{role:"presentation",className:"fc-scrollgrid-section"},y("td",{colSpan:2,className:"fc-timegrid-divider "+c.theme.getClass("tableCellShaded")}))}));let m=c.options.nowIndicator;return h.push({type:"body",key:"body",liquid:!0,expandRows:!!c.options.expandRows,chunks:[{key:"axis",content:p=>y("div",{className:"fc-timegrid-axis-chunk"},y("table",{"aria-hidden":!0,style:{height:p.expandRows?p.clientHeight:""}},p.tableColGroupNode,y("tbody",null,y(ES,{slatMetas:o}))),y("div",{className:"fc-timegrid-now-indicator-container"},y(Ht,{unit:m?"minute":"day"},g=>{let v=m&&a&&a.safeComputeTop(g);return typeof v=="number"?y(Cr,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:v},isAxis:!0,date:g}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:s}]}),f&&h.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Uo},{key:"cols",content:Uo}]}),y(xo,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:c.viewSpec},y(l,{liquid:!u.isHeightAuto&&!u.forPrint,forPrint:u.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:r}]}],sections:h}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:n}=this.context.options;return(e===!0||n===!0)&&(e=void 0,n=CS),{dayMaxEvents:e,dayMaxEventRows:n}}}function kS(t){return t.text}class TS{constructor(e,n,s){this.positions=e,this.dateProfile=n,this.slotDuration=s}safeComputeTop(e){let{dateProfile:n}=this;if(De(n.currentRange,e)){let s=L(e),i=e.valueOf()-s.valueOf();if(i>=me(n.slotMinTime)&&i<me(n.slotMaxTime))return this.computeTimeTop(M(i))}return null}computeDateTop(e,n){return n||(n=L(e)),this.computeTimeTop(M(e.valueOf()-n.valueOf()))}computeTimeTop(e){let{positions:n,dateProfile:s}=this,i=n.els.length,r=(e.milliseconds-me(s.slotMinTime))/me(this.slotDuration),o,a;return r=Math.max(0,r),r=Math.min(i,r),o=Math.floor(r),o=Math.min(o,i-1),a=r-o,n.tops[o]+n.getHeight(o)*a}}class RS extends _{render(){let{props:e,context:n}=this,{options:s}=n,{slatElRefs:i}=e;return y("tbody",null,e.slatMetas.map((r,o)=>{let a={time:r.time,date:n.dateEnv.toDate(r.date),view:n.viewApi};return y("tr",{key:r.key,ref:i.createRef(r.key)},e.axis&&y(au,Object.assign({},r)),y(ae,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!r.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":r.isoTimeStr},renderProps:a,generatorName:"slotLaneContent",customGenerator:s.slotLaneContent,classNameGenerator:s.slotLaneClassNames,didMount:s.slotLaneDidMount,willUnmount:s.slotLaneWillUnmount}))}))}}class IS extends _{constructor(){super(...arguments),this.rootElRef=ue(),this.slatElRefs=new Ae}render(){let{props:e,context:n}=this;return y("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},y("table",{"aria-hidden":!0,className:n.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,y(RS,{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 TS(new _t(this.rootElRef.current,OS(this.slatElRefs.currentMap,n.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function OS(t,e){return e.map(n=>t[n.key])}function Vt(t,e){let n=[],s;for(s=0;s<e;s+=1)n.push([]);if(t)for(s=0;s<t.length;s+=1)n[t[s].col].push(t[s]);return n}function na(t,e){let n=[];if(t){for(let s=0;s<e;s+=1)n[s]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let s of t.segs)n[s.col].segs.push(s)}else for(let s=0;s<e;s+=1)n[s]=null;return n}class MS extends _{render(){let{props:e}=this;return y(Lc,{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:()=>cu(e.hiddenSegs,e),defaultGenerator:_S,forceTimed:!0},n=>y(n,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function _S(t){return t.shortText}function NS(t,e,n){let s=new Dc;e!=null&&(s.strictOrder=e),n!=null&&(s.maxStackCnt=n);let i=s.addSegs(t),r=Ab(i),o=xS(s);return o=jS(o,1),{segRects:BS(o),hiddenGroups:r}}function xS(t){const{entriesByLevel:e}=t,n=Rr((s,i)=>s+":"+i,(s,i)=>{let r=LS(t,s,i),o=sa(r,n),a=e[s][i];return[Object.assign(Object.assign({},a),{nextLevelNodes:o[0]}),a.thickness+o[1]]});return sa(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n)[0]}function sa(t,e){if(!t)return[[],0];let{level:n,lateralStart:s,lateralEnd:i}=t,r=s,o=[];for(;r<i;)o.push(e(n,r)),r+=1;return o.sort(PS),[o.map(zS),o[0][1]]}function PS(t,e){return e[1]-t[1]}function zS(t){return t[0]}function LS(t,e,n){let{levelCoords:s,entriesByLevel:i}=t,r=i[e][n],o=s[e]+r.thickness,a=s.length,l=e;for(;l<a&&s[l]<o;l+=1);for(;l<a;l+=1){let c=i[l],u,d=wi(c,r.span.start,bi),f=d[0]+d[1],h=f;for(;(u=c[h])&&u.span.start<r.span.end;)h+=1;if(f<h)return{level:l,lateralStart:f,lateralEnd:h}}return null}function jS(t,e){const n=Rr((s,i,r)=>Xe(s),(s,i,r)=>{let{nextLevelNodes:o,thickness:a}=s,l=a+r,c=a/l,u,d=[];if(!o.length)u=e;else for(let h of o)if(u===void 0){let m=n(h,i,l);u=m[0],d.push(m[1])}else{let m=n(h,u,0);d.push(m[1])}let f=(u-i)*c;return[u-f,Object.assign(Object.assign({},s),{thickness:f,nextLevelNodes:d})]});return t.map(s=>n(s,0,0)[1])}function BS(t){let e=[];const n=Rr((i,r,o)=>Xe(i),(i,r,o)=>{let a=Object.assign(Object.assign({},i),{levelCoord:r,stackDepth:o,stackForward:0});return e.push(a),a.stackForward=s(i.nextLevelNodes,r+i.thickness,o+1)+1});function s(i,r,o){let a=0;for(let l of i)a=Math.max(n(l,r,o),a);return a}return s(t,0,0),e}function Rr(t,e){const n={};return(...s)=>{let i=t(...s);return i in n?n[i]:n[i]=e(...s)}}function ia(t,e,n=null,s=0){let i=[];if(n)for(let r=0;r<t.length;r+=1){let o=t[r],a=n.computeDateTop(o.start,e),l=Math.max(a+(s||0),n.computeDateTop(o.end,e));i.push({start:Math.round(a),end:Math.round(l)})}return i}function FS(t,e,n,s){let i=[],r=[];for(let c=0;c<t.length;c+=1){let u=e[c];u?i.push({index:c,thickness:1,span:u}):r.push(t[c])}let{segRects:o,hiddenGroups:a}=NS(i,n,s),l=[];for(let c of o)l.push({seg:t[c.index],rect:c});for(let c of r)l.push({seg:c,rect:null});return{segPlacements:l,hiddenGroups:a}}const $S=H({hour:"numeric",minute:"2-digit",meridiem:!1});class lu extends _{render(){return y(Ar,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:$S}))}}class HS extends _{constructor(){super(...arguments),this.sortEventSegs=I(pc)}render(){let{props:e,context:n}=this,{options:s}=n,i=s.selectMirror,r=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],o=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},a=this.sortEventSegs(e.fgEventSegs,s.eventOrder);return y(Dr,{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},l=>y("div",{className:"fc-timegrid-col-frame"},y("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),y("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(a,o,!1,!1,!1)),y("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(r,{},!!e.eventDrag,!!e.eventResize,!!i,"mirror")),y("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),kr(s)&&y(l,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,n,s,i,r,o){let{props:a}=this;return a.forPrint?cu(e,a):this.renderPositionedFgSegs(e,n,s,i,r,o)}renderPositionedFgSegs(e,n,s,i,r,o){let{eventMaxStack:a,eventShortHeight:l,eventOrderStrict:c,eventMinHeight:u}=this.context.options,{date:d,slatCoords:f,eventSelection:h,todayRange:m,nowDate:p}=this.props,g=s||i||r,v=ia(e,d,f,u),{segPlacements:w,hiddenGroups:E}=FS(e,v,c,a);return y(q,null,this.renderHiddenGroups(E,e),w.map(A=>{let{seg:D,rect:k}=A,T=D.eventRange.instance.instanceId,C=g||!!(!n[T]&&k),N=Gs(k&&k.span),Q=!g&&k?this.computeSegHStyle(k):{left:0,right:0},pe=!!k&&k.stackForward>0,z=!!k&&k.span.end-k.span.start<l;return y("div",{className:"fc-timegrid-event-harness"+(pe?" fc-timegrid-event-harness-inset":""),key:o||T,style:Object.assign(Object.assign({visibility:C?"":"hidden"},N),Q)},y(lu,Object.assign({seg:D,isDragging:s,isResizing:i,isDateSelecting:r,isSelected:T===h,isShort:z},Ne(D,m,p))))}))}renderHiddenGroups(e,n){let{extraDateSpan:s,dateProfile:i,todayRange:r,nowDate:o,eventSelection:a,eventDrag:l,eventResize:c}=this.props;return y(q,null,e.map(u=>{let d=Gs(u.span),f=US(u.entries,n);return y(MS,{key:Gl(jc(f)),hiddenSegs:f,top:d.top,bottom:d.bottom,extraDateSpan:s,dateProfile:i,todayRange:r,nowDate:o,eventSelection:a,eventDrag:l,eventResize:c})}))}renderFillSegs(e,n){let{props:s,context:i}=this,o=ia(e,s.date,s.slatCoords,i.options.eventMinHeight).map((a,l)=>{let c=e[l];return y("div",{key:mc(c.eventRange),className:"fc-timegrid-bg-harness",style:Gs(a)},n==="bg-event"?y(xc,Object.assign({seg:c},Ne(c,s.todayRange,s.nowDate))):Pc(n))});return y(q,null,o)}renderNowIndicator(e){let{slatCoords:n,date:s}=this.props;return n?e.map((i,r)=>y(Cr,{key:r,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:n.computeDateTop(i.start,s)},isAxis:!1,date:s})):null}computeSegHStyle(e){let{isRtl:n,options:s}=this.context,i=s.slotEventOverlap,r=e.levelCoord,o=e.levelCoord+e.thickness,a,l;i&&(o=Math.min(1,r+(o-r)*2)),n?(a=1-o,l=r):(a=r,l=1-o);let c={zIndex:e.stackDepth+1,left:a*100+"%",right:l*100+"%"};return i&&!e.stackForward&&(c[n?"marginLeft":"marginRight"]=20),c}}function cu(t,{todayRange:e,nowDate:n,eventSelection:s,eventDrag:i,eventResize:r}){let o=(i?i.affectedInstances:null)||(r?r.affectedInstances:null)||{};return y(q,null,t.map(a=>{let l=a.eventRange.instance.instanceId;return y("div",{key:l,style:{visibility:o[l]?"hidden":""}},y(lu,Object.assign({seg:a,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:l===s,isShort:!1},Ne(a,e,n))))}))}function Gs(t){return t?{top:t.start,bottom:-t.end}:{top:"",bottom:""}}function US(t,e){return t.map(n=>e[n.index])}class VS extends _{constructor(){super(...arguments),this.splitFgEventSegs=I(Vt),this.splitBgEventSegs=I(Vt),this.splitBusinessHourSegs=I(Vt),this.splitNowIndicatorSegs=I(Vt),this.splitDateSelectionSegs=I(Vt),this.splitEventDrag=I(na),this.splitEventResize=I(na),this.rootElRef=ue(),this.cellElRefs=new Ae}render(){let{props:e,context:n}=this,s=n.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),i=e.cells.length,r=this.splitFgEventSegs(e.fgEventSegs,i),o=this.splitBgEventSegs(e.bgEventSegs,i),a=this.splitBusinessHourSegs(e.businessHourSegs,i),l=this.splitNowIndicatorSegs(e.nowIndicatorSegs,i),c=this.splitDateSelectionSegs(e.dateSelectionSegs,i),u=this.splitEventDrag(e.eventDrag,i),d=this.splitEventResize(e.eventResize,i);return y("div",{className:"fc-timegrid-cols",ref:this.rootElRef},y("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,y("tbody",{role:"presentation"},y("tr",{role:"row"},e.axis&&y("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},y("div",{className:"fc-timegrid-col-frame"},y("div",{className:"fc-timegrid-now-indicator-container"},typeof s=="number"&&y(Cr,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:s},isAxis:!0,date:e.nowDate})))),e.cells.map((f,h)=>y(HS,{key:f.key,elRef:this.cellElRefs.createRef(f.key),dateProfile:e.dateProfile,date:f.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:f.extraRenderProps,extraDataAttrs:f.extraDataAttrs,extraClassNames:f.extraClassNames,extraDateSpan:f.extraDateSpan,fgEventSegs:r[h],bgEventSegs:o[h],businessHourSegs:a[h],nowIndicatorSegs:l[h],dateSelectionSegs:c[h],eventDrag:u[h],eventResize:d[h],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 _t(this.rootElRef.current,ZS(this.cellElRefs.currentMap,e.cells),!0,!1))}}function ZS(t,e){return e.map(n=>t[n.key])}class WS extends Re{constructor(){super(...arguments),this.processSlotOptions=I(qS),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:s}=this.state;if(n&&s){if(e.time){let i=s.computeTimeTop(e.time);i=Math.ceil(i),i&&(i+=1),n(i)}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 y("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},y(IS,{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}),y(VS,{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:s,options:i}=this.context,{colCoords:r}=this,{dateProfile:o}=this.props,{slatCoords:a}=this.state,{snapDuration:l,snapsPerSlot:c}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),u=r.leftToIndex(e),d=a.positions.topToIndex(n);if(u!=null&&d!=null){let f=this.props.cells[u],h=a.positions.tops[d],m=a.positions.getHeight(d),p=(n-h)/m,g=Math.floor(p*c),v=d*c+g,w=this.props.cells[u].date,E=hi(o.slotMinTime,fy(l,v)),A=s.add(w,E),D=s.add(A,l);return{dateProfile:o,dateSpan:Object.assign({range:{start:A,end:D},allDay:!1},f.extraDateSpan),dayEl:r.els[u],rect:{left:r.lefts[u],right:r.rights[u],top:h,bottom:h+m},layer:0}}return null}}function qS(t,e){let n=e||t,s=nr(t,n);return s===null&&(n=t,s=1),{snapDuration:n,snapsPerSlot:s}}class GS extends Rc{sliceRange(e,n){let s=[];for(let i=0;i<n.length;i+=1){let r=st(e,n[i]);r&&s.push({start:r.start,end:r.end,isStart:r.start.valueOf()===e.start.valueOf(),isEnd:r.end.valueOf()===e.end.valueOf(),col:i})}return s}}class QS extends Re{constructor(){super(...arguments),this.buildDayRanges=I(KS),this.slicer=new GS,this.timeColsRef=ue()}render(){let{props:e,context:n}=this,{dateProfile:s,dayTableModel:i}=e,{nowIndicator:r,nextDayThreshold:o}=n.options,a=this.buildDayRanges(i,s,n.dateEnv);return y(Ht,{unit:r?"minute":"day"},(l,c)=>y(WS,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,s,null,n,a),{forPrint:e.forPrint,axis:e.axis,dateProfile:s,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:i.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:l,nowIndicatorSegs:r&&this.slicer.sliceNowDate(l,s,o,n,a),todayRange:c,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function KS(t,e,n){let s=[];for(let i of t.headerDates)s.push({start:n.add(i,e.slotMinTime),end:n.add(i,e.slotMaxTime)});return s}const ra=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function YS(t,e,n,s,i){let r=new Date(0),o=t,a=M(0),l=n||JS(s),c=[];for(;me(o)<me(e);){let u=i.add(r,o),d=nr(a,l)!==null;c.push({date:u,time:o,key:u.toISOString(),isoTimeStr:Ty(u),isLabeled:d}),o=hi(o,s),a=hi(a,s)}return c}function JS(t){let e,n,s;for(e=ra.length-1;e>=0;e-=1)if(n=M(ra[e]),s=nr(n,t),s!==null&&s>1)return n;return t}class XS extends DS{constructor(){super(...arguments),this.buildTimeColsModel=I(eE),this.buildSlatMetas=I(YS)}render(){let{options:e,dateEnv:n,dateProfileGenerator:s}=this.context,{props:i}=this,{dateProfile:r}=i,o=this.buildTimeColsModel(r,s),a=this.allDaySplitter.splitProps(i),l=this.buildSlatMetas(r.slotMinTime,r.slotMaxTime,e.slotLabelInterval,e.slotDuration,n),{dayMinWidth:c}=e,u=!c,d=c,f=e.dayHeaders&&y(Ob,{dates:o.headerDates,dateProfile:r,datesRepDistinctDays:!0,renderIntro:u?this.renderHeadAxis:null}),h=e.allDaySlot!==!1&&(p=>y(yS,Object.assign({},a.allDay,{dateProfile:r,dayTableModel:o,nextDayThreshold:e.nextDayThreshold,tableMinWidth:p.tableMinWidth,colGroupNode:p.tableColGroupNode,renderRowIntro:u?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:p.clientWidth,clientHeight:p.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),m=p=>y(QS,Object.assign({},a.timed,{dayTableModel:o,dateProfile:r,axis:u,slotDuration:e.slotDuration,slatMetas:l,forPrint:i.forPrint,tableColGroupNode:p.tableColGroupNode,tableMinWidth:p.tableMinWidth,clientWidth:p.clientWidth,clientHeight:p.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:p.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return d?this.renderHScrollLayout(f,h,m,o.colCnt,c,l,this.state.slatCoords):this.renderSimpleLayout(f,h,m)}}function eE(t,e){let n=new _b(t.renderRange,e);return new Nb(n,!1)}var tE='.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}';Yi(tE);const nE={allDaySlot:Boolean};var BA=He({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:nE,views:{timeGrid:{component:XS,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});export{XE as $,vA as A,mA as B,IE as C,gA as D,pA as E,hA as F,fA as G,dA as H,uA as I,aA as J,oA as K,lA as L,rE as M,rA as N,iA as O,cA as P,_u as Q,yA as R,RA as S,NA as T,xA as U,eA as V,PA as W,zA as X,sA as Y,nA as Z,tA as _,K as a,YE as a0,JE as a1,KE as a2,QE as a3,GE as a4,qE as a5,WE as a6,UE as a7,HE as a8,VE as a9,gE as aA,pE as aB,LA as aC,Kw as aD,BA as aE,jA as aF,aE as aG,ZE as aa,$E as ab,BE as ac,jE as ad,LE as ae,FE as af,mE as ag,NE as ah,PE as ai,zE as aj,xE as ak,ME as al,_E as am,OE as an,TE as ao,kE as ap,DE as aq,CE as ar,wE as as,SE as at,EE as au,AE as av,bE as aw,vE as ax,RE as ay,yE as az,oE as b,lE as c,dE as d,uE as e,cE as f,eg as g,_g as h,Tt as i,_A as j,MA as k,kA as l,AA as m,le as n,fE as o,TA as p,OA as q,hE as r,iE as s,IA as t,DA as u,CA as v,SA as w,EA as x,wA as y,bA as z};
|
|
180
|
+
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=bn(e),s=ft(n);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=bn(e),s=ft(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Ll(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Pl||null,prettyErrors:e}}function jm(t,e={}){const{lineCounter:n,prettyErrors:s}=Ll(e),i=new Ki(n?.addNewLine),r=new Qi(e),o=Array.from(r.compose(i.parse(t)));if(s&&n)for(const a of o)a.errors.forEach(Hn(t,n)),a.warnings.forEach(Hn(t,n));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function jl(t,e={}){const{lineCounter:n,prettyErrors:s}=Ll(e),i=new Ki(n?.addNewLine),r=new Qi(e);let o=null;for(const a of r.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Ke(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&n&&(o.errors.forEach(Hn(t,n)),o.warnings.forEach(Hn(t,n))),o}function Bm(t,e,n){let s;typeof e=="function"?s=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=jl(t,n);if(!i)return null;if(i.warnings.forEach(r=>il(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},n))}function Fm(t,e,n){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return at(t)&&!s?t.toString(n):new Bt(t,s,n).toString(n)}const XE=Object.freeze(Object.defineProperty({__proto__:null,Alias:rs,CST:Pm,Composer:Qi,Document:Bt,Lexer:xl,LineCounter:Pl,Pair:X,Parser:Ki,Scalar:I,Schema:ps,YAMLError:qi,YAMLMap:ie,YAMLParseError:Ke,YAMLSeq:ze,YAMLWarning:Al,isAlias:He,isCollection:H,isDocument:at,isMap:Pt,isNode:U,isPair:B,isScalar:P,isSeq:zt,parse:Bm,parseAllDocuments:jm,parseDocument:jl,stringify:Fm,visit:lt,visitAsync:is},Symbol.toStringTag,{value:"Module"})),Bl=[],fi=new Map;function Yi(t){Bl.push(t),fi.forEach(e=>{Hl(e,t)})}function Hm(t){t.isConnected&&t.getRootNode&&Fl(t.getRootNode())}function Fl(t){let e=fi.get(t);if(!e||!e.isConnected){if(e=t.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");const n=Um();n&&(e.nonce=n);const s=t===document?document.head:t,i=t===document?s.querySelector("script,link[rel=stylesheet],link[as=style],style"):s.firstChild;s.insertBefore(e,i)}fi.set(t,e),$m(e)}}function $m(t){for(const e of Bl)Hl(t,e)}function Hl(t,e){const{sheet:n}=t,s=n.cssRules.length;e.split("}").forEach((i,r)=>{i=i.trim(),i&&n.insertRule(i+"}",s+r)})}let Ps;function Um(){return Ps===void 0&&(Ps=Vm()),Ps}function Vm(){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"&&Fl(document);var Zm=':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)}';Yi(Zm);class Ji{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:s}=this;e in s&&(n?delete s[e]:(s[e]-=1,s[e]<=0&&delete s[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 Xi(t){t.parentNode&&t.parentNode.removeChild(t)}function J(t,e){if(t.closest)return t.closest(e);if(!document.documentElement.contains(t))return null;do{if(Wm(t,e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}function Wm(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector).call(t,e)}function qm(t,e){let n=t instanceof HTMLElement?[t]:t,s=[];for(let i=0;i<n.length;i+=1){let r=n[i].querySelectorAll(e);for(let o=0;o<r.length;o+=1)s.push(r[o])}return s}const Gm=/(top|left|right|bottom|width|height)$/i;function Gt(t,e){for(let n in e)$l(t,n,e[n])}function $l(t,e,n){n==null?t.style[e]="":typeof n=="number"&&Gm.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function Ul(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 Eo=0;function vs(){return Eo+=1,"fc-dom-"+Eo}function bs(t){t.preventDefault()}function Qm(t,e){return n=>{let s=J(n.target,t);s&&e.call(s,n,s)}}function Vl(t,e,n,s){let i=Qm(n,s);return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}}function Km(t,e,n,s){let i;return Vl(t,"mouseover",e,(r,o)=>{if(o!==i){i=o,n(r,o);let a=l=>{i=null,s(l,o),o.removeEventListener("mouseleave",a)};o.addEventListener("mouseleave",a)}})}const Ao=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Ym(t,e){let n=s=>{e(s),Ao.forEach(i=>{t.removeEventListener(i,n)})};Ao.forEach(s=>{t.addEventListener(s,n)})}function Zl(t){return Object.assign({onClick:t},Wl(t))}function Wl(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let Co=0;function ct(){return Co+=1,String(Co)}function er(){document.body.classList.add("fc-not-allowed")}function tr(){document.body.classList.remove("fc-not-allowed")}function Jm(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",bs)}function Xm(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",bs)}function ey(t){t.addEventListener("contextmenu",bs)}function ty(t){t.removeEventListener("contextmenu",bs)}function ny(t){let e=[],n=[],s,i;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),s=0;s<n.length;s+=1)i=n[s],typeof i=="string"?e.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&e.push({func:i});return e}function sy(t,e,n){let s,i;for(s=0;s<n.length;s+=1)if(i=iy(t,e,n[s]),i)return i;return 0}function iy(t,e,n){return n.func?n.func(t,e):ry(t[n.field],e[n.field])*(n.order||1)}function ry(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 Ct(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}function Qt(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((s,i,r)=>s.replace("$"+r,i||""),t):n}function oy(t,e){return t-e}function In(t){return t%1===0}function ay(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 Do=["years","months","days","milliseconds"],ly=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function O(t,e){return typeof t=="string"?cy(t):typeof t=="object"&&t?ko(t):typeof t=="number"?ko({[e||"milliseconds"]:t}):null}function cy(t){let e=ly.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 ko(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 uy(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function hi(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function dy(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function fy(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function hy(t){return Dt(t)/365}function py(t){return Dt(t)/30}function Dt(t){return me(t)/864e5}function me(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function nr(t,e){let n=null;for(let s=0;s<Do.length;s+=1){let i=Do[s];if(e[i]){let r=t[i]/e[i];if(!In(r)||n!==null&&n!==r)return null;n=r}else if(t[i])return null}return n}function pi(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 Le(t,e,n){if(t===e)return!0;let s=t.length,i;if(s!==e.length)return!1;for(i=0;i<s;i+=1)if(!(n?n(t[i],e[i]):t[i]===e[i]))return!1;return!0}const gy=["sun","mon","tue","wed","thu","fri","sat"];function Y(t,e){let n=Ye(t);return n[2]+=e,re(n)}function je(t,e){let n=Ye(t);return n[6]+=e,re(n)}function Ft(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function my(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function yy(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function vy(t,e){return(e.valueOf()-t.valueOf())/1e3}function by(t,e){let n=L(t),s=L(e);return{years:0,months:0,days:Math.round(Ft(n,s)),milliseconds:e.valueOf()-s.valueOf()-(t.valueOf()-n.valueOf())}}function wy(t,e){let n=Un(t,e);return n!==null&&n%7===0?n/7:null}function Un(t,e){return Ie(t)===Ie(e)?Math.round(Ft(t,e)):null}function L(t){return re([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function Sy(t){return re([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function Ey(t){return re([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function Ay(t){return re([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function Cy(t,e,n){let s=t.getUTCFullYear(),i=zs(t,s,e,n);if(i<1)return zs(t,s-1,e,n);let r=zs(t,s+1,e,n);return r>=1?Math.min(i,r):i}function zs(t,e,n,s){let i=re([e,0,1+Dy(e,n,s)]),r=L(t),o=Math.round(Ft(i,r));return Math.floor(o/7)+1}function Dy(t,e,n){let s=7+e-n;return-((7+re([t,0,s]).getUTCDay()-e)%7)+s-1}function Ro(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function To(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 Ye(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function re(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function ql(t){return!isNaN(t.valueOf())}function Ie(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}function Gl(t,e,n=!1){let s=t.toISOString();return s=s.replace(".000",""),n&&(s=s.replace("T00:00:00Z","")),s.length>10&&(e==null?s=s.replace("Z",""):e!==0&&(s=s.replace("Z",ir(e,!0)))),s}function sr(t){return t.toISOString().replace(/T.*$/,"")}function ky(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function Ry(t){return Ct(t.getUTCHours(),2)+":"+Ct(t.getUTCMinutes(),2)+":"+Ct(t.getUTCSeconds(),2)}function ir(t,e=!1){let n=t<0?"-":"+",s=Math.abs(t),i=Math.floor(s/60),r=Math.round(s%60);return e?`${n+Ct(i,2)}:${Ct(r,2)}`:`GMT${n}${i}${r?`:${Ct(r,2)}`:""}`}function M(t,e,n){let s,i;return function(...r){if(!s)i=t.apply(this,r);else if(!Le(s,r)){let o=t.apply(this,r);(!e||!e(o,i))&&(i=o)}return s=r,i}}function On(t,e,n){let s,i;return r=>(s?ye(s,r)||(i=t.call(this,r)):i=t.call(this,r),s=r,i)}const Ls={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},Vn={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},wn=/\s*([ap])\.?m\.?/i,Ty=/,/g,My=/\s+/g,Iy=/\u200e/g,Oy=/UTC|GMT/;class _y{constructor(e){let n={},s={},i=9;for(let r in e)r in Ls?(s[r]=e[r],Ls[r]<9&&(i=Math.min(Ls[r],i))):(n[r]=e[r],r in Vn&&(i=Math.min(Vn[r],i)));this.standardDateProps=n,this.extendedSettings=s,this.smallestUnitNum=i,this.buildFormattingFunc=M(Mo)}format(e,n){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,n)(e)}formatRange(e,n,s,i){let{standardDateProps:r,extendedSettings:o}=this,a=jy(e.marker,n.marker,s.calendarSystem);if(!a)return this.format(e,s);let l=a;l>1&&(r.year==="numeric"||r.year==="2-digit")&&(r.month==="numeric"||r.month==="2-digit")&&(r.day==="numeric"||r.day==="2-digit")&&(l=1);let c=this.format(e,s),u=this.format(n,s);if(c===u)return c;let d=By(r,l),f=Mo(d,o,s),h=f(e),m=f(n),p=Fy(c,h,u,m),g=o.separator||i||s.defaultSeparator||"";return p?p.before+h+g+m+p.after:c+g+u}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 Mo(t,e,n){let s=Object.keys(t).length;return s===1&&t.timeZoneName==="short"?i=>ir(i.timeZoneOffset):s===0&&e.week?i=>Ly(n.computeWeekNumber(i.marker),n.weekText,n.weekTextLong,n.locale,e.week):Ny(t,e,n)}function Ny(t,e,n){t=Object.assign({},t),e=Object.assign({},e),xy(t,e),t.timeZone="UTC";let s=new Intl.DateTimeFormat(n.locale.codes,t),i;if(e.omitZeroMinute){let r=Object.assign({},t);delete r.minute,i=new Intl.DateTimeFormat(n.locale.codes,r)}return r=>{let{marker:o}=r,a;i&&!o.getUTCMinutes()?a=i:a=s;let l=a.format(o);return Py(l,r,t,e,n)}}function xy(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 Py(t,e,n,s,i){return t=t.replace(Iy,""),n.timeZoneName==="short"&&(t=zy(t,i.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":ir(e.timeZoneOffset))),s.omitCommas&&(t=t.replace(Ty,"").trim()),s.omitZeroMinute&&(t=t.replace(":00","")),s.meridiem===!1?t=t.replace(wn,"").trim():s.meridiem==="narrow"?t=t.replace(wn,(r,o)=>o.toLocaleLowerCase()):s.meridiem==="short"?t=t.replace(wn,(r,o)=>`${o.toLocaleLowerCase()}m`):s.meridiem==="lowercase"&&(t=t.replace(wn,r=>r.toLocaleLowerCase())),t=t.replace(My," "),t=t.trim(),t}function zy(t,e){let n=!1;return t=t.replace(Oy,()=>(n=!0,e)),n||(t+=` ${e}`),t}function Ly(t,e,n,s,i){let r=[];return i==="long"?r.push(n):(i==="short"||i==="narrow")&&r.push(e),(i==="long"||i==="short")&&r.push(" "),r.push(s.simpleNumberFormat.format(t)),s.options.direction==="rtl"&&r.reverse(),r.join("")}function jy(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:Ie(t)!==Ie(e)?1:0}function By(t,e){let n={};for(let s in t)(!(s in Vn)||Vn[s]<=e)&&(n[s]=t[s]);return n}function Fy(t,e,n,s){let i=0;for(;i<t.length;){let r=t.indexOf(e,i);if(r===-1)break;let o=t.substr(0,r);i=r+e.length;let a=t.substr(i),l=0;for(;l<n.length;){let c=n.indexOf(s,l);if(c===-1)break;let u=n.substr(0,c);l=c+s.length;let d=n.substr(l);if(o===u&&a===d)return{before:o,after:a}}}return null}function Io(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 Zn(t,e,n,s){let i=Io(t,n.calendarSystem),r=e?Io(e,n.calendarSystem):null;return{date:i,start:i,end:r,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:s||n.defaultSeparator}}class Hy{constructor(e){this.cmdStr=e}format(e,n,s){return n.cmdFormatter(this.cmdStr,Zn(e,null,n,s))}formatRange(e,n,s,i){return s.cmdFormatter(this.cmdStr,Zn(e,n,s,i))}}class $y{constructor(e){this.func=e}format(e,n,s){return this.func(Zn(e,null,n,s))}formatRange(e,n,s,i){return this.func(Zn(e,n,s,i))}}function $(t){return typeof t=="object"&&t?new _y(t):typeof t=="string"?new Hy(t):typeof t=="function"?new $y(t):null}const Oo={navLinkDayClick:b,navLinkWeekClick:b,duration:O,bootstrapFontAwesome:b,buttonIcons:b,customButtons:b,defaultAllDayEventDuration:O,defaultTimedEventDuration:O,nextDayThreshold:O,scrollTime:O,scrollTimeReset:Boolean,slotMinTime:O,slotMaxTime:O,dayPopoverFormat:$,slotDuration:O,snapDuration:O,headerToolbar:b,footerToolbar:b,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:$,dayHeaderClassNames:b,dayHeaderContent:b,dayHeaderDidMount:b,dayHeaderWillUnmount:b,dayCellClassNames:b,dayCellContent:b,dayCellDidMount:b,dayCellWillUnmount:b,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:b,weekNumbers:Boolean,weekNumberClassNames:b,weekNumberContent:b,weekNumberDidMount:b,weekNumberWillUnmount:b,editable:Boolean,viewClassNames:b,viewDidMount:b,viewWillUnmount:b,nowIndicator:Boolean,nowIndicatorSnap:b,nowIndicatorClassNames:b,nowIndicatorContent:b,nowIndicatorDidMount:b,nowIndicatorWillUnmount:b,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:b,locale:b,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:b,eventOrder:ny,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:b,contentHeight:b,direction:String,weekNumberFormat:$,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:b,initialDate:b,now:b,eventDataTransform:b,stickyHeaderDates:b,stickyFooterScrollbar:b,viewHeight:b,defaultAllDay:Boolean,eventSourceFailure:b,eventSourceSuccess:b,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:b,eventConstraint:b,eventAllow:b,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:b,eventContent:b,eventDidMount:b,eventWillUnmount:b,selectConstraint:b,selectOverlap:b,selectAllow:b,droppable:Boolean,unselectCancel:String,slotLabelFormat:b,slotLaneClassNames:b,slotLaneContent:b,slotLaneDidMount:b,slotLaneWillUnmount:b,slotLabelClassNames:b,slotLabelContent:b,slotLabelDidMount:b,slotLabelWillUnmount:b,dayMaxEvents:b,dayMaxEventRows:b,dayMinWidth:Number,slotLabelInterval:O,allDayText:String,allDayClassNames:b,allDayContent:b,allDayDidMount:b,allDayWillUnmount:b,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:$,rerenderDelay:Number,moreLinkText:b,moreLinkHint:b,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:b,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:O,hiddenDays:b,fixedWeekCount:Boolean,validRange:b,visibleRange:b,titleFormat:b,eventInteractive:Boolean,noEventsText:String,viewHint:b,navLinkHint:b,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:b,moreLinkClassNames:b,moreLinkContent:b,moreLinkDidMount:b,moreLinkWillUnmount:b,monthStartFormat:$,handleCustomRendering:b,customRenderingMetaMap:b,customRenderingReplaces:Boolean},Kt={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"},nowIndicatorSnap:"auto"},_o={datesSet:b,eventsSet:b,eventAdd:b,eventChange:b,eventRemove:b,windowResize:b,eventClick:b,eventMouseEnter:b,eventMouseLeave:b,select:b,unselect:b,loading:b,_unmount:b,_beforeprint:b,_afterprint:b,_noEventDrop:b,_noEventResize:b,_resize:b,_scrollRequest:b},No={buttonText:b,buttonHints:b,views:b,plugins:b,initialEvents:b,events:b,eventSources:b},Ze={headerToolbar:We,footerToolbar:We,buttonText:We,buttonHints:We,buttonIcons:We,dateIncrement:We,plugins:Sn,events:Sn,eventSources:Sn,resources:Sn};function We(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?ye(t,e):t===e}function Sn(t,e){return Array.isArray(t)&&Array.isArray(e)?Le(t,e):t===e}const Uy={type:String,component:b,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:b,usesMinMaxTime:Boolean,classNames:b,content:b,didMount:b,willUnmount:b};function js(t){return or(t,Ze)}function rr(t,e){let n={},s={};for(let i in e)i in t&&(n[i]=e[i](t[i]));for(let i in t)i in e||(s[i]=t[i]);return{refined:n,extra:s}}function b(t){return t}const{hasOwnProperty:Wn}=Object.prototype;function or(t,e){let n={};if(e){for(let s in e)if(e[s]===We){let i=[];for(let r=t.length-1;r>=0;r-=1){let o=t[r][s];if(typeof o=="object"&&o)i.unshift(o);else if(o!==void 0){n[s]=o;break}}i.length&&(n[s]=or(i))}}for(let s=t.length-1;s>=0;s-=1){let i=t[s];for(let r in i)r in n||(n[r]=i[r])}return n}function nt(t,e){let n={};for(let s in t)e(t[s],s)&&(n[s]=t[s]);return n}function ke(t,e){let n={};for(let s in t)n[s]=e(t[s],s);return n}function Ql(t){let e={};for(let n of t)e[n]=!0;return e}function ar(t){let e=[];for(let n in t)e.push(t[n]);return e}function ye(t,e){if(t===e)return!0;for(let n in t)if(Wn.call(t,n)&&!(n in e))return!1;for(let n in e)if(Wn.call(e,n)&&t[n]!==e[n])return!1;return!0}const Vy=/^on[A-Z]/;function Zy(t,e){const n=Wy(t,e);for(let s of n)if(!Vy.test(s))return!1;return!0}function Wy(t,e){let n=[];for(let s in t)Wn.call(t,s)&&(s in e||n.push(s));for(let s in e)Wn.call(e,s)&&t[s]!==e[s]&&n.push(s);return n}function Bs(t,e,n={}){if(t===e)return!0;for(let s in e)if(!(s in t&&qy(t[s],e[s],n[s])))return!1;for(let s in t)if(!(s in e))return!1;return!0}function qy(t,e,n){return t===e||n===!0?!0:n?n(t,e):!1}function Gy(t,e=0,n,s=1){let i=[];n==null&&(n=Object.keys(t).length);for(let r=e;r<n;r+=s){let o=t[r];o!==void 0&&i.push(o)}return i}let Kl={};function Qy(t,e){Kl[t]=e}function Ky(t){return new Kl[t]}class Yy{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return re(e)}markerToArray(e){return Ye(e)}}Qy("gregory",Yy);const Jy=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Xy(t){let e=Jy.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(ql(n)){let s=null;return e[13]&&(s=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:s}}}return null}class ev{constructor(e){let n=this.timeZone=e.timeZone,s=n!=="local"&&n!=="UTC";e.namedTimeZoneImpl&&s&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(n)),this.canComputeOffset=!!(!s||this.namedTimeZoneImpl),this.calendarSystem=Ky(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()):re(Ro(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=re(e)),n===null||!ql(n)?null:{marker:n,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let n=Xy(e);if(n===null)return null;let{marker:s}=n,i=null;return n.timeZoneOffset!==null&&(this.canComputeOffset?s=this.timestampToMarker(s.valueOf()-n.timeZoneOffset*60*1e3):i=n.timeZoneOffset),{marker:s,isTimeUnspecified:n.isTimeUnspecified,forcedTzo:i}}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 s=this.calendarSystem.markerToArray(e);return s[0]+=n.years,s[1]+=n.months,s[2]+=n.days,s[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(s)}subtract(e,n){let s=this.calendarSystem.markerToArray(e);return s[0]-=n.years,s[1]-=n.months,s[2]-=n.days,s[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(s)}addYears(e,n){let s=this.calendarSystem.markerToArray(e);return s[0]+=n,this.calendarSystem.arrayToMarker(s)}addMonths(e,n){let s=this.calendarSystem.markerToArray(e);return s[1]+=n,this.calendarSystem.arrayToMarker(s)}diffWholeYears(e,n){let{calendarSystem:s}=this;return Ie(e)===Ie(n)&&s.getMarkerDay(e)===s.getMarkerDay(n)&&s.getMarkerMonth(e)===s.getMarkerMonth(n)?s.getMarkerYear(n)-s.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:s}=this;return Ie(e)===Ie(n)&&s.getMarkerDay(e)===s.getMarkerDay(n)?s.getMarkerMonth(n)-s.getMarkerMonth(e)+(s.getMarkerYear(n)-s.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let s=this.diffWholeYears(e,n);return s!==null?{unit:"year",value:s}:(s=this.diffWholeMonths(e,n),s!==null?{unit:"month",value:s}:(s=wy(e,n),s!==null?{unit:"week",value:s}:(s=Un(e,n),s!==null?{unit:"day",value:s}:(s=my(e,n),In(s)?{unit:"hour",value:s}:(s=yy(e,n),In(s)?{unit:"minute",value:s}:(s=vy(e,n),In(s)?{unit:"second",value:s}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,s){let i;return s.years&&(i=this.diffWholeYears(e,n),i!==null)?i/hy(s):s.months&&(i=this.diffWholeMonths(e,n),i!==null)?i/py(s):s.days&&(i=Un(e,n),i!==null)?i/Dt(s):(n.valueOf()-e.valueOf())/me(s)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?L(e):n==="hour"?Sy(e):n==="minute"?Ey(e):n==="second"?Ay(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)):Cy(e,this.weekDow,this.weekDoy)}format(e,n,s={}){return n.format({marker:e,timeZoneOffset:s.forcedTzo!=null?s.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,n,s,i={}){return i.isEndExclusive&&(n=je(n,-1)),s.formatRange({marker:e,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(e)},{marker:n,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(n)},this,i.defaultSeparator)}formatIso(e,n={}){let s=null;return n.omitTimeZoneOffset||(n.forcedTzo!=null?s=n.forcedTzo:s=this.offsetForMarker(e)),Gl(e,s,n.omitTime)}timestampToMarker(e){return this.timeZone==="local"?re(Ro(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):re(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-To(Ye(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ye(e)):null}toDate(e,n){return this.timeZone==="local"?To(Ye(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Ye(e))*1e3*60):new Date(e.valueOf()-(n||0))}}class ln{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let n,s;if(typeof e=="object"&&e){n=Object.assign({},this.iconClasses);for(s in e)n[s]=this.applyIconOverridePrefix(e[s]);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 s;return n&&this.rtlIconClasses?s=this.rtlIconClasses[e]||this.iconClasses[e]:s=this.iconClasses[e],s?`${this.baseIconClass} ${s}`:""}getCustomButtonIconClass(e){let n;return this.iconOverrideCustomButtonOption&&(n=e[this.iconOverrideCustomButtonOption],n)?`${this.baseIconClass} ${this.applyIconOverridePrefix(n)}`:""}}ln.prototype.classes={};ln.prototype.iconClasses={};ln.prototype.baseIconClass="";ln.prototype.iconOverridePrefix="";function qn(t){t();let e=Ds.debounceRendering,n=[];function s(i){n.push(i)}for(Ds.debounceRendering=s,Qs(y(tv,{}),document.createElement("div"));n.length;)n.shift()();Ds.debounceRendering=e}class tv extends Xn{render(){return y("div",{})}componentDidMount(){this.setState({})}}function Yl(t){let e=uu(t),n=e.Provider;return e.Provider=function(){let s=!this.getChildContext,i=n.apply(this,arguments);if(s){let r=[];this.shouldComponentUpdate=o=>{this.props.value!==o.value&&r.forEach(a=>{a.context=o.value,a.forceUpdate()})},this.sub=o=>{r.push(o);let a=o.componentWillUnmount;o.componentWillUnmount=()=>{r.splice(r.indexOf(o),1),a&&a.call(o)}}}return i},e}class nv{constructor(e,n,s,i){this.execFunc=e,this.emitter=n,this.scrollTime=s,this.scrollTimeReset=i,this.handleScrollRequest=r=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},r),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 Re=Yl({});function sv(t,e,n,s,i,r,o,a,l,c,u,d,f,h){return{dateEnv:i,nowManager:r,options:n,pluginHooks:a,emitter:u,dispatch:l,getCurrentData:c,calendarApi:d,viewSpec:t,viewApi:e,dateProfileGenerator:s,theme:o,isRtl:n.direction==="rtl",addResizeHandler(m){u.on("_resize",m)},removeResizeHandler(m){u.off("_resize",m)},createScrollResponder(m){return new nv(m,u,O(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:f,unregisterInteractiveComponent:h}}class ut extends Xn{shouldComponentUpdate(e,n){return!Bs(this.props,e,this.propEquality)||!Bs(this.state,n,this.stateEquality)}safeSetState(e){Bs(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}ut.addPropsEquality=iv;ut.addStateEquality=rv;ut.contextType=Re;ut.prototype.propEquality={};ut.prototype.stateEquality={};class _ extends ut{}_.contextType=Re;function iv(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function rv(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function Se(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class lr extends _{constructor(){super(...arguments),this.id=ct(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:n}=this.context,{generatorName:s}=this.props;(!n.customRenderingReplaces||!gi(s,n))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Se(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:s}=n,{customGenerator:i,defaultGenerator:r,renderProps:o}=e,a=Jl(e,[],this.handleEl);let l=!1,c,u=[],d;if(i!=null){const f=typeof i=="function"?i(o,y):i;if(f===!0)l=!0;else{const h=f&&typeof f=="object";h&&"html"in f?a.dangerouslySetInnerHTML={__html:f.html}:h&&"domNodes"in f?u=Array.prototype.slice.call(f.domNodes):(h?du(f):typeof f!="function")?c=f:d=f}}else l=!gi(e.generatorName,s);return l&&r&&(c=r(o)),this.queuedDomNodes=u,this.currentGeneratorMeta=d,y(e.elTag,a,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var n;const{props:s,context:i}=this,{handleCustomRendering:r,customRenderingMetaMap:o}=i.options;if(r){const a=(n=this.currentGeneratorMeta)!==null&&n!==void 0?n:o?.[s.generatorName];a&&r(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:a},s),{elClasses:(s.elClasses||[]).filter(ov)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,s=this.base;if(!Le(e,n)){n.forEach(Xi);for(let i of e)s.appendChild(i);this.currentDomNodes=e}}}lr.addPropsEquality({elClasses:Le,elStyle:ye,elAttrs:Zy,renderProps:ye});function gi(t,e){var n;return!!(e.handleCustomRendering&&t&&(!((n=e.customRenderingMetaMap)===null||n===void 0)&&n[t]))}function Jl(t,e,n){const s=Object.assign(Object.assign({},t.elAttrs),{ref:n});return(t.elClasses||e)&&(s.className=(t.elClasses||[]).concat(e||[]).concat(s.className||[]).filter(Boolean).join(" ")),t.elStyle&&(s.style=t.elStyle),s}function ov(t){return!!t}const Xl=Yl(0);class ae extends Xn{constructor(){super(...arguments),this.InnerContent=av.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Se(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=lv(e.classNameGenerator,e.renderProps);if(e.children){const s=Jl(e,n,this.handleEl),i=e.children(this.InnerContent,e.renderProps,s);return e.elTag?y(e.elTag,s,i):i}else return y(lr,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}))}}ae.contextType=Xl;function av(t,e){const n=t.props;return y(lr,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context},e))}function lv(t,e){const n=typeof t=="function"?t(e):t||[];return typeof n=="string"?[n]:n}class xo extends _{render(){let{props:e,context:n}=this,{options:s}=n,i={view:n.viewApi};return y(ae,{elRef:e.elRef,elTag:e.elTag||"div",elAttrs:e.elAttrs,elClasses:[...ec(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:i,classNameGenerator:s.viewClassNames,generatorName:void 0,didMount:s.viewDidMount,willUnmount:s.viewWillUnmount},()=>e.children)}}function ec(t){return[`fc-${t.type}-view`,"fc-view"]}function cv(t,e){let n=null,s=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(s=e.createMarker(t.end)),!n&&!s||n&&s&&s<n?null:{start:n,end:s}}function Po(t,e){let n=[],{start:s}=e,i,r;for(t.sort(uv),i=0;i<t.length;i+=1)r=t[i],r.start>s&&n.push({start:s,end:r.start}),r.end>s&&(s=r.end);return s<e.end&&n.push({start:s,end:e.end}),n}function uv(t,e){return t.start.valueOf()-e.start.valueOf()}function st(t,e){let{start:n,end:s}=t,i=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(s===null?s=e.end:s=new Date(Math.min(s.valueOf(),e.end.valueOf()))),(n===null||s===null||n<s)&&(i={start:n,end:s}),i}function dv(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 cr(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function ws(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function De(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function fv(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 tc(t){let e=Math.floor(Ft(t.start,t.end))||1,n=L(t.start),s=Y(n,e);return{start:n,end:s}}function nc(t,e=O(0)){let n=null,s=null;if(t.end){s=L(t.end);let i=t.end.valueOf()-s.valueOf();i&&i>=me(e)&&(s=Y(s,1))}return t.start&&(n=L(t.start),s&&s<=n&&(s=Y(n,1))),{start:n,end:s}}function wt(t,e,n,s){return s==="year"?O(n.diffWholeYears(t,e),"year"):s==="month"?O(n.diffWholeMonths(t,e),"month"):by(t,e)}class hv{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,n,s){let{dateEnv:i}=this.props,r=i.subtract(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(r,-1,s)}buildNext(e,n,s){let{dateEnv:i}=this.props,r=i.add(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(r,1,s)}build(e,n,s=!0){let{props:i}=this,r,o,a,l,c,u;return r=this.buildValidRange(),r=this.trimHiddenDays(r),s&&(e=fv(e,r)),o=this.buildCurrentRangeInfo(e,n),a=/^(year|month|week|day)$/.test(o.unit),l=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,a),l=this.trimHiddenDays(l),c=l,i.showNonCurrentDates||(c=st(c,o.range)),c=this.adjustActiveRange(c),c=st(c,r),u=cr(o.range,r),De(l,e)||(e=l.start),{currentDate:e,validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:a,activeRange:c,renderRange:l,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:u,dateIncrement:this.buildDateIncrement(o.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:s}=this,i=null,r=null,o=null,a;return s.duration?(i=s.duration,r=s.durationUnit,o=this.buildRangeFromDuration(e,n,i,r)):(a=this.props.dayCount)?(r="day",o=this.buildRangeFromDayCount(e,n,a)):(o=this.buildCustomVisibleRange(e))?r=s.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),r=pi(i).unit,o=this.buildRangeFromDuration(e,n,i,r)),{duration:i,unit:r,range:o}}getFallbackDuration(){return O({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:s,slotMinTime:i,slotMaxTime:r}=this.props,{start:o,end:a}=e;return s&&(Dt(i)<0&&(o=L(o),o=n.add(o,i)),Dt(r)>1&&(a=L(a),a=Y(a,-1),a=n.add(a,r))),{start:o,end:a}}buildRangeFromDuration(e,n,s,i){let{dateEnv:r,dateAlignment:o}=this.props,a,l,c;if(!o){let{dateIncrement:d}=this.props;d&&me(d)<me(s)?o=pi(d).unit:o=i}Dt(s)<=1&&this.isHiddenDay(a)&&(a=this.skipHiddenDays(a,n),a=L(a));function u(){a=r.startOf(e,o),l=r.add(a,s),c={start:a,end:l}}return u(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,n),u()),c}buildRangeFromDayCount(e,n,s){let{dateEnv:i,dateAlignment:r}=this.props,o=0,a=e,l;r&&(a=i.startOf(a,r)),a=L(a),a=this.skipHiddenDays(a,n),l=a;do l=Y(l,1),this.isHiddenDay(l)||(o+=1);while(o<s);return{start:a,end:l}}buildCustomVisibleRange(e){let{props:n}=this,s=n.visibleRangeInput,i=typeof s=="function"?s.call(n.calendarApi,n.dateEnv.toDate(e)):s,r=this.refineRange(i);return r&&(r.start==null||r.end==null)?null:r}buildRenderRange(e,n,s){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,s;return n||((s=this.props.dateAlignment)?O(1,s):e||O({days:1}))}refineRange(e){if(e){let n=cv(e,this.props.dateEnv);return n&&(n=nc(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],s=0,i;for(this.props.weekends===!1&&e.push(0,6),i=0;i<7;i+=1)(n[i]=e.indexOf(i)!==-1)||(s+=1);if(!s)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:s}=e;return n&&(n=this.skipHiddenDays(n)),s&&(s=this.skipHiddenDays(s,-1,!0)),n==null||s==null||n<s?{start:n,end:s}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,s=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(s?n:0)+7)%7];)e=Y(e,n);return e}}function ur(t,e,n,s){return{instanceId:ct(),defId:t,range:e,forcedStartTzo:n??null,forcedEndTzo:s??null}}function pv(t,e,n,s){for(let i=0;i<s.length;i+=1){let r=s[i].parse(t,n);if(r){let{allDay:o}=t;return o==null&&(o=e,o==null&&(o=r.allDayGuess,o==null&&(o=!1))),{allDay:o,duration:r.duration,typeData:r.typeData,typeId:i}}}return null}function it(t,e,n){let{dateEnv:s,pluginHooks:i,options:r}=n,{defs:o,instances:a}=t;a=nt(a,l=>!o[l.defId].recurringDef);for(let l in o){let c=o[l];if(c.recurringDef){let{duration:u}=c.recurringDef;u||(u=c.allDay?r.defaultAllDayEventDuration:r.defaultTimedEventDuration);let d=gv(c,u,e,s,i.recurringTypes);for(let f of d){let h=ur(l,{start:f,end:s.add(f,u)});a[h.instanceId]=h}}}return{defs:o,instances:a}}function gv(t,e,n,s,i){let o=i[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:s.subtract(n.start,e),end:n.end},s);return t.allDay&&(o=o.map(L)),o}const _n={id:String,groupId:String,title:String,url:String,interactive:Boolean},sc={start:b,end:b,date:b,allDay:Boolean},mv=Object.assign(Object.assign(Object.assign({},_n),sc),{extendedProps:b});function ic(t,e,n,s,i=dr(n),r,o){let{refined:a,extra:l}=rc(t,n,i),c=vv(e,n),u=pv(a,c,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let f=mi(a,l,e?e.sourceId:"",u.allDay,!!u.duration,n,r);return f.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:f,instance:null}}let d=yv(a,c,n,s);if(d){let f=mi(a,l,e?e.sourceId:"",d.allDay,d.hasEnd,n,r),h=ur(f.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return o&&f.publicId&&o[f.publicId]&&(h.instanceId=o[f.publicId]),{def:f,instance:h}}return null}function rc(t,e,n=dr(e)){return rr(t,n)}function dr(t){return Object.assign(Object.assign(Object.assign({},Gn),mv),t.pluginHooks.eventRefiners)}function mi(t,e,n,s,i,r,o){let a={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(o&&t.id?o[t.id]:"")||ct(),sourceId:n,allDay:s,hasEnd:i,interactive:t.interactive,ui:Qn(t,r),extendedProps:Object.assign(Object.assign({},t.extendedProps||{}),e)};for(let l of r.pluginHooks.eventDefMemberAdders)Object.assign(a,l(t));return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function yv(t,e,n,s){let{allDay:i}=t,r,o=null,a=!1,l,c=null,u=t.start!=null?t.start:t.date;if(r=n.dateEnv.createMarkerMeta(u),r)o=r.marker;else if(!s)return null;return t.end!=null&&(l=n.dateEnv.createMarkerMeta(t.end)),i==null&&(e!=null?i=e:i=(!r||r.isTimeUnspecified)&&(!l||l.isTimeUnspecified)),i&&o&&(o=L(o)),l&&(c=l.marker,i&&(c=L(c)),o&&c<=o&&(c=null)),c?a=!0:s||(a=n.options.forceEventDuration||!1,c=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:a,range:{start:o,end:c},forcedStartTzo:r?r.forcedTzo:null,forcedEndTzo:l?l.forcedTzo:null}}function vv(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}function sn(t,e,n,s,i,r){let o=oe(),a=dr(n);for(let l of t){let c=ic(l,e,n,s,a,i,r);c&&yi(c,o)}return o}function yi(t,e=oe()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function fr(t,e){let n=t.instances[e];if(n){let s=t.defs[n.defId],i=Ss(t,r=>bv(s,r));return i.defs[s.defId]=s,i.instances[n.instanceId]=n,i}return oe()}function bv(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function oe(){return{defs:{},instances:{}}}function hr(t,e){return{defs:Object.assign(Object.assign({},t.defs),e.defs),instances:Object.assign(Object.assign({},t.instances),e.instances)}}function Ss(t,e){let n=nt(t.defs,e),s=nt(t.instances,i=>n[i.defId]);return{defs:n,instances:s}}function wv(t,e){let{defs:n,instances:s}=t,i={},r={};for(let o in n)e.defs[o]||(i[o]=n[o]);for(let o in s)!e.instances[o]&&i[s[o].defId]&&(r[o]=s[o]);return{defs:i,instances:r}}function Sv(t,e){return Array.isArray(t)?sn(t,null,e,!0):typeof t=="object"&&t?sn([t],null,e,!0):t!=null?String(t):null}function zo(t){return Array.isArray(t)?t:typeof t=="string"?t.split(/\s+/):[]}const Gn={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:b,overlap:b,allow:b,className:zo,classNames:zo,color:String,backgroundColor:String,borderColor:String,textColor:String},Ev={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Qn(t,e){let n=Sv(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 oc(t){return t.reduce(Av,Ev)}function Av(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 Cv={id:String,defaultAllDay:Boolean,url:String,format:String,events:b,eventDataTransform:b,success:b,failure:b};function ac(t,e,n=lc(e)){let s;if(typeof t=="string"?s={url:t}:typeof t=="function"||Array.isArray(t)?s={events:t}:typeof t=="object"&&t&&(s=t),s){let{refined:i,extra:r}=rr(s,n),o=Dv(i,e);if(o)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:ct(),sourceDefId:o.sourceDefId,meta:o.meta,ui:Qn(i,e),extendedProps:r}}return null}function lc(t){return Object.assign(Object.assign(Object.assign({},Gn),Cv),t.pluginHooks.eventSourceRefiners)}function Dv(t,e){let n=e.pluginHooks.eventSourceDefs;for(let s=n.length-1;s>=0;s-=1){let r=n[s].parseMeta(t);if(r)return{sourceDefId:s,meta:r}}return null}function kv(t,e,n,s,i){switch(e.type){case"RECEIVE_EVENTS":return Rv(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,i);case"RESET_RAW_EVENTS":return Tv(t,n[e.sourceId],e.rawEvents,s.activeRange,i);case"ADD_EVENTS":return Mv(t,e.eventStore,s?s.activeRange:null,i);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return hr(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return s?it(t,s.activeRange,i):t;case"REMOVE_EVENTS":return wv(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return uc(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Ss(t,r=>!r.sourceId);case"REMOVE_ALL_EVENTS":return oe();default:return t}}function Rv(t,e,n,s,i,r){if(e&&n===e.latestFetchId){let o=sn(cc(i,e,r),e,r);return s&&(o=it(o,s,r)),hr(uc(t,e.sourceId),o)}return t}function Tv(t,e,n,s,i){const{defIdMap:r,instanceIdMap:o}=Ov(t);let a=sn(cc(n,e,i),e,i,!1,r,o);return it(a,s,i)}function cc(t,e,n){let s=n.options.eventDataTransform,i=e?e.eventDataTransform:null;return i&&(t=Lo(t,i)),s&&(t=Lo(t,s)),t}function Lo(t,e){let n;if(!e)n=t;else{n=[];for(let s of t){let i=e(s);i?n.push(i):i==null&&n.push(s)}}return n}function Mv(t,e,n,s){return n&&(e=it(e,n,s)),hr(t,e)}function jo(t,e,n){let{defs:s}=t,i=ke(t.instances,r=>s[r.defId].allDay?r:Object.assign(Object.assign({},r),{range:{start:n.createMarker(e.toDate(r.range.start,r.forcedStartTzo)),end:n.createMarker(e.toDate(r.range.end,r.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:r.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:r.forcedEndTzo}));return{defs:s,instances:i}}function uc(t,e){return Ss(t,n=>n.sourceId!==e)}function Iv(t,e){return{defs:t.defs,instances:nt(t.instances,n=>!e[n.instanceId])}}function Ov(t){const{defs:e,instances:n}=t,s={},i={};for(let r in e){const o=e[r],{publicId:a}=o;a&&(s[a]=r)}for(let r in n){const o=n[r],a=e[o.defId],{publicId:l}=a;l&&(i[l]=r)}return{defIdMap:s,instanceIdMap:i}}class Es{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){_v(this.handlers,e,n)}off(e,n){Nv(this.handlers,e,n)}trigger(e,...n){let s=this.handlers[e]||[],i=this.options&&this.options[e],r=[].concat(i||[],s);for(let o of r)o.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function _v(t,e,n){(t[e]||(t[e]=[])).push(n)}function Nv(t,e,n){n?t[e]&&(t[e]=t[e].filter(s=>s!==n)):delete t[e]}const xv={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Pv(t,e){return sn(zv(t),null,e)}function zv(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({},xv),n)),e}function dc(t,e,n){n.emitter.trigger("select",Object.assign(Object.assign({},pr(t,n)),{jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Lv(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function pr(t,e){let n={};for(let s of e.pluginHooks.dateSpanTransforms)Object.assign(n,s(t,e));return Object.assign(n,Yv(t,e.dateEnv)),n}function Bo(t,e,n){let{dateEnv:s,options:i}=n,r=e;return t?(r=L(r),r=s.add(r,i.defaultAllDayEventDuration)):r=s.add(r,i.defaultTimedEventDuration),r}function gr(t,e,n,s){let i=Kn(t.defs,e),r=oe();for(let o in t.defs){let a=t.defs[o];r.defs[o]=jv(a,i[o],n,s)}for(let o in t.instances){let a=t.instances[o],l=r.defs[a.defId];r.instances[o]=Bv(a,l,i[a.defId],n,s)}return r}function jv(t,e,n,s){let i=n.standardProps||{};i.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let r=Object.assign(Object.assign(Object.assign({},t),i),{ui:Object.assign(Object.assign({},t.ui),i.ui)});n.extendedProps&&(r.extendedProps=Object.assign(Object.assign({},r.extendedProps),n.extendedProps));for(let o of s.pluginHooks.eventDefMutationAppliers)o(r,n,s);return!r.hasEnd&&s.options.forceEventDuration&&(r.hasEnd=!0),r}function Bv(t,e,n,s,i){let{dateEnv:r}=i,o=s.standardProps&&s.standardProps.allDay===!0,a=s.standardProps&&s.standardProps.hasEnd===!1,l=Object.assign({},t);return o&&(l.range=tc(l.range)),s.datesDelta&&n.startEditable&&(l.range={start:r.add(l.range.start,s.datesDelta),end:r.add(l.range.end,s.datesDelta)}),s.startDelta&&n.durationEditable&&(l.range={start:r.add(l.range.start,s.startDelta),end:l.range.end}),s.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:r.add(l.range.end,s.endDelta)}),a&&(l.range={start:l.range.start,end:Bo(e.allDay,l.range.start,i)}),e.allDay&&(l.range={start:L(l.range.start),end:L(l.range.end)}),l.range.end<l.range.start&&(l.range.end=Bo(e.allDay,l.range.start,i)),l}class ht{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 j{constructor(e,n,s){this._context=e,this._def=n,this._instance=s||null}setProp(e,n){if(e in sc)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")n=_n[e](n),this.mutate({standardProps:{publicId:n}});else if(e in _n)n=_n[e](n),this.mutate({standardProps:{[e]:n}});else if(e in Gn){let s=Gn[e](n);e==="color"?s={backgroundColor:n,borderColor:n}:e==="editable"?s={startEditable:n,durationEditable:n}:s={[e]:n},this.mutate({standardProps:{ui:s}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:s}=this._context,i=s.createMarker(e);if(i&&this._instance){let r=this._instance.range,o=wt(r.start,i,s,n.granularity);n.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}}setEnd(e,n={}){let{dateEnv:s}=this._context,i;if(!(e!=null&&(i=s.createMarker(e),!i))&&this._instance)if(i){let r=wt(this._instance.range.end,i,s,n.granularity);this.mutate({endDelta:r})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,s={}){let{dateEnv:i}=this._context,r={allDay:s.allDay},o=i.createMarker(e),a;if(o&&!(n!=null&&(a=i.createMarker(n),!a))&&this._instance){let l=this._instance.range;s.allDay===!0&&(l=tc(l));let c=wt(l.start,o,i,s.granularity);if(a){let u=wt(l.end,a,i,s.granularity);uy(c,u)?this.mutate({datesDelta:c,standardProps:r}):this.mutate({startDelta:c,endDelta:u,standardProps:r})}else r.hasEnd=!1,this.mutate({datesDelta:c,standardProps:r})}}moveStart(e){let n=O(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=O(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=O(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let s={allDay:e},{maintainDuration:i}=n;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(s.hasEnd=i),this.mutate({standardProps:s})}formatRange(e){let{dateEnv:n}=this._context,s=this._instance,i=$(e);return this._def.hasEnd?n.formatRange(s.range.start,s.range.end,i,{forcedStartTzo:s.forcedStartTzo,forcedEndTzo:s.forcedEndTzo}):n.format(s.range.start,i,{forcedTzo:s.forcedStartTzo})}mutate(e){let n=this._instance;if(n){let s=this._def,i=this._context,{eventStore:r}=i.getCurrentData(),o=fr(r,n.instanceId);o=gr(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,i);let l=new j(i,s,n);this._def=o.defs[s.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:l,event:this,relatedEvents:Je(o,i,n),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:r})}})}}remove(){let e=this._context,n=fc(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 ht(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:s}=n,{startStr:i,endStr:r}=this,o={allDay:n.allDay};return n.title&&(o.title=n.title),i&&(o.start=i),r&&(o.end=r),n.publicId&&(o.id=n.publicId),n.groupId&&(o.groupId=n.groupId),n.url&&(o.url=n.url),s.display&&s.display!=="auto"&&(o.display=s.display),e.collapseColor&&s.backgroundColor&&s.backgroundColor===s.borderColor?o.color=s.backgroundColor:(s.backgroundColor&&(o.backgroundColor=s.backgroundColor),s.borderColor&&(o.borderColor=s.borderColor)),s.textColor&&(o.textColor=s.textColor),s.classNames.length&&(o.classNames=s.classNames),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(o,n.extendedProps):o.extendedProps=n.extendedProps),o}toJSON(){return this.toPlainObject()}}function fc(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function Je(t,e,n){let{defs:s,instances:i}=t,r=[],o=n?n.instanceId:"";for(let a in i){let l=i[a],c=s[l.defId];l.instanceId!==o&&r.push(new j(e,c,l))}return r}function Fo(t,e,n,s){let i={},r={},o={},a=[],l=[],c=Kn(t.defs,e);for(let u in t.defs){let d=t.defs[u];c[d.defId].display==="inverse-background"&&(d.groupId?(i[d.groupId]=[],o[d.groupId]||(o[d.groupId]=d)):r[u]=[])}for(let u in t.instances){let d=t.instances[u],f=t.defs[d.defId],h=c[f.defId],m=d.range,p=!f.allDay&&s?nc(m,s):m,g=st(p,n);g&&(h.display==="inverse-background"?f.groupId?i[f.groupId].push(g):r[d.defId].push(g):h.display!=="none"&&(h.display==="background"?a:l).push({def:f,ui:h,instance:d,range:g,isStart:p.start&&p.start.valueOf()===g.start.valueOf(),isEnd:p.end&&p.end.valueOf()===g.end.valueOf()}))}for(let u in i){let d=i[u],f=Po(d,n);for(let h of f){let m=o[u],p=c[m.defId];a.push({def:m,ui:p,instance:null,range:h,isStart:!1,isEnd:!1})}}for(let u in r){let d=r[u],f=Po(d,n);for(let h of f)a.push({def:t.defs[u],ui:c[u],instance:null,range:h,isStart:!1,isEnd:!1})}return{bg:a,fg:l}}function Fv(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function Ho(t,e){t.fcSeg=e}function Ot(t){return t.fcSeg||t.parentNode.fcSeg||null}function Kn(t,e){return ke(t,n=>hc(n,e))}function hc(t,e){let n=[];return e[""]&&n.push(e[""]),e[t.defId]&&n.push(e[t.defId]),n.push(t.ui),oc(n)}function pc(t,e){let n=t.map(Hv);return n.sort((s,i)=>sy(s,i,e)),n.map(s=>s._seg)}function Hv(t){let{eventRange:e}=t,n=e.def,s=e.instance?e.instance.range:e.range,i=s.start?s.start.valueOf():0,r=s.end?s.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:r,duration:r-i,allDay:Number(n.allDay),_seg:t})}function $v(t,e){let{pluginHooks:n}=e,s=n.isDraggableTransformers,{def:i,ui:r}=t.eventRange,o=r.startEditable;for(let a of s)o=a(o,i,r,e);return o}function Uv(t,e){return t.isStart&&t.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function Vv(t,e){return t.isEnd&&t.eventRange.ui.durationEditable}function gc(t,e,n,s,i,r,o){let{dateEnv:a,options:l}=n,{displayEventTime:c,displayEventEnd:u}=l,d=t.eventRange.def,f=t.eventRange.instance;c==null&&(c=s!==!1),u==null&&(u=i!==!1);let h=f.range.start,m=f.range.end,p=t.start||t.eventRange.range.start,g=t.end||t.eventRange.range.end,v=L(h).valueOf()===L(p).valueOf(),w=L(je(m,-1)).valueOf()===L(je(g,-1)).valueOf();return c&&!d.allDay&&(v||w)?(p=v?h:p,g=w?m:g,u&&d.hasEnd?a.formatRange(p,g,e,{forcedStartTzo:f.forcedStartTzo,forcedEndTzo:f.forcedEndTzo}):a.format(p,e,{forcedTzo:f.forcedStartTzo})):""}function Ne(t,e,n){let s=t.eventRange.range;return{isPast:s.end<=(n||e.start),isFuture:s.start>=(n||e.end),isToday:e&&De(e,s.start)}}function Zv(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 mc(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function yc(t,e){let{def:n,instance:s}=t.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:r,options:o}=e,{eventInteractive:a}=o;return a==null&&(a=n.interactive,a==null&&(a=!!r.hasHandlers("eventClick"))),a?Wl(l=>{r.trigger("eventClick",{el:l.target,event:new j(e,n,s),jsEvent:l,view:e.viewApi})}):{}}const Wv={start:b,end:b,allDay:Boolean};function qv(t,e,n){let s=Gv(t,e),{range:i}=s;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=e.add(i.start,n)}return s}function Gv(t,e){let{refined:n,extra:s}=rr(t,Wv),i=n.start?e.createMarkerMeta(n.start):null,r=n.end?e.createMarkerMeta(n.end):null,{allDay:o}=n;return o==null&&(o=i&&i.isTimeUnspecified&&(!r||r.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:r?r.marker:null},allDay:o},s)}function Qv(t,e){return dv(t.range,e.range)&&t.allDay===e.allDay&&Kv(t,e)}function Kv(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 Yv(t,e){return Object.assign(Object.assign({},bc(t.range,e,t.allDay)),{allDay:t.allDay})}function vc(t,e,n){return Object.assign(Object.assign({},bc(t,e,n)),{timeZone:e.timeZone})}function bc(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 Jv(t,e,n){let s=rc({editable:!1},n),i=mi(s.refined,s.extra,"",t.allDay,!0,n);return{def:i,ui:hc(i,e),instance:ur(i.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function Xv(t,e,n){let s=!1,i=function(a){s||(s=!0,e(a))},r=function(a){s||(s=!0,n(a))},o=t(i,r);o&&typeof o.then=="function"&&o.then(i,r)}class $o extends Error{constructor(e,n){super(e),this.response=n}}function eb(t,e,n){t=t.toUpperCase();const s={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(s.body=new URLSearchParams(n),s.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,s).then(i=>{if(i.ok)return i.json().then(r=>[r,i],()=>{throw new $o("Failure parsing JSON",i)});throw new $o("Request failed",i)})}let Fs;function wc(){return Fs==null&&(Fs=tb()),Fs}function tb(){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 nb extends _{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{qn(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{qn(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:n}=e,{forPrint:s}=this.state,i=s||n.height==="auto"||n.contentHeight==="auto",r=!i&&n.height!=null?n.height:"",o=["fc",s?"fc-media-print":"fc-media-screen",`fc-direction-${n.direction}`,e.theme.getClass("root")];return wc()||o.push("fc-liquid-hack"),e.children(o,r,i,s)}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 Ht{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function sb(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function mr(t){return{[t.component.uid]:t}}const vi={};class $t extends Xn{constructor(e,n){super(e,n),this.handleRefresh=()=>{let s=this.computeTiming();s.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(s.state),this.clearTimeout(),this.setTimeout(s.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,s=n.nowManager.getDateMarker(),{nowIndicatorSnap:i}=n.options;i==="auto"&&(i=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let r,o;return i?(r=n.dateEnv.startOf(s,e.unit),o=n.dateEnv.add(r,O(1,e.unit)).valueOf()-s.valueOf()):(r=s,o=1e3*60),o=Math.min(1e3*60*60*24,o),{state:{nowDate:r,todayRange:ib(r)},waitMs:o}}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)}}$t.contextType=Re;function ib(t){let e=L(t),n=Y(e,1);return{start:e,end:n}}class rb{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:s}=this;s.currentCalendarOptionsRefiners[e]?s.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:s}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:s.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let s=this.getCurrentData(),i;n=n||"day",i=s.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:s}=this.getCurrentData(),i=[].concat(s.header?s.header.viewsWithButtons:[],s.footer?s.footer.viewsWithButtons:[]),r,o;for(let a in n)i.push(a);for(r=0;r<i.length;r+=1)if(o=n[i[r]],o&&o.singleUnit===e)return o;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(),s=O(e);s&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,s)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:s}=this.getCurrentData();return s.format(s.createMarker(e),$(n))}formatRange(e,n,s){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(e),i.createMarker(n),$(s),s)}formatIso(e,n){let{dateEnv:s}=this.getCurrentData();return s.formatIso(s.createMarker(e),{omitTime:n})}select(e,n){let s;n==null?e.start!=null?s=e:s={start:e,end:null}:s={start:e,end:n};let i=this.getCurrentData(),r=qv(s,i.dateEnv,O({days:1}));r&&(this.dispatch({type:"SELECT_DATES",selection:r}),dc(r,null,i))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),Lv(e,n))}addEvent(e,n){if(e instanceof j){let o=e._def,a=e._instance;return this.getCurrentData().eventStore.defs[o.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:yi({def:o,instance:a})}),this.triggerEventAdd(e)),e}let s=this.getCurrentData(),i;if(n instanceof ht)i=n.internalEventSource;else if(typeof n=="boolean")n&&([i]=ar(s.eventSources));else if(n!=null){let o=this.getEventSourceById(n);if(!o)return console.warn(`Could not find an event source with ID "${n}"`),null;i=o.internalEventSource}let r=ic(e,i,s,!1);if(r){let o=new j(s,r.def,r.def.recurringDef?null:r.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:yi(r)}),this.triggerEventAdd(o),o}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:fc(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:s,instances:i}=n.eventStore;e=String(e);for(let r in s){let o=s[r];if(o.publicId===e){if(o.recurringDef)return new j(n,o,null);for(let a in i){let l=i[a];if(l.defId===o.defId)return new j(n,o,l)}}}return null}getEvents(){let e=this.getCurrentData();return Je(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,s=[];for(let i in n)s.push(new ht(e,n[i]));return s}getEventSourceById(e){let n=this.getCurrentData(),s=n.eventSources;e=String(e);for(let i in s)if(s[i].publicId===e)return new ht(n,s[i]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof ht)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let s=ac(e,n);return s?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[s]}),new ht(n,s)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=O(e);n&&this.trigger("_scrollRequest",{time:n})}}function ob(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function Sc(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 ab(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 lb(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function cb(t,e){return{left:t.left-e.left,top:t.top-e.top}}const Hs=oe();class ub{constructor(){this.getKeysForEventDefs=M(this._getKeysForEventDefs),this.splitDateSelection=M(this._splitDateSpan),this.splitEventStore=M(this._splitEventStore),this.splitIndividualUi=M(this._splitIndividualUi),this.splitEventDrag=M(this._splitInteraction),this.splitEventResize=M(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),s=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),r=this.splitIndividualUi(e.eventUiBases,s),o=this.splitEventStore(e.eventStore,s),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),c={};this.eventUiBuilders=ke(n,(u,d)=>this.eventUiBuilders[d]||M(db));for(let u in n){let d=n[u],f=o[u]||Hs,h=this.eventUiBuilders[u];c[u]={businessHours:d.businessHours||e.businessHours,dateSelection:i[u]||null,eventStore:f,eventUiBases:h(e.eventUiBases[""],d.ui,r[u]),eventSelection:f.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[u]||null,eventResize:l[u]||null}}return c}_splitDateSpan(e){let n={};if(e){let s=this.getKeysForDateSpan(e);for(let i of s)n[i]=e}return n}_getKeysForEventDefs(e){return ke(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:s,instances:i}=e,r={};for(let o in s)for(let a of n[o])r[a]||(r[a]=oe()),r[a].defs[o]=s[o];for(let o in i){let a=i[o];for(let l of n[a.defId])r[l]&&(r[l].instances[o]=a)}return r}_splitIndividualUi(e,n){let s={};for(let i in e)if(i)for(let r of n[i])s[r]||(s[r]={}),s[r][i]=e[i];return s}_splitInteraction(e){let n={};if(e){let s=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),i=this._getKeysForEventDefs(e.mutatedEvents),r=this._splitEventStore(e.mutatedEvents,i),o=a=>{n[a]||(n[a]={affectedEvents:s[a]||Hs,mutatedEvents:r[a]||Hs,isEvent:e.isEvent})};for(let a in s)o(a);for(let a in r)o(a)}return n}}function db(t,e,n){let s=[];t&&s.push(t),e&&s.push(e);let i={"":oc(s)};return n&&Object.assign(i,n),i}function Ec(t,e,n,s){return{dow:t.getUTCDay(),isDisabled:!!(s&&(!s.activeRange||!De(s.activeRange,t))),isOther:!!(s&&!De(s.currentRange,t)),isToday:!!(e&&De(e,t)),isPast:!!(e&&t<e.start),isFuture:!!(e&&t>=e.end)}}function yr(t,e){let n=["fc-day",`fc-day-${gy[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 fb=$({year:"numeric",month:"long",day:"numeric"}),hb=$({week:"long"});function Yn(t,e,n="day",s=!0){const{dateEnv:i,options:r,calendarApi:o}=t;let a=i.format(e,n==="week"?hb:fb);if(r.navLinks){let l=i.toDate(e);const c=u=>{let d=n==="day"?r.navLinkDayClick:n==="week"?r.navLinkWeekClick:null;typeof d=="function"?d.call(o,i.toDate(e),u):(typeof d=="string"&&(n=d),o.zoomTo(e,n))};return Object.assign({title:Qt(r.navLinkHint,[a,l],a),"data-navlink":""},s?Zl(c):{onClick:c})}return{"aria-label":a}}let $s=null;function pb(){return $s===null&&($s=gb()),$s}function gb(){let t=document.createElement("div");Gt(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 Xi(t),n}let Us;function mb(){return Us||(Us=yb()),Us}function yb(){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=Ac(t);return document.body.removeChild(t),e}function Ac(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}function vb(t,e=!1){let n=window.getComputedStyle(t),s=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,r=parseInt(n.borderTopWidth,10)||0,o=parseInt(n.borderBottomWidth,10)||0,a=Ac(t),l=a.y-s-i,c=a.x-r-o,u={borderLeft:s,borderRight:i,borderTop:r,borderBottom:o,scrollbarBottom:c,scrollbarLeft:0,scrollbarRight:0};return pb()&&n.direction==="rtl"?u.scrollbarLeft=l:u.scrollbarRight=l,e&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function bb(t,e=!1,n){let s=vr(t),i=vb(t,e),r={left:s.left+i.borderLeft+i.scrollbarLeft,right:s.right-i.borderRight-i.scrollbarRight,top:s.top+i.borderTop,bottom:s.bottom-i.borderBottom-i.scrollbarBottom};return e&&(r.left+=i.paddingLeft,r.right-=i.paddingRight,r.top+=i.paddingTop,r.bottom-=i.paddingBottom),r}function vr(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 wb(t){let e=Cc(t),n=t.getBoundingClientRect();for(let s of e){let i=Sc(n,s.getBoundingClientRect());if(i)n=i;else return null}return n}function Cc(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 _t{constructor(e,n,s,i){this.els=n;let r=this.originClientRect=e.getBoundingClientRect();s&&this.buildElHorizontals(r.left),i&&this.buildElVerticals(r.top)}buildElHorizontals(e){let n=[],s=[];for(let i of this.els){let r=i.getBoundingClientRect();n.push(r.left-e),s.push(r.right-e)}this.lefts=n,this.rights=s}buildElVerticals(e){let n=[],s=[];for(let i of this.els){let r=i.getBoundingClientRect();n.push(r.top-e),s.push(r.bottom-e)}this.tops=n,this.bottoms=s}leftToIndex(e){let{lefts:n,rights:s}=this,i=n.length,r;for(r=0;r<i;r+=1)if(e>=n[r]&&e<s[r])return r}topToIndex(e){let{tops:n,bottoms:s}=this,i=n.length,r;for(r=0;r<i;r+=1)if(e>=n[r]&&e<s[r])return r}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return En(this.tops||[],e.tops||[])&&En(this.bottoms||[],e.bottoms||[])&&En(this.lefts||[],e.lefts||[])&&En(this.rights||[],e.rights||[])}}function En(t,e){const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(Math.round(t[s])!==Math.round(e[s]))return!1;return!0}class br{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 Sb extends br{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 Eb extends br{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 Te extends _{constructor(){super(...arguments),this.uid=ct()}prepareHits(){}queryHit(e,n,s,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!J(e,".fc-event-mirror")}isValidDateDownEl(e){return!J(e,".fc-event:not(.fc-bg-event)")&&!J(e,".fc-more-link")&&!J(e,"a[data-navlink]")&&!J(e,".fc-popover")}}class Dc{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 s of e)this.insertEntry(s,n);return n}insertEntry(e,n){let s=this.findInsertion(e);this.isInsertionValid(s,e)?this.insertEntryAt(e,s):this.handleInvalidInsertion(s,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,s){if(this.allowReslicing&&e.touchingEntry){const i=Object.assign(Object.assign({},n),{span:wr(n.span,e.touchingEntry.span)});s.push(i),this.splitEntry(n,e.touchingEntry,s)}else s.push(n)}splitEntry(e,n,s){let i=e.span,r=n.span;i.start<r.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:r.start}},s),i.end>r.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.end,end:i.end}},s)}insertEntryAt(e,n){let{entriesByLevel:s,levelCoords:i}=this;n.lateral===-1?(Vs(i,n.level,n.levelCoord),Vs(s,n.level,[e])):Vs(s[n.level],n.lateral,e),this.stackCnts[Xe(e)]=n.stackCnt}findInsertion(e){let{levelCoords:n,entriesByLevel:s,strictOrder:i,stackCnts:r}=this,o=n.length,a=0,l=-1,c=-1,u=null,d=0;for(let m=0;m<o;m+=1){const p=n[m];if(!i&&p>=a+this.getEntryThickness(e))break;let g=s[m],v,w=wi(g,e.span.start,bi),E=w[0]+w[1];for(;(v=g[E])&&v.span.start<e.span.end;){let A=p+this.getEntryThickness(v);A>a&&(a=A,u=v,l=m,c=E),A===a&&(d=Math.max(d,r[Xe(v)]+1)),E+=1}}let f=0;if(u)for(f=l+1;f<o&&n[f]<a;)f+=1;let h=-1;return f<o&&n[f]===a&&(h=wi(s[f],e.span.end,bi)[0]),{touchingLevel:l,touchingLateral:c,touchingEntry:u,stackCnt:d,levelCoord:a,level:f,lateral:h}}toRects(){let{entriesByLevel:e,levelCoords:n}=this,s=e.length,i=[];for(let r=0;r<s;r+=1){let o=e[r],a=n[r];for(let l of o)i.push(Object.assign(Object.assign({},l),{thickness:this.getEntryThickness(l),levelCoord:a}))}return i}}function bi(t){return t.span.end}function Xe(t){return t.index+":"+t.span.start}function Ab(t){let e=[];for(let n of t){let s=[],i={span:n.span,entries:[n]};for(let r of e)wr(r.span,i.span)?i={entries:r.entries.concat(i.entries),span:Cb(r.span,i.span)}:s.push(r);s.push(i),e=s}return e}function Cb(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function wr(t,e){let n=Math.max(t.start,e.start),s=Math.min(t.end,e.end);return n<s?{start:n,end:s}:null}function Vs(t,e,n){t.splice(e,0,n)}function wi(t,e,n){let s=0,i=t.length;if(!i||e<n(t[s]))return[0,0];if(e>n(t[i-1]))return[i,0];for(;s<i;){let r=Math.floor(s+(i-s)/2),o=n(t[r]);if(e<o)i=r;else if(e>o)s=r+1;else return[r,1]}return[s,0]}class Db{constructor(e,n){this.emitter=new Es}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const Sr={};function kb(t,e){return!t||e>10?$({weekday:"short"}):e>1?$({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):$({weekday:"long"})}const kc="fc-col-header-cell";function Rc(t){return t.text}class Rb extends _{render(){let{dateEnv:e,options:n,theme:s,viewApi:i}=this.context,{props:r}=this,{date:o,dateProfile:a}=r,l=Ec(o,r.todayRange,null,a),c=[kc].concat(yr(l,s)),u=e.format(o,r.dayHeaderFormat),d=!l.isDisabled&&r.colCnt>1?Yn(this.context,o):{},f=e.toDate(o);e.namedTimeZoneImpl&&(f=je(f,36e5));let h=Object.assign(Object.assign(Object.assign({date:f,view:i},r.extraRenderProps),{text:u}),l);return y(ae,{elTag:"th",elClasses:c,elAttrs:Object.assign({role:"columnheader",colSpan:r.colSpan,"data-date":l.isDisabled?void 0:sr(o)},r.extraDataAttrs),renderProps:h,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:Rc,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},m=>y("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&y(m,{elTag:"a",elAttrs:d,elClasses:["fc-col-header-cell-cushion",r.isSticky&&"fc-sticky"]})))}}const Tb=$({weekday:"long"});class Mb extends _{render(){let{props:e}=this,{dateEnv:n,theme:s,viewApi:i,options:r}=this.context,o=Y(new Date(2592e5),e.dow),a={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=n.format(o,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:o},a),{view:i}),e.extraRenderProps),{text:l});return y(ae,{elTag:"th",elClasses:[kc,...yr(a,s),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:Rc,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},u=>y("div",{className:"fc-scrollgrid-sync-inner"},y(u,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":n.format(o,Tb)}})))}}class Ib extends _{constructor(){super(...arguments),this.createDayHeaderFormatter=M(Ob)}render(){let{context:e}=this,{dates:n,dateProfile:s,datesRepDistinctDays:i,renderIntro:r}=this.props,o=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return y($t,{unit:"day"},(a,l)=>y("tr",{role:"row"},r&&r("day"),n.map(c=>i?y(Rb,{key:c.toISOString(),date:c,dateProfile:s,todayRange:l,colCnt:n.length,dayHeaderFormat:o}):y(Mb,{key:c.getUTCDay(),dow:c.getUTCDay(),dayHeaderFormat:o}))))}}function Ob(t,e,n){return t||kb(e,n)}class _b{constructor(e,n){let s=e.start,{end:i}=e,r=[],o=[],a=-1;for(;s<i;)n.isHiddenDay(s)?r.push(a+.5):(a+=1,r.push(a),o.push(s)),s=Y(s,1);this.dates=o,this.indices=r,this.cnt=o.length}sliceRange(e){let n=this.getDateDayIndex(e.start),s=this.getDateDayIndex(Y(e.end,-1)),i=Math.max(0,n),r=Math.min(this.cnt-1,s);return i=Math.ceil(i),r=Math.floor(r),i<=r?{firstIndex:i,lastIndex:r,isStart:n===i,isEnd:s===r}:null}getDateDayIndex(e){let{indices:n}=this,s=Math.floor(Ft(this.dates[0],e));return s<0?n[0]-1:s>=n.length?n[n.length-1]+1:n[s]}}class Nb{constructor(e,n){let{dates:s}=e,i,r,o;if(n){for(r=s[0].getUTCDay(),i=1;i<s.length&&s[i].getUTCDay()!==r;i+=1);o=Math.ceil(s.length/i)}else o=1,i=s.length;this.rowCnt=o,this.colCnt=i,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCnt;n+=1){let s=[];for(let i=0;i<this.colCnt;i+=1)s.push(this.buildCell(n,i));e.push(s)}return e}buildCell(e,n){let s=this.daySeries.dates[e*this.colCnt+n];return{key:s.toISOString(),date:s}}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,s=this.daySeries.sliceRange(e),i=[];if(s){let{firstIndex:r,lastIndex:o}=s,a=r;for(;a<=o;){let l=Math.floor(a/n),c=Math.min((l+1)*n,o+1);i.push({row:l,firstCol:a%n,lastCol:(c-1)%n,isStart:s.isStart&&a===r,isEnd:s.isEnd&&c-1===o}),a=c}}return i}}class Tc{constructor(){this.sliceBusinessHours=M(this._sliceBusinessHours),this.sliceDateSelection=M(this._sliceDateSpan),this.sliceEventStore=M(this._sliceEventStore),this.sliceEventDrag=M(this._sliceInteraction),this.sliceEventResize=M(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,s,i,...r){let{eventUiBases:o}=e,a=this.sliceEventStore(e.eventStore,o,n,s,...r);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,s,o,i,...r),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,s,i,...r),fgEventSegs:a.fg,bgEventSegs:a.bg,eventDrag:this.sliceEventDrag(e.eventDrag,o,n,s,...r),eventResize:this.sliceEventResize(e.eventResize,o,n,s,...r),eventSelection:e.eventSelection}}sliceNowDate(e,n,s,i,...r){return this._sliceDateSpan({range:{start:e,end:je(e,1)},allDay:!1},n,s,{},i,...r)}_sliceBusinessHours(e,n,s,i,...r){return e?this._sliceEventStore(it(e,An(n,!!s),i),{},n,s,...r).bg:[]}_sliceEventStore(e,n,s,i,...r){if(e){let o=Fo(e,n,An(s,!!i),i);return{bg:this.sliceEventRanges(o.bg,r),fg:this.sliceEventRanges(o.fg,r)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,s,i,...r){if(!e)return null;let o=Fo(e.mutatedEvents,n,An(s,!!i),i);return{segs:this.sliceEventRanges(o.fg,r),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,s,i,r,...o){if(!e)return[];let a=An(n,!!s),l=st(e.range,a);if(l){e=Object.assign(Object.assign({},e),{range:l});let c=Jv(e,i,r),u=this.sliceRange(e.range,...o);for(let d of u)d.eventRange=c;return u}return[]}sliceEventRanges(e,n){let s=[];for(let i of e)s.push(...this.sliceEventRange(i,n));return s}sliceEventRange(e,n){let s=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(s={start:s.start,end:Y(s.start,1)});let i=this.sliceRange(s,...n);for(let r of i)r.eventRange=e,r.isStart=e.isStart&&r.isStart,r.isEnd=e.isEnd&&r.isEnd;return i}}function An(t,e){let n=t.activeRange;return e?n:{start:je(n.start,t.slotMinTime.milliseconds),end:je(n.end,t.slotMaxTime.milliseconds-864e5)}}function Mc(t,e,n){let{instances:s}=t.mutatedEvents;for(let i in s)if(!ws(e.validRange,s[i].range))return!1;return Ic({eventDrag:t},n)}function xb(t,e,n){return ws(e.validRange,t.range)?Ic({dateSelection:t},n):!1}function Ic(t,e){let n=e.getCurrentData(),s=Object.assign({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},t);return(e.pluginHooks.isPropsValid||Pb)(s,e)}function Pb(t,e,n={},s){return!(t.eventDrag&&!zb(t,e,n,s)||t.dateSelection&&!Lb(t,e,n,s))}function zb(t,e,n,s){let i=e.getCurrentData(),r=t.eventDrag,o=r.mutatedEvents,a=o.defs,l=o.instances,c=Kn(a,r.isEvent?t.eventUiBases:{"":i.selectionConfig});s&&(c=ke(c,s));let u=Iv(t.eventStore,r.affectedEvents.instances),d=u.defs,f=u.instances,h=Kn(d,t.eventUiBases);for(let m in l){let p=l[m],g=p.range,v=c[p.defId],w=a[p.defId];if(!Oc(v.constraints,g,u,t.businessHours,e))return!1;let{eventOverlap:E}=e.options,A=typeof E=="function"?E:null;for(let k in f){let R=f[k];if(cr(g,R.range)&&(h[R.defId].overlap===!1&&r.isEvent||v.overlap===!1||A&&!A(new j(e,d[R.defId],R),new j(e,w,p))))return!1}let D=i.eventStore;for(let k of v.allows){let R=Object.assign(Object.assign({},n),{range:p.range,allDay:w.allDay}),C=D.defs[w.defId],N=D.instances[m],Q;if(C?Q=new j(e,C,N):Q=new j(e,w),!k(pr(R,e),Q))return!1}}return!0}function Lb(t,e,n,s){let i=t.eventStore,r=i.defs,o=i.instances,a=t.dateSelection,l=a.range,{selectionConfig:c}=e.getCurrentData();if(s&&(c=s(c)),!Oc(c.constraints,l,i,t.businessHours,e))return!1;let{selectOverlap:u}=e.options,d=typeof u=="function"?u:null;for(let f in o){let h=o[f];if(cr(l,h.range)&&(c.overlap===!1||d&&!d(new j(e,r[h.defId],h),null)))return!1}for(let f of c.allows){let h=Object.assign(Object.assign({},n),a);if(!f(pr(h,e),null))return!1}return!0}function Oc(t,e,n,s,i){for(let r of t)if(!Bb(jb(r,e,n,s,i),e))return!1;return!0}function jb(t,e,n,s,i){return t==="businessHours"?Zs(it(s,e,i)):typeof t=="string"?Zs(Ss(n,r=>r.groupId===t)):typeof t=="object"&&t?Zs(it(t,e,i)):[]}function Zs(t){let{instances:e}=t,n=[];for(let s in e)n.push(e[s].range);return n}function Bb(t,e){for(let n of t)if(ws(n,e))return!0;return!1}const Cn=/^(visible|hidden)$/;class Fb extends _{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Se(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:n,liquidIsAbsolute:s}=e,i=n&&s,r=["fc-scroller"];return n&&(s?r.push("fc-scroller-liquid-absolute"):r.push("fc-scroller-liquid")),y("div",{ref:this.handleEl,className:r.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:i&&-(e.overcomeLeft||0)||"",right:i&&-(e.overcomeRight||0)||"",bottom:i&&-(e.overcomeBottom||0)||"",marginLeft:!i&&-(e.overcomeLeft||0)||"",marginRight:!i&&-(e.overcomeRight||0)||"",marginBottom:!i&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(Cn.test(this.props.overflowX))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:s}=e;for(let i=0;i<s.length;i+=1)if(s[i].getBoundingClientRect().width>n)return!0;return!1}needsYScrolling(){if(Cn.test(this.props.overflowY))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:s}=e;for(let i=0;i<s.length;i+=1)if(s[i].getBoundingClientRect().height>n)return!0;return!1}getXScrollbarWidth(){return Cn.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return Cn.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class Ae{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(n,s)=>{let{depths:i,currentMap:r}=this,o=!1,a=!1;n!==null?(o=s in r,r[s]=n,i[s]=(i[s]||0)+1,a=!0):(i[s]-=1,i[s]||(delete r[s],delete this.callbackMap[s],o=!0)),this.masterCallback&&(o&&this.masterCallback(null,String(s)),a&&this.masterCallback(n,String(s)))}}createRef(e){let n=this.callbackMap[e];return n||(n=this.callbackMap[e]=s=>{this.handleValue(s,String(e))}),n}collect(e,n,s){return Gy(this.currentMap,e,n,s)}getAll(){return ar(this.currentMap)}}function Hb(t){let e=qm(t,".fc-scrollgrid-shrink"),n=0;for(let s of e)n=Math.max(n,ay(s));return Math.ceil(n)}function _c(t,e){return t.liquid&&e.liquid}function $b(t,e){return e.maxHeight!=null||_c(t,e)}function Ub(t,e,n,s){let{expandRows:i}=n;return typeof e.content=="function"?e.content(n):y("table",{role:"presentation",className:[e.tableClassName,t.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,y(s?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(n):e.rowContent))}function Vb(t,e){return Le(t,e,ye)}function Zb(t,e){let n=[];for(let s of t){let i=s.span||1;for(let r=0;r<i;r+=1)n.push(y("col",{style:{width:s.width==="shrink"?Wb(e):s.width||"",minWidth:s.minWidth||""}}))}return y("colgroup",{},...n)}function Wb(t){return t??4}function qb(t){for(let e of t)if(e.width==="shrink")return!0;return!1}function Gb(t,e){let n=["fc-scrollgrid",e.theme.getClass("table")];return t&&n.push("fc-scrollgrid-liquid"),n}function Qb(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 Uo(t){return y("div",{className:"fc-scrollgrid-sticky-shim",style:{width:t.clientWidth,minWidth:t.tableMinWidth}})}function Vo(t){let{stickyHeaderDates:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}function Kb(t){let{stickyFooterScrollbar:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}class Nc extends _{constructor(){super(...arguments),this.processCols=M(e=>e,Vb),this.renderMicroColGroup=M(Zb),this.scrollerRefs=new Ae,this.scrollerElRefs=new Ae(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:s}=this,i=e.sections||[],r=this.processCols(e.cols),o=this.renderMicroColGroup(r,n.shrinkWidth),a=Gb(e.liquid,s);e.collapsibleWidth&&a.push("fc-scrollgrid-collapsible");let l=i.length,c=0,u,d=[],f=[],h=[];for(;c<l&&(u=i[c]).type==="header";)d.push(this.renderSection(u,o,!0)),c+=1;for(;c<l&&(u=i[c]).type==="body";)f.push(this.renderSection(u,o,!1)),c+=1;for(;c<l&&(u=i[c]).type==="footer";)h.push(this.renderSection(u,o,!0)),c+=1;let m=!wc();const p={role:"rowgroup"};return y("table",{role:"grid",className:a.join(" "),style:{height:e.height}},!!(!m&&d.length)&&y("thead",p,...d),!!(!m&&f.length)&&y("tbody",p,...f),!!(!m&&h.length)&&y("tfoot",p,...h),m&&y("tbody",p,...d,...f,...h))}renderSection(e,n,s){return"outerContent"in e?y(q,{key:e.key},e.outerContent):y("tr",{key:e.key,role:"presentation",className:Qb(e,this.props.liquid).join(" ")},this.renderChunkTd(e,n,e.chunk,s))}renderChunkTd(e,n,s,i){if("outerContent"in s)return s.outerContent;let{props:r}=this,{forceYScrollbars:o,scrollerClientWidths:a,scrollerClientHeights:l}=this.state,c=$b(r,e),u=_c(r,e),d=r.liquid?o?"scroll":c?"auto":"hidden":"visible",f=e.key,h=Ub(e,s,{tableColGroupNode:n,tableMinWidth:"",clientWidth:!r.collapsibleWidth&&a[f]!==void 0?a[f]:null,clientHeight:l[f]!==void 0?l[f]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return y(i?"th":"td",{ref:s.elRef,role:"presentation"},y("div",{className:`fc-scroller-harness${u?" fc-scroller-harness-liquid":""}`},y(Fb,{ref:this.scrollerRefs.createRef(f),elRef:this.scrollerElRefs.createRef(f),overflowY:d,overflowX:r.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:u,liquidIsAbsolute:!0},h)))}_handleScrollerEl(e,n){let s=Yb(this.props.sections,n);s&&Se(s.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return qb(this.props.cols)?Hb(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=mb(),{scrollerRefs:n,scrollerElRefs:s}=this,i=!1,r={},o={};for(let a in n.currentMap){let l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(let a of this.props.sections){let l=a.key,c=s.currentMap[l];if(c){let u=c.parentNode;r[l]=Math.floor(u.getBoundingClientRect().width-(i?e.y:0)),o[l]=Math.floor(u.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:r,scrollerClientHeights:o}}}Nc.addStateEquality({scrollerClientWidths:ye,scrollerClientHeights:ye});function Yb(t,e){for(let n of t)if(n.key===e)return n;return null}class Er extends _{constructor(){super(...arguments),this.buildPublicEvent=M((e,n,s)=>new j(e,n,s)),this.handleEl=e=>{this.el=e,Se(this.props.elRef,e),e&&Ho(e,this.props.seg)}}render(){const{props:e,context:n}=this,{options:s}=n,{seg:i}=e,{eventRange:r}=i,{ui:o}=r,a={event:this.buildPublicEvent(n,r.def,r.instance),view:n.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&$v(i,n),isStartResizable:!e.disableResizing&&Uv(i,n),isEndResizable:!e.disableResizing&&Vv(i),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return y(ae,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...Zv(a),...i.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:a,generatorName:"eventContent",customGenerator:s.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:s.eventClassNames,didMount:s.eventDidMount,willUnmount:s.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Ho(this.el,this.props.seg)}}class Ar extends _{render(){let{props:e,context:n}=this,{options:s}=n,{seg:i}=e,{ui:r}=i.eventRange,o=s.eventTimeFormat||e.defaultTimeFormat,a=gc(i,o,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return y(Er,Object.assign({},e,{elTag:"a",elStyle:{borderColor:r.borderColor,backgroundColor:r.backgroundColor},elAttrs:yc(i,n),defaultGenerator:Jb,timeText:a}),(l,c)=>y(q,null,y(l,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:c.textColor}}),!!c.isStartResizable&&y("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!c.isEndResizable&&y("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}Ar.addPropsEquality({seg:ye});function Jb(t){return y("div",{className:"fc-event-main-frame"},t.timeText&&y("div",{className:"fc-event-time"},t.timeText),y("div",{className:"fc-event-title-container"},y("div",{className:"fc-event-title fc-sticky"},t.event.title||y(q,null," "))))}const Cr=t=>y(Re.Consumer,null,e=>{let{options:n}=e,s={isAxis:t.isAxis,date:e.dateEnv.toDate(t.date),view:e.viewApi};return y(ae,{elRef:t.elRef,elTag:t.elTag||"div",elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:s,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},t.children)}),Xb=$({day:"numeric"});class Dr extends _{constructor(){super(...arguments),this.refineRenderProps=On(e0)}render(){let{props:e,context:n}=this,{options:s}=n,i=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:s.monthStartFormat});return y(ae,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),i.isDisabled?{}:{"data-date":sr(e.date)}),elClasses:[...yr(i,n.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:i,generatorName:"dayCellContent",customGenerator:s.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:i.isDisabled?void 0:s.dayCellClassNames,didMount:s.dayCellDidMount,willUnmount:s.dayCellWillUnmount},e.children)}}function kr(t){return!!(t.dayCellContent||gi("dayCellContent",t))}function e0(t){let{date:e,dateEnv:n,dateProfile:s,isMonthStart:i}=t,r=Ec(e,t.todayRange,null,s),o=t.showDayNumber?n.format(e,i?t.monthStartFormat:Xb):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(e),view:t.viewApi},r),{isMonthStart:i,dayNumberText:o}),t.extraRenderProps)}class xc extends _{render(){let{props:e}=this,{seg:n}=e;return y(Er,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:n.eventRange.ui.backgroundColor},defaultGenerator:t0,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 t0(t){let{title:e}=t.event;return e&&y("div",{className:"fc-event-title"},t.event.title)}function Pc(t){return y("div",{className:`fc-${t}`})}const zc=t=>y(Re.Consumer,null,e=>{let{dateEnv:n,options:s}=e,{date:i}=t,r=s.weekNumberFormat||t.defaultFormat,o=n.computeWeekNumber(i),a=n.format(i,r),l={num:o,text:a,date:i};return y(ae,{elRef:t.elRef,elTag:t.elTag,elAttrs:t.elAttrs,elClasses:t.elClasses,elStyle:t.elStyle,renderProps:l,generatorName:"weekNumberContent",customGenerator:s.weekNumberContent,defaultGenerator:n0,classNameGenerator:s.weekNumberClassNames,didMount:s.weekNumberDidMount,willUnmount:s.weekNumberWillUnmount},t.children)});function n0(t){return t.text}const Ws=10;class s0 extends _{constructor(){super(...arguments),this.state={titleId:vs()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Se(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const n=Ul(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:s,state:i}=this,r=["fc-popover",e.getClass("popover")].concat(s.extraClassNames||[]);return fu(y("div",Object.assign({},s.extraAttrs,{id:s.id,className:r.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),y("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},y("span",{className:"fc-popover-title",id:i.titleId},s.title),y("span",{className:"fc-popover-close "+e.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),y("div",{className:"fc-popover-body "+e.getClass("popoverContent")},s.children)),s.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:s}=this.props,{rootEl:i}=this,r=wb(n);if(r){let o=i.getBoundingClientRect(),a=s?J(n,".fc-scrollgrid").getBoundingClientRect().top:r.top,l=e?r.right-o.width:r.left;a=Math.max(a,Ws),l=Math.min(l,document.documentElement.clientWidth-Ws-o.width),l=Math.max(l,Ws);let c=i.offsetParent.getBoundingClientRect();Gt(i,{top:a-c.top,left:l-c.left})}}}class i0 extends Te{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:s}=this,{startDate:i,todayRange:r,dateProfile:o}=s,a=n.format(i,e.dayPopoverFormat);return y(Dr,{elRef:this.handleRootEl,date:i,dateProfile:o,todayRange:r},(l,c,u)=>y(s0,{elRef:u.ref,id:s.id,title:a,extraClassNames:["fc-more-popover"].concat(u.className||[]),extraAttrs:u,parentEl:s.parentEl,alignmentEl:s.alignmentEl,alignGridTop:s.alignGridTop,onClose:s.onClose},kr(e)&&y(l,{elTag:"div",elClasses:["fc-more-popover-misc"]}),s.children))}queryHit(e,n,s,i){let{rootEl:r,props:o}=this;return e>=0&&e<s&&n>=0&&n<i?{dateProfile:o.dateProfile,dateSpan:Object.assign({allDay:!o.forceTimed,range:{start:o.startDate,end:o.endDate}},o.extraDateSpan),dayEl:r,rect:{left:0,top:0,right:s,bottom:i},layer:1}:null}}class Lc extends _{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:vs()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Se(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:s}=this,{moreLinkClick:i}=s.options,r=Zo(n).start;function o(a){let{def:l,instance:c,range:u}=a.eventRange;return{event:new j(s,l,c),start:s.dateEnv.toDate(u.start),end:s.dateEnv.toDate(u.end),isStart:a.isStart,isEnd:a.isEnd}}typeof i=="function"&&(i=i({date:r,allDay:!!n.allDayDate,allSegs:n.allSegs.map(o),hiddenSegs:n.hiddenSegs.map(o),jsEvent:e,view:s.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&s.calendarApi.zoomTo(r,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return y(Re.Consumer,null,s=>{let{viewApi:i,options:r,calendarApi:o}=s,{moreLinkText:a}=r,{moreCnt:l}=e,c=Zo(e),u=typeof a=="function"?a.call(o,l):`+${l} ${a}`,d=Qt(r.moreLinkHint,[l],u),f={num:l,shortText:`+${l}`,text:u,view:i};return y(q,null,!!e.moreCnt&&y(ae,{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),Zl(this.handleClick)),{title:d,"aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?n.popoverId:""}),renderProps:f,generatorName:"moreLinkContent",customGenerator:r.moreLinkContent,defaultGenerator:e.defaultGenerator||r0,classNameGenerator:r.moreLinkClassNames,didMount:r.moreLinkDidMount,willUnmount:r.moreLinkWillUnmount},e.children),n.isPopoverOpen&&y(i0,{id:n.popoverId,startDate:c.start,endDate:c.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=J(this.linkEl,".fc-view-harness"))}}function r0(t){return t.text}function Zo(t){if(t.allDayDate)return{start:t.allDayDate,end:Y(t.allDayDate,1)};let{hiddenSegs:e}=t;return{start:jc(e),end:a0(e)}}function jc(t){return t.reduce(o0).eventRange.range.start}function o0(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function a0(t){return t.reduce(l0).eventRange.range.end}function l0(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class c0{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 u0 extends c0{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:n}=this;let s=!1;e.isActive?(n.set(e.id,e),s=!0):n.has(e.id)&&(n.delete(e.id),s=!0),s&&this.set(n)}}const d0=[],Bc={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"},Fc=Object.assign(Object.assign({},Bc),{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 f0(t){let e=t.length>0?t[0].code:"en",n=d0.concat(t),s={en:Fc};for(let i of n)s[i.code]=i;return{map:s,defaultCode:e}}function Hc(t,e){return typeof t=="object"&&!Array.isArray(t)?$c(t.code,[t.code],t):h0(t,e)}function h0(t,e){let n=[].concat(t||[]),s=p0(n,e)||Fc;return $c(t,n,s)}function p0(t,e){for(let n=0;n<t.length;n+=1){let s=t[n].toLocaleLowerCase().split("-");for(let i=s.length;i>0;i-=1){let r=s.slice(0,i).join("-");if(e[r])return e[r]}}return null}function $c(t,e,n){let s=or([Bc,n],["buttonText"]);delete s.code;let{week:i}=s;return delete s.week,{codeArg:t,codes:e,week:i,simpleNumberFormat:new Intl.NumberFormat(t),options:s}}function $e(t){return{id:ct(),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 g0(t,e){let n={},s={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 i(r){for(let o of r){const a=o.name,l=n[a];l===void 0?(n[a]=o.id,i(o.deps),s=y0(s,o)):l!==o.id&&console.warn(`Duplicate plugin '${a}'`)}}return t&&i(t),i(e),s}function m0(){let t=[],e=[],n;return(s,i)=>((!n||!Le(s,t)||!Le(i,e))&&(n=g0(s,i)),t=s,e=i,n)}function y0(t,e){return{premiumReleaseDate:v0(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 v0(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}class Ue extends ln{}Ue.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};Ue.prototype.baseIconClass="fc-icon";Ue.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"};Ue.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};Ue.prototype.iconOverrideOption="buttonIcons";Ue.prototype.iconOverrideCustomButtonOption="icon";Ue.prototype.iconOverridePrefix="fc-icon-";function b0(t,e){let n={},s;for(s in t)Si(s,n,t,e);for(s in e)Si(s,n,t,e);return n}function Si(t,e,n,s){if(e[t])return e[t];let i=w0(t,e,n,s);return i&&(e[t]=i),i}function w0(t,e,n,s){let i=n[t],r=s[t],o=u=>i&&i[u]!==null?i[u]:r&&r[u]!==null?r[u]:null,a=o("component"),l=o("superType"),c=null;if(l){if(l===t)throw new Error("Can't have a custom view type that references itself");c=Si(l,e,n,s)}return!a&&c&&(a=c.component),a?{type:t,component:a,defaults:Object.assign(Object.assign({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),r?r.rawOptions:{})}:null}function Wo(t){return ke(t,S0)}function S0(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=qo(e):n&&!(n.prototype instanceof _)&&(n=qo(Object.assign(Object.assign({},e),{content:n}))),{superType:e.type,component:n,rawOptions:e}}function qo(t){return e=>y(Re.Consumer,null,n=>y(ae,{elTag:"div",elClasses:ec(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 E0(t,e,n,s){let i=Wo(t),r=Wo(e.views),o=b0(i,r);return ke(o,a=>A0(a,r,e,n,s))}function A0(t,e,n,s,i){let r=t.overrides.duration||t.defaults.duration||s.duration||n.duration,o=null,a="",l="",c={};if(r&&(o=C0(r),o)){let f=pi(o);a=f.unit,f.value===1&&(l=a,c=e[a]?e[a].rawOptions:{})}let u=f=>{let h=f.buttonText||{},m=t.defaults.buttonTextKey;return m!=null&&h[m]!=null?h[m]:h[t.type]!=null?h[t.type]:h[l]!=null?h[l]:null},d=f=>{let h=f.buttonHints||{},m=t.defaults.buttonTextKey;return m!=null&&h[m]!=null?h[m]:h[t.type]!=null?h[t.type]:h[l]!=null?h[l]:null};return{type:t.type,component:t.component,duration:o,durationUnit:a,singleUnit:l,optionDefaults:t.defaults,optionOverrides:Object.assign(Object.assign({},c),t.overrides),buttonTextOverride:u(s)||u(n)||t.overrides.buttonText,buttonTextDefault:u(i)||t.defaults.buttonText||u(Kt)||t.type,buttonTitleOverride:d(s)||d(n)||t.overrides.buttonHint,buttonTitleDefault:d(i)||t.defaults.buttonHint||d(Kt)}}let Go={};function C0(t){let e=JSON.stringify(t),n=Go[e];return n===void 0&&(n=O(t),Go[e]=n),n}function D0(t,e){return e.type==="CHANGE_VIEW_TYPE"&&(t=e.viewType),t}function k0(t,e){return e.type==="CHANGE_DATE"?e.dateMarker:t}function R0(t,e,n){let s=t.initialDate;return s!=null?e.createMarker(s):n.getDateMarker()}function T0(t,e){return e.type==="SET_OPTION"?Object.assign(Object.assign({},t),{[e.optionName]:e.rawOptionValue}):t}function M0(t,e,n,s){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return s.build(e.dateMarker||n);case"CHANGE_DATE":return s.build(e.dateMarker);case"PREV":if(i=s.buildPrev(t,n),i.isValid)return i;break;case"NEXT":if(i=s.buildNext(t,n),i.isValid)return i;break}return t}function I0(t,e,n){let s=e?e.activeRange:null;return Vc({},L0(t,n),s,n)}function O0(t,e,n,s){let i=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return Vc(t,e.sources,i,s);case"REMOVE_EVENT_SOURCE":return N0(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Zc(t,i,s):t;case"FETCH_EVENT_SOURCES":return Rr(t,e.sourceIds?Ql(e.sourceIds):Wc(t,s),i,e.isRefetch||!1,s);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return z0(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function _0(t,e,n){let s=e?e.activeRange:null;return Rr(t,Wc(t,n),s,!0,n)}function Uc(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function Vc(t,e,n,s){let i={};for(let r of e)i[r.sourceId]=r;return n&&(i=Zc(i,n,s)),Object.assign(Object.assign({},t),i)}function N0(t,e){return nt(t,n=>n.sourceId!==e)}function Zc(t,e,n){return Rr(t,nt(t,s=>x0(s,e,n)),e,!1,n)}function x0(t,e,n){return qc(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function Rr(t,e,n,s,i){let r={};for(let o in t){let a=t[o];e[o]?r[o]=P0(a,n,s,i):r[o]=a}return r}function P0(t,e,n,s){let{options:i,calendarApi:r}=s,o=s.pluginHooks.eventSourceDefs[t.sourceDefId],a=ct();return o.fetch({eventSource:t,range:e,isRefetch:n,context:s},l=>{let{rawEvents:c}=l;i.eventSourceSuccess&&(c=i.eventSourceSuccess.call(r,c,l.response)||c),t.success&&(c=t.success.call(r,c,l.response)||c),s.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:a,fetchRange:e,rawEvents:c})},l=>{let c=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(r,l),c=!0),t.failure&&(t.failure(l),c=!0),c||console.warn(l.message,l),s.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:a,fetchRange:e,error:l})}),Object.assign(Object.assign({},t),{isFetching:!0,latestFetchId:a})}function z0(t,e,n,s){let i=t[e];return i&&n===i.latestFetchId?Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:s})}):t}function Wc(t,e){return nt(t,n=>qc(n,e))}function L0(t,e){let n=lc(e),s=[].concat(t.eventSources||[]),i=[];t.initialEvents&&s.unshift(t.initialEvents),t.events&&s.unshift(t.events);for(let r of s){let o=ac(r,e,n);o&&i.push(o)}return i}function qc(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}function j0(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function B0(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function F0(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 H0(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 $0(t,e,n,s,i){let r=t.headerToolbar?Qo(t.headerToolbar,t,e,n,s,i):null,o=t.footerToolbar?Qo(t.footerToolbar,t,e,n,s,i):null;return{header:r,footer:o}}function Qo(t,e,n,s,i,r){let o={},a=[],l=!1;for(let c in t){let u=t[c],d=U0(u,e,n,s,i,r);o[c]=d.widgets,a.push(...d.viewsWithButtons),l=l||d.hasTitle}return{sectionWidgets:o,viewsWithButtons:a,hasTitle:l}}function U0(t,e,n,s,i,r){let o=e.direction==="rtl",a=e.customButtons||{},l=n.buttonText||{},c=e.buttonText||{},u=n.buttonHints||{},d=e.buttonHints||{},f=t?t.split(" "):[],h=[],m=!1;return{widgets:f.map(g=>g.split(",").map(v=>{if(v==="title")return m=!0,{buttonName:v};let w,E,A,D,k,R;if(w=a[v])A=C=>{w.click&&w.click.call(C.target,C,C.target)},(D=s.getCustomButtonIconClass(w))||(D=s.getIconClass(v,o))||(k=w.text),R=w.hint||w.text;else if(E=i[v]){h.push(v),A=()=>{r.changeView(v)},(k=E.buttonTextOverride)||(D=s.getIconClass(v,o))||(k=E.buttonTextDefault);let C=E.buttonTextOverride||E.buttonTextDefault;R=Qt(E.buttonTitleOverride||E.buttonTitleDefault||e.viewHint,[C,v],C)}else if(r[v])if(A=()=>{r[v]()},(k=l[v])||(D=s.getIconClass(v,o))||(k=c[v]),v==="prevYear"||v==="nextYear"){let C=v==="prevYear"?"prev":"next";R=Qt(u[C]||d[C],[c.year||"year","year"],c[v])}else R=C=>Qt(u[v]||d[v],[c[C]||C,C],c[v]);return{buttonName:v,buttonClick:A,buttonIcon:D,buttonText:k,buttonHint:R}})),viewsWithButtons:h,hasTitle:m}}class V0{constructor(e,n,s){this.type=e,this.getCurrentData=n,this.dateEnv=s}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]}}let Z0={ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}};const W0=$e({name:"array-event-source",eventSourceDefs:[Z0]});let q0={parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:s}=t.context,i=t.eventSource.meta;Xv(i.bind(null,vc(t.range,s)),r=>e({rawEvents:r}),n)}};const G0=$e({name:"func-event-source",eventSourceDefs:[q0]}),Q0={method:String,extraParams:b,startParam:String,endParam:String,timeZoneParam:String};let K0={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:s}=t.eventSource,i=J0(s,t.range,t.context);eb(s.method,s.url,i).then(([r,o])=>{e({rawEvents:r,response:o})},n)}};const Y0=$e({name:"json-event-source",eventSourceRefiners:Q0,eventSourceDefs:[K0]});function J0(t,e,n){let{dateEnv:s,options:i}=n,r,o,a,l,c={};return r=t.startParam,r==null&&(r=i.startParam),o=t.endParam,o==null&&(o=i.endParam),a=t.timeZoneParam,a==null&&(a=i.timeZoneParam),typeof t.extraParams=="function"?l=t.extraParams():l=t.extraParams||{},Object.assign(c,l),c[r]=s.formatIso(e.start),c[o]=s.formatIso(e.end),s.timeZone!=="local"&&(c[a]=s.timeZone),c}const X0={daysOfWeek:b,startTime:O,endTime:O,duration:O,startRecur:b,endRecur:b};let ew={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},s;return t.duration&&(s=t.duration),!s&&t.startTime&&t.endTime&&(s=dy(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:s,typeData:n}}return null},expand(t,e,n){let s=st(e,{start:t.startRecur,end:t.endRecur});return s?nw(t.daysOfWeek,t.startTime,t.dateEnv,n,s):[]}};const tw=$e({name:"simple-recurring-event",recurringTypes:[ew],eventRefiners:X0});function nw(t,e,n,s,i){let r=t?Ql(t):null,o=L(i.start),a=i.end,l=[];for(e&&(e.milliseconds<0?a=Y(a,1):e.milliseconds>=1e3*60*60*24&&(o=Y(o,-1)));o<a;){let c;(!r||r[o.getUTCDay()])&&(e?c=s.add(o,e):c=o,l.push(s.createMarker(n.toDate(c)))),o=Y(o,1)}return l}const sw=$e({name:"change-handler",optionChangeHandlers:{events(t,e){Ko([t],e)},eventSources:Ko}});function Ko(t,e){let n=ar(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 s=[];for(let i of t){let r=!1;for(let o=0;o<n.length;o+=1)if(n[o]._raw===i){n.splice(o,1),r=!0;break}r||s.push(i)}for(let i of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of s)e.calendarApi.addEventSource(i)}function iw(t,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},vc(t.activeRange,e.dateEnv)),{view:e.viewApi}))}function rw(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Je(t,e))}const ow=[W0,G0,Y0,tw,sw,$e({name:"misc",isLoadingFuncs:[t=>Uc(t.eventSources)],propSetHandlers:{dateProfile:iw,eventStore:rw}})];class aw{constructor(e,n){this.runTaskOption=e,this.drainedOption=n,this.queue=[],this.delayedRunner=new Ji(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=[],s;for(;s=e.shift();)this.runTask(s),n.push(s);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function lw(t,e,n){let s;return/^(year|month)$/.test(t.currentRangeUnit)?s=t.currentRange:s=t.activeRange,n.formatRange(s.start,s.end,$(e.titleFormat||cw(t)),{isEndExclusive:t.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function cw(t){let{currentRangeUnit:e}=t;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let n=Un(t.currentRange.start,t.currentRange.end);return n!==null&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class Yo{constructor(){this.resetListeners=new Set}handleInput(e,n){const s=this.dateEnv;if(e!==s&&(typeof n=="function"?this.nowFn=n:s||(this.nowAnchorDate=e.toDate(n?e.createMarker(n):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,s))for(const i of this.resetListeners.values())i()}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 uw{constructor(e){this.computeCurrentViewData=M(this._computeCurrentViewData),this.organizeRawLocales=M(f0),this.buildLocale=M(Hc),this.buildPluginHooks=m0(),this.buildDateEnv=M(dw),this.buildTheme=M(fw),this.parseToolbars=M($0),this.buildViewSpecs=M(E0),this.buildDateProfileGenerator=On(hw),this.buildViewApi=M(pw),this.buildViewUiProps=On(yw),this.buildEventUiBySource=M(gw,ye),this.buildEventUiBases=M(mw),this.parseContextBusinessHours=On(vw),this.buildTitle=M(lw),this.nowManager=new Yo,this.emitter=new Es,this.actionRunner=new aw(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=f=>{this.actionRunner.request(f)},this.props=e,this.actionRunner.pause(),this.nowManager=new Yo;let n={},s=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=s.calendarOptions.initialView||s.pluginHooks.initialView,r=this.computeCurrentViewData(i,s,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(r.options);let o={nowManager:this.nowManager,dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},a=R0(s.calendarOptions,s.dateEnv,this.nowManager),l=r.dateProfileGenerator.build(a);De(l.activeRange,a)||(a=l.currentRange.start);for(let f of s.pluginHooks.contextInit)f(o);let c=I0(s.calendarOptions,l,o),u={dynamicOptionOverrides:n,currentViewType:i,currentDate:a,dateProfile:l,businessHours:this.parseContextBusinessHours(o),eventSources:c,eventUiBases:{},eventStore:oe(),renderableEventStore:oe(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(o).selectionConfig},d=Object.assign(Object.assign({},o),u);for(let f of s.pluginHooks.reducers)Object.assign(u,f(null,null,d));qs(u,o)&&this.emitter.trigger("loading",!0),this.state=u,this.updateData(),this.actionRunner.resume()}resetOptions(e,n){let{props:s}=this;n===void 0?s.optionOverrides=e:(s.optionOverrides=Object.assign(Object.assign({},s.optionOverrides||{}),e),this.optionsForRefining.push(...n)),(n===void 0||n.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:n,state:s,emitter:i}=this,r=T0(s.dynamicOptionOverrides,e),o=this.computeOptionsData(n.optionOverrides,r,n.calendarApi),a=D0(s.currentViewType,e),l=this.computeCurrentViewData(a,o,n.optionOverrides,r);n.calendarApi.currentDataManager=this,i.setThisContext(n.calendarApi),i.setOptions(l.options);let c={nowManager:this.nowManager,dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:u,dateProfile:d}=s;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(u)),u=k0(u,e),d=M0(d,e,u,l.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!De(d.currentRange,u))&&(u=d.currentRange.start);let f=O0(s.eventSources,e,d,c),h=kv(s.eventStore,e,f,d,c),p=Uc(f)&&!l.options.progressiveEventRendering&&s.renderableEventStore||h,{eventUiSingleBase:g,selectionConfig:v}=this.buildViewUiProps(c),w=this.buildEventUiBySource(f),E=this.buildEventUiBases(p.defs,g,w),A={dynamicOptionOverrides:r,currentViewType:a,currentDate:u,dateProfile:d,eventSources:f,eventStore:h,renderableEventStore:p,selectionConfig:v,eventUiBases:E,businessHours:this.parseContextBusinessHours(c),dateSelection:j0(s.dateSelection,e),eventSelection:B0(s.eventSelection,e),eventDrag:F0(s.eventDrag,e),eventResize:H0(s.eventResize,e)},D=Object.assign(Object.assign({},c),A);for(let C of o.pluginHooks.reducers)Object.assign(A,C(s,e,D));let k=qs(s,c),R=qs(A,c);!k&&R?i.trigger("loading",!0):k&&!R&&i.trigger("loading",!1),this.state=A,n.onAction&&n.onAction(e)}updateData(){let{props:e,state:n}=this,s=this.data,i=this.computeOptionsData(e.optionOverrides,n.dynamicOptionOverrides,e.calendarApi),r=this.computeCurrentViewData(n.currentViewType,i,e.optionOverrides,n.dynamicOptionOverrides),o=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(n.dateProfile,r.options,i.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),r),n),a=i.pluginHooks.optionChangeHandlers,l=s&&s.calendarOptions,c=i.calendarOptions;if(l&&l!==c){l.timeZone!==c.timeZone&&(n.eventSources=o.eventSources=_0(o.eventSources,n.dateProfile,o),n.eventStore=o.eventStore=jo(o.eventStore,s.dateEnv,o.dateEnv),n.renderableEventStore=o.renderableEventStore=jo(o.renderableEventStore,s.dateEnv,o.dateEnv));for(let u in a)(this.optionsForHandling.indexOf(u)!==-1||l[u]!==c[u])&&a[u](c[u],o)}this.optionsForHandling=[],e.onData&&e.onData(o)}computeOptionsData(e,n,s){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:r,localeDefaults:o,availableLocaleData:a,extra:l}=this.processRawCalendarOptions(e,n);Jo(l);let c=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,r,a,i.defaultRangeSeparator),u=this.buildViewSpecs(r.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,o),d=this.buildTheme(i,r),f=this.parseToolbars(i,this.stableOptionOverrides,d,u,s);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:r,dateEnv:c,viewSpecs:u,theme:d,toolbarConfig:f,localeDefaults:o,availableRawLocales:a.map}}processRawCalendarOptions(e,n){let{locales:s,locale:i}=js([Kt,e,n]),r=this.organizeRawLocales(s),o=r.map,a=this.buildLocale(i||r.defaultCode,o).options,l=this.buildPluginHooks(e.plugins||[],ow),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Oo),_o),No),l.listenerRefiners),l.optionRefiners),u={},d=js([Kt,a,e,n]),f={},h=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,p=!1;for(let g in d)this.optionsForRefining.indexOf(g)===-1&&(d[g]===h[g]||Ze[g]&&g in h&&Ze[g](h[g],d[g]))?f[g]=m[g]:c[g]?(f[g]=c[g](d[g]),p=!0):u[g]=h[g];return p&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=f,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:l,availableLocaleData:r,localeDefaults:a,extra:u}}_computeCurrentViewData(e,n,s,i){let r=n.viewSpecs[e];if(!r)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:o,extra:a}=this.processRawViewOptions(r,n.pluginHooks,n.localeDefaults,s,i);Jo(a),this.nowManager.handleInput(n.dateEnv,o.now);let l=this.buildDateProfileGenerator({dateProfileGeneratorClass:r.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:r.duration,durationUnit:r.durationUnit,usesMinMaxTime:r.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:o.slotMinTime,slotMaxTime:o.slotMaxTime,showNonCurrentDates:o.showNonCurrentDates,dayCount:o.dayCount,dateAlignment:o.dateAlignment,dateIncrement:o.dateIncrement,hiddenDays:o.hiddenDays,weekends:o.weekends,validRangeInput:o.validRange,visibleRangeInput:o.visibleRange,fixedWeekCount:o.fixedWeekCount}),c=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:r,options:o,dateProfileGenerator:l,viewApi:c}}processRawViewOptions(e,n,s,i,r){let o=js([Kt,e.optionDefaults,s,i,e.optionOverrides,r]),a=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Oo),_o),No),Uy),n.listenerRefiners),n.optionRefiners),l={},c=this.currentViewOptionsInput,u=this.currentViewOptionsRefined,d=!1,f={};for(let h in o)o[h]===c[h]||Ze[h]&&Ze[h](o[h],c[h])?l[h]=u[h]:(o[h]===this.currentCalendarOptionsInput[h]||Ze[h]&&Ze[h](o[h],this.currentCalendarOptionsInput[h])?h in this.currentCalendarOptionsRefined&&(l[h]=this.currentCalendarOptionsRefined[h]):a[h]?l[h]=a[h](o[h]):f[h]=o[h],d=!0);return d&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:f}}}function dw(t,e,n,s,i,r,o,a){let l=Hc(e||o.defaultCode,o.map);return new ev({calendarSystem:"gregory",timeZone:t,namedTimeZoneImpl:r.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:s,weekText:i,cmdFormatter:r.cmdFormatter,defaultSeparator:a})}function fw(t,e){let n=e.themeClasses[t.themeSystem]||Ue;return new n(t)}function hw(t){let e=t.dateProfileGeneratorClass||hv;return new e(t)}function pw(t,e,n){return new V0(t,e,n)}function gw(t){return ke(t,e=>e.ui)}function mw(t,e,n){let s={"":e};for(let i in t){let r=t[i];r.sourceId&&n[r.sourceId]&&(s[i]=n[r.sourceId])}return s}function yw(t){let{options:e}=t;return{eventUiSingleBase:Qn({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:Qn({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function qs(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function vw(t){return Pv(t.options.businessHours,t)}function Jo(t,e){for(let n in t)console.warn(`Unknown option '${n}'`)}class bw extends _{render(){let e=this.props.widgetGroups.map(n=>this.renderWidgetGroup(n));return y("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:n}=this,{theme:s}=this.context,i=[],r=!0;for(let o of e){let{buttonName:a,buttonClick:l,buttonText:c,buttonIcon:u,buttonHint:d}=o;if(a==="title")r=!1,i.push(y("h2",{className:"fc-toolbar-title",id:n.titleId},n.title));else{let f=a===n.activeButton,h=!n.isTodayEnabled&&a==="today"||!n.isPrevEnabled&&a==="prev"||!n.isNextEnabled&&a==="next",m=[`fc-${a}-button`,s.getClass("button")];f&&m.push(s.getClass("buttonActive")),i.push(y("button",{type:"button",title:typeof d=="function"?d(n.navUnit):d,disabled:h,"aria-pressed":f,className:m.join(" "),onClick:l},c||(u?y("span",{className:u,role:"img"}):"")))}}if(i.length>1){let o=r&&s.getClass("buttonGroup")||"";return y("div",{className:o},...i)}return i[0]}}class Xo extends _{render(){let{model:e,extraClassName:n}=this.props,s=!1,i,r,o=e.sectionWidgets,a=o.center;return o.left?(s=!0,i=o.left):i=o.start,o.right?(s=!0,r=o.right):r=o.end,y("div",{className:[n||"","fc-toolbar",s?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",a||[]),this.renderSection("end",r||[]))}renderSection(e,n){let{props:s}=this;return y(bw,{key:e,widgetGroups:n,title:s.title,navUnit:s.navUnit,activeButton:s.activeButton,isTodayEnabled:s.isTodayEnabled,isPrevEnabled:s.isPrevEnabled,isNextEnabled:s.isNextEnabled,titleId:s.titleId})}}class ww extends _{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Se(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:n}=this,{aspectRatio:s}=e,i=["fc-view-harness",s||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],r="",o="";return s?n.availableWidth!==null?r=n.availableWidth/s:o=`${1/s*100}%`:r=e.height||"",y("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:r,paddingBottom:o}},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 Sw extends Ht{constructor(e){super(e),this.handleSegClick=(n,s)=>{let{component:i}=this,{context:r}=i,o=Ot(s);if(o&&i.isValidSegDownEl(n.target)){let a=J(n.target,".fc-event-forced-url"),l=a?a.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:s,event:new j(i.context,o.eventRange.def,o.eventRange.instance),jsEvent:n,view:r.viewApi}),l&&!n.defaultPrevented&&(window.location.href=l)}},this.destroy=Vl(e.el,"click",".fc-event",this.handleSegClick)}}class Ew extends Ht{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,s)=>{Ot(s)&&(this.currentSegEl=s,this.triggerEvent("eventMouseEnter",n,s))},this.handleSegLeave=(n,s)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,s))},this.removeHoverListeners=Km(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,s){let{component:i}=this,{context:r}=i,o=Ot(s);(!n||i.isValidSegDownEl(n.target))&&r.emitter.trigger(e,{el:s,event:new j(r,o.eventRange.def,o.eventRange.instance),jsEvent:n,view:r.viewApi})}}class Aw extends ut{constructor(){super(...arguments),this.buildViewContext=M(sv),this.buildViewPropTransformers=M(Dw),this.buildToolbarProps=M(Cw),this.headerRef=ue(),this.footerRef=ue(),this.interactionsStore={},this.state={viewLabelId:vs()},this.registerInteractiveComponent=(e,n)=>{let s=sb(e,n),o=[Sw,Ew].concat(this.props.pluginHooks.componentInteractions).map(a=>new a(s));this.interactionsStore[e.uid]=o,vi[e.uid]=s},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let s of n)s.destroy();delete this.interactionsStore[e.uid]}delete vi[e.uid]},this.resizeRunner=new Ji(()=>{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:s}=e,i=!1,r="",o;e.isHeightAuto||e.forPrint?r="":s.height!=null?i=!0:s.contentHeight!=null?r=s.contentHeight:o=Math.max(s.aspectRatio,.5);let a=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),l=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return y(Re.Provider,{value:a},y($t,{unit:"day"},c=>{let u=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,c,e.viewTitle);return y(q,null,n.header&&y(Xo,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:l},u)),y(ww,{liquid:i,height:r,aspectRatio:o,labeledById:l},this.renderView(e),this.buildAppendContent()),n.footer&&y(Xo,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},u)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(s=>new s(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:n}=e.pluginHooks;for(let s in n)n[s](e[s],e)}componentDidUpdate(e){let{props:n}=this,{propSetHandlers:s}=n.pluginHooks;for(let i in s)n[i]!==e[i]&&s[i](n[i],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(s=>s(e));return y(q,{},...n)}renderView(e){let{pluginHooks:n}=e,{viewSpec:s}=e,i={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},r=this.buildViewPropTransformers(n.viewPropsTransformers);for(let a of r)Object.assign(i,a.transform(i,e));let o=s.component;return y(o,Object.assign({},i))}}function Cw(t,e,n,s,i,r){let o=n.build(i,void 0,!1),a=n.buildPrev(e,s,!1),l=n.buildNext(e,s,!1);return{title:r,activeButton:t.type,navUnit:t.singleUnit,isTodayEnabled:o.isValid&&!De(e.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function Dw(t){return t.map(e=>new e)}class kw extends rb{constructor(e,n={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=s=>{switch(s.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=s=>{this.currentData=s,this.renderRunner.request(s.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:s}=this;qn(()=>{Qs(y(nb,{options:s.calendarOptions,theme:s.theme,emitter:s.emitter},(i,r,o,a)=>(this.setClassNames(i),this.setHeight(r),y(Xl.Provider,{value:this.customContentRenderId},y(Aw,Object.assign({isHeightAuto:o,forPrint:a},s))))),this.el)})}else this.isRendered&&(this.isRendered=!1,Qs(null,this.el),this.setClassNames([]),this.setHeight(""))},Hm(e),this.el=e,this.renderRunner=new Ji(this.handleRenderRequest),new uw({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(){qn(()=>{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(!Le(e,this.currentClassNames)){let{classList:n}=this.el;for(let s of this.currentClassNames)n.remove(s);for(let s of e)n.add(s);this.currentClassNames=e}}setHeight(e){$l(this.el,"height",e)}}Sr.touchMouseIgnoreWait=500;let Ei=0,Jn=0,Ai=!1;class Gc{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()&&Rw(n)&&this.tryStart(n)){let s=this.createEventFromMouse(n,!0);this.emitter.trigger("pointerdown",s),this.initScrollWatch(s),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=n=>{let s=this.createEventFromMouse(n);this.recordCoords(s),this.emitter.trigger("pointermove",s)},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 s=this.createEventFromTouch(n,!0);this.emitter.trigger("pointerdown",s),this.initScrollWatch(s);let i=n.target;this.shouldIgnoreMove||i.addEventListener("touchmove",this.handleTouchMove),i.addEventListener("touchend",this.handleTouchEnd),i.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=n=>{let s=this.createEventFromTouch(n);this.recordCoords(s),this.emitter.trigger("pointermove",s)},this.handleTouchEnd=n=>{if(this.isDragging){let s=n.target;s.removeEventListener("touchmove",this.handleTouchMove),s.removeEventListener("touchend",this.handleTouchEnd),s.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(n)),this.cleanup(),this.isTouchDragging=!1,Tw()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let s=window.scrollX-this.prevScrollX+this.prevPageX,i=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:s,pageY:i,deltaX:s-this.origPageX,deltaY:i-this.origPageY})}},this.containerEl=e,this.emitter=new Es,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),Mw()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),Iw()}tryStart(e){let n=this.querySubjectEl(e),s=e.target;return n&&(!this.handleSelector||J(s,this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){Ai=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?J(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return Ei||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Ai=!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 s=0,i=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(s=e.pageX-this.origPageX,i=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:s,deltaY:i}}createEventFromTouch(e,n){let s=e.touches,i,r,o=0,a=0;return s&&s.length?(i=s[0].pageX,r=s[0].pageY):(i=e.pageX,r=e.pageY),n?(this.origPageX=i,this.origPageY=r):(o=i-this.origPageX,a=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:r,deltaX:o,deltaY:a}}}function Rw(t){return t.button===0&&!t.ctrlKey}function Tw(){Ei+=1,setTimeout(()=>{Ei-=1},Sr.touchMouseIgnoreWait)}function Mw(){Jn+=1,Jn===1&&window.addEventListener("touchmove",Qc,{passive:!1})}function Iw(){Jn-=1,Jn||window.removeEventListener("touchmove",Qc,{passive:!1})}function Qc(t){Ai&&t.preventDefault()}class Ow{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,s){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=n-window.scrollX,this.origScreenY=s-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 s=()=>{this.cleanup(),n()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(s,this.revertDuration):setTimeout(s,0)}doRevertAnimation(e,n){let s=this.mirrorEl,i=this.sourceEl.getBoundingClientRect();s.style.transition="top "+n+"ms,left "+n+"ms",Gt(s,{left:i.left,top:i.top}),Ym(s,()=>{s.style.transition="",e()})}cleanup(){this.mirrorEl&&(Xi(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&Gt(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"),Gt(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 Kc extends br{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 Yc extends Kc{constructor(e,n){super(new Sb(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return bb(this.scrollController.el)}}class _w extends Kc{constructor(e){super(new Eb,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 ea=typeof performance=="function"?performance.now:Date.now;class Nw{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=ea();this.handleSide(e,(n-this.msSinceRequest)/1e3),this.requestAnimation(n)}else this.isAnimating=!1}}}start(e,n,s){this.isEnabled&&(this.scrollCaches=this.buildCaches(s),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 s=e-window.scrollX,i=n-window.scrollY,r=this.pointerScreenY===null?0:i-this.pointerScreenY,o=this.pointerScreenX===null?0:s-this.pointerScreenX;r<0?this.everMovedUp=!0:r>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=s,this.pointerScreenY=i,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(ea()))}}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:s}=e,{edgeThreshold:i}=this,r=i-e.distance,o=r*r/(i*i)*this.maxVelocity*n,a=1;switch(e.name){case"left":a=-1;case"right":s.setScrollLeft(s.getScrollLeft()+o*a);break;case"top":a=-1;case"bottom":s.setScrollTop(s.getScrollTop()+o*a);break}}computeBestEdge(e,n){let{edgeThreshold:s}=this,i=null,r=this.scrollCaches||[];for(let o of r){let a=o.clientRect,l=e-a.left,c=a.right-e,u=n-a.top,d=a.bottom-n;l>=0&&c>=0&&u>=0&&d>=0&&(u<=s&&this.everMovedUp&&o.canScrollUp()&&(!i||i.distance>u)&&(i={scrollCache:o,name:"top",distance:u}),d<=s&&this.everMovedDown&&o.canScrollDown()&&(!i||i.distance>d)&&(i={scrollCache:o,name:"bottom",distance:d}),l<=s&&this.everMovedLeft&&o.canScrollLeft()&&(!i||i.distance>l)&&(i={scrollCache:o,name:"left",distance:l}),c<=s&&this.everMovedRight&&o.canScrollRight()&&(!i||i.distance>c)&&(i={scrollCache:o,name:"right",distance:c}))}return i}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new _w(!1):new Yc(n,!1))}queryScrollEls(e){let n=[];for(let s of this.scrollQuery)typeof s=="object"?n.push(s):n.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(s)));return n}}class cn extends Db{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=i=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,Jm(document.body),ey(document.body),i.isTouch||i.origEvent.preventDefault(),this.emitter.trigger("pointerdown",i),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(i.subjectEl,i.pageX,i.pageY),this.startDelay(i),this.minDistance||this.handleDistanceSurpassed(i)))},this.onPointerMove=i=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",i),!this.isDistanceSurpassed){let r=this.minDistance,o,{deltaX:a,deltaY:l}=i;o=a*a+l*l,o>=r*r&&this.handleDistanceSurpassed(i)}this.isDragging&&(i.origEvent.type!=="scroll"&&(this.mirror.handleMove(i.pageX,i.pageY),this.autoScroller.handleMove(i.pageX,i.pageY)),this.emitter.trigger("dragmove",i))}},this.onPointerUp=i=>{this.isInteracting&&(this.isInteracting=!1,Xm(document.body),ty(document.body),this.emitter.trigger("pointerup",i),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(i)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let s=this.pointer=new Gc(e);s.emitter.on("pointerdown",this.onPointerDown),s.emitter.on("pointermove",this.onPointerMove),s.emitter.on("pointerup",this.onPointerUp),n&&(s.selector=n),this.mirror=new Ow,this.autoScroller=new Nw}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 xw{constructor(e){this.el=e,this.origRect=vr(e),this.scrollCaches=Cc(e).map(n=>new Yc(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 s={left:e,top:n};for(let i of this.scrollCaches)if(!Pw(i.getEventTarget())&&!ob(s,i.clientRect))return!1;return!0}}function Pw(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class As{constructor(e,n){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=s=>{let{dragging:i}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(s),this.initialHit||!this.requireInitial?(i.setIgnoreMove(!1),this.emitter.trigger("pointerdown",s)):i.setIgnoreMove(!0)},this.handleDragStart=s=>{this.emitter.trigger("dragstart",s),this.handleMove(s,!0)},this.handleDragMove=s=>{this.emitter.trigger("dragmove",s),this.handleMove(s)},this.handlePointerUp=s=>{this.releaseHits(),this.emitter.trigger("pointerup",s)},this.handleDragEnd=s=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,s),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",s)},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 Es}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},s=n,i=e.subjectEl,r;i instanceof HTMLElement&&(r=vr(i),s=ab(s,r));let o=this.initialHit=this.queryHitForOffset(s.left,s.top);if(o){if(this.useSubjectCenter&&r){let a=Sc(r,o.rect);a&&(s=lb(a))}this.coordAdjust=cb(s,n)}else this.coordAdjust={left:0,top:0}}handleMove(e,n){let s=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(n||!Cs(this.movingHit,s))&&(this.movingHit=s,this.emitter.trigger("hitupdate",s,!1,e))}prepareHits(){this.offsetTrackers=ke(this.droppableStore,e=>(e.component.prepareHits(),new xw(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:s,offsetTrackers:i}=this,r=null;for(let o in s){let a=s[o].component,l=i[o];if(l&&l.isWithinClipping(e,n)){let c=l.computeLeft(),u=l.computeTop(),d=e-c,f=n-u,{origRect:h}=l,m=h.right-h.left,p=h.bottom-h.top;if(d>=0&&d<m&&f>=0&&f<p){let g=a.queryHit(d,f,m,p);g&&ws(g.dateProfile.activeRange,g.dateSpan.range)&&(this.disablePointCheck||l.el.contains(l.el.getRootNode().elementFromPoint(d+c-window.scrollX,f+u-window.scrollY)))&&(!r||g.layer>r.layer)&&(g.componentId=o,g.context=a.context,g.rect.left+=c,g.rect.right+=c,g.rect.top+=u,g.rect.bottom+=u,r=g)}}}return r}}function Cs(t,e){return!t&&!e?!0:!!t!=!!e?!1:Qv(t.dateSpan,e.dateSpan)}function Jc(t,e){let n={};for(let s of e.pluginHooks.datePointTransforms)Object.assign(n,s(t,e));return Object.assign(n,zw(t,e.dateEnv)),n}function zw(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class Lw extends Ht{constructor(e){super(e),this.handlePointerDown=s=>{let{dragging:i}=this,r=s.origEvent.target;i.setIgnoreMove(!this.component.isValidDateDownEl(r))},this.handleDragEnd=s=>{let{component:i}=this,{pointer:r}=this.dragging;if(!r.wasTouchScroll){let{initialHit:o,finalHit:a}=this.hitDragging;if(o&&a&&Cs(o,a)){let{context:l}=i,c=Object.assign(Object.assign({},Jc(o.dateSpan,l)),{dayEl:o.dayEl,jsEvent:s.origEvent,view:l.viewApi||l.calendarApi.view});l.emitter.trigger("dateClick",c)}}},this.dragging=new cn(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new As(this.dragging,mr(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class jw extends Ht{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=o=>{let{component:a,dragging:l}=this,{options:c}=a.context,u=c.selectable&&a.isValidDateDownEl(o.origEvent.target);l.setIgnoreMove(!u),l.delay=o.isTouch?Bw(a):null},this.handleDragStart=o=>{this.component.context.calendarApi.unselect(o)},this.handleHitUpdate=(o,a)=>{let{context:l}=this.component,c=null,u=!1;if(o){let d=this.hitDragging.initialHit;o.componentId===d.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(d,o)||(c=Fw(d,o,l.pluginHooks.dateSelectionTransformers)),(!c||!xb(c,o.dateProfile,l))&&(u=!0,c=null)}c?l.dispatch({type:"SELECT_DATES",selection:c}):a||l.dispatch({type:"UNSELECT_DATES"}),u?er():tr(),a||(this.dragSelection=c)},this.handlePointerUp=o=>{this.dragSelection&&(dc(this.dragSelection,o,this.component.context),this.dragSelection=null)};let{component:n}=e,{options:s}=n.context,i=this.dragging=new cn(e.el);i.touchScrollAllowed=!1,i.minDistance=s.selectMinDistance||0,i.autoScroller.isEnabled=s.dragScroll;let r=this.hitDragging=new As(this.dragging,mr(e));r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Bw(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function Fw(t,e,n){let s=t.dateSpan,i=e.dateSpan,r=[s.range.start,s.range.end,i.range.start,i.range.end];r.sort(oy);let o={};for(let a of n){let l=a(t,e);if(l===!1)return null;l&&Object.assign(o,l)}return o.range={start:r[0],end:r[3]},o.allDay=s.allDay,o}class un extends Ht{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=o=>{let a=o.origEvent.target,{component:l,dragging:c}=this,{mirror:u}=c,{options:d}=l.context,f=l.context;this.subjectEl=o.subjectEl;let h=this.subjectSeg=Ot(o.subjectEl),p=(this.eventRange=h.eventRange).instance.instanceId;this.relevantEvents=fr(f.getCurrentData().eventStore,p),c.minDistance=o.isTouch?0:d.eventDragMinDistance,c.delay=o.isTouch&&p!==l.props.eventSelection?$w(l):null,d.fixedMirrorParent?u.parentNode=d.fixedMirrorParent:u.parentNode=J(a,".fc"),u.revertDuration=d.dragRevertDuration;let g=l.isValidSegDownEl(a)&&!J(a,".fc-event-resizer");c.setIgnoreMove(!g),this.isDragging=g&&o.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=o=>{let a=this.component.context,l=this.eventRange,c=l.instance.instanceId;o.isTouch?c!==this.component.props.eventSelection&&a.dispatch({type:"SELECT_EVENT",eventInstanceId:c}):a.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(a.calendarApi.unselect(o),a.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new j(a,l.def,l.instance),jsEvent:o.origEvent,view:a.viewApi}))},this.handleHitUpdate=(o,a)=>{if(!this.isDragging)return;let l=this.relevantEvents,c=this.hitDragging.initialHit,u=this.component.context,d=null,f=null,h=null,m=!1,p={affectedEvents:l,mutatedEvents:oe(),isEvent:!0};if(o){d=o.context;let g=d.options;u===d||g.editable&&g.droppable?(f=Hw(c,o,this.eventRange.instance.range.start,d.getCurrentData().pluginHooks.eventDragMutationMassagers),f&&(h=gr(l,d.getCurrentData().eventUiBases,f,d),p.mutatedEvents=h,Mc(p,o.dateProfile,d)||(m=!0,f=null,h=null,p.mutatedEvents=oe()))):d=null}this.displayDrag(d,p),m?er():tr(),a||(u===d&&Cs(c,o)&&(f=null),this.dragging.setMirrorNeedsRevert(!f),this.dragging.setMirrorIsVisible(!o||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=d,this.validMutation=f,this.mutatedRelevantEvents=h)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=o=>{if(this.isDragging){let a=this.component.context,l=a.viewApi,{receivingContext:c,validMutation:u}=this,d=this.eventRange.def,f=this.eventRange.instance,h=new j(a,d,f),m=this.relevantEvents,p=this.mutatedRelevantEvents,{finalHit:g}=this.hitDragging;if(this.clearDrag(),a.emitter.trigger("eventDragStop",{el:this.subjectEl,event:h,jsEvent:o.origEvent,view:l}),u){if(c===a){let v=new j(a,p.defs[d.defId],f?p.instances[f.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:p});let w={oldEvent:h,event:v,relatedEvents:Je(p,a,f),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:m})}},E={};for(let A of a.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(E,A(u,a));a.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},w),E),{el:o.subjectEl,delta:u.datesDelta,jsEvent:o.origEvent,view:l})),a.emitter.trigger("eventChange",w)}else if(c){let v={event:h,relatedEvents:Je(m,a,f),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:m})}};a.emitter.trigger("eventLeave",Object.assign(Object.assign({},v),{draggedEl:o.subjectEl,view:l})),a.dispatch({type:"REMOVE_EVENTS",eventStore:m}),a.emitter.trigger("eventRemove",v);let w=p.defs[d.defId],E=p.instances[f.instanceId],A=new j(c,w,E);c.dispatch({type:"MERGE_EVENTS",eventStore:p});let D={event:A,relatedEvents:Je(p,c,E),revert(){c.dispatch({type:"REMOVE_EVENTS",eventStore:p})}};c.emitter.trigger("eventAdd",D),o.isTouch&&c.dispatch({type:"SELECT_EVENT",eventInstanceId:f.instanceId}),c.emitter.trigger("drop",Object.assign(Object.assign({},Jc(g.dateSpan,c)),{draggedEl:o.subjectEl,jsEvent:o.origEvent,view:g.context.viewApi})),c.emitter.trigger("eventReceive",Object.assign(Object.assign({},D),{draggedEl:o.subjectEl,view:g.context.viewApi}))}}else a.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:s}=n.context,i=this.dragging=new cn(e.el);i.pointer.selector=un.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=s.dragScroll;let r=this.hitDragging=new As(this.dragging,vi);r.useSubjectCenter=e.useEventCenter,r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("pointerup",this.handlePointerUp),r.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,n){let s=this.component.context,i=this.receivingContext;i&&i!==e&&(i===s?i.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:oe(),isEvent:!0}}):i.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}}un.SELECTOR=".fc-event-draggable, .fc-event-resizable";function Hw(t,e,n,s){let i=t.dateSpan,r=e.dateSpan,o=i.range.start,a=r.range.start,l={};i.allDay!==r.allDay&&(l.allDay=r.allDay,l.hasEnd=e.context.options.allDayMaintainDuration,r.allDay?o=L(n):o=n);let c=wt(o,a,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);c.milliseconds&&(l.allDay=!1);let u={datesDelta:c,standardProps:l};for(let d of s)d(u,t,e);return u}function $w(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class Uw extends Ht{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=r=>{let{component:o}=this,a=this.querySegEl(r),l=Ot(a),c=this.eventRange=l.eventRange;this.dragging.minDistance=o.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(r.origEvent.target)||r.isTouch&&this.component.props.eventSelection!==c.instance.instanceId)},this.handleDragStart=r=>{let{context:o}=this.component,a=this.eventRange;this.relevantEvents=fr(o.getCurrentData().eventStore,this.eventRange.instance.instanceId);let l=this.querySegEl(r);this.draggingSegEl=l,this.draggingSeg=Ot(l),o.calendarApi.unselect(),o.emitter.trigger("eventResizeStart",{el:l,event:new j(o,a.def,a.instance),jsEvent:r.origEvent,view:o.viewApi})},this.handleHitUpdate=(r,o,a)=>{let{context:l}=this.component,c=this.relevantEvents,u=this.hitDragging.initialHit,d=this.eventRange.instance,f=null,h=null,m=!1,p={affectedEvents:c,mutatedEvents:oe(),isEvent:!0};r&&(r.componentId===u.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(u,r)||(f=Vw(u,r,a.subjectEl.classList.contains("fc-event-resizer-start"),d.range))),f&&(h=gr(c,l.getCurrentData().eventUiBases,f,l),p.mutatedEvents=h,Mc(p,r.dateProfile,l)||(m=!0,f=null,h=null,p.mutatedEvents=null)),h?l.dispatch({type:"SET_EVENT_RESIZE",state:p}):l.dispatch({type:"UNSET_EVENT_RESIZE"}),m?er():tr(),o||(f&&Cs(u,r)&&(f=null),this.validMutation=f,this.mutatedRelevantEvents=h)},this.handleDragEnd=r=>{let{context:o}=this.component,a=this.eventRange.def,l=this.eventRange.instance,c=new j(o,a,l),u=this.relevantEvents,d=this.mutatedRelevantEvents;if(o.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:c,jsEvent:r.origEvent,view:o.viewApi}),this.validMutation){let f=new j(o,d.defs[a.defId],l?d.instances[l.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:d});let h={oldEvent:c,event:f,relatedEvents:Je(d,o,l),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:u})}};o.emitter.trigger("eventResize",Object.assign(Object.assign({},h),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||O(0),endDelta:this.validMutation.endDelta||O(0),jsEvent:r.origEvent,view:o.viewApi})),o.emitter.trigger("eventChange",h)}else o.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:n}=e,s=this.dragging=new cn(e.el);s.pointer.selector=".fc-event-resizer",s.touchScrollAllowed=!1,s.autoScroller.isEnabled=n.context.options.dragScroll;let i=this.hitDragging=new As(this.dragging,mr(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return J(e.subjectEl,".fc-event")}}function Vw(t,e,n,s){let i=t.context.dateEnv,r=t.dateSpan.range.start,o=e.dateSpan.range.start,a=wt(r,o,i,t.largeUnit);if(n){if(i.add(s.start,a)<s.end)return{startDelta:a}}else if(i.add(s.end,a)>s.start)return{endDelta:a};return null}class Zw{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=s=>{s.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=s=>{let i=this.context.options.unselectCancel,r=Ul(s.origEvent);this.matchesCancel=!!J(r,i),this.matchesEvent=!!J(r,un.SELECTOR)},this.onDocumentPointerUp=s=>{let{context:i}=this,{documentPointer:r}=this,o=i.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!this.isRecentPointerDateSelect){let a=i.options.unselectAuto;a&&(!a||!this.matchesCancel)&&i.calendarApi.unselect(s)}o.eventSelection&&!this.matchesEvent&&i.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new Gc(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 Ww={fixedMirrorParent:b},qw={dateClick:b,eventDragStart:b,eventDragStop:b,eventDrop:b,eventResizeStart:b,eventResizeStop:b,eventResize:b,drop:b,eventReceive:b,eventLeave:b};Sr.dataAttrPrefix="";var eA=$e({name:"@fullcalendar/interaction",componentInteractions:[Lw,jw,un,Uw],calendarInteractions:[Zw],elementDraggingImpl:cn,optionRefiners:Ww,listenerRefiners:qw});const Gw=parseInt(String(Ks.version).split(".")[0]),Qw=Gw<18;class Kw extends hu{constructor(){super(...arguments),this.elRef=pu(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){const e=[];for(const n of this.state.customRenderingMap.values())e.push(Ks.createElement(Yw,{key:n.id,customRendering:n}));return Ks.createElement("div",{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;const e=new u0;this.handleCustomRendering=e.handle.bind(e),this.calendar=new kw(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on("_beforeprint",()=>{Mr(()=>{})});let n;e.subscribe(s=>{const i=Date.now(),r=!n;(Qw||r||this.isUpdating||this.isUnmounting||i-n<100?Xc:Mr)(()=>{this.setState({customRenderingMap:s},()=>{n=i,r?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}Kw.act=Xc;class Yw extends gu{render(){const{customRendering:e}=this.props,{generatorMeta:n}=e,s=typeof n=="function"?n(e.renderProps):n;return mu(s,e.containerEl)}}function Xc(t){t()}function Nn(t,e){let n=[];for(let s=0;s<e;s+=1)n[s]=[];for(let s of t)n[s.row].push(s);return n}function Dn(t,e){let n=[];for(let s=0;s<e;s+=1)n[s]=[];for(let s of t)n[s.firstCol].push(s);return n}function ta(t,e){let n=[];if(t){for(let s=0;s<e;s+=1)n[s]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let s of t.segs)n[s.row].segs.push(s)}else for(let s=0;s<e;s+=1)n[s]=null;return n}const eu=$({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function tu(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 nu extends _{render(){let{props:e}=this;return y(Ar,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:eu,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class su extends _{render(){let{props:e,context:n}=this,{options:s}=n,{seg:i}=e,r=s.eventTimeFormat||eu,o=gc(i,r,n,!0,e.defaultDisplayEventEnd);return y(Er,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:yc(e.seg,n),defaultGenerator:Jw,timeText:o,isResizing:!1,isDateSelecting:!1}))}}function Jw(t){return y(q,null,y("div",{className:"fc-daygrid-event-dot",style:{borderColor:t.borderColor||t.backgroundColor}}),t.timeText&&y("div",{className:"fc-event-time"},t.timeText),y("div",{className:"fc-event-title"},t.event.title||y(q,null," ")))}class Xw extends _{constructor(){super(...arguments),this.compileSegs=M(e1)}render(){let{props:e}=this,{allSegs:n,invisibleSegs:s}=this.compileSegs(e.singlePlacements);return y(Lc,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:s,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let i=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return y(q,null,n.map(r=>{let o=r.eventRange.instance.instanceId;return y("div",{className:"fc-daygrid-event-harness",key:o,style:{visibility:i[o]?"hidden":""}},tu(r)?y(su,Object.assign({seg:r,isDragging:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},Ne(r,e.todayRange))):y(nu,Object.assign({seg:r,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},Ne(r,e.todayRange))))}))}})}}function e1(t){let e=[],n=[];for(let s of t)e.push(s.seg),s.isVisible||n.push(s.seg);return{allSegs:e,invisibleSegs:n}}const t1=$({week:"narrow"});class n1 extends Te{constructor(){super(...arguments),this.rootElRef=ue(),this.state={dayNumberId:vs()},this.handleRootEl=e=>{Se(this.rootElRef,e),Se(this.props.elRef,e)}}render(){let{context:e,props:n,state:s,rootElRef:i}=this,{options:r,dateEnv:o}=e,{date:a,dateProfile:l}=n;const c=n.showDayNumber&&i1(a,l.currentRange,o);return y(Dr,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...n.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},n.extraDataAttrs),n.showDayNumber?{"aria-labelledby":s.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:s1,date:a,dateProfile:l,todayRange:n.todayRange,showDayNumber:n.showDayNumber,isMonthStart:c,extraRenderProps:n.extraRenderProps},(u,d)=>y("div",{ref:n.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:n.minHeight}},n.showWeekNumber&&y(zc,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Yn(e,a,"week"),date:a,defaultFormat:t1}),!d.isDisabled&&(n.showDayNumber||kr(r)||n.forceDayTop)?y("div",{className:"fc-daygrid-day-top"},y(u,{elTag:"a",elClasses:["fc-daygrid-day-number",c&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Yn(e,a)),{id:s.dayNumberId})})):n.showDayNumber?y("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},y("a",{className:"fc-daygrid-day-number"}," ")):void 0,y("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,y("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},y(Xw,{allDayDate:a,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:i,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),y("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}}function s1(t){return t.dayNumberText||y(q,null," ")}function i1(t,e,n){const{start:s,end:i}=e,r=je(i,-1),o=n.getYear(s),a=n.getMonth(s),l=n.getYear(r),c=n.getMonth(r);return!(o===l&&a===c)&&(t.valueOf()===s.valueOf()||n.getDay(t)===1&&t.valueOf()<i.valueOf())}function iu(t){return t.eventRange.instance.instanceId+":"+t.firstCol}function ru(t){return iu(t)+":"+t.lastCol}function r1(t,e,n,s,i,r,o){let a=new l1(v=>{let w=t[v.index].eventRange.instance.instanceId+":"+v.span.start+":"+(v.span.end-1);return i[w]||1});a.allowReslicing=!0,a.strictOrder=s,e===!0||n===!0?(a.maxCoord=r,a.hiddenConsumes=!0):typeof e=="number"?a.maxStackCnt=e:typeof n=="number"&&(a.maxStackCnt=n,a.hiddenConsumes=!0);let l=[],c=[];for(let v=0;v<t.length;v+=1){let w=t[v],E=ru(w);i[E]!=null?l.push({index:v,span:{start:w.firstCol,end:w.lastCol+1}}):c.push(w)}let u=a.addSegs(l),d=a.toRects(),{singleColPlacements:f,multiColPlacements:h,leftoverMargins:m}=o1(d,t,o),p=[],g=[];for(let v of c){h[v.firstCol].push({seg:v,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let w=v.firstCol;w<=v.lastCol;w+=1)f[w].push({seg:kt(v,w,w+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let v=0;v<o.length;v+=1)p.push(0);for(let v of u){let w=t[v.index],E=v.span;h[E.start].push({seg:kt(w,E.start,E.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let A=E.start;A<E.end;A+=1)p[A]+=1,f[A].push({seg:kt(w,A,A+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let v=0;v<o.length;v+=1)g.push(m[v]);return{singleColPlacements:f,multiColPlacements:h,moreCnts:p,moreMarginTops:g}}function o1(t,e,n){let s=a1(t,n.length),i=[],r=[],o=[];for(let a=0;a<n.length;a+=1){let l=s[a],c=[],u=0,d=0;for(let h of l){let m=e[h.index];c.push({seg:kt(m,a,a+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:h.levelCoord,marginTop:h.levelCoord-u}),u=h.levelCoord+h.thickness}let f=[];u=0,d=0;for(let h of l){let m=e[h.index],p=h.span.end-h.span.start>1,g=h.span.start===a;d+=h.levelCoord-u,u=h.levelCoord+h.thickness,p?(d+=h.thickness,g&&f.push({seg:kt(m,h.span.start,h.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:h.levelCoord,marginTop:0})):g&&(f.push({seg:kt(m,h.span.start,h.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:h.levelCoord,marginTop:d}),d=0)}i.push(c),r.push(f),o.push(d)}return{singleColPlacements:i,multiColPlacements:r,leftoverMargins:o}}function a1(t,e){let n=[];for(let s=0;s<e;s+=1)n.push([]);for(let s of t)for(let i=s.span.start;i<s.span.end;i+=1)n[i].push(s);return n}function kt(t,e,n,s){if(t.firstCol===e&&t.lastCol===n-1)return t;let i=t.eventRange,r=i.range,o=st(r,{start:s[e].date,end:Y(s[n-1].date,1)});return Object.assign(Object.assign({},t),{firstCol:e,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:t.isStart&&o.start.valueOf()===r.start.valueOf(),isEnd:t.isEnd&&o.end.valueOf()===r.end.valueOf()})}class l1 extends Dc{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const n=super.addSegs(e),{entriesByLevel:s}=this,i=r=>!this.forceHidden[Xe(r)];for(let r=0;r<s.length;r+=1)s[r]=s[r].filter(i);return n}handleInvalidInsertion(e,n,s){const{entriesByLevel:i,forceHidden:r}=this,{touchingEntry:o,touchingLevel:a,touchingLateral:l}=e;if(this.hiddenConsumes&&o){const c=Xe(o);if(!r[c])if(this.allowReslicing){const u=Object.assign(Object.assign({},o),{span:wr(o.span,n.span)}),d=Xe(u);r[d]=!0,i[a][l]=u,s.push(u),this.splitEntry(o,n,s)}else r[c]=!0,s.push(o)}super.handleInvalidInsertion(e,n,s)}}class ou extends Te{constructor(){super(...arguments),this.cellElRefs=new Ae,this.frameElRefs=new Ae,this.fgElRefs=new Ae,this.segHarnessRefs=new Ae,this.rootElRef=ue(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:n,context:s}=this,{options:i}=s,r=e.cells.length,o=Dn(e.businessHourSegs,r),a=Dn(e.bgEventSegs,r),l=Dn(this.getHighlightSegs(),r),c=Dn(this.getMirrorSegs(),r),{singleColPlacements:u,multiColPlacements:d,moreCnts:f,moreMarginTops:h}=r1(pc(e.fgEventSegs,i.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,i.eventOrderStrict,n.segHeights,n.maxContentHeight,e.cells),m=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return y("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((p,g)=>{let v=this.renderFgSegs(g,e.forPrint?u[g]:d[g],e.todayRange,m),w=this.renderFgSegs(g,c1(c[g],d),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return y(n1,{key:p.key,elRef:this.cellElRefs.createRef(p.key),innerElRef:this.frameElRefs.createRef(p.key),dateProfile:e.dateProfile,date:p.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&g===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:p.extraRenderProps,extraDataAttrs:p.extraDataAttrs,extraClassNames:p.extraClassNames,extraDateSpan:p.extraDateSpan,moreCnt:f[g],moreMarginTop:h[g],singlePlacements:u[g],fgContentElRef:this.fgElRefs.createRef(p.key),fgContent:y(q,null,y(q,null,v),y(q,null,w)),bgContent:y(q,null,this.renderFillSegs(l[g],"highlight"),this.renderFillSegs(o[g],"non-business"),this.renderFillSegs(a[g],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,n){let s=this.props;this.updateSizing(!ye(e,s))}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,s,i,r,o,a){let{context:l}=this,{eventSelection:c}=this.props,{framePositions:u}=this.state,d=this.props.cells.length===1,f=r||o||a,h=[];if(u)for(let m of n){let{seg:p}=m,{instanceId:g}=p.eventRange.instance,v=m.isVisible&&!i[g],w=m.isAbsolute,E="",A="";w&&(l.isRtl?(A=0,E=u.lefts[p.lastCol]-u.lefts[p.firstCol]):(E=0,A=u.rights[p.firstCol]-u.rights[p.lastCol])),h.push(y("div",{className:"fc-daygrid-event-harness"+(w?" fc-daygrid-event-harness-abs":""),key:iu(p),ref:f?null:this.segHarnessRefs.createRef(ru(p)),style:{visibility:v?"":"hidden",marginTop:w?"":m.marginTop,top:w?m.absoluteTop:"",left:E,right:A}},tu(p)?y(su,Object.assign({seg:p,isDragging:r,isSelected:g===c,defaultDisplayEventEnd:d},Ne(p,s))):y(nu,Object.assign({seg:p,isDragging:r,isResizing:o,isDateSelecting:a,isSelected:g===c,defaultDisplayEventEnd:d},Ne(p,s)))))}return h}renderFillSegs(e,n){let{isRtl:s}=this.context,{todayRange:i}=this.props,{framePositions:r}=this.state,o=[];if(r)for(let a of e){let l=s?{right:0,left:r.lefts[a.lastCol]-r.lefts[a.firstCol]}:{left:0,right:r.rights[a.firstCol]-r.rights[a.lastCol]};o.push(y("div",{key:mc(a.eventRange),className:"fc-daygrid-bg-harness",style:l},n==="bg-event"?y(xc,Object.assign({seg:a},Ne(a,i))):Pc(n)))}return y(q,{},...o)}updateSizing(e){let{props:n,state:s,frameElRefs:i}=this;if(!n.forPrint&&n.clientWidth!==null){if(e){let l=n.cells.map(c=>i.currentMap[c.key]);if(l.length){let c=this.rootElRef.current,u=new _t(c,l,!0,!1);(!s.framePositions||!s.framePositions.similarTo(u))&&this.setState({framePositions:new _t(c,l,!0,!1)})}}const r=this.state.segHeights,o=this.querySegHeights(),a=n.dayMaxEvents===!0||n.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},r),o),maxContentHeight:a?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,n={};for(let s in e){let i=Math.round(e[s].getBoundingClientRect().height);n[s]=Math.max(n[s]||0,i)}return n}computeMaxContentHeight(){let e=this.props.cells[0].key,n=this.cellElRefs.currentMap[e],s=this.fgElRefs.currentMap[e];return n.getBoundingClientRect().bottom-s.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(n=>e[n.key])}}ou.addStateEquality({segHeights:ye});function c1(t,e){if(!t.length)return[];let n=u1(e);return t.map(s=>({seg:s,isVisible:!0,isAbsolute:!0,absoluteTop:n[s.eventRange.instance.instanceId],marginTop:0}))}function u1(t){let e={};for(let n of t)for(let s of n)e[s.seg.eventRange.instance.instanceId]=s.absoluteTop;return e}class d1 extends Te{constructor(){super(...arguments),this.splitBusinessHourSegs=M(Nn),this.splitBgEventSegs=M(f1),this.splitFgEventSegs=M(Nn),this.splitDateSelectionSegs=M(Nn),this.splitEventDrag=M(ta),this.splitEventResize=M(ta),this.rowRefs=new Ae}render(){let{props:e,context:n}=this,s=e.cells.length,i=this.splitBusinessHourSegs(e.businessHourSegs,s),r=this.splitBgEventSegs(e.bgEventSegs,s),o=this.splitFgEventSegs(e.fgEventSegs,s),a=this.splitDateSelectionSegs(e.dateSelectionSegs,s),l=this.splitEventDrag(e.eventDrag,s),c=this.splitEventResize(e.eventResize,s),u=s>=7&&e.clientWidth?e.clientWidth/n.options.aspectRatio/6:null;return y($t,{unit:"day"},(d,f)=>y(q,null,e.cells.map((h,m)=>y(ou,{ref:this.rowRefs.createRef(m),key:h.length?h[0].date.toISOString():m,showDayNumbers:s>1,showWeekNumbers:e.showWeekNumbers,todayRange:f,dateProfile:e.dateProfile,cells:h,renderIntro:e.renderRowIntro,businessHourSegs:i[m],eventSelection:e.eventSelection,bgEventSegs:r[m],fgEventSegs:o[m],dateSelectionSegs:a[m],eventDrag:l[m],eventResize:c[m],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:u,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 _t(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new _t(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,n){let{colPositions:s,rowPositions:i}=this,r=s.leftToIndex(e),o=i.topToIndex(n);if(o!=null&&r!=null){let a=this.props.cells[o][r];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(o,r),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(o,r),rect:{left:s.lefts[r],right:s.rights[r],top:i.tops[o],bottom:i.bottoms[o]},layer:0}}return null}getCellEl(e,n){return this.rowRefs.currentMap[e].getCellEls()[n]}getCellRange(e,n){let s=this.props.cells[e][n].date,i=Y(s,1);return{start:s,end:i}}}function f1(t,e){return Nn(t.filter(h1),e)}function h1(t){return t.eventRange.def.allDay}class p1 extends Te{constructor(){super(...arguments),this.elRef=ue(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:n,dayMaxEvents:s,expandRows:i}=e,r=s===!0||n===!0;r&&!i&&(r=!1,n=null,s=null);let o=["fc-daygrid-body",r?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return y("div",{ref:this.elRef,className:o.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},y("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:i?e.clientHeight:""}},e.colGroupNode,y("tbody",{role:"presentation"},y(d1,{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:s,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=g1(this.elRef.current,this.props.dateProfile);if(e){const n=e.closest(".fc-daygrid-body"),s=n.closest(".fc-scroller"),i=e.getBoundingClientRect().top-n.getBoundingClientRect().top;s.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function g1(t,e){let n;return e.currentRangeUnit.match(/year|month/)&&(n=t.querySelector(`[data-date="${ky(e.currentDate)}-01"]`)),n||(n=t.querySelector(`[data-date="${sr(e.currentDate)}"]`)),n}class m1 extends Tc{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}class y1 extends Te{constructor(){super(...arguments),this.slicer=new m1,this.tableRef=ue()}render(){let{props:e,context:n}=this;return y(p1,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}))}}var v1=':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}';Yi(v1);class b1 extends ub{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?Fv(e)?["timed","allDay"]:["allDay"]:["timed"]}}const w1=$({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function au(t){let e=["fc-timegrid-slot","fc-timegrid-slot-label",t.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return y(Re.Consumer,null,n=>{if(!t.isLabeled)return y("td",{className:e.join(" "),"data-time":t.isoTimeStr});let{dateEnv:s,options:i,viewApi:r}=n,o=i.slotLabelFormat==null?w1:Array.isArray(i.slotLabelFormat)?$(i.slotLabelFormat[0]):$(i.slotLabelFormat),a={level:0,time:t.time,date:s.toDate(t.date),view:r,text:s.format(t.date,o)};return y(ae,{elTag:"td",elClasses:e,elAttrs:{"data-time":t.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:S1,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},l=>y("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},y(l,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function S1(t){return t.text}class E1 extends _{render(){return this.props.slatMetas.map(e=>y("tr",{key:e.key},y(au,Object.assign({},e))))}}const A1=$({week:"short"}),C1=5;class D1 extends Te{constructor(){super(...arguments),this.allDaySplitter=new b1,this.headerElRef=ue(),this.rootElRef=ue(),this.scrollerElRef=ue(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let n=this.scrollerElRef.current;n&&(n.scrollTop=e)},this.renderHeadAxis=(e,n="")=>{let{options:s}=this.context,{dateProfile:i}=this.props,r=i.renderRange,a=Ft(r.start,r.end)===1?Yn(this.context,r.start,"week"):{};return s.weekNumbers&&e==="day"?y(zc,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:r.start,defaultFormat:A1},l=>y("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:n}},y(l,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:a}))):y("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},y("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},this.renderTableRowAxis=e=>{let{options:n,viewApi:s}=this.context,i={text:n.allDayText,view:s};return y(ae,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:n.allDayContent,defaultGenerator:k1,classNameGenerator:n.allDayClassNames,didMount:n.allDayDidMount,willUnmount:n.allDayWillUnmount},r=>y("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},y(r,{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,s){let{context:i,props:r}=this,o=[],a=Vo(i.options);return e&&o.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),n&&(o.push({type:"body",key:"all-day",chunk:{content:n}}),o.push({type:"body",key:"all-day-divider",outerContent:y("tr",{role:"presentation",className:"fc-scrollgrid-section"},y("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:!!i.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:s}}),y(xo,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},y(Nc,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[{width:"shrink"}],sections:o}))}renderHScrollLayout(e,n,s,i,r,o,a){let l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");let{context:c,props:u}=this,d=!u.forPrint&&Vo(c.options),f=!u.forPrint&&Kb(c.options),h=[];e&&h.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:p=>y("tr",{role:"presentation"},this.renderHeadAxis("day",p.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),n&&(h.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:p=>y("tr",{role:"presentation"},this.renderTableRowAxis(p.rowSyncHeights[0]))},{key:"cols",content:n}]}),h.push({key:"all-day-divider",type:"body",outerContent:y("tr",{role:"presentation",className:"fc-scrollgrid-section"},y("td",{colSpan:2,className:"fc-timegrid-divider "+c.theme.getClass("tableCellShaded")}))}));let m=c.options.nowIndicator;return h.push({type:"body",key:"body",liquid:!0,expandRows:!!c.options.expandRows,chunks:[{key:"axis",content:p=>y("div",{className:"fc-timegrid-axis-chunk"},y("table",{"aria-hidden":!0,style:{height:p.expandRows?p.clientHeight:""}},p.tableColGroupNode,y("tbody",null,y(E1,{slatMetas:o}))),y("div",{className:"fc-timegrid-now-indicator-container"},y($t,{unit:m?"minute":"day"},g=>{let v=m&&a&&a.safeComputeTop(g);return typeof v=="number"?y(Cr,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:v},isAxis:!0,date:g}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:s}]}),f&&h.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Uo},{key:"cols",content:Uo}]}),y(xo,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:c.viewSpec},y(l,{liquid:!u.isHeightAuto&&!u.forPrint,forPrint:u.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:r}]}],sections:h}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:n}=this.context.options;return(e===!0||n===!0)&&(e=void 0,n=C1),{dayMaxEvents:e,dayMaxEventRows:n}}}function k1(t){return t.text}class R1{constructor(e,n,s){this.positions=e,this.dateProfile=n,this.slotDuration=s}safeComputeTop(e){let{dateProfile:n}=this;if(De(n.currentRange,e)){let s=L(e),i=e.valueOf()-s.valueOf();if(i>=me(n.slotMinTime)&&i<me(n.slotMaxTime))return this.computeTimeTop(O(i))}return null}computeDateTop(e,n){return n||(n=L(e)),this.computeTimeTop(O(e.valueOf()-n.valueOf()))}computeTimeTop(e){let{positions:n,dateProfile:s}=this,i=n.els.length,r=(e.milliseconds-me(s.slotMinTime))/me(this.slotDuration),o,a;return r=Math.max(0,r),r=Math.min(i,r),o=Math.floor(r),o=Math.min(o,i-1),a=r-o,n.tops[o]+n.getHeight(o)*a}}class T1 extends _{render(){let{props:e,context:n}=this,{options:s}=n,{slatElRefs:i}=e;return y("tbody",null,e.slatMetas.map((r,o)=>{let a={time:r.time,date:n.dateEnv.toDate(r.date),view:n.viewApi};return y("tr",{key:r.key,ref:i.createRef(r.key)},e.axis&&y(au,Object.assign({},r)),y(ae,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!r.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":r.isoTimeStr},renderProps:a,generatorName:"slotLaneContent",customGenerator:s.slotLaneContent,classNameGenerator:s.slotLaneClassNames,didMount:s.slotLaneDidMount,willUnmount:s.slotLaneWillUnmount}))}))}}class M1 extends _{constructor(){super(...arguments),this.rootElRef=ue(),this.slatElRefs=new Ae}render(){let{props:e,context:n}=this;return y("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},y("table",{"aria-hidden":!0,className:n.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,y(T1,{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 R1(new _t(this.rootElRef.current,I1(this.slatElRefs.currentMap,n.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function I1(t,e){return e.map(n=>t[n.key])}function Vt(t,e){let n=[],s;for(s=0;s<e;s+=1)n.push([]);if(t)for(s=0;s<t.length;s+=1)n[t[s].col].push(t[s]);return n}function na(t,e){let n=[];if(t){for(let s=0;s<e;s+=1)n[s]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let s of t.segs)n[s.col].segs.push(s)}else for(let s=0;s<e;s+=1)n[s]=null;return n}class O1 extends _{render(){let{props:e}=this;return y(Lc,{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:()=>cu(e.hiddenSegs,e),defaultGenerator:_1,forceTimed:!0},n=>y(n,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function _1(t){return t.shortText}function N1(t,e,n){let s=new Dc;e!=null&&(s.strictOrder=e),n!=null&&(s.maxStackCnt=n);let i=s.addSegs(t),r=Ab(i),o=x1(s);return o=j1(o,1),{segRects:B1(o),hiddenGroups:r}}function x1(t){const{entriesByLevel:e}=t,n=Tr((s,i)=>s+":"+i,(s,i)=>{let r=L1(t,s,i),o=sa(r,n),a=e[s][i];return[Object.assign(Object.assign({},a),{nextLevelNodes:o[0]}),a.thickness+o[1]]});return sa(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n)[0]}function sa(t,e){if(!t)return[[],0];let{level:n,lateralStart:s,lateralEnd:i}=t,r=s,o=[];for(;r<i;)o.push(e(n,r)),r+=1;return o.sort(P1),[o.map(z1),o[0][1]]}function P1(t,e){return e[1]-t[1]}function z1(t){return t[0]}function L1(t,e,n){let{levelCoords:s,entriesByLevel:i}=t,r=i[e][n],o=s[e]+r.thickness,a=s.length,l=e;for(;l<a&&s[l]<o;l+=1);for(;l<a;l+=1){let c=i[l],u,d=wi(c,r.span.start,bi),f=d[0]+d[1],h=f;for(;(u=c[h])&&u.span.start<r.span.end;)h+=1;if(f<h)return{level:l,lateralStart:f,lateralEnd:h}}return null}function j1(t,e){const n=Tr((s,i,r)=>Xe(s),(s,i,r)=>{let{nextLevelNodes:o,thickness:a}=s,l=a+r,c=a/l,u,d=[];if(!o.length)u=e;else for(let h of o)if(u===void 0){let m=n(h,i,l);u=m[0],d.push(m[1])}else{let m=n(h,u,0);d.push(m[1])}let f=(u-i)*c;return[u-f,Object.assign(Object.assign({},s),{thickness:f,nextLevelNodes:d})]});return t.map(s=>n(s,0,0)[1])}function B1(t){let e=[];const n=Tr((i,r,o)=>Xe(i),(i,r,o)=>{let a=Object.assign(Object.assign({},i),{levelCoord:r,stackDepth:o,stackForward:0});return e.push(a),a.stackForward=s(i.nextLevelNodes,r+i.thickness,o+1)+1});function s(i,r,o){let a=0;for(let l of i)a=Math.max(n(l,r,o),a);return a}return s(t,0,0),e}function Tr(t,e){const n={};return(...s)=>{let i=t(...s);return i in n?n[i]:n[i]=e(...s)}}function ia(t,e,n=null,s=0){let i=[];if(n)for(let r=0;r<t.length;r+=1){let o=t[r],a=n.computeDateTop(o.start,e),l=Math.max(a+(s||0),n.computeDateTop(o.end,e));i.push({start:Math.round(a),end:Math.round(l)})}return i}function F1(t,e,n,s){let i=[],r=[];for(let c=0;c<t.length;c+=1){let u=e[c];u?i.push({index:c,thickness:1,span:u}):r.push(t[c])}let{segRects:o,hiddenGroups:a}=N1(i,n,s),l=[];for(let c of o)l.push({seg:t[c.index],rect:c});for(let c of r)l.push({seg:c,rect:null});return{segPlacements:l,hiddenGroups:a}}const H1=$({hour:"numeric",minute:"2-digit",meridiem:!1});class lu extends _{render(){return y(Ar,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:H1}))}}class $1 extends _{constructor(){super(...arguments),this.sortEventSegs=M(pc)}render(){let{props:e,context:n}=this,{options:s}=n,i=s.selectMirror,r=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],o=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},a=this.sortEventSegs(e.fgEventSegs,s.eventOrder);return y(Dr,{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},l=>y("div",{className:"fc-timegrid-col-frame"},y("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),y("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(a,o,!1,!1,!1)),y("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(r,{},!!e.eventDrag,!!e.eventResize,!!i,"mirror")),y("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),kr(s)&&y(l,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,n,s,i,r,o){let{props:a}=this;return a.forPrint?cu(e,a):this.renderPositionedFgSegs(e,n,s,i,r,o)}renderPositionedFgSegs(e,n,s,i,r,o){let{eventMaxStack:a,eventShortHeight:l,eventOrderStrict:c,eventMinHeight:u}=this.context.options,{date:d,slatCoords:f,eventSelection:h,todayRange:m,nowDate:p}=this.props,g=s||i||r,v=ia(e,d,f,u),{segPlacements:w,hiddenGroups:E}=F1(e,v,c,a);return y(q,null,this.renderHiddenGroups(E,e),w.map(A=>{let{seg:D,rect:k}=A,R=D.eventRange.instance.instanceId,C=g||!!(!n[R]&&k),N=Gs(k&&k.span),Q=!g&&k?this.computeSegHStyle(k):{left:0,right:0},pe=!!k&&k.stackForward>0,z=!!k&&k.span.end-k.span.start<l;return y("div",{className:"fc-timegrid-event-harness"+(pe?" fc-timegrid-event-harness-inset":""),key:o||R,style:Object.assign(Object.assign({visibility:C?"":"hidden"},N),Q)},y(lu,Object.assign({seg:D,isDragging:s,isResizing:i,isDateSelecting:r,isSelected:R===h,isShort:z},Ne(D,m,p))))}))}renderHiddenGroups(e,n){let{extraDateSpan:s,dateProfile:i,todayRange:r,nowDate:o,eventSelection:a,eventDrag:l,eventResize:c}=this.props;return y(q,null,e.map(u=>{let d=Gs(u.span),f=U1(u.entries,n);return y(O1,{key:Gl(jc(f)),hiddenSegs:f,top:d.top,bottom:d.bottom,extraDateSpan:s,dateProfile:i,todayRange:r,nowDate:o,eventSelection:a,eventDrag:l,eventResize:c})}))}renderFillSegs(e,n){let{props:s,context:i}=this,o=ia(e,s.date,s.slatCoords,i.options.eventMinHeight).map((a,l)=>{let c=e[l];return y("div",{key:mc(c.eventRange),className:"fc-timegrid-bg-harness",style:Gs(a)},n==="bg-event"?y(xc,Object.assign({seg:c},Ne(c,s.todayRange,s.nowDate))):Pc(n))});return y(q,null,o)}renderNowIndicator(e){let{slatCoords:n,date:s}=this.props;return n?e.map((i,r)=>y(Cr,{key:r,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:n.computeDateTop(i.start,s)},isAxis:!1,date:s})):null}computeSegHStyle(e){let{isRtl:n,options:s}=this.context,i=s.slotEventOverlap,r=e.levelCoord,o=e.levelCoord+e.thickness,a,l;i&&(o=Math.min(1,r+(o-r)*2)),n?(a=1-o,l=r):(a=r,l=1-o);let c={zIndex:e.stackDepth+1,left:a*100+"%",right:l*100+"%"};return i&&!e.stackForward&&(c[n?"marginLeft":"marginRight"]=20),c}}function cu(t,{todayRange:e,nowDate:n,eventSelection:s,eventDrag:i,eventResize:r}){let o=(i?i.affectedInstances:null)||(r?r.affectedInstances:null)||{};return y(q,null,t.map(a=>{let l=a.eventRange.instance.instanceId;return y("div",{key:l,style:{visibility:o[l]?"hidden":""}},y(lu,Object.assign({seg:a,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:l===s,isShort:!1},Ne(a,e,n))))}))}function Gs(t){return t?{top:t.start,bottom:-t.end}:{top:"",bottom:""}}function U1(t,e){return t.map(n=>e[n.index])}class V1 extends _{constructor(){super(...arguments),this.splitFgEventSegs=M(Vt),this.splitBgEventSegs=M(Vt),this.splitBusinessHourSegs=M(Vt),this.splitNowIndicatorSegs=M(Vt),this.splitDateSelectionSegs=M(Vt),this.splitEventDrag=M(na),this.splitEventResize=M(na),this.rootElRef=ue(),this.cellElRefs=new Ae}render(){let{props:e,context:n}=this,s=n.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),i=e.cells.length,r=this.splitFgEventSegs(e.fgEventSegs,i),o=this.splitBgEventSegs(e.bgEventSegs,i),a=this.splitBusinessHourSegs(e.businessHourSegs,i),l=this.splitNowIndicatorSegs(e.nowIndicatorSegs,i),c=this.splitDateSelectionSegs(e.dateSelectionSegs,i),u=this.splitEventDrag(e.eventDrag,i),d=this.splitEventResize(e.eventResize,i);return y("div",{className:"fc-timegrid-cols",ref:this.rootElRef},y("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,y("tbody",{role:"presentation"},y("tr",{role:"row"},e.axis&&y("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},y("div",{className:"fc-timegrid-col-frame"},y("div",{className:"fc-timegrid-now-indicator-container"},typeof s=="number"&&y(Cr,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:s},isAxis:!0,date:e.nowDate})))),e.cells.map((f,h)=>y($1,{key:f.key,elRef:this.cellElRefs.createRef(f.key),dateProfile:e.dateProfile,date:f.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:f.extraRenderProps,extraDataAttrs:f.extraDataAttrs,extraClassNames:f.extraClassNames,extraDateSpan:f.extraDateSpan,fgEventSegs:r[h],bgEventSegs:o[h],businessHourSegs:a[h],nowIndicatorSegs:l[h],dateSelectionSegs:c[h],eventDrag:u[h],eventResize:d[h],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 _t(this.rootElRef.current,Z1(this.cellElRefs.currentMap,e.cells),!0,!1))}}function Z1(t,e){return e.map(n=>t[n.key])}class W1 extends Te{constructor(){super(...arguments),this.processSlotOptions=M(q1),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:s}=this.state;if(n&&s){if(e.time){let i=s.computeTimeTop(e.time);i=Math.ceil(i),i&&(i+=1),n(i)}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 y("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},y(M1,{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}),y(V1,{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:s,options:i}=this.context,{colCoords:r}=this,{dateProfile:o}=this.props,{slatCoords:a}=this.state,{snapDuration:l,snapsPerSlot:c}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),u=r.leftToIndex(e),d=a.positions.topToIndex(n);if(u!=null&&d!=null){let f=this.props.cells[u],h=a.positions.tops[d],m=a.positions.getHeight(d),p=(n-h)/m,g=Math.floor(p*c),v=d*c+g,w=this.props.cells[u].date,E=hi(o.slotMinTime,fy(l,v)),A=s.add(w,E),D=s.add(A,l);return{dateProfile:o,dateSpan:Object.assign({range:{start:A,end:D},allDay:!1},f.extraDateSpan),dayEl:r.els[u],rect:{left:r.lefts[u],right:r.rights[u],top:h,bottom:h+m},layer:0}}return null}}function q1(t,e){let n=e||t,s=nr(t,n);return s===null&&(n=t,s=1),{snapDuration:n,snapsPerSlot:s}}class G1 extends Tc{sliceRange(e,n){let s=[];for(let i=0;i<n.length;i+=1){let r=st(e,n[i]);r&&s.push({start:r.start,end:r.end,isStart:r.start.valueOf()===e.start.valueOf(),isEnd:r.end.valueOf()===e.end.valueOf(),col:i})}return s}}class Q1 extends Te{constructor(){super(...arguments),this.buildDayRanges=M(K1),this.slicer=new G1,this.timeColsRef=ue()}render(){let{props:e,context:n}=this,{dateProfile:s,dayTableModel:i}=e,{nowIndicator:r,nextDayThreshold:o}=n.options,a=this.buildDayRanges(i,s,n.dateEnv);return y($t,{unit:r?"minute":"day"},(l,c)=>y(W1,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,s,null,n,a),{forPrint:e.forPrint,axis:e.axis,dateProfile:s,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:i.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:l,nowIndicatorSegs:r&&this.slicer.sliceNowDate(l,s,o,n,a),todayRange:c,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function K1(t,e,n){let s=[];for(let i of t.headerDates)s.push({start:n.add(i,e.slotMinTime),end:n.add(i,e.slotMaxTime)});return s}const ra=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function Y1(t,e,n,s,i){let r=new Date(0),o=t,a=O(0),l=n||J1(s),c=[];for(;me(o)<me(e);){let u=i.add(r,o),d=nr(a,l)!==null;c.push({date:u,time:o,key:u.toISOString(),isoTimeStr:Ry(u),isLabeled:d}),o=hi(o,s),a=hi(a,s)}return c}function J1(t){let e,n,s;for(e=ra.length-1;e>=0;e-=1)if(n=O(ra[e]),s=nr(n,t),s!==null&&s>1)return n;return t}class X1 extends D1{constructor(){super(...arguments),this.buildTimeColsModel=M(eS),this.buildSlatMetas=M(Y1)}render(){let{options:e,dateEnv:n,dateProfileGenerator:s}=this.context,{props:i}=this,{dateProfile:r}=i,o=this.buildTimeColsModel(r,s),a=this.allDaySplitter.splitProps(i),l=this.buildSlatMetas(r.slotMinTime,r.slotMaxTime,e.slotLabelInterval,e.slotDuration,n),{dayMinWidth:c}=e,u=!c,d=c,f=e.dayHeaders&&y(Ib,{dates:o.headerDates,dateProfile:r,datesRepDistinctDays:!0,renderIntro:u?this.renderHeadAxis:null}),h=e.allDaySlot!==!1&&(p=>y(y1,Object.assign({},a.allDay,{dateProfile:r,dayTableModel:o,nextDayThreshold:e.nextDayThreshold,tableMinWidth:p.tableMinWidth,colGroupNode:p.tableColGroupNode,renderRowIntro:u?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:p.clientWidth,clientHeight:p.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),m=p=>y(Q1,Object.assign({},a.timed,{dayTableModel:o,dateProfile:r,axis:u,slotDuration:e.slotDuration,slatMetas:l,forPrint:i.forPrint,tableColGroupNode:p.tableColGroupNode,tableMinWidth:p.tableMinWidth,clientWidth:p.clientWidth,clientHeight:p.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:p.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return d?this.renderHScrollLayout(f,h,m,o.colCnt,c,l,this.state.slatCoords):this.renderSimpleLayout(f,h,m)}}function eS(t,e){let n=new _b(t.renderRange,e);return new Nb(n,!1)}var tS='.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}';Yi(tS);const nS={allDaySlot:Boolean};var tA=$e({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:nS,views:{timeGrid:{component:X1,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});export{mE as $,NE as A,xE as B,OS as C,_E as D,OE as E,IE as F,TE as G,RE as H,kE as I,CE as J,DE as K,EE as L,rS as M,SE as N,wE as O,AE as P,_u as Q,ME as R,ZE as S,qE as T,KE as U,bE as V,YE as W,JE as X,vE as Y,yE as Z,gE as _,K as a,pE as a0,hE as a1,fE as a2,dE as a3,uE as a4,cE as a5,lE as a6,aE as a7,rE as a8,oE as a9,_S as aA,MS as aB,TS as aC,RS as aD,kS as aE,CS as aF,DS as aG,ES as aH,AS as aI,SS as aJ,wS as aK,bS as aL,IS as aM,vS as aN,yS as aO,mS as aP,gS as aQ,pS as aR,XE as aS,Kw as aT,tA as aU,eA as aV,aS as aW,iE as aa,sE as ab,nE as ac,tE as ad,eE as ae,XS as af,KS as ag,QS as ah,GS as ai,YS as aj,JS as ak,qS as al,WS as am,ZS as an,VS as ao,US as ap,$S as aq,FS as ar,HS as as,BS as at,LS as au,jS as av,zS as aw,PS as ax,NS as ay,xS as az,oS as b,lS as c,dS as d,uS as e,cS as f,eg as g,_g as h,Rt as i,QE as j,GE as k,WE as l,UE as m,le as n,fS as o,VE as p,$E as q,hS as r,iS as s,HE as t,FE as u,BE as v,LE as w,zE as x,jE as y,PE as z};
|